|
|
(self.webpackChunk=self.webpackChunk||[]).push([[5816],{89489:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},59477:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},40001:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},49198:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},87169:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},73331:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},15277:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},52671:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},8657:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},56082:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},33853:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},12893:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},15075:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},32134:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},43531:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},61485:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},38819:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},47472:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Ue,bt){return Te.createElement(We.Z,(0,le.Z)({},Ue,{ref:bt,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le},78780:function(){"use strict"},19136:function(){"use strict"},11570:function(Tn,xn){"use strict";xn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},31687:function(Tn,xn){"use strict";xn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},64686:function(Tn,xn,me){"use strict";var le=me(59301),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ve=(xt,Ue,bt)=>Ue in xt?Te(xt,Ue,{enumerable:!0,configurable:!0,writable:!0,value:bt}):xt[Ue]=bt,Le=(xt,Ue)=>{for(var bt in Ue||(Ue={}))lt.call(Ue,bt)&&Ve(xt,bt,Ue[bt]);if(He)for(var bt of He(Ue))We.call(Ue,bt)&&Ve(xt,bt,Ue[bt]);return xt};const Ct=xt=>React.createElement("svg",Le({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},xt),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"})));xn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},29277:function(){"use strict";function Tn(Oe,te,ee,de){ee===void 0&&(ee=0),de===void 0&&(de=1/0),this._name=Oe,this._defaultValue=te,this._minimum=ee,this._maximum=de}Object.defineProperty(Tn.prototype,"name",{get:function(){return this._name},set:function(Oe){if(typeof Oe!="string"||Oe==="")throw new Error("Shape name must be a valid string.");this._name=Oe}}),Object.defineProperty(Tn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Oe){if(typeof Oe!="number"||isNaN(Oe))throw new Error("The default value must be a real number, not: "+Oe);this._defaultValue=Oe}}),Object.defineProperty(Tn.prototype,"minimum",{get:function(){return this._minimum},set:function(Oe){if(typeof Oe!="number"||isNaN(Oe))throw new Error("Minimum must be a real number, not: "+Oe);this._minimum=Oe}}),Object.defineProperty(Tn.prototype,"maximum",{get:function(){return this._maximum},set:function(Oe){if(typeof Oe!="number"||isNaN(Oe))throw new Error("Maximum must be a real number, not: "+Oe);this._maximum=Oe}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Oe,te){var ee=go.Shape._FigureParameters[Oe];return ee?ee[te]:null},go.Shape.setFigureParameter=function(Oe,te,ee){if(!(ee instanceof Tn))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 de=go.Shape._FigureParameters[Oe];de||(de=[],go.Shape._FigureParameters[Oe]=de),de[te]=ee};var xn=[];function me(Oe,te){var ee=xn.pop();return ee===void 0?new go.Point(Oe,te):(ee.x=Oe,ee.y=te,ee)}function le(){var Oe=xn.pop();return Oe===void 0?new go.Point:Oe}function Te(Oe){xn.push(Oe)}function He(Oe,te,ee,de,se,he,ve,Ee,Me){Me||(Me=new go.Point);var Be=Oe-ee,je=se-ve,_e=NaN,Je=NaN;if(Be===0)if(je===0)Oe===ee&&(_e=Oe,Je=te);else{var Xe=(he-Ee)/je,ht=he-Xe*se;_e=Oe,Je=Xe*_e+ht}else if(je===0){var Ze=(te-de)/Be,Mt=te-Ze*Oe;_e=se,Je=Ze*_e+Mt}else{var Ze=(te-de)/Be,Xe=(he-Ee)/je,Mt=te-Ze*Oe,ht=he-Xe*se;_e=(ht-Mt)/(Ze-Xe),Je=Ze*_e+Mt}return Me.x=_e,Me.y=Je,Me}function lt(Oe,te,ee,de,se,he,ve,Ee,Me,Be,je,_e,Je,Xe){var ht=1-Me,Ze=Me,Mt=Oe*ht+ee*Ze,ot=te*ht+de*Ze,Ot=ee*ht+se*Ze,Pt=de*ht+he*Ze,Dt=se*ht+ve*Ze,Wt=he*ht+Ee*Ze,Lt=Mt*ht+Ot*Ze,qe=ot*ht+Pt*Ze,Ke=Ot*ht+Dt*Ze,Rt=Pt*ht+Wt*Ze,Sn=Lt*ht+Ke*Ze,Pn=qe*ht+Rt*Ze;Be.x=Mt,Be.y=ot,je.x=Lt,je.y=qe,_e.x=Sn,_e.y=Pn,Je.x=Ke,Je.y=Rt,Xe.x=Dt,Xe.y=Wt}var We=new go.Spot(.156,.156),Ve=new go.Spot(.844,.844),Le=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Tn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=5),de=Math.min(de,te/3),de=Math.min(de,ee/3);var se=de*Le,he=new go.Geometry().add(new go.PathFigure(de,0,!0).add(new go.PathSegment(go.PathSegment.Line,te-de,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,de,te-se,0,te,se)).add(new go.PathSegment(go.PathSegment.Line,te,ee-de)).add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,ee-se,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,de)).add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,se,se,0).close()));return se>1&&(he.spot1=new go.Spot(0,0,se,se),he.spot2=new go.Spot(1,1,-se,-se)),he}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Oe,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(Oe,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(Oe,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(Oe,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(Oe,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(Oe,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=0,de.startY=ee/2,de.endX=te,de.endY=ee/2,de}),go.Shape.defineFigureGenerator("LineV",function(Oe,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=te/2,de.startY=0,de.endX=te/2,de.endY=ee,de}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Oe,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(Oe,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(Oe,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(Oe,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(Oe,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(Oe,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(Oe,te,ee){var de=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(de*te,(1-de)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,de*ee)).add(new go.PathSegment(go.PathSegment.Move,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,(1-de)*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(Oe,te,ee){var de=te/2,se=new go.Geometry().add(new go.PathFigure(te,te/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,de,de,de,de).close()));return se.spot1=We,se.spot2=Ve,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Oe,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}),go.Shape.defineFigureGenerator("Line2",function(Oe,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=te,de.startY=0,de.endX=0,de.endY=ee,de}),go.Shape.defineFigureGenerator("Curve1",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Le*te,0,te,(1-Le)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,0,Le*ee,(1-Le)*te,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,Le*ee,Le*te,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Le)*te,0,0,(1-Le)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Oe,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(Oe,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(Oe,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(Oe,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 Tn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=.1:de<-1?de=-1:de>1&&(de=1);var se=Math.abs(de)*te;if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.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())):he.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&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Tn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=10:de<-te?de=-te:de>te&&(de=te);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.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())):he.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&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.setFigureParameter("Trapezoid1",0,new Tn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=.2:de<.5?de=-.5:de>.5&&(de=.5);var se=Math.abs(de)*te;if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.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())):he.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&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Tn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=20:de<-te?de=-te/2:de>te&&(de=te/2);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.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())):he.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&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.setFigureParameter("ManualOperation",0,new Tn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=10:de<-te?de=-te/2:de>te&&(de=te/2);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.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())):he.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&&he.setSpots(se/te,0,(te-se)/te,1),he}});var Ct=[];function xt(){var Oe=Ct.pop();return Oe===void 0?[]:Oe}function Ue(Oe){Oe.length=0,Ct.push(Oe)}function bt(Oe){for(var te=xt(),ee=.5,de=.5,se=Math.PI*1.5,he=0,ve=0;ve<Oe;ve++)he=2*Math.PI/Oe*ve+se,te[ve]=new go.Point(de+ee*Math.cos(he),de+ee*Math.sin(he));return te.push(te[0]),te}function at(Oe){var te=mt(Oe),ee=xt();ee[0]=te[0];for(var de=1,se=1;de<te.length;de+=2,se+=3)ee[se]=te[de],ee[se+1]=te[de],ee[se+2]=te[de+1];return Ue(te),ee}function mt(Oe){for(var te=bt(Oe),ee=xt(),de=Math.floor(te.length/2),se=te.length-1,he=Oe%2===0?2:1,ve=0;ve<se;ve++){var Ee=te[ve],Me=te[ve+1],Be=te[(de+ve-1)%se],je=te[(de+ve+he)%se];ee[ve*2]=Ee,ee[ve*2+1]=He(Ee.x,Ee.y,Be.x,Be.y,Me.x,Me.y,je.x,je.y,new go.Point)}return ee[ee.length]=ee[0],Ue(te),ee}go.Shape.defineFigureGenerator("Pentagon",function(Oe,te,ee){var de=bt(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<5;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Oe,te,ee){var de=bt(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<6;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Oe,te,ee){var de=bt(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<7;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Oe,te,ee){var de=bt(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<8;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Oe,te,ee){var de=bt(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<9;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Oe,te,ee){var de=bt(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Oe,te,ee){var de=bt(12),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Oe,te,ee){var de=mt(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Oe,te,ee){var de=mt(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Oe,te,ee){var de=mt(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<14;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Oe,te,ee){var de=mt(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<16;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Oe,te,ee){var de=mt(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<18;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Oe,te,ee){var de=mt(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<20;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),Ue(de),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Oe,te,ee){var de=at(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ue(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Oe,te,ee){var de=at(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ue(de),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Oe,te,ee){var de=at(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ue(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Oe,te,ee){var de=at(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ue(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Oe,te,ee){var de=at(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ue(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Oe,te,ee){var de=at(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),Ue(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new Tn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Tn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN,se=Oe?Oe.parameter2:NaN;isNaN(de)&&(de=8),isNaN(se)&&(se=8);var he=new go.Geometry,ve=new go.PathFigure(0,0,!0);return he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de<te/2&&se<ee/2&&(ve.add(new go.PathSegment(go.PathSegment.Move,de,se)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,se).close())),he.setSpots(0,0,1,1,de,se,-de,-se),he}),go.Shape.setFigureParameter("Ring",0,new Tn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=8);var se=te/2,he=new go.Geometry,ve=new go.PathFigure(te,te/2,!0);he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var Ee=Math.max(se-de,0);return Ee>0&&(ve.add(new go.PathSegment(go.PathSegment.Move,te/2+Ee,te/2)),ve.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,Ee,Ee).close())),he.spot1=We,he.spot2=Ve,he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Cloud",function(Oe,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(Oe,te,ee){var de=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(de*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,te,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Line,de*te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,de*ee).close())).setSpots(de/2,de/2,1-de/2,1-de/2)}),go.Shape.setFigureParameter("Pie",0,new Tn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Tn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN,se=Oe?Oe.parameter2:NaN;isNaN(de)&&(de=0),isNaN(se)&&(se=315);var he=de%360;he<0&&(he+=360);var ve=se%360,Ee=Math.min(te,ee)/2;return new go.Geometry().add(new go.PathFigure(Ee,Ee).add(new go.PathSegment(go.PathSegment.Arc,he,ve,Ee,Ee,Ee,Ee).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Oe,te,ee){var de=Le/Math.SQRT2*.5,se=Math.SQRT2/2,he=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*te,he*ee,te,(1-de)*ee,(se+de)*te,(he+de)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Tn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=30);var se=Math.min(de,te)/2,he=te/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Tn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=10);var se=Math.min(de,te)/2,he=te/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Tn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;if((isNaN(de)||de<0)&&(de=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 he=te/2,ve=ee/2,Ee=Math.atan2(ee,te),Me=de-Math.min(Math.cos(Ee)*de/2,he),Be=de-Math.min(Math.sin(Ee)*de/2,ve),se=new go.Geometry,je=new go.PathFigure(Me,0,!0);return se.add(je),je.add(new go.PathSegment(go.PathSegment.Line,he,.2*ee)),je.add(new go.PathSegment(go.PathSegment.Line,te-Me,0)),je.add(new go.PathSegment(go.PathSegment.Line,te,Be)),je.add(new go.PathSegment(go.PathSegment.Line,.8*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,te,ee-Be)),je.add(new go.PathSegment(go.PathSegment.Line,te-Me,ee)),je.add(new go.PathSegment(go.PathSegment.Line,he,.8*ee)),je.add(new go.PathSegment(go.PathSegment.Line,Me,ee)),je.add(new go.PathSegment(go.PathSegment.Line,0,ee-Be)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,0,Be).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Tn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=10);var se=new go.Geometry,he=new go.PathFigure(.1*te,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Tn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.2);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+de/2)*te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+de/2)*te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-de/2)*te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-de/2)*te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,de*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Tn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.5);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Math.abs(1-de)*te,.25*ee,Math.abs(1-de)*te,.75*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,de*te,.75*ee,de*te,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,Le*te,0,te,(.5-Le/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,(.5+Le/2)*ee,Le*te,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Oe,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(Oe,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(Oe,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(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.4*te,.6*ee,!0);de.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 he=.2,ve=.3,Ee=0,Me=he*Le;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Me+Ee)*ee,(.5-Me+ve)*te,(.5+he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+Ee)*ee,(.5+Me+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Me+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve)*te,(.5-Me+Ee)*ee,(.5+Me+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*te,.36771243*ee,(.5-Me+ve)*te,(.5-he+Ee)*ee,(.5-he+ve+.05)*te,(.5-Me+Ee-.02)*ee)),he=.2,ve=0,Ee=-.3,Me=he*Le,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+Ee)*ee,(.5+Me+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Me+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve)*te,(.5-Me+Ee)*ee,(.5+Me+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+Ee)*ee,(.5-Me+ve)*te,(.5-he+Ee)*ee,(.5-he+ve)*te,(.5-Me+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Me+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Me+Ee)*ee,(.5-Me+ve)*te,(.5+he+Ee)*ee)),he=.2,ve=-.3,Ee=0,Me=he*Le,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve-.05)*te,(.5-Me+Ee-.02)*ee,(.5+Me+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+Ee)*ee,(.5-Me+ve)*te,(.5-he+Ee)*ee,(.5-he+ve)*te,(.5-Me+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Me+Ee)*ee,(.5-Me+ve)*te,(.5+he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.6*ee,(.5+Me+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Me+Ee)*ee).close()),de.setSpots(.06,.33,.93,.68),de}),go.Shape.defineFigureGenerator("YinYang",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.5,0,!0);de.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 he=.1,ve=.5,Ee=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ve+he)*te,Ee*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,te*ve,ee*Ee,he*te,he*te).close()),se=new go.PathFigure(te*.5,0,!1),de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*.5,te*.5,te*.5,te*.5)),Ee=.75,se=new go.PathFigure((ve+he)*te,Ee*ee,!0),de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,te*ve,ee*Ee,he*te,he*te).close()),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Peace",function(Oe,te,ee){var de=.8535533905932737,se=.5*te,he=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,he,se,he)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,de*ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,de*te,de*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=.5,ve=.5,Ee=.5,Me=new go.PathFigure(ve*te,(Ee-he)*ee);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),he=.4,se=Le*.4;var Be=le(),je=le(),_e=le(),Je=le();lt(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.42,Be,je,_e,Je,Je);var Xe=le(),ht=le(),Ze=le();lt(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.58,Je,Je,Ze,Xe,ht);var Mt=le(),ot=le(),Ot=le();lt(ve,Ee+he,ve-se,Ee+he,ve-he,Ee+se,ve-he,Ee,.42,Mt,ot,Ot,Je,Je);var Pt=le(),Dt=le(),Wt=le();return lt(ve,Ee+he,ve-se,Ee+he,ve-he,Ee+se,ve-he,Ee,.58,Je,Je,Wt,Pt,Dt),Me.add(new go.PathSegment(go.PathSegment.Move,Wt.x*te,Wt.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,Pt.x*te,Pt.y*ee,Dt.x*te,Dt.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,_e.x*te,_e.y*ee,Be.x*te,Be.y*ee,je.x*te,je.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,Wt.x*te,Wt.y*ee).close()),Me.add(new go.PathSegment(go.PathSegment.Move,Ot.x*te,Ot.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,Ze.x*te,Ze.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,Xe.x*te,Xe.y*ee,ht.x*te,ht.y*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*te,Ot.y*ee,Mt.x*te,Mt.y*ee,ot.x*te,ot.y*ee).close()),Te(Be),Te(je),Te(_e),Te(Je),Te(Xe),Te(ht),Te(Ze),Te(Mt),Te(ot),Te(Ot),Te(Pt),Te(Dt),Te(Wt),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Fragile",function(Oe,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 Tn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=30),de>te&&(de=te);var se=(te-de)/2,he=se+de;return new go.Geometry().add(new go.PathFigure(he,.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(Oe,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(Oe,te,ee){var de=new go.Geometry,se=Le*.4,he=.4,ve=.5,Ee=.5,Me=le(),Be=le(),je=le(),_e=le(),Je=new go.PathFigure((ve-he)*te,Ee*ee,!1);de.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),lt(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.44,je,_e,Be,Me,Me),Je.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*te,Be.y*ee,je.x*te,je.y*ee,_e.x*te,_e.y*ee));var Xe=me(Be.x,Be.y);lt(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.56,Me,Me,Be,je,_e);var ht=me(Be.x,Be.y);Je.add(new go.PathSegment(go.PathSegment.Line,(Xe.x*.1+.95*.9)*te,Xe.y*.1*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*te,Xe.y*.1*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*te,0)),Je.add(new go.PathSegment(go.PathSegment.Line,te,0)),Je.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,(ht.x*.1+.9)*te,.15*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,(ht.x*.1+.9)*te,(ht.y*.1+.05*.9)*ee)),Je.add(new go.PathSegment(go.PathSegment.Line,ht.x*te,ht.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,je.x*te,je.y*ee,_e.x*te,_e.y*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),he=.35,se=Le*.35;var Ze=new go.PathFigure(ve*te,(Ee-he)*ee,!1);de.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee));var Mt=new go.PathFigure((ve-he)*te,Ee*ee,!1);return de.add(Mt),Te(Me),Te(Be),Te(je),Te(_e),Te(Xe),Te(ht),de.spot1=new go.Spot(.202,.257),de.spot2=new go.Spot(.792,.739),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("GenderFemale",function(Oe,te,ee){var de=new go.Geometry,se=.375,he=0,ve=-.125,Ee=se*Le,Me=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*te,(.5+ve)*ee,(.5+Ee+he)*te,(.5+se+ve)*ee,(.5+se+he)*te,(.5+Ee+ve)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5-se+ve)*ee,(1-.5+se+he)*te,(.5-Ee+ve)*ee,(.5+Ee+he)*te,(.5-se+ve)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-Ee+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-Ee+ve)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.475+he)*te,(.5+se+ve)*ee,(.5-se+he)*te,(.5+Ee+ve)*ee,(.5-Ee+he)*te,(.5+se+ve)*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.475*te,.85*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.425*te,.85*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.425*te,.9*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.475*te,.9*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.475*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.525*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.525*te,.9*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.575*te,.9*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.575*te,.85*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee).close()),se=.325,he=0,ve=-.125,Ee=se*Le;var Me=new go.PathFigure((1-.5+se+he)*te,(.5+ve)*ee,!1);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5+se+ve)*ee,(.5+se+he)*te,(.5+Ee+ve)*ee,(.5+Ee+he)*te,(.5+se+ve)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-Ee+he)*te,(.5+se+ve)*ee,(.5-se+he)*te,(.5+Ee+ve)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(.5+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-Ee+ve)*ee,(.5-Ee+he)*te,(.5-se+ve)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+he)*te,(.5+ve)*ee,(.5+Ee+he)*te,(.5-se+ve)*ee,(1-.5+se+he)*te,(.5-Ee+ve)*ee));var Me=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);return de.add(Me),de.spot1=new go.Spot(.232,.136),de.spot2=new go.Spot(.682,.611),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("LogicImplies",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;return isNaN(de)&&(de=.2),new go.Geometry().add(new go.PathFigure((1-de)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*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(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;return isNaN(de)&&(de=.2),new go.Geometry().add(new go.PathFigure((1-de)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*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,de*te,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,de*te,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Oe,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(Oe,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(Oe,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(Oe,te,ee){var de=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 de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("LogicTruth",function(Oe,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(Oe,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(Oe,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(Oe,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(Oe,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(Oe,te,ee){var de=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,de*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,de*te,de*ee,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Oe,te,ee){var de=.5;return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,de*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,de*te,de*ee,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Tn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Tn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.3);var se=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=.3);var he=(1-de)*te,ve=(.5-se/2)*ee,Ee=(.5+se/2)*ee,Me=new go.Geometry,Be=new go.PathFigure(0,ve,!0);Me.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Be.add(new go.PathSegment(go.PathSegment.Line,he,0)),Be.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,he,Ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,Ee).close()),Me.spot1=new go.Spot(0,ve/ee);var je=He(0,Ee/ee,1,Ee/ee,he/te,1,1,.5,le());return Me.spot2=new go.Spot(je.x,je.y),Te(je),Me}),go.Shape.setFigureParameter("Arrow2",0,new Tn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Tn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=30),de>te&&(de=te);var se=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var he=te-de,ve=(ee-se)/2,Ee=ve+se,Me=new go.Geometry,Be=new go.PathFigure(0,ve,!0);Me.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Be.add(new go.PathSegment(go.PathSegment.Line,he,0)),Be.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,he,Ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,Ee).close()),Me.spot1=new go.Spot(0,ve/ee);var je=He(0,Ee/ee,1,Ee/ee,he/te,1,1,.5,le());return Me.spot2=new go.Spot(je.x,je.y),Te(je),Me}),go.Shape.defineFigureGenerator("Chevron",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.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()),de}),go.Shape.defineFigureGenerator("DoubleArrow",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.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()),de}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Tn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.3);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close());var Me=He(0,.5,.3,0,0,se/ee,.1,se/ee,le());return ve.spot1=new go.Spot(Me.x,Me.y),Me=He(.7,1,1,.5,0,he/ee,1,he/ee,Me),ve.spot2=new go.Spot(Me.x,Me.y),Te(Me),ve}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Tn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Tn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=40);var se=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-de)/2,ve=he+de,Ee=(ee-se)/2,Me=Ee+se;(de>ee||se>ee)&&(se>de?(de=de*ee/se,he=(ee-de)/2,ve=he+de,Ee=0,Me=ee):(he=0,ve=ee,Ee=0,Me=ee));var Be=new go.Geometry,je=new go.PathFigure(te,.5*ee,!0);Be.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,Me)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,.3*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,.3*te,Me)),je.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),je.add(new go.PathSegment(go.PathSegment.Line,.3*te,Ee)),je.add(new go.PathSegment(go.PathSegment.Line,.3*te,he)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ee).close());var _e=He(0,.5,.3,Ee/ee,0,he/ee,1,he/ee,le());return Be.spot1=new go.Spot(_e.x,_e.y),_e=He(.7,Me/ee,1,.5,0,ve/ee,1,ve/ee,_e),Be.spot2=new go.Spot(_e.x,_e.y),Te(_e),Be}),go.Shape.setFigureParameter("IBeamArrow",0,new Tn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.3);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(0,se/ee);var Me=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Me.x,Me.y),Te(Me),ve}),go.Shape.setFigureParameter("IBeamArrow2",0,new Tn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Tn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=40);var se=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-de)/2,ve=he+de,Ee=(ee-se)/2,Me=Ee+se;(de>ee||se>ee)&&(se>de?(de=de*ee/se,he=(ee-de)/2,ve=he+de,Ee=0,Me=ee):(he=0,ve=ee,Ee=0,Me=ee));var Be=new go.Geometry,je=new go.PathFigure(te,.5*ee,!0);Be.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,Me)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,Me)),je.add(new go.PathSegment(go.PathSegment.Line,0,Me)),je.add(new go.PathSegment(go.PathSegment.Line,0,Ee)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,Ee)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,he)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ee).close()),Be.spot1=new go.Spot(0,he/ee);var _e=He(.7,Me/ee,1,.5,0,ve/ee,1,ve/ee,le());return Be.spot2=new go.Spot(_e.x,_e.y),Te(_e),Be}),go.Shape.setFigureParameter("Pointer",0,new Tn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.1);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(de,.35);var ve=He(.2,.65,1,.65,0,1,1,.5,le());return se.spot2=new go.Spot(ve.x,ve.y),Te(ve),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Tn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.3);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,de*te,.75*ee,de*te,.25*ee).close()),se.spot1=new go.Spot(de,.35);var ve=He(0,.65,1,.65,0,1,1,.5,le());return se.spot2=new go.Spot(ve.x,ve.y),Te(ve),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Tn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.4);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(.2,.3);var Me=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Me.x,Me.y),Te(Me),ve}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Tn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=50);var se=(ee-de)/2,he=se+de;de>ee&&(se=0,he=ee);var ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(.2,se/ee);var Me=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Me.x,Me.y),Te(Me),ve}),go.Shape.setFigureParameter("SquareArrow",0,new Tn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.7);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,de*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(de,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=Le*.1,ve=new go.PathFigure(0,.9*ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee).close()),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.97),de}),go.Shape.defineFigureGenerator("Cone2",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);de.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 he=new go.PathFigure(0,.9*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,.8*ee,.85/.9*te,.8*ee)),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.82),de}),go.Shape.defineFigureGenerator("Cube1",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,ee,!0);de.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 he=new go.PathFigure(.5*te,ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(.5,.85),de}),go.Shape.defineFigureGenerator("Cube2",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);de.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 he=new go.PathFigure(0,.3*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Move,.7*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(.7,1),de}),go.Shape.defineFigureGenerator("Cylinder1",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,ee/3);var se=new go.Geometry,he=Le*.5,ve=new go.PathFigure(0,de,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Le*de,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,1*te,de,(.5+he)*te,0,1*te,Le*de)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,1*ee,1*te,ee-Le*de,(.5+he)*te,1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,(.5-he)*te,1*ee,0,ee-Le*de)),ve.add(new go.PathSegment(go.PathSegment.Line,0,de));var Ee=new go.PathFigure(te,de,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,2*de,1*te,2*de-Le*de,(.5+he)*te,2*de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,de,(.5-he)*te,2*de,0,2*de-Le*de)),se.spot1=new go.Spot(0,0,0,2*de),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,ee/3);var se=new go.Geometry,he=Le*.5,ve=new go.PathFigure(0,ee-de,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Le*de,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,de,(.5+he)*te,0,te,Le*de)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,ee-Le*de,(.5+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,(.5-he)*te,ee,0,ee-Le*de));var Ee=new go.PathFigure(0,ee-de,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee-2*de,0,ee-de-Le*de,(.5-he)*te,ee-2*de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te,ee-de,(.5+he)*te,ee-2*de,te,ee-de-Le*de)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*de),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,te/3);var se=new go.Geometry,he=Le*.5,ve=new go.PathFigure(de,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Le*de,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,(.5+he)*ee,te-Le*de,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Le*de,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,(.5-he)*ee,Le*de,0));var Ee=new go.PathFigure(de,0,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,2*de,.5*ee,de+Le*de,0,2*de,(.5-he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,de,ee,2*de,(.5+he)*ee,de+Le*de,ee)),se.spot1=new go.Spot(0,0,2*de,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,te/3);var se=new go.Geometry,he=Le*.5,ve=new go.PathFigure(te-de,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Le*de,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,(.5+he)*ee,te-Le*de,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Le*de,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,(.5-he)*ee,Le*de,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,0));var Ee=new go.PathFigure(te-de,0,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-2*de,.5*ee,te-de-Le*de,0,te-2*de,(.5-he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te-2*de,(.5+he)*ee,te-de-Le*de,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*de,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,.25*ee,!0);de.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 he=new go.PathFigure(.25*te,.25*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.408,.172),de.spot2=new go.Spot(.833,.662),de}),go.Shape.defineFigureGenerator("Prism2",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);de.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 he=new go.PathFigure(0,ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("Pyramid1",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.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 he=new go.PathFigure(.5*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.25,.367),de.spot2=new go.Spot(.75,.875),de}),go.Shape.defineFigureGenerator("Pyramid2",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.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 he=new go.PathFigure(.5*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),de.spot1=new go.Spot(.25,.367),de.spot2=new go.Spot(.75,.875),de}),go.Shape.defineFigureGenerator("Actor",function(Oe,te,ee){var de=new go.Geometry,se=.2,he=.1,ve=Le*se,Ee=Le*he,Me=.5,Be=.1,je=new go.PathFigure(Me*te,(Be+he)*ee,!0);de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,(Me-se)*te,Be*ee,(Me-ve)*te,(Be+he)*ee,(Me-se)*te,(Be+Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be-he)*ee,(Me-se)*te,(Be-Ee)*ee,(Me-ve)*te,(Be-he)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Me+se)*te,Be*ee,(Me+ve)*te,(Be-he)*ee,(Me+se)*te,(Be-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be+he)*ee,(Me+se)*te,(Be+Ee)*ee,(Me+ve)*te,(Be+he)*ee));var _e=.05,Je=Le*_e;Me=.05,Be=.25;var Xe=new go.PathFigure(.5*te,.2*ee,!0);return de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Line,.95*te,.2*ee)),Me=.95,Be=.25,Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Me+_e)*te,Be*ee,(Me+Je)*te,(Be-_e)*ee,(Me+_e)*te,(Be-Je)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.85*te,.35*ee)),_e=.025,Je=Le*_e,Me=.825,Be=.35,Xe.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be-_e)*ee,(Me+_e)*te,(Be-Je)*ee,(Me+Je)*te,(Be-_e)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Me-_e)*te,Be*ee,(Me-Je)*te,(Be-_e)*ee,(Me-_e)*te,(Be-Je)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee)),_e=.05,Je=Le*_e,Me=.5,Be=.7,Xe.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be-_e)*ee,(Me+_e)*te,(Be-Je)*ee,(Me+Je)*te,(Be-_e)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Me-_e)*te,Be*ee,(Me-Je)*te,(Be-_e)*ee,(Me-_e)*te,(Be-Je)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.45*te,ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.2*te,.35*ee)),_e=.025,Je=Le*_e,Me=.175,Be=.35,Xe.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be-_e)*ee,(Me+_e)*te,(Be-Je)*ee,(Me+Je)*te,(Be-_e)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Me-_e)*te,Be*ee,(Me-Je)*te,(Be-_e)*ee,(Me-_e)*te,(Be-Je)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),_e=.05,Je=Le*_e,Me=.05,Be=.25,Xe.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be-_e)*ee,(Me-_e)*te,(Be-Je)*ee,(Me-Je)*te,(Be-_e)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),de.spot1=new go.Spot(.2,.2),de.spot2=new go.Spot(.8,.65),de}),go.Shape.setFigureParameter("Card",0,new Tn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.2);var se=new go.Geometry,he=new go.PathFigure(te,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,0).close()),se.spot1=new go.Spot(0,de),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,.5*ee,!0);de.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 he=new go.PathFigure(.5*te,.5*ee,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),de.spot1=new go.Spot(.25,0),de.spot2=new go.Spot(.75,.25),de}),go.Shape.defineFigureGenerator("CreateRequest",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),de}),go.Shape.defineFigureGenerator("Database",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=Le*.1,ve=new go.PathFigure(te,.1*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-he)*ee,(.5-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-he)*ee));var Ee=new go.PathFigure(te,.1*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+he)*ee,(.5+se)*te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+he)*ee,(.5+se)*te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.4*ee,te,(.3+he)*ee,(.5+se)*te,.4*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*te,.4*ee,0,(.3+he)*ee)),de.spot1=new go.Spot(0,.4),de.spot2=new go.Spot(1,.9),de}),go.Shape.defineFigureGenerator("DataStorage",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.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()),de.spot1=new go.Spot(.226,0),de.spot2=new go.Spot(.81,1),de}),go.Shape.defineFigureGenerator("DiskStorage",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=Le*.1,ve=new go.PathFigure(te,.1*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-he)*ee,(.5-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-he)*ee));var Ee=new go.PathFigure(te,.1*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+he)*ee,(.5+se)*te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+he)*ee,(.5+se)*te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+he)*ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(1,.9),de}),go.Shape.defineFigureGenerator("Display",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return de.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()),de.spot1=new go.Spot(.25,0),de.spot2=new go.Spot(.75,1),de}),go.Shape.defineFigureGenerator("DividedEvent",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var he=Le*.2,ve=new go.PathFigure(0,.2*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,0,(.2-he)*ee,(.2-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.2*ee,(.8+he)*te,0,te,(.2-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,ee,te,(.8+he)*ee,(.8+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-he)*te,ee,0,(.8+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var Ee=new go.PathFigure(0,se*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),de}),go.Shape.defineFigureGenerator("DividedProcess",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),de}),go.Shape.defineFigureGenerator("Document",function(Oe,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return de.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()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(1,.6),de}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),de}),go.Shape.defineFigureGenerator("ExternalProcess",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.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 he=new go.PathFigure(.1*te,.4*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.9*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.6*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.4*te,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.9*ee)),de.spot1=new go.Spot(.25,.25),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("File",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.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 he=new go.PathFigure(.75*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("Interrupt",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,.5*ee,!0);de.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 he=new go.PathFigure(te,.5*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee));var ve=new go.PathFigure(te,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("InternalStorage",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN,he=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.1);var ve=new go.PathFigure(0,0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var Ee=new go.PathFigure(se*te,0,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,0,he*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he*ee)),de}),go.Shape.defineFigureGenerator("Junction",function(Oe,te,ee){var de=new go.Geometry,se=1/Math.SQRT2,he=(1-1/Math.SQRT2)/2,ve=Le*.5,Ee=.5,Me=new go.PathFigure(te,Ee*ee,!0);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,ee,te,(Ee+ve)*ee,(Ee+ve)*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,Ee*ee,(Ee-ve)*te,ee,0,(Ee+ve)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,0,0,(Ee-ve)*ee,(Ee-ve)*te,0)),Me.add(new go.PathSegment(go.PathSegment.Bezier,te,Ee*ee,(Ee+ve)*te,0,te,(Ee-ve)*ee));var Be=new go.PathFigure((he+se)*te,(he+se)*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,he*te,he*ee)),Be.add(new go.PathSegment(go.PathSegment.Move,he*te,(he+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,(he+se)*te,he*ee)),de}),go.Shape.defineFigureGenerator("LinedDocument",function(Oe,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);de.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 he=new go.PathFigure(.1*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.75*ee)),de.spot1=new go.Spot(.1,0),de.spot2=new go.Spot(1,.6),de}),go.Shape.defineFigureGenerator("LoopLimit",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.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()),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("MagneticTape",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=.5,ve=new go.PathFigure(.5*te,ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(he+.1)*te,.9*ee,te,(he+se)*ee,(he+se)*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.15,.15),de.spot2=new go.Spot(.85,.8),de}),go.Shape.defineFigureGenerator("ManualInput",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!0);return de.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()),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("MessageFromUser",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.7);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,se*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,se*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("MicroformRecording",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.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()),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(1,.75),de}),go.Shape.defineFigureGenerator("MultiDocument",function(Oe,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(te,0,!0);de.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 he=new go.PathFigure(.1*te,.2*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.44*ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.8,.77),de}),go.Shape.defineFigureGenerator("MultiProcess",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,.1*ee,!0);de.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 he=new go.PathFigure(.2*te,.1*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.1*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),de.spot1=new go.Spot(0,.2),de.spot2=new go.Spot(.8,1),de}),go.Shape.defineFigureGenerator("OfflineStorage",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=1-se,ve=new go.PathFigure(0,0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close());var Ee=new go.PathFigure(.5*se*te,se*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*te,se*ee)),de}),go.Shape.defineFigureGenerator("OffPageConnector",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.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()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(.75,1),de}),go.Shape.defineFigureGenerator("Or",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,ee,te,(he+se)*ee,(he+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee));var Ee=new go.PathFigure(te,.5*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),de}),go.Shape.defineFigureGenerator("PaperTape",function(Oe,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return de.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()),de.spot1=new go.Spot(0,.49),de.spot2=new go.Spot(1,.75),de}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN,he=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN,he=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("Procedure",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure((1-se)*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,se*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),de}),go.Shape.defineFigureGenerator("Process",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("Sort",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.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 he=new go.PathFigure(0,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),de.spot1=new go.Spot(.25,.25),de.spot2=new go.Spot(.75,.5),de}),go.Shape.defineFigureGenerator("Start",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(se*te,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee));var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),de.spot1=new go.Spot(se,0),de.spot2=new go.Spot(1-se,1),de}),go.Shape.defineFigureGenerator("Terminator",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return de.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)),de.spot1=new go.Spot(.23,0),de.spot2=new go.Spot(.77,1),de}),go.Shape.defineFigureGenerator("TransmittalTape",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),de.spot1=go.Spot.TopLeft,de}),go.Shape.defineFigureGenerator("AndGate",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(.5+se)*te,0,te,(.5-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.5+se)*ee,(.5+se)*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(.55,1),de}),go.Shape.defineFigureGenerator("Buffer",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("Clock",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,ee,te,(he+se)*ee,(he+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee));var Ee=new go.PathFigure(te,he*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he*ee));var Me=new go.PathFigure(.8*te,.75*ee,!1);return de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,.8*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.6*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.6*te,.75*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.4*te,.75*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.4*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,.2*te,.75*ee)),de}),go.Shape.defineFigureGenerator("Ground",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return de.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)),de}),go.Shape.defineFigureGenerator("Inverter",function(Oe,te,ee){var de=new go.Geometry,se=Le*.1,he=.1,ve=.9,Ee=.5,Me=new go.PathFigure(.8*te,.5*ee,!0);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Me.add(new go.PathSegment(go.PathSegment.Line,0,0)),Me.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee));var Be=new go.PathFigure((ve+he)*te,Ee*ee,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.4,.75),de}),go.Shape.defineFigureGenerator("NandGate",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=Le*.4,ve=Le*.1,Ee=.1,Me=.9,Be=.5,je=new go.PathFigure(.8*te,.5*ee,!0);de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,.8*te,(.5+he)*ee,(.4+se)*te,ee)),je.add(new go.PathSegment(go.PathSegment.Line,0,ee)),je.add(new go.PathSegment(go.PathSegment.Line,0,0)),je.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),je.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(.4+se)*te,0,.8*te,(.5-he)*ee));var _e=new go.PathFigure((Me+Ee)*te,Be*ee,!0);return de.add(_e),_e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be+Ee)*ee,(Me+Ee)*te,(Be+ve)*ee,(Me+ve)*te,(Be+Ee)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,(Me-Ee)*te,Be*ee,(Me-ve)*te,(Be+Ee)*ee,(Me-Ee)*te,(Be+ve)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be-Ee)*ee,(Me-Ee)*te,(Be-ve)*ee,(Me-ve)*te,(Be-Ee)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,(Me+Ee)*te,Be*ee,(Me+ve)*te,(Be-Ee)*ee,(Me+Ee)*te,(Be-ve)*ee)),de.spot1=new go.Spot(0,.05),de.spot2=new go.Spot(.55,.95),de}),go.Shape.defineFigureGenerator("NorGate",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Le*se,ve=0,Ee=.5,Me=new go.PathFigure(.8*te,.5*ee,!0);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(ve+he)*te,(Ee-se)*ee,.7*te,(Ee-he)*ee)),se=.1,he=Le*.1,ve=.9,Ee=.5;var Be=new go.PathFigure((ve-se)*te,Ee*ee,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),de.spot1=new go.Spot(.2,.25),de.spot2=new go.Spot(.6,.75),de}),go.Shape.defineFigureGenerator("OrGate",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Le*se,ve=0,Ee=.5,Me=new go.PathFigure(0,0,!0);return de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he+he)*te,(Ee-se)*ee,.8*te,(Ee-he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*te,(Ee+he)*ee,(ve+he+he)*te,(Ee+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee).close()),de.spot1=new go.Spot(.2,.25),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("XnorGate",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Le*se,ve=.2,Ee=.5,Me=new go.PathFigure(.1*te,0,!1);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Be=new go.PathFigure(.8*te,.5*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.7*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(ve+he)*te,(Ee-se)*ee,.7*te,(Ee-he)*ee)),se=.1,he=Le*.1,ve=.9,Ee=.5;var je=new go.PathFigure((ve-se)*te,Ee*ee,!0);return de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),de.spot1=new go.Spot(.4,.25),de.spot2=new go.Spot(.65,.75),de}),go.Shape.defineFigureGenerator("XorGate",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Le*se,ve=.2,Ee=.5,Me=new go.PathFigure(.1*te,0,!1);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Be=new go.PathFigure(.2*te,0,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he)*te,(Ee-se)*ee,.9*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.9*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee).close()),de.spot1=new go.Spot(.4,.25),de.spot2=new go.Spot(.8,.75),de}),go.Shape.defineFigureGenerator("Capacitor",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.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)),de}),go.Shape.defineFigureGenerator("Resistor",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return de.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)),de}),go.Shape.defineFigureGenerator("Inductor",function(Oe,te,ee){var de=new go.Geometry,se=Le*.1,he=.1,ve=.1,Ee=.5,Me=new go.PathFigure((ve-se*.5)*te,ee,!1);return de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.3,Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.5,Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.7,Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.9,Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se*.5)*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),de}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Oe,te,ee){var de=new go.Geometry,se=Le*.5,he=.5,ve=.5,Ee=.5,Me=new go.PathFigure((ve-he)*te,Ee*ee,!1);return de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Move,(ve-he+.1)*te,Ee*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he-.1)*te,Ee*ee,ve*te,(Ee-he)*ee,ve*te,(Ee+he)*ee)),de}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return de.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)),de}),go.Shape.defineFigureGenerator("Diode",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!1);return de.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)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("Wifi",function(Oe,te,ee){var de=new go.Geometry,se=te,he=ee;te=te*.38,ee=ee*.6;var ve=Le*.8,Ee=.8,Me=0,Be=.5,je=(se-te)/2,_e=(he-ee)/2,Je=new go.PathFigure(Me*te+je,(Be+Ee)*ee+_e,!0);de.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Me-Ee)*te+je,Be*ee+_e,(Me-ve)*te+je,(Be+Ee)*ee+_e,(Me-Ee)*te+je,(Be+ve)*ee+_e)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be-Ee)*ee+_e,(Me-Ee)*te+je,(Be-ve)*ee+_e,(Me-ve)*te+je,(Be-Ee)*ee+_e)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Me-Ee+ve*.5)*te+je,Be*ee+_e,Me*te+je,(Be-Ee)*ee+_e,(Me-Ee+ve*.5)*te+je,(Be-ve)*ee+_e)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be+Ee)*ee+_e,(Me-Ee+ve*.5)*te+je,(Be+ve)*ee+_e,Me*te+je,(Be+Ee)*ee+_e).close()),ve=Le*.4,Ee=.4,Me=.2,Be=.5;var Xe=new go.PathFigure(Me*te+je,(Be+Ee)*ee+_e,!0);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Me-Ee)*te+je,Be*ee+_e,(Me-ve)*te+je,(Be+Ee)*ee+_e,(Me-Ee)*te+je,(Be+ve)*ee+_e)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be-Ee)*ee+_e,(Me-Ee)*te+je,(Be-ve)*ee+_e,(Me-ve)*te+je,(Be-Ee)*ee+_e)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Me-Ee+ve*.5)*te+je,Be*ee+_e,Me*te+je,(Be-Ee)*ee+_e,(Me-Ee+ve*.5)*te+je,(Be-ve)*ee+_e)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be+Ee)*ee+_e,(Me-Ee+ve*.5)*te+je,(Be+ve)*ee+_e,Me*te+je,(Be+Ee)*ee+_e).close()),ve=Le*.2,Ee=.2,Me=.5,Be=.5;var ht=new go.PathFigure((Me-Ee)*te+je,Be*ee+_e,!0);de.add(ht),ht.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be-Ee)*ee+_e,(Me-Ee)*te+je,(Be-ve)*ee+_e,(Me-ve)*te+je,(Be-Ee)*ee+_e)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(Me+Ee)*te+je,Be*ee+_e,(Me+ve)*te+je,(Be-Ee)*ee+_e,(Me+Ee)*te+je,(Be-ve)*ee+_e)),ht.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be+Ee)*ee+_e,(Me+Ee)*te+je,(Be+ve)*ee+_e,(Me+ve)*te+je,(Be+Ee)*ee+_e)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(Me-Ee)*te+je,Be*ee+_e,(Me-ve)*te+je,(Be+Ee)*ee+_e,(Me-Ee)*te+je,(Be+ve)*ee+_e)),ve=Le*.4,Ee=.4,Me=.8,Be=.5;var Ze=new go.PathFigure(Me*te+je,(Be-Ee)*ee+_e,!0);de.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Me+Ee)*te+je,Be*ee+_e,(Me+ve)*te+je,(Be-Ee)*ee+_e,(Me+Ee)*te+je,(Be-ve)*ee+_e)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be+Ee)*ee+_e,(Me+Ee)*te+je,(Be+ve)*ee+_e,(Me+ve)*te+je,(Be+Ee)*ee+_e)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Me+Ee-ve*.5)*te+je,Be*ee+_e,Me*te+je,(Be+Ee)*ee+_e,(Me+Ee-ve*.5)*te+je,(Be+ve)*ee+_e)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be-Ee)*ee+_e,(Me+Ee-ve*.5)*te+je,(Be-ve)*ee+_e,Me*te+je,(Be-Ee)*ee+_e).close()),ve=Le*.8,Ee=.8,Me=1,Be=.5;var Mt=new go.PathFigure(Me*te+je,(Be-Ee)*ee+_e,!0);return de.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(Me+Ee)*te+je,Be*ee+_e,(Me+ve)*te+je,(Be-Ee)*ee+_e,(Me+Ee)*te+je,(Be-ve)*ee+_e)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be+Ee)*ee+_e,(Me+Ee)*te+je,(Be+ve)*ee+_e,(Me+ve)*te+je,(Be+Ee)*ee+_e)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,(Me+Ee-ve*.5)*te+je,Be*ee+_e,Me*te+je,(Be+Ee)*ee+_e,(Me+Ee-ve*.5)*te+je,(Be+ve)*ee+_e)),Mt.add(new go.PathSegment(go.PathSegment.Bezier,Me*te+je,(Be-Ee)*ee+_e,(Me+Ee-ve*.5)*te+je,(Be-ve)*ee+_e,Me*te+je,(Be-Ee)*ee+_e).close()),de}),go.Shape.defineFigureGenerator("Email",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.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 he=new go.PathFigure(0,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Move,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.54*ee)),de}),go.Shape.defineFigureGenerator("Ethernet",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.35*te,0,!0);de.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 he=new go.PathFigure(.1*te,ee,!0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var ve=new go.PathFigure(.6*te,ee,!0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee).close());var Ee=new go.PathFigure(0,.5*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.75*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.75*te,.6*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.25*te,.6*ee)),de}),go.Shape.defineFigureGenerator("Power",function(Oe,te,ee){var de=new go.Geometry,se=Le*.4,he=.4,ve=.5,Ee=.5,Me=le(),Be=le(),je=le(),_e=le();lt(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.5,Me,Me,Be,je,_e);var Je=me(Be.x,Be.y),Xe=new go.PathFigure(Be.x*te,Be.y*ee,!0);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,je.x*te,je.y*ee,_e.x*te,_e.y*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),lt(ve-he,Ee,ve-he,Ee-se,ve-se,Ee-he,ve,Ee-he,.5,je,_e,Be,Me,Me),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*te,Be.y*ee,je.x*te,je.y*ee,_e.x*te,_e.y*ee)),se=Le*.3,he=.3,lt(ve-he,Ee,ve-he,Ee-se,ve-se,Ee-he,ve,Ee-he,.5,je,_e,Be,Me,Me),Xe.add(new go.PathSegment(go.PathSegment.Line,Be.x*te,Be.y*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,_e.x*te,_e.y*ee,je.x*te,je.y*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),lt(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.5,Me,Me,Be,je,_e),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Be.x*te,Be.y*ee,_e.x*te,_e.y*ee,je.x*te,je.y*ee).close());var Xe=new go.PathFigure(.45*te,0,!0);return de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.55*te,.5*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.55*te,0).close()),Te(Me),Te(Be),Te(je),Te(_e),Te(Je),de.spot1=new go.Spot(.25,.45),de.spot2=new go.Spot(.75,.8),de}),go.Shape.defineFigureGenerator("Fallout",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,te/2,ee/2,te/2,ee/2));function he(ve,Ee,Me){ve.add(new go.PathSegment(go.PathSegment.Move,(.3+Ee)*te,(.8+Me)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.5+Ee)*te,(.5+Me)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.1+Ee)*te,(.5+Me)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.3+Ee)*te,(.8+Me)*ee).close())}return he(se,0,0),he(se,.4,0),he(se,.2,-.3),de}),go.Shape.defineFigureGenerator("IrritationHazard",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.2*te,0,!0);return de.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()),de.spot1=new go.Spot(.3,.3),de.spot2=new go.Spot(.7,.7),de}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.37*te,0,!0);return de.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()),de}),go.Shape.defineFigureGenerator("FireHazard",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,ee,!0);return de.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()),de.spot1=new go.Spot(.07,.445),de.spot2=new go.Spot(.884,.958),de}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=0,ve=0,Ee=se*Le,Me=.4*Math.SQRT2/2+.5,Be=.5-.5*Math.SQRT2/2,je=1,_e=.5,Je=.5,Xe=0,ht=new go.PathFigure(Me*te,(1-Be)*ee,!1);return de.add(ht),ht.add(new go.PathSegment(go.PathSegment.Bezier,je*te,_e*ee,je*te,.7*ee,je*te,_e*ee)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(Je+he)*te,(Xe+he)*ee,(.5+se+he)*te,(.5-Ee+he)*ee,(.5+Ee+he)*te,(.5-se+he)*ee)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+he)*te,(.5+ve)*ee,(.5-Ee+he)*te,(.5-se+ve)*ee,(.5-se+he)*te,(.5-Ee+ve)*ee)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(.35+he)*te,.9*ee,(.5-se+he)*te,(.5+Ee+ve)*ee,(.5-Ee+he)*te,.9*ee)),ht.add(new go.PathSegment(go.PathSegment.Move,(.25+he)*te,.8*ee)),ht.add(new go.PathSegment(go.PathSegment.Line,(.35+he)*te,.9*ee)),ht.add(new go.PathSegment(go.PathSegment.Line,(.2+he)*te,.95*ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.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)),de}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.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)),de}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(te,ee,!1);de.add(he);var ve=new go.PathFigure(0,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.2*te,.35*ee,.3*te,.35*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.7*te,.65*ee,.8*te,.65*ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return de.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()),de}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);de.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 de.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)),de}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.7*te,ee,!0);de.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 he=new go.PathFigure(.45*te,.73*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,.73*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.38*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.63*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.31*te,.27*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.56*te,.27*ee)),de}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(.335*te,(1-.555)*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.68*ee,(1-.12)*te,.46*ee,(1-.02)*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.335*te,(1-.555)*ee,.02*te,.54*ee,.12*te,.46*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.365*te,(1-.595)*ee));var ve=.5-.285,Ee=.5,Me=ve,Be=Math.PI/4,je=4*(1-Math.cos(Be))/(3*Math.sin(Be)),_e=je*.5,Je=ve,Xe=ve,ht=je*Je,Ze=je*Xe;he.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-Je)*te,Me*ee,(Ee-(ht+Je)/2)*te,(Me+(Xe+Ze)/2)*ee,(Ee-Je)*te,(Me+Ze)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,(Me-Xe)*ee,(Ee-Je)*te,(Me-Ze)*ee,(Ee-ht)*te,(Me-Xe)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+Je)*te,Me*ee,(Ee+ht)*te,(Me-Xe)*ee,(Ee+Je)*te,(Me-Ze)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*te,(1-.595)*ee,(Ee+Je)*te,(Me+Ze)*ee,(Ee+(ht+Je)/2)*te,(Me+(Xe+Ze)/2)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*te,(1-.595)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee));var Mt=new go.PathFigure(.2*te,ee,!1);de.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,.2*te,.8*ee));var ot=new go.PathFigure(.8*te,ee,!1);return de.add(ot),ot.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,0,!0);de.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 he=new go.PathFigure(.2*te,.2*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventError",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.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()),de}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(te,ee,!1);de.add(he);var ve=new go.PathFigure(.1*te,ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("Caution",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.05*te,ee,!0);de.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 he=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-he)*te,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*te,.875*ee,he*te,he*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)),de}),go.Shape.defineFigureGenerator("Recycle",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.45*te,.95*ee,!1);de.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 he=new go.PathFigure(.475*te,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.225*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.275*te,.175*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.325*te,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.05*ee,.35*te,0,.375*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.575*te,.375*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.525*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,.475*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.315*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.32*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.65*te,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,0,.65*te,.05*ee,.625*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.38*te,.0105*ee));var ve=new go.PathFigure(.675*te,.575*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.875*te,.525*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.85*te,.95*ee,te,.8*ee,te,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.95*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.725*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.7*te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,.675*te,.575*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.775*te,.775*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Le*.5,ve=new go.PathFigure(te,se*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*te,ee,te,(se+he)*ee,(se+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-he)*te,ee,0,(se+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*te,0,0,(se-he)*ee,(se-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,se*ee,(se+he)*te,0,te,(se-he)*ee));var Ee=new go.PathFigure(se*te,0,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,.15*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.15*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.85*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.58*te,.1*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.78*te,.54*ee)),de}),go.Shape.defineFigureGenerator("Package",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);de.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 he=new go.PathFigure(0,.15*ee,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.65*te,.15*ee).close()),de.spot1=new go.Spot(0,.1),de.spot2=new go.Spot(1,1),de}),go.Shape.defineFigureGenerator("Class",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.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 he=new go.PathFigure(0,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(0,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("Component",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,ee,!0);de.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 he=new go.PathFigure(0,.2*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ve=new go.PathFigure(0,.6*ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.45*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.45*te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),de}),go.Shape.defineFigureGenerator("Boat Shipment",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.15*te,.6*ee,!0);de.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 he=new go.PathFigure(.15*te,.6*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),de}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,ee,!0);return de.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()),de}),go.Shape.defineFigureGenerator("Workcell",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.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()),de}),go.Shape.defineFigureGenerator("Supermarket",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.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)),de}),go.Shape.defineFigureGenerator("TruckShipment",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.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 he=new go.PathFigure(te,.8*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee).close());var ve=.1,Ee=Le*.1,Me=.2,Be=.9,je=new go.PathFigure((Me-ve)*te,Be*ee,!0);de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be-ve)*ee,(Me-ve)*te,(Be-Ee)*ee,(Me-Ee)*te,(Be-ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Me+ve)*te,Be*ee,(Me+Ee)*te,(Be-ve)*ee,(Me+ve)*te,(Be-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be+ve)*ee,(Me+ve)*te,(Be+Ee)*ee,(Me+Ee)*te,(Be+ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Me-ve)*te,Be*ee,(Me-Ee)*te,(Be+ve)*ee,(Me-ve)*te,(Be+Ee)*ee).close()),ve=.1,Ee=Le*.1,Me=.8,Be=.9;var _e=new go.PathFigure((Me-ve)*te,Be*ee,!0);return de.add(_e),_e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be-ve)*ee,(Me-ve)*te,(Be-Ee)*ee,(Me-Ee)*te,(Be-ve)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,(Me+ve)*te,Be*ee,(Me+Ee)*te,(Be-ve)*ee,(Me+ve)*te,(Be-Ee)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,Me*te,(Be+ve)*ee,(Me+ve)*te,(Be+Ee)*ee,(Me+Ee)*te,(Be+ve)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,(Me-ve)*te,Be*ee,(Me-Ee)*te,(Be+ve)*ee,(Me-ve)*te,(Be+Ee)*ee).close()),de}),go.Shape.defineFigureGenerator("KanbanPost",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.2*te,0,!1);return de.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)),de}),go.Shape.defineFigureGenerator("Forklift",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.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 he=new go.PathFigure(0,.5*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ve=new go.PathFigure(.5*te,.8*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee));var Ee=new go.PathFigure(.5*te,.7*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee));var Me=.1,Be=Le*.1,je=.1,_e=.9,Je=new go.PathFigure((je-Me)*te,_e*ee,!0);de.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(_e-Me)*ee,(je-Me)*te,(_e-Be)*ee,(je-Be)*te,(_e-Me)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(je+Me)*te,_e*ee,(je+Be)*te,(_e-Me)*ee,(je+Me)*te,(_e-Be)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(_e+Me)*ee,(je+Me)*te,(_e+Be)*ee,(je+Be)*te,(_e+Me)*ee)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(je-Me)*te,_e*ee,(je-Be)*te,(_e+Me)*ee,(je-Me)*te,(_e+Be)*ee)),Me=.1,Be=Le*.1,je=.4,_e=.9;var Xe=new go.PathFigure((je-Me)*te,_e*ee,!0);return de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(_e-Me)*ee,(je-Me)*te,(_e-Be)*ee,(je-Be)*te,(_e-Me)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(je+Me)*te,_e*ee,(je+Be)*te,(_e-Me)*ee,(je+Me)*te,(_e-Be)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(_e+Me)*ee,(je+Me)*te,(_e+Be)*ee,(je+Be)*te,(_e+Me)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(je-Me)*te,_e*ee,(je-Be)*te,(_e+Me)*ee,(je-Me)*te,(_e+Be)*ee)),de}),go.Shape.defineFigureGenerator("RailShipment",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,.4*ee,!0);de.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 he=new go.PathFigure(.45*te,.7*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee));var ve=new go.PathFigure(.55*te,.4*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.4*ee).close());var je=.05,_e=Le*.05,Je=.175,Xe=.95,Ee=new go.PathFigure((Je-je)*te,Xe*ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Xe-je)*ee,(Je-je)*te,(Xe-_e)*ee,(Je-_e)*te,(Xe-je)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Je+je)*te,Xe*ee,(Je+_e)*te,(Xe-je)*ee,(Je+je)*te,(Xe-_e)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Xe+je)*ee,(Je+je)*te,(Xe+_e)*ee,(Je+_e)*te,(Xe+je)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Je-je)*te,Xe*ee,(Je-_e)*te,(Xe+je)*ee,(Je-je)*te,(Xe+_e)*ee));var je=.05,_e=Le*.05,Je=.375,Xe=.95,Me=new go.PathFigure((Je-je)*te,Xe*ee,!0);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Xe-je)*ee,(Je-je)*te,(Xe-_e)*ee,(Je-_e)*te,(Xe-je)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(Je+je)*te,Xe*ee,(Je+_e)*te,(Xe-je)*ee,(Je+je)*te,(Xe-_e)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Xe+je)*ee,(Je+je)*te,(Xe+_e)*ee,(Je+_e)*te,(Xe+je)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(Je-je)*te,Xe*ee,(Je-_e)*te,(Xe+je)*ee,(Je-je)*te,(Xe+_e)*ee));var je=.05,_e=Le*.05,Je=.625,Xe=.95,Be=new go.PathFigure((Je-je)*te,Xe*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Xe-je)*ee,(Je-je)*te,(Xe-_e)*ee,(Je-_e)*te,(Xe-je)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Je+je)*te,Xe*ee,(Je+_e)*te,(Xe-je)*ee,(Je+je)*te,(Xe-_e)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Xe+je)*ee,(Je+je)*te,(Xe+_e)*ee,(Je+_e)*te,(Xe+je)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Je-je)*te,Xe*ee,(Je-_e)*te,(Xe+je)*ee,(Je-je)*te,(Xe+_e)*ee));var je=.05,_e=Le*.05,Je=.825,Xe=.95,ht=new go.PathFigure((Je-je)*te,Xe*ee,!0);de.add(ht),ht.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Xe-je)*ee,(Je-je)*te,(Xe-_e)*ee,(Je-_e)*te,(Xe-je)*ee)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(Je+je)*te,Xe*ee,(Je+_e)*te,(Xe-je)*ee,(Je+je)*te,(Xe-_e)*ee)),ht.add(new go.PathSegment(go.PathSegment.Bezier,Je*te,(Xe+je)*ee,(Je+je)*te,(Xe+_e)*ee,(Je+_e)*te,(Xe+je)*ee)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(Je-je)*te,Xe*ee,(Je-_e)*te,(Xe+je)*ee,(Je-je)*te,(Xe+_e)*ee).close());var Ze=new go.PathFigure(0,ee,!1);return de.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de}),go.Shape.defineFigureGenerator("Warehouse",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.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 he=new go.PathFigure(0,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(.15*te,ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.15*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee).close());var Ee=.05,Me=Le*.05,Be=.35,je=.775,_e=new go.PathFigure((Be-Ee)*te,je*ee,!0);return de.add(_e),_e.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(je-Ee)*ee,(Be-Ee)*te,(je-Me)*ee,(Be-Me)*te,(je-Ee)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te,je*ee,(Be+Me)*te,(je-Ee)*ee,(Be+Ee)*te,(je-Me)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(je+Ee)*ee,(Be+Ee)*te,(je+Me)*ee,(Be+Me)*te,(je+Ee)*ee)),_e.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te,je*ee,(Be-Me)*te,(je+Ee)*ee,(Be-Ee)*te,(je+Me)*ee).close()),de}),go.Shape.defineFigureGenerator("ControlCenter",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.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()),de}),go.Shape.defineFigureGenerator("Bluetooth",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return de.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)),de}),go.Shape.defineFigureGenerator("Bookmark",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.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)),de}),go.Shape.defineFigureGenerator("Bookmark",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.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)),de}),go.Shape.defineFigureGenerator("Globe",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return de.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)),de}),go.Shape.defineFigureGenerator("Wave",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return de.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)),de}),go.Shape.defineFigureGenerator("Operator",function(Oe,te,ee){var de=new go.Geometry,se=.3,he=Le*.3,ve=.5,Ee=.7,Me=new go.PathFigure((ve-se)*te,Ee*ee,!0);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee));var Be=new go.PathFigure(0,.7*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,te,.7*ee,0,0,te,0)),de}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);return de.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)),de}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!0);return de.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)),de}),go.Shape.defineFigureGenerator("Battery",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);de.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 he=new go.PathFigure(0,.6*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),de}),go.Shape.defineFigureGenerator("Delete",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Le*.5,ve=.5,Ee=.5,Me=new go.PathFigure((ve-se)*te,Ee*ee,!0);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee));var Be=new go.PathFigure(.15*te,.5*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.85*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Flag",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return de.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()),de}),go.Shape.defineFigureGenerator("Help",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Le*.5,ve=.5,Ee=.5,Me=new go.PathFigure((ve-se)*te,Ee*ee,!1);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Me.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee).close()),se=.05,he=Le*.05,ve=.5,Ee=.8;var Be=new go.PathFigure((ve-se)*te,Ee*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee).close()),Be.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,.75*te,.475*ee,.75*te,.225*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.35*ee,.4*te,.2*ee,.3*te,.25*ee)),de}),go.Shape.defineFigureGenerator("Location",function(Oe,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(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);de.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 he=new go.PathFigure(.2*te,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.3*ee)),de}),go.Shape.defineFigureGenerator("Unlocked",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);de.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 he=new go.PathFigure(.2*te,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.35*ee)),de}),go.Shape.defineFigureGenerator("Gear",function(Oe,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(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return de.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()),de}),go.Shape.defineFigureGenerator("Map",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return de.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)),de}),go.Shape.defineFigureGenerator("Eject",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);de.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 he=new go.PathFigure(0,ee*.6,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close()),de}),go.Shape.defineFigureGenerator("Pencil",function(Oe,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(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*1,ee*1,!1);de.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 he=new go.PathFigure(.126*te,.85*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.126*te,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*te,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*te,.85*ee).close());var ve=new go.PathFigure(.402*te,.85*ee,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.402*te,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*te,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*te,.85*ee).close());var Ee=new go.PathFigure(.678*te,.85*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.678*te,.45*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.874*te,.45*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.874*te,.85*ee).close());var Me=new go.PathFigure(.5*te,.1*ee,!1);return de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*te,.3*ee)),Me.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*te,.3*ee).close()),de}),go.Shape.defineFigureGenerator("Staircase",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return de.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()),de}),go.Shape.defineFigureGenerator("5Bars",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);de.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 he=new go.PathFigure(te*.204,ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.204,ee*(1-.184))),he.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*(1-.184*2))),he.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*1).close());var ve=new go.PathFigure(te*.408,ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.408,ee*(1-.184*2))),ve.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*(1-.184*3))),ve.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*1).close());var Ee=new go.PathFigure(te*.612,ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.612,ee*(1-.184*3))),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*(1-.184*4))),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*1).close());var Me=new go.PathFigure(te*.816,ee,!0);return de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*.816,ee*(1-.184*4))),Me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-.184*5))),Me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1).close()),de}),go.Shape.defineFigureGenerator("PC",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.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 he=new go.PathFigure(te*.055,.07*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.07)),he.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.1).close());var ve=new go.PathFigure(te*.055,.13*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.13)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.16)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.16).close());var Ee=new go.PathFigure(te*.055,.18*ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.18)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.21)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.21).close());var Me=new go.PathFigure(te*1,0,!0);return de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*.4,0)),Me.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.65)),Me.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.65).close()),de}),go.Shape.defineFigureGenerator("Plane",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.55*te,ee,!0);return de.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()),de}),go.Shape.defineFigureGenerator("Key",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*1,ee*.5,!0);return de.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()),de}),go.Shape.defineFigureGenerator("FilmTape",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.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 he=new go.PathFigure(0,0,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*0)),he.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*1,te*.3,te*.055)),he.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var ve=new go.PathFigure(te*.11,ee*.1,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.8)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.11,ee*.8).close());var Ee=new go.PathFigure(te*(.11+.24133333*1+.028*1),ee*.1,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.1)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.8)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*1),ee*.8).close());var Me=new go.PathFigure(te*(.11+.24133333*2+.028*2),ee*.1,!1);return de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.1)),Me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.8)),Me.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*2),ee*.8).close()),de}),go.Shape.defineFigureGenerator("FloppyDisk",function(Oe,te,ee){var de=new go.Geometry,se=8,he=se*Le,ve=new go.PathFigure(se,0,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.86,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.14)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-he,te-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,0,se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,he,he,0).close());var Ee=new go.PathFigure(te*.83,0,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.3)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.3)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*0).close());var Me=new go.PathFigure(te*.83,ee*1,!1);de.add(Me),Me.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.5)),Me.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.5)),Me.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*1).close());var Be=new go.PathFigure(te*.78,ee*.05,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.05)),Be.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.25)),Be.add(new go.PathSegment(go.PathSegment.Line,te*.78,ee*.25).close()),de}),go.Shape.defineFigureGenerator("SpeechBubble",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=15),de=Math.min(de,te/3),de=Math.min(de,ee/3);var se=de*Le,he=ee*.8,ve=new go.Geometry,Ee=new go.PathFigure(de,0,!0);return ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te-de,0)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te,de,te-se,0,te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he-de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-de,he,te,he-se,te-se,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.7,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.55,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,de,he)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,he-de,se,he,0,he-se)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,se,se,0).close()),se>1?(ve.spot1=new go.Spot(0,0,se,se),ve.spot2=new go.Spot(1,.8,-se,-se)):(ve.spot1=go.Spot.TopLeft,ve.spot2=new go.Spot(1,.8)),ve}),go.Shape.defineFigureGenerator("Repeat",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*.45,!0);de.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 he=new go.PathFigure(te*1,ee*.55,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.55).close()),de}),go.Shape.defineFigureGenerator("Windows",function(Oe,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(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*.1,!1);de.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 he=new go.PathFigure(te*.1,ee*.2,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.25)),he.add(new go.PathSegment(go.PathSegment.Line,te*.22,ee*.285)),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.37)),he.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.25).close());var ve=new go.PathFigure(te*.28,ee*.37,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.37)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.41)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.28,ee*.41).close()),de}),go.Shape.defineFigureGenerator("Beaker",function(Oe,te,ee){var de=new go.Geometry,se=15,he=se*Le,ve=new go.PathFigure(te*.62,ee*.475,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-he,te-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.475)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.03)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.62,ee*.03).close()),he>1?(de.spot1=new go.Spot(0,0,he,he),de.spot2=new go.Spot(1,1,-he,-he)):(de.spot1=go.Spot.TopLeft,de.spot2=go.Spot.BottomRight),de}),go.Shape.defineFigureGenerator("Download",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.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-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),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-he)).close());var ve=new go.PathFigure(te*.4,ee*0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.66)),ve.add(new go.PathSegment(go.PathSegment.Line,te*(1-.26),ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*0).close()),de}),go.Shape.defineFigureGenerator("Bin",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.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-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),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-he)).close()),de}),go.Shape.defineFigureGenerator("Upload",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.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-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),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-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),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-he)).close());var ve=new go.PathFigure(te*.5,ee*0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.74,ee*.25).close()),de}),go.Shape.defineFigureGenerator("EmptyDrink",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);return de.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()),de}),go.Shape.defineFigureGenerator("Drink",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);de.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 he=new go.PathFigure(te*.235,ee*.28,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.765,ee*.28)),he.add(new go.PathSegment(go.PathSegment.Line,te*.655,ee*.97)),he.add(new go.PathSegment(go.PathSegment.Line,te*.345,ee*.97).close()),de}),go.Shape.defineFigureGenerator("4Arrows",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.5,ee*0,!0);return de.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()),de}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},5559:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Tn={},xn="5.0",me={},le=null,Te=!1,He=!1,lt=null,We=!1,Ve=null,Le=null,Ct=0;Ct<arguments.length;Ct++){var xt=arguments[Ct];if(xt!==null)switch(typeof xt){case"number":xn=xt.toFixed(1);break;case"string":xt.match(new RegExp("^[0-9]\\.[0-9]+$"))?xn=xt:lt=xt;break;case"object":typeof xt.is3D!="undefined"?le=xt:me=xt;break;case"boolean":Te=xt,He=!0;break}}le===null&&(le={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},me.material_id!==void 0&&!He&&(Te=!0)),lt!==null&&me.id===void 0&&(me.id=lt);var Ue="",bt="",at=!1,mt=null,Oe=null,te=null,ee=!1,de=null,se=null,he=null,ve=null,Ee=null;me.height!==void 0&&(me.height=Math.round(me.height)),me.width!==void 0&&(me.width=Math.round(me.width));var Me=function(_t){return parseFloat(_t)>4?parseFloat(_t):5};Tn.setHTML5Codebase=function(_t,rn){Le=_t,Rt(_t,rn)},Tn.setJavaCodebase=Tn.setJavaCodebaseVersion=Tn.isCompiledInstalled=Tn.setPreCompiledScriptPath=Tn.setPreCompiledResourcePath=function(){},Tn.setHTML5CodebaseVersion=function(_t,rn){var ln=parseFloat(_t);if(ln!==NaN&&ln<5){console.log("The GeoGebra HTML5 codebase version "+ln+" is deprecated. Using version latest instead.");return}Ve=_t,Ke(_t,rn)},Tn.getHTML5CodebaseVersion=function(){return Oe},Tn.getParameters=function(){return me},Tn.setFontsCSSURL=function(_t){ve=_t},Tn.setGiacJSURL=function(_t){},Tn.setJNLPFile=function(_t){Ue=_t},Tn.setJNLPBaseDir=function(_t){},Tn.inject=function(){function _t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var rn="auto",ln=me.id,Wn,un=!1,_n=0;_n<arguments.length;_n++){var St=arguments[_n];typeof St=="string"?(St=St.toLowerCase(),St.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?rn=St:ln=arguments[_n]):typeof St=="boolean"?un=St:St instanceof HTMLElement&&(Wn=St)}Zn();function Zn(){if(!We){setTimeout(Zn,200);return}rn=Lt(rn);var li=Wn||document.getElementById(ln);if(!li){console.log("possibly bug on ajax loading? ");return}if(Tn.removeExistingApplet(li,!1),me.width===void 0&&li.clientWidth&&(me.width=li.clientWidth),me.height===void 0&&li.clientHeight&&(me.height=li.clientHeight),!(me.width&&me.height)&&rn==="html5"&&(delete me.width,delete me.height),mt=rn,rn==="screenshot")ot(li,me);else{var Ge=!1;me.hasOwnProperty("playButton")&&me.playButton||me.hasOwnProperty("clickToLoad")&&me.clickToLoad?Ge=!0:me.hasOwnProperty("playButtonAutoDecide")&&me.playButtonAutoDecide&&(Ge=(!Be()||_t())&&je()),Ge?(mt="screenshot",Pt(li,me,un,rn)):Mt(li,me,un)}}};function Be(){try{return window.self!==window.top}catch(_t){return!0}}function je(){return me.hasOwnProperty("screenshotGenerator")&&me.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Tn.getViews=function(){return le},Tn.isJavaInstalled=function(){return!1};var _e=function(_t){var rn=function(_n){var St=JSON.parse(_n),Zn=function(be){return be.type=="G"||be.type=="E"},li=St.elements?St.elements.filter(Zn)[0]:St;if(!li||!li.url){ln();return}me.fileName=li.url,Je(li.settings||{}),le.is3D=!0;var Ge="https://www.geogebra.org/images/";Tn.setPreviewImage(de||li.previewUrl,Ge+"GeoGebra_loading.png",Ge+"applet_play.png"),_t()},ln=function(){me.onError&&me.onError(),Sn("Error: Fetching material (id "+me.material_id+") failed.",me)},Wn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",un="/materials/"+me.material_id+"?scope=basic";Xe("https://"+Wn+"/api/proxy.php?path="+encodeURIComponent(un),rn,ln)};function Je(_t){var rn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ln){_t[ln]=!!_t[ln]}),rn.forEach(function(ln){me[ln]===void 0&&_t[ln]!==void 0&&(me[ln]=_t[ln])}),me.showToolBarHelp===void 0&&(me.showToolBarHelp=me.showToolBar)}function Xe(_t,rn,ln){var Wn=new XMLHttpRequest;Wn.open("GET",_t),Wn.onload=function(){rn(Wn.responseText)},Wn.onerror=ln,Wn.send()}Tn.isHTML5Installed=function(){return!0},Tn.getLoadedAppletType=function(){return mt},Tn.setPreviewImage=function(_t,rn,ln){de=_t,se=rn,he=ln},Tn.removeExistingApplet=function(_t,rn){var ln;typeof _t=="string"&&(_t=document.getElementById(_t)),mt=null;var Wn=null;for(ln=0;ln<_t.childNodes.length;ln++){var un=_t.childNodes[ln],_n=un.className;_n==="applet_screenshot"?rn?(un.style.display="block",mt="screenshot"):un.style.display="none":_n!=="applet_scaler prerender"&&(_t.removeChild(un),Wn=_n&&_n.indexOf("appletParameters")!=-1?un.id:null,ln--)}var St=me.id!==void 0?me.id:Wn,Zn=window[St];Zn&&typeof Zn.getBase64=="function"&&(Zn.remove(),window[St]=null)},Tn.refreshHitPoints=function(){if(Me(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var _t=Tn.getAppletObject();return _t&&typeof _t.recalculateEnvironments=="function"?(_t.recalculateEnvironments(),!0):!1},Tn.startAnimation=function(){var _t=Tn.getAppletObject();return _t&&typeof _t.startAnimation=="function"?(_t.startAnimation(),!0):!1},Tn.stopAnimation=function(){var _t=Tn.getAppletObject();return _t&&typeof _t.stopAnimation=="function"?(_t.stopAnimation(),!0):!1},Tn.getAppletObject=function(){var _t=me.id!==void 0?me.id:"ggbApplet";return window[_t]},Tn.resize=function(){};var ht=function(_t,rn,ln){var Wn=document.createElement("param");Wn.setAttribute("name",rn),Wn.setAttribute("value",ln),_t.appendChild(Wn)},Ze=function(_t){return _t&&_t!=="false"},Mt=function(_t,rn,ln){Me(Oe)<=4.2&&(ln=!0);var Wn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Oe||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Wn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var un=document.createElement("div");un.classList.add("appletParameters","notranslate");var _n=rn.width,St=rn.height;if(rn.disableAutoScale=rn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():rn.disableAutoScale,rn.width!==void 0)if(Me(Oe)<=4.4)Ze(rn.showToolBar)&&(rn.height-=7),Ze(rn.showAlgebraInput)&&(rn.height-=37),rn.width<605&&Ze(rn.showToolBar)&&(rn.width=605,_n=605);else{var Zn=100;(Ze(rn.showToolBar)||Ze(rn.showMenuBar))&&(rn.hasOwnProperty("customToolBar")&&(rn.customToolbar=rn.customToolBar),Zn=Ze(rn.showMenuBar)?245:155),_n<Zn&&(rn.width=Zn,_n=Zn)}un.style.border="none",un.style.display="inline-block";for(var li in rn)rn.hasOwnProperty(li)&&li!=="appletOnLoad"&&un.setAttribute("data-param-"+li,rn[li]);ve&&un.setAttribute("data-param-fontscssurl",ve),Tn.resize=function(){GGBAppletUtils.responsiveResize(_t,rn)},window.addEventListener("resize",function(dt){Tn.resize()});var Ge=typeof rn.appletOnLoad=="function"?rn.appletOnLoad:function(){};if(!ln&&rn.width!==void 0){rn.hasOwnProperty("showSplash")||un.setAttribute("data-param-showSplash","false");var be=_t.querySelector(".applet_scaler.prerender"),Pe=be!==null;if(Pe)var Ae=be.querySelector(".ggb_preview");else{var Ae=Wt(_n,St,rn.borderColor,!1);be=document.createElement("div"),be.className="applet_scaler",be.style.position="relative",be.style.display="block",be.style.width=_n+"px",be.style.height=St+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(be,"66%"),Me(Oe)>=5?(rn.appletOnLoad=function(dt){var Kt=_t.querySelector(".ggb_preview");Kt&&Kt.parentNode.removeChild(Kt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(be),window.GGBT_wsf_view&&$(window).trigger("resize"),Ge(dt)},Pe||be.appendChild(Ae)):un.appendChild(Ae),be.appendChild(un),Pe||_t.appendChild(be),setTimeout(function(){Tn.resize()},1)}else{var Ne=document.createElement("div");Ne.className="applet_scaler",Ne.style.position="relative",Ne.style.display="block",Ne.appendChild(un),_t.appendChild(Ne),rn.appletOnLoad=function(dt){Tn.resize(),Ge(dt)}}function xe(dt,Kt){Kt&&typeof Kt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(dt,Kt.appletOnLoad):renderGGBElement(dt),Sn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Kt)}function ut(dt,Kt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:dt,params:Kt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(wn){xe(wn.article,wn.params)}),html5AppletsToProcess=null)},Me(Oe)<5&&(dt.className+=" geogebraweb")):xe(dt,Kt)}if(Wn){scriptLoadStarted=!0;for(var Bt=0;Bt<un.childNodes.length;Bt++){var Qe=un.childNodes[Bt].tagName;Qe==="TABLE"&&(un.removeChild(un.childNodes[Bt]),Bt--)}if(ggbHTML5LoadedScript!==null){var it=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');it!=null&&it.parentNode.removeChild(it)}var Ft=document.createElement("script"),Nt=function(){ut(un,rn)};Ft.src=bt+te,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Oe,ggbHTML5LoadedScript=Ft.src,Sn("GeoGebra HTML5 codebase loaded: '"+bt+"'.",rn),!Le&&(!Ve||Ve=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Nt()):bt.requirejs?__webpack_require__.e(777).then(function(){var dt=[__webpack_require__(70777)];Nt.apply(null,dt)}.bind(this)).catch(__webpack_require__.oe):(Ft.onload=Nt,_t.appendChild(Ft))}else ut(un,rn);rn.height=St,rn.width=_n},ot=function(_t,rn,ln){var Wn=Wt(rn.width,rn.height,rn.borderColor,ln),un=document.createElement("div");un.style.position="relative",un.style.display="block",un.style.width=rn.width+"px",un.style.height=rn.height+"px",un.className="applet_screenshot applet_scaler"+(ln?" applet_screenshot_play":""),un.appendChild(Wn);var _n=GGBAppletUtils.getScale(rn,_t,ln);ln?(_t.appendChild(Dt()),window.GGBT_wsf_view||(_t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(un,"66%"),_t.appendChild(un),_n!==1&&!isNaN(_n)&&(GGBAppletUtils.scaleElement(un,_n),un.style.width=rn.width+"px",un.style.height=rn.height+"px",un.parentNode.style.width=rn.width*_n+"px",un.parentNode.style.height=rn.height*_n+"px"),Tn.resize=function(){Ot(_t,Wn,un,ln)},window.addEventListener("resize",function(St){Tn.resize()}),Tn.resize()};function Ot(_t,rn,ln,Wn){if(_t.contains(rn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_t.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(_t)}var un=GGBAppletUtils.getScale(me,_t,Wn);ln.parentNode!==null&&(!isNaN(un)&&un!==1?(GGBAppletUtils.scaleElement(ln,un),ln.parentNode.style.width=me.width*un+"px",ln.parentNode.style.height=me.height*un+"px"):(GGBAppletUtils.scaleElement(ln,1),ln.parentNode.style.width=me.width+"px",ln.parentNode.style.height=me.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(_t),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Tn.onExitFullscreen=function(_t,rn){rn.appendChild(_t)};var Pt=function(_t,rn,ln,Wn){ot(_t,rn,!0);for(var un=function(){var Zn=[];for(St=0;St<_t.childNodes.length;St++)Zn.push(_t.childNodes[St]);if(window.GGBT_wsf_view){var li=window.GGBT_wsf_view.renderFullScreen(_t,rn.id),Ge=document.getElementById("fullscreencontainer"),be=jQuery(_t).find(".fullscreencontent");be.length>0?(li.remove(),be.attr("id","fullscreencontent").show(),jQuery(Ge).append(be),window.dispatchEvent(new Event("resize"))):Mt(li,rn,!1),window.GGBT_wsf_view.launchFullScreen(Ge)}else mt=Wn,Mt(_t,rn,!1);if(!window.GGBT_wsf_view)for(St=0;St<Zn.length;St++)_t.removeChild(Zn[St])},_n=_t.getElementsByClassName("ggb_preview_play"),St=0;St<_n.length;St++)_n[St].addEventListener("click",un,!1),_n[St].addEventListener("ontouchstart",un,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(_t),je()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Dt=function(){var _t=document.createElement("div");if(_t.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var rn='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',ln=document.createElement("style");ln.styleSheet?ln.styleSheet.cssText=rn:ln.appendChild(document.createTextNode(rn)),document.getElementsByTagName("head")[0].appendChild(ln)}return _t},Wt=function(_t,rn,ln,Wn){var un=document.createElement("div");un.className="ggb_preview",un.style.position="absolute",un.style.zIndex="90",un.style.width=_t-2+"px",un.style.height=rn-2+"px",un.style.top="0px",un.style.left="0px",un.style.overflow="hidden",un.style.backgroundColor="white";var _n="lightgrey";ln!==void 0&&(ln==="none"?_n="transparent":_n=ln),un.style.border="1px solid "+_n;var St=document.createElement("img");if(St.style.position="relative",St.style.zIndex="1000",St.style.top="-1px",St.style.left="-1px",de!==null&&St.setAttribute("src",de),St.style.opacity=.7,se!==null){var Zn,li,Ge;if(!Wn){Zn=document.createElement("img"),Zn.style.position="absolute",Zn.style.zIndex="1001",Zn.style.opacity=1,St.style.opacity=.3,li=360,li>_t/4*3&&(li=_t/4*3),Ge=li/5.8,Zn.setAttribute("src",se),Zn.setAttribute("width",li),Zn.setAttribute("height",Ge);var be=(_t-li)/2,Pe=(rn-Ge)/2;Zn.style.left=be+"px",Zn.style.top=Pe+"px",un.appendChild(Zn)}}return un.appendChild(St),un},Lt=function(_t){return _t=_t.toLowerCase(),_t==="html5"||_t==="screenshot"?_t:"html5"},qe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ke=function(_t,rn){if(Oe=_t,rn){Rt(Oe,!0);return}var ln=!Te;if(ln){var Wn=Me(Oe);!isNaN(Wn)&&Wn<4.4&&(ln=!1)}var un,_n;window.location.protocol.substr(0,4)==="http"?un=window.location.protocol:un="http:";var St=Oe.indexOf("//");St>0?_n=Oe:St===0?_n=un+Oe:_n="https://www.geogebra.org/apps/5.2.814.0/";for(var Zn in qe)if(Oe.slice(qe[Zn].length*-1)===qe[Zn]||Oe.slice((qe[Zn].length+1)*-1)===qe[Zn]+"/"){Rt(_n,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ln&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!Ze(me.showToolBar)&&!Ze(me.showMenuBar)&&!Ze(me.showAlgebraInput)&&!Ze(me.enableRightClick)&&(!me.appName||me.appName=="classic")?_n+="webSimple/":_n+="web3d/",Rt(_n,!1)},Rt=function(_t,rn){if(_t.requirejs){bt=_t;return}_t.slice(-1)!=="/"&&(_t+="/"),bt=_t,rn===null&&(rn=_t.indexOf("http")===-1),at=rn,te="web.nocache.js",ee=!1;var ln=bt.split("/");ln.length>1&&(!rn&&ln[ln.length-2]==="webSimple"?(te="webSimple.nocache.js",ee=!0):qe.indexOf(ln[ln.length-2])>=0&&(te=ln[ln.length-2]+".nocache.js")),ln=_t.split("/"),Oe=ln[ln.length-3],Oe.substr(0,4)==="test"?Oe=Oe.substr(4,1)+"."+Oe.substr(5,1):(Oe.substr(0,3)==="war"||Oe.substr(0,4)==="beta")&&(Oe="5.0");var Wn=parseFloat(Oe);Wn!==NaN&&Wn<5&&_t.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Wn+" is deprecated. Using version latest instead."),Ke("5.0",rn))},Sn=function(_t,rn){window.console&&window.console.log&&(!rn||typeof rn.showLogging=="undefined"||rn.showLogging&&rn.showLogging!=="false")&&console.log(_t)};me.material_id!==void 0?_e(Pn):Pn();function Pn(){var _t=xn;Ve!==null?_t=Ve:parseFloat(_t)<5&&(_t="5.0"),Ke(_t,!1),Le!==null&&Rt(Le,at),We=!0}return Tn},GGBAppletUtils=function(){"use strict";function Tn(){return window.GGBT_wsf_edit!==void 0}function xn(We,Ve){Ve!=1?(We.style.transformOrigin="0% 0% 0px",We.style.webkitTransformOrigin="0% 0% 0px",We.style.transform="scale("+Ve+","+Ve+")",We.style.webkitTransform="scale("+Ve+","+Ve+")",We.style.maxWidth="initial",We.querySelector(".ggb_preview")!==null&&(We.querySelector(".ggb_preview").style.maxWidth="initial"),We.querySelectorAll(".ggb_preview img")[0]!==void 0&&(We.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),We.querySelectorAll(".ggb_preview img")[1]!==void 0&&(We.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(We.style.transform="none",We.style.webkitTransform="none")}function me(We,Ve,Le,Ct,xt,Ue){var bt=null;if(Ue!=null&&Ue!="")for(var at=We.parentNode;at!=null;)if((" "+at.className+" ").indexOf(" "+Ue+" ")>-1){bt=at;break}else at=at.parentNode;var mt=0,Oe=0,te=0,ee=0,de=0,se=0,he=0;if(bt)mt=bt.offsetWidth,Oe=Math.max(Ct?bt.offsetWidth:0,bt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(mt=Math.min(window.innerWidth,document.documentElement.clientWidth),Oe=Math.min(window.innerHeight,document.documentElement.clientHeight),te=mt):(mt=window.innerWidth,Oe=window.innerHeight,te=window.innerWidth),We){var ve=We.getBoundingClientRect();ve.left>0&&ve.left<=mt&&(xt===void 0||!xt)&&(document.dir==="rtl"?(de=mt-ve.width-ve.left,se=te<=480?10:30):(se=ve.left,de=te<=480?10:30),ee=se+de)}if(We&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Ee=We.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,he=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,he=40)}}return We&&((Le===void 0||!Le)&&Ve>0&&Ve+ee<mt?mt=Ve:mt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Le===void 0||!Le)&&(Oe-=he)),{width:mt,height:Oe}}function le(We,Ve,Le,Ct,xt){if(We.isScreenshoGenerator)return 1;var Ue=Ct!==void 0&&Ct,bt=We.noScaleMargin!=null&&We.noScaleMargin,at=function(Ee){return Ee&&Ee!=="false"},mt=at(We.autoHeight),Oe=me(Ve,We.width,Le,mt,Ue&&window.GGBT_wsf_view||bt,xt),te=parseInt(Oe.width),ee=We.width,de=We.height;if(ee===void 0){var se=Ve.querySelector(".appletParameters");se&&(ee=se.offsetWidth,de=se.offsetHeight)}var he=te/ee,ve=Ue?1:Oe.height/de;return Le!==void 0&&!Le&&(he=Math.min(1,he),ve=Math.min(1,ve)),Math.min(he,ve)}function Te(We,Ve,Le){var Ct=1,xt,Ue=!1;if(We.hasOwnProperty("allowUpscale")&&(Ue=We.allowUpscale),We.hasOwnProperty("scale")&&(Ct=parseFloat(We.scale),(isNaN(Ct)||Ct===null||Ct===0)&&(Ct=1),Ct>1&&(Ue=!0)),Ve&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ue=!0),!(We.hasOwnProperty("disableAutoScale")&&We.disableAutoScale))xt=le(We,Ve,Ue,Le,We.scaleContainerClass);else return Ct;return Ue&&(!We.hasOwnProperty("scale")||Ct===1)?xt:Math.min(Ct,xt)}function He(We){var Ve=Math.min(window.innerWidth,document.documentElement.clientWidth),Le=Math.min(window.innerHeight,document.documentElement.clientHeight),Ct=We.getBoundingClientRect(),xt=(Ve-Ct.width)/2,Ue=(Le-Ct.height)/2;Ue<0&&(Ue=0),We.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(xt<40?We.style.left="40px":We.style.left=xt+"px",We.style.top=Ue+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ue<40?We.style.top="40px":We.style.top=Ue+"px",We.style.left=xt+"px")}function lt(We,Ve){var Le=We.querySelector(".appletParameters");if(Le){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ve.id!==Le.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(We)}if(Le.parentElement&&/fullscreen/.test(Le.parentElement.className))return;var Ct=Te(Ve,We);Tn()&&Le.setAttribute("data-param-scale",Ct);for(var xt=null,Ue=0;Ue<We.childNodes.length;Ue++)if(We.childNodes[Ue].className!==void 0&&We.childNodes[Ue].className.match(/^applet_scaler/)){xt=We.childNodes[Ue];break}if(xt!==null&&xt.querySelector(".noscale")!==null)return;var bt=Ve.id!==void 0?Ve.id:"ggbApplet",at=window[bt];(at==null||!at.recalculateEnvironments)&&xt!==null&&!xt.className.match(/fullscreen/)&&(xt.parentNode.style.transform="",!isNaN(Ct)&&Ct!==1?(xt.parentNode.style.width=Ve.width*Ct+"px",xt.parentNode.style.height=Ve.height*Ct+"px",xn(xt,Ct)):(xn(xt,1),xt.parentNode.style.width=Ve.width+"px",xt.parentNode.style.height=Ve.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&He(We),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Le).parents(".content-added-content"))}}return{responsiveResize:lt,isFlexibleWorksheetEditor:Tn,positionCenter:He,getScale:Te,scaleElement:xn}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Tn=n.location.search;return Tn.indexOf(J)!=-1||Tn.indexOf(K)!=-1}function q(Tn,xn){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Tn){var xn=s[L].bindings;s[L].bindings=function(){for(var me=xn?xn():{},le=Tn[webModule.__softPermutationId],Te=O;Te<le.length;Te++){var He=le[Te];me[He[O]]=He[P]}return me}};var t;function u(){return v(),t}function v(){if(!t){var Tn=o.createElement(Q);if(Tn.id=L,Tn.style.cssText=R+S,Tn.tabIndex=-1,o.body.appendChild(Tn),t=Tn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var xn=document.compatMode==U?V:W;t.write(xn+X),t.close()}}}function w(Tn){function xn(le){function Te(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var He=Te();if(He){le();return}function lt(){if(!He){if(!Te())return;He=!0,le(),o.removeEventListener&&o.removeEventListener(Z,lt,!1),We&&clearInterval(We)}}o.addEventListener&&o.addEventListener(Z,lt,!1);var We=setInterval(function(){lt()},$)}function me(le){var Te=u(),He=Te.body,lt=Te.createElement(_);lt.language=ab,lt.crossOrigin=W,lt.src=le,webModule.__errFn&&(lt.onerror=function(){webModule.__errFn(L,new Error(bb+le))}),He.appendChild(lt)}xn(function(){me(Tn)})}webModule.__startLoadingFragment=function(Tn){return C(Tn)},webModule.__installRunAsyncCode=function(Tn){var xn=u(),me=xn.body,le=xn.createElement(_);le.language=ab,le.text=Tn,me.appendChild(le),me.removeChild(le)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Tn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Tn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Tn){var xn=c[Tn];return xn==null?null:xn},r=d,webModule.__errFn=e}function B(){function Tn(We){var Ve=We.lastIndexOf(rb);Ve==-1&&(Ve=We.length);var Le=We.indexOf(sb);Le==-1&&(Le=We.length);var Ct=We.lastIndexOf(tb,Math.min(Le,Ve));return Ct>=O?We.substring(O,Ct+P):W}function xn(We){if(!We.match(/^\w+:\/\//)){var Ve=o.createElement(ub);Ve.src=We+vb,We=Tn(Ve.src)}return We}function me(){var We=__gwt_getMetaProperty(wb);return We!=null?We:W}function le(){for(var We=o.getElementsByTagName(_),Ve=O;Ve<We.length;++Ve)if(We[Ve].src.indexOf(xb)!=-1)return Tn(We[Ve].src);return W}function Te(){var We=o.getElementsByTagName(yb);return We.length>O?We[We.length-P].href:W}function He(){var We=o.location;return We.href==We.protocol+zb+We.host+We.pathname+We.search+We.hash}var lt=me();return lt==W&&(lt=le()),lt==W&&(lt=Te()),lt==W&&He()&&(lt=Tn(o.location.href)),lt=xn(lt),lt}function C(Tn){return Tn.match(/^\//)||Tn.match(/^[a-zA-Z]+:\/\//)?Tn:webModule.__moduleBase+Tn}function D(){var Tn=[],xn=O,me=[],le=[];function Te(We){var Ve=le[We](),Le=me[We];if(Ve in Le)return Ve;var Ct=[];for(var xt in Le)Ct[Le[xt]]=xt;throw r&&r(We,Ct,Ve),null}if(__gwt_isKnownPropertyValue=function(We,Ve){return Ve in me[We]},webModule.__getPropMap=function(){var We={};for(var Ve in me)me.hasOwnProperty(Ve)&&(We[Ve]=Te(Ve));return We},webModule.__computePropValue=Te,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var He;try{He=Cb;var lt=He.indexOf(Db);lt!=-1&&(xn=parseInt(He.substring(lt+P),$),He=He.substring(O,lt))}catch(We){}return webModule.__softPermutationId=xn,C(He+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},49291:function(Tn,xn,me){"use strict";me.d(xn,{Ax:function(){return lt},Ds:function(){return We},KI:function(){return Le},SI:function(){return He},f1:function(){return Te}});var le=me(38446);function Te(Ct){let xt=!0;if(Ct.length>0){for(let Ue=0;Ue<Ct.length;Ue++)if(Ct[Ue].compile_success==0||!Ct[Ue].compile_success){xt=!1;break}}else xt=!1;return xt}function He(Ct,xt=""){let Ue=[];for(let bt=0;bt<Ct.length;bt++){let at=Ct[bt],mt=xt?`${xt}/${at.name}`:`${at.name}`;Ue.push({title:at.name,type:at.type,isLeaf:at.type!=="tree",key:mt})}return Ue}function lt(Ct,xt,Ue){for(let bt=0;bt<Ct.length;bt++){let at=Ct[bt];if(at.key===xt){at.children=Ue;break}at.children&<(at.children,xt,Ue)}return Ct}function We(Ct,xt,Ue){let bt;return function(){let at=this,mt=arguments,Oe=function(){bt=null,Ue||Ct.apply(at,mt)},te=Ue&&!bt;clearTimeout(bt),bt=setTimeout(Oe,xt),te&&Ct.apply(at,mt)}}const Ve=!0,Le=le.Z.API_SERVER},75872:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Oe}});var le=me(3113),Te=me(59301),He=Object.defineProperty,lt=Object.defineProperties,We=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,xt=(te,ee,de)=>ee in te?He(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:de}):te[ee]=de,Ue=(te,ee)=>{for(var de in ee||(ee={}))Le.call(ee,de)&&xt(te,de,ee[de]);if(Ve)for(var de of Ve(ee))Ct.call(ee,de)&&xt(te,de,ee[de]);return te},bt=(te,ee)=>lt(te,We(ee)),at=(te,ee)=>{var de={};for(var se in te)Le.call(te,se)&&ee.indexOf(se)<0&&(de[se]=te[se]);if(te!=null&&Ve)for(var se of Ve(te))ee.indexOf(se)<0&&Ct.call(te,se)&&(de[se]=te[se]);return de},mt=(te,ee,de)=>new Promise((se,he)=>{var ve=Be=>{try{Me(de.next(Be))}catch(je){he(je)}},Ee=Be=>{try{Me(de.throw(Be))}catch(je){he(je)}},Me=Be=>Be.done?se(Be.value):Promise.resolve(Be.value).then(ve,Ee);Me((de=de.apply(te,ee)).next())});const Oe=te=>{var ee=te,{children:de}=ee,se=at(ee,["children"]);const[he,ve]=(0,Te.useState)(!1);return Te.createElement(le.ZP,bt(Ue({},se),{loading:he,onClick:Ee=>mt(void 0,null,function*(){try{ve(!0),yield se.onClick(Ee),ve(!1)}catch(Me){console.error(Me),ve(!1)}})}),de)}},95750:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return mt}});var le=me(59301),Te=me(8591),He=me(92832),lt={codeBox:"codeBox___WpkVl"},We=me(92310),Ve=me.n(We),Le=Object.defineProperty,Ct=(Oe,te,ee)=>te in Oe?Le(Oe,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Oe[te]=ee,xt=(Oe,te,ee)=>Ct(Oe,typeof te!="symbol"?te+"":te,ee),Ue=(Oe,te,ee)=>new Promise((de,se)=>{var he=Me=>{try{Ee(ee.next(Me))}catch(Be){se(Be)}},ve=Me=>{try{Ee(ee.throw(Me))}catch(Be){se(Be)}},Ee=Me=>Me.done?de(Me.value):Promise.resolve(Me.value).then(he,ve);Ee((ee=ee.apply(Oe,te)).next())});class bt extends le.Component{constructor(te){super(te),xt(this,"canvas"),xt(this,"randomNum",(ee,de)=>Math.floor(Math.random()*(de-ee)+ee)),xt(this,"drawPic",()=>{this.randomCode()}),xt(this,"reloadPic",()=>{this.drawPic()}),xt(this,"changeCode",ee=>{console.log(ee.target.value,222),this.setState({value:ee.target.value,showError:!1})}),xt(this,"onVerify",()=>{let ee;return this.state.value.toLowerCase()!==""&&this.state.value.toLowerCase()!==this.state.code.toLowerCase()?(ee=!0,Te.ZP.error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801"),this.reloadPic()):this.state.value.toLowerCase()===""?(ee=!0,Te.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=le.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 de=this.randomNum(te,ee),se=this.randomNum(te,ee),he=this.randomNum(te,ee);return`rgb(${de}, ${se}, ${he})`}drawText(te,ee,de){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 he=10,ve=(this.state.contentWidth-40)/(this.state.code.length-1);let Ee=he;de>0&&(Ee=he+de*ve);let Me=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(Me=40);const Be=this.randomNum(-10,10);te.translate(Ee,Me),te.rotate(Be*Math.PI/180),te.fillText(ee,0,0),te.rotate(-Be*Math.PI/180),te.translate(-Ee,-Me)}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 de=0;de<this.state.codeLength;de++){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 he=0;he<this.state.code.length;he++)this.drawText(se,this.state.code[he],he);this.drawLine(se),this.drawDot(se)})}render(){const{className:te,width:ee=300}=this.props;return le.createElement("div",{className:Ve()(lt.codeBox,te),style:{width:ee}},le.createElement("aside",null,le.createElement(He.default,{value:this.state.value,onChange:this.changeCode,placeholder:"\u8BF7\u8F93\u5165\u56FE\u7247\u4E2D\u7684\u9A8C\u8BC1\u7801"})),le.createElement("div",null,le.createElement("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),le.createElement("div",{className:"current",onClick:this.reloadPic},"\u770B\u4E0D\u6E05\uFF1F\u6362\u4E00\u5F20")))}}const at=(Oe,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(bt,{ref:de=>ee=de})),onOk:()=>Ue(void 0,null,function*(){if(ee.onVerify())return Promise.reject();Oe()})})};var mt=bt},40928:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return xt}});var le=me(59301),Te=me(92832),He=me(12563),lt=me(8591),We={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},Ve=me(62772);const{TextArea:Le}=Te.default;class Ct extends le.Component{constructor(bt){super(bt),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:bt,onAnswerChange:at,addChildAnswer:mt,exerciseIsPublish:Oe,answers:te,activeOptionErrorIndex:ee,flex:de="0 0 1000px"}=this.props;console.log("----",te);let{inputVisible:se,EditInputIndex:he}=this.state;return le.createElement("div",{className:We.flex},le.createElement("div",{className:`${We.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",bt+1,"):"),le.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},te==null?void 0:te.map((ve,Ee)=>le.createElement(le.Fragment,null,he!==Ee?(ve==null?void 0:ve.length)>0?le.createElement(He.default,{className:"edit-tag",key:ve,closable:!((te==null?void 0:te.length)===1&&Ee===0),onClose:Me=>{Me.preventDefault(),(te==null?void 0:te.length)===1&&Ee===0?this.props.deleteChildAnswermain(bt,Ee):this.props.deleteChildAnswer(bt,Ee)}},le.createElement("span",{onDoubleClick:Me=>{this.setState({EditInputIndex:Ee}),Me.preventDefault()}},ve)):le.createElement(Te.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Me=>{if(Me.target.value.replaceAll(" ","").length<=0){lt.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}at(bt,Ee,Me.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):le.createElement(Te.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Me=>{if(Me.target.value.replaceAll(" ","").length<=0){lt.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}at(bt,Ee,Me.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&le.createElement(He.default,{className:"site-tag-plus",onClick:()=>{mt(bt),this.setState({inputVisible:!0})}},le.createElement(Ve.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var xt=Ct},60355:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Oe}});var le=me(59301),Te=me(64726),He=Object.defineProperty,lt=Object.defineProperties,We=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,xt=(te,ee,de)=>ee in te?He(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:de}):te[ee]=de,Ue=(te,ee)=>{for(var de in ee||(ee={}))Le.call(ee,de)&&xt(te,de,ee[de]);if(Ve)for(var de of Ve(ee))Ct.call(ee,de)&&xt(te,de,ee[de]);return te},bt=(te,ee)=>lt(te,We(ee)),at=(te,ee,de)=>xt(te,typeof ee!="symbol"?ee+"":ee,de);const mt="\u2581";class Oe extends le.Component{constructor(){super(...arguments),at(this,"getChCountBeforeCursor",(ee,de)=>{const se=de.line;let he=0;for(let Ee=0;Ee<se;Ee++)he+=ee.getLine(Ee).split(mt).length-1;const ve=ee.getLine(se).substring(0,de.ch);return he+=ve.split(mt).length-1,he}),at(this,"onCMBeforeChange",(ee,de)=>{const se=ee.getRange(de.from,de.to);let he=0;if(de.text.forEach(ve=>{he+=ve.split(mt).length-1}),se&&se.indexOf(mt)!=-1){const ve=se.split(mt).length-1,Ee=this.getChCountBeforeCursor(ee,de.from);console.log(`\u5220\u9664${ve}\u4E2A\uFF0C \u4E4B\u524D\u6709${Ee}\u4E2A\uFF0C\u65B0\u589E${he}\u4E2A`),this.props.deleteEmptyDisabled?de.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(Ee,ve,he)}else if(he){const ve=this.getChCountBeforeCursor(ee,de.from);console.log(`\u65B0\u589E${he}\u4E2A\uFF0C\u4E4B\u524D\u6709${ve}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ve,0,he)}})}render(){return le.createElement(Te.Z,bt(Ue({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},60341:function(Tn,xn,me){"use strict";me.d(xn,{d4:function(){return mt},VP:function(){return xt}});var le=me(59301),Te={digitalLabel:"digitalLabel___hkWuZ",active:"active___jawU1",titleEditor:"titleEditor___wX1lW",title:"title___SuT2h",editIcon:"editIcon___XrTIi",paperTab:"paperTab___GUxeB",tabItem:"tabItem___or0fY",dottedLine:"dottedLine___Ln0Xr"};const He=({number:Oe,active:te,className:ee})=>le.createElement("div",{className:`${Te.digitalLabel} ${te?Te.active:""} ${ee}`},Oe);var lt=me(6848),We=me(92832),Ve=me(8591),Le=me(59301),Ct=(Oe,te,ee)=>new Promise((de,se)=>{var he=Me=>{try{Ee(ee.next(Me))}catch(Be){se(Be)}},ve=Me=>{try{Ee(ee.throw(Me))}catch(Be){se(Be)}},Ee=Me=>Me.done?de(Me.value):Promise.resolve(Me.value).then(he,ve);Ee((ee=ee.apply(Oe,te)).next())});const xt=({defaultValue:Oe,onFinish:te})=>{const[ee,de]=(0,le.useState)(!1),[se,he]=(0,le.useState)(Oe);return(0,le.useEffect)(()=>{he(Oe)},[Oe]),Le.createElement("div",{className:Te.titleEditor},ee?Le.createElement(We.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:se,onChange:ve=>{he(ve.target.value)},onBlur:()=>Ct(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){Ve.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&de(!1)}),onPressEnter:()=>Ct(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){Ve.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&de(!1)})}):Le.createElement("div",{className:Te.title,onDoubleClick:()=>de(!0)},se,Le.createElement(lt.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},Le.createElement("i",{className:`${Te.editIcon} iconfont icon-bianji_Hover`,onClick:()=>de(!0)}))))};var Ue=me(95237),bt=me(43604),at=(Oe,te,ee)=>new Promise((de,se)=>{var he=Me=>{try{Ee(ee.next(Me))}catch(Be){se(Be)}},ve=Me=>{try{Ee(ee.throw(Me))}catch(Be){se(Be)}},Ee=Me=>Me.done?de(Me.value):Promise.resolve(Me.value).then(he,ve);Ee((ee=ee.apply(Oe,te)).next())});const mt=({onChange:Oe=()=>at(void 0,null,function*(){}),tabs:te,activeKey:ee,defaultActiveKey:de,className:se=""})=>{var he,ve,Ee,Me,Be,je,_e;const[Je,Xe]=(0,le.useState)(de===void 0?(he=te[0])==null?void 0:he.key:de);return(0,le.useEffect)(()=>{ee!==void 0&&Xe(ee)},[ee]),le.createElement(Ue.Z,{justify:"center",align:"middle",className:`${Te.paperTab} ${se}`},le.createElement(bt.Z,{className:`${Te.tabItem} ${Je===((ve=te[0])==null?void 0:ve.key)?Te.active:""}`,onClick:()=>at(void 0,null,function*(){var ht;yield Oe(te[0].key),Xe((ht=te[0])==null?void 0:ht.key)})},le.createElement(He,{number:1,active:Je===((Ee=te[0])==null?void 0:Ee.key),className:"mr10"}),le.createElement("span",null,(Me=te[0])==null?void 0:Me.label)),le.createElement(bt.Z,{flex:"188px",className:`${Te.dottedLine} ml30 mr30`}),le.createElement(bt.Z,{className:`${Te.tabItem} ${Je===((Be=te[1])==null?void 0:Be.key)?Te.active:""}`,onClick:()=>at(void 0,null,function*(){var ht,Ze;yield Oe((ht=te[1])==null?void 0:ht.key),Xe((Ze=te[1])==null?void 0:Ze.key)})},le.createElement(He,{number:2,active:Je===((je=te[1])==null?void 0:je.key),className:"mr10"}),le.createElement("span",null,(_e=te[1])==null?void 0:_e.label)))}},72559:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ve}});var le=me(60324),Te={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},He=me(32637),lt=me(59301),Ve=({type:Le,style:Ct})=>{const xt=lt.createElement("div",{className:Te.wrap,onClick:Ue=>{Ue.preventDefault(),Ue.stopPropagation()}},lt.createElement("p",null,Le==="shixun"||Le==="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",lt.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Le==="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"),lt.createElement("div",{className:Te.contact},lt.createElement("div",{className:Te.img},lt.createElement("img",{src:He,width:"124px",height:"124px"})),lt.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return lt.createElement(le.Z,{content:xt},lt.createElement("span",{className:Te.text,style:Ct},"\u9AD8\u6D88\u8017"))}},14573:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return bt}});var le=me(59301),Te={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},He=me(92310),lt=me.n(He),We=me(71418),Ve=me(2859),Le=me(7660),Ct=me(88230),xt=(at,mt,Oe)=>new Promise((te,ee)=>{var de=ve=>{try{he(Oe.next(ve))}catch(Ee){ee(Ee)}},se=ve=>{try{he(Oe.throw(ve))}catch(Ee){ee(Ee)}},he=ve=>ve.done?te(ve.value):Promise.resolve(ve.value).then(de,se);he((Oe=Oe.apply(at,mt)).next())}),bt=({data:at,className:mt,fullWidth:Oe,style:te={},onClose:ee,onOk:de,showFullTools:se,noAssociationId:he})=>{const ve=(0,le.useRef)(null),Ee=(0,le.useRef)(null),Me=(0,le.useRef)(null),Be=(0,le.useRef)(null),[je,_e]=(0,le.useState)(!1),[Je,Xe]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>{Me.current||(Me.current=document.createElement("style"),document.head.appendChild(Me.current)),at!=null&&at.visible?(document.body.setAttribute("data-custom","y-hidden"),Me.current.innerHTML=" html { overflow-y: hidden; }",at!=null&&at.src&&ht()):(document.body.removeAttribute("data-custom"),Me.current&&(document.head.removeChild(Me.current),Me.current=null))},[at==null?void 0:at.visible]);const ht=()=>xt(void 0,null,function*(){_e(!0),Xe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Ot=yield(0,Ct.ZJ)(at==null?void 0:at.src);ve.current.src="",ve.current.src=Ot,ve.current.onload=function(){ot()},_e(!1),Xe("")}),Ze=Ot=>xt(void 0,null,function*(){_e(!0),Xe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Pt=yield(0,Le.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:at.title,file:Ot.dataUrl}});Pt!=null&&Pt.id&&!he?(yield(0,Le.ZP)(`/api/attachments/${at.id}/add_subitem.json`,{method:"post",body:{subitem_id:Pt==null?void 0:Pt.id,settings:JSON.stringify(Ot.state)}})).status===0&&de():Pt!=null&&Pt.id&&de(Pt),_e(!1),Xe("")}),Mt=()=>{const Ot=document.querySelector('a[href="https://markerjs.com/"]');Ot&&Ot.parentNode&&(Ot.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(Dt=>{const Wt=document.querySelector(Dt.name);Wt&&Wt.setAttribute("title",Dt.title)})},ot=()=>{Ee.current=new Ve.hP(ve.current),Ee.current.targetRoot=Be.current,Ee.current.addEventListener("render",Ze),Ee.current.addEventListener("beforeclose",ee),se&&(Ee.current.availableMarkerTypes=Ee.current.ALL_MARKER_TYPES,Ee.current.uiStyleSettings.redoButtonVisible=!0,Ee.current.uiStyleSettings.notesButtonVisible=!0,Ee.current.uiStyleSettings.zoomButtonVisible=!0,Ee.current.uiStyleSettings.zoomOutButtonVisible=!0,Ee.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ee.current.uiStyleSettings,Ee.current.show(),at!=null&&at.snapshotData&&Ee.current.restoreState(at.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Mt()},300)};return le.createElement(le.Fragment,null,(at==null?void 0:at.visible)&&le.createElement(We.Z,{spinning:je,tip:Je,style:{position:"absolute"}},le.createElement("div",{ref:Be,className:lt()(Te.imageDimensions,mt,Oe?Te.fullWidth:""),style:te},le.createElement("img",{className:Te.img,ref:ve}))))}},72714:function(Tn,xn,me){"use strict";var le=me(59301),Te=me(11570),He=me(48136),lt=me(46531),We=me(43418),Ve=me(59301);const Le=(0,le.forwardRef)(({callback:Ct,width:xt,onChange:Ue,disabled:bt,readOnly:at,type:mt="",value:Oe="",style:te={}},ee)=>{const de=(0,le.useRef)(),se=(0,le.useRef)(),[he,ve]=(0,le.useState)(0),[Ee,Me]=(0,le.useState)(0),[Be,je]=(0,le.useState)(!1),_e=()=>{var Ze=document.createElement("div");Ze.innerHTML=de.current.getValue();var Mt=Ze.innerText;return Ct&&Ct(Mt),Mt};(0,le.useImperativeHandle)(ee,()=>({getData:_e}));const Je=Ze=>{Ze.preventDefault();const Mt=Ze.clientX-he,ot=Ze.clientY-Ee;document.body.onmousemove=Ot=>{let Pt=Ot.clientX-Mt,Dt=Ot.clientY-ot;const Wt=document.getElementsByClassName("markdown-popup-form")[0],Lt=window.innerWidth-Wt.offsetWidth,qe=window.innerHeight-Wt.offsetHeight;Pt=Math.max(0,Math.min(Pt,Lt)),Dt=Math.max(0,Math.min(Dt,qe)),Xe(Ot.clientX,Ot.clientY,Mt,ot)&&(ve(Pt),Me(Dt))},document.body.onmouseup=function(){document.body.onmousemove=null}},Xe=(Ze,Mt,ot,Ot)=>{const Pt=document.body.clientHeight,Dt=document.body.clientWidth;return Ze<20&&ot>Ze||Ze>Dt-20&&ot<Ze||Mt<20&&Ot>Mt||Mt>Pt-20&&Ot<Mt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,le.useEffect)(()=>{Be&&setTimeout(()=>{const Ze=document.getElementsByClassName("markdown-popup-form")[0],Mt=window.innerWidth/2-Ze.offsetWidth/2,ot=window.innerHeight/2-Ze.offsetHeight/2;ve(Mt),Me(ot)},0)},[Be]);const ht=()=>{bt||at||je(!0)};return Ve.createElement("div",{style:te},Ve.createElement("div",{style:{width:xt||"100%",position:"relative"},className:`${Te.Z.mathFillWrap} ${bt||at?"cursorDefault":""}`,onClick:()=>ht()},Ve.createElement("math-field",{disabled:bt,locale:"zh_cn",class:`${Te.Z.mathField} ${mt}`,readOnly:at,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:de,style:{width:"100%",fontSize:Oe?18:14},value:Oe||""})),Ve.createElement(We.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:he,top:Ee},title:Ve.createElement("div",{style:{cursor:"move"},onMouseDown:Je},"\u8F93\u5165\u516C\u5F0F"),open:Be,onOk:()=>{const Ze=se.current.getData();de.current.setValue(Ze),Ue(Ze),je(!1)},onCancel:()=>{je(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Ve.createElement(lt.Z,{value:Oe,ref:se,onChange:Ue,showSaveButton:!1})))});xn.Z=Le},46531:function(Tn,xn,me){"use strict";var le=me(59301),Te=me(95237),He=me(43604),lt=me(99313),We=me(3113),Ve=me(99325),Le=me(11570),Ct=me(48136),xt=me(59301);const Ue=(0,le.forwardRef)(({callback:bt,showSaveButton:at,value:mt=""},Oe)=>{const te=(0,le.useRef)(),ee=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],de=[{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=Ee=>{te.current.setValue(te.current.getValue()+" "+Ee.value+" ")},he=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:xt.createElement(Te.Z,{className:Le.Z.lists,gutter:[10,10]},ee.map((Ee,Me)=>xt.createElement(He.Z,{flex:"110px",className:Le.Z.item},xt.createElement("div",null,xt.createElement(Ve.Z,{value:`$$${Ee.value}$$`}),Ee.name),xt.createElement("div",{className:Le.Z.children},Ee.children.map((Be,je)=>xt.createElement("div",{key:je},xt.createElement("h1",null,Be.name),xt.createElement(Te.Z,{gutter:[10,10]},Be.data.map((_e,Je)=>xt.createElement(He.Z,{key:Je,onClick:()=>se(_e),className:Le.Z.diamond},xt.createElement(Ve.Z,{value:"`$$"+_e.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:xt.createElement(Te.Z,{className:Le.Z.lists,gutter:[10,10]},de.map((Ee,Me)=>xt.createElement(He.Z,{flex:"110px",className:Le.Z.item},xt.createElement("div",null,xt.createElement(Ve.Z,{value:"`$$"+Ee.value+"$$`"}),Ee.name),xt.createElement("div",{className:Le.Z.children},Ee.children.map((Be,je)=>xt.createElement("div",{key:je},Be.name&&xt.createElement("h1",null,Be.name),xt.createElement(Te.Z,{gutter:[10,10]},Be.data.map((_e,Je)=>xt.createElement(He.Z,{key:Je,onClick:()=>se(_e),className:Le.Z.diamond},xt.createElement(Ve.Z,{value:"`$$"+_e.value+"$$`"}))))))))))}],ve=()=>{var Ee=document.createElement("div");Ee.innerHTML=te.current.getValue();var Me=Ee.innerText;return bt&&bt(Me),Me};return(0,le.useImperativeHandle)(Oe,()=>({getData:ve})),xt.createElement("div",{className:Le.Z.mathWrap},xt.createElement(lt.default,{defaultActiveKey:"1",items:he}),xt.createElement("math-field",{locale:"zh_cn",className:Le.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:te,style:{width:800,marginTop:30,fontSize:18}},mt||""),at&&xt.createElement("div",{className:Le.Z.button},xt.createElement(We.ZP,{size:"large",onClick:ve,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});xn.Z=Ue},57816:function(Tn,xn,me){"use strict";var le=me(59301),Te=me(93314),He=me(3113),lt=Object.defineProperty,We=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,Ue=(Oe,te,ee)=>te in Oe?lt(Oe,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Oe[te]=ee,bt=(Oe,te)=>{for(var ee in te||(te={}))Ct.call(te,ee)&&Ue(Oe,ee,te[ee]);if(Le)for(var ee of Le(te))xt.call(te,ee)&&Ue(Oe,ee,te[ee]);return Oe},at=(Oe,te)=>We(Oe,Ve(te));const mt=({img:Oe,buttonProps:te={},styles:ee={},customText:de,ButtonText:se,ButtonClick:he,Buttonclass:ve,ButtonTwo:Ee,imgStyles:Me,loading:Be=!1})=>le.createElement("section",{className:"tc animated fadeIn",style:bt(bt({},{color:"#999",margin:"100px auto",visibility:Be?"hidden":"visible"}),ee)},le.createElement("img",{src:Oe||Te,style:at(bt({},Me),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},de||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&le.createElement(He.ZP,bt({className:ve,onClick:he},te),se),Ee&&Ee);xn.Z=mt},90853:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return ve}});var le=me(59301),Te={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},He=me(3113),lt=me(70557),We=me(57800),Ve=me(6848),Le=me(88230),Ct=me(30897),xt=me(57816),Ue=me(38446),bt=me(89282),at=me(59301),mt=Object.defineProperty,Oe=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(Ee,Me,Be)=>Me in Ee?mt(Ee,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Ee[Me]=Be,se=(Ee,Me)=>{for(var Be in Me||(Me={}))te.call(Me,Be)&&de(Ee,Be,Me[Be]);if(Oe)for(var Be of Oe(Me))ee.call(Me,Be)&&de(Ee,Be,Me[Be]);return Ee},he=(Ee,Me,Be)=>new Promise((je,_e)=>{var Je=Ze=>{try{ht(Be.next(Ze))}catch(Mt){_e(Mt)}},Xe=Ze=>{try{ht(Be.throw(Ze))}catch(Mt){_e(Mt)}},ht=Ze=>Ze.done?je(Ze.value):Promise.resolve(Ze.value).then(Je,Xe);ht((Be=Be.apply(Ee,Me)).next())}),ve=({editOffice:Ee="view",data:Me,theme:Be,type:je,filename:_e,monacoEditor:Je,className:Xe,style:ht,close:Ze,onClose:Mt,hasMask:ot,disabledDownload:Ot,onImgDimensions:Pt,showNodata:Dt,recordInfo:Wt})=>{const[Lt,qe]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ke,Rt]=(0,le.useState)(""),[Sn,Pn]=(0,le.useState)(),_t=window.ENV==="build"?"/react/build":"",rn=location.host.startsWith("localhost")?Ue.Z.PROXY_SERVER:Ue.Z.API_SERVER,Wn=10*(1024*1024),un=(0,le.useRef)();Me!=null&&Me.startsWith("/api")&&je!=="txt"&&(Me=Ue.Z.API_SERVER+Me);const _n=Ge=>Ge.substring(Ge.lastIndexOf("/")+1).split(".").pop();_e&&Je&&(Je.filename=_e),(0,le.useEffect)(()=>{var Ge,be;const Pe=(be=(Ge=document.cookie)==null?void 0:Ge.replace(/\s/g,""))==null?void 0:be.split(";");Pe==null||Pe.map(Ae=>{let Ne=Ae.split("=");Ne[0]==="_educoder_session"&&Rt(Ne[1])})},[]),(0,le.useEffect)(()=>{je==="office"&&(Me.indexOf("bigfilescdn.")>-1||Me.indexOf("bigfiles1")>-1?Pn({url:Me,fileType:_n(Me),model:Me.indexOf("model=edit")?"edit":"view"}):St())},[je,Me]);const St=()=>he(void 0,null,function*(){console.log("data:",Me);let Ge=Me;Me.startsWith("http")||(Ge=location.origin+Ge);let be=new URL(Ge).pathname.split("/").pop();const Pe=yield(0,Ct.gJ)({attachment_id:be});Pe.url=rn+Pe.url,Pn(Pe)}),Zn=()=>{if(Me.startsWith("http")||Me.startsWith("blob:")){li();return}(0,Le.Sv)(_e||"educoder",Me,_e)},li=()=>{Wt&&(0,bt.fc)({id:Wt==null?void 0:Wt.id,watch_type:1,course_id:Wt==null?void 0:Wt.course_id}),(0,Le.Nd)(_e||"educoder",decodeURIComponent(Me))};return at.createElement("div",{style:se({},ht||{}),className:`${ot&&Te.bgBlack} ${je?Te.wrp:"hide"}`},Ze&&at.createElement("div",{className:Te.close,ref:un},!!Pt&&at.createElement(Ve.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>un.current},at.createElement("span",{onClick:()=>{Mt(),Pt()}},at.createElement("i",{className:"icon-yulanpizhu"}))),!Ot&&at.createElement(Ve.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>un.current},at.createElement("span",{onClick:li},at.createElement("i",{className:"icon-quxiaozhiding"}))),at.createElement(Ve.Z,{title:"\u5173\u95ED",getPopupContainer:()=>un.current},at.createElement("span",{className:"",onClick:Mt},at.createElement("i",{className:"icon-guanbi1"})))),at.createElement("div",{className:`${Te[Xe]} ${Xe} ${Te.monaco} ${je==="txt"?"show":"hide"}`},je==="txt"&&at.createElement(at.Fragment,null,at.createElement(We.ZP,se({},Je)))),je==="audio"&&at.createElement("audio",{src:`${(Me==null?void 0:Me.indexOf("http://"))>-1||(Me==null?void 0:Me.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Me}`,autoPlay:!0}),je==="video"&&at.createElement(at.Fragment,null,(Me==null?void 0:Me.indexOf("http"))>-1?at.createElement("video",{controls:!0,src:`${Me}`,autoPlay:!0}):at.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Me}`,autoPlay:!0})),je==="office"&&Sn&&at.createElement("iframe",{src:`${_t}/office.html?key=${Sn.key}&url=${btoa(Sn.url)}&callbackUrl=${rn+(Sn.callbackUrl||"")}&fileType=${Sn.fileType}&title=${Sn.title||""}&model=${Ee}&officeServer=${Ue.Z.ONLYOFFICE}&disabledDownload=${!!Ot}`}),je==="html"&&at.createElement("iframe",{src:Me+"&disposition=inline"}),je==="pdf"&&at.createElement("iframe",{src:`${_t}/js/pdfview/index.html?filename=${_e||"educoder.pdf"}&url=${encodeURIComponent(Me)}&disabledDownload=${!!Ot}`}),je==="image"&&at.createElement("img",{src:`${(Me==null?void 0:Me.indexOf("http://"))>-1||(Me==null?void 0:Me.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Me}`}),(je==="other"||je==="download")&&at.createElement(at.Fragment,null,Dt?at.createElement(xt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:at.createElement(He.ZP,{icon:at.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Zn,disabled:Ot},"\u4E0B\u8F7D")}):at.createElement(He.ZP,{type:"primary",size:"middle",onClick:Zn,disabled:Ot},at.createElement(lt.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},32285:function(Tn,xn,me){"use strict";me.d(xn,{t:function(){return Pe}});var le=me(59301),Te=me(92832),He=me(78241),lt=me(43418),We=me(95237),Ve=me(43604),Le=me(5871),Ct=me(57809),xt=me(5112),Ue=me(70941),bt=me(24459),at=me(31687),mt=me(8591),Oe=me(3113),te=me(71418),ee=me(24334),de={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=me(7660),he=me(5247),ve=me(64726),Ee=me(56102),Me=me(76826),Be=me(59301),je=Object.defineProperty,_e=Object.defineProperties,Je=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Mt=(Ae,Ne,xe)=>Ne in Ae?je(Ae,Ne,{enumerable:!0,configurable:!0,writable:!0,value:xe}):Ae[Ne]=xe,ot=(Ae,Ne)=>{for(var xe in Ne||(Ne={}))ht.call(Ne,xe)&&Mt(Ae,xe,Ne[xe]);if(Xe)for(var xe of Xe(Ne))Ze.call(Ne,xe)&&Mt(Ae,xe,Ne[xe]);return Ae},Ot=(Ae,Ne)=>_e(Ae,Je(Ne)),Pt=(Ae,Ne,xe)=>new Promise((ut,Bt)=>{var Qe=Nt=>{try{Ft(xe.next(Nt))}catch(dt){Bt(dt)}},it=Nt=>{try{Ft(xe.throw(Nt))}catch(dt){Bt(dt)}},Ft=Nt=>Nt.done?ut(Nt.value):Promise.resolve(Nt.value).then(Qe,it);Ft((xe=xe.apply(Ae,Ne)).next())}),Wt=({buttonProps:Ae,buttonText:Ne,form:xe,hackIdentifier:ut="",answerKey:Bt,data:Qe})=>{const[it,Ft]=(0,le.useState)(!1),[Nt,dt]=(0,le.useState)(!1),[Kt,wn]=(0,le.useState)(!1),[sn,qt]=(0,le.useState)({}),[Rn,Vn]=(0,le.useState)(""),[hn,Yn]=(0,le.useState)(""),mi=(0,le.useRef)(ut),jn=(0,le.useRef)(""),An=(0,le.useRef)(!1);(0,le.useEffect)(()=>{Kt&&dr()},[Kt]),(0,le.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const wi=()=>new Date().getTime(),ji=Qe==null?void 0:Qe.code,Wi=()=>{var ui,Ci;let Xi=ji?Qe==null?void 0:Qe.code:(ui=xe.getFieldValue("hack_codes"))==null?void 0:ui.code,Ni=ji?Qe==null?void 0:Qe.answer_content:xe.getFieldValue(Bt),io=ji?Qe==null?void 0:Qe.input:(Ci=xe.getFieldValue("hack_sets"))==null?void 0:Ci.input;Ni==null||Ni.forEach(hr=>{const De=hr.value||hr.answer_text||"";Xi=Xi.replace(/(@▁@|@▁▁@)/,De)}),Yn(io),Vn(Xi),qt({}),wn(!0)},dr=()=>Pt(void 0,null,function*(){var ui,Ci,Xi,Ni;const io=wi(),hr=ji?Qe==null?void 0:Qe.time_limit:(ui=xe.getFieldsValue())==null?void 0:ui.hack.time_limit,De=ji?(Ci=Qe==null?void 0:Qe.answer_content)==null?void 0:Ci.length:(Ni=(Xi=xe.getFieldsValue())==null?void 0:Xi.standard_answers)==null?void 0:Ni.length;Ft(!0),yield(0,he.bM)(jn.current,{test_hack_code:Rn,test_input:hn});function Ei(){return Pt(this,null,function*(){const{status:Pr,data:Ln}=yield(0,he.rX)(jn.current,"submit"),Zi=wi()-io>(hr+3)*1e3*De;if(An.current){if(Zi){mt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Ft(!1);return}if(Pr===0){Ft(!1),qt(Ot(ot({},Ln),{showText:!0}));return}setTimeout(Ei,1e3)}})}Ei()}),Mr=()=>Pt(void 0,null,function*(){var ui,Ci,Xi,Ni,io,hr,De;if(!Qe){try{yield xe.validateFields()}catch(vi){(Xi=(Ci=(ui=vi==null?void 0:vi.errorFields)==null?void 0:ui[0])==null?void 0:Ci.name)!=null&&Xi.includes("standard_answers")?mt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):mt.ZP.error(vi.errorFields[0].errors[0]),xe.scrollToField(vi.errorFields[0].name,{behavior:"smooth",block:"center"});return}dt(!0);let Pr="";const Ln=xe.getFieldsValue();mi.current?Pr=yield(0,se.ZP)(`/api/problems/${mi.current}.json`,{method:"put",body:Ot(ot({},Ln),{hack:Ot(ot({},Ln==null?void 0:Ln.hack),{sub_discipline_id:(De=(hr=Ln==null?void 0:Ln.hack)==null?void 0:hr.sub_discipline_id)==null?void 0:De[1],difficult:Ln.difficulty,item_banks_group_id:Ln.item_banks_group_id}),hack_codes:Ot(ot({},Ln.hack_codes),{code:ee.Base64.encode(Ln.hack_codes.code)}),update_hack_sets:[ot({},Ln.hack_sets)],is_blank:!0})}):(Pr=yield(0,se.ZP)("/api/problems.json",{method:"post",body:Ot(ot({},Ln),{hack:Ot(ot({},Ln==null?void 0:Ln.hack),{sub_discipline_id:(io=(Ni=Ln==null?void 0:Ln.hack)==null?void 0:Ni.sub_discipline_id)==null?void 0:io[1],difficult:Ln.difficulty,item_banks_group_id:Ln.item_banks_group_id}),hack_codes:Ot(ot({},Ln.hack_codes),{code:ee.Base64.encode(Ln.hack_codes.code)}),hack_sets:[ot({},Ln.hack_sets)],is_blank:!0})}),mi.current=Pr==null?void 0:Pr.identifier,sessionStorage.projectFill=Pr==null?void 0:Pr.identifier)}const Ei=yield(0,se.ZP)(`/api/problems/${mi.current}/start.json`,{method:"get"});if((Ei==null?void 0:Ei.status)===0){jn.current=Ei==null?void 0:Ei.identifier,An.current=!0,dt(!1),Wi();return}dt(!1)}),pi=ui=>{const{status:Ci,error_msg:Xi,execute_time:Ni,output:io,input:hr,expected_output:De}=ui;let Ei=null;switch(Ci){case Me.h.OK:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Ni/1e3,"\u79D2"),Be.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Me.h.NOMATCH:Ei=Be.createElement(Be.Fragment,null,Be.createElement("div",null,"\u8F93\u5165\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},hr),Be.createElement("div",null,"\u8F93\u51FA\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},io&&ee.Base64.decode(io)),Be.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Be.createElement("pre",{style:{fontFamily:"initial"}},De&&ee.Base64.decode(De)));break;case Me.h.EXECUTEFAILURE:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Be.createElement("pre",null,hr)),Be.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Be.createElement("pre",{className:"error"},ee.Base64.decode(Xi)));break;case Me.h.COMPILEFAILURE:Ei=Be.createElement(Be.Fragment,null,Be.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Be.createElement("pre",null,hr)),Be.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Be.createElement("pre",{className:"error"},ee.Base64.decode(Xi)));break;case Me.h.PODFAILURE:Ei=Be.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Me.h.TIMEOUT:Ei=Be.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Be.createElement(Be.Fragment,null," ",Ei," ")};return Be.createElement("div",null,Be.createElement(Oe.ZP,Ot(ot({loading:Nt},Ae),{onClick:Mr}),Ne),Be.createElement(lt.default,{open:Kt,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:it,cancelButtonProps:{style:{display:"none"}},onOk:()=>dr(),onCancel:()=>{An.current=!1,wn(!1)}},Be.createElement("div",{className:de.result},Be.createElement("div",{className:de.left},Be.createElement("div",{className:"mb20"},Be.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!Qe&&Be.createElement(Ee.CopyToClipboard,{text:Rn,onCopy:()=>mt.ZP.success("\u590D\u5236\u6210\u529F")},Be.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Be.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Be.createElement(ve.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:Rn,onChange:ui=>Vn(ui)})),Be.createElement("div",{className:de.right},Be.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Be.createElement("div",{className:de.box},Be.createElement("div",{className:de.li},Be.createElement(Te.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:hn,onChange:ui=>Yn(ui.target.value),bordered:!1,style:{height:180}}))),Be.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Be.createElement("div",{className:de.box},Be.createElement(te.Z,{spinning:it,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Be.createElement("div",{className:de.li,style:{height:196,overflow:"auto",padding:10}},pi(sn))))))))},Lt=me(87169),qe=me(59301),Ke=Object.defineProperty,Rt=Object.defineProperties,Sn=Object.getOwnPropertyDescriptors,Pn=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,ln=(Ae,Ne,xe)=>Ne in Ae?Ke(Ae,Ne,{enumerable:!0,configurable:!0,writable:!0,value:xe}):Ae[Ne]=xe,Wn=(Ae,Ne)=>{for(var xe in Ne||(Ne={}))_t.call(Ne,xe)&&ln(Ae,xe,Ne[xe]);if(Pn)for(var xe of Pn(Ne))rn.call(Ne,xe)&&ln(Ae,xe,Ne[xe]);return Ae},un=(Ae,Ne)=>Rt(Ae,Sn(Ne)),_n=(Ae,Ne)=>{var xe={};for(var ut in Ae)_t.call(Ae,ut)&&Ne.indexOf(ut)<0&&(xe[ut]=Ae[ut]);if(Ae!=null&&Pn)for(var ut of Pn(Ae))Ne.indexOf(ut)<0&&rn.call(Ae,ut)&&(xe[ut]=Ae[ut]);return xe};const{TextArea:St}=Te.default,Zn=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],li=({value:Ae,onChange:Ne})=>qe.createElement(Switch,{checked:Ae,onChange:xe=>{Ne(xe)}}),Ge="@\u2581@",be="@\u2581\u2581@",Pe=({questionTitlePlaceholder:Ae,form:Ne,scoreByBlank:xe=!1,hackidentifier:ut,answerKey:Bt})=>{const[Qe,it]=(0,le.useState)(!1),[Ft,Nt]=(0,le.useState)(!1),Kt=(0,bt.useParams)().type==="edit",wn=(jn,An)=>{const wi=An.line;let ji=0;for(let dr=0;dr<wi;dr++)ji+=jn.getLine(dr).split(Ge).length-1;for(let dr=0;dr<wi;dr++)ji+=jn.getLine(dr).split(be).length-1;const Wi=jn.getLine(wi).substring(0,An.ch);return ji+=Wi.split(Ge).length-1,ji+=Wi.split(be).length-1,ji},sn=(jn,An,wi,ji)=>{const Wi=jn.getRange(An.from,An.to);let dr=0;if(An.text.forEach(Mr=>{dr+=Mr.split(Ge).length-1}),An.text.forEach(Mr=>{dr+=Mr.split(be).length-1}),An.origin!=="setValue"){if(Wi&&(Wi.indexOf(Ge)!==-1||Wi.indexOf(be)!==-1)){const Mr=Wi.split(Ge).length-1+Wi.split(be).length-1,pi=wn(jn,An.from);if(console.log(`\u5220\u9664${Mr}\u4E2A\uFF0C \u524D\u9762\u6709${pi}\u4E2A\uFF0C\u65B0\u589E${dr}\u4E2A`),Mr>1){const ui=Array.from({length:Mr},(Ci,Xi)=>pi+Xi);ji(ui)}else ji(pi)}else if(dr>0){const Mr=wn(jn,An.from);console.log(`\u65B0\u589E${dr}\u4E2A\uFF0C\u4E4B\u524D\u6709${Mr}\u4E2A`),wi(dr,Mr)}}},qt=()=>{const jn=Ne.getFieldValue(Bt);Ne.setFieldsValue({[Bt]:jn==null?void 0:jn.map((An,wi)=>un(Wn({},An),{position:wi+1}))})},Rn=(0,le.useRef)(),Vn=(jn,An)=>{for(let wi=0;wi<jn;wi++)Rn.current({position:null,answer_text:""},An+wi);qt()},hn=(0,le.useRef)(),Yn=jn=>{hn.current(jn),qt()},mi=He.default.useWatch(Bt,Ne);return qe.createElement("div",{className:at.Z.wrap},qe.createElement(He.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},qe.createElement(Ue.h,{scrollId:"name",watch:!0,height:140})),qe.createElement("div",{className:at.Z.questionTitleEditorWrap},qe.createElement(He.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},qe.createElement(Ue.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(jn,An)=>{const wi=Ne.getFieldValue(Bt);console.log("--preAnswerData",wi,An),Ne.setFieldsValue({[Bt]:wi==null?void 0:wi.map((ji,Wi)=>{var dr;return un(Wn({},ji),{position:Wi+1,multi_line:(dr=An==null?void 0:An[Wi])==null?void 0:dr.multiLine})})})},placeholder:Ae,onCMBeforeChange:(jn,An)=>{sn(jn,An,Vn,Yn)}}))),qe.createElement(He.default.List,{name:Bt,rules:[{validator(jn,An){if(!(An!=null&&An.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const wi of An){const{answer_text:ji}=wi||{};if((ji==null?void 0:ji.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(jn,{add:An,remove:wi},{errors:ji})=>(Rn.current=An,hn.current=wi,qe.createElement(qe.Fragment,null,qe.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},qe.createElement(He.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),qe.createElement("div",{onClick:()=>{lt.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:qe.createElement("div",null,qe.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",qe.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),qe.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"}},qe.createElement(Lt.Z,{style:{marginRight:3,color:"#3061D0"}}),qe.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),jn.map((Wi,dr)=>{var Mr=Wi,{key:pi,name:ui}=Mr,Ci=_n(Mr,["key","name"]),Xi,Ni;return qe.createElement(We.Z,{className:"mb20",key:pi,align:"middle",wrap:!1},qe.createElement(Ve.Z,{flex:"0 0 auto",className:`${at.Z.blankIndex}`},"\u586B\u7A7A\u9879",dr+1),qe.createElement(Ve.Z,{flex:1},qe.createElement(We.Z,{align:"top",justify:"space-between",wrap:!1},qe.createElement(Ve.Z,null,qe.createElement(He.default.Item,un(Wn({},Ci),{name:[ui,"answer_text"],noStyle:!0}),(Xi=mi==null?void 0:mi[ui])!=null&&Xi.multi_line||(Ni=mi==null?void 0:mi[ui])!=null&&Ni.multiLine?qe.createElement(St,{spellCheck:!1,style:{marginLeft:10,width:550}}):qe.createElement(Te.default,{style:{marginLeft:10,width:550},className:at.Z.blankInput,size:"large",maxLength:1e3,onBlur:io=>{}}))),xe&&qe.createElement(Ve.Z,{flex:"224px"},qe.createElement(He.default.Item,un(Wn({},Ci),{name:[ui,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),qe.createElement(Le.Z,{size:"large",className:at.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),qe.createElement("div",{onClick:()=>it(!0)},qe.createElement(He.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},qe.createElement(Ue.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Qe}))),qe.createElement(He.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"}]},qe.createElement(Ct.default,{size:"large"},Zn.map(jn=>qe.createElement(Ct.default.Option,{key:jn.title,value:jn.key}," ",jn.title)))),qe.createElement(He.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},qe.createElement(He.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},qe.createElement(Le.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),qe.createElement("span",{className:"ml10 font14"},"\u79D2")),qe.createElement(He.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"}]},qe.createElement(xt.ZP.Group,{style:{marginTop:-10}},qe.createElement(xt.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),qe.createElement(xt.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),qe.createElement(xt.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),qe.createElement(He.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),qe.createElement("div",{style:{background:"#F6F7F9",padding:15}},qe.createElement(He.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},qe.createElement(St,{rows:4})),qe.createElement(He.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},qe.createElement(St,{rows:4}))),qe.createElement(Wt,{form:Ne,answerKey:Bt,hackIdentifier:ut,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:qe.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"}}}))}},31674:function(Tn,xn,me){"use strict";me.d(xn,{u:function(){return Be}});var le=me(59301),Te=me(95237),He=me(43604),lt=me(6848),We=me(78241),Ve=me(31687),Le=me(32134),Ct=me(12893),xt=me(70941),Ue=me(59301),bt=Object.defineProperty,at=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(je,_e,Je)=>_e in je?bt(je,_e,{enumerable:!0,configurable:!0,writable:!0,value:Je}):je[_e]=Je,se=(je,_e)=>{for(var Je in _e||(_e={}))te.call(_e,Je)&&de(je,Je,_e[Je]);if(Oe)for(var Je of Oe(_e))ee.call(_e,Je)&&de(je,Je,_e[Je]);return je},he=(je,_e)=>at(je,mt(_e)),ve=(je,_e)=>{var Je={};for(var Xe in je)te.call(je,Xe)&&_e.indexOf(Xe)<0&&(Je[Xe]=je[Xe]);if(je!=null&&Oe)for(var Xe of Oe(je))_e.indexOf(Xe)<0&&ee.call(je,Xe)&&(Je[Xe]=je[Xe]);return Je};const Ee=["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"],Me=({value:je,onChange:_e,choiceTextKey:Je,answerKey:Xe,index:ht,isEdit:Ze,setInputActive:Mt,form:ot,choiceOptionsPath:Ot,allowChangeMode:Pt,showAddIcon:Dt,addItem:Wt,deleteItem:Lt})=>{console.log(je,"value");const qe=(je==null?void 0:je[Xe])===1,Ke=()=>{const Sn=ot.getFieldValue(Ot);ot.setFieldValue(Ot,Sn.map(Pn=>he(se({},Pn),{[Xe]:0})))},Rt=()=>{qe?_e(he(se({},je),{[Xe]:0})):(Pt||Ke(),_e(he(se({},je),{[Xe]:1})))};return Ue.createElement(Te.Z,{className:Ve.Z.choiceWrap,align:"middle",wrap:!1},Ue.createElement(He.Z,{onClick:Rt,className:`${Ve.Z.choiceIndex} ${qe?Ve.Z.activeAnswer:""}`},Ee[ht]),Ue.createElement(He.Z,{flex:1,className:`${Ve.Z.editorWrap} ml15`,onClick:Mt},Ue.createElement(xt.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Ze,value:je==null?void 0:je[Je],onChange:Sn=>{_e(he(se({},je),{[Je]:Sn}))}})),Ue.createElement(He.Z,{flex:"0 0 auto",className:"ml15"},Ue.createElement("div",{onClick:Rt,className:`${Ve.Z.setAnswerBtn} ${qe?Ve.Z.activeAnswer:""}`},qe?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Ue.createElement(He.Z,{className:Ve.Z.actionWrapper},Ue.createElement(lt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Ue.createElement(Le.Z,{className:Ve.Z.addIcon,onClick:Wt,style:{visibility:Dt?"visible":"hidden"}})),Ue.createElement(lt.Z,{title:"\u5220\u9664"},Ue.createElement(Ct.Z,{className:Ve.Z.deleteIcon,onClick:Lt,style:{visibility:ht>1?"visible":"hidden"}}))))},Be=({questionTitlePlaceholder:je,titleKey:_e,choiceKey:Je,analysisKey:Xe,choiceTextKey:ht,answerKey:Ze,choiceOptionsPath:Mt,allowChangeMode:ot=!0,form:Ot,showAnalysis:Pt=!0})=>{const[Dt,Wt]=(0,le.useState)(),[Lt,qe]=(0,le.useState)(!1);return Ue.createElement("div",{className:Ve.Z.wrap},Ue.createElement("div",{className:Ve.Z.questionTitleEditorWrap},Ue.createElement(We.default.Item,{label:"\u9898\u5E72",name:_e,labelCol:{span:24},rules:[{required:!0}]},Ue.createElement(xt.h,{scrollId:Array.isArray(_e)?_e.join("_"):`${_e}`,watch:!0,height:140,placeholder:je}))),Ue.createElement(We.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ue.createElement(We.default.List,{name:Je,rules:[{validator(Ke,Rt){const Sn=Rt.some(_t=>_t[Ze]===1),Pn=Rt.findIndex(_t=>{var rn;return((rn=_t[ht])==null?void 0:rn.length)<=0});return Pn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ee[Pn]}\u9009\u9879\u7684\u5185\u5BB9`)):Sn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ke,{add:Rt,remove:Sn})=>Ue.createElement("div",{id:Array.isArray(Mt)?Mt.join("_"):`${Mt}`},Ke.map((Pn,_t)=>{var rn=Pn,{key:ln,name:Wn}=rn,un=ve(rn,["key","name"]);const _n=Dt===ln,St=()=>{Wt(ln)},Zn=_t<7&&_t===Ke.length-1,li=()=>Rt({[ht]:"",[Ze]:0}),Ge=()=>Sn(Wn);return Ue.createElement(We.default.Item,he(se({},un),{key:ln,name:Wn,className:Ve.Z.choiceListWrap,rules:[{validator(be,Pe){return Pe!=null&&Pe.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ee[_t]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Ue.createElement(Me,{choiceTextKey:ht,answerKey:Ze,index:_t,isEdit:_n,setInputActive:St,form:Ot,choiceOptionsPath:Mt,allowChangeMode:ot,showAddIcon:Zn,addItem:li,deleteItem:Ge}))}),Ke.length<8&&Ue.createElement("div",{className:`${Ve.Z.addBtn} mb30`,onClick:()=>Rt({[ht]:"",[Ze]:0})},"\u6DFB\u52A0\u9009\u9879"))),Pt&&Ue.createElement("div",{onClick:()=>qe(!0)},Ue.createElement(We.default.Item,{name:Xe,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ue.createElement(xt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Lt}))))}},20386:function(Tn,xn,me){"use strict";me.d(xn,{u:function(){return ot}});var le=me(59301),Te=me(43418),He=me(95237),lt=me(43604),We=me(92832),Ve=me(6848),Le=me(78673),Ct=me(78241),xt=me(5112),Ue=me(5871),bt=me(70941),at=me(12893),mt=me(61485),Oe=me(31687),te=me(72714),ee=me(59301),de=Object.defineProperty,se=Object.defineProperties,he=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Be=(Ot,Pt,Dt)=>Pt in Ot?de(Ot,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):Ot[Pt]=Dt,je=(Ot,Pt)=>{for(var Dt in Pt||(Pt={}))Ee.call(Pt,Dt)&&Be(Ot,Dt,Pt[Dt]);if(ve)for(var Dt of ve(Pt))Me.call(Pt,Dt)&&Be(Ot,Dt,Pt[Dt]);return Ot},_e=(Ot,Pt)=>se(Ot,he(Pt)),Je=(Ot,Pt)=>{var Dt={};for(var Wt in Ot)Ee.call(Ot,Wt)&&Pt.indexOf(Wt)<0&&(Dt[Wt]=Ot[Wt]);if(Ot!=null&&ve)for(var Wt of ve(Ot))Pt.indexOf(Wt)<0&&Me.call(Ot,Wt)&&(Dt[Wt]=Ot[Wt]);return Dt};const Xe=({value:Ot,onChange:Pt})=>{const Dt=Lt=>{Te.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:Oe.Z.modal,onOk:()=>{const qe=[...Ot];qe.splice(Lt,1),Pt(qe)}})},Wt=()=>{const Lt=[...Ot];Lt.push(""),Pt(Lt)};return ee.createElement(He.Z,{className:"ml20"},ee.createElement(lt.Z,{flex:1},Ot==null?void 0:Ot.map((Lt,qe)=>ee.createElement(He.Z,{key:`${Lt}_${qe}`,className:"mb20"},ee.createElement(We.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Lt,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ke=>{const Rt=[...Ot],Sn=Ke.target.value.trim();Rt[qe]=Sn,Pt(Rt)}}),ee.createElement(Ve.Z,{title:"\u5220\u9664"},ee.createElement(at.Z,{className:Oe.Z.deleteIcon,style:{marginLeft:15,visibility:qe>0?"visible":"hidden"},onClick:()=>Dt(qe)}))))),ee.createElement(lt.Z,null,ee.createElement("div",{className:`${Oe.Z.addBtn}`,onClick:()=>{Wt()}},"\u65B0\u589E\u7B54\u6848")))},ht=({value:Ot,onChange:Pt})=>{const Dt=Lt=>{Te.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:Oe.Z.modal,onOk:()=>{const qe=[...Ot];qe.splice(Lt,1),Pt(qe)}})},Wt=()=>{const Lt=[...Ot];Lt.push(""),Pt(Lt)};return ee.createElement(He.Z,{className:"ml20"},ee.createElement(lt.Z,{flex:1},Ot==null?void 0:Ot.map((Lt,qe)=>ee.createElement(He.Z,{key:`${Lt}_${qe}`,align:"middle",className:"mb20"},ee.createElement(te.Z,{value:Lt,style:{flex:1},onChange:Ke=>{const Rt=[...Ot];Rt[qe]=Ke,Pt(Rt)}}),ee.createElement(Ve.Z,{title:"\u5220\u9664"},ee.createElement(at.Z,{className:Oe.Z.deleteIcon,style:{marginLeft:15,visibility:qe>0?"visible":"hidden"},onClick:()=>Dt(qe)}))))),ee.createElement(lt.Z,null,ee.createElement("div",{className:`${Oe.Z.addBtn}`,onClick:()=>{Wt()}},"\u65B0\u589E\u7B54\u6848")))},Ze=({value:Ot=!0,onChange:Pt})=>ee.createElement(Le.Z,{checked:!Ot,onChange:Dt=>{Pt(!Dt)}}),Mt="\u2581",ot=({questionTitlePlaceholder:Ot,form:Pt,scoreByBlank:Dt=!1,answerKey:Wt})=>{const[Lt,qe]=(0,le.useState)(!1),Ke=(un,_n)=>{const St=_n.line;let Zn=0;for(let Ge=0;Ge<St;Ge++)Zn+=un.getLine(Ge).split(Mt).length-1;const li=un.getLine(St).substring(0,_n.ch);return Zn+=li.split(Mt).length-1,Zn},Rt=(un,_n,St,Zn)=>{const li=un.getRange(_n.from,_n.to);let Ge=0;if(_n.text.forEach(be=>{Ge+=be.split(Mt).length-1}),_n.origin!=="setValue"){if(li&&li.indexOf(Mt)!==-1){const be=li.split(Mt).length-1,Pe=Ke(un,_n.from);if(console.log(`\u5220\u9664${be}\u4E2A\uFF0C \u524D\u9762\u6709${Pe}\u4E2A\uFF0C\u65B0\u589E${Ge}\u4E2A`),be>1){const Ae=Array.from({length:be},(Ne,xe)=>Pe+xe);Zn(Ae)}else Zn(Pe)}else if(Ge>0){const be=Ke(un,_n.from);console.log(`\u65B0\u589E${Ge}\u4E2A\uFF0C\u4E4B\u524D\u6709${be}\u4E2A`),St(Ge,be)}}},Sn=()=>{const un=Pt.getFieldValue(Wt);Pt.setFieldsValue({[Wt]:un.map((_n,St)=>_e(je({},_n),{position:St+1}))})},Pn=(0,le.useRef)(),_t=(un,_n)=>{for(let St=0;St<un;St++)Pn.current({position:null,answer_text:[""],model:1},_n+St);Sn()},rn=(0,le.useRef)(),ln=un=>{rn.current(un),Sn()},Wn=Ct.default.useWatch(Wt,Pt);return ee.createElement("div",{className:Oe.Z.wrap},ee.createElement("div",{className:Oe.Z.questionTitleEditorWrap},ee.createElement(Ct.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(bt.h,{scrollId:"name",watch:!0,height:140,placeholder:Ot,showNullButton:!0,onCMBeforeChange:(un,_n)=>{Rt(un,_n,_t,ln)}}))),ee.createElement(Ct.default.List,{name:Wt,rules:[{validator(un,_n){if(!(_n!=null&&_n.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const St of _n){const{answer_text:Zn}=St||{};if(Zn!=null&&Zn.some(li=>(li==null?void 0:li.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(un,{add:_n,remove:St},{errors:Zn})=>(Pn.current=_n,rn.current=St,ee.createElement(ee.Fragment,null,ee.createElement(Ct.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(un!=null&&un.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}}),un.map((li,Ge)=>{var be=li,{key:Pe,name:Ae}=be,Ne=Je(be,["key","name"]),xe,ut;return ee.createElement("div",{style:{marginBottom:10},key:Pe},ee.createElement(He.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(lt.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Oe.Z.blankIndex}`},"\u586B\u7A7A\u9879",Ge+1),ee.createElement(Ct.default.Item,_e(je({},Ne),{name:[Ae,"model"],noStyle:!0}),ee.createElement(xt.ZP.Group,{onChange:()=>{const Bt=Pt.getFieldValue(Wt);Pt.setFieldsValue({[Wt]:Bt.map((Qe,it)=>_e(je({},Qe),{answer_text:Ae===it?[""]:Qe.answer_text}))})}},ee.createElement(xt.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(Ve.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(mt.Z,null))),ee.createElement(xt.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(Ve.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(mt.Z,null)))))),ee.createElement(He.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(lt.Z,{flex:1},ee.createElement(He.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(lt.Z,{flex:1},ee.createElement(Ct.default.Item,_e(je({},Ne),{name:[Ae,"answer_text"],noStyle:!0}),((ut=(xe=Pt.getFieldValue(Wt))==null?void 0:xe[Ae])==null?void 0:ut.model)===1?ee.createElement(Xe,null):ee.createElement(ht,null))),Dt&&ee.createElement(lt.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(Ct.default.Item,_e(je({},Ne),{name:[Ae,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Oe.Z.blankInputNumberWrapper}),ee.createElement(Ue.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(Ct.default.Item,_e(je({},Ne),{name:[Ae,"position"],noStyle:!0}),ee.createElement(We.default,{type:"hidden"})))))})))),ee.createElement(He.Z,{align:"middle"},ee.createElement(Ct.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Le.Z,null)),ee.createElement(lt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(He.Z,{align:"middle"},ee.createElement(Ct.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Le.Z,null)),ee.createElement(lt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Wn==null?void 0:Wn.length)>1&&ee.createElement(He.Z,{align:"middle",className:(Wn==null?void 0:Wn.length)>1?"mb30":`${Oe.Z.hide}`},ee.createElement(Ct.default.Item,{name:"is_ordered"},ee.createElement(Ze,null)),ee.createElement(lt.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:()=>qe(!0)},ee.createElement(Ct.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(bt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Lt}))))}},69269:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return ve}});var le=me(59301),Te=me(95237),He=me(43604),lt=me(78241),We=me(31687),Ve=me(70941),Le=me(59301),Ct=Object.defineProperty,xt=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,bt=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,Oe=(Ee,Me,Be)=>Me in Ee?Ct(Ee,Me,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Ee[Me]=Be,te=(Ee,Me)=>{for(var Be in Me||(Me={}))at.call(Me,Be)&&Oe(Ee,Be,Me[Be]);if(bt)for(var Be of bt(Me))mt.call(Me,Be)&&Oe(Ee,Be,Me[Be]);return Ee},ee=(Ee,Me)=>xt(Ee,Ue(Me)),de=(Ee,Me)=>{var Be={};for(var je in Ee)at.call(Ee,je)&&Me.indexOf(je)<0&&(Be[je]=Ee[je]);if(Ee!=null&&bt)for(var je of bt(Ee))Me.indexOf(je)<0&&mt.call(Ee,je)&&(Be[je]=Ee[je]);return Be};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},he=({value:Ee,onChange:Me,form:Be})=>{const je=(Ee==null?void 0:Ee.is_answer)===1,_e=Ee==null?void 0:Ee.choice_text,Je=()=>{const Xe=Be.getFieldsValue().choices.map(ht=>({choice_text:ht.choice_text,is_answer:0}));Be.setFieldsValue({choices:Xe}),Me(ee(te({},Ee),{is_answer:1}))};return Le.createElement(Te.Z,{className:We.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Le.createElement(He.Z,{onClick:Je,className:`${We.Z.choiceIndex} ${We.Z.judgementIndex} ${je?We.Z.activeAnswer:""}`},se[_e]),Le.createElement(He.Z,{flex:1,className:`${We.Z.editorWrap} ml15`},Le.createElement("div",{className:`${We.Z.inputBorder} ${We.Z.placeholder} ${je?We.Z.activeJudgementAnswer:""}`},_e)),Le.createElement(He.Z,{flex:"0 0 auto",className:"ml15"},Le.createElement("div",{onClick:Je,className:`${We.Z.setAnswerBtn} ${je?We.Z.activeAnswer:""}`},je?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ve=({questionTitlePlaceholder:Ee,choiceKey:Me,form:Be})=>{const[je,_e]=(0,le.useState)(!1);return Le.createElement("div",{className:We.Z.wrap},Le.createElement("div",{className:We.Z.questionTitleEditorWrap},Le.createElement(lt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Le.createElement(Ve.h,{scrollId:"name",watch:!0,height:140,placeholder:Ee}))),Le.createElement(lt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Le.createElement(lt.default.List,{name:"choices",rules:[{validator(Je,Xe){return Xe.some(Ze=>(Ze==null?void 0:Ze.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Je=>Le.createElement("div",{id:"choices"},Je.map(Xe=>{var ht=Xe,{key:Ze,name:Mt}=ht,ot=de(ht,["key","name"]);return Le.createElement(lt.default.Item,ee(te({},ot),{key:Ze,name:Mt,noStyle:!0}),Le.createElement(he,{form:Be}))})))),Le.createElement("div",{onClick:()=>_e(!0)},Le.createElement(lt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Le.createElement(Ve.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:je}))))}},70941:function(Tn,xn,me){"use strict";me.d(xn,{h:function(){return te},x:function(){return ee}});var le=me(64726),Te=me(31687),He=me(99325),lt=me(59301),We=Object.defineProperty,Ve=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,bt=(de,se,he)=>se in de?We(de,se,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[se]=he,at=(de,se)=>{for(var he in se||(se={}))xt.call(se,he)&&bt(de,he,se[he]);if(Ct)for(var he of Ct(se))Ue.call(se,he)&&bt(de,he,se[he]);return de},mt=(de,se)=>Ve(de,Le(se)),Oe=(de,se)=>{var he={};for(var ve in de)xt.call(de,ve)&&se.indexOf(ve)<0&&(he[ve]=de[ve]);if(de!=null&&Ct)for(var ve of Ct(de))se.indexOf(ve)<0&&Ue.call(de,ve)&&(he[ve]=de[ve]);return he};const te=de=>{var se=de,{value:he,onChange:ve,scrollId:Ee}=se,Me=Oe(se,["value","onChange","scrollId"]);return lt.createElement("div",{id:Ee||""},lt.createElement(le.Z,mt(at({},Me),{defaultValue:he,onChange:(Be,je)=>{je!=null&&je.length?ve(Be,je):ve(Be)}})))},ee=({value:de,onChange:se,placeholder:he,height:ve=140,isEdit:Ee,miniToolbar:Me,watch:Be=!0})=>Ee?lt.createElement(le.Z,{watch:Be,isFocus:!0,height:ve||void 0,placeholder:he,defaultValue:de,onChange:se,miniToolbar:Me}):lt.createElement("div",{style:{cursor:"pointer"}},de?lt.createElement(He.Z,{className:Te.Z.inputBorder,value:de}):lt.createElement("div",{className:`${Te.Z.inputBorder} ${Te.Z.placeholder} inputBorderError`},he))},9489:function(Tn,xn,me){"use strict";me.d(xn,{W:function(){return ht}});var le=me(59301),Te=me(8591),He=me(12563),lt=me(78241),We=me(78673),Ve=me(95237),Le=me(43604),Ct=me(6848),xt=me(92832),Ue=me(5871),bt=me(31687),at=me(70941),mt=me(64726),Oe=me(61485),te=Object.defineProperty,ee=Object.defineProperties,de=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Ee=(Ze,Mt,ot)=>Mt in Ze?te(Ze,Mt,{enumerable:!0,configurable:!0,writable:!0,value:ot}):Ze[Mt]=ot,Me=(Ze,Mt)=>{for(var ot in Mt||(Mt={}))he.call(Mt,ot)&&Ee(Ze,ot,Mt[ot]);if(se)for(var ot of se(Mt))ve.call(Mt,ot)&&Ee(Ze,ot,Mt[ot]);return Ze},Be=(Ze,Mt)=>ee(Ze,de(Mt)),je=(Ze,Mt)=>{var ot={};for(var Ot in Ze)he.call(Ze,Ot)&&Mt.indexOf(Ot)<0&&(ot[Ot]=Ze[Ot]);if(Ze!=null&&se)for(var Ot of se(Ze))Mt.indexOf(Ot)<0&&ve.call(Ze,Ot)&&(ot[Ot]=Ze[Ot]);return ot};const _e=Ze=>{var Mt=Ze,{value:ot,onChange:Ot}=Mt,Pt=je(Mt,["value","onChange"]);const Dt=Wt=>{Ot([Wt])};return le.createElement(mt.Z,Be(Me({},Pt),{defaultValue:ot==null?void 0:ot[0],onChange:Dt}))},Je=Ze=>{if(!Ze)return!1;if(/^s*$/.test(Ze)||Ze.trim()===""){Te.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Mt=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return Ze==="|"?(Te.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Xe=({value:Ze=[],onClose:Mt})=>le.createElement(He.default,{closable:!0,onClose:Mt,className:bt.Z.keywordTag},le.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Ze.join(" \u6216 "))),ht=({questionTitlePlaceholder:Ze,form:Mt,showKeywords:ot,isMustKeyWords:Ot=ot})=>{const[Pt,Dt]=(0,le.useState)(!1),[Wt,Lt]=(0,le.useState)(""),qe=lt.default.useWatch("use_keywords",Mt),Ke=lt.default.useWatch("question_score",Mt);return le.createElement("div",{className:bt.Z.wrap},le.createElement("div",{className:bt.Z.questionTitleEditorWrap},le.createElement(lt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},le.createElement(at.h,{scrollId:"name",watch:!0,height:140,placeholder:Ze}))),le.createElement(lt.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},le.createElement(_e,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),ot&&!Ot&&le.createElement(lt.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},le.createElement(We.Z,{defaultChecked:!0})),ot&&Ot&&le.createElement(Ve.Z,{align:"middle",className:"mb30"},le.createElement(lt.default.Item,{name:"use_keywords",valuePropName:"checked"},le.createElement(We.Z,null)),le.createElement(Le.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(Le.Z,null,le.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"},le.createElement(Oe.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(qe||!Ot)&&le.createElement(lt.default.List,{name:"keywords",rules:[{validator(Rt,Sn){return Ot?Sn!=null&&Sn.length?(Sn==null?void 0:Sn.reduce((_t,rn)=>_t+rn.score,0))>parseFloat(Ke)?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()}}]},(Rt,{add:Sn,remove:Pn})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${bt.Z.title} mb10`},Ot?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(Ve.Z,{align:"middle",className:"font14 mb30"},le.createElement(Le.Z,{flex:1},le.createElement(xt.default,{value:Wt,onChange:_t=>{Lt(_t.target.value)},maxLength:50,allowClear:!0,onPressEnter:_t=>{var rn,ln,Wn,un;const _n=`${(rn=_t.target)==null?void 0:rn.value}`,St=(Wn=(ln=_n==null?void 0:_n.split("|"))==null?void 0:ln.filter(Ge=>!!Ge))==null?void 0:Wn.map(Ge=>Ge==null?void 0:Ge.trim()),Zn=Mt.getFieldValue("keywords"),li=((un=Zn==null?void 0:Zn.map(Ge=>Ge==null?void 0:Ge.keyword))==null?void 0:un.flat())||[];for(const Ge of St)if(li.includes(Ge)){Te.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Je(_n)&&(Sn({keyword:St,score:1}),Lt(""))},className:bt.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"})),le.createElement(Le.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Rt.map(_t=>{var rn=_t,{key:ln,name:Wn}=rn,un=je(rn,["key","name"]);return le.createElement(Ve.Z,{key:ln,className:"mb20",style:{marginRight:148}},le.createElement(Le.Z,{flex:1},le.createElement(Ve.Z,{align:"middle",justify:"space-between"},le.createElement(lt.default.Item,Be(Me({},un),{name:[Wn,"keyword"]}),le.createElement(Xe,{onClose:()=>Pn(Wn)})),Ot&&le.createElement(lt.default.Item,Be(Me({},un),{name:[Wn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:bt.Z.blankInputNumberWrapper}),le.createElement(Ue.Z,{className:bt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>Dt(!0)},le.createElement(lt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(at.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Pt}))))}},37542:function(Tn,xn,me){"use strict";me.d(xn,{tc:function(){return Mr.t},uh:function(){return le.u},rL:function(){return dr},u8:function(){return He.u},ZZ:function(){return Te.Z},Wk:function(){return lt.W}});var le=me(31674),Te=me(69269),He=me(20386),lt=me(9489),We=me(59301),Ve=me(36381),Le=me(78241),Ct=me(95237),xt=me(43604),Ue=me(5871),bt=me(6848),at=me(38854),mt=me(31687),Oe=me(12893),te=me(70941),ee=me(43418),de=me(92832),se=me(78673),he=me(59301),ve=Object.defineProperty,Ee=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Je=(pi,ui,Ci)=>ui in pi?ve(pi,ui,{enumerable:!0,configurable:!0,writable:!0,value:Ci}):pi[ui]=Ci,Xe=(pi,ui)=>{for(var Ci in ui||(ui={}))je.call(ui,Ci)&&Je(pi,Ci,ui[Ci]);if(Be)for(var Ci of Be(ui))_e.call(ui,Ci)&&Je(pi,Ci,ui[Ci]);return pi},ht=(pi,ui)=>Ee(pi,Me(ui)),Ze=(pi,ui)=>{var Ci={};for(var Xi in pi)je.call(pi,Xi)&&ui.indexOf(Xi)<0&&(Ci[Xi]=pi[Xi]);if(pi!=null&&Be)for(var Xi of Be(pi))ui.indexOf(Xi)<0&&_e.call(pi,Xi)&&(Ci[Xi]=pi[Xi]);return Ci};const Mt=({value:pi,onChange:ui})=>{const Ci=Ni=>{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:mt.Z.modal,onOk:()=>{const io=[...pi];io.splice(Ni,1),ui(io)}})},Xi=()=>{const Ni=[...pi];Ni.push(""),ui(Ni)};return he.createElement(Ct.Z,{className:"ml20"},he.createElement(xt.Z,{flex:1},pi==null?void 0:pi.map((Ni,io)=>he.createElement(Ct.Z,{key:`${Ni}_${io}`,align:"middle",className:"mb20"},he.createElement(de.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Ni,autoSize:{maxRows:3},maxLength:1e3,onBlur:hr=>{const De=[...pi],Ei=hr.target.value.trim();De[io]=Ei,ui(De)}}),he.createElement(bt.Z,{title:"\u5220\u9664"},he.createElement(Oe.Z,{className:mt.Z.deleteIcon,style:{marginLeft:15,visibility:io>0?"visible":"hidden"},onClick:()=>Ci(io)}))))),he.createElement(xt.Z,null,he.createElement("div",{className:`${mt.Z.addBtn}`,onClick:()=>{Xi()}},"\u65B0\u589E\u7B54\u6848")))},ot=({value:pi=!0,onChange:ui})=>he.createElement(se.Z,{checked:!pi,onChange:Ci=>{ui(!Ci)}}),Ot="\u2581",Pt=({questionTitlePlaceholder:pi,form:ui,name:Ci,scoreByBlank:Xi=!1,answerKey:Ni,titleKey:io="name",analysisKey:hr="analysis",isOrdered:De="is_ordered"})=>{var Ei,Pr;const[Ln,vi]=(0,We.useState)(!1),Zi=(cn,It)=>{const ct=It.line;let an=0;for(let ei=0;ei<ct;ei++)an+=cn.getLine(ei).split(Ot).length-1;const dn=cn.getLine(ct).substring(0,It.ch);return an+=dn.split(Ot).length-1,an},er=(cn,It,ct,an)=>{const dn=cn.getRange(It.from,It.to);let ei=0;if(It.text.forEach(pn=>{ei+=pn.split(Ot).length-1}),It.origin!=="setValue"){if(dn&&dn.indexOf(Ot)!==-1){const pn=dn.split(Ot).length-1,zt=Zi(cn,It.from);if(console.log(`\u5220\u9664${pn}\u4E2A\uFF0C \u524D\u9762\u6709${zt}\u4E2A\uFF0C\u65B0\u589E${ei}\u4E2A`),pn>1){const In=Array.from({length:pn},(Qn,xi)=>zt+xi);an(In)}else an(zt)}else if(ei>0){const pn=Zi(cn,It.from);console.log(`\u65B0\u589E${ei}\u4E2A\uFF0C\u4E4B\u524D\u6709${pn}\u4E2A`),ct(ei,pn)}}},Gn=()=>{const cn=ui.getFieldValue(["sub_item_banks",...Ni]);ui.setFieldValue(["sub_item_banks",...Ni],cn==null?void 0:cn.map((It,ct)=>ht(Xe({},It),{position:ct+1})))},$t=(0,We.useRef)(),Gt=(cn,It)=>{for(let ct=0;ct<cn;ct++)$t.current({position:null,answer_text:[""]},It+ct);Gn()},Zt=(0,We.useRef)(),wt=cn=>{Zt.current(cn),Gn()},vn=(Pr=(Ei=ui.getFieldValue("sub_item_banks"))==null?void 0:Ei[Ni==null?void 0:Ni[0]])==null?void 0:Pr[Ni==null?void 0:Ni[1]];return(0,We.useEffect)(()=>{console.log("========",ui.getFieldsValue())},[ui]),he.createElement("div",{className:mt.Z.wrap},he.createElement("div",{className:mt.Z.questionTitleEditorWrap},he.createElement(Le.default.Item,{label:"\u9898\u5E72",name:io,labelCol:{span:24},rules:[{required:!0}]},he.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:pi,showNullButton:!0,onCMBeforeChange:(cn,It)=>{er(cn,It,Gt,wt)}}))),he.createElement(Le.default.List,{name:Ni,rules:[{validator(cn,It){if((It==null?void 0:It.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const ct of It){const{answer_text:an}=ct||{};if(an!=null&&an.some(dn=>(dn==null?void 0:dn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(cn,{add:It,remove:ct},{errors:an})=>($t.current=It,Zt.current=ct,he.createElement(he.Fragment,null,he.createElement(Le.default.Item,{label:he.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(cn!=null&&cn.length)&&he.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),cn.map((dn,ei)=>{var pn=dn,{key:zt,name:In}=pn,Qn=Ze(pn,["key","name"]);return he.createElement(Ct.Z,{align:"top",key:zt},he.createElement(xt.Z,{className:`${mt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",ei+1),he.createElement(xt.Z,{flex:1},he.createElement(Ct.Z,{align:"top",justify:"space-between"},he.createElement(xt.Z,{flex:1},he.createElement(Le.default.Item,ht(Xe({},Qn),{name:[In,"answer_text"],noStyle:!0}),he.createElement(Mt,null))),Xi&&he.createElement(xt.Z,{flex:"224px"},he.createElement(Le.default.Item,ht(Xe({},Qn),{name:[In,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:mt.Z.blankInputNumberWrapper}),he.createElement(Ue.Z,{className:mt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),he.createElement(Le.default.Item,ht(Xe({},Qn),{name:[In,"position"],noStyle:!0}),he.createElement(de.default,{type:"hidden"}))))})))),he.createElement(Ct.Z,{align:"middle"},he.createElement(Le.default.Item,{name:[Ci,"downcase"],valuePropName:"checked"},he.createElement(se.Z,null)),he.createElement(xt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),he.createElement(Ct.Z,{align:"middle"},he.createElement(Le.default.Item,{name:[Ci,"no_space"],valuePropName:"checked"},he.createElement(se.Z,null)),he.createElement(xt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(vn==null?void 0:vn.length)>1&&he.createElement(Ct.Z,{align:"middle",className:(vn==null?void 0:vn.length)>1?"mb30":`${mt.Z.hide}`},he.createElement(Le.default.Item,{name:De},he.createElement(ot,null)),he.createElement(xt.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")),he.createElement("div",{className:"mt30",onClick:()=>vi(!0)},he.createElement(Le.default.Item,{name:hr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},he.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ln}))))};var Dt=me(59301),Wt=Object.defineProperty,Lt=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Sn=Object.prototype.propertyIsEnumerable,Pn=(pi,ui,Ci)=>ui in pi?Wt(pi,ui,{enumerable:!0,configurable:!0,writable:!0,value:Ci}):pi[ui]=Ci,_t=(pi,ui)=>{for(var Ci in ui||(ui={}))Rt.call(ui,Ci)&&Pn(pi,Ci,ui[Ci]);if(Ke)for(var Ci of Ke(ui))Sn.call(ui,Ci)&&Pn(pi,Ci,ui[Ci]);return pi},rn=(pi,ui)=>Lt(pi,qe(ui)),ln=(pi,ui)=>{var Ci={};for(var Xi in pi)Rt.call(pi,Xi)&&ui.indexOf(Xi)<0&&(Ci[Xi]=pi[Xi]);if(pi!=null&&Ke)for(var Xi of Ke(pi))ui.indexOf(Xi)<0&&Sn.call(pi,Xi)&&(Ci[Xi]=pi[Xi]);return Ci};const Wn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},un=({value:pi,onChange:ui,form:Ci,choiceKey:Xi})=>{const Ni=(pi==null?void 0:pi.is_answer)===1,io=pi==null?void 0:pi.choice_text,hr=()=>{var De;const Ei=(De=Ci==null?void 0:Ci.getFieldValue(["sub_item_banks",...Xi]))==null?void 0:De.map(Pr=>({choice_text:Pr.choice_text,is_answer:0}));Ci==null||Ci.setFieldValue(["sub_item_banks",...Xi],Ei),ui(rn(_t({},pi),{is_answer:1}))};return Dt.createElement(Ct.Z,{className:mt.Z.choiceWrap,align:"middle",wrap:!1},Dt.createElement(xt.Z,{onClick:hr,className:`${mt.Z.choiceIndex} ${mt.Z.judgementIndex} ${Ni?mt.Z.activeAnswer:""}`},Wn[io]),Dt.createElement(xt.Z,{flex:1,className:`${mt.Z.editorWrap} ml15`},Dt.createElement("div",{className:`${mt.Z.inputBorder} ${mt.Z.placeholder} ${Ni?mt.Z.activeJudgementAnswer:""}`},io)),Dt.createElement(xt.Z,{flex:"0 0 auto",className:"ml15"},Dt.createElement("div",{onClick:hr,className:`${mt.Z.setAnswerBtn} ${Ni?mt.Z.activeAnswer:""}`},Ni?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},_n=({questionTitlePlaceholder:pi,choiceKey:ui="choices",form:Ci,titleKey:Xi="name",analysisKey:Ni="analysis"})=>{const[io,hr]=(0,We.useState)(!1);return Dt.createElement("div",{className:mt.Z.wrap},Dt.createElement("div",{className:mt.Z.questionTitleEditorWrap},Dt.createElement(Le.default.Item,{label:"\u9898\u5E72",name:Xi,labelCol:{span:24},rules:[{required:!0}]},Dt.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),Dt.createElement(Le.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Dt.createElement(Le.default.List,{name:ui,rules:[{validator(De,Ei){return Ei.some(Ln=>(Ln==null?void 0:Ln.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},De=>Dt.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},De.map(Ei=>{var Pr=Ei,{key:Ln,name:vi}=Pr,Zi=ln(Pr,["key","name"]);return Dt.createElement(Le.default.Item,rn(_t({},Zi),{key:Ln,name:vi,noStyle:!0}),Dt.createElement(un,{form:Ci,choiceKey:ui}))})))),Dt.createElement("div",{className:"mt30",onClick:()=>hr(!0)},Dt.createElement(Le.default.Item,{name:Ni,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Dt.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:io}))))};var St=me(8591),Zn=me(12563),li=me(64726),Ge=me(61485),be=Object.defineProperty,Pe=Object.defineProperties,Ae=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,Bt=(pi,ui,Ci)=>ui in pi?be(pi,ui,{enumerable:!0,configurable:!0,writable:!0,value:Ci}):pi[ui]=Ci,Qe=(pi,ui)=>{for(var Ci in ui||(ui={}))xe.call(ui,Ci)&&Bt(pi,Ci,ui[Ci]);if(Ne)for(var Ci of Ne(ui))ut.call(ui,Ci)&&Bt(pi,Ci,ui[Ci]);return pi},it=(pi,ui)=>Pe(pi,Ae(ui)),Ft=(pi,ui)=>{var Ci={};for(var Xi in pi)xe.call(pi,Xi)&&ui.indexOf(Xi)<0&&(Ci[Xi]=pi[Xi]);if(pi!=null&&Ne)for(var Xi of Ne(pi))ui.indexOf(Xi)<0&&ut.call(pi,Xi)&&(Ci[Xi]=pi[Xi]);return Ci};const Nt=pi=>{var ui=pi,{value:Ci,onChange:Xi}=ui,Ni=Ft(ui,["value","onChange"]);const io=hr=>{Xi([hr])};return We.createElement(li.Z,it(Qe({},Ni),{defaultValue:Ci==null?void 0:Ci[0],onChange:io}))},dt=pi=>{if(!pi)return!1;let ui=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 pi==="|"?(St.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Kt=({value:pi=[],onClose:ui})=>We.createElement(Zn.default,{closable:!0,onClose:ui,className:mt.Z.keywordTag},We.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},pi.join(" \u6216 "))),wn=({questionTitlePlaceholder:pi,form:ui,showKeywords:Ci,isMustKeyWords:Xi=Ci,titleKey:Ni="name",analysisKey:io="analysis",answerTexts:hr="answer_texts",keywords:De="keywords",useKeywords:Ei="use_keywords",indexs:Pr})=>{const[Ln,vi]=(0,We.useState)(!1),[Zi,er]=(0,We.useState)(""),[Gn,$t]=(0,We.useState)(!1),Gt=Le.default.useWatch("question_score",ui);return We.createElement("div",{className:mt.Z.wrap},We.createElement("div",{className:mt.Z.questionTitleEditorWrap},We.createElement(Le.default.Item,{label:"\u9898\u5E72",name:Ni,labelCol:{span:24},rules:[{required:!0}]},We.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),We.createElement(Le.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:hr,labelCol:{span:24}},We.createElement(Nt,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Ci&&!Xi&&We.createElement(Le.default.Item,{hidden:!0,name:Ei,valuePropName:"checked"},We.createElement(se.Z,{defaultChecked:!0})),Ci&&Xi&&We.createElement(Ct.Z,{align:"middle",className:"mb30"},We.createElement(Le.default.Item,{name:Ei,valuePropName:"checked"},We.createElement(se.Z,{onChange:()=>{var Zt,wt,vn,cn,It,ct;console.log(ui.getFieldsValue()),$t((vn=(wt=(Zt=ui.getFieldsValue())==null?void 0:Zt.sub_item_banks)==null?void 0:wt[Pr])==null?void 0:vn.use_keywords),console.log((ct=(It=(cn=ui.getFieldsValue())==null?void 0:cn.sub_item_banks)==null?void 0:It[Pr])==null?void 0:ct.use_keywords),console.log(Gn)}})),We.createElement(xt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),We.createElement(xt.Z,null,We.createElement(bt.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"},We.createElement(Ge.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Gn||!Xi)&&We.createElement(Le.default.List,{name:De,rules:[{validator(Zt,wt){return Xi?wt!=null&&wt.length?(wt==null?void 0:wt.reduce((cn,It)=>cn+It.score,0))>parseFloat(Gt)?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()}}]},(Zt,{add:wt,remove:vn})=>We.createElement(We.Fragment,null,We.createElement("div",{className:`${mt.Z.title} mb10`},Xi?"\u5173\u952E\u8BCD":We.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),We.createElement(Ct.Z,{align:"middle",className:"font14 mb30"},We.createElement(xt.Z,{flex:1},We.createElement(de.default,{value:Zi,onChange:cn=>{er(cn.target.value)},maxLength:50,allowClear:!0,onPressEnter:cn=>{var It,ct,an,dn;const ei=`${(It=cn.target)==null?void 0:It.value}`,pn=(an=(ct=ei==null?void 0:ei.split("|"))==null?void 0:ct.filter(Qn=>!!Qn))==null?void 0:an.map(Qn=>Qn==null?void 0:Qn.trim()),zt=ui.getFieldValue(["sub_item_banks",...De]),In=((dn=zt==null?void 0:zt.map(Qn=>Qn==null?void 0:Qn.keyword))==null?void 0:dn.flat())||[];for(const Qn of pn)if(In.includes(Qn)){St.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}dt(ei)&&(wt({keyword:pn,score:1}),er(""))},className:mt.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"})),We.createElement(xt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Zt.map(cn=>{var It=cn,{key:ct,name:an}=It,dn=Ft(It,["key","name"]);return We.createElement(Ct.Z,{key:ct,className:"mb20",style:{marginRight:148}},We.createElement(xt.Z,{flex:1},We.createElement(Ct.Z,{align:"middle",justify:"space-between"},We.createElement(Le.default.Item,it(Qe({},dn),{name:[an,"keyword"]}),We.createElement(Kt,{onClose:()=>vn(an)})),Xi&&We.createElement(Le.default.Item,it(Qe({},dn),{name:[an,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:mt.Z.blankInputNumberWrapper}),We.createElement(Ue.Z,{className:mt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),We.createElement("div",{onClick:()=>vi(!0)},We.createElement(Le.default.Item,{name:io,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},We.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ln}))))};var sn=me(59301),qt=Object.defineProperty,Rn=Object.defineProperties,Vn=Object.getOwnPropertyDescriptors,hn=Object.getOwnPropertySymbols,Yn=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable,jn=(pi,ui,Ci)=>ui in pi?qt(pi,ui,{enumerable:!0,configurable:!0,writable:!0,value:Ci}):pi[ui]=Ci,An=(pi,ui)=>{for(var Ci in ui||(ui={}))Yn.call(ui,Ci)&&jn(pi,Ci,ui[Ci]);if(hn)for(var Ci of hn(ui))mi.call(ui,Ci)&&jn(pi,Ci,ui[Ci]);return pi},wi=(pi,ui)=>Rn(pi,Vn(ui)),ji=(pi,ui)=>{var Ci={};for(var Xi in pi)Yn.call(pi,Xi)&&ui.indexOf(Xi)<0&&(Ci[Xi]=pi[Xi]);if(pi!=null&&hn)for(var Xi of hn(pi))ui.indexOf(Xi)<0&&mi.call(pi,Xi)&&(Ci[Xi]=pi[Xi]);return Ci};const{Panel:Wi}=Ve.default,dr=({questionTitlePlaceholder:pi,choiceKey:ui,form:Ci,withScore:Xi})=>{const[Ni,io]=(0,We.useState)([]),hr=De=>{io(De)};return sn.createElement("div",{className:mt.Z.wrap},sn.createElement("div",{className:mt.Z.questionTitleEditorWrap},sn.createElement(Le.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},sn.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),sn.createElement(Le.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),sn.createElement(Le.default.List,{name:"sub_item_banks",rules:[{validator(De,Ei){return Ei?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(De,{add:Ei,remove:Pr,move:Ln})=>{const vi=Ci.getFieldValue("sub_item_banks");return sn.createElement(sn.Fragment,null,sn.createElement(Ve.default,{className:De.length>0?mt.Z.collapseWrapper:"",bordered:!1,activeKey:Ni,onChange:hr,expandIcon:({isActive:Zi})=>sn.createElement("i",{className:`iconfont icon-weizhankai ${Zi?mt.Z.open:mt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},De.map((Zi,er)=>{var Gn=Zi,{key:$t,name:Gt}=Gn,Zt=ji(Gn,["key","name"]),wt,vn,cn,It,ct,an,dn,ei,pn,zt;return sn.createElement(Wi,{className:mt.Z.panel,forceRender:!0,header:sn.createElement("div",{className:mt.Z.panelHeader},"\u7B2C",er+1,"\u5C0F\u9898",sn.createElement("span",null,"\uFF08",((wt=vi==null?void 0:vi[Gt])==null?void 0:wt.item_type)=="SINGLE"?"\u5355\u9009\u9898":((vn=vi==null?void 0:vi[Gt])==null?void 0:vn.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((cn=vi==null?void 0:vi[Gt])==null?void 0:cn.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((It=vi==null?void 0:vi[Gt])==null?void 0:It.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:Gt,extra:sn.createElement(Ct.Z,{align:"middle",onClick:In=>In.stopPropagation()},Xi&&sn.createElement(xt.Z,null,sn.createElement(Le.default.Item,wi(An({},Zt),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[Gt,"question_score"],className:mt.Z.blankInputNumberWrapper}),sn.createElement(Ue.Z,{className:mt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),sn.createElement(xt.Z,null,sn.createElement(Ct.Z,{align:"middle",className:"pl40",justify:"end"},er!==0&&sn.createElement("div",{onClick:()=>{var In;Ln(er,er-1);const Qn=(In=Ci.getFieldValue("sub_item_banks"))==null?void 0:In.map((xi,tn)=>(De.map((fn,kn)=>{tn===kn&&(xi.q_position=Number(fn.name)+1)}),xi));Ci.setFieldValue("sub_item_banks",Qn)}},sn.createElement(bt.Z,{title:"\u4E0A\u79FB"},sn.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),er<De.length-1&&sn.createElement("div",{onClick:()=>{var In;Ln(er,er+1);const Qn=(In=Ci.getFieldValue("sub_item_banks"))==null?void 0:In.map((xi,tn)=>(De.map((fn,kn)=>{tn===kn&&(xi.q_position=Number(fn.name)+1)}),xi));Ci.setFieldValue("sub_item_banks",Qn)},className:er===0?"":"ml15"},sn.createElement(bt.Z,{title:"\u4E0B\u79FB"},sn.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),sn.createElement(xt.Z,null,sn.createElement(bt.Z,{title:"\u5220\u9664"},sn.createElement(Oe.Z,{className:`${mt.Z.deleteIcon} ml15`,onClick:()=>Pr(Gt)}))))},sn.createElement(Le.default.Item,wi(An({},Zt),{name:Gt}),(((ct=vi==null?void 0:vi[Gt])==null?void 0:ct.item_type)=="SINGLE"||((an=vi==null?void 0:vi[Gt])==null?void 0:an.item_type)=="MULTIPLE")&&sn.createElement(le.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((dn=vi==null?void 0:vi[Gt])==null?void 0:dn.item_type)=="MULTIPLE",form:Ci,choiceKey:[Gt,"choices"],titleKey:[Gt,"name"],analysisKey:[Gt,"analysis"],choiceOptionsPath:["sub_item_banks",Gt,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((ei=vi==null?void 0:vi[Gt])==null?void 0:ei.item_type)=="COMPLETION"&&sn.createElement(Pt,{form:Ci,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:Gt,titleKey:[Gt,"name"],analysisKey:[Gt,"analysis"],isOrdered:[Gt,"is_ordered"],answerKey:[Gt,"standard_answers"]}),((pn=vi==null?void 0:vi[Gt])==null?void 0:pn.item_type)=="JUDGMENT"&&sn.createElement(_n,{form:Ci,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Gt,"name"],analysisKey:[Gt,"analysis"],choiceKey:[Gt,"choices"]}),((zt=vi==null?void 0:vi[Gt])==null?void 0:zt.item_type)=="SUBJECTIVE"&&sn.createElement(wn,{showKeywords:!0,isMustKeyWords:!1,form:Ci,titleKey:[Gt,"name"],analysisKey:[Gt,"analysis"],answerTexts:[Gt,"answer_texts"],useKeywords:[Gt,"use_keywords"],keywords:[Gt,"keywords"],indexs:Gt,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),De.length<20&&sn.createElement(at.Z,{menu:{items:[{label:sn.createElement("div",{onClick:()=>{Ei({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),io([De==null?void 0:De.length,...Ni])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:sn.createElement("div",{onClick:()=>{Ei({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),io([De==null?void 0:De.length,...Ni])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:sn.createElement("div",{onClick:()=>{Ei({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),io([De==null?void 0:De.length,...Ni])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:sn.createElement("div",{onClick:()=>{Ei({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),io([De==null?void 0:De.length,...Ni])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:sn.createElement("div",{onClick:()=>{Ei({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),io([De==null?void 0:De.length,...Ni])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(Zi=>Zi.show).map(Zi=>({label:Zi.label,key:Zi.key}))}},sn.createElement("div",{className:`${mt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var Mr=me(32285)},99325:function(Tn,xn,me){"use strict";me.d(xn,{z:function(){return je},Z:function(){return _e}});var le=me(59301),Te=me(2878),He=me(85187),lt=me(64018),We=me(40846),Ve=me(38446),Le=me(88230),Ct=me(15342),xt=me(1012),Ue=me(90853),bt=me(59301),mt=({html:Je})=>{const Xe=(0,le.useRef)(null),ht=(0,le.useRef)(null),Ze=`.markdown-body p {
|
|
|
margin: 0 0 16px 0 !important;
|
|
|
line-height: 28px;
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
li {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
dl {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
|
|
|
.markdown-body {
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
color: #333;
|
|
|
overflow: hidden;
|
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
|
word-break: break-word;
|
|
|
font-size: 16px;
|
|
|
line-height: 1.6;
|
|
|
white-space: normal;
|
|
|
word-wrap: break-word;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul>li {
|
|
|
list-style-type: disc;
|
|
|
}
|
|
|
|
|
|
.markdown-body ol>li {
|
|
|
list-style-type: decimal;
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:active,
|
|
|
.markdown-body a:hover {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body strong {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 2em;
|
|
|
margin: 0.67em 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
-moz-box-sizing: content-box;
|
|
|
box-sizing: content-box;
|
|
|
height: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
.markdown-body code,
|
|
|
.markdown-body kbd,
|
|
|
.markdown-body pre {
|
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
color: inherit;
|
|
|
font: inherit;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body html input[disabled] {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
line-height: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
border-collapse: collapse;
|
|
|
border-spacing: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body td,
|
|
|
.markdown-body th {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body * {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
color: #4183c4;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:hover,
|
|
|
.markdown-body a:active {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
height: 0;
|
|
|
margin: 15px 0;
|
|
|
overflow: hidden;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:before {
|
|
|
display: table;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:after {
|
|
|
display: table;
|
|
|
clear: both;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
margin-top: 15px;
|
|
|
margin-bottom: 15px;
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
font-size: 21px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 11px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding: 0;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
ul.linenums,
|
|
|
ol.linenums {
|
|
|
padding: 16px 0 0 36px !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding-left: 2em;
|
|
|
}
|
|
|
|
|
|
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ul ol {
|
|
|
list-style-type: lower-roman;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul ol,
|
|
|
.markdown-body ul ol ol,
|
|
|
.markdown-body ol ul ol,
|
|
|
.markdown-body ol ol ol {
|
|
|
list-style-type: lower-alpha;
|
|
|
}
|
|
|
|
|
|
.markdown-body dd {
|
|
|
margin-left: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon {
|
|
|
font: normal normal 16px octicons-anchor;
|
|
|
line-height: 1;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon-link:before {
|
|
|
content: '\f05c';
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:first-child {
|
|
|
margin-top: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:last-child {
|
|
|
margin-bottom: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
display: block;
|
|
|
padding-right: 6px;
|
|
|
padding-left: 30px;
|
|
|
margin-left: -30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor:focus {
|
|
|
outline: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
position: relative;
|
|
|
margin-top: 1em;
|
|
|
margin-bottom: 16px;
|
|
|
font-weight: bold;
|
|
|
line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
|
.markdown-body h2 .octicon-link,
|
|
|
.markdown-body h3 .octicon-link,
|
|
|
.markdown-body h4 .octicon-link,
|
|
|
.markdown-body h5 .octicon-link,
|
|
|
.markdown-body h6 .octicon-link {
|
|
|
display: none;
|
|
|
color: #000;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
|
.markdown-body h2:hover .anchor,
|
|
|
.markdown-body h3:hover .anchor,
|
|
|
.markdown-body h4:hover .anchor,
|
|
|
.markdown-body h5:hover .anchor,
|
|
|
.markdown-body h6:hover .anchor {
|
|
|
padding-left: 8px;
|
|
|
margin-left: -30px;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 2.25em;
|
|
|
line-height: 1.2;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 1.75em;
|
|
|
line-height: 1.225;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 1.5em;
|
|
|
line-height: 1.43;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 1.25em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 1em;
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul,
|
|
|
.markdown-body ul ol,
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ol ul {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body li>p {
|
|
|
margin-top: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dt {
|
|
|
padding: 0;
|
|
|
margin-top: 16px;
|
|
|
font-size: 1em;
|
|
|
font-style: italic;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dd {
|
|
|
padding: 0 16px;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
padding: 0 15px;
|
|
|
color: #777;
|
|
|
border-left: 4px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
overflow: auto;
|
|
|
word-break: normal;
|
|
|
word-break: keep-all;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th {
|
|
|
font-weight: bold;
|
|
|
text-align: revert;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th,
|
|
|
.markdown-body table td {
|
|
|
padding: 6px 13px;
|
|
|
border: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr {
|
|
|
background-color: #fff;
|
|
|
border-top: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
|
background-color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
max-width: 100%;
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
padding: 0;
|
|
|
padding-top: 0.2em;
|
|
|
padding-bottom: 0.2em;
|
|
|
margin: 0;
|
|
|
font-size: 85%;
|
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:has(.katex) {
|
|
|
background-color: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:before,
|
|
|
.markdown-body code:after {
|
|
|
letter-spacing: -0.2em;
|
|
|
content: "\\00a0";
|
|
|
}
|
|
|
|
|
|
.markdown-body pre>code {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
font-size: 100%;
|
|
|
word-break: normal;
|
|
|
white-space: pre;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight {
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre,
|
|
|
.markdown-body pre {
|
|
|
padding: 16px;
|
|
|
overflow: auto;
|
|
|
font-size: 85%;
|
|
|
line-height: 1.45;
|
|
|
background-color: #f7f7f7;
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre {
|
|
|
margin-bottom: 0;
|
|
|
word-break: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
word-wrap: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code {
|
|
|
display: inline;
|
|
|
max-width: initial;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
overflow: initial;
|
|
|
line-height: inherit;
|
|
|
word-wrap: normal;
|
|
|
background-color: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code:before,
|
|
|
.markdown-body pre code:after {
|
|
|
content: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font-size: 11px;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c {
|
|
|
color: #969896;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c1,
|
|
|
.markdown-body .pl-mdh,
|
|
|
.markdown-body .pl-mm,
|
|
|
.markdown-body .pl-mp,
|
|
|
.markdown-body .pl-mr,
|
|
|
.markdown-body .pl-s1 .pl-v,
|
|
|
.markdown-body .pl-s3,
|
|
|
.markdown-body .pl-sc,
|
|
|
.markdown-body .pl-sv {
|
|
|
color: #0086b3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-e,
|
|
|
.markdown-body .pl-en {
|
|
|
color: #795da3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
|
.markdown-body .pl-smi,
|
|
|
.markdown-body .pl-smp,
|
|
|
.markdown-body .pl-stj,
|
|
|
.markdown-body .pl-vo,
|
|
|
.markdown-body .pl-vpf {
|
|
|
color: #333;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ent {
|
|
|
color: #63a35c;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-k,
|
|
|
.markdown-body .pl-s,
|
|
|
.markdown-body .pl-st {
|
|
|
color: #a71d5d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-pds,
|
|
|
.markdown-body .pl-s1,
|
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
|
.markdown-body .pl-sr,
|
|
|
.markdown-body .pl-sr .pl-cce,
|
|
|
.markdown-body .pl-sr .pl-sra,
|
|
|
.markdown-body .pl-sr .pl-sre,
|
|
|
.markdown-body .pl-src {
|
|
|
color: #df5000;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mo,
|
|
|
.markdown-body .pl-v {
|
|
|
color: #1d3e81;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-id {
|
|
|
color: #b52a1d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ii {
|
|
|
background-color: #b52a1d;
|
|
|
color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
|
color: #63a35c;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ml {
|
|
|
color: #693a17;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mh,
|
|
|
.markdown-body .pl-mh .pl-en,
|
|
|
.markdown-body .pl-ms {
|
|
|
color: #1d3e81;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mq {
|
|
|
color: #008080;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mi {
|
|
|
color: #333;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mb {
|
|
|
color: #333;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-md,
|
|
|
.markdown-body .pl-mdhf {
|
|
|
background-color: #ffecec;
|
|
|
color: #bd2c00;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdht,
|
|
|
.markdown-body .pl-mi1 {
|
|
|
background-color: #eaffea;
|
|
|
color: #55a532;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdr {
|
|
|
color: #795da3;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item {
|
|
|
list-style-type: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item input {
|
|
|
float: left;
|
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
|
z-index: 1;
|
|
|
position: relative;
|
|
|
border-color: #4183c4;
|
|
|
}
|
|
|
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
|
.pln {
|
|
|
color: #000
|
|
|
}
|
|
|
|
|
|
/* plain text */
|
|
|
|
|
|
@media screen {
|
|
|
.str {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* string content */
|
|
|
.kwd {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a keyword */
|
|
|
.com {
|
|
|
color: #800
|
|
|
}
|
|
|
|
|
|
/* a comment */
|
|
|
.typ {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a type name */
|
|
|
.lit {
|
|
|
color: #066
|
|
|
}
|
|
|
|
|
|
/* a literal value */
|
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #660
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a markup tag name */
|
|
|
.atn {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a markup attribute name */
|
|
|
.atv {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* a markup attribute value */
|
|
|
.dec,
|
|
|
.var {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a declaration; a variable name */
|
|
|
.fun {
|
|
|
color: red
|
|
|
}
|
|
|
|
|
|
/* a function name */
|
|
|
}
|
|
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
|
@media print,
|
|
|
projection {
|
|
|
.str {
|
|
|
color: #060
|
|
|
}
|
|
|
|
|
|
.kwd {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.com {
|
|
|
color: #600;
|
|
|
font-style: italic
|
|
|
}
|
|
|
|
|
|
.typ {
|
|
|
color: #404;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.lit {
|
|
|
color: #044
|
|
|
}
|
|
|
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #440
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.atn {
|
|
|
color: #404
|
|
|
}
|
|
|
|
|
|
.atv {
|
|
|
color: #060
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
|
pre.prettyprint {
|
|
|
padding: 2px;
|
|
|
/* border: 1px solid #888 */
|
|
|
}
|
|
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
|
ol.linenums {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0
|
|
|
}
|
|
|
|
|
|
/* IE indents via margin-left */
|
|
|
li.L0,
|
|
|
li.L1,
|
|
|
li.L2,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L6,
|
|
|
li.L7,
|
|
|
li.L8 {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
/* Alternate shading for lines */
|
|
|
li.L1,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L7,
|
|
|
li.L9 {
|
|
|
background: #eee
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}`;return(0,le.useEffect)(()=>{const Mt=Xe.current.attachShadow({mode:"open"});ht.current=document.createElement("div"),ht.current.className="markdown-body",ht.current.innerHTML=Je,Mt.appendChild(ht.current);const ot=document.createElement("style");return ot.textContent=Ze,Mt.appendChild(ot),()=>{Mt.innerHTML=""}},[]),(0,le.useEffect)(()=>{ht.current&&(ht.current.innerHTML=Je)},[Je]),bt.createElement("div",{ref:Xe})},Oe=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,se=(Je,Xe,ht)=>Xe in Je?Oe(Je,Xe,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Je[Xe]=ht,he=(Je,Xe)=>{for(var ht in Xe||(Xe={}))ee.call(Xe,ht)&&se(Je,ht,Xe[ht]);if(te)for(var ht of te(Xe))de.call(Xe,ht)&&se(Je,ht,Xe[ht]);return Je};const ve="@\u2581\u2581@",Ee="@\u2581@",Me=/<pre[^>]*>/g;function Be(Je){let Xe=document.createElement("div");return Xe.innerHTML=Je,Xe.childNodes.length===0?"":Xe.childNodes[0].nodeValue}const je=(Je,Xe)=>{Je=Je||"";const ht=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ze=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Mt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,ot=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Xe?Je.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ht,(Ot,Pt,Dt,Wt,Lt,qe,Ke)=>{const Rt=Pt||Wt||qe,Sn=Dt||Lt||Ke||"?";return Ve.Z.API_SERVER+"/api/attachments/"+Rt+Sn+"&t="+(0,Le.Jn)(Rt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Je=Je.replace(ot,(Ot,Pt,Dt,Wt,Lt,qe,Ke)=>{const Rt=Pt||Wt||qe,Sn=Dt||Lt||Ke||"?";return Ve.Z.API_SERVER+"/attachments/download/"+Rt+Sn+"&t="+(0,Le.Jn)(Rt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replace(ht,(Ot,Pt,Dt,Wt,Lt,qe,Ke)=>{const Rt=Pt||Wt||qe,Sn=Dt||Lt||Ke||"?";return Ve.Z.API_SERVER+"/api/attachments/"+Rt+Sn+"&t="+(0,Le.Jn)(Rt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replace(Ze,(Ot,Pt,Dt,Wt,Lt)=>{const qe=Pt||Wt,Ke=Dt||Lt||"";return'"'+Ve.Z.API_SERVER+"/api/attachments/"+qe+Ke+qe+Ke+"&t="+(0,Le.Jn)(qe,Date.now())}).replace(Mt,(Ot,Pt,Dt,Wt,Lt)=>{const qe=Pt||Wt,Ke=Dt||Lt||"";return"("+Ve.Z.API_SERVER+"/files/uploads/"+qe+Ke+qe+Ke+"&t="+(0,Le.Jn)(qe,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`),Je)};var _e=({value:Je="",className:Xe,showTextOnly:ht,showLines:Ze,style:Mt={},stylesPrev:ot={},highlightKeywords:Ot,showProgramFill:Pt,isProgramFill:Dt,disabledFill:Wt=!1,programFillValue:Lt,onFillChange:qe=Sn=>{},onFillBlur:Ke=()=>{},onFillFocus:Rt=()=>{}})=>{let Sn=String(Je);const[Pn,_t]=(0,le.useState)(""),[rn,ln]=(0,le.useState)("office"),[Wn,un]=(0,le.useState)([]),_n=(0,le.useRef)("a"+(0,xt.Z)()),St={},Zn=(Ft,Nt,dt)=>{const Kt=document.createElement(Ft===Ee?"input":"textarea");Kt.style.width="100%",Kt.style.height=Ft===Ee?"40px":"151px",Kt.rows=5,Kt.spellcheck=!1,Kt.name="edu-program-fill",Kt.placeholder="\u8BF7\u8F93\u5165",Kt.dataset.id=Nt;const wn=Object.keys(St).length;return St[wn]=Kt,`<span class="edu-program-fill-wrap ${Ft===Ee?"":"show"}" style="width:${Ft===Ee?"400px":"100%"}" title=${dt||""}><span>${Kt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function li(Ft){return Ft=Ft.replace(/!\[.*?\]\(.*?\)/g,""),Ft=Ft.replace(/\[.*?\]\(.*?\)/g,""),Ft=Ft.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ft=Ft.replace(/<embed.*?>/g,""),Ft=Ft.replace(/<img.*?>/g,""),Ft=Ft.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ft=Ft.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ft=Ft.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ft=Ft.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ft}const Ge=Ft=>Ft.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Nt,dt){let Kt=dt.replace(/(\n|\r)/g,"").split("}"),wn=[];return Kt.map(sn=>{sn!=""&&wn.push(`.${_n.current} ${sn}`)}),`<style>${wn.join("}")}</style>`}),be=(0,le.useMemo)(()=>{try{const Kt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,wn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,sn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,qt=/\(\/attachments\/download\//g;Sn=Sn.replace(qt,"("+Ve.Z.API_SERVER+"/attachments/download/").replace(Kt,"("+Ve.Z.API_SERVER+"/api/attachments/").replace(wn,'"'+Ve.Z.API_SERVER+"/api/attachments/").replace(sn,'"'+Ve.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
|
`)}catch(Kt){}if(Pt){let Kt=-1;return Sn=Sn.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(wn,sn,qt){var Rn;return++Kt,Zn(wn,Kt,(Rn=Lt==null?void 0:Lt[Kt])==null?void 0:Rn.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Ge(Sn||"")}</pre>`}let Ft=Ge(Sn);Ft=(0,He.ZP)(Ft);const Nt=(0,He.ez)();Sn.match(/\[TOC\]/)&&(Ft=Ft.replace("<p>[TOC]</p>",(0,He.Qv)()),(0,He.Iy)()),Ft=Ft.replace(/(__special_katext_id_\d+__)/g,(Kt,wn)=>{const{type:sn,expression:qt}=Nt[wn];return(0,Ct.renderToString)(Be(qt)||"",{displayMode:sn==="block",throwOnError:!1,output:"html"})}),Ft=Ft.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,He.AL)();const dt=document.createElement("div");if(dt.innerHTML=Ft,ht)return dt.innerText;if(Ot){const Kt=Ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return xe(dt,Kt),dt.innerHTML}return setTimeout(()=>Qe(),500),dt.innerHTML},[Sn,Ot]);(0,le.useEffect)(()=>{ut.current&&ut.current.querySelectorAll(["input","textarea"]).forEach(Nt=>{Nt.oninput=Pe,Nt.onblur=Ae,Nt.onfocus=Ne})},[Wn]),(0,le.useEffect)(()=>{var Ft,Nt,dt,Kt,wn;if(Lt!=null&&Lt.length)try{const sn=ut.current.querySelectorAll(".edu-program-fill-score"),qt=ut.current.querySelectorAll('[name="edu-program-fill"]');for(const[Rn,Vn]of qt.entries())Vn.value=((Ft=Lt==null?void 0:Lt[Rn])==null?void 0:Ft.value)||"",((Nt=Lt==null?void 0:Lt[Rn])==null?void 0:Nt.type)==="warning"?Vn.className="program-fill-warning":((dt=Lt==null?void 0:Lt[Rn])==null?void 0:dt.type)==="success"?Vn.className="program-fill-success":Vn.className="";for(const[Rn,Vn]of sn.entries())Vn.innerHTML=(Kt=Lt==null?void 0:Lt[Rn])!=null&&Kt.score?`${(wn=Lt==null?void 0:Lt[Rn])==null?void 0:wn.score}\u5206`:"";un(Lt)}catch(sn){console.log(sn,"error")}},[Lt]);const Pe=Ft=>{Wn[Ft.target.dataset.id]=Wn[Ft.target.dataset.id]||{},Wn[Ft.target.dataset.id].value=Ft.target.value,un([...Wn]),qe(Wn,Ft.target.dataset.id)},Ae=Ft=>{Wn[Ft.target.dataset.id]=Wn[Ft.target.dataset.id]||{},Wn[Ft.target.dataset.id].value=Ft.target.value,un([...Wn]),Ke(Wn,Ft.target.dataset.id)},Ne=Ft=>{Wn[Ft.target.dataset.id]=Wn[Ft.target.dataset.id]||{},Wn[Ft.target.dataset.id].value=Ft.target.value,un([...Wn]),Rt(Wn,Ft.target.dataset.id)};function xe(Ft,Nt){return Ft.childNodes.forEach(dt=>{var Kt;if(dt.childNodes.length>0)xe(dt,Nt);else if(dt.nodeName!=="IMG")if(dt.innerHTML)dt.innerHTML=(Kt=dt.innerHTML)==null?void 0:Kt.replace(new RegExp(Nt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const wn=document.createElement("span");wn.innerHTML=dt.textContent.replace(new RegExp(Nt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),dt.replaceWith(wn)}})}const ut=(0,le.useRef)();He.jb.WebkitLineClamp=Ze,Ze&&(Mt=he(he({},Mt),He.jb));function Bt(Ft){let Nt=Ft.target;if(Nt.tagName.toUpperCase()==="A"){let dt=Nt.getAttribute("href");if(dt.indexOf("office")>-1)Ft.preventDefault(),_t(dt),ln("office");else if(dt.indexOf("application/pdf")>-1)Ft.preventDefault(),_t(dt),ln("pdf");else if(dt.indexOf("text/html")>-1)Ft.preventDefault(),_t(dt),ln("html");else if(dt.startsWith("#")){Ft.preventDefault();let Kt=document.getElementById(dt.replace("#",""));Kt&&Kt.scrollIntoView(!0)}}}const Qe=()=>{var Ft;const Nt=(Ft=ut.current)==null?void 0:Ft.querySelectorAll("video");Nt==null||Nt.forEach(dt=>{if(dt.oncontextmenu=()=>!1,dt.src.indexOf(".m3u8")>-1&&!dt.canPlayType("application/vnd.apple.mpegurl")){if(We.ZP.isSupported()){var Kt=new We.ZP;Kt.loadSource(dt.src),Kt.attachMedia(dt)}}})};(0,le.useEffect)(()=>{if(ut.current&&be&&be.match(Me)&&window.PR.prettyPrint(),ut.current)return ut.current.addEventListener("click",Bt),()=>{var Ft;(Ft=ut.current)==null||Ft.removeEventListener("click",Bt),(0,He.AL)(),(0,He.Iy)()}},[be,ut.current,Bt]),(0,le.useEffect)(()=>{var Ft;const Nt=dt=>{dt.preventDefault(),dt.clipboardData.setData("text",window.getSelection().toString())};return(Ft=ut.current)==null||Ft.addEventListener("copy",Nt),()=>{var dt;(dt=ut.current)==null||dt.removeEventListener("copy",Nt)}},[ut.current]);const it=Ft=>/<style[\s\S]*?>/i.test(Ft||"");return le.createElement(le.Fragment,null,ht&&le.createElement("div",{ref:ut},be),!ht&&!it(be)&&le.createElement("div",{ref:ut,style:he({},Mt),className:`${Xe||""} ${Wt?"disabled-fill":""} markdown-body ${_n.current}`,dangerouslySetInnerHTML:{__html:be}}),!ht&&it(be)&&le.createElement(mt,{html:be}),le.createElement(Ue.Z,{close:!0,data:Pn,type:Pn!=null&&Pn.length?rn:"",style:he({},ot),onClose:()=>_t("")}))}},65532:function(Tn,xn,me){"use strict";me.d(xn,{C:function(){return Pt}});var le=me(59301),Te={recalculation:"recalculation____i9AE",tips:"tips___GoMu8",filter:"filter___Vx7VO",input:"input___OEMMv",operating:"operating___TS9iA",operatingItem:"operatingItem___AT84q"},He=me(92310),lt=me.n(He),We=me(24905),Ve=me(95237),Le=me(8591),Ct=me(6848),xt=me(3113),Ue=me(43418),bt=me(1710),at=me(5871),mt=me(78241),Oe=me(71418),te=me(88230),ee=me(7660),de=me(73898),se=me(95750),he=me(15965),ve=Object.defineProperty,Ee=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Je=(Dt,Wt,Lt)=>Wt in Dt?ve(Dt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):Dt[Wt]=Lt,Xe=(Dt,Wt)=>{for(var Lt in Wt||(Wt={}))je.call(Wt,Lt)&&Je(Dt,Lt,Wt[Lt]);if(Be)for(var Lt of Be(Wt))_e.call(Wt,Lt)&&Je(Dt,Lt,Wt[Lt]);return Dt},ht=(Dt,Wt)=>Ee(Dt,Me(Wt)),Ze=(Dt,Wt,Lt)=>new Promise((qe,Ke)=>{var Rt=_t=>{try{Pn(Lt.next(_t))}catch(rn){Ke(rn)}},Sn=_t=>{try{Pn(Lt.throw(_t))}catch(rn){Ke(rn)}},Pn=_t=>_t.done?qe(_t.value):Promise.resolve(_t.value).then(Rt,Sn);Pn((Lt=Lt.apply(Dt,Wt)).next())});const Mt=We.default.Group,ot=({className:Dt,title:Wt,items:Lt=[],value:qe,onChange:Ke})=>{const Rt=(Lt==null?void 0:Lt.length)===(qe==null?void 0:qe.length),Sn=(qe==null?void 0:qe.length)>0&&(qe==null?void 0:qe.length)<(Lt==null?void 0:Lt.length),Pn=_t=>{const rn=Lt.map(ln=>ln.id);Ke(_t.target.checked?rn:[])};return le.createElement(Ve.Z,{align:"middle",className:Dt},!!Wt&&le.createElement("div",{className:"mr20",style:{color:"#5F6368"}},Wt),le.createElement(We.default,{indeterminate:Sn,onChange:Pn,checked:Rt},"\u5168\u90E8"),le.createElement(Mt,{value:qe,onChange:Ke},Lt.map(_t=>le.createElement(We.default,{className:"ml30 c-black",key:_t.id,value:_t.id},_t.name,le.createElement("span",null,`(${_t.count})`)))))};var Pt=({className:Dt,style:Wt,dataSource:Lt})=>{var qe,Ke,Rt,Sn,Pn,_t,rn;const[ln,Wn]=(0,le.useState)({}),[un,_n]=(0,le.useState)(!0),[St,Zn]=(0,le.useState)(!1),[li,Ge]=(0,le.useState)(!1),[be,Pe]=(0,le.useState)(null),[Ae,Ne]=(0,le.useState)(0),[xe,ut]=(0,le.useState)({}),[Bt,Qe]=(0,le.useState)(!0),[it,Ft]=(0,le.useState)(0),[Nt,dt]=(0,le.useState)(0),[Kt,wn]=(0,le.useState)(!1),sn=(0,le.useRef)(null),[qt,Rn]=(0,le.useState)(!1),[Vn,hn]=(0,le.useState)(!0),[Yn,mi]=(0,le.useState)([]),jn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[An,wi]=(0,le.useState)(Xe({},jn));(0,le.useEffect)(()=>{Lt!=null&&Lt.question_id&&Wn(Lt)},[Lt==null?void 0:Lt.question_id]),(0,le.useEffect)(()=>{var Ei;if(((Ei=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ei.status)==="running"){const Pr=setInterval(()=>{dr()},3e3);return()=>clearInterval(Pr)}},[(qe=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:qe.status]),(0,le.useEffect)(()=>{var Ei;li&&(li===1&&(An.question_status=Mr.map(Pr=>Pr.value),An.review=pi.map(Pr=>Pr.value)),li===2&&(An.exercise_question_resubmit_id=(Ei=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ei.id,be===1&&(An.success_status=[1]),be===2&&(An.success_status=[0])),wi(Xe({},An)),ji(An),dt(ln!=null&&ln.is_mirror?3:10),Ft(ln!=null&&ln.is_mirror?1:5))},[li]),(0,le.useEffect)(()=>{qt&&Wi()},[qt]);const ji=Ei=>Ze(void 0,null,function*(){_n(!0);const Pr=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_student_list.json`,{method:"get",params:Ei});(Pr==null?void 0:Pr.status)==0&&(ut(Pr||[]),Ne(Pr==null?void 0:Pr.count)),_n(!1)}),Wi=()=>Ze(void 0,null,function*(){hn(!0);const Ei=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_history.json`,{method:"get"});(Ei==null?void 0:Ei.status)==0&&mi((Ei==null?void 0:Ei.data)||[]),hn(!1)}),dr=()=>Ze(void 0,null,function*(){const Ei=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_status.json`,{method:"get"});(Ei==null?void 0:Ei.status)==0&&Wn(ht(Xe({},ln),{show_resubmit_history:!0,exercise_question_resubmit:(Ei==null?void 0:Ei.data)||{}}))}),Mr=[{label:"\u672A\u8BC4\u6D4B",value:2,color:"#9096A3"},{label:"\u672A\u901A\u5173",value:0,color:"#E30000"},{label:"\u5DF2\u901A\u5173",value:1,color:"#00B187"}],pi=[{label:"\u672A\u8BC4\u9605",value:0,color:"#9096A3"},{label:"\u8BC4\u9605\u4E2D",value:2,color:"#FF9D18"},{label:"\u5DF2\u8BC4\u9605",value:1,color:"#3061D0"}],ui=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],Ci=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(Ei,Pr,Ln)=>le.createElement("span",{className:"c-black"},Ln+1+(An.page-1)*An.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:Ei=>le.createElement("span",{className:"c-black"},Ei)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:Ei=>le.createElement("span",{className:"c-grey-666"},Ei||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:Ei=>le.createElement("span",{className:"c-black"},Ei)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:Ei=>{const{label:Pr,color:Ln}=Mr.find(vi=>vi.value===Ei)||{};return le.createElement("span",{style:{color:Ln}},Pr)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:Ei=>le.createElement("span",{className:"c-black"},Ei)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:Ei=>le.createElement("span",{className:"c-black"},Ei)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:Ei=>{const{label:Pr,color:Ln}=pi.find(vi=>vi.value===Ei)||{};return le.createElement("span",{style:{color:Ln}},Pr)}},li===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:Ei=>{const{label:Pr,color:Ln}=ui.find(vi=>vi.value===Ei)||{};return le.createElement("span",{style:{color:Ln}},Pr)}}].filter(Boolean),Xi=(Ei,Pr,Ln)=>{An.page=Ei==null?void 0:Ei.current,An.per_page=Ei==null?void 0:Ei.pageSize,Ln!=null&&Ln.order?(An.sort_by=Ln==null?void 0:Ln.field,An.direction=(Ln==null?void 0:Ln.order)==="ascend"?"asc":"desc"):(An.sort_by=null,An.direction=null),wi(Xe({},An)),ji(An)},Ni=()=>{if(!it){Le.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}wn(!0)},io=()=>Ze(void 0,null,function*(){var Ei,Pr;if((Ei=sn.current)!=null&&Ei.onVerify())return;Zn(!0);const Ln=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit.json`,{method:"post",body:{keyword:An.keyword,question_status:An.question_status,review:An.review_status,success_status:An.success_status,use_max_score:Bt,permits:it,exercise_question_resubmit_id:li===1?null:(Pr=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Pr.id}});(Ln==null?void 0:Ln.status)==0&&(yield dr(),Le.ZP.success("\u64CD\u4F5C\u6210\u529F"),wn(!1),Ge(!1)),Zn(!1)}),hr=(Ei,Pr)=>{An.page=1,An[Pr]=Ei,wi(Xe({},An)),ji(An)},De=["","\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 le.createElement(le.Fragment,null,le.createElement("div",{className:lt()(Te.recalculation,Dt),style:Wt},le.createElement(Ct.Z,{title:De[(ln==null?void 0:ln.disable_resubmit_reason)||0]},le.createElement(xt.ZP,{disabled:(ln==null?void 0:ln.disable_resubmit)||((Ke=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ke.status)==="running",onClick:()=>Ge(1),icon:le.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(ln==null?void 0:ln.show_resubmit_history)&&le.createElement(le.Fragment,null,((Rt=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Rt.status)==="running"?le.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",le.createElement("span",{className:"c-light-primary ml3"},(Sn=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Sn.rate)):le.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{onClick:()=>{Ge(2),Pe(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(Pn=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Pn.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{onClick:()=>{Ge(2),Pe(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(_t=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:_t.fail_count),"\u4EBA"),le.createElement(Ct.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},le.createElement("i",{onClick:()=>Rn(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),le.createElement(Ue.default,{centered:!0,open:!!li,title:`\u91CD\u65B0\u8BC4\u6D4B${li===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>Ge(!1),onOk:Ni,afterClose:()=>{Qe(!0),Pe(null),wi(Xe({},jn))}},le.createElement("div",{className:Te.filter},li===1&&le.createElement(le.Fragment,null,le.createElement("div",{className:Te.tips},le.createElement("div",{className:"mb5",style:{color:"#FF9D18"}},le.createElement("i",{className:"iconfont icon-tishi9 mr10 font14"}),"\u6E29\u99A8\u63D0\u793A"),le.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"),le.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"),le.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")),le.createElement(ot,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:(xe==null?void 0:xe.question_status)||[],value:An.question_status,onChange:Ei=>hr(Ei,"question_status")}),le.createElement(ot,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:(xe==null?void 0:xe.review_status)||[],value:An.review,onChange:Ei=>hr(Ei,"review")})),li===2&&le.createElement(le.Fragment,null,le.createElement(ot,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:(xe==null?void 0:xe.success_status)||[],value:An.success_status,onChange:Ei=>hr(Ei,"success_status")})),le.createElement(he.t7,{className:Te.input,style:{bottom:li===1?10:-5},value:An.keyword,onChange:Ei=>hr(Ei,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),le.createElement(bt.default,{className:"mt20",columns:Ci,scroll:((rn=xe==null?void 0:xe.data)==null?void 0:rn.length)>7?{y:300}:{},dataSource:(xe==null?void 0:xe.data)||[],loading:un,onChange:Xi,pagination:{total:Ae,pageSize:An.per_page,current:An.page,hideOnSinglePage:!Ae,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:te.rU}}),le.createElement(Ve.Z,{justify:"space-between",align:"middle",className:"mt10"},le.createElement(We.default,{className:"c-black",checked:Bt,onChange:Ei=>Qe(Ei.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,de.Ny)()&&le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",le.createElement(at.Z,{className:"ml10 mr10",value:it,max:Nt,min:1,precision:0,onChange:Ei=>Ft(Ei)}),"\u4EBA",le.createElement(Ct.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"},le.createElement("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"}))))),le.createElement(Ue.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:Kt,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:St,destroyOnClose:!0,onOk:io,onCancel:()=>wn(!1)},le.createElement(mt.default.Item,{className:"mb0",colon:!1,label:"\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},le.createElement(se.Z,{ref:Ei=>sn.current=Ei}))),le.createElement(Ue.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:qt,width:710,onCancel:()=>Rn(!1),footer:null},le.createElement(Oe.Z,{spinning:Vn},le.createElement("div",{className:Te.operating},Yn.map((Ei,Pr)=>le.createElement("div",{key:Pr,className:Te.operatingItem},le.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},Ei==null?void 0:Ei.created_at),le.createElement("div",{className:"c-black"},Ei==null?void 0:Ei.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(Ei==null?void 0:Ei.status)==="running"?le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",le.createElement("span",{className:"c-light-primary ml3"},Ei==null?void 0:Ei.rate)):le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},Ei==null?void 0:Ei.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},Ei==null?void 0:Ei.fail_count),"\u4EBA")))),le.createElement("div",{style:{height:20}}))))}},20527:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(59301),Te={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"},He=me(43418),lt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",We="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",Ve=(xt,Ue,bt)=>new Promise((at,mt)=>{var Oe=de=>{try{ee(bt.next(de))}catch(se){mt(se)}},te=de=>{try{ee(bt.throw(de))}catch(se){mt(se)}},ee=de=>de.done?at(de.value):Promise.resolve(de.value).then(Oe,te);ee((bt=bt.apply(xt,Ue)).next())}),Ct=({type:xt,resdata:Ue,onok:bt,oktext:at,okloading:mt})=>{const[Oe,te]=(0,le.useState)(!1),{can_copy_list:ee,can_copy_num:de,challenge_type:se,course_data_list:he,no_copy_list:ve,no_copy_num:Ee,no_use_list:Me,no_use_num:Be,repeat_shixun_num:je,student_count:_e,total_num:Je,use_num:Xe}=Ue;let ht=de>0||xt==="exercise";(0,le.useEffect)(()=>{(Ue==null?void 0:Ue.student_count)>0&&te(!0)},[Ue]),console.log("---11",mt),(0,le.useEffect)(()=>{mt||te(!1)},[mt]);const Ze=()=>{if(xt==="exercise"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},_e),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Xe),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Te.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(xt==="exercise"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},_e),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Xe),"\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",le.createElement("span",{className:Te.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(xt==="shixun"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},_e),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Te.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(xt==="shixun"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},_e),"\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",le.createElement("span",{className:Te.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(xt==="subject"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},_e),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Xe),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Te.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(xt==="subject"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",le.createElement("span",{className:Te.orangeColor},_e)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",le.createElement("span",{className:Te.orangeColor},Xe)," \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",le.createElement("span",{className:Te.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(xt==="exercisepush")return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},_e),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Xe),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",le.createElement("span",{className:Te.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(xt==="shixunpush"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},_e),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Xe),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Te.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(xt==="shixunpush"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},_e),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",le.createElement("span",{className:Te.orangeColor},Xe),"\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",le.createElement("span",{className:Te.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},Mt=()=>{if(xt==="exercise"||xt==="subject"||xt==="exercisepush"||xt==="shixunpush")return le.createElement("div",{style:{marginTop:20}},Ee>0&&le.createElement("div",null,le.createElement("span",{className:Te.flex},le.createElement("img",{src:We,style:{width:14}}),le.createElement("span",{className:Te.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),le.createElement("div",{className:Te.statusbody},xt==="exercise"&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Te.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"),(xt==="subject"||xt==="exercisepush")&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ht&&le.createElement("span",{className:Te.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"),xt==="shixunpush"&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",ht&&le.createElement("span",{className:Te.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"),le.createElement("div",null,ve==null?void 0:ve.map((ot,Ot)=>le.createElement("a",{href:`/shixuns/${ot.identifier}/challenges`,target:"_blank"},"\u300A",ot==null?void 0:ot.name,"\u300B",Ot+1!==Ee&&"\u3001"))))),de>0&&le.createElement("div",{style:{marginTop:20}},le.createElement("span",{className:Te.flex},le.createElement("img",{src:lt,style:{width:14}}),le.createElement("span",{className:Te.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),le.createElement("div",{className:Te.statusbody},xt==="exercise"&&le.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"),(xt==="subject"||xt==="exercisepush")&&le.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"),xt==="shixunpush"&&le.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"),le.createElement("div",null,ee==null?void 0:ee.map((ot,Ot)=>le.createElement("a",{href:`/shixuns/${ot.identifier}/challenges`,target:"_blank"},"\u300A",ot==null?void 0:ot.name,"\u300B",Ot+1!==de&&"\u3001"))))));if(xt==="shixun")return le.createElement("div",{style:{marginTop:20}},de>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 le.createElement(He.default,{open:Oe,onCancel:()=>{te(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!ht&&"none"}},zIndex:1003,confirmLoading:mt,okText:ht?at:"\u6211\u77E5\u9053\u4E86",onOk:()=>Ve(void 0,null,function*(){ht?yield bt([...ee,...Me]):te(!1)})},le.createElement("div",{style:{maxHeight:600,overflow:"auto"}},Ze(),Mt()))}},85016:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ve}});var le=me(59301),Te={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},He=me(92310),lt=me.n(He),Ve=({className:Le,style:Ct,state:xt,onClick:Ue})=>{var bt,at;return le.createElement("div",{onClick:Ue,className:lt()(xt?(bt=Te)==null?void 0:bt.redBtn:(at=Te)==null?void 0:at.btn,Le),style:Ct},xt?le.createElement(le.Fragment,null,le.createElement("i",{className:"iconfont icon-biaoji1"}),le.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):le.createElement(le.Fragment,null,le.createElement("i",{className:"iconfont icon-biaojigaiti"}),le.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},73278:function(Tn,xn,me){"use strict";me.d(xn,{h:function(){return Ee}});var le=me(59301),Te=me(57809),He=me(78241),lt=me(3113),We=me(89780),Ve=me.n(We),Le=me(78780),Ct=me(19136),xt=Object.defineProperty,Ue=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,te=(Me,Be,je)=>Be in Me?xt(Me,Be,{enumerable:!0,configurable:!0,writable:!0,value:je}):Me[Be]=je,ee=(Me,Be)=>{for(var je in Be||(Be={}))mt.call(Be,je)&&te(Me,je,Be[je]);if(at)for(var je of at(Be))Oe.call(Be,je)&&te(Me,je,Be[je]);return Me},de=(Me,Be)=>Ue(Me,bt(Be));const se=Te.default.Option,he={labelCol:{span:4},wrapperCol:{span:20}},ve={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};xn.Z=({callback:Me,onCancel:Be})=>{const[je,_e]=(0,le.useState)("python");function Je(ht){_e(ve[ht][1])}function Xe(ht){Me(ht)}return le.createElement(He.default,de(ee({},he),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Xe,style:{width:500}}),le.createElement(He.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(Te.default,{getPopupContainer:ht=>ht.parentNode,onChange:Je},Object.keys(ve).map(ht=>le.createElement(se,{key:ht,value:ht},ve[ht][0])))),le.createElement(He.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},le.createElement(Ee,{mode:je})),le.createElement("div",{className:"flex-container flex-end"},le.createElement(lt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(lt.ZP,{type:"ghost",onClick:Be},"\u53D6\u6D88")))};function Ee({value:Me,onChange:Be,mode:je,options:_e={}}){const Je=(0,le.useRef)(),[Xe,ht]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Xe){let Ze=function(Mt){const ot=Mt.getValue();Be&&Be(ot)};return Xe.on("change",Ze),()=>{Xe.off("change",Ze)}}},[Xe,Be]),(0,le.useEffect)(()=>{Xe&&Xe.setOption("mode",je)},[Xe,je]),(0,le.useEffect)(()=>{Xe&&(Me!==Xe.getValue()||Me==="")&&setTimeout(()=>{Xe.setValue(Me||"")},300)},[Xe,Me]),(0,le.useEffect)(()=>{if(Je.current&&!Xe){const Ze=Ve().fromTextArea(Je.current,ee({mode:je,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},_e));ht(Ze)}},[Je.current,Xe]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:Je}))}},64726:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Gn}});var le=me(59301),Te=me(89780),He=me.n(Te),lt=me(76374),We=me(78780),Ve=me(6313),Le=me(25717),Ct=me(99498),xt=me(25419),Ue=me(67549),bt=me(99325),at=({value:$t="",className:Gt,showTextOnly:Zt,showLines:wt,style:vn={}})=>{const cn=(0,le.useMemo)(()=>"",[$t]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:cn}}))},mt=me(59301),Oe=Object.defineProperty,te=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=($t,Gt,Zt)=>Gt in $t?Oe($t,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):$t[Gt]=Zt,Ee=($t,Gt)=>{for(var Zt in Gt||(Gt={}))se.call(Gt,Zt)&&ve($t,Zt,Gt[Zt]);if(de)for(var Zt of de(Gt))he.call(Gt,Zt)&&ve($t,Zt,Gt[Zt]);return $t},Me=($t,Gt)=>te($t,ee(Gt));let Be=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u56FE\u50CF",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function je({onActionCallback:$t,title:Gt,icon:Zt,actionName:wt,className:vn="",children:cn}){function It(){$t(wt)}return mt.createElement("a",{title:Gt,className:vn,onClick:It},mt.createElement("i",{className:`${Zt}`}),cn)}var _e=({watch:$t,showNullButton:Gt,showNullProgramButton:Zt,onActionCallback:wt,fullScreen:vn,insertTemp:cn,hidetoolBar:It,extraUse:ct})=>{const an=[...Be,{title:`${$t?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${$t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return mt.createElement("ul",{className:"markdown-toolbar-container"},!It&&an.map((dn,ei)=>mt.createElement("li",{key:ei},dn.actionName?mt.createElement(je,Me(Ee({},dn),{onActionCallback:wt})):mt.createElement("span",{className:"v-line"}))),Gt?mt.createElement("li",null,mt.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:wt},mt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Zt?mt.createElement(mt.Fragment,null,mt.createElement("li",null,mt.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:wt},mt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),mt.createElement("li",null,mt.createElement(je,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:wt},mt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,cn&&mt.createElement("li",null,mt.createElement(je,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${cn}`,onActionCallback:wt},mt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),ct&&mt.createElement("li",null,ct),mt.createElement("li",{className:"btn-full-screen"},mt.createElement(je,{icon:`${vn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:vn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:wt})))},Je=me(19647),Xe=me(78241),ht=me(92832),Ze=me(3113),Mt=Object.defineProperty,ot=Object.defineProperties,Ot=Object.getOwnPropertyDescriptors,Pt=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,Lt=($t,Gt,Zt)=>Gt in $t?Mt($t,Gt,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):$t[Gt]=Zt,qe=($t,Gt)=>{for(var Zt in Gt||(Gt={}))Dt.call(Gt,Zt)&&Lt($t,Zt,Gt[Zt]);if(Pt)for(var Zt of Pt(Gt))Wt.call(Gt,Zt)&&Lt($t,Zt,Gt[Zt]);return $t},Ke=($t,Gt)=>ot($t,Ot(Gt));const Rt={labelCol:{span:4},wrapperCol:{span:20}};var Sn=({callback:$t,onCancel:Gt})=>{function Zt(wt){$t(wt)}return le.createElement(Xe.default,Ke(qe({},Rt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Zt,style:{width:500}}),le.createElement(Xe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(ht.default,null)),le.createElement(Xe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(ht.default,null)),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Ze.ZP,{type:"ghost",onClick:Gt},"\u53D6\u6D88")))},Pn=me(73278),_t=me(56030),rn=me(43418),ln=me(95237),Wn=me(14573),un=me(59301),_n=({callback:$t,onCancel:Gt})=>{const Zt=document.createElement("canvas"),wt=Zt.getContext("2d");Zt.width=1e3,Zt.height=800,wt.fillStyle="#ffffff",wt.fillRect(0,0,Zt.width,Zt.height);const vn=Zt.toDataURL("image/png");return un.createElement(rn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},un.createElement(ln.Z,{style:{height:"100vh"}},un.createElement(Wn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:vn,visible:!0,title:String(Date.now())},onOk:cn=>{$t({src:cn.url})},onClose:Gt})))},St=me(12378);function Zn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Zn,go.CommandHandler),Zn.prototype.canAlignSelection=function(){var $t=this.diagram;return!($t===null||$t.isReadOnly||$t.isModelReadOnly||$t.selection.count<2)},Zn.prototype.alignLeft=function(){var $t=this.diagram;$t.startTransaction("aligning left");var Gt=1/0;$t.selection.each(function(Zt){Zt instanceof go.Link||(Gt=Math.min(Zt.position.x,Gt))}),$t.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Gt,Zt.position.y))}),$t.commitTransaction("aligning left")},Zn.prototype.alignRight=function(){var $t=this.diagram;$t.startTransaction("aligning right");var Gt=-1/0;$t.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var wt=Zt.actualBounds.x+Zt.actualBounds.width;Gt=Math.max(wt,Gt)}}),$t.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Gt-Zt.actualBounds.width,Zt.position.y))}),$t.commitTransaction("aligning right")},Zn.prototype.alignTop=function(){var $t=this.diagram;$t.startTransaction("alignTop");var Gt=1/0;$t.selection.each(function(Zt){Zt instanceof go.Link||(Gt=Math.min(Zt.position.y,Gt))}),$t.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.position.x,Gt))}),$t.commitTransaction("alignTop")},Zn.prototype.alignBottom=function(){var $t=this.diagram;$t.startTransaction("aligning bottom");var Gt=-1/0;$t.selection.each(function(Zt){if(!(Zt instanceof go.Link)){var wt=Zt.actualBounds.y+Zt.actualBounds.height;Gt=Math.max(wt,Gt)}}),$t.selection.each(function(Zt){Zt instanceof go.Link||Zt.move(new go.Point(Zt.actualBounds.x,Gt-Zt.actualBounds.height))}),$t.commitTransaction("aligning bottom")},Zn.prototype.alignCenterX=function(){var $t=this.diagram,Gt=$t.selection.first();if(Gt){$t.startTransaction("aligning Center X");var Zt=Gt.actualBounds.x+Gt.actualBounds.width/2;$t.selection.each(function(wt){wt instanceof go.Link||wt.move(new go.Point(Zt-wt.actualBounds.width/2,wt.actualBounds.y))}),$t.commitTransaction("aligning Center X")}},Zn.prototype.alignCenterY=function(){var $t=this.diagram,Gt=$t.selection.first();if(Gt){$t.startTransaction("aligning Center Y");var Zt=Gt.actualBounds.y+Gt.actualBounds.height/2;$t.selection.each(function(wt){wt instanceof go.Link||wt.move(new go.Point(wt.actualBounds.x,Zt-wt.actualBounds.height/2))}),$t.commitTransaction("aligning Center Y")}},Zn.prototype.alignColumn=function($t){var Gt=this.diagram;Gt.startTransaction("align Column"),$t===void 0&&($t=0),$t=parseFloat($t);var Zt=new Array;Gt.selection.each(function(ct){ct instanceof go.Link||Zt.push(ct)});for(var wt=0;wt<Zt.length-1;wt++){var vn=Zt[wt],cn=vn.actualBounds.y+vn.actualBounds.height+$t,It=Zt[wt+1];It.move(new go.Point(vn.actualBounds.x,cn))}Gt.commitTransaction("align Column")},Zn.prototype.alignRow=function($t){$t===void 0&&($t=0),$t=parseFloat($t);var Gt=this.diagram;Gt.startTransaction("align Row");var Zt=new Array;Gt.selection.each(function(ct){ct instanceof go.Link||Zt.push(ct)});for(var wt=0;wt<Zt.length-1;wt++){var vn=Zt[wt],cn=vn.actualBounds.x+vn.actualBounds.width+$t,It=Zt[wt+1];It.move(new go.Point(cn,vn.actualBounds.y))}Gt.commitTransaction("align Row")},Zn.prototype.canRotate=function($t){var Gt=this.diagram;return!(Gt===null||Gt.isReadOnly||Gt.isModelReadOnly||Gt.selection.count<1)},Zn.prototype.rotate=function($t){$t===void 0&&($t=90);var Gt=this.diagram;Gt.startTransaction("rotate "+$t.toString());var Gt=this.diagram;Gt.selection.each(function(Zt){Zt instanceof go.Link||Zt instanceof go.Group||(Zt.angle+=$t)}),Gt.commitTransaction("rotate "+$t.toString())},Zn.prototype.pullToFront=function(){var $t=this.diagram;$t.startTransaction("pullToFront");var Gt=new go.Map;$t.selection.each(function(Zt){Gt.set(Zt.layer,0)}),Gt.iteratorKeys.each(function(Zt){var wt=0;Zt.parts.each(function(vn){if(!vn.isSelected){var cn=vn.zOrder;isNaN(cn)?vn.zOrder=0:wt=Math.max(wt,cn)}}),Gt.set(Zt,wt)}),$t.selection.each(function(Zt){Zn._assignZOrder(Zt,Gt.get(Zt.layer)+1)}),$t.commitTransaction("pullToFront")},Zn.prototype.pushToBack=function(){var $t=this.diagram;$t.startTransaction("pushToBack");var Gt=new go.Map;$t.selection.each(function(Zt){Gt.set(Zt.layer,0)}),Gt.iteratorKeys.each(function(Zt){var wt=0;Zt.parts.each(function(vn){if(!vn.isSelected){var cn=vn.zOrder;isNaN(cn)?vn.zOrder=0:wt=Math.min(wt,cn)}}),Gt.set(Zt,wt)}),$t.selection.each(function(Zt){Zn._assignZOrder(Zt,Gt.get(Zt.layer)-1-Zn._findGroupDepth(Zt))}),$t.commitTransaction("pushToBack")},Zn._assignZOrder=function($t,Gt,Zt){Zt===void 0&&(Zt=$t),$t.layer===Zt.layer&&($t.zOrder=Gt),$t instanceof go.Group&&$t.memberParts.each(function(wt){Zn._assignZOrder(wt,Gt+1,Zt)})},Zn._findGroupDepth=function($t){if($t instanceof go.Group){var Gt=0;return $t.memberParts.each(function(Zt){Gt=Math.max(Gt,Zn._findGroupDepth(Zt))}),Gt+1}else return 0},Zn.prototype.doKeyDown=function(){var $t=this.diagram;if($t!==null){var Gt=$t.lastInput;if(Gt.key==="Up"||Gt.key==="Down"||Gt.key==="Left"||Gt.key==="Right"){var Zt=this.arrowKeyBehavior;if(Zt==="none")return;if(Zt==="select"){this._arrowKeySelect();return}else if(Zt==="move"){this._arrowKeyMove();return}else if(Zt==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Zn.prototype._getAllParts=function(){var $t=new Array;return this.diagram.nodes.each(function(Gt){$t.push(Gt)}),this.diagram.parts.each(function(Gt){$t.push(Gt)}),$t},Zn.prototype._arrowKeyMove=function(){var $t=this.diagram,Gt=$t.lastInput,Zt=0,wt=0;if(Gt.control||Gt.meta)Zt=1,wt=1;else if($t.grid!==null){var vn=$t.grid.gridCellSize;wt=vn.width,Zt=vn.height}$t.startTransaction("arrowKeyMove"),$t.selection.each(function(cn){Gt.key==="Up"?cn.move(new go.Point(cn.actualBounds.x,cn.actualBounds.y-Zt)):Gt.key==="Down"?cn.move(new go.Point(cn.actualBounds.x,cn.actualBounds.y+Zt)):Gt.key==="Left"?cn.move(new go.Point(cn.actualBounds.x-wt,cn.actualBounds.y)):Gt.key==="Right"&&cn.move(new go.Point(cn.actualBounds.x+wt,cn.actualBounds.y))}),$t.commitTransaction("arrowKeyMove")},Zn.prototype._arrowKeySelect=function(){var $t=this.diagram,Gt=$t.lastInput,Zt=null;Gt.key==="Up"?Zt=this._findNearestPartTowards(270):Gt.key==="Down"?Zt=this._findNearestPartTowards(90):Gt.key==="Left"?Zt=this._findNearestPartTowards(180):Gt.key==="Right"&&(Zt=this._findNearestPartTowards(0)),Zt!==null&&(Gt.shift?Zt.isSelected=!0:Gt.control||Gt.meta?Zt.isSelected=!Zt.isSelected:$t.select(Zt))},Zn.prototype._findNearestPartTowards=function($t){var Gt=this.diagram.selection.first();if(Gt===null)return null;for(var Zt=Gt.actualBounds.center,wt=this._getAllParts(),vn=1/0,cn=Gt,It=0;It<wt.length;It++){var ct=wt[It];if(ct!==Gt&&ct.canSelect()){var an=ct.actualBounds.center,dn=Zt.directionPoint(an),ei=this._angleCloseness(dn,$t);if(ei<=45){var pn=Zt.distanceSquaredPoint(an);pn*=1+Math.sin(ei*Math.PI/180),pn<vn&&(vn=pn,cn=ct)}}}return cn},Zn.prototype._angleCloseness=function($t,Gt){return Math.min(Math.abs(Gt-$t),Math.min(Math.abs(Gt+360-$t),Math.abs(Gt-360-$t)))},Zn.prototype._arrowKeyTree=function(){var $t=this.diagram,Gt=$t.selection.first();if(Gt instanceof go.Node){var Zt=$t.lastInput;if(Zt.key==="Right"){if(!Gt.isTreeLeaf)if(!Gt.isTreeExpanded)$t.commandHandler.canExpandTree(Gt)&&$t.commandHandler.expandTree(Gt);else{var wt=this._sortTreeChildrenByY(Gt).first();wt!==null&&$t.select(wt)}}else if(Zt.key==="Left")if(!Gt.isTreeLeaf&&Gt.isTreeExpanded)$t.commandHandler.canCollapseTree(Gt)&&$t.commandHandler.collapseTree(Gt);else{var vn=Gt.findTreeParentNode();vn!==null&&$t.select(vn)}else if(Zt.key==="Up"){var vn=Gt.findTreeParentNode();if(vn!==null){var cn=this._sortTreeChildrenByY(vn),It=cn.indexOf(Gt);if(It>0){for(var ct=cn.elt(It-1);ct!==null&&ct.isTreeExpanded&&!ct.isTreeLeaf;){var an=this._sortTreeChildrenByY(ct);ct=an.last()}ct!==null&&$t.select(ct)}else $t.select(vn)}}else if(Zt.key==="Down")if(Gt.isTreeExpanded&&!Gt.isTreeLeaf){var wt=this._sortTreeChildrenByY(Gt).first();wt!==null&&$t.select(wt)}else for(;Gt!==null;){var vn=Gt.findTreeParentNode();if(vn===null)break;var cn=this._sortTreeChildrenByY(vn),It=cn.indexOf(Gt);if(It<cn.length-1){$t.select(cn.elt(It+1));break}else Gt=vn}var dn=$t.selection.first();dn!==null&&$t.scrollToRect(dn.actualBounds)}},Zn.prototype._sortTreeChildrenByY=function($t){var Gt=new go.List().addAll($t.findTreeChildrenNodes());return Gt.sort(function(Zt,wt){var vn=Zt.location,cn=wt.location;return vn.y<cn.y?-1:vn.y>cn.y?1:vn.x<cn.x?-1:vn.x>cn.x?1:0}),Gt},Zn.prototype.copyToClipboard=function($t){go.CommandHandler.prototype.copyToClipboard.call(this,$t),this._lastPasteOffset.set(this.pasteOffset)},Zn.prototype.pasteFromClipboard=function(){var $t=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts($t,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),$t},Object.defineProperty(Zn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function($t){if($t!=="move"&&$t!=="select"&&$t!=="scroll"&&$t!=="tree"&&$t!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+$t);this._arrowKeyBehavior=$t}}),Object.defineProperty(Zn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function($t){if(!($t instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+$t);this._pasteOffset.set($t)}});var li=Zn,Ge=me(29277),be=me(43604),Pe=me(7660),Ae={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Ne=me(59301),xe=($t,Gt,Zt)=>new Promise((wt,vn)=>{var cn=an=>{try{ct(Zt.next(an))}catch(dn){vn(dn)}},It=an=>{try{ct(Zt.throw(an))}catch(dn){vn(dn)}},ct=an=>an.done?wt(an.value):Promise.resolve(an.value).then(cn,It);ct((Zt=Zt.apply($t,Gt)).next())});function ut({onCancel:$t,callback:Gt}){let Zt=(0,le.useRef)(),wt=(0,le.useRef)(),vn=(0,le.useRef)(),cn=(0,le.useRef)(!1);const It=(0,le.useRef)(!1),[ct,an]=(0,le.useState)(0);function dn(){const pn=St.bx.make,zt={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"};Zt.current=new St.S0(wt.current,{padding:20,grid:pn(St.s_,"Grid",pn(St.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),pn(St.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Jt=>{var gi=Jt.diagram.commandHandler.addTopLevelParts(Jt.diagram.selection,!0);gi||Jt.diagram.currentTool.doCancel()},commandHandler:pn(li),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Jt=>{var gi=Jt.subject;gi.location=gi.location.copy().snapToGridPoint(Jt.diagram.grid.gridOrigin,Jt.diagram.grid.gridCellSize),setTimeout(()=>{Jt.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Jt=>{var gi=Jt.subject;setTimeout(()=>{Jt.diagram.commandHandler.editTextBlock()})},LinkRelinked:Jt=>{var gi=Jt.parameter.part;gi.invalidateConnectedLinks();var mr=Jt.subject;Jt.diagram.toolManager.linkingTool.isForwards?mr.toNode.invalidateConnectedLinks():mr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Zt.current.nodeTemplate=pn(St.NB,"Auto",{locationSpot:St.z6.Center,locationObjectName:"SHAPE",desiredSize:new St.$u(120,60),minSize:new St.$u(40,40),resizable:!0,resizeCellSize:new St.$u(10,10),rotatable:!0},new St.KX("location","loc",St.E9.parse).makeTwoWay(St.E9.stringify),new St.KX("desiredSize","size",St.$u.parse).makeTwoWay(St.$u.stringify),pn(St.bn,{name:"SHAPE",fill:zt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:St.z6.AllSides,toSpot:St.z6.AllSides},new St.KX("figure"),new St.KX("fill"),new St.KX("stroke","borderColor"),new St.KX("strokeWidth","thickness"),new St.KX("strokeDashArray","dash")),pn(St.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),pn(St.al,{margin:1,textAlign:"center",overflow:St.al.OverflowEllipsis,editable:!0},new St.KX("text").makeTwoWay(),new St.KX("stroke","color"))),Zt.current.nodeTemplate.toolTip=pn("ToolTip",pn(St.s_,"Vertical",{maxSize:new St.$u(200,NaN)},pn(St.al,{font:"bold 10pt sans-serif",textAlign:"center"},new St.KX("text")),pn(St.al,{font:"10pt sans-serif",textAlign:"center"},new St.KX("text","details"))));function In(Jt,gi){var mr=(tr,Hr)=>{tr.handled=!0,tr.diagram.model.commit(Lr=>{var lo=Hr.part.adornedPart,Wr=new St.E9().setRectSpot(lo.actualBounds,Jt);Wr.subtract(lo.location),Wr.scale(2,2),Wr.x+=Math.sign(Wr.x)*130,Wr.y+=Math.sign(Wr.y)*130,Wr.add(lo.location),Wr.snapToGridPoint(tr.diagram.grid.gridOrigin,tr.diagram.grid.gridCellSize);var jr=Lr.copyNodeData(lo.data);Lr.setGroupKeyForNodeData(jr,Lr.getGroupKeyForNodeData(lo.data)),Lr.addNodeData(jr);var fo={from:lo.key,to:Lr.getKeyForNodeData(jr)};Lr.addLinkData(fo);var $n=tr.diagram.findNodeForData(jr);$n.location=Wr,tr.diagram.select($n),setTimeout(()=>{tr.diagram.commandHandler.editTextBlock()},20)})};return pn(St.bn,{figure:gi,alignment:Jt,alignmentFocus:Jt.opposite(),width:Jt.equals(St.z6.Top)||Jt.equals(St.z6.Bottom)?25:18,height:Jt.equals(St.z6.Top)||Jt.equals(St.z6.Bottom)?18:25,fill:"orange",stroke:zt.white,strokeWidth:4,mouseEnter:(tr,Hr)=>Hr.fill="dodgerblue",mouseLeave:(tr,Hr)=>Hr.fill="orange",isActionable:!0,click:mr,contextClick:mr})}function Qn(Jt){return pn(St.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:(gi,mr)=>mr.fill="dodgerblue",mouseLeave:(gi,mr)=>mr.fill="orange",click:(gi,mr)=>{gi.diagram.commandHandler.showContextMenu(mr.part.adornedPart)}},Jt||{})}Zt.current.nodeTemplate.selectionAdornmentTemplate=pn(St.uz,"Spot",pn(St.Vm,{padding:10}),In(St.z6.Top,"TriangleUp"),In(St.z6.Left,"TriangleLeft"),In(St.z6.Right,"TriangleRight"),In(St.z6.Bottom,"TriangleDown"),Qn({alignment:new St.z6(.75,0)}));function xi(Jt,gi){return(mr,tr)=>{mr.handled=!0,mr.diagram.model.commit(Hr=>{Hr.set(tr.part.adornedPart.data,Jt,gi)})}}function tn(Jt,gi){return gi||(gi="color"),pn(St.bn,{width:16,height:16,stroke:"lightgray",fill:Jt,margin:1,background:"transparent",mouseEnter:(mr,tr)=>tr.stroke="dodgerblue",mouseLeave:(mr,tr)=>tr.stroke="lightgray",click:xi(gi,Jt),contextClick:xi(gi,Jt)})}function fn(){return[pn("ContextMenuButton",pn(St.s_,"Horizontal",tn(zt.white,"fill"),tn(zt.beige,"fill"),tn(zt.extralightblue,"fill"),tn(zt.extralightred,"fill"))),pn("ContextMenuButton",pn(St.s_,"Horizontal",tn(zt.lightgray,"fill"),tn(zt.lightgreen,"fill"),tn(zt.lightblue,"fill"),tn(zt.lightred,"fill")))]}function kn(){return[pn("ContextMenuButton",pn(St.s_,"Horizontal",tn(zt.black),tn(zt.green),tn(zt.blue),tn(zt.red))),pn("ContextMenuButton",pn(St.s_,"Horizontal",tn(zt.white),tn(zt.magenta),tn(zt.purple),tn(zt.orange)))]}function zi(Jt,gi){return gi||(gi="thickness"),pn(St.bn,"LineH",{width:16,height:16,strokeWidth:Jt,margin:1,background:"transparent",mouseEnter:(mr,tr)=>tr.background="dodgerblue",mouseLeave:(mr,tr)=>tr.background="transparent",click:xi(gi,Jt),contextClick:xi(gi,Jt)})}function Di(Jt,gi){return gi||(gi="dash"),pn(St.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Jt,margin:1,background:"transparent",mouseEnter:(mr,tr)=>tr.background="dodgerblue",mouseLeave:(mr,tr)=>tr.background="transparent",click:xi(gi,Jt),contextClick:xi(gi,Jt)})}function Si(){return[pn("ContextMenuButton",pn(St.s_,"Horizontal",zi(1),zi(2),zi(3),zi(4))),pn("ContextMenuButton",pn(St.s_,"Horizontal",Di(null),Di([2,4]),Di([4,4])))]}function Fi(Jt,gi){return gi||(gi="figure"),pn(St.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Jt,margin:1,background:"transparent",mouseEnter:(mr,tr)=>tr.fill="dodgerblue",mouseLeave:(mr,tr)=>tr.fill="lightgray",click:xi(gi,Jt),contextClick:xi(gi,Jt)})}Zt.current.nodeTemplate.contextMenu=pn("ContextMenu",pn("ContextMenuButton",pn(St.s_,"Horizontal",Fi("Rectangle"),Fi("RoundedRectangle"),Fi("Ellipse"),Fi("Diamond"))),pn("ContextMenuButton",pn(St.s_,"Horizontal",Fi("Parallelogram2"),Fi("ManualOperation"),Fi("Procedure"),Fi("Cylinder1"))),pn("ContextMenuButton",pn(St.s_,"Horizontal",Fi("Terminator"),Fi("CreateRequest"),Fi("Document"),Fi("TriangleDown"))),fn(),kn(),Si()),Zt.current.groupTemplate=pn(St.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:St.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Jt,gi)=>{var mr=gi.addMembers(gi.diagram.selection,!0);mr||gi.diagram.currentTool.doCancel()},avoidable:!1},new St.KX("location","loc",St.E9.parse).makeTwoWay(St.E9.stringify),pn(St.s_,"Auto",{name:"BODY"},pn(St.bn,{parameter1:10,fill:zt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:St.z6.AllSides,toSpot:St.z6.AllSides},new St.KX("fill"),new St.KX("stroke","color"),new St.KX("strokeWidth","thickness"),new St.KX("strokeDashArray","dash")),pn(St.Vm,{background:"transparent",margin:20})),pn(St.al,{alignment:St.z6.Top,alignmentFocus:St.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new St.KX("text"),new St.KX("stroke","color"))),Zt.current.groupTemplate.selectionAdornmentTemplate=pn(St.uz,"Spot",pn(St.s_,"Auto",pn(St.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),pn(St.Vm,{margin:1.5})),Qn({alignment:St.z6.TopRight,alignmentFocus:St.z6.BottomRight})),Zt.current.groupTemplate.contextMenu=pn("ContextMenu",fn(),kn(),Si()),Zt.current.linkTemplate=pn(St.rU,{layerName:"Foreground",routing:St.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new St.KX("fromSpot","fromSpot",St.z6.parse),new St.KX("toSpot","toSpot",St.z6.parse),new St.KX("fromShortLength","dir",Jt=>Jt>=1?10:0),new St.KX("toShortLength","dir",Jt=>Jt>=1?10:0),new St.KX("points").makeTwoWay(),pn(St.bn,{strokeWidth:2},new St.KX("stroke","color"),new St.KX("strokeWidth","thickness"),new St.KX("strokeDashArray","dash")),pn(St.bn,{segmentIndex:0,segmentOffset:new St.E9(15,0),segmentOrientation:St.rU.OrientAlong,alignmentFocus:St.z6.Right,figure:"circle",width:10,strokeWidth:0},new St.KX("fill","color"),new St.KX("visible","dir",Jt=>Jt===1)),pn(St.bn,{segmentIndex:-1,segmentOffset:new St.E9(-10,6),segmentOrientation:St.rU.OrientPlus90,alignmentFocus:St.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new St.KX("fill","color"),new St.KX("visible","dir",Jt=>Jt>=1),new St.KX("width","thickness",Jt=>7+3*Jt),new St.KX("height","thickness",Jt=>7+3*Jt),new St.KX("segmentOffset","thickness",Jt=>new St.E9(-15,4+1.5*Jt))),pn(St.bn,{segmentIndex:0,segmentOffset:new St.E9(15,-6),segmentOrientation:St.rU.OrientMinus90,alignmentFocus:St.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new St.KX("fill","color"),new St.KX("visible","dir",Jt=>Jt===2),new St.KX("width","thickness",Jt=>7+3*Jt),new St.KX("height","thickness",Jt=>7+3*Jt),new St.KX("segmentOffset","thickness",Jt=>new St.E9(-15,4+1.5*Jt))),pn(St.al,{alignmentFocus:new St.z6(0,1,-4,0),editable:!0},new St.KX("text").makeTwoWay(),new St.KX("stroke","color"))),Zt.current.linkTemplate.selectionAdornmentTemplate=pn(St.uz,pn(St.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Ti(2)},new St.KX("pathPattern","thickness",Ti)),Qn({alignmentFocus:new St.z6(0,0,-6,-4)}));function Ti(Jt){return pn(St.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Jt+4).toString()+" H3"})}function nr(Jt){var gi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Jt===0?gi="M0 0 M16 16 M0 8 L16 8":Jt===2&&(gi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),pn(St.bn,{geometryString:gi,margin:2,background:"transparent",mouseEnter:(mr,tr)=>tr.background="dodgerblue",mouseLeave:(mr,tr)=>tr.background="transparent",click:xi("dir",Jt),contextClick:xi("dir",Jt)})}function $r(Jt){var gi=(mr,tr)=>{mr.handled=!0,mr.diagram.model.commit(Hr=>{var Lr=tr.part.adornedPart;Hr.set(Lr.data,Jt?"toSpot":"fromSpot",St.z6.stringify(St.z6.AllSides)),(Jt?Lr.toNode:Lr.fromNode).invalidateConnectedLinks()})};return pn(St.bn,{width:12,height:12,fill:"transparent",mouseEnter:(mr,tr)=>tr.background="dodgerblue",mouseLeave:(mr,tr)=>tr.background="transparent",click:gi,contextClick:gi})}function ci(Jt,gi){var mr=0,tr=St.z6.RightSide;Jt.equals(St.z6.Top)?(mr=270,tr=St.z6.TopSide):Jt.equals(St.z6.Left)?(mr=180,tr=St.z6.LeftSide):Jt.equals(St.z6.Bottom)&&(mr=90,tr=St.z6.BottomSide),gi||(mr-=180);var Hr=(Lr,lo)=>{Lr.handled=!0,Lr.diagram.model.commit(Wr=>{var jr=lo.part.adornedPart;Wr.set(jr.data,gi?"toSpot":"fromSpot",St.z6.stringify(tr)),(gi?jr.toNode:jr.fromNode).invalidateConnectedLinks()})};return pn(St.bn,{alignment:Jt,alignmentFocus:Jt.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:mr,background:"transparent",mouseEnter:(Lr,lo)=>lo.background="dodgerblue",mouseLeave:(Lr,lo)=>lo.background="transparent",click:Hr,contextClick:Hr})}Zt.current.linkTemplate.contextMenu=pn("ContextMenu",kn(),Si(),pn("ContextMenuButton",pn(St.s_,"Horizontal",nr(0),nr(1),nr(2))),pn("ContextMenuButton",pn(St.s_,"Horizontal",pn(St.s_,"Spot",$r(!1),ci(St.z6.Top,!1),ci(St.z6.Left,!1),ci(St.z6.Right,!1),ci(St.z6.Bottom,!1)),pn(St.s_,"Spot",{margin:new St.Zt(0,0,0,2)},$r(!0),ci(St.z6.Top,!0),ci(St.z6.Left,!0),ci(St.z6.Right,!0),ci(St.z6.Bottom,!0)))));const Ki=`{ "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 Yr=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function Qr(Jt){return console.log("shapeName:",Jt),Yr.indexOf(Jt)>=0}var Cr=new St.YI(vn.current,{maxSelectionCount:1,linkTemplate:pn(St.rU,{locationSpot:St.z6.Center,selectionAdornmentTemplate:pn(St.uz,"Link",{locationSpot:St.z6.Center},pn(St.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),pn(St.bn,{toArrow:"Standard",stroke:null}))},{routing:St.rU.AvoidsNodes,curve:St.rU.JumpOver,corner:5,toShortLength:4},new St.KX("points"),pn(St.bn,{isPanelMain:!0,strokeWidth:2}),pn(St.bn,{toArrow:"Standard",stroke:null})),model:new St.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...St.bn.getFigureGenerators().toArray().map(Jt=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Jt.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Zt.current.addDiagramListener("TextEdited",function(Jt){var gi;const mr=Jt.subject.part;var tr=(gi=document.activeElement)==null?void 0:gi.value;typeof tr=="string"&&tr.trim()===""&&Zt.current.model.commit(function(Hr){Hr.set(mr.data,"text","\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}),Cr.nodeTemplate=pn(St.NB,"Auto",{locationSpot:St.z6.Center},new St.KX("location","location",St.E9.parse).makeTwoWay(St.E9.stringify),pn(St.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 St.KX("stroke").makeTwoWay(),new St.KX("fill").makeTwoWay(),new St.KX("figure")),pn(St.al,{margin:new St.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new St.$u(16,16),maxSize:new St.$u(10,NaN),textAlign:"center",editable:!0},new St.KX("key").makeTwoWay())),setTimeout(()=>{Zt.current.grid=pn(St.s_,"Grid",pn(St.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),pn(St.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Zt.current.grid.visible=!0,Zt.current.grid.gridCellStroke="darkgray",Zt.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Zt.current,Zt.current}const ei=()=>xe(this,null,function*(){var pn=Zt.current.makeImage();const zt=yield(0,Pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:pn.src}});Gt({src:zt.url})});return(0,le.useEffect)(()=>(setTimeout(()=>{dn()},500),an(ct+1),()=>{Zt.current=null}),[]),Ne.createElement("div",{ref:It,className:cn.current?`${Ae.maxH60} body-overflow-initial`:"body-overflow-initial"},Ne.createElement(rn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!ct,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ne.createElement(ln.Z,null,Ne.createElement(be.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ne.createElement(be.Z,{onClick:()=>{var pn,zt,In=Zt.current.selection.first();if(cn.current=!cn.current,document.activeElement&&In){let Qn=(zt=(pn=document.activeElement)==null?void 0:pn.value)==null?void 0:zt.trim();typeof Qn=="string"&&Zt.current.model.commit(function(xi){xi.set(In.data,"text",Qn||"\u672A\u547D\u540D"),Zt.current.commandHandler.stopCommand()},"increment")}an(ct+1)}},Ne.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:$t},Ne.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ae.flowChartWrp},Ne.createElement("div",{style:{display:"flex",height:"100%"}},Ne.createElement("div",{style:{width:"300px",height:"100%"}},Ne.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ne.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ae.myPaletteDiv,ref:vn})),Ne.createElement("div",{style:{flex:1,position:"relative"}},Ne.createElement("div",{ref:wt,style:{height:"80vh"}}))),Ne.createElement("div",{className:"tr"},Ne.createElement(Ze.ZP,{size:"large",onClick:ei,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Bt=ut,Qe=me(5112),it=me(5871);const Ft=Qe.ZP.Group,Nt={margin:"0 8px"};var dt=({callback:$t,onCancel:Gt})=>{function Zt(wt){$t(wt)}return le.createElement(Xe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Zt},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:Nt},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:Nt},"\u884C\u6570"),le.createElement(Xe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(it.Z,null)),le.createElement("span",{style:Nt},"\u5217\u6570"),le.createElement(Xe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(it.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:Nt},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(Xe.default.Item,{name:"align"},le.createElement(Ft,null,le.createElement(Qe.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(Qe.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(Qe.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(Qe.ZP,{value:"right"},le.createElement("i",{className:"fa fa-align-right"}))))),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Ze.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Ze.ZP,{type:"ghost",onClick:Gt},"\u53D6\u6D88")))},Kt=me(78673),wn=me(5559),sn=me.n(wn),Rn=(0,le.forwardRef)(({use3d:$t,width:Gt,height:Zt,callback:wt,showSaveButton:vn},cn)=>{const It=(0,le.useRef)(),ct=(0,le.useRef)(),[an,dn]=(0,le.useState)(!1),ei=(0,le.useRef)({id:It,appName:"graphing",width:Gt||1e3,height:Zt||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,le.useEffect)(()=>{ct.current=new(sn())(ei.current,!0),window.onload=function(){ct.current.inject("applet_container")}},[]);const pn=()=>{var zt=window.ggbApplet.getPNGBase64(1,!0,72);return wt&&wt(zt),zt};return(0,le.useEffect)(()=>{ei.current.appName=an?"3D":"graphing",ct.current.inject("applet_container")},[an]),(0,le.useEffect)(()=>{dn($t)},[$t]),(0,le.useImperativeHandle)(cn,()=>({getImgData:pn})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:It}),le.createElement(ln.Z,{align:"middle"},le.createElement(be.Z,{flex:1},le.createElement(Kt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:an,onChange:zt=>dn(zt)})),le.createElement(be.Z,null,le.createElement(Ze.ZP,{size:"large",onClick:pn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Vn=me(46531),hn=me(8591);const Yn="link",mi="upload-image",jn="add-flowchart",An="draw-image",wi="add-flowchart",ji="code-block",Wi="add-table",dr="------------",Mr={default:dr,left:`:${dr}`,center:`:${dr}:`,right:`${dr}:`};var pi=me(50505);function ui(){}let Ci=0;const Xi=1e4,Ni="\u2581",io="@\u2581\u2581@",hr="@\u2581@",De=`
|
|
|
**\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`,Ei=["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 Pr($t){return/^\d+$/.test($t)?`${$t}px`:$t}const vi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Zi={[vi+"-B"]:"bold",[vi+"-I"]:"italic"},er={[Yn]:"\u6DFB\u52A0\u94FE\u63A5",[ji]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[mi]:"\u6DFB\u52A0\u56FE\u7247",[An]:"\u6DFB\u52A0\u753B\u56FE",[jn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Wi]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Gn=({defaultValue:$t="",onChange:Gt,width:Zt="100%",height:wt=400,miniToolbar:vn=!1,isFocus:cn=!1,watch:It,insertTemp:ct,mode:an="markdown",id:dn="markdown-editor-id",showResizeBar:ei=!1,noStorage:pn=!1,showNullButton:zt=!1,showNullProgramButton:In=!1,hidetoolBar:Qn=!1,fullScreen:xi=!1,onBlur:tn,onCMBeforeChange:fn,onFullScreen:kn,className:zi="",disablePaste:Di=!1,disabled:Si=!1,disabledFill:Fi=!1,placeholder:Ti="",values:nr="",extraUse:$r})=>{const[ci,Ki]=(0,le.useState)(null),[Yr,Qr]=(0,le.useState)($t),[Cr,Jt]=(0,le.useState)(It),[gi,mr]=(0,le.useState)(xi),[tr,Hr]=(0,le.useState)(""),[Lr,lo]=(0,le.useState)(0),[Wr,jr]=(0,le.useState)(wt),[fo,$n]=(0,le.useState)(!1),[aa,Un]=(0,le.useState)(0),[Do,Ko]=(0,le.useState)(0),Ji=(0,le.useRef)(),la=(0,le.useRef)(),Ro=(0,le.useRef)(),Nr=(0,le.useRef)();(0,le.useEffect)(()=>{const br=window.scrollY||window.pageYOffset;Qr(nr),ci==null||ci.setValue(nr),window.scrollTo(0,br)},[nr]),(0,le.useEffect)(()=>{kn==null||kn(gi)},[gi]),(0,le.useEffect)(()=>{if(Ji.current){let br=function(wo,fi){var Ba;if(Di){fi.preventDefault();return}const Eo=fi.clipboardData;if(Eo){const es=Eo.types.toString(),fa=Eo.items;if(es==="Files"||Eo.types.indexOf("Files")>-1){if(fi.preventDefault(),an=="stex")return;try{let va=fa[1];((Ba=fa[0])==null?void 0:Ba.kind)==="file"&&(va=fa[0]);const $a=va.getAsFile(),ms=$a.name.split(".").pop();(0,_t.I)($a,fs=>{var Rs,Zs,Bn;fs.id?((Rs=$a==null?void 0:$a.type)==null?void 0:Rs.indexOf("image"))>-1?Ur.replaceSelection(``):((Zs=$a==null?void 0:$a.type)==null?void 0:Zs.indexOf("video"))>-1?Ur.replaceSelection(`<video width="100%" controls src="/api/attachments/${fs.id}"></video>`):((Bn=$a==null?void 0:$a.type)==null?void 0:Bn.indexOf("pdf"))>-1?Ur.replaceSelection(`<a href="/api/attachments/${fs.id}?type=${$a.type}&disposition=inline" target="_blank">${$a.name}</a>`):Ei.includes(ms)?Ur.replaceSelection(`<a href="/api/attachments/${fs.id}?type=office&disposition=inline" target="_blank">${$a.name}</a>`):Ur.replaceSelection(`[${$a.name}](/api/attachments/${fs.id}?type=${fs.content_type})`):(fs==null?void 0:fs.status)===401&&(document.location.href="/user/login")})}catch(va){hn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Ur=He().fromTextArea(Ji.current,{mode:an,lineNumbers:!vn,lineWrapping:!0,value:$t,autoCloseTags:!0,autoCloseBrackets:!0});return Ur.on("keyup",function(wo,fi){fi.keyCode===8&&(wo.getValue()==""?Ur.setOption("placeholder",Ti):Ur.setOption("placeholder",null))}),Ur.on("keydown",function(wo,fi){if(fi.keyCode===8){var Ba=xo(wo);Ba&&fi.preventDefault()}}),cn&&Ur.focus(),Ur.on("paste",br),Si&&Ur.on("beforeChange",function(wo,fi){(fi.origin==="paste"||fi.origin==="+input")&&fi.cancel()}),Ki(Ur),()=>{Ur.off("paste",br)}}},[]);const Ar=(0,le.useCallback)(()=>{if(la.current)try{}catch(br){console.log(br,"---- to set md editor body height")}},[Wr,la,gi]);(0,le.useEffect)(()=>{function br(){let Ur=new lt.Z(wo=>{for(let fi of wo)(fi.target.offsetHeight>0||fi.target.offsetWidth>0)&&(Ar(),ci.setSize("100%","100%"),ci.refresh())});return Ur.observe(Ji.current.parentElement),Ur}if(ci){const Ur=br();return()=>{var wo,fi;(wo=Ji.current)!=null&&wo.parentElement&&Ur.unobserve((fi=Ji.current)==null?void 0:fi.parentElement)}}},[ci,Ar]),(0,le.useEffect)(()=>{if(ci){let br=[];for(const[Ur,wo]of Object.entries(Zi)){let fi={[Ur]:()=>{Wo(wo)}};br.push(fi),ci.addKeyMap(fi)}return()=>{for(let Ur of br)ci.removeKeyMap(Ur)}}},[ci]),(0,le.useEffect)(()=>{xi!==gi&&mr(xi)},[xi]),(0,pi.Z)(()=>{if(!pn&&Lr>0){let br=new Date().getTime(),Ur=window.sessionStorage.getItem(dn);br>=Lr+Xi&&(!Ur||Ur!==Yr)&&(window.sessionStorage.setItem(dn,Yr),$n(!0))}},Xi),(0,le.useEffect)(()=>{Jt(It)},[ci,It]),(0,le.useEffect)(()=>{ci&&cn&&ci.focus()},[ci,cn]),(0,le.useEffect)(()=>{if(Cr&&ci){let br=function(wo){let fi=wo.target;if(Nr.current){let Ba=fi.scrollTop/fi.scrollHeight;Nr.current.scrollTop=Nr.current.scrollHeight*Ba}};const Ur=ci.getScrollerElement();return Ur.addEventListener("scroll",br),()=>{Ur.removeEventListener("scroll",br)}}},[ci,Cr]),(0,le.useEffect)(()=>{if(ci&&fn){let br=function(Ur,wo){fn(Ur,wo)};return ci.on("beforeChange",br),()=>{ci.off("beforeChange",br)}}},[ci,fn]),(0,le.useEffect)(()=>{if(ci&&tn){let br=function(){tn(ci.getValue())};return ci.on("blur",br),()=>{ci.off("blur",br)}}},[ci,tn]);function xo(br,Ur){var wo=br.getDoc(),fi=wo.getCursor(),Ba=wo.getLine(fi.line),Eo=Ba.charAt(fi.ch-1),es=Ba.lastIndexOf("@\u2581@",fi.ch),fa=Ba.lastIndexOf("@\u2581\u2581@",fi.ch),va=es>fa?es:fa,$a=es>fa?3:4;if(io.indexOf(Eo)===-1)return null;if(console.log("change1:",Ur,br,Ba,fi,va,es,fa,Eo),va>=0&&fi.ch-va<5){var ms=va+$a;return wo.replaceRange("",{line:fi.line,ch:va},{line:fi.line,ch:ms}),{line:fi.line,ch:ms}}return null}(0,le.useEffect)(()=>{if(ci){let br=function(Ur,wo){const fi=Ur.getValue();Qr(fi),lo(new Date().getTime()),Ur.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Gt&&(In?Gt(fi,Ps(fi)):Gt(fi))};return ci.on("change",br),()=>{ci.off("change",br)}}},[ci,Gt]),(0,le.useEffect)(()=>{if(ci)if($t==null)ci.setValue(""),Qr("");else{const br=window.scrollY||window.pageYOffset;$t!==ci.getValue()&&(ci.setValue($t),Qr($t),ci.setCursor(Si?1:ci.lineCount(),0),window.scrollTo(0,br))}},[ci,$t]);const Wo=(0,le.useCallback)(br=>{const Ur=ci.getCursor(),wo=ci.getSelection();let fi=wo.split(`
|
|
|
`);switch(br){case"bold":return ci.replaceSelection("**"+wo+"**"),wo===""&&ci.setCursor(Ur.line,Ur.ch+2),ci.focus();case"italic":return ci.replaceSelection("*"+wo+"*"),wo===""&&ci.setCursor(Ur.line,Ur.ch+1),ci.focus();case"code":return ci.replaceSelection("`"+wo+"`"),wo===""&&ci.setCursor(Ur.line,Ur.ch+1),ci.focus();case"inline-latex":return Hr("inline-latex"),ci.focus();case"latex":return ci.replaceSelection("```latex\n"+wo+"\n```"),ci.setCursor(Ur.line+1,wo.length+1),ci.focus();case"line-break":return ci.replaceSelection(`<br/>
|
|
|
`),ci.focus();case"list-ul":return wo===""?ci.replaceSelection("- "+wo):ci.replaceSelection(fi.map(Ba=>Ba===""?"":`- ${Ba}`).join(`
|
|
|
`)),ci.focus();case"list-ol":return wo===""?ci.replaceSelection("1. "+wo):ci.replaceSelection(fi.map((Ba,Eo)=>Ba===""?"":`${Eo+1}. ${Ba}`).join(`
|
|
|
`)),ci.focus();case"add-null-ch":return wo===""&&ci.setCursor(Ur.line,Ur.ch),ci.replaceSelection(Ni),ci.focus();case"add-signal":return wo===""&&ci.setCursor(Ur.line,Ur.ch),ci.replaceSelection(hr),ci.focus();case"add-multiple":return wo===""&&ci.setCursor(Ur.line,Ur.ch),ci.replaceSelection(io),ci.focus();case"inster-template-1":return wo===""&&ci.setCursor(Ur.line,Ur.ch),ci.replaceSelection(De),ci.focus();case"eraser":return ci.setValue(""),ci.focus();case"trigger-watch":return Jt(!Cr),ci.focus();case"trigger-full-screen":return mr(!gi),ci.focus();case Yn:Hr(Yn);return;case ji:Hr(ji);return;case mi:Hr(mi);return;case An:Hr(An);return;case"maths-latex":Hr("maths-latex");return;case jn:Hr(jn);return;case Wi:Hr(Wi);return;default:throw new Error}},[ci,Cr,gi]),Hi=(0,le.useCallback)((br,Ur)=>{var wo,fi,Ba,Eo,es,fa;switch(Hr(""),tr){case Yn:const{title:Rs,link:Zs}=br;return ci.replaceSelection(`[${Rs}](${Zs})`),ci.focus();case ji:const{language:Bn,content:Fs}=br;return ci.replaceSelection(["```"+Bn,Fs,"```"].join(`
|
|
|
`)),ci.focus();case"maths-latex":for(var va=atob(br),$a=new Uint8Array(va.length),ms=0;ms<va.length;ms++)$a[ms]=va.charCodeAt(ms);var fs=new Blob([$a],{type:"image/png"});(0,_t.I)(fs,dl=>{dl.id?ci.replaceSelection(``):(dl==null?void 0:dl.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":ci.replaceSelection("`$$"+br+"$$`");break;case mi:case An:case wi:const{src:Go,alt:kl}=br,_s=Ur,sl=(Ba=(fi=(wo=_s==null?void 0:_s.name)==null?void 0:wo.split("."))==null?void 0:fi.pop)==null?void 0:Ba.call(fi);return((Eo=_s==null?void 0:_s.type)==null?void 0:Eo.indexOf("image"))>-1||!(_s!=null&&_s.type)?kl?ci.replaceSelection(``):ci.replaceSelection(``):((es=_s==null?void 0:_s.type)==null?void 0:es.indexOf("video"))>-1?ci.replaceSelection(`<video width="100%" controls src="${Go}"></video>`):((fa=_s==null?void 0:_s.type)==null?void 0:fa.indexOf("pdf"))>-1?ci.replaceSelection(`<a href="${Go}?type=${_s.type}&disposition=inline" target="_blank">${_s.name}</a>`):Ei.includes(sl)?ci.replaceSelection(`<a href="${Go}?type=office&disposition=inline" target="_blank">${_s.name}</a>`):ci.replaceSelection(`[${_s.name}](${Go})`),ci.focus();case Wi:const{row:yu,col:Kl,align:gs}=br;let ya=`
|
|
|
`;for(let dl=0;dl<yu;dl++){let Vo=[],Ea=[];for(let ua=0;ua<Kl;ua++)dl===1&&Ea.push(Mr[gs]),Vo.push(" ");dl===1&&(ya+=`| ${Ea.join(" | ")} |
|
|
|
`),ya+=`| ${Vo.join(Kl===1?"":" | ")} |
|
|
|
`}return ci.replaceSelection(ya+`
|
|
|
`),ci.focus();default:throw new Error}},[ci,tr]),st=(0,le.useMemo)(()=>{switch(tr){case Yn:return le.createElement(Sn,{callback:Hi,onCancel:_o});case ji:return le.createElement(Pn.Z,{callback:Hi,onCancel:_o});case mi:return le.createElement(_t.Z,{callback:Hi,onCancel:_o});case jn:return le.createElement(Bt,{callback:Hi,onCancel:_o});case Wi:return le.createElement(dt,{callback:Hi,onCancel:_o});case"maths-latex":return le.createElement(Rn,{showSaveButton:!0,callback:Hi});case"inline-latex":return le.createElement(Vn.Z,{showSaveButton:!0,callback:Hi});default:return null}},[tr]);function _o(){Hr("")}(0,le.useEffect)(()=>{if(Ro.current){let br=function(es){Ba=!0,Eo=es.pageY},Ur=function(){Ba=!1},wo=function(es){if(Ba){let fa=es.pageY-Eo;fa<0&&(fa=0),fa>300&&(fa=300);let va=wt+fa+"px";jr(va)}},fi=Ro.current,Ba=!1,Eo=0;return fi.addEventListener("mousedown",br),document.addEventListener("mousemove",wo),document.addEventListener("mouseup",Ur),()=>{fi.removeEventListener("mousedown",br),document.removeEventListener("mousemove",wo),document.removeEventListener("mouseup",Ur)}}},[ci,Ro]),(0,le.useEffect)(()=>{jr(wt)},[wt]);const Ia=Pr(Zt),Ma=Pr(Wr),xs={width:Ia,height:Ma},Wa=(0,le.useMemo)(()=>{if(Lr){let br=new Date(Lr),Ur=br.getHours(),wo=br.getMinutes(),fi=br.getSeconds();return Ur=Ur<10?"0"+Ur:Ur,wo=wo<10?"0"+wo:wo,fi=fi<10?"0"+fi:fi,`${Ur}:${wo}:${fi}`}return 0},[Lr]),Ps=br=>{const Ur=[];if(In){let wo=-1;br=br.replace(/(@▁▁@|@▁@)/g,function(fi,Ba,Eo){Ur.push({multiLine:fi!==hr})})}return Ur};function Lo(){window.sessionStorage.removeItem(dn),$n(!1),lo(0)}function Po(){$n(!1),lo(0),ci.setValue(window.sessionStorage.getItem(dn))}(0,le.useEffect)(()=>{er[tr]&&tr!==An&&tr!==jn&&setTimeout(()=>{const br=document.getElementsByClassName("markdown-popup-form")[0],Ur=window.innerWidth/2-br.offsetWidth/2,wo=window.innerHeight/2-br.offsetHeight/2;Un(Ur),Ko(wo)},0)},[tr]);const Xr=br=>{br.preventDefault();const Ur=br.clientX-aa,wo=br.clientY-Do;document.body.onmousemove=fi=>{let Ba=fi.clientX-Ur,Eo=fi.clientY-wo;const es=document.getElementsByClassName("markdown-popup-form")[0],fa=window.innerWidth-es.offsetWidth,va=window.innerHeight-es.offsetHeight;Ba=Math.max(0,Math.min(Ba,fa)),Eo=Math.max(0,Math.min(Eo,va)),ha(fi.clientX,fi.clientY,Ur,wo)&&(Un(Ba),Ko(Eo))},document.body.onmouseup=function(){document.body.onmousemove=null}},ha=(br,Ur,wo,fi)=>{const Ba=document.body.clientHeight,Eo=document.body.clientWidth;return br<20&&wo>br||br>Eo-20&&wo<br||Ur<20&&fi>Ur||Ur>Ba-20&&fi<Ur?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return le.createElement(le.Fragment,null,le.createElement("div",{className:"markdown-editor-wrapper",ref:la},le.createElement("div",{className:`markdown-editor-container ${zi} ${Cr?"on-preview":""} ${vn?"mini":""} ${gi?"full-screen":""}`,style:xs},le.createElement(_e,{insertTemp:ct,watch:Cr,fullScreen:gi,showNullButton:zt,showNullProgramButton:In,onActionCallback:Wo,hidetoolBar:Qn,extraUse:$r}),le.createElement("div",{className:"markdown-editor-body"},le.createElement("div",{className:"codemirror-container"},le.createElement("textarea",{ref:Ji,placeholder:Ti})),Cr?le.createElement("div",{ref:Nr,className:"preview-container"},an==="stex"&&le.createElement(at,{value:Yr}),an!=="stex"&&le.createElement(bt.Z,{disabledFill:Fi,showProgramFill:In,value:Yr})):null))),ei?le.createElement("a",{ref:Ro,className:"editor-resize"}):null,tr===An&&le.createElement(_n,{callback:Hi,onCancel:_o}),tr===jn&&le.createElement(Bt,{callback:Hi,onCancel:_o}),le.createElement(Je.Z,null,er[tr]&&tr!==An&&tr!==jn?le.createElement(rn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:aa,top:Do},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:Xr},er[tr]),open:!0,onCancel:_o,footer:null,destroyOnClose:!0,width:tr===jn?"1200px":null,height:tr===jn?"80vh":null,className:"markdown-popup-form"},st):null))}},56030:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return ve},I:function(){return Me}});var le=me(78241),Te=me(8591),He=me(92832),lt=me(3113),We=me(49291),Ve=me(59301),Le=me(59301),Ct=Object.defineProperty,xt=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,bt=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,Oe=(Be,je,_e)=>je in Be?Ct(Be,je,{enumerable:!0,configurable:!0,writable:!0,value:_e}):Be[je]=_e,te=(Be,je)=>{for(var _e in je||(je={}))at.call(je,_e)&&Oe(Be,_e,je[_e]);if(bt)for(var _e of bt(je))mt.call(je,_e)&&Oe(Be,_e,je[_e]);return Be},ee=(Be,je)=>xt(Be,Ue(je));const{useForm:de}=le.default,se={width:280,marginRight:10},he={labelCol:{span:5},wrapperCol:{span:19}};var ve=({callback:Be,onCancel:je})=>{const[_e]=de();let Je=(0,Ve.useRef)();function Xe(Mt){Be(Mt,Je.current)}function ht(Mt,ot){if(Mt.status===-1){Te.ZP.error(Mt.message);return}_e.setFieldsValue({src:`/api/attachments/${Mt.id}`,type:ot.type})}function Ze(Mt){let ot=Mt.target.files[0];Je.current=ot,Me(ot,ht)}return Le.createElement(le.default,ee(te({form:_e},he),{className:"upload-image-panel",onFinish:Xe,style:{width:470,overflow:"hidden"}}),Le.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Le.createElement("div",{className:"flex-container"},Le.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Le.createElement(He.default,{style:se})),Le.createElement(Ee,{onFileChange:Ze}))),Le.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Le.createElement(He.default,{style:{width:264}})),Le.createElement(le.default.Item,{style:{textAlign:"right"}},Le.createElement(lt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Le.createElement(lt.ZP,{type:"default",onClick:je},"\u53D6\u6D88")))};function Ee({onFileChange:Be}){return Le.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Le.createElement("input",{type:"file",onChange:Be}))}function Me(Be,je){if(!Be)throw new String("\u6CA1\u6709\u6587\u4EF6");let _e=new FormData;_e.append("editormd-image-file",Be),_e.append("file_param_name","editormd-image-file"),_e.append("byxhr","true");var Je=new window.XMLHttpRequest;Je.withCredentials=!0,Je.addEventListener("load",function(Xe){je(JSON.parse(Xe.target.responseText),Be)},!1),Je.addEventListener("error",function(Xe){console.error(Xe)},!1),Je.open("POST",`${We.KI}/api/attachments.json`),Je.send(_e)}},19647:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return He}});var le=me(59301),Te=me(4676);class He extends le.Component{constructor(We){super(We);const Ve=window.document;this.node=Ve.createElement("div"),Ve.body.appendChild(this.node)}render(){const{children:We}=this.props;return(0,Te.createPortal)(We,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},57800:function(Tn,xn,me){"use strict";me.d(xn,{SV:function(){return ut},ZP:function(){return xe}});var le=me(59301),Te=me(76374);const He={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"]},lt={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"]},We={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},Ve={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},Le={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 Ct=me(7947),xt=me.n(Ct),Ue=Object.defineProperty,bt=Object.defineProperties,at=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(Bt,Qe,it)=>Qe in Bt?Ue(Bt,Qe,{enumerable:!0,configurable:!0,writable:!0,value:it}):Bt[Qe]=it,de=(Bt,Qe)=>{for(var it in Qe||(Qe={}))Oe.call(Qe,it)&&ee(Bt,it,Qe[it]);if(mt)for(var it of mt(Qe))te.call(Qe,it)&&ee(Bt,it,Qe[it]);return Bt},se=(Bt,Qe)=>bt(Bt,at(Qe)),he=(Bt,Qe,it)=>new Promise((Ft,Nt)=>{var dt=sn=>{try{wn(it.next(sn))}catch(qt){Nt(qt)}},Kt=sn=>{try{wn(it.throw(sn))}catch(qt){Nt(qt)}},wn=sn=>sn.done?Ft(sn.value):Promise.resolve(sn.value).then(dt,Kt);wn((it=it.apply(Bt,Qe)).next())});const ve={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},Ee=(Bt,Qe)=>Qe.map(it=>({label:it,kind:Bt.languages.CompletionItemKind.Keyword,insertText:it})),Me=Bt=>Object.keys(ve.tables).map(Qe=>({label:Qe,kind:Bt.languages.CompletionItemKind.Variable,insertText:Qe})),Be=(Bt,Qe)=>{const it=ve.tables[Bt];return it?it.map(Ft=>({label:Ft,kind:Qe.languages.CompletionItemKind.Field,insertText:Ft})):[]};function je(Bt,Qe,it,Ft,Nt){let dt=Qe.getWordUntilPosition(it),Kt={startLineNumber:it.lineNumber,endLineNumber:it.lineNumber,startColumn:dt.startColumn,endColumn:dt.endColumn},wn=Ft.map(sn=>({label:sn,kind:Bt.languages.CompletionItemKind.Keyword,insertText:sn,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Kt}));return Nt.map(sn=>{wn.push(se(de({},sn),{range:Kt}))}),wn}var _e=Bt=>{ve.languages.map(Nt=>(Bt.languages.registerDocumentFormattingEditProvider(Nt,{provideDocumentFormattingEdits(dt,Kt,wn){return he(this,null,function*(){const sn=xt()(dt.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:dt.getFullModelRange(),text:sn}]})}}),Nt));const Qe=We.quickKey.map(Nt=>({label:Nt.label,kind:Bt.languages.CompletionItemKind.Method,insertText:Nt.content,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),it=Ve.quickKey.map(Nt=>({label:Nt.label,kind:Bt.languages.CompletionItemKind.Method,insertText:Nt.content,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ft=lt.quickKey.map(Nt=>({label:Nt.label,kind:Bt.languages.CompletionItemKind.Method,insertText:Nt.content,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Bt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Nt,dt){var Kt=Nt.getWordUntilPosition(dt),wn={startLineNumber:dt.lineNumber,endLineNumber:dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},sn=Nt.getLineContent(dt.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...We.keywords.map(qt=>({label:qt,kind:Bt.languages.CompletionItemKind.Function,documentation:qt,insertText:qt,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn})),...We.quickKey.map(qt=>({label:qt.label,kind:Bt.languages.CompletionItemKind.Function,documentation:qt.content,insertText:sn.startsWith("#")?qt.content.replace(/#/,""):qt.content,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn}))]}}}),Bt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Nt,dt){var Kt=Nt.getWordUntilPosition(dt),wn={startLineNumber:dt.lineNumber,endLineNumber:dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn};return{suggestions:[...He.keywords.map(sn=>({label:sn,kind:Bt.languages.CompletionItemKind.Function,documentation:sn,insertText:sn,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn}))]}}}),Bt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Nt,dt){var Kt=Nt.getWordUntilPosition(dt),wn={startLineNumber:dt.lineNumber,endLineNumber:dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},sn=Nt.getLineContent(dt.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...lt.keywords.map(qt=>({label:qt,kind:Bt.languages.CompletionItemKind.Function,documentation:qt,insertText:qt,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn})),...lt.quickKey.map(qt=>({label:qt.label,kind:Bt.languages.CompletionItemKind.Function,documentation:qt.content,insertText:sn.startsWith("#")?qt.content.replace(/#/,""):qt.content,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn}))]}}}),Bt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Nt,dt){var Kt=Nt.getWordUntilPosition(dt),wn={startLineNumber:dt.lineNumber,endLineNumber:dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},sn=Nt.getLineContent(dt.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...Le.keywords.map(qt=>({label:qt,kind:Bt.languages.CompletionItemKind.Function,documentation:qt,insertText:qt,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn})),...Le.quickKey.map(qt=>({label:qt.label,kind:Bt.languages.CompletionItemKind.Function,documentation:qt.content,insertText:sn.startsWith("#")?qt.content.replace(/#/,""):qt.content,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn}))]}}}),Bt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Nt,dt){var Kt=Nt.getWordUntilPosition(dt),wn={startLineNumber:dt.lineNumber,endLineNumber:dt.lineNumber,startColumn:Kt.startColumn,endColumn:Kt.endColumn},sn=Nt.getLineContent(dt.lineNumber).substring(Kt.startColumn-2,Kt.endColumn);return{suggestions:[...Ve.keywords.map(qt=>({label:qt,kind:Bt.languages.CompletionItemKind.Function,documentation:qt,insertText:qt,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn})),...Ve.quickKey.map(qt=>({label:qt.label,kind:Bt.languages.CompletionItemKind.Function,documentation:qt.content,insertText:sn.startsWith("#")?qt.content.replace(/#/,""):qt.content,insertTextRules:Bt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wn}))]}}})};const Je="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Xe=Object.defineProperty,ht=(Bt,Qe,it)=>Qe in Bt?Xe(Bt,Qe,{enumerable:!0,configurable:!0,writable:!0,value:it}):Bt[Qe]=it,Ze=(Bt,Qe,it)=>ht(Bt,typeof Qe!="symbol"?Qe+"":Qe,it);const Mt=class mS{constructor(Qe,it,Ft){this.placeholder=Qe,this.editor=it,this.monaco=Ft,it.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mS.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};Ze(Mt,"ID","editor.widget.placeholderHint");var Ot=Mt,Pt=me(96236),Dt=me(8591),Wt=me(6848),Lt=me(89392),qe=me(50484),Ke=me(56102),Rt=Object.defineProperty,Sn=Object.defineProperties,Pn=Object.getOwnPropertyDescriptors,_t=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,Wn=(Bt,Qe,it)=>Qe in Bt?Rt(Bt,Qe,{enumerable:!0,configurable:!0,writable:!0,value:it}):Bt[Qe]=it,un=(Bt,Qe)=>{for(var it in Qe||(Qe={}))rn.call(Qe,it)&&Wn(Bt,it,Qe[it]);if(_t)for(var it of _t(Qe))ln.call(Qe,it)&&Wn(Bt,it,Qe[it]);return Bt},_n=(Bt,Qe)=>Sn(Bt,Pn(Qe)),St=(Bt,Qe)=>{var it={};for(var Ft in Bt)rn.call(Bt,Ft)&&Qe.indexOf(Ft)<0&&(it[Ft]=Bt[Ft]);if(Bt!=null&&_t)for(var Ft of _t(Bt))Qe.indexOf(Ft)<0&&ln.call(Bt,Ft)&&(it[Ft]=Bt[Ft]);return it},Zn=(Bt,Qe,it)=>new Promise((Ft,Nt)=>{var dt=sn=>{try{wn(it.next(sn))}catch(qt){Nt(qt)}},Kt=sn=>{try{wn(it.throw(sn))}catch(qt){Nt(qt)}},wn=sn=>sn.done?Ft(sn.value):Promise.resolve(sn.value).then(dt,Kt);wn((it=it.apply(Bt,Qe)).next())});function li(Bt){return/^\d+$/.test(Bt)?`${Bt}px`:Bt}function Ge(){}let be=!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 Ae(Bt=[]){let Qe=Bt;if(Array.isArray(Bt)){for(let it=0;it<Bt.length;it++){let Ft=Pe[Bt[it]];if(Ft)return Ft}return Qe[0]}return Pe[Qe]||Qe}let Ne=null;var xe=Bt=>{var Qe=Bt,{width:it="100%",height:Ft="100%",value:Nt,language:dt="javascript",style:Kt={},options:wn={},overrideServices:sn={},theme:qt="vs-dark",onEditBlur:Rn,isCopy:Vn=!1,onSave:hn,autoHeight:Yn=!1,forbidCopy:mi=!1,onChange:jn=Ge,editorDidMount:An=Ge,onFocus:wi=Ge,onBreakPoint:ji=Ge,breakPointValue:Wi=[],filename:dr="educoder.txt",errorLine:Mr,errorContent:pi="",highlightLine:ui,openBreakPoint:Ci=!1,placeholder:Xi=""}=Qe,Ni=St(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 io=(0,le.useRef)(),hr=(0,le.useRef)({}),De=(0,le.useRef)(),Ei=(0,le.useRef)(),Pr=(0,le.useRef)([]),Ln=(0,le.useRef)(!1),vi=(0,le.useRef)(),Zi=(0,le.useRef)(),er=(0,le.useRef)(!1),[Gn,$t]=(0,le.useState)(!1);function Gt(){let tn;return io.current&&(tn=new Te.Z(fn=>{for(let kn of fn)(kn.target.offsetHeight>0||kn.target.offsetWidth>0)&&hr.current.instance.layout()}),tn.observe(io.current)),tn}function Zt(){Dt.ZP.warning({content:decodeURIComponent(Je),key:"monaco-editor-tip"})}const wt=()=>{let tn=hr.current.instance;if(Nt!=null&&tn&&Gn){const fn=tn.getModel();fn&&Nt!==fn.getValue()&&(be=!0,fn.setValue(Nt),tn.layout(),be=!1)}};(0,le.useEffect)(()=>{const tn=qe.Z.subscribe("formatDocument",fn=>{var kn;let zi=hr.current.instance;(kn=zi==null?void 0:zi.getAction)==null||kn.call(zi,"editor.action.formatDocument").run()});return window.updateMonacoValue=fn=>{jn(fn)},tn},[]),(0,le.useEffect)(()=>{var tn;let fn=hr.current.instance;Ei.current&&clearTimeout(Ei.current),Ei.current=setTimeout(()=>{wt()},500),Nt&&(Nt!=null&&Nt.length)&&((tn=fn==null?void 0:fn.updateOptions)==null||tn.call(fn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Nt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Nt,Gn,hr.current]),(0,le.useEffect)(()=>{if(Mr&&hr.current&&hr.current.instance){let fn=hr.current.instance;fn.changeViewZones(function(kn){var zi=document.createElement("div");zi.style.padding="10px 20px",zi.style.width="calc(100% - 20px)",zi.className="my-error-line-wrp",zi.innerHTML=pi,kn.addZone({afterLineNumber:Mr||11,heightInLines:3,domNode:zi})});var tn={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}};fn.addOverlayWidget(tn),fn.revealPositionInCenter({lineNumber:20,column:1})}},[Mr,hr.current,Gn]);const vn=(tn="",fn)=>{if(!tn||tn.trim()==="")return!0;const zi=hr.current.instance.getModel().getLineTokens(fn);let Di=!1;for(let Si=0;Si<2;Si++)zi.getStandardTokenType(Si)===1&&(Di=!0);return Di};(0,le.useEffect)(()=>{var tn;const fn=(tn=hr.current)==null?void 0:tn.instance;if(fn&&Gn&&mi){const kn=fn.onDidBlurEditorWidget(()=>{er.current=!1}),zi=fn.onDidFocusEditorText(()=>{er.current=!0});return()=>{kn.dispose(),zi.dispose()}}},[hr.current,Gn,mi]),(0,le.useEffect)(()=>{var tn;if((tn=hr.current)!=null&&tn.instance&&Gn&&Ci){let fn=hr.current.instance,kn=fn.getModel();if(!kn)return;(()=>{var Cr;let Jt=[],gi=[];const mr=kn.getAllDecorations();for(let Hr of mr)Hr.options.className==="highlighted-line"&&(Jt.push((Cr=Hr==null?void 0:Hr.range)==null?void 0:Cr.startLineNumber),gi.push(Hr==null?void 0:Hr.id));if(ui===Jt[0])return;kn.deltaDecorations(gi,[]);const tr=kn.getLineCount();ui&&ui<=tr&&(fn.deltaDecorations([],[{range:new Ne.Range(ui,1,ui,kn.getLineMaxColumn(ui)),options:{isWholeLine:!0,className:"highlighted-line"}}]),fn.revealLineInCenter(ui))})();const Di=(Cr=!1)=>{var Jt;let gi=[],mr=[];const tr=kn.getAllDecorations();for(let Hr of tr)Hr.options.linesDecorationsClassName==="breakpoints-select"&&(gi.push((Jt=Hr==null?void 0:Hr.range)==null?void 0:Jt.startLineNumber),mr.push(Hr==null?void 0:Hr.id));if(Cr)return{lines:gi,ids:mr};ji(gi)},Si=Cr=>Zn(void 0,null,function*(){let Jt={range:new Ne.Range(Cr,1,Cr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield kn.deltaDecorations([],[Jt]),Di()}),Fi=Cr=>Zn(void 0,null,function*(){let Jt=[];const gi=fn.getLineDecorations(Cr);for(let mr of gi)mr.options.linesDecorationsClassName==="breakpoints-select"&&Jt.push(mr.id);yield kn.deltaDecorations(Jt,[]),Di()}),Ti=Cr=>{let Jt=fn.getLineDecorations(Cr);for(let gi of Jt)if(gi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Lt.isEqual)(Wi,Di(!0).lines)){kn.deltaDecorations(Di(!0).ids,[]);const Cr=Wi.map(Jt=>({range:new Ne.Range(Jt,1,Jt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));kn.deltaDecorations([],Cr)}const nr=fn.onDidChangeModelContent(Cr=>{let Jt=fn.getPosition();if(Jt){let gi=Jt.lineNumber;clearTimeout(Zi.current),Zi.current=setTimeout(()=>{vn(kn.getLineContent(gi),gi)?Fi(gi):Ti(gi)?(Fi(gi),Si(gi)):Di()},100)}}),$r=fn.onMouseDown(Cr=>{var Jt,gi,mr;if(Cr.target.detail&&((mr=(gi=(Jt=Cr.target)==null?void 0:Jt.element)==null?void 0:gi.className)!=null&&mr.includes("line-numbers"))){let tr=Cr.target.position.lineNumber;if(vn(kn.getLineContent(tr),tr))return;Ti(tr)?Fi(tr):Si(tr)}}),ci=Cr=>{let Jt={range:new Ne.Range(Cr,1,Cr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Pr.current=fn.deltaDecorations(Pr.current,[Jt])},Ki=()=>{Pr.current=fn.deltaDecorations(Pr.current,[])},Yr=fn.onMouseMove(Cr=>{var Jt,gi,mr;if(Ki(),Cr.target.detail&&((mr=(gi=(Jt=Cr.target)==null?void 0:Jt.element)==null?void 0:gi.className)!=null&&mr.includes("line-numbers"))){let tr=Cr.target.position.lineNumber;if(vn(kn.getLineContent(tr),tr))return;ci(tr)}}),Qr=fn.onMouseLeave(()=>{Ki()});return()=>{nr.dispose(),$r.dispose(),Yr.dispose(),Qr.dispose()}}},[hr.current,Gn,Wi,ui,Ci,dt]),(0,le.useEffect)(()=>{var tn;(tn=hr.current)!=null&&tn.instance&&Ci&&hr.current.instance.setPosition({lineNumber:0,column:0})},[ui]);function cn(){let tn=hr.current.instance;if(tn){const fn=tn.getSelection(),kn=hr.current.pastePos||{},zi=new Ne.Range(kn.startLineNumber||fn.endLineNumber,kn.startColumn||fn.endColumn,kn.endLineNumber||fn.endLineNumber,kn.endColumn||fn.endColumn);setTimeout(()=>{tn.executeEdits("",[{range:zi,text:""}])},300)}}function It(tn){(window.navigator.platform.match("Mac")?tn.metaKey:tn.ctrlKey)&&tn.keyCode==83&&(tn.preventDefault(),hn())}const ct=()=>{if(Yn&&hr.current.instance){const tn=hr.current.instance.getContentHeight();Qn(tn<Ft?Ft:tn)}else Qn(Ft)};function an(tn){var fn=document.createEvent("MouseEvents");fn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),tn.dispatchEvent(fn)}const dn=tn=>{if(!er.current)return;const{keyCode:fn,ctrlKey:kn,metaKey:zi,target:Di,type:Si}=tn;return(Si==="paste"||(fn===67||fn===86)&&(zi||kn))&&Di.nodeName==="TEXTAREA"&&(Zt(),tn.preventDefault()),!1};function ei(tn,fn){var kn=window.URL||window.webkitURL||window,zi=new Blob([fn]),Di=document.createElementNS("http://www.w3.org/1999/xhtml","a");Di.href=kn.createObjectURL(zi),Di.download=tn,an(Di)}(0,le.useEffect)(()=>{ct()},[ct]),(0,le.useEffect)(()=>{io.current&&!Gn&&Promise.all([me.e(8909),me.e(6894)]).then(me.bind(me,71448)).then(tn=>{try{Ne=tn,hr.current.instance=Ne.editor.create(io.current,{value:Nt,language:Ae(dt),theme:qt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},sn);const fn=hr.current.instance;let Di=[...Pt.BH._menuItems].find(nr=>nr[0]._debugName=="EditorContext")[1],Si=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Fi=(nr,$r)=>{var ci,Ki;let Yr=nr._first;do $r.includes((Ki=(ci=Yr.element)==null?void 0:ci.command)==null?void 0:Ki.id)&&nr._remove(Yr);while(Yr=Yr.next)};if(An(fn,Ne),setTimeout(()=>{ct(),hr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{ei(dr||"educoder.txt",fn.getValue())}})},500),hr.current.subscription=fn.onDidChangeModelContent(nr=>{Ln.current?clearTimeout(vi.current):(ct(),jn(fn.getValue(),nr)),vi.current=setTimeout(()=>{Ln.current=!1},500)}),window.Monaco||_e(Ne,Ae(dt)),mi&&(Fi(Di,Si),io.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",dn),window.removeEventListener("paste",dn),window.addEventListener("keydown",dn),window.addEventListener("paste",dn)),window.Monaco=Ne,Rn&&fn.onDidBlurEditorWidget(()=>{Rn(fn.getValue())}),wi&&fn.onDidFocusEditorText(()=>{wi(fn.getValue())}),mi)try{fn.onDidPaste(nr=>{const $r=fn.getSelection(),ci=hr.current.pastePos||{},Ki=new Ne.Range(ci.startLineNumber||$r.endLineNumber,ci.startColumn||$r.endColumn,ci.endLineNumber||$r.endLineNumber,ci.endColumn||$r.endColumn);fn.executeEdits("",[{range:nr.range,text:""}])})}catch(nr){}let Ti=Gt();return Xi&&typeof Xi=="string"&&new Ot(Xi,fn,Ne),$t(!0),()=>{const nr=hr.current.instance;nr.dispose();const $r=nr.getModel();$r&&$r.dispose(),hr.current.subscription&&hr.current.subscription.dispose(),Ti.unobserve(io.current)}}catch(fn){}})},[]),(0,le.useEffect)(()=>{if(hr.current.instance&&Gn)return document.addEventListener("keydown",It,!1),()=>{document.removeEventListener("keydown",It)}},[hn,Gn]),(0,le.useEffect)(()=>{let tn=hr.current.instance;if(tn&&Gn){let fn=Ae(dt);Ne.editor.setModelLanguage(tn.getModel(),fn)}},[dt,Gn]),(0,le.useEffect)(()=>{hr.current.instance&&Gn&&Ne.editor.setTheme(qt)},[qt,Gn]),(0,le.useEffect)(()=>{let tn=hr.current.instance;De.current=wn,tn&&Gn&&(tn.updateOptions(un({},wn)),setTimeout(()=>{tn.getModel().updateOptions(un({},wn))},200))},[JSON.stringify(wn),Gn]),(0,le.useEffect)(()=>{let tn=hr.current.instance;tn&&Gn&&tn.layout()},[it,Ft,Gn]);const[pn,zt]=(0,le.useState)(li(it)),[In,Qn]=(0,le.useState)(li(Ft)),xi=_n(un({},Kt),{width:pn,height:In,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:io,style:xi},Vn&&le.createElement(Ke.CopyToClipboard,{text:Nt,onCopy:()=>Dt.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(Wt.Z,{title:"\u590D\u5236\u4EE3\u7801"},le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function ut({width:Bt="100%",height:Qe="100%",original:it,modified:Ft,language:Nt,options:dt={}}){const Kt=(0,le.useRef)(),[wn,sn]=(0,le.useState)(null);function qt(Yn){let mi;return Kt.current&&(mi=new Te.Z(jn=>{for(let An of jn)(An.target.offsetHeight>0||An.target.offsetWidth>0)&&Yn.layout()}),mi.observe(Kt.current)),mi}(0,le.useEffect)(()=>(Kt.current&&Promise.all([me.e(8909),me.e(9404)]).then(me.bind(me,2550)).then(Yn=>{Ne=Yn;const mi=Ne.editor.createDiffEditor(Kt.current,_n(un({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},dt),{wordWrap:!0}));sn(mi);let jn=qt(mi);return()=>{mi.dispose();const An=mi.getModel();An&&An.dispose(),jn.unobserve(Kt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{wn&&wn.setModel({original:Ne.editor.createModel(it,Nt),modified:Ne.editor.createModel(Ft,Nt)})},[it,Ft,Nt,wn]);const Rn=li(Bt),Vn=li(Qe),hn={width:Rn,height:Vn};return le.createElement("div",{className:"my-diff-editor",ref:Kt,style:hn})}},15965:function(Tn,xn,me){"use strict";me.d(xn,{jL:function(){return We},w9:function(){return rn},QD:function(){return jn},cQ:function(){return Ke},op:function(){return qt},O5:function(){return er},_b:function(){return Mr},t7:function(){return se},Gi:function(){return Zn},YG:function(){return _n},qp:function(){return bt},vr:function(){return ji},qE:function(){return hn},Je:function(){return Ee},wb:function(){return Pt},cq:function(){return Ne},tp:function(){return Oe}});var le=me(59301),Te={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"},He="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==",We=({dataSource:Gn=[],img:$t,imgWidth:Gt=346,title:Zt,sunTitle:wt,bannerExtraContent:vn})=>le.createElement("div",{className:Te.banner},le.createElement("div",{className:Te.content},le.createElement("aside",null,le.createElement("p",null,le.createElement("b",null,Zt),le.createElement("span",null,wt)),Gn.length>0&&le.createElement("div",{className:Te.btns},Gn.map((cn,It)=>le.createElement("div",{key:It,onClick:cn.click},cn.name,cn.sign?le.createElement("img",{src:He,width:39}):null))),vn),$t&&le.createElement("img",{style:{marginTop:33,marginRight:38},src:$t,width:Gt}))),Ve={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"},Le=me(92310),Ct=me.n(Le),xt=me(89392),bt=({dataSource:Gn=[],value:$t,onChange:Gt,onTitleChange:Zt,className:wt,title:vn,titleWidth:cn=41,style:It={},fontColor:ct="#6A7283",showCount:an})=>{const[dn,ei]=(0,le.useState)(0),[pn,zt]=(0,le.useState)(!1),In=(0,le.useRef)(null),Qn=(0,le.useRef)(null);return(0,le.useEffect)(()=>{var xi;Gn.length!==0&&(((xi=In==null?void 0:In.current)==null?void 0:xi.clientHeight)>97?ei(1):ei(0)),Gn.length===0&&ei(0),zt(!1)},[Gn]),le.createElement("div",{className:Ct()(Ve.row,wt),style:It},le.createElement("div",{onClick:(0,xt.throttle)(()=>Zt==null?void 0:Zt(),2e3),style:{width:cn,marginTop:pn?12:4},className:`${Ve.title} ${Zt?"current":""}`},vn),le.createElement("div",{className:pn?`${Ve.tagsWrap} ${Ve.tagsBorderWrap}`:Ve.tagsWrap},le.createElement("div",{className:Ve.bar,ref:Qn,style:dn>0?{height:dn===1?97:"auto",overflow:dn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},le.createElement("div",{className:Ve.tag,ref:In},Gn==null?void 0:Gn.map(xi=>le.createElement("span",{onClick:()=>Gt(xi.id),key:xi.id,style:{color:ct},className:$t===xi.id?Ve.active:""},le.createElement("span",{title:xi.name,className:Ve.name},xi.name),!!an&&le.createElement("span",{className:Ve.num},xi.count))))),!!dn&&le.createElement(le.Fragment,null,dn===1?le.createElement("div",{onClick:()=>{var xi;ei(2),((xi=In==null?void 0:In.current)==null?void 0:xi.clientHeight)>245?zt(!0):zt(!1)},className:Ve.action},"\u5C55\u5F00",le.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):le.createElement("div",{onClick:()=>{Qn.current.scrollTop=0,ei(1),zt(!1)},className:Ve.action},"\u6536\u8D77",le.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},at={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"},Oe=({dataSource:Gn=[],value:$t,onChange:Gt,className:Zt,style:wt={}})=>le.createElement("div",{style:wt,className:Ct()(at.tabs,Zt)},Gn.map(vn=>le.createElement("span",{onClick:()=>Gt(vn.id),className:$t===vn.id?at.active:"",key:vn.id},vn.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=me(92832),se=({dataSource:Gn=[],value:$t="",onChange:Gt,onInputChange:Zt=()=>{},className:wt,style:vn={},placeholder:cn,allowClear:It=!1})=>{var ct;const[an,dn]=(0,le.useState)(""),[ei,pn]=(0,le.useState)("");(0,le.useEffect)(()=>{var Qn;let xi=$t;(Qn=JSON.stringify($t))!=null&&Qn.includes("{")&&(dn($t.id),xi=$t.value||"");try{pn(decodeURIComponent(xi||""))}catch(tn){pn(decodeURIComponent(xi||""))}},[$t]);const zt=()=>{Gt(encodeURIComponent(ei),an||null)},In=Qn=>{Qn!==an&&(dn(Qn),Gt(encodeURIComponent(ei),Qn))};return le.createElement("div",{className:Ct()(te.input,wt),style:vn},!!Gn.length&&le.createElement("div",{className:te.dropdown},le.createElement("div",{className:te.text},(ct=Gn.find(Qn=>Qn.id===an))==null?void 0:ct.name,le.createElement("i",{className:"iconfont icon-zhankai4"}),le.createElement("b",{className:te.b1}),le.createElement("b",{className:te.b2})),le.createElement("div",{className:te.menu},Gn.map((Qn,xi)=>le.createElement("div",{key:xi,onClick:()=>In(Qn.id)},Qn.name)))),le.createElement(ee.default,{onPressEnter:zt,value:ei,onChange:Qn=>{pn(Qn.target.value),Zt(encodeURIComponent(Qn.target.value),an||null)},bordered:!1,placeholder:cn}),le.createElement("i",{onClick:zt,className:"iconfont icon-sousuo9 font14 pl10 current"}))},he={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},Ee=({value:Gn,onChange:$t,className:Gt,total:Zt,pageSize:wt,style:vn={}})=>{const cn=Gn<2,It=Gn>=Math.ceil(Zt/wt);return Zt<=wt?le.createElement(le.Fragment,null):le.createElement("div",{className:Ct()(he.quickPager,Gt),style:vn},le.createElement("div",{onClick:()=>{cn||$t(Gn-1,"prev")},className:cn?he.disabled:""},"\u4E0A\u4E00\u9875"),le.createElement("div",{onClick:()=>{It||$t(Gn+1,"next")},className:It?he.disabled:""},"\u4E0B\u4E00\u9875"))},Me={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Be=me(71418),je=me(6848),_e=me(13570),Je=me(38446),Xe=me(88230),ht=me(96908),Ze=me(57177),Mt=me(81378),ot=me(57816),Pt=({className:Gn,dataSource:$t=[],col:Gt=4,right:Zt,bottom:wt=23,precision:vn=0,wrapWidth:cn=1200,trackEventItems:It,loading:ct})=>{const an=Math.floor((cn-(Gt-1)*Zt)/Gt);return le.createElement(Be.Z,{spinning:ct},le.createElement("div",{className:Ct()(Me.list,Gn)},!!$t.length&&$t.map((dn,ei)=>{const{name:pn,id:zt,identifier:In,power:Qn,cover_image_id:xi,pic:tn}=dn;return le.createElement("div",{className:Me.wrap,key:zt,style:{width:an,marginRight:(1+ei)%Gt===0?0:Zt+vn,marginBottom:wt}},le.createElement("a",{target:"_blank",href:`/shixuns/${In}/challenges`,className:Me.li,onClick:fn=>{fn.preventDefault(),It&&(0,Xe.L9)([It]),Qn&&(0,Xe.xg)(`/shixuns/${In}/challenges`)}},le.createElement("div",{className:Me.img},le.createElement("img",{className:Me.cover,src:`${tn}`}),dn.is_jupyter&&le.createElement("img",{className:Me.sign,src:ht}),dn.is_jupyter_lab&&le.createElement("img",{className:Me.sign,src:Ze}),dn.is_unity_3d&&le.createElement("img",{className:Me.sign,src:Mt})),le.createElement("div",{className:Me.name},le.createElement(je.Z,{title:pn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},le.createElement("span",{className:Me.e},pn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),le.createElement("div",{className:Me.tags},le.createElement(je.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},le.createElement("span",null,le.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),le.createElement("span",null,dn.challenges_count))),!!dn.myshixuns_count&&le.createElement(je.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},le.createElement("span",null,le.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),le.createElement("span",null,dn.myshixuns_count))),le.createElement(je.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},le.createElement("span",null,le.createElement("span",null,dn.level))),le.createElement("div",{className:Me.rate},le.createElement(_e.Z,{allowHalf:!0,disabled:!0,defaultValue:dn.score_info}),le.createElement("span",null,"\xA0",dn.score_info?`${dn.score_info}\u5206`:"5\u5206")))),!Qn&&le.createElement("div",{className:Me.lockWrap},le.createElement("img",{src:`${Je.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),le.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!$t.length&&le.createElement(ot.Z,null)))},Dt={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"},Wt=me(73898),Lt=me(59301),Ke=({className:Gn,dataSource:$t=[],col:Gt=4,right:Zt,bottom:wt=23,precision:vn=0,wrapWidth:cn=1200,trackEventItems:It,loading:ct,onRemove:an=()=>{},isCurrent:dn=!0,showAlias:ei=!1})=>{const pn=Math.floor((cn-(Gt-1)*Zt)/Gt),zt=[{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 Lt.createElement(Be.Z,{spinning:ct},Lt.createElement("div",{className:Ct()(Dt.list,Gn)},!!($t!=null&&$t.length)&&($t==null?void 0:$t.map((In,Qn)=>{var xi;const{name:tn,id:fn,identifier:kn,featured:zi,school_name:Di,image_url:Si,excellent:Fi,is_plan:Ti}=In;return Lt.createElement("div",{key:fn,className:Dt.wrap,style:{width:pn,marginRight:(1+Qn)%Gt===0?0:Zt+vn,marginBottom:wt}},Lt.createElement("a",{className:Dt.li,onClick:nr=>{nr.preventDefault(),nr.stopPropagation(),It&&(0,Xe.L9)([It]),(0,Xe.xg)(`/paths/${kn}`)}},Lt.createElement("div",{className:Dt.img},Lt.createElement("img",{className:Dt.cover,src:`${Si}`}),dn&&(0,Wt.bg)()&&(In==null?void 0:In.studying)&&Lt.createElement("div",{className:`${Dt.movebq} user-path-items`,onClick:nr=>{nr.stopPropagation(),an(In)}},Lt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Lt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(xi=In==null?void 0:In.subject_tags)==null?void 0:xi.map((nr,$r)=>{var ci,Ki;if($r===0){const Qr=(ci=zt.find(Cr=>Cr.name==nr))==null?void 0:ci.swimg;return Lt.createElement("img",{className:Dt.sign,src:Qr,style:{left:"-4px"}})}const Yr=(Ki=zt.find(Qr=>Qr.name==nr))==null?void 0:Ki.ptimg;return Lt.createElement("img",{className:Dt.sign,src:Yr,style:{left:`${48+52*($r-1)+2*$r}px`}})}),Lt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(In==null?void 0:In.excellent)&&Lt.createElement("div",{className:Dt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Lt.createElement("div",{className:Dt.name},Lt.createElement(je.Z,{title:ei&&(In!=null&&In.excellent_alias_name)?Lt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${tn}`,Lt.createElement("br",null),Lt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${In==null?void 0:In.excellent_alias_name}`)):tn},Lt.createElement("span",{className:Dt.e},ei&&(In==null?void 0:In.excellent_alias_name)||tn))),Lt.createElement(je.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Di}`},Lt.createElement("div",{className:Dt.unit},Lt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Di)),Lt.createElement("div",{className:Dt.tags},Lt.createElement("div",null,Lt.createElement(je.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Lt.createElement("span",null,Lt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Lt.createElement("span",null,In.stages_count))),Lt.createElement(je.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Lt.createElement("span",null,Lt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Lt.createElement("span",null,In.members_count)))))))})),!$t.length&&Lt.createElement(ot.Z,null)))},Rt={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"},Sn="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",Pn=me(59301),rn=({className:Gn,dataSource:$t=[],col:Gt=4,right:Zt,bottom:wt=23,precision:vn=0,wrapWidth:cn=1200,trackEventItems:It,loading:ct})=>{const an=Math.floor((cn-(Gt-1)*Zt)/Gt);return Pn.createElement(Be.Z,{spinning:ct},Pn.createElement("div",{className:Ct()(Rt.list,Gn)},!!$t.length&&$t.map((dn,ei)=>{const{subject_identifier:pn,id:zt,identifier:In,power:Qn}=dn,xi=dn.is_public!=0&&dn.is_public;return Pn.createElement("div",{className:Rt.wrap,key:zt,style:{width:an,marginRight:(1+ei)%Gt===0?0:Zt+vn,marginBottom:wt}},Pn.createElement("a",{className:Rt.li,onClick:tn=>{tn.preventDefault(),It&&(0,Xe.L9)([It]),(0,Xe.xg)(dn.first_category_url)}},Pn.createElement("div",{className:Rt.top},Pn.createElement(je.Z,{title:dn.name},Pn.createElement("div",{className:Rt.name},dn.name)),Pn.createElement("img",{className:Rt.img,src:Je.Z.IMG_SERVER+"/images/"+dn.avatar_url}),Pn.createElement("div",{className:Rt.text,title:dn.creator},dn.creator),pn&&Pn.createElement("div",{className:Rt.btns},Pn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Pn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),xi&&Pn.createElement("div",{className:Rt.sign},"\u516C\u5F00")),Pn.createElement("div",{className:Rt.bottom},dn.visits>0&&Pn.createElement(je.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Pn.createElement("span",null,Pn.createElement("i",{className:"iconfont icon-liulanyan"}),Pn.createElement("span",null,dn.visits))),dn.course_members_count>0&&Pn.createElement(je.Z,{title:"\u6210\u5458",placement:"bottom"},Pn.createElement("span",null,Pn.createElement("i",{className:"iconfont icon-chengyuan"}),dn.course_members_count)),dn.tasks_count>0&&Pn.createElement(je.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Pn.createElement("span",null,Pn.createElement("i",{className:"iconfont icon-zuoye"}),dn.tasks_count)),dn.is_end?Pn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Pn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!dn.is_accessible&&Pn.createElement("div",{className:Rt.lockWrap},Pn.createElement("img",{src:`${Je.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Pn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!$t.length&&Pn.createElement(ot.Z,null)))},ln={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"},Wn=me(24459),_n=({dataSource:Gn=[],value:$t,onChange:Gt,className:Zt,style:wt={},tabBarExtraContent:vn})=>le.createElement("div",{className:Ct()(ln.tabs,Zt),style:wt},le.createElement("div",{className:ln.tabsWrap},Gn.map((cn,It)=>le.createElement("aside",{className:ln.tab,onClick:()=>{Gt(cn.id),cn.link&&Wn.history.push(cn.link)},key:It},le.createElement("div",{className:$t===cn.id?ln.active:""},cn.name),(cn==null?void 0:cn.resetCount)==null&&(cn==null?void 0:cn.total)!==void 0&&le.createElement("span",null,"\uFF08",cn==null?void 0:cn.total,"\uFF09"),(cn==null?void 0:cn.resetCount)!==void 0&&(cn==null?void 0:cn.total)!==void 0&&le.createElement(je.Z,{title:(cn==null?void 0:cn.tip)!=null?cn==null?void 0:cn.tip:""},le.createElement("span",{style:{color:"#9096A3"}},"\uFF08",le.createElement("span",{style:{color:"#000"}},cn==null?void 0:cn.resetCount),"/",le.createElement("span",null,cn==null?void 0:cn.total),"\uFF09"))))),le.createElement("div",{className:ln.tabBar},vn)),Zn=({className:Gn,style:$t={},children:Gt})=>le.createElement("div",{className:Ct()(Gn),style:$t},Gt),li={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"},Ge=me(38854),be=me(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 Ne=({sortValue:Gn,dropValue:$t,className:Gt,onSort:Zt,onDrop:wt,dataSource:vn=Pe})=>{var cn;return le.createElement("div",{className:Ct()(li.orderWrap,Gt)},le.createElement(Ge.Z,{dropdownRender:()=>le.createElement(be.default,null,vn.map((It,ct)=>le.createElement(be.default.Item,{key:ct,onClick:()=>wt(It.id)},It.name)))},le.createElement("span",{className:li.orderTextWrap},(cn=vn.find(It=>$t===It.id))==null?void 0:cn.name)),le.createElement("span",{className:li.orderIconWrap},le.createElement("span",{className:li.orderAsc},le.createElement("i",{className:Gn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${li.cursorPointer} ${li.active}`:`iconfont icon-sanjiaoxing-up font12 ${li.cursorPointer}`,onClick:()=>Zt(Gn==="asc"?"desc":"asc")})),le.createElement("span",{className:li.orderDesc},le.createElement("i",{className:Gn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${li.cursorPointer} ${li.active}`:`iconfont icon-sanjiaoxing-down font12 ${li.cursorPointer}`,onClick:()=>Zt(Gn==="asc"?"desc":"asc")}))))},xe={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"},ut=me(3113),Bt=Object.defineProperty,Qe=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,Nt=(Gn,$t,Gt)=>$t in Gn?Bt(Gn,$t,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Gn[$t]=Gt,dt=(Gn,$t)=>{for(var Gt in $t||($t={}))it.call($t,Gt)&&Nt(Gn,Gt,$t[Gt]);if(Qe)for(var Gt of Qe($t))Ft.call($t,Gt)&&Nt(Gn,Gt,$t[Gt]);return Gn},Kt=(Gn,$t)=>{var Gt={};for(var Zt in Gn)it.call(Gn,Zt)&&$t.indexOf(Zt)<0&&(Gt[Zt]=Gn[Zt]);if(Gn!=null&&Qe)for(var Zt of Qe(Gn))$t.indexOf(Zt)<0&&Ft.call(Gn,Zt)&&(Gt[Zt]=Gn[Zt]);return Gt},wn=(Gn,$t,Gt)=>new Promise((Zt,wt)=>{var vn=ct=>{try{It(Gt.next(ct))}catch(an){wt(an)}},cn=ct=>{try{It(Gt.throw(ct))}catch(an){wt(an)}},It=ct=>ct.done?Zt(ct.value):Promise.resolve(ct.value).then(vn,cn);It((Gt=Gt.apply(Gn,$t)).next())}),qt=Gn=>{var $t=Gn,{className:Gt,style:Zt,children:wt,loading:vn=!1,openLoading:cn,onClick:It=()=>{},size:ct="middle",shape:an="round"}=$t,dn=Kt($t,["className","style","children","loading","openLoading","onClick","size","shape"]);const[ei,pn]=(0,le.useState)(!1);return le.createElement(ut.ZP,dt({onClick:(0,xt.throttle)(zt=>wn(void 0,null,function*(){cn&&pn(!0);try{yield It(zt)}catch(In){console.log("error",In)}cn&&pn(!1)}),2e3,{leading:!0,trailing:!1}),className:Ct()(xe.btn,xe[`${ct}-${an}`],Gt),style:Zt,size:ct,shape:an,loading:ei||vn},dn),wt)},Rn={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"},hn=({className:Gn,style:$t,children:Gt=null,onClick:Zt,title:wt})=>le.createElement("div",{className:Ct()(Rn.head,Gn),style:$t},le.createElement("span",{className:"primary-hover",onClick:Zt},le.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),le.createElement("b",{title:wt},wt),le.createElement("div",{className:Rn.node},Gt)),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"},jn=({confirmShow:Gn=!0,confirmTitle:$t,confirmClick:Gt,cancelShow:Zt=!0,cancelTitle:wt,cancelClick:vn,className:cn,style:It,confirmLoading:ct=!1})=>le.createElement("div",{className:Ct()(Yn.btns,cn),style:It},Gn&&le.createElement(ut.ZP,{loading:ct,onClick:Gt,type:"primary",className:Yn.confirm},$t),Zt&&le.createElement(ut.ZP,{onClick:vn,className:Yn.cancel},wt)),An={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"},ji=({className:Gn,style:$t={},LeftContent:Gt,children:Zt,RightContent:wt})=>le.createElement("div",{className:Ct()(An.fixedBottom,Gn),style:$t},le.createElement("div",{className:An.wrap},le.createElement("div",{className:An.left},Gt),le.createElement("div",{className:An.center},Zt),le.createElement("div",{className:An.right},wt))),Wi={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"},Mr=({className:Gn,style:$t={},dataSource:Gt=[]})=>le.createElement("div",{className:Ct()(Wi.crumbs,Gn),style:$t},Gt.map((Zt,wt)=>wt<Gt.length-1?le.createElement(le.Fragment,{key:wt},Zt.path||Zt.onClick?le.createElement("span",{className:Wi.hover,onClick:Zt!=null&&Zt.onClick?Zt.onClick:()=>Wn.history.push(Zt.path)},Zt.name):le.createElement("span",null,Zt.name),le.createElement("span",null,"\xA0",">","\xA0")):le.createElement("span",{key:wt,style:{color:"#5F6368"}},Zt.name))),pi=me(31797),ui=Object.defineProperty,Ci=Object.defineProperties,Xi=Object.getOwnPropertyDescriptors,Ni=Object.getOwnPropertySymbols,io=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable,De=(Gn,$t,Gt)=>$t in Gn?ui(Gn,$t,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):Gn[$t]=Gt,Ei=(Gn,$t)=>{for(var Gt in $t||($t={}))io.call($t,Gt)&&De(Gn,Gt,$t[Gt]);if(Ni)for(var Gt of Ni($t))hr.call($t,Gt)&&De(Gn,Gt,$t[Gt]);return Gn},Pr=(Gn,$t)=>Ci(Gn,Xi($t)),Ln=(Gn,$t)=>{var Gt={};for(var Zt in Gn)io.call(Gn,Zt)&&$t.indexOf(Zt)<0&&(Gt[Zt]=Gn[Zt]);if(Gn!=null&&Ni)for(var Zt of Ni(Gn))$t.indexOf(Zt)<0&&hr.call(Gn,Zt)&&(Gt[Zt]=Gn[Zt]);return Gt};const{Countdown:vi}=pi.default;var er=Gn=>{var $t=Gn,{onChange:Gt}=$t,Zt=Ln($t,["onChange"]);const[wt,vn]=(0,le.useState)(null);(0,le.useEffect)(()=>{typeof wt=="number"&&wt>=0&&Gt(wt)},[wt]);const cn=It=>{const ct=Math.floor(It/1e3);vn(ct)};return le.createElement(vi,Pr(Ei({},Zt),{onChange:cn}))}},50505:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Te}});var le=me(59301);function Te(He,lt){const We=(0,le.useRef)();(0,le.useEffect)(()=>{We.current=He}),(0,le.useEffect)(()=>{function Ve(){We.current()}if(lt!==null){let Le=setInterval(Ve,lt);return()=>clearInterval(Le)}},[lt])}},76826:function(Tn,xn,me){"use strict";me.d(xn,{h:function(){return le}});var le=(Te=>(Te[Te.NOMATCH=-1]="NOMATCH",Te[Te.OK=0]="OK",Te[Te.TIMEOUT=2]="TIMEOUT",Te[Te.PODFAILURE=3]="PODFAILURE",Te[Te.COMPILEFAILURE=4]="COMPILEFAILURE",Te[Te.EXECUTEFAILURE=5]="EXECUTEFAILURE",Te[Te.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Te))(le||{})},5247:function(Tn,xn,me){"use strict";me.d(xn,{H7:function(){return te},MK:function(){return Oe},MU:function(){return Ue},X6:function(){return at},bM:function(){return xt},fi:function(){return ee},fu:function(){return Ct},n4:function(){return de},rX:function(){return mt},vl:function(){return se},zO:function(){return bt}});var le=me(7660),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ve=(he,ve,Ee)=>ve in he?Te(he,ve,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):he[ve]=Ee,Le=(he,ve)=>{for(var Ee in ve||(ve={}))lt.call(ve,Ee)&&Ve(he,Ee,ve[Ee]);if(He)for(var Ee of He(ve))We.call(ve,Ee)&&Ve(he,Ee,ve[Ee]);return he};function Ct(he,ve){return(0,le.U2)(`myproblems/${he}.json`,Le({hidePopLogin:!0},ve||{}))}function xt(he,ve){return(0,le.v_)(`myproblems/${he}/code_submit.json`,ve)}function Ue(he,ve){return(0,le.v_)(`myproblems/${he}/code_debug.json`,ve)}function bt(he,ve){return ve.language&&(ve.language=encodeURIComponent(ve.language)),(0,le.U2)(`myproblems/${he}/submit_records.json`,ve)}function at(he){return(0,le.U2)("myproblems/record_detail.json",{id:he})}function mt(he,ve){return(0,le.U2)(`myproblems/${he}/result.json`,{mode:ve})}function Oe(he,ve){return(0,le.v_)(`myproblems/${he}/add_notes.json`,ve)}function te(he,ve){return(0,le.v_)(`myproblems/${he}/restore_initial_code.json`,ve)}function ee(he){return(0,le.v_)(`myproblems/${he}/sync_code.json`)}function de(he,ve){return(0,le.v_)(`myproblems/${he}/update_code.json`,ve)}function se(he,ve){return(0,le.v_)(`discusses/${he}/plus.json`,ve)}},78978:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return xu}});var le=me(59301),Te={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"},He=me(78241),lt=me(6848),We=me(3113),Ve=me(43418),Le=me(5871),Ct=me(8591),xt=me(92832),Ue=me(28103),bt=me(24905),at=me(95237),mt=me(43604),Oe=me(58421),te=me(60324),ee=Object.defineProperty,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(en,Xt,On)=>Xt in en?ee(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,Ee=(en,Xt)=>{for(var On in Xt||(Xt={}))se.call(Xt,On)&&ve(en,On,Xt[On]);if(de)for(var On of de(Xt))he.call(Xt,On)&&ve(en,On,Xt[On]);return en};const Me=en=>React.createElement("svg",Ee({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},en),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 Be="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",je=me(99325),_e=me(24459),Je=me(88230),Xe=me(7660),ht=Object.defineProperty,Ze=Object.getOwnPropertySymbols,Mt=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Ot=(en,Xt,On)=>Xt in en?ht(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,Pt=(en,Xt)=>{for(var On in Xt||(Xt={}))Mt.call(Xt,On)&&Ot(en,On,Xt[On]);if(Ze)for(var On of Ze(Xt))ot.call(Xt,On)&&Ot(en,On,Xt[On]);return en};const Dt=en=>React.createElement("svg",Pt({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},en),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 Wt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",Lt=Object.defineProperty,qe=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Sn=(en,Xt,On)=>Xt in en?Lt(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,Pn=(en,Xt)=>{for(var On in Xt||(Xt={}))Ke.call(Xt,On)&&Sn(en,On,Xt[On]);if(qe)for(var On of qe(Xt))Rt.call(Xt,On)&&Sn(en,On,Xt[On]);return en};const _t=en=>React.createElement("svg",Pn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},en),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 rn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",ln=me(64686),Wn=me(64726),un=me(60355),_n=me(40928),St={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"},Zn=me(59301),li=Object.defineProperty,Ge=Object.defineProperties,be=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,xe=(en,Xt,On)=>Xt in en?li(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,ut=(en,Xt)=>{for(var On in Xt||(Xt={}))Ae.call(Xt,On)&&xe(en,On,Xt[On]);if(Pe)for(var On of Pe(Xt))Ne.call(Xt,On)&&xe(en,On,Xt[On]);return en},Bt=(en,Xt)=>Ge(en,be(Xt)),Qe=(en,Xt)=>{var On={};for(var tt in en)Ae.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&Pe)for(var tt of Pe(en))Xt.indexOf(tt)<0&&Ne.call(en,tt)&&(On[tt]=en[tt]);return On};const it=null,Ft=(en,Xt)=>{var On=en,{globalSetting:tt,loading:nn,dispatch:sr,isEdit:kr,editData:yr}=On,lr=Qe(On,["globalSetting","loading","dispatch","isEdit","editData"]);const[Mi,wr]=(0,le.useState)(""),[to,yo]=(0,le.useState)(""),[fr,vr]=(0,le.useState)([]),[xr,_i]=(0,le.useState)(""),[Ii,Gr]=(0,le.useState)(),[Zo,Fr]=(0,le.useState)(!1),[Er,Tr]=(0,le.useState)({}),[Rr,gr]=(0,le.useState)([]);(0,le.useEffect)(()=>{!yr||!kr||(wr(yr==null?void 0:yr.name),yo(yr==null?void 0:yr.analysis),Gr(yr==null?void 0:yr.is_ordered),Tr(yr),Fr(!0))},[yr]),(0,le.useEffect)(()=>{if(!Zo)return;const Dr=yr==null?void 0:yr.standard_answer.map(zo=>zo==null?void 0:zo.answer_text);vr(Dr);const Ts=yr==null?void 0:yr.standard_answer.map(zo=>zo==null?void 0:zo.score);gr(Ts),Fr(!1)},[Zo]),(0,le.useImperativeHandle)(Xt,()=>({onSave:Na,Clear:jo}));const Na=()=>{let Dr=[],Ts=!1;return Mi?(fr.forEach((zo,Hs)=>{Dr.push({position:Hs+1,answer_text:[],score:Rr[Hs]}),zo==null||zo.forEach((pl,rc)=>{Dr[Hs].answer_text.push(pl),(!pl||!(0,Je.eR)(pl,1e4))&&(_i(`${Hs}-${rc}`),Ct.ZP.info(pl?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Ts=!0)})}),Ts?!1:(Dr==null?void 0:Dr.length)>20?(Ct.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Mi,analysis:to,standard_answers:Dr,is_ordered:Ii,downcase:Er==null?void 0:Er.downcase,no_space:Er==null?void 0:Er.no_space,use_blank_score:Er==null?void 0:Er.use_blank_score}):(Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},jo=()=>{wr(""),yo(""),vr([]),Gr(!1)},Sa=(Dr,Ts,zo)=>{const Hs=fr.slice();if(Ts&&Hs.splice(Dr,Ts),zo)for(let pl=0;pl<zo;pl++)Hs.splice(Dr+pl,0,[""]);vr(Hs)},Ga=(Dr,Ts,zo)=>{_i("");let Hs=fr.slice();Hs[Dr][Ts]=zo,vr(Hs)},So=Dr=>{let Ts=fr.slice();Ts[Dr]=[...Ts[Dr],""],vr(Ts)},Oa=(Dr,Ts)=>{let zo=fr.slice();if(!zo[Dr][Ts]){zo[Dr]=zo[Dr].filter((Hs,pl)=>pl!==Ts),vr(zo);return}Ve.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:St.modal,onOk:()=>{zo[Dr]=zo[Dr].filter((Hs,pl)=>pl!==Ts),vr(zo)}})},bl=Dr=>{Ve.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:St.modal,onOk:()=>{let Ts=fr.slice();Ts=fr.filter((zo,Hs)=>Dr!==Hs),vr(Ts)}})};return Zn.createElement("section",{className:St.wrap},Zn.createElement("p",{className:St.titleWrap},Zn.createElement("span",{className:St.required},"*"),Zn.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),Zn.createElement("div",null,Zn.createElement(un.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Mi,onChange:Dr=>wr(Dr),showNullButton:!0,onPlaceholderChange:Sa})),Zn.createElement("div",{className:"mt20"},fr.map((Dr,Ts)=>Zn.createElement("div",{style:{display:"flex"}},Zn.createElement("div",{style:{flex:1}},Zn.createElement(_n.Z,{key:Ts,answers:Dr,index:Ts,flex:1,is_md:!0,activeOptionErrorIndex:xr,onAnswerChange:Ga,addChildAnswer:So,deleteChildAnswer:Oa,deleteChildAnswermain:bl})),Er.use_blank_score&&Zn.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},Zn.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",Zn.createElement(Le.Z,{style:{width:"100px"},size:"large",defaultValue:Rr[Ts],onBlur:zo=>{Rr[Ts]=zo.target.value,gr([...Rr])}}))))),Zn.createElement("div",null,Zn.createElement(bt.default,{className:`${St.color333} font14 mt20`,checked:Er.use_blank_score,onChange:Dr=>Tr(Bt(ut({},Er),{use_blank_score:Dr.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),Zn.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")),Zn.createElement("div",null,Zn.createElement(bt.default,{className:`${St.color333} font14 mt20`,checked:Er.downcase,onChange:Dr=>Tr(Bt(ut({},Er),{downcase:Dr.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Zn.createElement("div",null,Zn.createElement(bt.default,{className:`${St.color333} font14 mt20`,checked:Er.no_space,onChange:Dr=>Tr(Bt(ut({},Er),{no_space:Dr.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),Zn.createElement("div",{className:"mt20"},(fr==null?void 0:fr.length)>1&&Zn.createElement("span",null,Zn.createElement(bt.default,{checked:Ii,onChange:Dr=>Gr(Dr.target.checked),className:`${St.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),Zn.createElement("span",{className:`${St.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"))),Zn.createElement("p",{className:St.titleWrap},Zn.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Zn.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:to,onChange:Dr=>yo(Dr)}))};var Nt=(0,_e.connect)(({loading:en,globalSetting:Xt})=>({globalSetting:Xt,loading:en.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Ft)),dt=me(5112),Kt=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,qt=(en,Xt)=>{var On={};for(var tt in en)wn.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&Kt)for(var tt of Kt(en))Xt.indexOf(tt)<0&&sn.call(en,tt)&&(On[tt]=en[tt]);return On};const Rn=null,Vn=(en,Xt)=>{var On=en,{globalSetting:tt,loading:nn,editData:sr,dispatch:kr,onRef:yr=()=>{},isEdit:lr}=On,Mi=qt(On,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)(),[yo,fr]=(0,le.useState)(""),[vr,xr]=(0,le.useState)("");(0,le.useEffect)(()=>{if(!sr||!lr)return;fr(sr==null?void 0:sr.name),xr(sr==null?void 0:sr.analysis);const Gr=sr==null?void 0:sr.choices.find(Zo=>Zo.is_answer);to(Gr.choice_text==="\u6B63\u786E"?"0":"1")},[sr]),(0,le.useImperativeHandle)(Xt,()=>({onSave:_i,Clear:Ii}));const _i=()=>yo?wr?{name:yo,choices:[{choice_text:"\u6B63\u786E",is_answer:wr==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:wr==="1"?1:0}],analysis:vr}:(Ct.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),Ii=()=>{fr(""),xr(""),to("")};return le.createElement("section",{className:St.wrap},le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),le.createElement(Wn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:yo,onChange:Gr=>fr(Gr)}),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:St.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),le.createElement(dt.ZP.Group,{buttonStyle:"solid",value:wr,onChange:Gr=>to(Gr.target.value)},le.createElement(dt.ZP.Button,{value:"0",className:`${St.radio} mr40`},"\u6B63\u786E"),le.createElement(dt.ZP.Button,{value:"1",className:St.radio},"\u9519\u8BEF")),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:vr,onChange:Gr=>xr(Gr)}))};var hn=(0,_e.connect)(({loading:en,globalSetting:Xt})=>({globalSetting:Xt,loading:en.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Vn)),Yn=Object.getOwnPropertySymbols,mi=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,An=(en,Xt)=>{var On={};for(var tt in en)mi.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&Yn)for(var tt of Yn(en))Xt.indexOf(tt)<0&&jn.call(en,tt)&&(On[tt]=en[tt]);return On};const wi=null,ji=(en,Xt)=>{var On=en,{globalSetting:tt,loading:nn,editData:sr,dispatch:kr,onRef:yr=()=>{},isEdit:lr}=On,Mi=An(On,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)([]);(0,le.useEffect)(()=>{var xr;if(!sr||!lr)return;const _i=(xr=sr==null?void 0:sr.shixun)==null?void 0:xr.challenges.map(Ii=>({id:Ii==null?void 0:Ii.id,score:Ii.score}));to(_i)},[sr]),(0,le.useImperativeHandle)(Xt,()=>({onSave:yo,Clear:fr}));const yo=()=>({challenges:[...wr]}),fr=()=>{to([])};console.log("editData--",sr);const vr=xr=>{var _i,Ii;return le.createElement("div",null,(Ii=(_i=xr==null?void 0:xr.shixun)==null?void 0:_i.challenges)==null?void 0:Ii.map((Gr,Zo)=>{var Fr;return le.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},le.createElement("div",null,le.createElement("span",{className:"mr5"},"\u7B2C",Zo+1,"\u5173"),le.createElement(lt.Z,{key:Zo,title:Gr==null?void 0:Gr.challenge_name},le.createElement("span",null,(0,Je.Pq)(Gr==null?void 0:Gr.challenge_name,44)))),le.createElement("p",{style:{marginBottom:0}},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u5206\u503C\uFF1A"),le.createElement(Le.Z,{precision:1,min:1,max:100,className:St.baseFormItem,style:{width:176},value:(Fr=wr.find(Er=>Er.id===Gr.id))==null?void 0:Fr.score,onChange:Er=>{wr.find(Tr=>Tr.id===Gr.id).score=Er,to([...wr])}})))}),le.createElement("div",{style:{clear:"both"}}))};return le.createElement("section",{className:St.wrap},le.createElement(je.Z,{style:{paddingRight:10},className:St.titleHtml,value:`${sr==null?void 0:sr.position}\u3001${sr==null?void 0:sr.name}`}),le.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u5173\u5361")),vr(sr))};var Wi=(0,_e.connect)(({loading:en,globalSetting:Xt})=>({globalSetting:Xt,loading:en.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(ji)),dr=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,ui=(en,Xt)=>{var On={};for(var tt in en)Mr.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&dr)for(var tt of dr(en))Xt.indexOf(tt)<0&&pi.call(en,tt)&&(On[tt]=en[tt]);return On};const Ci=["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"],Xi=(en,Xt)=>{var On=en,{editData:tt,globalSetting:nn,loading:sr,dispatch:kr,onRef:yr=()=>{},isEdit:lr}=On,Mi=ui(On,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)([]),[yo,fr]=(0,le.useState)(),[vr,xr]=(0,le.useState)([]),[_i,Ii]=(0,le.useState)(""),[Gr,Zo]=(0,le.useState)("");(0,le.useEffect)(()=>{to(["","","",""])},[]),(0,le.useEffect)(()=>{if(!tt||!lr)return;Ii(tt==null?void 0:tt.name),Zo(tt==null?void 0:tt.analysis),to(tt==null?void 0:tt.choices.map(Rr=>Rr.choice_text));const Tr=[];tt==null||tt.choices.map((Rr,gr)=>{Rr.is_answer&&Tr.push(gr)}),xr(Tr)},[tt]),(0,le.useImperativeHandle)(Xt,()=>({onSave:Fr,Clear:Er}));const Fr=()=>{if(!_i)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Tr=wr.findIndex(gr=>!gr);if(Tr>-1)return Ct.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Ci[Tr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!vr.length)return Ct.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(vr.length<2)return Ct.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const Rr=wr.map((gr,Na)=>({choice_text:gr,is_answer:vr.includes(Na)?1:0}));return{name:_i,choices:Rr,analysis:Gr}},Er=()=>{to(["","","",""]),Ii(""),Zo(""),xr("")};return le.createElement("section",{className:St.wrap},le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),le.createElement(Wn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:_i,onChange:Tr=>Ii(Tr)}),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:St.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),wr.map((Tr,Rr)=>le.createElement("div",{className:St.choiceWrap,key:Rr},le.createElement(lt.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${St.answer} ${vr.includes(Rr)?St.activeAnswer:""}`,onClick:()=>{vr.includes(Rr)?xr(vr.filter(gr=>gr!==Rr)):xr([...vr,Rr])}},Ci[Rr])),le.createElement("div",{className:St.editorWrap},yo===Rr?le.createElement(Wn.Z,{id:`single-question-option-${Rr}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Tr,onChange:gr=>{wr[Rr]=gr,to(wr)}}):le.createElement("div",{className:St.htmlWrap,onClick:()=>fr(Rr)},le.createElement(je.Z,{value:Tr}))),Rr>1&&le.createElement(lt.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${St.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{to(wr.filter((gr,Na)=>Na!==Rr)),vr.includes(Rr)?xr(vr.filter(gr=>gr!==Rr)):xr([...vr,Rr])}})),Rr<7&&Rr===wr.length-1&&le.createElement(lt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${St.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>to([...wr,""])})))),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Gr,onChange:Tr=>Zo(Tr)}))};var Ni=(0,_e.connect)(({loading:en,globalSetting:Xt})=>({globalSetting:Xt,loading:en.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Xi)),io=Object.getOwnPropertySymbols,hr=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Ei=(en,Xt)=>{var On={};for(var tt in en)hr.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&io)for(var tt of io(en))Xt.indexOf(tt)<0&&De.call(en,tt)&&(On[tt]=en[tt]);return On};const Pr=["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"],Ln=(en,Xt)=>{var On=en,{editData:tt,globalSetting:nn,loading:sr,dispatch:kr,onRef:yr=()=>{},isEdit:lr}=On,Mi=Ei(On,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)([]),[yo,fr]=(0,le.useState)(),[vr,xr]=(0,le.useState)(),[_i,Ii]=(0,le.useState)(""),[Gr,Zo]=(0,le.useState)("");(0,le.useEffect)(()=>{to(["","","",""])},[]),(0,le.useEffect)(()=>{if(!tt||!lr)return;const Tr=[],Rr=[];tt==null||tt.choices.forEach((gr,Na)=>{Tr.push(gr.choice_text),gr.is_answer&&Rr.push(Na)}),Ii(tt==null?void 0:tt.name),Zo(tt==null?void 0:tt.analysis),to(Tr),xr(Rr)},[tt]),(0,le.useImperativeHandle)(Xt,()=>({onSave:Fr,Clear:Er}));const Fr=()=>{if(!_i)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Tr=wr.findIndex(gr=>!gr);if(Tr>-1)return Ct.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Pr[Tr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray(vr))return Ct.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 Rr=wr.map((gr,Na)=>({choice_text:gr,is_answer:vr.includes(Na)?1:0}));return{name:_i,choices:Rr,analysis:Gr}},Er=()=>{to(["","","",""]),Ii(""),Zo(""),xr("")};return le.createElement("section",{className:St.wrap},le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),le.createElement(Wn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:_i,onChange:Tr=>Ii(Tr)}),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.required},"*"),le.createElement("span",{className:St.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:St.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),wr.map((Tr,Rr)=>le.createElement("div",{className:St.choiceWrap,key:Rr},le.createElement(lt.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${St.answer} ${vr!=null&&vr.includes(Rr)?St.activeAnswer:""}`,onClick:()=>xr([Rr])},Pr[Rr])),le.createElement("div",{className:St.editorWrap},yo===Rr?le.createElement(Wn.Z,{id:`single-question-option-${Rr}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Tr,onChange:gr=>{wr[Rr]=gr,to(wr)}}):le.createElement("div",{className:St.htmlWrap,onClick:()=>fr(Rr)},le.createElement(je.Z,{value:Tr}))),Rr>1&&le.createElement(lt.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${St.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{to(wr.filter((gr,Na)=>Na!==Rr)),Rr===vr&&xr(null)}})),Rr<7&&Rr===wr.length-1&&le.createElement(lt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${St.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>to([...wr,""])})))),le.createElement("p",{className:St.titleWrap},le.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Gr,onChange:Tr=>Zo(Tr)}))};var vi=(0,_e.connect)(({loading:en,globalSetting:Xt})=>({globalSetting:Xt,loading:en.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Ln)),Zi=me(12563),er=me(78673),Gn=me(61485),$t=me(59301),Gt=Object.defineProperty,Zt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,vn=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,ct=(en,Xt,On)=>Xt in en?Gt(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,an=(en,Xt)=>{for(var On in Xt||(Xt={}))cn.call(Xt,On)&&ct(en,On,Xt[On]);if(vn)for(var On of vn(Xt))It.call(Xt,On)&&ct(en,On,Xt[On]);return en},dn=(en,Xt)=>Zt(en,wt(Xt)),ei=(en,Xt)=>{var On={};for(var tt in en)cn.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&vn)for(var tt of vn(en))Xt.indexOf(tt)<0&&It.call(en,tt)&&(On[tt]=en[tt]);return On},pn=(en,Xt,On)=>new Promise((tt,nn)=>{var sr=lr=>{try{yr(On.next(lr))}catch(Mi){nn(Mi)}},kr=lr=>{try{yr(On.throw(lr))}catch(Mi){nn(Mi)}},yr=lr=>lr.done?tt(lr.value):Promise.resolve(lr.value).then(sr,kr);yr((On=On.apply(en,Xt)).next())});const zt=en=>{if(!en)return!1;if(/^s*$/.test(en)||en.trim()===""){Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Xt=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 en==="|"?(Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},In=({value:en=[],onClose:Xt})=>$t.createElement(Zi.default,{closable:!0,onClose:Xt,className:St.keywordTag},$t.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},en.join(" \u6216 "))),Qn=(en,Xt)=>{var On=en,{editData:tt,globalSetting:nn,loading:sr,dispatch:kr,onRef:yr=()=>{},isEdit:lr}=On,Mi=ei(On,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)(""),[yo,fr]=(0,le.useState)(""),[vr,xr]=(0,le.useState)(""),[_i,Ii]=(0,le.useState)(""),[Gr]=He.default.useForm(),Zo=He.default.useWatch("use_keywords",Gr);(0,le.useEffect)(()=>{var Rr;!tt||!lr||(to(tt==null?void 0:tt.name),fr(tt==null?void 0:tt.analysis),xr((Rr=tt==null?void 0:tt.answer_texts)==null?void 0:Rr[0]),Gr.setFieldsValue(an({},tt)))},[tt]),(0,le.useImperativeHandle)(Xt,()=>({onSave:Fr,Clear:Er}));const Fr=()=>pn(void 0,null,function*(){if(!wr)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Gr.validateFields()}catch(gr){Ct.ZP.error(gr.errorFields[0].errors[0]);return}const Rr=Gr.getFieldsValue();return console.log(Rr,"values"),an({name:wr,answer_texts:[vr],analysis:yo},Rr)}),Er=()=>{to(""),fr(""),xr(""),Gr.resetFields()},Tr=tt==null?void 0:tt.score;return $t.createElement("section",{className:St.wrap},$t.createElement("p",{className:St.titleWrap},$t.createElement("span",{className:St.required},"*"),$t.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),$t.createElement(Wn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:wr,onChange:Rr=>to(Rr)}),$t.createElement("p",{className:St.titleWrap},$t.createElement("span",{className:St.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),$t.createElement(Wn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:vr,onChange:Rr=>xr(Rr)}),$t.createElement("p",{className:St.titleWrap},$t.createElement("span",{className:St.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),$t.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:yo,onChange:Rr=>fr(Rr)}),$t.createElement(He.default,{form:Gr,size:"large",onFinishFailed:Rr=>pn(void 0,null,function*(){var gr,Na;Ct.ZP.error(Rr.errorFields[0].errors[0]),Gr.scrollToField((Na=(gr=Rr==null?void 0:Rr.errorFields)==null?void 0:gr[0])==null?void 0:Na.name,{behavior:"smooth",block:"center"})})},$t.createElement(at.Z,{align:"middle",className:"mb30 mt20"},$t.createElement(He.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},$t.createElement(er.Z,null)),$t.createElement(mt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),$t.createElement(mt.Z,null,$t.createElement(lt.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"},$t.createElement(Gn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),Zo&&$t.createElement(He.default.List,{name:"keywords",rules:[{validator(Rr,gr){return gr!=null&&gr.length?(gr==null?void 0:gr.reduce((jo,Sa)=>jo+Sa.score,0))>parseFloat(Tr)?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"))}}]},(Rr,{add:gr,remove:Na})=>$t.createElement($t.Fragment,null,$t.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),$t.createElement(at.Z,{align:"middle",className:"font14 mb30"},$t.createElement(mt.Z,{flex:1},$t.createElement(xt.default,{value:_i,onChange:jo=>{Ii(jo.target.value)},maxLength:50,allowClear:!0,onPressEnter:jo=>{var Sa,Ga,So,Oa;const bl=`${(Sa=jo.target)==null?void 0:Sa.value}`,Dr=(So=(Ga=bl==null?void 0:bl.split("|"))==null?void 0:Ga.filter(Hs=>!!Hs))==null?void 0:So.map(Hs=>Hs==null?void 0:Hs.trim()),Ts=Gr.getFieldValue("keywords"),zo=((Oa=Ts==null?void 0:Ts.map(Hs=>Hs==null?void 0:Hs.keyword))==null?void 0:Oa.flat())||[];for(const Hs of Dr)if(zo.includes(Hs)){Ct.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}zt(bl)&&(gr({keyword:Dr,score:1}),Ii(""))},className:St.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"})),$t.createElement(mt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Rr.map(jo=>{var Sa=jo,{key:Ga,name:So}=Sa,Oa=ei(Sa,["key","name"]);return $t.createElement(at.Z,{key:Ga,style:{marginRight:148}},$t.createElement(mt.Z,{flex:1},$t.createElement(at.Z,{align:"middle",justify:"space-between"},$t.createElement(He.default.Item,dn(an({},Oa),{name:[So,"keyword"]}),$t.createElement(In,{onClose:()=>Na(So)})),$t.createElement(He.default.Item,dn(an({},Oa),{name:[So,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),$t.createElement(Le.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var xi=(0,_e.connect)(({loading:en,globalSetting:Xt})=>({globalSetting:Xt,loading:en.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Qn)),tn=me(36381),fn={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"},kn=me(32134),zi=me(12893),Di=Object.defineProperty,Si=Object.defineProperties,Fi=Object.getOwnPropertyDescriptors,Ti=Object.getOwnPropertySymbols,nr=Object.prototype.hasOwnProperty,$r=Object.prototype.propertyIsEnumerable,ci=(en,Xt,On)=>Xt in en?Di(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,Ki=(en,Xt)=>{for(var On in Xt||(Xt={}))nr.call(Xt,On)&&ci(en,On,Xt[On]);if(Ti)for(var On of Ti(Xt))$r.call(Xt,On)&&ci(en,On,Xt[On]);return en},Yr=(en,Xt)=>Si(en,Fi(Xt)),Qr=(en,Xt)=>{var On={};for(var tt in en)nr.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&Ti)for(var tt of Ti(en))Xt.indexOf(tt)<0&&$r.call(en,tt)&&(On[tt]=en[tt]);return On};const Cr=en=>{var Xt=en,{value:On,onChange:tt,scrollId:nn}=Xt,sr=Qr(Xt,["value","onChange","scrollId"]);return le.createElement("div",{id:nn||""},le.createElement(Wn.Z,Yr(Ki({},sr),{defaultValue:On,onChange:(kr,yr)=>{yr!=null&&yr.length?tt(kr,yr):tt(kr)}})))},Jt=({value:en,onChange:Xt,placeholder:On,height:tt=140,isEdit:nn})=>nn?le.createElement(Wn.Z,{watch:!0,isFocus:!0,height:tt,placeholder:On,defaultValue:en,onChange:Xt}):le.createElement("div",{style:{cursor:"pointer"}},en?le.createElement(je.Z,{className:fn.inputBorder,value:en}):le.createElement("div",{className:`${fn.inputBorder} ${fn.placeholder}`},On));var gi=me(59301),mr=Object.defineProperty,tr=Object.defineProperties,Hr=Object.getOwnPropertyDescriptors,Lr=Object.getOwnPropertySymbols,lo=Object.prototype.hasOwnProperty,Wr=Object.prototype.propertyIsEnumerable,jr=(en,Xt,On)=>Xt in en?mr(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,fo=(en,Xt)=>{for(var On in Xt||(Xt={}))lo.call(Xt,On)&&jr(en,On,Xt[On]);if(Lr)for(var On of Lr(Xt))Wr.call(Xt,On)&&jr(en,On,Xt[On]);return en},$n=(en,Xt)=>tr(en,Hr(Xt)),aa=(en,Xt)=>{var On={};for(var tt in en)lo.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&Lr)for(var tt of Lr(en))Xt.indexOf(tt)<0&&Wr.call(en,tt)&&(On[tt]=en[tt]);return On};const Un=["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"],Do=({value:en,onChange:Xt,choiceTextKey:On,answerKey:tt,index:nn,isEdit:sr,setInputActive:kr,form:yr,choiceOptionsPath:lr,allowChangeMode:Mi,showAddIcon:wr,addItem:to,deleteItem:yo})=>{const fr=(en==null?void 0:en[tt])===!0,vr=()=>{const _i=yr.getFieldValue(lr);yr.setFieldValue(lr,_i.map(Ii=>$n(fo({},Ii),{[tt]:!1})))},xr=()=>{fr?Xt($n(fo({},en),{[tt]:!1})):(Mi||vr(),Xt($n(fo({},en),{[tt]:!0})))};return gi.createElement(at.Z,{className:fn.choiceWrap,align:"middle",wrap:!1},gi.createElement(mt.Z,{onClick:xr,className:`${fn.choiceIndex} ${fr?fn.activeAnswer:""}`},Un[nn]),gi.createElement(mt.Z,{flex:1,className:`${fn.editorWrap} ml15`,onClick:kr},gi.createElement(Jt,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:sr,value:en==null?void 0:en[On],onChange:_i=>{Xt($n(fo({},en),{[On]:_i}))}})),gi.createElement(mt.Z,{flex:"0 0 auto",className:"ml15"},gi.createElement("div",{onClick:xr,className:`${fn.setAnswerBtn} ${fr?fn.activeAnswer:""}`},fr?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),gi.createElement(mt.Z,{className:fn.actionWrapper},gi.createElement(lt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},gi.createElement(kn.Z,{className:fn.addIcon,onClick:to,style:{visibility:wr?"visible":"hidden"}})),gi.createElement(lt.Z,{title:"\u5220\u9664"},gi.createElement(zi.Z,{className:fn.deleteIcon,onClick:yo,style:{visibility:nn>1?"visible":"hidden"}}))))},Ko=({questionTitlePlaceholder:en,titleKey:Xt,choiceKey:On,analysisKey:tt,choiceTextKey:nn,answerKey:sr,choiceOptionsPath:kr,allowChangeMode:yr=!0,form:lr,showAnalysis:Mi=!0})=>{const[wr,to]=(0,le.useState)(),[yo,fr]=(0,le.useState)(!1);return gi.createElement("div",{className:fn.wrap},gi.createElement("div",{className:fn.questionTitleEditorWrap},gi.createElement(He.default.Item,{label:"\u9898\u5E72",name:Xt,labelCol:{span:24},rules:[{required:!0}]},gi.createElement(Cr,{scrollId:Array.isArray(Xt)?Xt.join("_"):`${Xt}`,watch:!0,height:140,placeholder:en}))),gi.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),gi.createElement(He.default.List,{name:On,rules:[{validator(vr,xr){const _i=xr.some(Gr=>Gr[sr]),Ii=xr.findIndex(Gr=>{var Zo;return((Zo=Gr[nn])==null?void 0:Zo.length)<=0});return Ii!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Un[Ii]}\u9009\u9879\u7684\u5185\u5BB9`)):_i?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(vr,{add:xr,remove:_i})=>gi.createElement("div",{id:Array.isArray(kr)?kr.join("_"):`${kr}`},vr.map((Ii,Gr)=>{var Zo=Ii,{key:Fr,name:Er}=Zo,Tr=aa(Zo,["key","name"]);const Rr=wr===Fr,gr=()=>{to(Fr)},Na=Gr<7&&Gr===vr.length-1,jo=()=>xr({[nn]:"",[sr]:0}),Sa=()=>_i(Er);return gi.createElement(He.default.Item,$n(fo({},Tr),{key:Fr,name:Er,noStyle:!0}),gi.createElement(Do,{choiceTextKey:nn,answerKey:sr,index:Gr,isEdit:Rr,setInputActive:gr,form:lr,choiceOptionsPath:kr,allowChangeMode:yr,showAddIcon:Na,addItem:jo,deleteItem:Sa}))}),vr.length<8&&gi.createElement("div",{className:`${fn.addBtn} mb30`,onClick:()=>xr({[nn]:"",[sr]:0})},"\u6DFB\u52A0\u9009\u9879"))),Mi&&gi.createElement("div",{onClick:()=>fr(!0)},gi.createElement(He.default.Item,{name:tt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},gi.createElement(Jt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:yo}))))};var Ji=me(59301),la=Object.defineProperty,Ro=Object.defineProperties,Nr=Object.getOwnPropertyDescriptors,Ar=Object.getOwnPropertySymbols,xo=Object.prototype.hasOwnProperty,Wo=Object.prototype.propertyIsEnumerable,Hi=(en,Xt,On)=>Xt in en?la(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,st=(en,Xt)=>{for(var On in Xt||(Xt={}))xo.call(Xt,On)&&Hi(en,On,Xt[On]);if(Ar)for(var On of Ar(Xt))Wo.call(Xt,On)&&Hi(en,On,Xt[On]);return en},_o=(en,Xt)=>Ro(en,Nr(Xt)),Ia=(en,Xt)=>{var On={};for(var tt in en)xo.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&Ar)for(var tt of Ar(en))Xt.indexOf(tt)<0&&Wo.call(en,tt)&&(On[tt]=en[tt]);return On};const Ma=({value:en,onChange:Xt})=>{const On=nn=>{Ve.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:fn.modal,onOk:()=>{const sr=[...en];sr.splice(nn,1),Xt(sr)}})},tt=()=>{const nn=[...en];nn.push(""),Xt(nn)};return Ji.createElement(at.Z,{align:"middle",className:"ml20",gutter:[40,20]},en==null?void 0:en.map((nn,sr)=>Ji.createElement(mt.Z,{key:`${nn}_${sr}`,className:fn.blankWrapper},Ji.createElement(xt.default,{className:fn.blankInput,defaultValue:nn,maxLength:1e3,onBlur:kr=>{const yr=[...en],lr=kr.target.value.trim();yr[sr]=lr,Xt(yr)}}),Ji.createElement(lt.Z,{title:"\u5220\u9664"},Ji.createElement(zi.Z,{className:fn.deleteIcon,style:{marginLeft:15,visibility:sr>0?"visible":"hidden"},onClick:()=>On(sr)})))),Ji.createElement(mt.Z,null,Ji.createElement("div",{className:`${fn.addBtn}`,onClick:()=>{tt()}},"\u65B0\u589E\u7B54\u6848")))},xs=({value:en=!0,onChange:Xt})=>Ji.createElement(er.Z,{checked:!en,onChange:On=>{Xt(!On)}}),Wa="\u2581",Ps=({questionTitlePlaceholder:en,form:Xt,name:On,scoreByBlank:tt="use_blank_score",answerKey:nn,titleKey:sr="name",analysisKey:kr="analysis",isOrdered:yr="is_ordered"})=>{var lr,Mi;const[wr,to]=(0,le.useState)(!1),yo=(Fr,Er)=>{const Tr=Er.line;let Rr=0;for(let Na=0;Na<Tr;Na++)Rr+=Fr.getLine(Na).split(Wa).length-1;const gr=Fr.getLine(Tr).substring(0,Er.ch);return Rr+=gr.split(Wa).length-1,Rr},fr=(Fr,Er,Tr,Rr)=>{const gr=Fr.getRange(Er.from,Er.to);let Na=0;if(Er.text.forEach(jo=>{Na+=jo.split(Wa).length-1}),Er.origin!=="setValue"){if(gr&&gr.indexOf(Wa)!==-1){const jo=gr.split(Wa).length-1,Sa=yo(Fr,Er.from);if(console.log(`\u5220\u9664${jo}\u4E2A\uFF0C \u524D\u9762\u6709${Sa}\u4E2A\uFF0C\u65B0\u589E${Na}\u4E2A`),jo>1){const Ga=Array.from({length:jo},(So,Oa)=>Sa+Oa);Rr(Ga)}else Rr(Sa)}else if(Na>0){const jo=yo(Fr,Er.from);console.log(`\u65B0\u589E${Na}\u4E2A\uFF0C\u4E4B\u524D\u6709${jo}\u4E2A`),Tr(Na,jo)}}},vr=()=>{const Fr=Xt.getFieldValue(["sub_item_banks",...nn]);Xt.setFieldValue(["sub_item_banks",...nn],Fr==null?void 0:Fr.map((Er,Tr)=>_o(st({},Er),{position:Tr+1})))},xr=(0,le.useRef)(),_i=(Fr,Er)=>{for(let Tr=0;Tr<Fr;Tr++)xr.current({position:null,answer_text:[""]},Er+Tr);vr()},Ii=(0,le.useRef)(),Gr=Fr=>{Ii.current(Fr),vr()},Zo=(Mi=(lr=Xt.getFieldValue("sub_item_banks"))==null?void 0:lr[nn==null?void 0:nn[0]])==null?void 0:Mi[nn==null?void 0:nn[1]];return Ji.createElement("div",{className:fn.wrap},Ji.createElement("div",{className:fn.questionTitleEditorWrap},Ji.createElement(He.default.Item,{label:"\u9898\u5E72",name:sr,labelCol:{span:24},rules:[{required:!0}]},Ji.createElement(Cr,{scrollId:"name",watch:!0,height:140,placeholder:en,showNullButton:!0,onCMBeforeChange:(Fr,Er)=>{fr(Fr,Er,_i,Gr)}}))),Ji.createElement(He.default.List,{name:nn,rules:[{validator(Fr,Er){if((Er==null?void 0:Er.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Tr of Er){const{answer_text:Rr}=Tr||{};if(Rr!=null&&Rr.some(gr=>(gr==null?void 0:gr.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Fr,{add:Er,remove:Tr},{errors:Rr})=>(xr.current=Er,Ii.current=Tr,Ji.createElement(Ji.Fragment,null,Ji.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Fr.map((gr,Na)=>{var jo=gr,{key:Sa,name:Ga}=jo,So=Ia(jo,["key","name"]);return Ji.createElement(at.Z,{className:"mb20",key:Sa,align:"middle",wrap:!1},Ji.createElement(mt.Z,{flex:"0 0 auto",className:`${fn.blankIndex}`},"\u586B\u7A7A\u9879",Na+1),Ji.createElement(mt.Z,{flex:1},Ji.createElement(at.Z,{align:"top",justify:"space-between",wrap:!1},Ji.createElement(mt.Z,null,Ji.createElement(He.default.Item,_o(st({},So),{name:[Ga,"answer_text"],noStyle:!0}),Ji.createElement(Ma,null))),(Xt==null?void 0:Xt.getFieldValue(["sub_item_banks",...tt]))&&Ji.createElement(mt.Z,{flex:"224px"},Ji.createElement(He.default.Item,_o(st({},So),{name:[Ga,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:fn.blankInputNumberWrapper}),Ji.createElement(Le.Z,{className:fn.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),Ji.createElement(He.default.Item,_o(st({},So),{name:[Ga,"position"],noStyle:!0}),Ji.createElement(xt.default,{type:"hidden"}))))})))),Ji.createElement(at.Z,{align:"middle"},Ji.createElement(He.default.Item,{name:[On,"downcase"],valuePropName:"checked"},Ji.createElement(er.Z,null)),Ji.createElement(mt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Ji.createElement(at.Z,{align:"middle"},Ji.createElement(He.default.Item,{name:[On,"no_space"],valuePropName:"checked"},Ji.createElement(er.Z,null)),Ji.createElement(mt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Zo==null?void 0:Zo.length)>1&&Ji.createElement(at.Z,{align:"middle",className:(Zo==null?void 0:Zo.length)>1?"mb30":`${fn.hide}`},Ji.createElement(He.default.Item,{name:yr},Ji.createElement(xs,null)),Ji.createElement(mt.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")),Ji.createElement("div",{onClick:()=>to(!0)},Ji.createElement(He.default.Item,{name:kr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ji.createElement(Jt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:wr}))))};var Lo=Object.defineProperty,Po=Object.defineProperties,Xr=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,br=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,wo=(en,Xt,On)=>Xt in en?Lo(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,fi=(en,Xt)=>{for(var On in Xt||(Xt={}))br.call(Xt,On)&&wo(en,On,Xt[On]);if(ha)for(var On of ha(Xt))Ur.call(Xt,On)&&wo(en,On,Xt[On]);return en},Ba=(en,Xt)=>Po(en,Xr(Xt)),Eo=(en,Xt)=>{var On={};for(var tt in en)br.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&ha)for(var tt of ha(en))Xt.indexOf(tt)<0&&Ur.call(en,tt)&&(On[tt]=en[tt]);return On};const es={\u6B63\u786E:"T",\u9519\u8BEF:"F"},fa=({value:en,onChange:Xt,form:On,choiceKey:tt})=>{const nn=(en==null?void 0:en.is_answer)===!0,sr=en==null?void 0:en.choice_text,kr=()=>{var yr;const lr=(yr=On==null?void 0:On.getFieldValue(["sub_item_banks",...tt]))==null?void 0:yr.map(Mi=>({choice_text:Mi==null?void 0:Mi.choice_text,is_answer:!1}));On==null||On.setFieldValue(["sub_item_banks",...tt],lr),Xt(Ba(fi({},en),{is_answer:!0}))};return le.createElement(at.Z,{className:fn.choiceWrap,align:"middle",wrap:!1},le.createElement(mt.Z,{onClick:kr,className:`${fn.choiceIndex} ${fn.judgementIndex} ${nn?fn.activeAnswer:""}`},es[sr]),le.createElement(mt.Z,{flex:1,className:`${fn.editorWrap} ml15`},le.createElement("div",{className:`${fn.inputBorder} ${fn.placeholder} ${nn?fn.activeJudgementAnswer:""}`},sr)),le.createElement(mt.Z,{flex:"0 0 auto",className:"ml15"},le.createElement("div",{onClick:kr,className:`${fn.setAnswerBtn} ${nn?fn.activeAnswer:""}`},nn?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},va=({questionTitlePlaceholder:en,choiceKey:Xt="choices",form:On,titleKey:tt="name",analysisKey:nn="analysis"})=>{const[sr,kr]=(0,le.useState)(!1);return le.createElement("div",{className:fn.wrap},le.createElement("div",{className:fn.questionTitleEditorWrap},le.createElement(He.default.Item,{label:"\u9898\u5E72",name:tt,labelCol:{span:24},rules:[{required:!0}]},le.createElement(Cr,{scrollId:"name",watch:!0,height:140,placeholder:en}))),le.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},le.createElement(He.default.List,{name:Xt,rules:[{validator(yr,lr){return lr.some(wr=>(wr==null?void 0:wr.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},yr=>le.createElement("div",{id:"choices"},yr.map(lr=>{var Mi=lr,{key:wr,name:to}=Mi,yo=Eo(Mi,["key","name"]);return le.createElement(He.default.Item,Ba(fi({},yo),{key:wr,name:to,noStyle:!0}),le.createElement(fa,{form:On,choiceKey:Xt}))})))),le.createElement("div",{onClick:()=>kr(!0)},le.createElement(He.default.Item,{name:nn,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Jt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:sr}))))};var $a=Object.defineProperty,ms=Object.defineProperties,fs=Object.getOwnPropertyDescriptors,Rs=Object.getOwnPropertySymbols,Zs=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Fs=(en,Xt,On)=>Xt in en?$a(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,Go=(en,Xt)=>{for(var On in Xt||(Xt={}))Zs.call(Xt,On)&&Fs(en,On,Xt[On]);if(Rs)for(var On of Rs(Xt))Bn.call(Xt,On)&&Fs(en,On,Xt[On]);return en},kl=(en,Xt)=>ms(en,fs(Xt)),_s=(en,Xt)=>{var On={};for(var tt in en)Zs.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&Rs)for(var tt of Rs(en))Xt.indexOf(tt)<0&&Bn.call(en,tt)&&(On[tt]=en[tt]);return On};const sl=en=>{var Xt=en,{value:On,onChange:tt}=Xt,nn=_s(Xt,["value","onChange"]);const sr=kr=>{tt([kr])};return le.createElement(Wn.Z,kl(Go({},nn),{defaultValue:On==null?void 0:On[0],onChange:sr}))},yu=en=>{if(!en)return!1;let Xt=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 en==="|"?(Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Kl=({value:en=[],onClose:Xt})=>le.createElement(Zi.default,{closable:!0,onClose:Xt,className:fn.keywordTag},en==null?void 0:en.join(" \u6216 ")),gs=({questionTitlePlaceholder:en,form:Xt,showKeywords:On,isMustKeyWords:tt=On,titleKey:nn="name",analysisKey:sr="analysis",answerTexts:kr="answer_texts",keywords:yr="keywords",useKeywords:lr="use_keywords",indexs:Mi})=>{const[wr,to]=(0,le.useState)(!1),[yo,fr]=(0,le.useState)(""),vr=He.default.useWatch("sub_item_banks",Xt),{use_keywords:xr,score:_i}=(vr==null?void 0:vr[Mi])||{};return console.log(xr,_i,"itemValues"),le.createElement("div",{className:fn.wrap},le.createElement("div",{className:fn.questionTitleEditorWrap},le.createElement(He.default.Item,{label:"\u9898\u5E72",name:nn,labelCol:{span:24},rules:[{required:!0}]},le.createElement(Cr,{scrollId:"name",watch:!0,height:140,placeholder:en}))),le.createElement(He.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:kr,labelCol:{span:24}},le.createElement(sl,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),On&&!tt&&le.createElement(He.default.Item,{hidden:!0,name:lr,valuePropName:"checked"},le.createElement(er.Z,{defaultChecked:!0})),On&&tt&&le.createElement(at.Z,{align:"middle",className:"mb30"},le.createElement(He.default.Item,{name:lr,valuePropName:"checked"},le.createElement(er.Z,null)),le.createElement(mt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(mt.Z,null,le.createElement(lt.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"},le.createElement(Gn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(xr||!tt)&&le.createElement(He.default.List,{name:yr,rules:[{validator(Ii,Gr){return tt?Gr!=null&&Gr.length?(Gr==null?void 0:Gr.reduce((Fr,Er)=>Fr+Er.score,0))>parseFloat(_i)?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()}}]},(Ii,{add:Gr,remove:Zo})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${fn.title} mb10`},tt?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(at.Z,{align:"middle",className:"font14 mb30"},le.createElement(mt.Z,{flex:1},le.createElement(xt.default,{value:yo,onChange:Fr=>{fr(Fr.target.value)},maxLength:50,allowClear:!0,onPressEnter:Fr=>{var Er,Tr,Rr,gr;const Na=`${(Er=Fr.target)==null?void 0:Er.value}`,jo=(Rr=(Tr=Na==null?void 0:Na.split("|"))==null?void 0:Tr.filter(So=>!!So))==null?void 0:Rr.map(So=>So==null?void 0:So.trim()),Sa=Xt.getFieldValue(["sub_item_banks",...yr]),Ga=((gr=Sa==null?void 0:Sa.map(So=>So==null?void 0:So.keyword))==null?void 0:gr.flat())||[];for(const So of jo)if(Ga.includes(So)){Ct.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yu(Na)&&(Gr({keyword:jo,score:1}),fr(""))},className:fn.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"})),le.createElement(mt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Ii.map(Fr=>{var Er=Fr,{key:Tr,name:Rr}=Er,gr=_s(Er,["key","name"]);return le.createElement(at.Z,{key:Tr,className:"mb20",style:{marginRight:148}},le.createElement(mt.Z,{flex:1},le.createElement(at.Z,{align:"middle",justify:"space-between"},le.createElement(He.default.Item,kl(Go({},gr),{name:[Rr,"keyword"]}),le.createElement(Kl,{onClose:()=>Zo(Rr)})),tt&&le.createElement(He.default.Item,kl(Go({},gr),{name:[Rr,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:fn.blankInputNumberWrapper}),le.createElement(Le.Z,{className:fn.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>to(!0)},le.createElement(He.default.Item,{name:sr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Jt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:wr}))))};var ya=me(59301),dl=Object.defineProperty,Vo=Object.defineProperties,Ea=Object.getOwnPropertyDescriptors,ua=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable,os=(en,Xt,On)=>Xt in en?dl(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,ll=(en,Xt)=>{for(var On in Xt||(Xt={}))pr.call(Xt,On)&&os(en,On,Xt[On]);if(ua)for(var On of ua(Xt))ks.call(Xt,On)&&os(en,On,Xt[On]);return en},zl=(en,Xt)=>Vo(en,Ea(Xt)),ou=(en,Xt)=>{var On={};for(var tt in en)pr.call(en,tt)&&Xt.indexOf(tt)<0&&(On[tt]=en[tt]);if(en!=null&&ua)for(var tt of ua(en))Xt.indexOf(tt)<0&&ks.call(en,tt)&&(On[tt]=en[tt]);return On},Qi=(en,Xt,On)=>new Promise((tt,nn)=>{var sr=lr=>{try{yr(On.next(lr))}catch(Mi){nn(Mi)}},kr=lr=>{try{yr(On.throw(lr))}catch(Mi){nn(Mi)}},yr=lr=>lr.done?tt(lr.value):Promise.resolve(lr.value).then(sr,kr);yr((On=On.apply(en,Xt)).next())});const{Panel:Ss}=tn.default,Us=null,Vl=(en,Xt)=>{var On=en,{globalSetting:tt,loading:nn,dispatch:sr,editData:kr,onRef:yr=()=>{},isEdit:lr}=On,Mi=ou(On,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[wr,to]=(0,le.useState)(""),[yo,fr]=(0,le.useState)([]),[vr]=He.default.useForm();(0,le.useEffect)(()=>{!kr||!lr||(to(kr==null?void 0:kr.name),fr(kr==null?void 0:kr.sub_item_banks),vr.setFieldsValue(ll({},kr)))},[kr]),(0,le.useEffect)(()=>{fr(vr.getFieldValue("sub_item_banks"))},[He.default.useWatch("sub_item_banks",vr)]),(0,le.useImperativeHandle)(Xt,()=>({onSave:xr,Clear:_i}));const xr=()=>Qi(void 0,null,function*(){if(!wr)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield vr.validateFields()}catch(Tr){return console.log(Tr,"errInfo"),Ct.ZP.error(Tr.errorFields[0].errors[0]),!1}const Er=yo.map(Tr=>ll({id:Tr.id>1?Tr.id:null},Tr));return{name:wr,sub_item_banks:Er}}),_i=()=>{to(""),fr([])},Ii={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"},Gr=({value:Er})=>ya.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},Er),[Zo,Fr]=(0,le.useState)();return ya.createElement("section",{className:St.wrap},ya.createElement("p",{className:St.titleWrap},ya.createElement("span",{className:St.required},"*"),ya.createElement("span",{className:St.title},"\u9898\u5E72\uFF1A")),ya.createElement(Wn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:wr,onChange:Er=>to(Er)}),ya.createElement(He.default,{form:vr,autoComplete:"off"},ya.createElement(He.default.List,{name:"sub_item_banks",rules:[{validator(Er,Tr){return Tr?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Er,{add:Tr,remove:Rr})=>{const gr=vr.getFieldValue("sub_item_banks");return ya.createElement(ya.Fragment,null,ya.createElement(tn.default,{className:Er.length>0?St.collapseWrapper:"",bordered:!1,expandIcon:({isActive:Na})=>ya.createElement("i",{className:`iconfont icon-weizhankai ${Na?St.open:St.close}`,style:{fontSize:14,transition:"all .2s"}})},Er.map((Na,jo)=>{var Sa=Na,{key:Ga,name:So}=Sa,Oa=ou(Sa,["key","name"]),bl,Dr,Ts,zo,Hs,pl,rc,ad,Tc,oc,vc,is;return ya.createElement(Ss,{className:St.panel,forceRender:!0,header:ya.createElement("div",{className:St.panelHeader},"\u7B2C",jo+1,"\u5C0F\u9898",ya.createElement("span",null,"\uFF08",Ii[(bl=gr==null?void 0:gr[So])==null?void 0:bl.item_type],"\uFF09")),extra:ya.createElement(at.Z,{align:"middle",onClick:du=>du.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Dr=gr==null?void 0:gr[So])==null?void 0:Dr.item_type)=="completion"&&ya.createElement(He.default.Item,zl(ll({},Oa),{name:[So,"score"],className:St.blankInputNumberWrapper,style:{marginBottom:0}}),((Ts=gr==null?void 0:gr[So])==null?void 0:Ts.item_type)=="completion"&&ya.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",ya.createElement(Gr,{value:(zo=gr==null?void 0:gr[So])==null?void 0:zo.score}),"\u5206")),((Hs=gr==null?void 0:gr[So])==null?void 0:Hs.item_type)=="completion"&&ya.createElement(ya.Fragment,null,ya.createElement(dt.ZP.Group,{defaultValue:(pl=gr==null?void 0:gr[So])==null?void 0:pl.use_blank_score,className:St.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:du=>{var Rc;console.log(vr.getFieldsValue()),vr==null||vr.setFieldValue(["sub_item_banks",So,"use_blank_score"],(Rc=du==null?void 0:du.target)==null?void 0:Rc.value),Fr(new Date)}}),ya.createElement(lt.Z,{overlayInnerStyle:{width:460},title:ya.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",ya.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")},ya.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Ga},ya.createElement(He.default.Item,zl(ll({},Oa),{name:So}),(((rc=gr==null?void 0:gr[So])==null?void 0:rc.item_type)=="single"||((ad=gr==null?void 0:gr[So])==null?void 0:ad.item_type)=="multiple")&&ya.createElement(Ko,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Tc=gr==null?void 0:gr[So])==null?void 0:Tc.item_type)!="single",form:vr,choiceKey:[So,"choices"],titleKey:[So,"name"],analysisKey:[So,"analysis"],choiceOptionsPath:["sub_item_banks",So,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((oc=gr==null?void 0:gr[So])==null?void 0:oc.item_type)=="completion"&&ya.createElement(Ps,{form:vr,name:So,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[So,"use_blank_score"],titleKey:[So,"name"],analysisKey:[So,"analysis"],isOrdered:[So,"is_ordered"],answerKey:[So,"standard_answer"],key:Zo}),((vc=gr==null?void 0:gr[So])==null?void 0:vc.item_type)=="judgement"&&ya.createElement(va,{form:vr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[So,"name"],analysisKey:[So,"analysis"],choiceKey:[So,"choices"]}),((is=gr==null?void 0:gr[So])==null?void 0:is.item_type)=="subjective"&&ya.createElement(gs,{showKeywords:!0,form:vr,titleKey:[So,"name"],analysisKey:[So,"analysis"],answerTexts:[So,"answer_texts"],useKeywords:[So,"use_keywords"],keywords:[So,"keywords"],indexs:So,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var Tl=(0,_e.connect)(({loading:en,globalSetting:Xt})=>({globalSetting:Xt,loading:en.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Vl)),Ul=me(75872),Io=me(19842),ic=me(57809),Zl=me(1710),En={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"},Nn=me(15965),ri=me(38389),qi=me(94811),$i=me(59579),ki=me(57816),Ri=me(72559),Li=({open:en,onCancel:Xt,onOk:On})=>{const tt=(0,ri.g)(),[nn,sr,kr,yr]=(0,$i.U)(qi.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[lr,Mi]=(0,le.useState)(!1);(0,le.useEffect)(()=>{en&&kr({page:1,limit:10,type:0},!0).then(vr=>{(vr==null?void 0:vr.shixuns_count)===0&&Mi(!0)})},[en]);const[wr,to]=(0,le.useState)([]),[yo,fr]=(0,le.useState)([]);return le.createElement(Ve.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:en,width:948,centered:!0,closable:!0,onCancel:Xt,onOk:()=>On(yo),destroyOnClose:!0},le.createElement(at.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(mt.Z,null,le.createElement(Io.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:tt,onChange:vr=>{kr({page:1,discipline_id:vr==null?void 0:vr[0],sub_discipline_id:vr==null?void 0:vr[1]})}}),le.createElement(ic.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:vr=>kr({page:1,diff:vr})}),le.createElement(ic.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:vr=>kr({page:1,shixun_publish_status:vr})})),le.createElement(Nn.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:vr=>{kr({keyword:vr,page:1})}})),lr?le.createElement("div",null,le.createElement(ki.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,Je.xg)("/shixuns")})):le.createElement(Zl.default,{loading:sr,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(vr,xr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:xr!=null&&xr.high_resources_consume?En.title:"",title:vr||"--"},le.createElement(je.Z,{key:1,showLines:1,showTextOnly:!0,value:vr||"--"})),(xr==null?void 0:xr.high_resources_consume)&&le.createElement(Ri.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(vr,xr,_i)=>le.createElement("span",null,vr||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(lt.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement(Gn.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(vr,xr,_i)=>le.createElement("span",null,vr||"- -")},{title:"\u64CD\u4F5C",render(vr,xr){const{title:_i,challenge_names:Ii,author_name:Gr,identifier:Zo,author_school_name:Fr,study_count:Er}=xr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Ve.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(je.Z,{value:_i,style:{marginBottom:18}}),le.createElement("div",{className:En.challengeNameWrapper},Ii.map((Tr,Rr)=>le.createElement("div",{className:En.challengeName,key:Rr},"\u7B2C",(0,Je.EM)(Rr+1),"\u9898\xA0",Tr))),le.createElement(at.Z,{className:En.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(mt.Z,{className:En.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:En.shixunInfo},Gr.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:En.shixunInfo},Fr),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:En.shixunInfo},Er)),le.createElement(We.ZP,{type:"primary",className:En.btnToDetail,onClick:()=>(0,Je.xg)(`/shixuns/${Zo}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(xr==null?void 0:xr.shixun_tag_num)===1&&le.createElement("a",{target:"_blank",href:`/shixuns/${xr==null?void 0:xr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:yr==null?void 0:yr.items,rowSelection:{type:"radio",selectedRowKeys:wr,preserveSelectedRowKeys:!0,getCheckboxProps:vr=>({disabled:vr.shixun_tag_num===1}),onChange(vr,xr){var _i,Ii,Gr;console.log(vr),to(vr);const Zo=[];for(const Er of yo)vr.includes(Er.id)&&Zo.push(Er);const Fr=Zo.map(Er=>Er.id);for(const Er of xr)Er&&vr.includes(Er.id)&&!Fr.includes(Er.id)&&Zo.push({id:Er.id,difficulty:Er.level,identifier:Er.identifier,name:Er.name,real_name:(_i=Er==null?void 0:Er.author_name)==null?void 0:_i.split("\u3001")[0],school_name:Er.author_school_name,challenge_names:Er.challenge_names,challenges:(Ii=Er.challenge_names)==null?void 0:Ii.map((Tr,Rr)=>({subject:Tr,id:Rr,score:5})),score:((Gr=Er.challenge_names)==null?void 0:Gr.length)*5,study_count:Er.study_count,challenges_count:Er.challenges_count});fr(Zo)}},pagination:{current:nn.page,pageSize:nn.limit,total:yr==null?void 0:yr.items_count,showTotal:vr=>le.createElement("span",null,"\u5171\xA0",le.createElement("span",{style:{color:"#165DFF"}},vr),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(vr,xr){kr({page:vr,limit:xr})},size:"default"},scroll:{y:400}}))},ur=me(20527),Zr=me(49898),ga=(en,Xt,On)=>new Promise((tt,nn)=>{var sr=lr=>{try{yr(On.next(lr))}catch(Mi){nn(Mi)}},kr=lr=>{try{yr(On.throw(lr))}catch(Mi){nn(Mi)}},yr=lr=>lr.done?tt(lr.value):Promise.resolve(lr.value).then(sr,kr);yr((On=On.apply(en,Xt)).next())}),Ua=({visible:en,getdata:Xt,onCancel:On,onRandomExchange:tt,selectFromProblemSet:nn,questionParams:sr})=>{const[kr,yr]=(0,le.useState)(!1),[lr,Mi]=(0,le.useState)(!1),[wr,to]=(0,le.useState)({}),yo=(0,_e.useParams)(),[fr,vr]=(0,le.useState)(),xr=(_i,Ii)=>ga(void 0,null,function*(){Mi(!0);const Gr=yield(0,Xe.ZP)(`/api/exercises/${yo.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:sr.id,item_bank_id:_i,shixuns_info:[{id:_i,is_copy:Ii!=1,is_use:Ii!=1}]}});Mi(!1),Gr!=null&&Gr.status||(Ct.ZP.info("\u6362\u9898\u6210\u529F"),On(),Xt())});return le.createElement(Ve.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:en,onCancel:On,centered:!0,maskClosable:!0,footer:null},le.createElement(at.Z,{justify:"center",className:"pb20"},le.createElement(Ul.Z,{onClick:tt},"\u968F\u673A\u66F4\u6362"),(sr==null?void 0:sr.type)!=="PRACTICAL"&&le.createElement(We.ZP,{style:{marginLeft:24},onClick:nn},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"),(sr==null?void 0:sr.type)==="PRACTICAL"&&le.createElement(We.ZP,{style:{marginLeft:24},onClick:()=>{yr(!0)}},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9")),le.createElement(Li,{open:kr,onCancel:()=>yr(!1),onOk:_i=>ga(void 0,null,function*(){if(console.log("----selectedRows",_i,yo),(_i==null?void 0:_i.length)<=0){Ct.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let Ii=_i==null?void 0:_i.map(Zo=>Zo==null?void 0:Zo.id),Gr=yield(0,Zr.Tr)({id:[...Ii],course_id:yo.coursesId,type:"shixun"});(Gr==null?void 0:Gr.student_count)===0?xr(Ii==null?void 0:Ii[0],1):(vr(Ii),to(Gr)),yr(!1)})}),le.createElement(ur.Z,{resdata:wr,type:"shixun",okloading:lr,oktext:(wr==null?void 0:wr.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:_i=>ga(void 0,null,function*(){xr(fr==null?void 0:fr[0],2)})}))},Ka=me(37542),No=me(24334),qr=me(85016),Bi=me(65532),eo=me(149),Yo=Object.defineProperty,ma=Object.defineProperties,xa=Object.getOwnPropertyDescriptors,bo=Object.getOwnPropertySymbols,ra=Object.prototype.hasOwnProperty,Ao=Object.prototype.propertyIsEnumerable,Or=(en,Xt,On)=>Xt in en?Yo(en,Xt,{enumerable:!0,configurable:!0,writable:!0,value:On}):en[Xt]=On,Aa=(en,Xt)=>{for(var On in Xt||(Xt={}))ra.call(Xt,On)&&Or(en,On,Xt[On]);if(bo)for(var On of bo(Xt))Ao.call(Xt,On)&&Or(en,On,Xt[On]);return en},Ha=(en,Xt)=>ma(en,xa(Xt)),La=(en,Xt,On)=>new Promise((tt,nn)=>{var sr=lr=>{try{yr(On.next(lr))}catch(Mi){nn(Mi)}},kr=lr=>{try{yr(On.throw(lr))}catch(Mi){nn(Mi)}},yr=lr=>lr.done?tt(lr.value):Promise.resolve(lr.value).then(sr,kr);yr((On=On.apply(en,Xt)).next())}),xu=({data:en,submit:Xt,goBack:On,loading:tt,onTypeScore:nn,editPreview:sr=!1,onSkipExamination:kr,selectValue:yr,onExchange:lr,getdata:Mi,handleMarkWrongQuestion:wr})=>{var to,yo,fr,vr,xr,_i,Ii,Gr,Zo,Fr,Er;const Tr=(0,le.useRef)(),[Rr,gr]=(0,le.useState)(null),[Na,jo]=(0,le.useState)(!1),[Sa,Ga]=(0,le.useState)(!1),So=(0,le.useRef)(),[Oa]=He.default.useForm(),bl=(0,_e.useParams)(),[Dr,Ts]=(0,le.useState)(!1);(0,le.useEffect)(()=>{jo(!0)},[]),(0,le.useEffect)(()=>{sr||(0,Je.Dk)("\u8BD5\u5377\u9884\u89C8")},[sr]);const zo=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],Hs={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"},pl={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"},rc=ai=>{var po;const Xa=[];return le.createElement(le.Fragment,null,le.createElement("aside",{className:Te.single},(po=ai==null?void 0:ai.choices)==null?void 0:po.map((rt,et)=>(rt.is_answer&&Xa.push(eo.k4[et]),le.createElement("ul",{key:et},le.createElement("li",null,eo.k4[et],"\u3001"),le.createElement("li",null,le.createElement(je.Z,{value:rt.choice_text})))))),le.createElement("div",{className:Te.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Xa.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",zo[ai.difficulty])),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:ai.analysis?ai.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(ai==null?void 0:ai.discipline_name)||"--"}/${ai==null?void 0:ai.sub_discipline_name}`),le.createElement(lt.Z,{title:ai==null?void 0:ai.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ai==null?void 0:ai.tag_discipline_name)))))},ad=(ai,po)=>{var Xa;const rt=(Xa=ai==null?void 0:ai.standard_answer)==null?void 0:Xa.map((et,Yt)=>{var Qt;return le.createElement("div",{key:Yt},`\u7B54\u6848\uFF08\u586B\u7A7A${et==null?void 0:et.position}\uFF09\uFF1A${(Qt=et==null?void 0:et.answer_text)==null?void 0:Qt.join("\u3001")}`)});return le.createElement(le.Fragment,null,le.createElement("div",{className:Te.analysis},le.createElement("div",{style:{display:"flex"}},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),le.createElement("div",null,rt)),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:ai.analysis?ai.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),po?`${(po==null?void 0:po.discipline_name)||"--"}/${po==null?void 0:po.sub_discipline_name}`:`${(ai==null?void 0:ai.discipline_name)||"--"}/${ai==null?void 0:ai.sub_discipline_name}`),le.createElement(lt.Z,{title:po?po==null?void 0:po.tag_discipline_name:ai==null?void 0:ai.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),po?po==null?void 0:po.tag_discipline_name:ai==null?void 0:ai.tag_discipline_name)))))},Tc=ai=>{var po;const Xa=(po=ai==null?void 0:ai.standard_answer)==null?void 0:po.map((rt,et)=>le.createElement("div",{key:et},`\u7B54\u6848\uFF08\u586B\u7A7A${(rt==null?void 0:rt.position)||(rt==null?void 0:rt.exercise_choice_id)}\uFF09\uFF1A${rt==null?void 0:rt.answer_text}`));return le.createElement(le.Fragment,null,le.createElement("div",{className:Te.analysis},le.createElement("div",{style:{display:"flex"}},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),le.createElement("div",null,Xa)),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:ai.analysis?ai.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(ai==null?void 0:ai.discipline_name)||"--"}/${ai==null?void 0:ai.sub_discipline_name}`),le.createElement(lt.Z,{title:ai==null?void 0:ai.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ai==null?void 0:ai.tag_discipline_name)))))},oc=(ai,po)=>{var Xa;return le.createElement("div",{className:Te.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Xa=ai==null?void 0:ai.answer_texts)==null?void 0:Xa[0]),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:ai.analysis?ai.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),po?`${(po==null?void 0:po.discipline_name)||"--"}/${po==null?void 0:po.sub_discipline_name}`:`${(ai==null?void 0:ai.discipline_name)||"--"}/${ai==null?void 0:ai.sub_discipline_name}`),le.createElement(lt.Z,{title:po?po==null?void 0:po.tag_discipline_name:ai==null?void 0:ai.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),po?po==null?void 0:po.tag_discipline_name:ai==null?void 0:ai.tag_discipline_name))))},vc=ai=>{var po,Xa;return le.createElement("div",{className:Te.analysis},le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u9884\u671F\u8F93\u51FA:"),le.createElement(je.Z,{value:(po=ai==null?void 0:ai.program_attr)==null?void 0:po.description})),le.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Xa=ai==null?void 0:ai.program_attr)==null?void 0:Xa.answer_text)||"--"),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:ai.analysis?ai.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(ai==null?void 0:ai.discipline_name)||"--"}/${ai==null?void 0:ai.sub_discipline_name}`),le.createElement(lt.Z,{title:ai==null?void 0:ai.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ai==null?void 0:ai.tag_discipline_name))))},is=(ai,po)=>{var Xa;return le.createElement("div",null,(Xa=ai==null?void 0:ai.sub_item_banks)==null?void 0:Xa.map((rt,et)=>{var Yt,Qt;const yn=[];return le.createElement(le.Fragment,null,le.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},po+1+"."+(et+1),"\uFF08",Hs[rt.item_type]||pl[rt.item_type],"\uFF09",rt.name),(rt.item_type=="SINGLE"||rt.item_type=="MULTIPLE"||rt.item_type=="JUDGMENT"||rt.item_type=="single"||rt.item_type=="multiple"||rt.item_type=="judgement")&&le.createElement(le.Fragment,null,le.createElement("aside",{className:Te.single},(Yt=rt==null?void 0:rt.choices)==null?void 0:Yt.map((on,Kn)=>(on.is_answer&&yn.push(eo.k4[Kn]),le.createElement("ul",{key:Kn},le.createElement("li",null,eo.k4[Kn],"\u3001"),le.createElement("li",null,le.createElement(je.Z,{value:on.choice_text})))))),le.createElement("div",{className:Te.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",yn.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",zo[rt.difficulty])),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:rt.analysis?rt.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(ai==null?void 0:ai.discipline_name)||"--"}/${ai==null?void 0:ai.sub_discipline_name}`),le.createElement(lt.Z,{title:ai==null?void 0:ai.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ai==null?void 0:ai.tag_discipline_name))))),(rt.item_type=="COMPLETION"||rt.item_type=="completion")&&ad(rt,ai),(rt.item_type=="SUBJECTIVE"||rt.item_type=="subjective")&&oc(rt,ai),((Qt=en==null?void 0:en.exam)==null?void 0:Qt.exercise_status)===3&&le.createElement("div",{className:"flex gap-20px mt20"},le.createElement(qr.Z,{state:rt==null?void 0:rt.is_wrong,onClick:()=>{wr==null||wr({value:Ha(Aa({},rt),{question_id:rt==null?void 0:rt.id,question_score:rt==null?void 0:rt.score})})}}),rt.item_type=="single"&&le.createElement(We.ZP,{style:{color:"#3061D0"},onClick:()=>{_d({value:rt})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},du=ai=>{var po,Xa,rt;return le.createElement("div",{style:{marginTop:"12px"}},(Xa=(po=ai==null?void 0:ai.shixun)==null?void 0:po.challenges)==null?void 0:Xa.map((et,Yt)=>le.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},le.createElement("div",null,le.createElement("span",{className:"mr5"},"\u7B2C",Yt+1,"\u5173"),le.createElement(lt.Z,{key:Yt,title:et==null?void 0:et.challenge_name},le.createElement("span",null,(0,Je.Pq)(et==null?void 0:et.challenge_name,44)))),sr&&le.createElement("div",null,"\u5206\u503C\uFF1A",et.score,"\u5206"))),le.createElement(_e.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(rt=ai==null?void 0:ai.shixun)==null?void 0:rt.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),le.createElement("div",{style:{clear:"both"}}))},Rc=ai=>{let po=ai.questions_score/ai.questions_count;Ve.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:le.createElement("div",{className:Te.modalColumn},le.createElement("div",{className:Te.modalRow,style:{justifyContent:"flex-start"}},le.createElement("sup",{className:Te.sup},"*"),le.createElement("span",null,ai==null?void 0:ai.name,"\uFF1A"),le.createElement(Le.Z,{min:0,precision:1,defaultValue:po,onChange:Xa=>{po=Xa}}),le.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){var Xa;if(!po)return Ct.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const rt={type:ai==null?void 0:ai.type,score:po,scoreTotal:Number((Xa=po*ai.questions_count)==null?void 0:Xa.toFixed(1))};nn(rt)})})},ac=()=>{let ai="";Ve.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:le.createElement("div",{className:Te.modalColumn},le.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},le.createElement("img",{style:{marginRight:5},src:ln.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),le.createElement("div",{className:Te.modalRow,style:{marginTop:20}},le.createElement("sup",{className:Te.sup},"*"),le.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),le.createElement(xt.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:ai,onChange:po=>{ai=po.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){var po;if(!ai)return Ct.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Xa=[],rt=[],et=[],Yt=[];(po=en==null?void 0:en.questionList)==null||po.forEach(yn=>{var on;(on=yn.questions)==null||on.forEach(Kn=>{let zn=yn.questions_score/yn.questions_count;zn=zn&&zn.toFixed(1),yn.type==="COMBINATION"&&et.push({id:Kn.id,sub_item_bank_ids:Kn.sub_item_banks.map(Xn=>Xn.id)}),yn.type==="PRACTICAL"?Yt.push(Kn.id):(Xa.push(Kn.id),rt.push(zn))})}),console.log("-----",et),yield Xt({item_bank_ids:Xa,item_bank_scores:rt,name:ai,combination_item_banks:et,shixun_ids:Yt})})})},Rd=(ai,po,Xa,rt)=>{var et;const Yt=`${location.pathname}${location.search}`,Qt=(et=rt.questions)==null?void 0:et.map(yn=>yn==null?void 0:yn.id);if(Yt.includes("exercise"))So.current={id:ai,ids:Qt,type:po,index:Xa},Ga(!0);else{let yn=Ve.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:()=>La(void 0,null,function*(){yn.update({cancelButtonProps:{disabled:!0}}),yield lr({single_question_id:ai,seleted_item_bank_ids:Qt},{type:po,index:Xa}),yn.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},au=ai=>{var po;const Xa=(po=ai.questions)==null?void 0:po.map(Yt=>Yt==null?void 0:Yt.id),rt=ai.name;let et=Ve.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${rt}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){et.update({cancelButtonProps:{disabled:!0}}),yield lr({seleted_item_bank_ids:Xa},{type:ai.type}),et.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${rt}\u8BD5\u9898`)})})},su=()=>{let ai=Ve.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:()=>La(void 0,null,function*(){ai.update({cancelButtonProps:{disabled:!0}}),yield lr(),ai.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},Wu=ai=>{console.log(ai,"key"),kr(ai-1)},Au=(ai,po)=>{var Xa,rt;if(po==="SINGLE")return le.createElement(le.Fragment,null,le.createElement(vi,{ref:Tr,editData:ai,isEdit:!0}),le.createElement(Ue.Z,null));if(po==="MULTIPLE")return le.createElement(le.Fragment,null,le.createElement(Ni,{ref:Tr,editData:ai,isEdit:!0}),le.createElement(Ue.Z,null));if(po==="JUDGMENT")return le.createElement(le.Fragment,null,le.createElement(hn,{ref:Tr,editData:ai,isEdit:!0}),le.createElement(Ue.Z,null));if(po==="COMPLETION")return le.createElement(le.Fragment,null,le.createElement(Nt,{ref:Tr,editData:ai,isEdit:!0}),le.createElement(Ue.Z,null));if(po==="SUBJECTIVE")return le.createElement(le.Fragment,null,le.createElement(xi,{ref:Tr,editData:ai,isEdit:!0}),le.createElement(Ue.Z,null));if(po==="COMBINATION")return le.createElement(le.Fragment,null,le.createElement(Tl,{ref:Tr,editData:ai,isEdit:!0}),le.createElement(Ue.Z,null));if(po==="BPROGRAM")return le.createElement(le.Fragment,null,le.createElement(He.default,{form:Oa,style:{marginTop:20},onFinishFailed:et=>{var Yt,Qt;et.errorFields[0].name.includes("standard_answers")?Ct.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):Ct.ZP.error(et.errorFields[0].errors[0]),Oa.scrollToField((Qt=(Yt=et==null?void 0:et.errorFields)==null?void 0:Yt[0])==null?void 0:Qt.name,{behavior:"smooth",block:"center"})},onFinish:et=>La(void 0,null,function*(){var Yt;let Qt=Ha(Aa({question_score:ai.score},et),{question_type:8,hack:Ha(Aa({},et.hack),{difficult:ai.program_attr.difficult}),hack_codes:Ha(Aa({},et.hack_codes),{code:No.Base64.encode((Yt=et.hack_codes)==null?void 0:Yt.code)})});Dr&&(Qt.is_cover=1);const yn=yield(0,Xe.ZP)(`/api/exercise_questions/${ai.id}.json`,{method:"put",body:Qt});(yn==null?void 0:yn.status)===0&&(Ct.ZP.success("\u7F16\u8F91\u6210\u529F"),Wu(yr+1)),gr(null)})},le.createElement(Ka.tc,{form:Oa,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Xa=ai==null?void 0:ai.program_attr)==null?void 0:Xa.identifier,answerKey:"standard_answers"}),le.createElement(Ue.Z,null)));if(po==="PROGRAM"&&_e.history.push(`/problems/${(rt=ai==null?void 0:ai.program_attr)==null?void 0:rt.identifier}/edit?type=exercises&express_id=${bl.categoryId}&question_id=${ai==null?void 0:ai.id}&score=${ai==null?void 0:ai.score}&callback_url=${location.pathname}&select=${yr}&exercise=true`),po==="PRACTICAL")return le.createElement(le.Fragment,null,le.createElement(Wi,{ref:Tr,editData:ai,isEdit:!0}),le.createElement(Ue.Z,null))},yc=(ai,po)=>La(void 0,null,function*(){var Xa,rt,et,Yt,Qt,yn;const on=yield(Xa=Tr.current)==null?void 0:Xa.onSave();if(!on)return;const Kn=Jn=>{const yi=Jn.map(Vi=>Vi.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(yi).size!==yi.length},zn={question_score:po.score,analysis:on.analysis};if(ai==="SINGLE"||ai==="MULTIPLE"||ai==="JUDGMENT"){if(ai!=="JUDGMENT"&&Kn(on==null?void 0:on.choices)){Ct.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const Jn=[],yi=[];zn.question_type=ai==="JUDGMENT"?2:1,zn.question_title=on==null?void 0:on.name,(rt=on==null?void 0:on.choices)==null||rt.forEach((or,Vi)=>{Jn.push(or.choice_text),or!=null&&or.is_answer&&yi.push(Vi+1)}),zn.question_choices=Jn,zn.standard_answers=yi}if(ai==="COMPLETION"){let Jn=(et=on==null?void 0:on.standard_answers)==null?void 0:et.map((Vi,Ui)=>(Vi==null?void 0:Vi.score)<=0?Ui+1:null).filter(Vi=>Vi!==null);if((Jn==null?void 0:Jn.length)>0)return Ct.ZP.warning(`\u7B2C${Jn.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let yi=(Yt=on==null?void 0:on.standard_answers)==null?void 0:Yt.reduce((Vi,Ui)=>Vi+(Number(Ui==null?void 0:Ui.score)||0),0);if(parseFloat(yi.toFixed(2))!=(zn==null?void 0:zn.question_score))return Ct.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;zn.is_ordered=on.is_ordered,zn.question_title=on==null?void 0:on.name,zn.use_blank_score=on==null?void 0:on.use_blank_score,zn.question_type=3;const or=[];(Qt=on==null?void 0:on.standard_answers)==null||Qt.forEach((Vi,Ui)=>{or.push({choice_id:Vi.position,answer_text:Vi.answer_text,score:Vi.score})}),zn.standard_answers=or,zn.downcase=on==null?void 0:on.downcase,zn.no_space=on==null?void 0:on.no_space}if(ai==="SUBJECTIVE"&&(console.log("editorData"),console.log(on),zn.question_title=on==null?void 0:on.name,zn.question_type=4,zn.answer_texts=on==null?void 0:on.answer_texts,zn.use_keywords=on==null?void 0:on.use_keywords,zn.keywords=on==null?void 0:on.keywords),ai==="COMBINATION"){zn.question_title=on==null?void 0:on.name,zn.question_type=7;try{zn.sub_questions=(yn=on==null?void 0:on.sub_item_banks)==null?void 0:yn.map((Jn,yi)=>{var or,Vi,Ui;if((Jn==null?void 0:Jn.item_type)=="single"||(Jn==null?void 0:Jn.item_type)=="multiple"){if(Kn(Jn==null?void 0:Jn.choices))throw new Error(`\u7B2C${yi+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const Jr=[],rr=[];return(or=Jn==null?void 0:Jn.choices)==null||or.forEach((_r,zr)=>{Jr.push(_r.choice_text),_r!=null&&_r.is_answer&&rr.push(zr+1)}),{id:Jn.id,question_id:Jn.id,question_title:Jn.name,difficulty:Jn.difficulty,question_type:(Jn==null?void 0:Jn.item_type)=="single"?0:(Jn==null?void 0:Jn.item_type)=="multiple"?1:2,question_choices:Jr,standard_answers:rr,analysis:Jn.analysis,question_score:Jn==null?void 0:Jn.score}}else if((Jn==null?void 0:Jn.item_type)=="completion"){let Jr=(Vi=Jn==null?void 0:Jn.standard_answer)==null?void 0:Vi.reduce((_r,zr)=>_r+(Number(zr==null?void 0:zr.score)||0),0);if(parseFloat(Jr.toFixed(2))!=(Jn==null?void 0:Jn.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const rr=[];return(Ui=Jn==null?void 0:Jn.standard_answer)==null||Ui.forEach((_r,zr)=>{rr.push({choice_id:_r.position,answer_text:_r.answer_text,score:_r.score})}),{id:Jn.id,question_id:Jn.id,is_ordered:Jn.is_ordered,question_title:Jn.name,difficulty:Jn.difficulty,question_type:3,standard_answers:rr,use_blank_score:Jn.use_blank_score,analysis:Jn.analysis,downcase:Jn==null?void 0:Jn.downcase,no_space:Jn==null?void 0:Jn.no_space,question_score:Jn==null?void 0:Jn.score}}else if((Jn==null?void 0:Jn.item_type)=="subjective")return{id:Jn.id,question_id:Jn.id,question_title:Jn.name,question_type:4,difficulty:Jn.difficulty,answer_texts:Jn==null?void 0:Jn.answer_texts,analysis:Jn.analysis,question_score:Jn==null?void 0:Jn.score,use_keywords:Jn.use_keywords,keywords:Jn==null?void 0:Jn.keywords}})}catch(Jn){Ct.ZP.warning(Jn.message);return}delete zn.analysis}let Xn=!1;(po==null?void 0:po.is_my)===1&&(Xn=yield new Promise((yi,or)=>{Ve.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:()=>{yi(!0)},onCancel:()=>{yi(!1)}})})),Xn&&(zn.is_cover=1);const Pi=ai!=="PRACTICAL"?yield(0,Xe.ZP)(`/api/exercise_questions/${po.id}.json`,{method:"put",body:zn}):yield(0,Xe.ZP)(`/api/exercise_questions/${po.id}/update_shixun_score.json`,{method:"post",body:Aa({},on)});(Pi==null?void 0:Pi.status)===0&&(Ct.ZP.success("\u7F16\u8F91\u6210\u529F"),Wu(yr+1),gr(null))}),bd=()=>La(void 0,null,function*(){(0,_e.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,Xe.ZP)(`/api/exercises/${bl.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield kr(yr),Ct.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,_e.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),_d=({value:ai}={})=>{var po;const Xa=[];let rt=[];const et=(po=ai==null?void 0:ai.choices)==null?void 0:po.map((Qt,yn)=>{var on;const Kn=yn+1;return Qt!=null&&Qt.is_answer&&(Xa.push(Kn),rt.push(Kn)),{value:Kn,label:le.createElement(je.Z,{className:"c-black font14",value:`${(on=eo.k4)==null?void 0:on[yn]}. ${Qt==null?void 0:Qt.choice_text}`}),disabled:Qt==null?void 0:Qt.origin_standard_answer}}),Yt=Ve.default.confirm({centered:!0,icon:null,title:"\u589E\u8BBE\u6B63\u786E\u7B54\u6848",width:800,content:le.createElement(le.Fragment,null,"\u5F53\u524D\u8BD5\u9898\u7684\u6B63\u786E\u7B54\u6848\u4E3A ",Xa==null?void 0:Xa.map(Qt=>{var yn;return(yn=eo.k4)==null?void 0:yn[Qt-1]}),"\uFF0C\u8BF7\u9009\u62E9\u9700\u8981\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u7684\u9009\u9879\u3002",le.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",le.createElement("br",null),le.createElement(bt.default.Group,{className:"flex-col mt20",options:et,defaultValue:rt,onChange:Qt=>{rt=Qt}})),onOk:()=>La(void 0,null,function*(){const Qt=yield(0,Xe.ZP)(`/api/exercises/${bl.categoryId}/questions/${ai==null?void 0:ai.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:rt}});(Qt==null?void 0:Qt.status)===0&&(Ct.ZP.success("\u4FEE\u6539\u6210\u529F"),Wu(yr+1))})})},Fd=(to=en==null?void 0:en.questionList)==null?void 0:to.reduce((ai,po)=>ai+Number(po.questions_score),0),ch=sr&&((yo=en==null?void 0:en.exam)==null?void 0:yo.exercise_status)!==1;return le.createElement("section",{className:Te.wrap},le.createElement("div",{id:"id_left_preview",className:Te.left,onMouseEnter:ai=>{const po=document.getElementById("id_left_preview");po.style.overflowY="auto"},onMouseLeave:ai=>{const po=document.getElementById("id_left_preview");po.style.overflowY="hidden"}},le.createElement("div",{className:Te.title},le.createElement("div",{className:"body-overflow-initial"},le.createElement("b",null),le.createElement("span",null,"\u7B54\u9898\u5361"))),le.createElement("div",{className:Te.total},le.createElement("div",null,le.createElement("img",{src:Wt}),le.createElement("span",null,"\u9898\u6570(\u9053)"),le.createElement("aside",null,en==null?void 0:en.all_questions_count)),le.createElement("div",{className:"mr30 ml30"},le.createElement("img",{src:rn}),le.createElement("span",null,"\u603B\u5206(\u5206)"),le.createElement("aside",null,Fd&&Fd.toFixed(1))),le.createElement("div",null,le.createElement("img",{src:Be}),le.createElement("span",null,"\u65F6\u957F(\u5206)"),le.createElement("aside",null,((fr=en==null?void 0:en.exam)==null?void 0:fr.time)===-1||((vr=en==null?void 0:en.exam)==null?void 0:vr.time)===null?"\u4E0D\u9650":(xr=en==null?void 0:en.exam)==null?void 0:xr.time))),(_i=en==null?void 0:en.questionList)==null?void 0:_i.map((ai,po)=>{var Xa;return le.createElement("div",{className:Te.list,key:po},le.createElement("div",{className:Te.name},le.createElement("b",null),le.createElement("span",null,ai.name)),le.createElement("aside",null,le.createElement("div",null,"\u5171",le.createElement("span",{className:Te.b},ai.questions_count),"\u9898 ",le.createElement("span",{className:Te.l},"|"),"\u5171",le.createElement("span",{className:Te.r},ai.questions_score),"\u5206"),le.createElement("div",{className:Te.answerSheet},(Xa=ai==null?void 0:ai.questions)==null?void 0:Xa.map((rt,et)=>le.createElement("div",{onClick:()=>{const Yt=`Anchor_${rt==null?void 0:rt.id}`;let Qt=document.getElementById(Yt);Qt&&setTimeout(()=>Qt.scrollIntoView({block:"center",behavior:"smooth"}))},key:rt==null?void 0:rt.id,className:Te.tag},et+1)))))})),le.createElement("div",{className:Te.right},le.createElement("div",{className:Te.examName,id:"examName"},le.createElement("div",{className:Te.name},le.createElement(lt.Z,{title:(Ii=en==null?void 0:en.exam)==null?void 0:Ii.name,getPopupContainer:ai=>ai.parentNode},le.createElement("span",{className:Te.t},(Gr=en==null?void 0:en.exam)==null?void 0:Gr.name))),sr&&((Zo=en==null?void 0:en.exam)==null?void 0:Zo.exercise_status)===1&&le.createElement(Nn.op,{openLoading:!0,shape:"default",onClick:()=>{Ve.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:()=>{bd()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!sr&&le.createElement(We.ZP,{onClick:su,type:"primary"},"\u968F\u673A\u66F4\u6362")),le.createElement("div",{className:Te.topWarp},(Fr=en==null?void 0:en.questionList)==null?void 0:Fr.map((ai,po)=>{var Xa,rt;return le.createElement(le.Fragment,{key:po},le.createElement("div",{className:Te.head,style:po===0?{border:0,marginTop:-16}:{}},le.createElement("div",{className:Te.name},le.createElement("b",null),le.createElement("span",null,ai.name)),le.createElement("div",{className:Te.so},"\u5171",le.createElement("span",{className:Te.b},ai.questions_count," "),"\u9898 ",ai.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Xa=ai==null?void 0:ai.questions)==null?void 0:Xa.map(et=>{var Yt;return(Yt=et==null?void 0:et.sub_item_banks)==null?void 0:Yt.length}).reduce((et,Yt)=>et+Yt)}\u5C0F\u9898\uFF09`,le.createElement("span",{className:Te.l},"|"),"\u5171",le.createElement("span",{className:Te.r},ai.questions_score),"\u5206"),!sr&&le.createElement("div",{className:Te.btn},le.createElement(We.ZP,{onClick:()=>{Rc(ai)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),le.createElement(We.ZP,{onClick:()=>au(ai),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(rt=ai==null?void 0:ai.questions)==null?void 0:rt.map((et,Yt)=>{var Qt,yn,on,Kn;return Rr===(et==null?void 0:et.id)?le.createElement("div",{id:`Anchor_${et==null?void 0:et.id}`,className:Te.content,style:{padding:0,marginTop:24},key:et==null?void 0:et.id},le.createElement("div",{style:{float:"right",marginTop:`${(ai==null?void 0:ai.type)==="PRACTICAL"?"-2px":"-6px"}`}},le.createElement(We.ZP,{onClick:()=>gr(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),le.createElement(We.ZP,{onClick:()=>{yc(ai==null?void 0:ai.type,et)},type:"primary"},"\u4FDD\u5B58")),Au(et,ai.type)):le.createElement("div",{id:`Anchor_${et==null?void 0:et.id}`,className:Te.content,key:et==null?void 0:et.id},le.createElement("div",{className:Te.titleWrap},(et==null?void 0:et.item_type)==="bprogram"?le.createElement(je.Z,{style:{paddingRight:10},value:Yt+1+"\u3001"+((Qt=et==null?void 0:et.program_attr)==null?void 0:Qt.description)}):le.createElement(je.Z,{style:{paddingRight:10},className:Te.titleHtml,value:Yt+1+`\u3001${(et==null?void 0:et.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(et==null?void 0:et.name)}),sr&&le.createElement(We.ZP,{onClick:()=>{var zn,Xn,Pi;if(Rr){Ct.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Oa.setFieldsValue({standard_answers:et==null?void 0:et.standard_answer,hack:Aa(Aa({},et),et==null?void 0:et.program_attr),hack_codes:Ha(Aa({},et==null?void 0:et.program_attr),{code:No.Base64.decode(((zn=et==null?void 0:et.program_attr)==null?void 0:zn.code)||"")}),hack_sets:Aa({},(Xn=et==null?void 0:et.hack_sets)==null?void 0:Xn[0])}),(et==null?void 0:et.item_type)=="program"?_e.history.push(`/problems/newedit/${(Pi=et==null?void 0:et.program_attr)==null?void 0:Pi.identifier}?type=exercises&express_id=${bl.categoryId}&question_id=${et==null?void 0:et.id}&score=${et==null?void 0:et.score}&exercise=true&callback_url=/classrooms/${bl.coursesId}/exercise/${bl.categoryId}/detail?random=true`):gr(et==null?void 0:et.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!ch&&le.createElement(We.ZP,{disabled:ch,className:"ml20",onClick:()=>Rd(et==null?void 0:et.id,ai.type,Yt,ai),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(et==null?void 0:et.item_type)==="bprogram"&&le.createElement(je.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:Te.titleHtml,value:No.Base64.decode(((yn=et==null?void 0:et.program_attr)==null?void 0:yn.code)||"")}),(ai.type==="SINGLE"||ai.type==="JUDGMENT"||ai.type==="MULTIPLE")&&rc(et),ai.type==="COMPLETION"&&ad(et),ai.type==="SUBJECTIVE"&&oc(et),ai.type==="PROGRAM"&&vc(et),ai.type==="BPROGRAM"&&Tc(et),ai.type==="COMBINATION"&&is(et,Yt),ai.type==="PRACTICAL"&&du(et),le.createElement(at.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},((on=en==null?void 0:en.exam)==null?void 0:on.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(ai.type)&&le.createElement(mt.Z,null,le.createElement(qr.Z,{state:et==null?void 0:et.is_wrong,onClick:()=>{wr==null||wr({value:Ha(Aa({},et),{question_id:et==null?void 0:et.id,question_score:et==null?void 0:et.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(ai.type)&&(et==null?void 0:et.show_resubmit)&&le.createElement(mt.Z,null,le.createElement(Bi.C,{dataSource:Ha(Aa({},et),{question_id:et==null?void 0:et.id})})),((Kn=en==null?void 0:en.exam)==null?void 0:Kn.exercise_status)===3&&["SINGLE"].includes(ai.type)&&le.createElement(mt.Z,null,le.createElement(We.ZP,{style:{color:"#3061D0"},onClick:()=>{_d({value:et})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),sr?le.createElement(Nn.vr,null,le.createElement(Oe.Z,{showTotal:Je.rU,total:(Er=en==null?void 0:en.exam)==null?void 0:Er.total_num,pageSize:1,current:yr+1,showSizeChanger:!1,onChange:Wu,showQuickJumper:!1,hideOnSinglePage:!1})):le.createElement(Nn.vr,{LeftContent:le.createElement(Nn.op,{onClick:On,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:le.createElement(at.Z,{align:"middle"},le.createElement(te.Z,{color:"#55575D",overlayClassName:Te.popover,open:Na,getPopupContainer:ai=>ai==null?void 0:ai.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"},le.createElement(Nn.op,{onMouseEnter:()=>jo(!0),onMouseLeave:()=>jo(!1),onClick:()=>ac(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),le.createElement(Nn.op,{shape:"default",type:"primary",onClick:()=>Xt(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),le.createElement(Ua,{visible:Sa,questionParams:So.current,getdata:Mi,onRandomExchange:()=>La(void 0,null,function*(){const ai=So.current;yield lr({single_question_id:ai.id,seleted_item_bank_ids:ai.ids},{type:ai.type,index:ai.index}),Ga(!1)}),selectFromProblemSet:()=>{const ai=So.current,po=`${location.pathname}${location.search}`;po.includes("exercise")&&_e.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${ai.id}&qtype=${ai.type}&exerciseid=${bl.categoryId}&from=${po}`)},onCancel:()=>{Ga(!1)}}))}},56682:function(Tn,xn,me){"use strict";me.r(xn),me.d(xn,{default:function(){return Zl}});var le=me(59301),Te={wrapper:"wrapper___KtBVT",breadCrumbWrapper:"breadCrumbWrapper___k9tSB",baseInfo:"baseInfo____j5EY",radioBtnWrapper:"radioBtnWrapper___k9OCh",baseLineHeight:"baseLineHeight___O_QXK",radiogroup:"radiogroup___e2fW6",easy:"easy___WcUAp",medium:"medium___U_o3j",hard:"hard___dAXLS",formWrap:"formWrap___wt5tC",baseFormItem:"baseFormItem___zV64d",cascaderPopup:"cascaderPopup___qm63f",fixedBottom:"fixedBottom___liDZ4",cancelBtn:"cancelBtn___ZV9Mi",confirmBtn:"confirmBtn___DwH6m",previewBtn:"previewBtn___aLYCy",concat:"concat___ZuLMo"},He=me(8591),lt=me(78241),We=me(66104),Ve=me(24459),Le=me(60341),Ct=me(71418),xt=me(92832),Ue=me(19842),bt=me(5112),at=me(95237),mt=me(5871),Oe=me(3113),te=me(7660),ee=Object.defineProperty,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(En,Nn,ri)=>Nn in En?ee(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,Ee=(En,Nn)=>{for(var ri in Nn||(Nn={}))se.call(Nn,ri)&&ve(En,ri,Nn[ri]);if(de)for(var ri of de(Nn))he.call(Nn,ri)&&ve(En,ri,Nn[ri]);return En},Me=(En,Nn,ri)=>new Promise((qi,$i)=>{var ki=Li=>{try{ii(ri.next(Li))}catch(ur){$i(ur)}},Ri=Li=>{try{ii(ri.throw(Li))}catch(ur){$i(ur)}},ii=Li=>Li.done?qi(Li.value):Promise.resolve(Li.value).then(ki,Ri);ii((ri=ri.apply(En,Nn)).next())});function Be(En){return Me(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${En}/edit_random_exam_new.json`,{method:"get"})})}function je(En,Nn){return Me(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${En}/update_random_exam.json`,{method:"post",body:Nn})})}function _e(En){return Me(this,null,function*(){return(0,te.ZP)("/api/examination_banks/create_random_exam.json",{method:"post",body:En})})}function Je(En){return Me(this,null,function*(){return(0,te.ZP)("/api/disciplines.json",{method:"get",params:En})})}function Xe(En){return Me(this,null,function*(){return(0,te.ZP)("/api/item_banks/item_difficulty_count.json",{method:"get",params:En})})}function ht(En,Nn){return Me(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${En}/set_item_type_score.json`,{method:"post",body:Nn})})}function Ze(En,Nn){return Me(this,null,function*(){return(0,te.ZP)(`/api/exercises/${En}/set_item_type_score.json`,{method:"post",body:Nn})})}function Mt(En,Nn){return Me(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${En}/delete_item_type.json`,{method:"post",body:Nn})})}function ot(En,Nn){return Me(this,null,function*(){return(0,te.ZP)(`/api/exercises/${En}/delete_item_type.json`,{method:"post",body:Nn})})}function Ot(En){return Me(this,null,function*(){return(0,te.ZP)("/api/examination_banks/preview_random_questions.json",{method:"post",body:En})})}function Pt(En){return Me(this,null,function*(){return(0,te.ZP)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:En})})}function Dt(En){return Me(this,null,function*(){return(0,te.ZP)("/api/examination_banks/save_question_list.json",{method:"post",body:En})})}function Wt(En){return Me(this,null,function*(){return(0,te.ZP)(`/api/exercises/${En.categoryId}/edit.json`,{method:"get",params:Ee({},En)})})}var Lt=(En=>(En.OnlyFileFolder="1",En.OnlyKnowledge="2",En.OnlyDifficulty="3",En.FileFolderAndDiff="4",En.FileFolderAndKnowledge="5",En.KnowledgeAndDiff="6",En.All="7",En.Shixun="8",En))(Lt||{}),qe=me(89392),Ke=Object.defineProperty,Rt=Object.defineProperties,Sn=Object.getOwnPropertyDescriptors,Pn=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,ln=(En,Nn,ri)=>Nn in En?Ke(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,Wn=(En,Nn)=>{for(var ri in Nn||(Nn={}))_t.call(Nn,ri)&&ln(En,ri,Nn[ri]);if(Pn)for(var ri of Pn(Nn))rn.call(Nn,ri)&&ln(En,ri,Nn[ri]);return En},un=(En,Nn)=>Rt(En,Sn(Nn)),_n=(En=>(En[En.FileFolder=1]="FileFolder",En[En.Difficulty=2]="Difficulty",En[En.Knowledge=3]="Knowledge",En))(_n||{});const St=(0,le.createContext)(null),Zn={[Lt.OnlyFileFolder]:[1],[Lt.OnlyKnowledge]:[3],[Lt.OnlyDifficulty]:[2],[Lt.FileFolderAndDiff]:[1,2],[Lt.FileFolderAndKnowledge]:[1,3],[Lt.KnowledgeAndDiff]:[3,2],[Lt.All]:[3,2,1]},li=(En,Nn)=>{if(En.length!==Nn.length)return!1;for(const ri of Nn)if(!En.includes(ri))return!1;return!0},Ge=En=>{for(const[Nn,ri]of Object.entries(Zn))if(li(En,ri))return Nn},be={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",COMPLETION:"\u586B\u7A7A\u9898",JUDGMENT:"\u5224\u65AD\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898"},Pe={1:{label:"\u7B80\u5355",color:"#46B70E"},2:{label:"\u9002\u4E2D",color:"#165DFF"},3:{label:"\u56F0\u96BE",color:"#EE6F1A"}},Ae=En=>En&&parseFloat(En.toFixed(1)),Ne=(En,Nn)=>{var ri,qi,$i;switch(Nn.type){case"init":return Nn.payload;case"updateBaseInfo":return un(Wn({},En),{examination_bank:Nn.payload});case"deleteQuestionType":{const{item_types:ki}=En,Ri=ki.filter(ii=>ii.item_type!==Nn.payload);return En.examination_bank.question_count=Ae(Ri.reduce((ii,Li)=>ii+Li.item_bank_count,0)),En.examination_bank.total_score=Ae(Ri.reduce((ii,Li)=>ii+Li.total_score,0)),un(Wn({},En),{item_types:Ri})}case"setQuestionType":{const{item_types:ki=[]}=En,Ri=ki.map(Li=>Li.item_type),ii=ki.filter(Li=>Nn.payload.includes(Li.item_type));for(const Li of Nn.payload)Ri.includes(Li)||(Li==="PRACTICAL"?ii.push({item_type:Li,contents:[],item_banks:[],item_bank_count:0,item_bank_num:0,item_type_text:be[Li],random_rule_type:Lt.Shixun,score:0,total_score:0}):ii.push({item_type:Li,contents:[],item_bank_count:0,item_type_text:be[Li],score:0,total_score:0}));return un(Wn({},En),{item_types:ii})}case"updateItemTypes":return un(Wn({},En),{item_types:Nn.payload});case"deleteRule":{const ki=(0,qe.cloneDeep)(En),Ri=ki.item_types.find(Li=>Li.item_type===Nn.payload.itemType),ii=Ri.contents.find(Li=>Li.id===Nn.payload.id&&Li.is_share==Nn.payload.is_share);return Ri.contents=Ri.contents.filter(Li=>Li!==ii),((ri=Ri.contents)==null?void 0:ri.length)===0&&(Ri.random_rule_type=[]),Ri.item_bank_count-=ii==null?void 0:ii.quanlity,ki.examination_bank.question_count-=ii==null?void 0:ii.quanlity,Ri.total_score-=(ii==null?void 0:ii.quanlity)*Ri.score,ki.examination_bank.total_score-=(ii==null?void 0:ii.quanlity)*Ri.score,Ri.total_score=Ae(Ri.total_score),ki.examination_bank.total_score=Ae(ki.examination_bank.total_score),ki.contents=Ri.contents,ki}case"changeQuestionNum":{const ki=(0,qe.cloneDeep)(En),Ri=ki.item_types.find(ga=>ga.item_type===Nn.payload.itemType),ii=(qi=Ri==null?void 0:Ri.contents)==null?void 0:qi.find(ga=>ga.id===Nn.payload.id);if(Nn.payload.itemType==="PRACTICAL")return Nn.payload.num&&(ki.examination_bank.question_count=ki.examination_bank.question_count-Ri.item_bank_count+Nn.payload.num,ki.examination_bank.total_score=Ae(ki.examination_bank.total_score-Ri.total_score+Nn.payload.num*Ri.score)),Nn.payload.score&&(ki.examination_bank.total_score=Ae(ki.examination_bank.total_score-Ri.total_score+Nn.payload.num*Ri.score)),Ri.item_bank_count=Nn.payload.num,Ri.total_score=Ae(Ri.item_bank_count*Ri.score),ki;ki.examination_bank.question_count=ki.examination_bank.question_count-(ii==null?void 0:ii.quanlity)+Nn.payload.num;const Li=Ri.contents.find(ga=>ga.id===Nn.payload.id&&ga.teacher_group_id===Nn.payload.teacher_group_id);Li.quanlity=Nn.payload.num;let ur=0,Zr=0;for(const ga of Ri.contents)ur+=ga==null?void 0:ga.quanlity,Zr+=(ga==null?void 0:ga.quanlity)*Ri.score;return ki.examination_bank.total_score=Ae(ki.examination_bank.total_score-Ri.total_score+Zr),Ri.item_bank_count=ur,Ri.total_score=Ae(Zr),ki}case"changeQuestionScore":{const ki=(0,qe.cloneDeep)(En),Ri=ki.item_types.find(ii=>ii.item_type===Nn.payload.itemType);return Ri.score=Nn.payload.score,Ri.total_score=Ae(Ri.item_bank_count*Ri.score),ki.examination_bank.total_score=Ae(ki.item_types.reduce((ii,Li)=>ii+Li.total_score,0)),ki}case"editRule":{const ki=(0,qe.cloneDeep)(En),Ri=ki.item_types.find(ii=>ii.item_type===Nn.payload.itemType);return Ri.contents=Nn.payload.tableData.map(ii=>un(Wn({},ii),{item_type:Nn.payload.itemType,random_rule_type:Nn.payload.randomRuleType})),Ri.random_rule_type=Nn.payload.randomRuleType,Ri.item_bank_count=Ri.contents.reduce((ii,Li)=>ii+(Li==null?void 0:Li.quanlity),0),Ri.score=Ri.score||1,Ri.total_score=Ae(Ri.item_bank_count*Ri.score),ki.examination_bank.question_count=ki.item_types.reduce((ii,Li)=>ii+Li.item_bank_count,0),ki.examination_bank.total_score=Ae(ki.item_types.reduce((ii,Li)=>ii+Li.total_score,0)),ki}case"addShixun":{const ki=(0,qe.cloneDeep)(En),Ri=ki.item_types.find(ii=>ii.item_type==="PRACTICAL");return Ri.item_banks=Nn.payload.shixunList,ki.examination_bank.question_count=ki.examination_bank.question_count+1,Ri.item_bank_num=Ri.item_banks.length,Ri.item_bank_count=Ri.item_bank_count||1,Ri.score=Ri.score||1,Ri.total_score=Ri.total_score||Ri.score*Ri.item_bank_count,ki.examination_bank.total_score=($i=ki==null?void 0:ki.item_types)==null?void 0:$i.map(ii=>ii.total_score).reduce((ii,Li)=>ii+Li),ki}case"deleteShixunQuestion":{const ki=(0,qe.cloneDeep)(En),Ri=ki.item_types.find(ii=>ii.item_type==="PRACTICAL");return Ri.item_banks=Ri.item_banks.filter(ii=>ii.id!==Nn.payload.shixunId),Ri.item_bank_num-=1,Ri.item_bank_count>Ri.item_bank_num&&(Ri.item_bank_count-=1,Ri.total_score-=Ri.score,Ri.total_score=Ae(Ri.total_score)),ki}}};var xe=me(66231),ut=Object.defineProperty,Bt=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,dt=(En,Nn,ri)=>Nn in En?ut(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,Kt=(En,Nn)=>{for(var ri in Nn||(Nn={}))Ft.call(Nn,ri)&&dt(En,ri,Nn[ri]);if(it)for(var ri of it(Nn))Nt.call(Nn,ri)&&dt(En,ri,Nn[ri]);return En},wn=(En,Nn)=>Bt(En,Qe(Nn)),sn=(En,Nn,ri)=>new Promise((qi,$i)=>{var ki=Li=>{try{ii(ri.next(Li))}catch(ur){$i(ur)}},Ri=Li=>{try{ii(ri.throw(Li))}catch(ur){$i(ur)}},ii=Li=>Li.done?qi(Li.value):Promise.resolve(Li.value).then(ki,Ri);ii((ri=ri.apply(En,Nn)).next())}),Rn=({courseOptions:En,setCurrentKey:Nn,loading:ri,form:qi})=>{const{data:$i,disabled:ki,dispatch:Ri}=(0,le.useContext)(St),ii=(0,Ve.useParams)(),Li=(0,le.useRef)(!0),[ur,Zr]=(0,le.useState)(!1),ga=(0,le.useMemo)(()=>{var Uo,Ua,Ka,No,qr;if(!En.length||!$i)return;const Bi=(Uo=$i==null?void 0:$i.examination_bank)==null?void 0:Uo.sub_discipline_id,eo=((Ua=$i==null?void 0:$i.examination_bank)==null?void 0:Ua.time)===-1?void 0:Li.current?ii.id?(Ka=$i==null?void 0:$i.examination_bank)==null?void 0:Ka.time:((No=$i==null?void 0:$i.examination_bank)==null?void 0:No.time)||60:(qr=$i==null?void 0:$i.examination_bank)==null?void 0:qr.time;Li.current=!1;let Yo=[];for(const ma of En)for(const xa of ma.children)xa.value===Bi&&(Yo=[ma.value,xa.value]);return wn(Kt({},$i.examination_bank),{time:eo,course:Yo})},[$i,En]);return(0,le.useEffect)(()=>{qi.setFieldsValue(Kt({},ga))},[ga]),le.createElement(Ct.Z,{spinning:ri,size:"large",style:{position:"fixed",maxHeight:"100vh"},className:"mt30"},le.createElement("div",{className:Te.formWrap},le.createElement(lt.default,{form:qi,autoComplete:"off",colon:!1,labelCol:{span:4},wrapperCol:{span:20},initialValues:ga||{difficulty:2,time:60},onValuesChange:(Uo,Ua)=>{const{course:Ka=[]}=Ua,No=wn(Kt({},Ua),{sub_discipline_id:Ka[1]||0});Ri({type:"updateBaseInfo",payload:No})}},le.createElement(lt.default.Item,{name:"name",label:"\u8BD5\u5377\u540D\u79F0",className:Te.baseLineHeight,rules:[{required:!0,validator:(Uo,Ua)=>{var Ka;return((Ka=Ua==null?void 0:Ua.replaceAll(" ",""))==null?void 0:Ka.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0")}}]},le.createElement(xt.default,{maxLength:60,className:Te.baseFormItem,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",showCount:!0})),le.createElement(lt.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"course",className:Te.baseLineHeight},le.createElement(Ue.Z,{className:Te.baseFormItem,disabled:ki,size:"large",allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:En,dropdownMenuColumnStyle:{padding:"8px 12px",fontSize:14}})),le.createElement("div",{className:Te.concat},"\u6CA1\u6709\u5408\u9002\u7684\u65B9\u5411&\u8BFE\u7A0B\uFF1F",le.createElement("span",{onClick:()=>Zr(!0)},"\u8054\u7CFB\u6559\u7814\u52A9\u7406")),le.createElement(lt.default.Item,{label:"\u96BE\u5EA6",name:"difficulty",className:Te.radioBtnWrapper,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},le.createElement(bt.ZP.Group,{disabled:ki,className:Te.radiogroup},le.createElement(bt.ZP.Button,{className:Te.easy,value:1},"\u7B80\u5355"),le.createElement(bt.ZP.Button,{className:Te.medium,value:2},"\u9002\u4E2D"),le.createElement(bt.ZP.Button,{className:Te.hard,value:3},"\u56F0\u96BE"))),le.createElement(lt.default.Item,{label:"\u7B54\u9898\u65F6\u957F",className:Te.baseLineHeight},le.createElement(at.Z,{align:"middle"},le.createElement(lt.default.Item,{name:"time",noStyle:!0},le.createElement(mt.Z,{className:Te.baseFormItem,min:1,disabled:ki,size:"large",max:9999,style:{width:220},placeholder:"\u8BF7\u586B\u5199\u7B54\u9898\u65F6\u957F"})),le.createElement("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"46px",fontSize:14}},"\u5206\u949F"))),le.createElement(lt.default.Item,{label:"\u8BD5\u5377\u987B\u77E5",name:"exam_notes"},le.createElement(xt.default.TextArea,{rows:6,disabled:ki,maxLength:65535,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u987B\u77E5"})))),le.createElement("div",{className:Te.fixedBottom},le.createElement(Oe.ZP,{className:`${Te.cancelBtn} mr5`,onClick:()=>{ii.id||window.location.href.indexOf("randompaper")>-1?Ve.history.push("/paperlibrary"):Ve.history.push(`/classrooms/${ii.coursesId}/exercise`)}},"\u53D6\u6D88"),le.createElement(Oe.ZP,{className:`${Te.confirmBtn} ml15`,type:"primary",size:"large",onClick:()=>sn(void 0,null,function*(){if(yield qi.validateFields(),!ii.id&&!ii.coursesId){const Uo=yield _e($i);Uo.status===0&&(Ve.history.replace(`/randompaper/edit/${Uo==null?void 0:Uo.examination_bank_id}?type=settings`),Nn("settings"))}else Nn("settings")})},"\u4E0B\u4E00\u6B65")),le.createElement(xe.Z,{open:ur,onCancel:()=>{Zr(!1)}}))},Vn=me(43418),hn=me(43604),Yn={flex_box_center:"flex_box_center___NXYwj",flex_space_between:"flex_space_between___Oy2UZ",flex_box_vertical_center:"flex_box_vertical_center___ybBar",flex_box_center_end:"flex_box_center_end___yyQPf",flex_box_column:"flex_box_column____kuXY",questionInfo:"questionInfo___U9mnu",label:"label___PP7Ng",content:"content___PUXFl",leftPart:"leftPart___uoQeo",rightPart:"rightPart___mCG7H",dragItem:"dragItem___djmPG",blackText:"blackText___KqEaU",greyText:"greyText___VamKm",iconWrapper:"iconWrapper___o1C0y",contentArea:"contentArea___Fj7D0",dragging:"dragging___mX3Il",hidden:"hidden___KWDLK",dragIcon:"dragIcon___yPuB3",deleteIcon:"deleteIcon___go29y",disabled:"disabled___uSK9k",challengeNameWrapper:"challengeNameWrapper___DFjRy",challengeName:"challengeName___m7v0x",shixunPreviewFooter:"shixunPreviewFooter___iaciG",shixunInfoWrapper:"shixunInfoWrapper___aSihg",shixunInfo:"shixunInfo___WYBm1",btnToDetail:"btnToDetail___WVmtj",fixedBottom:"fixedBottom___oeMSX",cancelBtn:"cancelBtn___ac73V",confirmBtn:"confirmBtn___sYh2O",previewBtn:"previewBtn___c2uQz",setScoreModalTable:"setScoreModalTable___kPddX",title:"title___lP1E2",tipcontent:"tipcontent___tV6uE",name:"name___YLyPW",tip:"tip___FYIzt",info:"info___rSdr9",img:"img___ft7eS"},mi=me(57816),jn=me(15965),An=me(24905);const wi=[{label:"\u5355\u9009\u9898",value:"SINGLE"},{label:"\u591A\u9009\u9898",value:"MULTIPLE"},{label:"\u586B\u7A7A\u9898",value:"COMPLETION"},{label:"\u5224\u65AD\u9898",value:"JUDGMENT"},{label:"\u7B80\u7B54\u9898",value:"SUBJECTIVE"},{label:"\u7F16\u7A0B\u9898",value:"PROGRAM"},{label:"\u7EC4\u5408\u9898",value:"COMBINATION"},{label:"\u5B9E\u8BAD\u9898",value:"PRACTICAL"},{label:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM"}];var Wi=({open:En,onCancel:Nn,onOk:ri})=>{const{data:qi,dispatch:$i}=(0,le.useContext)(St);(0,le.useEffect)(()=>{if(En){const{item_types:ii}=qi||{};Ri(ii==null?void 0:ii.map(Li=>Li.item_type))}},[En,qi]);const[ki,Ri]=(0,le.useState)([]);return le.createElement(Vn.default,{title:le.createElement("div",null,"\u9898\u578B\u8BBE\u7F6E",le.createElement("span",{className:"c-grey-333",style:{fontSize:14,fontWeight:400}},"\uFF08\u901A\u8FC7\u52FE\u9009\u53EF\u5BF9\u9898\u578B\u8FDB\u884C\u6DFB\u52A0/\u5220\u9664\uFF09")),closable:!0,centered:!0,open:En,onCancel:Nn,onOk:()=>ri(ki)},le.createElement(An.default.Group,{value:ki,onChange:ii=>Ri(ii)},le.createElement(at.Z,{gutter:[0,20]},wi.map(ii=>le.createElement(hn.Z,{key:ii.value,span:6},le.createElement(An.default,{value:ii.value},ii.label))))))},dr=me(1710),Mr=Object.defineProperty,pi=Object.getOwnPropertySymbols,ui=Object.prototype.hasOwnProperty,Ci=Object.prototype.propertyIsEnumerable,Xi=(En,Nn,ri)=>Nn in En?Mr(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,Ni=(En,Nn)=>{for(var ri in Nn||(Nn={}))ui.call(Nn,ri)&&Xi(En,ri,Nn[ri]);if(pi)for(var ri of pi(Nn))Ci.call(Nn,ri)&&Xi(En,ri,Nn[ri]);return En},hr=({open:En,onCancel:Nn,onOk:ri})=>{const{data:qi}=(0,le.useContext)(St),[$i,ki]=(0,le.useState)();console.log("--xxx-",$i),(0,le.useEffect)(()=>{En&&ki((0,qe.cloneDeep)(qi))},[En,qi]);const Ri=(0,le.useMemo)(()=>{var ii;let Li;return Li=(ii=$i==null?void 0:$i.item_types)==null?void 0:ii.map(ur=>ur.total_score).reduce((ur,Zr)=>parseFloat(ur)+parseFloat(Zr)),Li==null?void 0:Li.toFixed(1)},[$i]);return En?le.createElement(Vn.default,{title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C",open:En,width:640,centered:!0,closable:!0,onCancel:Nn,onOk:()=>{ri($i)}},le.createElement("div",{className:"c-black mb20"},"\u603B\u5206",le.createElement("span",{className:"ml10 c-light-primary"},Ri)),le.createElement(dr.default,{columns:[{title:"\u9898\u578B\u540D\u79F0",dataIndex:"item_type_text",width:130},{title:"\u5C0F\u9898\u603B\u6570",dataIndex:"item_bank_count",width:130},{title:"\u9898\u578B\u603B\u5206",dataIndex:"total_score",width:130},{title:"\u64CD\u4F5C",render(ii,Li){const{score:ur,item_type:Zr}=Li;return le.createElement("div",{style:{color:"#9096A3"}},"\u6BCF",((Li==null?void 0:Li.item_type)==="PRACTICAL","\u9898"),le.createElement(mt.Z,{precision:1,size:"large",className:"ml10 mr10",min:.1,disabled:(Li==null?void 0:Li.item_bank_count)===0,max:100,onChange:ga=>{const Uo=$i,Ua=Uo.item_types.find(No=>No.item_type===Zr);Ua.score=Number(ga);const Ka=ga*Ua.item_bank_count;Ua.total_score=Ka&&Number(Ka.toFixed(1)),Uo.examination_bank.total_score=Uo.item_types.reduce((No,qr)=>Number(No)+Number(qr.total_score),0),ki(Ni({},Uo))}}),"\u5206")}}],className:Yn.setScoreModalTable,dataSource:$i==null?void 0:$i.item_types,rowKey:"item_type",pagination:!1})):null},De=me(99313),Ei=me(57809),Pr=me(17574),Ln="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAtFJREFUWEftWL9rU1EYPffFpCCKEEEJVUQHB10qAUHFHwguDg4ORRDq4uDg4CBIJ6GD0D/B3UEFJ5cugjbQChIqokWKClVrFDGIg2B8yZX3Xl/z/O5LzvfyKhTJXV7g/jrfOfc797sx1toCNnAzQ4A51RkymJNA/CcMvpoYhf0xDWtPwqICWEKM+QSYGgojt3Hw3mweFjmD9YlR+N8WAJSdjYwBrAWCb1oL+jzvMbzSFKoPBgLKAc6dugPbuRDtHzAXgGEMxmjjsXEAYr4MMOw2DcA8wcjWG6g+XOEAZ8c+wNpKtCXZMI+WMn6DJrbsOMQBPtrr9ySM4ZX9LEApkOfd5QBntvvhuhqFswKOz2/wDQWSZ9o0FADLfji5fBTYPwmUduYVMmV+IrLWF2DpFtCcizDTu3hmFeCBKaC4LR2cJpvjMZrwfn8HFm8qATan/bWslWckq6SuTyWcIfi5allrkmsY/DoZSZzanCwQo0REAwTIJf583e9txNIWic9p5E2OCQilZ7BxzY/8L60RSqRkcgnHqKXERgFw5eq/80EagIbB91cSPigilMabNWmYD6okXr7cZdABIAE7Gv6dpfIuZxJDI/G7S32ymJx6CoDP50ny5mIXIJPQ2Y8kEVVEw+DSeCKLWbkldlQA6JZwaZe9BuDr8xkAZjU6Pp5LvHiu9xmkWej6Wt8KXOK1VuGDL89272IaMLv6yAID3cUvzvS5SZyQyZOAZZl7hrnEz0/rjZoxzAhOyUEOcOFEH6MWhDGCWAApPs8B1o/p68GsANgbRVVRPzu8fvVg5gA0xcLTsV/wCtF/iKz6cABkfBfL+Z12m0tc2/cWXnFPODf3zZCxmOj4yxzg/O4qWv48LDwHIHOZrO/i5HoGHRQ3HeEAg0m1ShWtn/dh27tgUAilTqOUMcyqm7AfbZjCR5Q2j+N4o64DOMDhXq8pQ4B5mdzwDP4B5kHmZrL/eyAAAAAASUVORK5CYII=",vi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA4RJREFUWEftWEtrE1EYPXfSh5VWSlMfNSi4sokLK30pWtuKIChVVBBBWpfiRhcKghii7tp/4FrBBxREXbhQ0Bj7gqokahe+kNZWqa21tLGtk7kymY5J79yZL5NUKNLZZHHnzj33fOec+90wzrkHS/hhywBzrM4ygzkSiP+EwTdtPvDJdnDeCI4KgBPEsGGAPYOn8Bq23A7nwiLNYH+bD+rYSwBlloUYAzgH9F/Zo48pyhMoBVdR3ZkVUBpgV9MNcO24sb7OnA6GYtBEa75rbkCYL24wOcxGAPYUhSUXUH3/Cw0wXDUIziuMJYkFc6mluH+GcRSv2UYDfLxJtSWMwiuOUxsUC6Qot2iAD71q8ruZVNgtYFO/+m+yQKKm2UgGAMvU5GTvbqDyClC4LmUMuw+LTFiYdNDC7FdgIASMG57KHGDNdSB/tVyKltIJAESmRHziBmZHgf5WlwBrb6bihFrQmkdpCSDRiiyu+ozgyJzBujtpy1Jiy9XOAPqOuQRY35mKP8qdFvELBFJu1qH1HnUL8K59iV0DFtwqc3PPIQnAH+3noGmXAK1k4YnhxoaS8joqQgFYOaBUAlBSedbTIgCcuLwBc78+SW3qWnJUzkjG8/yAZ3Nqd937BYDfghvB4x+NQJ5vAMycozRvOVOF+Rk1FaVAkQEquX73PkmJh89EwXngn5+5dhsuPgwopYYZu/ZKAA6dDkLTQhaAlhKLDAsvuJWE+X5RDbCi1jBjpEkCcPCsH4mpmKXEVIksbZiAkDxz5zWZVwaUnjS6pkiDTcx8aI2CscCCRtStJqmjzKmtLD8FeLxAZKcNwPcnguCJ0II1SAYERJSJnUxX0gysagbC2+0YbPNDnY79rZrk6LR+n0DkRsP5a4GK80C4xuEkeXswCvCAfaOawV3E1K2+DGUaUeO+i4AlB9NpeX0gCGihpA6zeahcpBB7W4Bo0IHBgSN+zP2MGVuX1ZiihHKJOC5IpMAHfH7gAFAfetUYBUcgGwIXZc73d0BixqEffNGQ5mYi1yjCSFdLKhIfA6ZHHQBGm/2YmYpJ2bAEN4nAmVRZjKmzwOQQcWnq3focnNdTBwV9n88yhuKj95xb/i5/HdSpRwBbmfpXIRPTCIS5ycF0U3o8O+g7SWR9FebiHeCJXQArkNdKYIiqODXO2G9A6cCeiRANcFEsmf1HlgFmz50xc8kz+AfHHTJwrKNsNwAAAABJRU5ErkJggg==",Zi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABWlJREFUWEftV1tsVEUY/ubspUu3W9mWGlttwXqJVRNBbqIFDbyA8mCCkAYtpEaIGBODhBCECiG+UE1EnzTempYqtSAE45saBMX40JC0IRojpd1GKM1uW7bd7V7OOWPmnD3bPTNndxYbE2I6L2dzdubMN9/3/ZchlFIXbuNB5gDOUp05BmdJIP4fDPZcxt2xaRzVgadBUQ3QDDEE5m/2zBkE1whwoYTg461LcX42LEoZZOCiMXoJoBUCHEIASgH2dBqUgijKORfBkW3/EqgUYNsPieMAmtj+Fhb2NIfFXvaFnUhCQBlI6wD8dGcBrisEP5V7fft2NuJvKcC9p6PDoLSa7cwTJgKejZj8WjLm93iWSAG2tI+qEsdlvywl6BZPqBByQgpw44fDKskEAQUF+82e5rBrxCvGz7fWZr+XkZ/ZwFTIbgkKel0K8LkPhlW2uLbSh9UNQfh9btGLIrIZ7E7WyDkaf8xYQsX538cwHE4YgKUAnz0WMgC+/EwNSn1uR5MVEcxZ/xbjUgbyi3PXDNNLAW44FjIk3rOxNpvtCseuCEFCMGcUc/2734YMFaQA178fUhlDB56vy+4s27AYlgrOocA7Z0IG60UDPLypLm8BEQBncnc2X3ITijng4ZMhM8vK+kHGIIuyI5sXZgsGn//ECmOvgMJ8rgA5/f92T8hM8rkAX/psZI+u4yClesAWhhLNhPTBpSMhfeSkF7eLoP5OHzY8FoSizGzU+vWQmXosgLvPTNTGJpNXi8lvPF4hPwoZW0YZsKw+gMWLSrMV1ASYE8V7e27WTUwnB7IzsrFVjOXzdDVWOpfgY+YO+j3YvKrCWMEkP9g9ZHjeJvErnaN9oHhYgCSrYQ5F2echKPcpSGkUE9PU3vXkMeWWJxcg6HcZAA+cGDIosgHc0THaqun0EN8ViFFqdij5SlTT8jKsa5gHJdPF/DaQwCcXotkCme+8y+/zY1m937D/W19yHmSs7eoeb0gm0v1Wi2QBEGpuAcm8buCjF6tmWqyMHPu/iWAkahQlseZm0lKw1I2mRlPm/V2D9iCxZG1pH+2j4GR2KB1lJaaE8TSTUDf88kiNB2sfKsWCMgWlXgVVARfG4xp+/iuBU72xmca7gGW2NlYaMu/vYgxyaYaBbGkPt+pUP5Trw1xGa4Nu7FhdjkULPBlDUwxGVLgVgsFIGj/+MY0rYdXwzzwvQTzFOiDHi4Fj9K14wI+V9/uxr3PQuZLs6hxviKnpfttVI+fERzdVoPoOsWmYiGt4ozsCncnFA+JeFGp0KwJuNK+pwL6OPBKzYzV/npHZoZN/74UK3OUAMJ7S8VpXBJoRsPYgEhBLskLzmkq0nR7OX+q2t4fNaHYYtUEXdq4O4N6MxGzKnzfSiExpqJnvRm8oiYtXkhiJasZqj8vMMCqzaebAsvbsiQf9OHXxRv5+kEXzZFzvt+5qgiQEmO8jhseSGjAW0w0wJW7g8Tovnqovgb+EGO+XLvTCRYBITEd3bxy/DqREQrnmojLgRt/VMaN7z9ssNLeP94GPZotR2d2CECy5x40315XZNIgldbz61U15aSLASHgSqqblB9hyfKpV07WMzHaXi3lS3NPrAnav9ePRGjOgVI3i5KUEvrucEm6HfFix2h6dnMbNqen8AHd1pxpiyWS/mS0lYSncj2cWVJURBHwEI1Ed8VQ+8sSoSasqro9OFL40beuM/UIpXSnczvjbF387484jK+VODDL/3QiPny3YsG7vGFsRT+rfE5BSC6QjB7IWWfY/91FrrwRRV0k76i2fhhcnk2obqN4IQrxOAGWevEV8UIiS1iltO/t69SEpQHnI/bcz5gDOlt/bnsF/AOXAMnuF/cdAAAAAAElFTkSuQmCC",er="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABpxJREFUWAntWE2IHFUQrtfzk5nNbrKbRGPcRSU/oIEkmERjMAQhCBIjKBpFEBER9OZNL4IevOhFbyGHRA9BhKBeouJFIkTNwaxGg16ikN1k0WR3M5ndnf/ptr56r7p7+s1mkYCHkILpev1e1VdfVb3X0zNEt+Qmr4Dpl9+xs9FYq0XvR0SPUETriC9WYI6x72YML0T0By99Gxj68KWd5k/ndEPKiwRy7RadZSKrDEdDVGiRxfnZ9YjJM1MTUScydIwn371Roh7BD042P2Hg5xHRxRON+6R6WlE7m1wzGRjT4ZnTjNOFjQkYIbQ68UlGURhSYIIpTu7k6N7CkWeN6XoE3zoxP8WMuK22kemG6ngxel4CWQeubpw1AmQrkFpnyx9HVg/uy8MuLbPV5uJ7DuloUDhlA8hWSAxS8SSEZy6zi152V2pX3/YJzjVlH8EtYkTDUaAhOobuJ0vZL7XuJWzoKY9gtd6JY5eKAQ0PFOL7/2NQqbWp0eKNCjFmk0fQVsvQ2Opl9Pj2NZQPeGdnWpu5jbtu68zA2uV4QsIll+sAdPigfPXzNF2cafKBCo1HUFF2bRiikQEmx/If9042H49vdm9qTKsDenD9EE1O263mbaaDhy7FeWf3jBe5F5mXe5+b+gyFhiy17rWKK+NVcGQ5ppRjpheZW680/oQQSy5LAiSmGHGpPYKyB/WUZnurvFUDJD32eodFJQXjrGAN4nQ2Hq/4BGHsgtrHChKxAH38BT6+wED8LUCOt/CejSW6czhPF2badPqvJoUO2/o4ew0Y+yaE+xBkVwkEniBrd5KScEsOnwNo1TCjY5fQ6/uG6b51RXWlLWMNOvxdNaZD/J2GEKLF340dP+xZe0xjCPBxQTmIjqHtx67DRIiKDTuDUMb+3jsKPeQQYufdJRrjaiqezR/xgKGYVgM/5ItHEJZog22FHSuCEOZ1DQAbjPvZryz1gWYeQ2XMW0ahBOEYrPFhuFhjDDuvxWBtATi4GCUat7Ls5j0DVwW8tYyOeNBUa4Z0/nLbJQ8QJGu1XlMvd2LnoaQN4NQryBxi9YbbCrRpbYGa7Yh+mWzS7EKXxlbl6ZWHV9DalTn6+twC7V5f4q/LHE3Pd+nIqSrV2VYF1dfvd8xl97yts1o7/eLRf7B1RbSWCaSd5zdmem3vCtrFwVVanYjOTDTpgXuW0e9TLfr4hzmaWQhlew4WDc01JbwUfTF8zGtM4GLcp4JYSiRLDisHtg70kMNcMW+kWsfPzNOJX2uYEkELQQ6CVwCQcK8C8ThNGHYaE9ojCAPZu6xxOBEAGqLjvZvKdqLPFb7qn11WcjEhDNheW6b40BAsewR1EQYIJKApB8ytkJMIC1/WDuX8STfjYJIK4fWfA+BngIiOEdSJ9ywAAQAJmBvrhM5NzCbvjAqk+mKlI4kJDjuoRuI6hsYHotreKTNoe8I9grZmzkDqx4YwFgerPxtfYGAXwSLLFXMHdwzS09uXU6nAGFwe+ZpEmVJjzOm8aqwLpNM69vqx9ck337G8AML8BTsQQKHNL7CX50KavNqljbfnaYDfuiHnptr03jfX6O9qSAe2DNCjm8s034hocrbLEIa2jRVp22iRupxXpY7kBK1HG7wcY4a1EHerMqmXFz6aZW9bHWTBCbmHaTLGHATrq5YbarSJai2usbMt86+EJ7aW6bHNJZq61qU5JrplNPnp8OlPNfryHL8xS1/QFRsPsBg5eMH3WyzRYcJ5S0ZWy5grqho/cjG+WjdU51+/adsG3x8fb9AbX1TlEZMmx8D0zP1ld9A4TioeyTcvYoOWxfcJCrEcB0T3Edhqm5clvtg4TRLjGX4c/jblH6h8ztCawRwFjI1tBI0PyKoW4nzvPWZ03zE7tgGhRMf1tx2xPHt6wlNI2a0b/g/k/BV9hgiUXOq8HS5ei43iPSQJ8r6xiVocv4JBwJ79K5WtEOx0Tny0XdD8QfXPT0f0+dmWvKWAHfbqoe8b1MafGpKN0xiLn2r2z+X0GS6JyeW5o5VmPhfIW2b2y5xduDh44CABFqhUBa9nP1xGWw1dqoRUcy8M6JD6CF7mVLbDqOW1uF5vjpeK+YfEYQkCWYYZc4HQyxU+6Veqeme1Jpuc4t4CNFqdcY9g1yzbX2/WL+QCM9QLhzstl90/S1fUdg2FgWQT6EVLbNHpThjNhaa8Hz6e7DgcFVbPTxwNcrk9JgqH9bBkCWYDZPh7uNmWanuhVfhIVaIwOjUzeNfLZ141XPdbcpNX4F/ikyqlsA/6bwAAAABJRU5ErkJggg==",Gn={ruleCheckBox:"ruleCheckBox___Onj2f",folderAreaWrapper:"folderAreaWrapper___ut2mr",folderAreaHeader:"folderAreaHeader___fOIDA",folderWrapper:"folderWrapper___IpJ50",folderIcon:"folderIcon___zBoRM",shareFolderIcon:"shareFolderIcon____5s3p",treeNodeItem:"treeNodeItem___quqla",treeNodeDifficulty:"treeNodeDifficulty___en0gk"},$t=me(57973),Gt=Object.defineProperty,Zt=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,vn=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,ct=(En,Nn,ri)=>Nn in En?Gt(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,an=(En,Nn)=>{for(var ri in Nn||(Nn={}))cn.call(Nn,ri)&&ct(En,ri,Nn[ri]);if(vn)for(var ri of vn(Nn))It.call(Nn,ri)&&ct(En,ri,Nn[ri]);return En},dn=(En,Nn)=>Zt(En,wt(Nn)),ei=(En,Nn,ri)=>new Promise((qi,$i)=>{var ki=Li=>{try{ii(ri.next(Li))}catch(ur){$i(ur)}},Ri=Li=>{try{ii(ri.throw(Li))}catch(ur){$i(ur)}},ii=Li=>Li.done?qi(Li.value):Promise.resolve(Li.value).then(ki,Ri);ii((ri=ri.apply(En,Nn)).next())});const pn=(En,Nn,ri)=>En.map(qi=>qi.key===Nn?an(an({},qi),ri):qi.children?dn(an({},qi),{children:pn(qi.children,Nn,ri)}):qi),zt={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3},In=(En,Nn,ri)=>En.map(qi=>{var $i;const ki=qi==null?void 0:qi.tag_disciplines.map(ii=>{const Li=ii==null?void 0:ii.difficulty_count.map(ur=>({label:ur==null?void 0:ur.name,value:zt[ur.name]}));return{title:Ge(Nn)===Lt.All&&Li.length>0?le.createElement(at.Z,{justify:"space-between"},le.createElement(hn.Z,null,`${ii.name}\uFF08${ii.child_count}\uFF09`),le.createElement(hn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}_${ii.id}`,"diffValue"]},le.createElement(An.default.Group,{style:{columnGap:12},options:Li})),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}_${ii.id}`,"diffNum"],initialValue:ii==null?void 0:ii.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}_${ii.id}`,"extra"],initialValue:dn(an({},qi),{type:ri})},le.createElement("input",{type:"hidden"})))):`${ii.name}\uFF08${ii.child_count}\uFF09`,key:`${qi.id}_${ii.id}`,name:ii.name,parentName:qi.name,item_banks_count:ii.child_count,icon:null,isLeaf:!0,checkable:Ge(Nn)===Lt.FileFolderAndKnowledge,disableCheckbox:ii.child_count===0}}),Ri=qi==null?void 0:qi.difficulty_count.map(ii=>({label:ii==null?void 0:ii.name,value:zt[ii.name]}));return{title:Ge(Nn)===Lt.FileFolderAndDiff&&Ri.length>0?le.createElement(at.Z,{justify:"space-between"},le.createElement(hn.Z,null,`${qi.name}\uFF08${qi.item_banks_count}\uFF09`),le.createElement(hn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}`,"diffValue"]},le.createElement(An.default.Group,{style:{columnGap:12},options:Ri})),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}`,"diffNum"],initialValue:qi==null?void 0:qi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}`,"extra"],initialValue:dn(an({},qi),{type:ri})},le.createElement("input",{type:"hidden"})))):`${qi.name}\uFF08${qi.item_banks_count}\uFF09`,key:`${qi.id}`,name:qi.name,item_banks_count:qi.item_banks_count,icon:ii=>ii.expanded?ri==="0"?le.createElement("img",{src:vi,className:Gn.folderIcon}):le.createElement("img",{src:Zi,className:Gn.shareFolderIcon}):ri==="0"?le.createElement("img",{src:Ln,className:Gn.folderIcon}):le.createElement("img",{src:er,className:Gn.shareFolderIcon}),isLeaf:!qi.have_child&&!(($i=qi.tag_disciplines)!=null&&$i.length),checkable:Ge(Nn)===Lt.OnlyFileFolder,disableCheckbox:qi.item_banks_count===0,children:qi.children.length?Ge(Nn)===Lt.All||Ge(Nn)===Lt.FileFolderAndKnowledge?[...In(qi.children,Nn,ri),...ki]:In(qi.children,Nn,ri):[]}}),Qn=(En,Nn,ri)=>En.map(qi=>{var $i;const ki=qi==null?void 0:qi.tag_disciplines.map(ii=>{console.log("tagItem:",ii);const Li=ii==null?void 0:ii.difficulty_count.map(ur=>({label:ur==null?void 0:ur.name,value:zt[ur.name]}));return{title:Ge(Nn)===Lt.All&&Li.length>0?le.createElement(at.Z,{justify:"space-between"},le.createElement(hn.Z,null,`${ii.name}\uFF08${ii.child_count}\uFF09`),le.createElement(hn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}_${ii.id}`,"diffValue"]},le.createElement(An.default.Group,{style:{columnGap:12},options:Li})),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}_${ii.id}`,"diffNum"],initialValue:ii==null?void 0:ii.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}_${ii.id}`,"extra"],initialValue:dn(an({},qi),{type:ri})},le.createElement("input",{type:"hidden"})))):`${ii.name}\uFF08${ii.child_count}\uFF09`,key:`${qi.id}_${ii.id}`,name:ii.name,parentName:qi.name,item_banks_count:ii.child_count,icon:null,isLeaf:!0,checkable:Ge(Nn)===Lt.FileFolderAndKnowledge,disableCheckbox:ii.child_count===0}}),Ri=qi==null?void 0:qi.difficulty_count.map(ii=>({label:ii==null?void 0:ii.name,value:zt[ii.name]}));return{title:Ge(Nn)===Lt.FileFolderAndDiff&&Ri.length>0?le.createElement(at.Z,{justify:"space-between"},le.createElement(hn.Z,null,`${qi.name}\uFF08${qi.item_banks_count}\uFF09`),le.createElement(hn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}`,"diffValue"]},le.createElement(An.default.Group,{style:{columnGap:12},options:Ri})),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}`,"diffNum"],initialValue:qi==null?void 0:qi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(lt.default.Item,{noStyle:!0,name:[`${qi.id}`,"extra"],initialValue:dn(an({},qi),{type:ri})},le.createElement("input",{type:"hidden"})))):`${qi.name}\uFF08${qi.item_banks_count}\uFF09`,key:`${qi.id}`,name:qi.name,item_banks_count:qi.item_banks_count,icon:ii=>ii.expanded?ri==="0"?le.createElement("img",{src:vi,className:Gn.folderIcon}):le.createElement("img",{src:Zi,className:Gn.shareFolderIcon}):ri==="0"?le.createElement("img",{src:Ln,className:Gn.folderIcon}):le.createElement("img",{src:er,className:Gn.shareFolderIcon}),isLeaf:!qi.have_child&&!(($i=qi.tag_disciplines)!=null&&$i.length),checkable:Ge(Nn)===Lt.OnlyFileFolder,disableCheckbox:qi.item_banks_count===0,children:[...Qn(qi.children,Nn,ri),...ki]}});var tn=({ruleValue:En,defaultData:Nn,setSelectData:ri,currentItemType:qi,selectData:$i})=>{const[ki,Ri]=(0,le.useState)("1"),[ii,Li]=(0,le.useState)(!0),[ur]=lt.default.useForm(),[Zr,ga]=(0,le.useState)([]),[Uo,Ua]=(0,le.useState)("all"),Ka=(nn,sr,kr)=>{const{checkedNodes:yr}=sr;console.log("type:",kr,yr,$i),kr==="0"?(qr(nn),Ge(En)===Lt.OnlyFileFolder?(ri(lr=>dn(an({},lr),{my:yr.map(Mi=>({id:Mi.key,group_id:Mi.key,group_name:Mi.name,item_bank_num:Mi.item_banks_count,folderType:"0",quanlity:1}))})),tt(yr.reduce((lr,Mi)=>lr+Mi.item_banks_count,0))):(console.log(yr),ri(lr=>dn(an({},lr),{my:yr.map(Mi=>{const[wr,to]=Mi.key.split("_");return{id:Mi.key,tag_discipline_name:Mi.name,group_id:wr,tag_discipline_id:to,folderType:"0",group_name:Mi.parentName,item_bank_num:Mi.item_banks_count,quanlity:1}})})),tt(yr.reduce((lr,Mi)=>lr+Mi.item_banks_count,0)))):(eo(nn),Ge(En)===Lt.OnlyFileFolder?ri(lr=>(console.log("pre:",lr),dn(an({},lr),{public:yr.map(Mi=>({id:Mi.key==="0"?"00":Mi.key,teacher_group_name:Mi.name,teacher_group_id:Mi.key,folderType:"3",item_bank_num:Mi.item_banks_count,quanlity:1}))}))):ri(lr=>dn(an({},lr),{public:yr.map(Mi=>{const[wr,to]=Mi.key.split("_");return{id:Mi.key==="0"?"00":Mi.key,tag_discipline_name:Mi.name,teacher_group_id:wr,tag_discipline_id:to,folderType:"3",teacher_group_name:Mi.parentName,item_bank_num:Mi.item_banks_count,quanlity:1}})})),tt(yr.reduce((lr,Mi)=>lr+Mi.item_banks_count,0)))},[No,qr]=(0,le.useState)([]),[Bi,eo]=(0,le.useState)([]),[Yo,ma]=(0,le.useState)([]),[xa,bo]=(0,le.useState)([]),[ra,Ao]=(0,le.useState)([]),[Or,Aa]=(0,le.useState)([]),[Ha,La]=(0,le.useState)(!1),[gl,xu]=(0,le.useState)(!1);function en(){return ei(this,null,function*(){let nn=yield(0,te.ZP)("/api/teach_group_shares.json",{method:"get"});nn&&ga(nn==null?void 0:nn.groups)})}(0,le.useEffect)(()=>{en()},[]);const Xt=nn=>ei(void 0,null,function*(){var sr,kr,yr,lr,Mi,wr,to,yo,fr,vr,xr,_i;nn.type==="0"?La(!0):xu(!0);const Ii=yield(0,$t.ex)(nn);nn.type==="0"?La(!1):xu(!1),nn.type==="0"?Ao(Ii):Aa(Ii);const Gr=(sr=Ii.navigation[0])==null?void 0:sr.difficulty_count.map(Fr=>({label:Fr==null?void 0:Fr.name,value:zt[Fr.name]})),Zo=(kr=Ii.navigation[0])==null?void 0:kr.tag_disciplines.map(Fr=>{const Er=Fr==null?void 0:Fr.difficulty_count.map(Tr=>({label:Tr==null?void 0:Tr.name,value:zt[Tr.name]}));return{title:Ge(En)===Lt.All&&Er.length>0?le.createElement(at.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(hn.Z,null,`${Fr.name}\uFF08${Fr.child_count}\uFF09`),le.createElement(hn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(lt.default.Item,{noStyle:!0,name:[`0_${Fr.id}`,"diffValue"]},le.createElement(An.default.Group,{style:{columnGap:12},options:Er})),le.createElement(lt.default.Item,{noStyle:!0,name:[`0_${Fr.id}`,"diffNum"],initialValue:Fr==null?void 0:Fr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(lt.default.Item,{noStyle:!0,name:[`0_${Fr.id}`,"extra"],initialValue:{tag_discipline_name:Fr.name,name:"\u6839\u76EE\u5F55",type:nn.type}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},Fr.name,"\uFF08",Fr.child_count,"\uFF09"),key:`0_${Fr.id}`,name:Fr.name,parentName:"\u6839\u76EE\u5F55",item_banks_count:Fr.child_count,icon:null,isLeaf:!0,checkable:Ge(En)===Lt.FileFolderAndKnowledge,disableCheckbox:Fr.child_count===0}});if(nn.type==="0"){const Fr=In(Ii.data,En,"0"),Er=Qn(Ii.data,En,"0");console.log("normalChildren2:",Er),ma([{title:Ge(En)===Lt.FileFolderAndDiff?le.createElement(at.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(hn.Z,null,`\u6839\u76EE\u5F55\uFF08${(yr=Ii.navigation[0])==null?void 0:yr.child_count}\uFF09`),le.createElement(hn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(lt.default.Item,{noStyle:!0,name:["0","diffValue"],initialValue:[]},le.createElement(An.default.Group,{style:{columnGap:12},options:Gr})),le.createElement(lt.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(lr=Ii.navigation[0])==null?void 0:lr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(lt.default.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"0",group_id:"0",name:"\u6839\u76EE\u5F55"}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},`\u6839\u76EE\u5F55\uFF08${(Mi=Ii.navigation[0])==null?void 0:Mi.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(wr=Ii.navigation[0])==null?void 0:wr.child_count,disabled:!(((to=Ii.navigation[0])==null?void 0:to.child_count)>0),checkable:Ge(En)===Lt.OnlyFileFolder,icon:Tr=>Tr.expanded?le.createElement("img",{src:vi,className:Gn.folderIcon}):le.createElement("img",{src:Ln,className:Gn.folderIcon}),isLeaf:!1,children:Ge(En)===Lt.OnlyFileFolder||Ge(En)===Lt.FileFolderAndDiff?Fr:[...Er,...Zo]}])}else{const Fr=In(Ii.data,En,"3");bo([{title:Ge(En)===Lt.FileFolderAndDiff?le.createElement(at.Z,{justify:"space-between"},le.createElement(hn.Z,null,`\u6839\u76EE\u5F55\uFF08${(yo=Ii.navigation[0])==null?void 0:yo.child_count}\uFF09`),le.createElement(hn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(lt.default.Item,{noStyle:!0,name:["0","diffValue"]},le.createElement(An.default.Group,{style:{columnGap:12},options:Gr})),le.createElement(lt.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(fr=Ii.navigation[0])==null?void 0:fr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(lt.default.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"3",group_id:"0",name:"\u6839\u76EE\u5F55"}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},`\u6839\u76EE\u5F55\uFF08${(vr=Ii.navigation[0])==null?void 0:vr.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(xr=Ii.navigation[0])==null?void 0:xr.child_count,checkable:Ge(En)===Lt.OnlyFileFolder,icon:Er=>Er.expanded?le.createElement("img",{src:Zi,className:Gn.shareFolderIcon}):le.createElement("img",{src:er,className:Gn.shareFolderIcon}),isLeaf:!1,disabled:!(((_i=Ii.navigation[0])==null?void 0:_i.child_count)>0),children:Ge(En)===Lt.OnlyFileFolder||Ge(En)===Lt.FileFolderAndDiff?Fr:[...Fr,...Zo]}])}});(0,le.useEffect)(()=>{ki==="1"?Xt({type:"0",group_id:0,item_type:qi,show_children:!0}):ki==="2"&&Xt({type:"3",except_mine:!0,item_type:qi,show_children:!0,teach_group_id:Uo==="all"?"":Uo})},[En,ki,Uo]),(0,le.useEffect)(()=>{var nn,sr,kr,yr,lr,Mi,wr,to,yo,fr,vr,xr;console.log("selectData-active:",$i,Nn,ki),ki==="1"?(qr((nn=$i==null?void 0:$i.my)==null?void 0:nn.map(_i=>_i.id)),tt(((kr=(sr=$i==null?void 0:$i.my)==null?void 0:sr.reduce)==null?void 0:kr.call(sr,(_i,Ii)=>_i+Ii.item_bank_num,0))||0)):ki==="2"&&(eo((yr=$i==null?void 0:$i.public)==null?void 0:yr.map(_i=>_i.id)),tt(((Mi=(lr=$i==null?void 0:$i.public)==null?void 0:lr.reduce)==null?void 0:Mi.call(lr,(_i,Ii)=>_i+Ii.item_bank_num,0))||0)),Ge(En)===Lt.All&&(ki==="1"?(qr((wr=$i==null?void 0:$i.my)==null?void 0:wr.map(_i=>_i.id)),tt(($i==null?void 0:$i.filter(_i=>!_i.is_share).reduce((_i,Ii)=>_i+Ii.item_bank_num,0))||0),(to=$i==null?void 0:$i.filter(_i=>!_i.is_share))==null||to.forEach(_i=>{const Ii=ur.getFieldValue([`${_i.group_id||0}_${_i.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Ii),Ii!=null&&Ii.includes[_i.difficulty]||ur.setFieldValue([`${_i.group_id||0}_${_i.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Ii,_i.difficulty])))})):ki==="2"&&(eo((yo=$i==null?void 0:$i.public)==null?void 0:yo.map(_i=>_i.id)),tt(($i==null?void 0:$i.filter(_i=>!!_i.is_share).reduce((_i,Ii)=>_i+Ii.item_bank_num,0))||0),(fr=$i==null?void 0:$i.filter(_i=>!!_i.is_share))==null||fr.forEach(_i=>{const Ii=ur.getFieldValue([`${_i.teacher_group_id||0}_${_i.tag_discipline_id}`,"diffValue"])||[];Ii!=null&&Ii.includes[_i.difficulty]||ur.setFieldValue([`${_i.teacher_group_id||0}_${_i.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Ii,_i.difficulty])))}))),Ge(En)===Lt.FileFolderAndDiff&&(ur.resetFields(),setTimeout(()=>{ri($i)},300),ki==="1"?(tt(($i==null?void 0:$i.filter(_i=>!_i.is_share).reduce((_i,Ii)=>_i+Ii.item_bank_num,0))||0),(vr=$i==null?void 0:$i.filter(_i=>!_i.is_share))==null||vr.forEach(_i=>{const Ii=ur.getFieldValue([`${_i.group_id}`,"diffValue"])||[];console.log("prev:",Ii),Ii!=null&&Ii.includes[_i.difficulty]||ur.setFieldValue([`${_i.group_id}`,"diffValue"],Array.from(new Set([...Ii,_i.difficulty])))})):(tt(($i==null?void 0:$i.filter(_i=>!!_i.is_share).reduce((_i,Ii)=>_i+Ii.item_bank_num,0))||0),(xr=$i==null?void 0:$i.filter(_i=>!!_i.is_share))==null||xr.forEach(_i=>{const Ii=ur.getFieldValue([`${_i.teacher_group_id}`,"diffValue"])||[];Ii!=null&&Ii.includes[_i.difficulty]||ur.setFieldValue([`${_i.teacher_group_id}`,"diffValue"],Array.from(new Set([...Ii,_i.difficulty])))})))},[ki]),console.log("1111111111:",No,Bi),(0,le.useEffect)(()=>{setTimeout(()=>{var nn,sr,kr,yr,lr;switch(Ge(En)){case Lt.OnlyFileFolder:{const Mi=[],wr=[];for(const to of $i.my||[])Mi.push(to);for(const to of $i.public||[])wr.push(to);qr(Mi.map(to=>`${to.group_id}`)),eo(wr.map(to=>`${to.teacher_group_id}`)),tt(ki==="1"?Mi.reduce((to,yo)=>to+yo.item_bank_num,0):wr.reduce((to,yo)=>to+yo.item_bank_num,0));break}case Lt.FileFolderAndKnowledge:{const Mi=[],wr=[];for(const to of($i==null?void 0:$i.my)||[])Mi.push(to);for(const to of($i==null?void 0:$i.public)||[])wr.push(to);tt((nn=ki==="1"?Mi:wr)==null?void 0:nn.reduce((to,yo)=>to+yo.item_bank_num,0)),qr(Mi.map(to=>`${to.group_id}_${to.tag_discipline_id}`)),eo(wr.map(to=>`${to.teacher_group_id}_${to.tag_discipline_id}`));break}case Lt.All:{ki==="1"?(tt(($i==null?void 0:$i.filter(Mi=>!Mi.is_share).reduce((Mi,wr)=>Mi+wr.item_bank_num,0))||0),(sr=$i==null?void 0:$i.filter(Mi=>!Mi.is_share))==null||sr.forEach(Mi=>{const wr=ur.getFieldValue([`${Mi.group_id||0}_${Mi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",wr,Mi.difficulty,Mi),wr!=null&&wr.includes[Mi.difficulty]||ur.setFieldValue([`${Mi.group_id||0}_${Mi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...wr,Mi.difficulty])))})):(tt(($i==null?void 0:$i.filter(Mi=>!!Mi.is_share).reduce((Mi,wr)=>Mi+wr.item_bank_num,0))||0),(kr=$i==null?void 0:$i.filter(Mi=>!!Mi.is_share))==null||kr.forEach(Mi=>{const wr=ur.getFieldValue([`${Mi.group_id||0}_${Mi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",wr,Mi.difficulty,Mi),wr!=null&&wr.includes[Mi.difficulty]||ur.setFieldValue([`${Mi.group_id||0}_${Mi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...wr,Mi.difficulty])))}));break}case Lt.FileFolderAndDiff:{ki==="1"?(tt(($i==null?void 0:$i.filter(Mi=>!Mi.is_share).reduce((Mi,wr)=>Mi+wr.item_bank_num,0))||0),(yr=$i==null?void 0:$i.filter(Mi=>!Mi.is_share))==null||yr.forEach(Mi=>{const wr=ur.getFieldValue([`${Mi.group_id}`,"diffValue"])||[];console.log("prev:",wr,Mi.difficulty),wr!=null&&wr.includes[Mi.difficulty]||ur.setFieldValue([`${Mi.group_id}`,"diffValue"],Array.from(new Set([...wr,Mi.difficulty])))})):(tt(($i==null?void 0:$i.filter(Mi=>!!Mi.is_share).reduce((Mi,wr)=>Mi+wr.item_bank_num,0))||0),(lr=$i==null?void 0:$i.filter(Mi=>!!Mi.is_share))==null||lr.forEach(Mi=>{const wr=ur.getFieldValue([`${Mi.group_id}`,"diffValue"])||[];wr!=null&&wr.includes[Mi.difficulty]||ur.setFieldValue([`${Mi.group_id}`,"diffValue"],Array.from(new Set([...wr,Mi.difficulty])))}));break}}},800)},[Nn,En,Yo,xa]);const[On,tt]=(0,le.useState)(0);return le.createElement(lt.default,{form:ur,onValuesChange:(nn,sr)=>ei(void 0,null,function*(){var kr,yr,lr,Mi;console.log("onValuesChange:",sr,nn);let wr=0;if(Ge(En)===Lt.FileFolderAndDiff){const to=yield ur.getFieldValue(),yo=[],fr=[];for(const xr of Object.keys(to))if((yr=(kr=to[xr])==null?void 0:kr.diffValue)!=null&&yr.length&&xr!=="null"&&xr!==null){const _i=to[xr];yo.push(an({id:xr},_i))}const vr={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"};yo.map(xr=>{var _i,Ii,Gr,Zo,Fr;xr.id==0&&(xr.diffNum=ki==="1"?(Ii=(_i=ra==null?void 0:ra.navigation)==null?void 0:_i[0])==null?void 0:Ii.difficulty_count:(Zo=(Gr=Or==null?void 0:Or.navigation)==null?void 0:Gr[0])==null?void 0:Zo.difficulty_count),(Fr=xr==null?void 0:xr.diffValue)==null||Fr.map(Er=>{var Tr,Rr,gr,Na,jo;const Sa={group_name:((Tr=xr.extra)==null?void 0:Tr.name)||"",teacher_group_name:"",id:`${xr.id}_${Er}`,group_id:xr.id,difficulty:Er,item_bank_num:(Na=(gr=(Rr=xr.diffNum)==null?void 0:Rr.filter(Ga=>Ga.name===vr[Er]))==null?void 0:gr[0])==null?void 0:Na.value};ki==="2"&&(Sa.is_share=!0,Sa.teacher_group_id=xr.id,Sa.teacher_group_name=(jo=xr.extra)==null?void 0:jo.name),fr.push(Sa)})}),wr=fr.reduce((xr,_i)=>xr+_i.item_bank_num,0),ri([...fr,...$i==null?void 0:$i.filter(xr=>ki==="1"?xr.is_share:!xr.is_share)])}else if(Ge(En)===Lt.All){const to=[];for(const yo of Object.keys(sr)){const{diffNum:fr=[],diffValue:vr=[],extra:xr={}}=sr[yo];console.log("---",xr);const[_i,Ii]=yo.split("_");let Gr=(Mi=(lr=xr.tag_disciplines)==null?void 0:lr.filter(Zo=>parseInt(Zo.id)===parseInt(Ii)))==null?void 0:Mi[0];vr.forEach(Zo=>{var Fr;const Er={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Tr=(Fr=fr==null?void 0:fr.find(gr=>gr.name===Er[Zo]))==null?void 0:Fr.value,Rr={group_name:"",teacher_group_name:"",tag_discipline_name:(Gr==null?void 0:Gr.name)||xr.tag_discipline_name,id:`${yo}_${Zo}`,group_id:_i,is_share:!!(Gr!=null&&Gr.is_share||(xr==null?void 0:xr.type)==="3"),tag_discipline_id:Ii,difficulty:Zo,item_bank_num:Tr};wr+=Tr,xr.type==="0"?Rr.group_name=xr.name:Rr.teacher_group_name=xr.name,ki==="2"&&(Rr.is_share=!0,Rr.teacher_group_id=xr.id||0,Rr.teacher_group_name=xr.name),Tr>0&&to.push(Rr)})}ri([...to,...$i==null?void 0:$i.filter(yo=>ki==="1"?yo.is_share:!yo.is_share)])}tt(wr)})},le.createElement(De.default,{destroyInactiveTabPane:!0,activeKey:ki,onChange:nn=>Ri(nn),style:{minHeight:260},tabBarExtraContent:{right:ki==="2"&&(Zr==null?void 0:Zr.length)>0&&le.createElement(Ei.default,{onChange:nn=>{Ua(nn)},value:Uo,style:{width:120}},le.createElement(Ei.default.Option,{key:"all",value:"all"},"\u5168\u90E8"),Zr==null?void 0:Zr.map(nn=>le.createElement(Ei.default.Option,{key:nn==null?void 0:nn.group_id,value:nn==null?void 0:nn.group_id},nn==null?void 0:nn.name)))},items:[{key:"1",label:"\u6211\u521B\u5EFA\u7684",children:(Yo==null?void 0:Yo.length)===0?le.createElement(Ct.Z,{spinning:Ha},le.createElement(mi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:Gn.folderAreaWrapper},le.createElement(at.Z,{justify:"space-between",align:"middle",className:Gn.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",On," "),"\u9898")),le.createElement(Ct.Z,{spinning:Ha},le.createElement("div",{style:{minHeight:200}},Yo.length>0&&le.createElement(Pr.default,{checkable:!0,className:Gn.folderWrapper,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},selectable:!1,onCheck:(nn,sr)=>Ka(nn,sr,"0"),checkedKeys:No,checkStrictly:!0,treeData:Yo,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))},{key:"2",label:"\u56E2\u961F\u5171\u4EAB",children:(xa==null?void 0:xa.length)===0?le.createElement(Ct.Z,{spinning:gl},le.createElement(mi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:Gn.folderAreaWrapper},le.createElement(at.Z,{justify:"space-between",align:"middle",className:Gn.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",On||0," "),"\u9898")),le.createElement(Ct.Z,{spinning:gl},le.createElement("div",{style:{minHeight:200}},(xa==null?void 0:xa.length)>0&&le.createElement(Pr.default,{checkable:!0,className:Gn.folderWrapper,selectable:!1,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},onCheck:(nn,sr)=>Ka(nn,sr,"3"),checkedKeys:Bi,checkStrictly:!0,treeData:xa,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))}]}))},fn=me(73802),kn=me(59579),zi=Object.defineProperty,Di=Object.defineProperties,Si=Object.getOwnPropertyDescriptors,Fi=Object.getOwnPropertySymbols,Ti=Object.prototype.hasOwnProperty,nr=Object.prototype.propertyIsEnumerable,$r=(En,Nn,ri)=>Nn in En?zi(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,ci=(En,Nn)=>{for(var ri in Nn||(Nn={}))Ti.call(Nn,ri)&&$r(En,ri,Nn[ri]);if(Fi)for(var ri of Fi(Nn))nr.call(Nn,ri)&&$r(En,ri,Nn[ri]);return En},Ki=(En,Nn)=>Di(En,Si(Nn)),Yr=(En,Nn,ri)=>new Promise((qi,$i)=>{var ki=Li=>{try{ii(ri.next(Li))}catch(ur){$i(ur)}},Ri=Li=>{try{ii(ri.throw(Li))}catch(ur){$i(ur)}},ii=Li=>Li.done?qi(Li.value):Promise.resolve(Li.value).then(ki,Ri);ii((ri=ri.apply(En,Nn)).next())});const Qr={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Jt=({ruleValue:En,setSelectData:Nn,currentItemType:ri,defaultData:qi,isFirst:$i})=>{const[ki,Ri]=(0,le.useState)([]),[ii,Li,ur,Zr]=(0,kn.U)(Je,{source:"question",page:1,per_page:10,group_id:0,keyword:"",group_type:0,clazz:"ItemBanksGroup",sub_discipline_id:void 0,item_type:ri,show_children:!0});(0,le.useEffect)(()=>{Yr(void 0,null,function*(){const Bi=yield ur({},!0);Ri((0,fn.L)(Bi.disciplines))})},[]),console.log(qi),(0,le.useEffect)(()=>{if($i)switch(Ge(En)){case Lt.OnlyKnowledge:{No(qi.map(Bi=>Bi.tag_discipline_id));break}case Lt.KnowledgeAndDiff:{const Bi=new Map;qi.forEach(eo=>{eo&&(Bi.has(eo.tag_discipline_id)?Bi.set(eo.tag_discipline_id,[...Bi.get(eo.tag_discipline_id),eo.difficulty]):Bi.set(eo.tag_discipline_id,[eo.difficulty]))});for(const[eo,Yo]of Bi.entries())ga.setFieldValue([eo,"diff"],Yo);break}}},[qi,En,$i]);const[ga]=lt.default.useForm(),Uo=(0,le.useMemo)(()=>{const Bi=[];let eo="",Yo="";const ma={};for(const xa of(Zr==null?void 0:Zr.disciplines)||[]){eo=xa.name;for(const bo of xa.sub_disciplines){Yo=bo.name;for(const ra of bo.tag_disciplines){const Ao={sub_discipline_name:`${eo}&${Yo}`,sub_discipline_id:bo.id,tag_discipline_name:ra.name,id:ra.id,item_bank_num:ra.total_count,difficulty_count:ra.difficulty_count,tag_discipline_id:ra.id};Bi.push(Ao)}}}return Bi},[Zr,qi]),Ua=[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",show:!0,render:(Bi,eo)=>{const{item_bank_num:Yo}=eo;return le.createElement("div",null,Bi,`(${Yo})`)}},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",ellipsis:!0,show:!0},{title:"\u96BE\u5EA6",width:"35%",show:En.includes(_n.Difficulty),render:(Bi,eo)=>{const{id:Yo,difficulty_count:ma,total_count:xa,sub_discipline_name:bo,tag_discipline_name:ra}=eo;return le.createElement(le.Fragment,null,le.createElement(lt.default.Item,{name:[Yo,"diff"],noStyle:!0},le.createElement(An.default.Group,{style:{columnGap:12},options:ma.map(Ao=>({label:Ao.name,value:Qr[Ao.name]}))})),le.createElement(lt.default.Item,{name:[Yo,"extra"],initialValue:{difficulty_count:ma,total_count:xa,sub_discipline_name:bo,tag_discipline_name:ra},noStyle:!0},le.createElement("input",{type:"hidden"})))}}].filter(Bi=>Bi.show),[Ka,No]=(0,le.useState)([]),qr=(0,le.useRef)(new Map);return le.createElement("div",{style:{marginTop:12}},le.createElement(at.Z,{className:"mb20",align:"middle",gutter:20},le.createElement(hn.Z,null,le.createElement(Ue.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",size:"large",style:{width:240},options:ki,onChange:Bi=>{ur({sub_discipline_id:Bi==null?void 0:Bi[1]})}})),le.createElement(hn.Z,null,le.createElement(jn.t7,{style:{width:300},placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\u8FDB\u884C\u641C\u7D22",value:ii.keyword,onChange:Bi=>ur({keyword:Bi})}))),le.createElement(lt.default,{form:ga,onValuesChange:(Bi,eo)=>{var Yo;console.log(eo),qr.current.clear();for(const ma of Object.keys(eo)){const xa={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},bo=eo[ma],{difficulty_count:ra,total_count:Ao}=bo.extra||{};(Yo=bo==null?void 0:bo.diff)==null||Yo.forEach(Or=>{var Aa;const Ha=(Aa=ra==null?void 0:ra.find(gl=>gl.name===xa[Or]))==null?void 0:Aa.value,La=Ki(ci({},bo.extra),{id:`${ma}_${Or}`,difficulty:Or,item_bank_num:Ha,tag_discipline_id:ma});Ha>0&&qr.current.set(`${ma}_${Or}`,La)})}Nn([...qr.current.values()])}},(Uo==null?void 0:Uo.length)===0?le.createElement(mi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")}):le.createElement(dr.default,{rowSelection:Ge(En)===Lt.OnlyKnowledge?{preserveSelectedRowKeys:!0,type:"checkbox",onChange(Bi,eo){console.log("table-selectedRowKeys:",Bi,eo),No(Bi),Nn(eo)},getCheckboxProps:Bi=>({disabled:Bi.item_bank_num===0}),selectedRowKeys:Ka}:void 0,columns:Ua,dataSource:Uo,loading:Li,scroll:{y:480},rowKey:"id",pagination:!1})))},gi=Object.defineProperty,mr=Object.defineProperties,tr=Object.getOwnPropertyDescriptors,Hr=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,lo=Object.prototype.propertyIsEnumerable,Wr=(En,Nn,ri)=>Nn in En?gi(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,jr=(En,Nn)=>{for(var ri in Nn||(Nn={}))Lr.call(Nn,ri)&&Wr(En,ri,Nn[ri]);if(Hr)for(var ri of Hr(Nn))lo.call(Nn,ri)&&Wr(En,ri,Nn[ri]);return En},fo=(En,Nn)=>mr(En,tr(Nn)),$n=(En,Nn,ri)=>new Promise((qi,$i)=>{var ki=Li=>{try{ii(ri.next(Li))}catch(ur){$i(ur)}},Ri=Li=>{try{ii(ri.throw(Li))}catch(ur){$i(ur)}},ii=Li=>Li.done?qi(Li.value):Promise.resolve(Li.value).then(ki,Ri);ii((ri=ri.apply(En,Nn)).next())});const aa={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Do=({open:En,onCancel:Nn,setVisibleModalType:ri,currentItemType:qi})=>{var $i;const{data:ki,dispatch:Ri}=(0,le.useContext)(St),[ii,Li]=(0,le.useState)([]),[ur,Zr]=(0,le.useState)(),ga=($i=ki==null?void 0:ki.item_types)==null?void 0:$i.find(Yo=>Yo.item_type===qi);(0,le.useEffect)(()=>{var Yo,ma,xa;if(En){const bo=(Yo=ki==null?void 0:ki.item_types)==null?void 0:Yo.find(ra=>ra.item_type===qi);if((bo==null?void 0:bo.random_rule_type)!==Lt.Shixun){const ra=Zn[bo==null?void 0:bo.random_rule_type]||[];Li(ra);const Ao=(xa=(ma=ki==null?void 0:ki.item_types)==null?void 0:ma.find(Or=>Or.item_type===qi))==null?void 0:xa.contents;switch(console.log("----xxx",Ge(ra)),Ge(ra)){case Lt.OnlyDifficulty:{No(Ao.map(Or=>Or.difficulty));break}case Lt.OnlyFileFolder:{No({my:Ao==null?void 0:Ao.filter(Or=>parseInt(Or.teacher_group_id)!=="NaN"&&!Or.teacher_group_id&&Or.teacher_group_id!==0),public:Ao==null?void 0:Ao.filter(Or=>parseInt(Or.teacher_group_id)>=0)}),Zr({my:Ao==null?void 0:Ao.filter(Or=>parseInt(Or.teacher_group_id)!=="NaN"&&!Or.teacher_group_id&&Or.teacher_group_id!==0),public:Ao==null?void 0:Ao.filter(Or=>parseInt(Or.teacher_group_id)>=0)});break}case Lt.FileFolderAndKnowledge:{No({my:Ao==null?void 0:Ao.filter(Or=>parseInt(Or.teacher_group_id)!=="NaN"&&!Or.teacher_group_id&&Or.teacher_group_id!==0),public:Ao==null?void 0:Ao.filter(Or=>parseInt(Or.teacher_group_id)>=0)}),Zr({my:Ao==null?void 0:Ao.filter(Or=>parseInt(Or.teacher_group_id)!=="NaN"&&!Or.teacher_group_id&&Or.teacher_group_id!==0),public:Ao==null?void 0:Ao.filter(Or=>parseInt(Or.teacher_group_id)>=0)});break}case Lt.FileFolderAndDiff:{No(Ao),Zr(Ao);break}case Lt.All:{No(Ao),Zr(Ao);break}default:No(Ao)}}}},[En]);const[Uo,Ua]=(0,le.useState)([]);(0,le.useEffect)(()=>{En&&Xe({item_type:qi}).then(Yo=>{Yo.status===0&&Ua(Yo.data)})},[En]),(0,le.useEffect)(()=>{console.log("selectData",ur)},[ur]);const[Ka,No]=(0,le.useState)(),[qr,Bi]=(0,le.useState)(!0);console.log("isFirst:",qr);const eo=Yo=>{Li(Yo),Zr([]),No([]),Bi(!1)};return le.createElement(Vn.default,{title:"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219",width:948,closable:!0,centered:!0,open:En,onCancel:Nn,destroyOnClose:!0,onOk:()=>$n(void 0,null,function*(){var Yo,ma,xa,bo,ra,Ao,Or;if(ur===void 0){ri("");return}if(Object.prototype.toString.call(ur)==="[object Object]"&&!((Yo=ur.my)!=null&&Yo.length)&&!((ma=ur.public)!=null&&ma.length)){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if(!Object.keys(ur).length&&!(ur!=null&&ur.length)){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}const Aa=Ge(ii);switch(Aa){case Lt.OnlyFileFolder:{Ri({type:"editRule",payload:{itemType:qi,tableData:[...ur.my||[],...ur.public||[]],randomRuleType:Aa}});break}case Lt.OnlyDifficulty:{const Ha=(bo=(xa=ki==null?void 0:ki.item_types)==null?void 0:xa.find(gl=>gl.item_type===qi))==null?void 0:bo.contents;let La=[{},{value:(ra=Uo.find(gl=>gl.name==="\u7B80\u5355"))==null?void 0:ra.value},{value:(Ao=Uo.find(gl=>gl.name==="\u9002\u4E2D"))==null?void 0:Ao.value},{value:(Or=Uo.find(gl=>gl.name==="\u56F0\u96BE"))==null?void 0:Or.value}];Ri({type:"editRule",payload:{itemType:qi,tableData:ur.map((gl,xu)=>{var en,Xt,On,tt;return{difficulty:gl,id:xu,quanlity:((Xt=(en=Ha==null?void 0:Ha.filter(nn=>nn.id===xu))==null?void 0:en[0])==null?void 0:Xt.quanlity)||1,item_bank_num:(Uo==null?void 0:Uo.length)===1?(On=Uo[0])==null?void 0:On.value:(tt=La==null?void 0:La[gl])==null?void 0:tt.value}}),randomRuleType:Aa}});break}case Lt.OnlyKnowledge:{Ri({type:"editRule",payload:{itemType:qi,tableData:ur.map(Ha=>fo(jr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Aa}});break}case Lt.KnowledgeAndDiff:{Ri({type:"editRule",payload:{itemType:qi,tableData:ur.map(Ha=>fo(jr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Aa}});break}case Lt.FileFolderAndDiff:{Ri({type:"editRule",payload:{itemType:qi,tableData:ur.map(Ha=>fo(jr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Aa}});break}case Lt.FileFolderAndKnowledge:{Ri({type:"editRule",payload:{itemType:qi,tableData:[...ur.my||[],...ur.public||[]],randomRuleType:Aa}});break}case Lt.All:{Ri({type:"editRule",payload:{itemType:qi,tableData:ur.map(Ha=>fo(jr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Aa}});break}}ri("")})},le.createElement(An.default.Group,{className:`${Gn.ruleCheckBox}`,style:{marginBottom:8},value:ii,onChange:Yo=>{var ma;ii!=null&&ii.length&&((ma=ga==null?void 0:ga.contents)==null?void 0:ma.length)>0?Vn.default.confirm({title:"\u63D0\u793A",content:"\u5207\u6362\u89C4\u5219\u540E\uFF0C\u4E4B\u524D\u7684\u62BD\u9898\u914D\u7F6E\u5C06\u88AB\u6E05\u7A7A\uFF01",okText:"\u7ACB\u5373\u5207\u6362",cancelText:"\u6682\u4E0D\u5207\u6362",onOk:()=>eo(Yo)}):eo(Yo)},options:[{label:"\u6307\u5B9A\u6587\u4EF6\u5939\u62BD\u9898",value:_n.FileFolder},{label:"\u6307\u5B9A\u96BE\u5EA6\u62BD\u9898",value:_n.Difficulty},{label:"\u6307\u5B9A\u77E5\u8BC6\u70B9\u62BD\u9898",value:_n.Knowledge}]}),ii.includes(_n.FileFolder)?le.createElement(tn,{defaultData:Ka,selectData:ur,ruleValue:ii,setSelectData:Zr,currentItemType:qi}):ii.includes(_n.Knowledge)?le.createElement(Jt,{defaultData:Ka,isFirst:qr,ruleValue:ii,setSelectData:Zr,currentItemType:qi}):ii.includes(_n.Difficulty)?le.createElement("div",{style:{marginTop:12}},le.createElement("span",{className:"mr20",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(An.default.Group,{style:{columnGap:12},options:Uo.map(Yo=>({label:Yo.name,value:aa[Yo.name]})),value:ur||Ka,onChange:Yo=>Zr(Yo)})):null)},Ji=({open:En,onCancel:Nn,setVisibleModalType:ri,currentItemType:qi})=>En?le.createElement(Do,{open:En,onCancel:Nn,setVisibleModalType:ri,currentItemType:qi}):null,la=me(6848),Ro=me(38389),Nr=me(94811),Ar=me(99325),xo=me(88230),Wo=me(61485),Hi=me(72559),_o=({open:En,onCancel:Nn,onOk:ri})=>{const{data:qi}=(0,le.useContext)(St),$i=(0,Ro.g)(),[ki,Ri,ii,Li]=(0,kn.U)(Nr.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[ur,Zr]=(0,le.useState)(!1);(0,le.useEffect)(()=>{if(En){ii({page:1,limit:10,type:0},!0).then(qr=>{(qr==null?void 0:qr.shixuns_count)===0&&Zr(!0)});const No=qi.item_types.find(qr=>qr.item_type==="PRACTICAL");Uo(No.item_banks.map(qr=>qr.id)),Ka(No.item_banks)}},[En,qi]);const[ga,Uo]=(0,le.useState)([]),[Ua,Ka]=(0,le.useState)([]);return le.createElement(Vn.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:En,width:948,centered:!0,closable:!0,onCancel:Nn,onOk:()=>ri(Ua),destroyOnClose:!0},le.createElement(at.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(hn.Z,null,le.createElement(Ue.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:$i,onChange:No=>{ii({page:1,discipline_id:No==null?void 0:No[0],sub_discipline_id:No==null?void 0:No[1]})}}),le.createElement(Ei.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:No=>ii({page:1,diff:No})}),le.createElement(Ei.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:No=>ii({page:1,shixun_publish_status:No})})),le.createElement(jn.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:No=>{ii({keyword:No,page:1})}})),ur?le.createElement("div",null,le.createElement(mi.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,xo.xg)("/shixuns")})):le.createElement(dr.default,{loading:Ri,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(No,qr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:qr!=null&&qr.high_resources_consume?Yn.title:"",title:No||"--"},le.createElement(Ar.Z,{key:1,showLines:1,showTextOnly:!0,value:No||"--"})),(qr==null?void 0:qr.high_resources_consume)&&le.createElement(Hi.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(No,qr,Bi)=>le.createElement("span",null,No||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(la.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement(Wo.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(No,qr,Bi)=>le.createElement("span",null,No||"- -")},{title:"\u64CD\u4F5C",render(No,qr){const{title:Bi,challenge_names:eo,author_name:Yo,identifier:ma,author_school_name:xa,study_count:bo}=qr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Vn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(Ar.Z,{value:Bi,style:{marginBottom:18}}),le.createElement("div",{className:Yn.challengeNameWrapper},eo.map((ra,Ao)=>le.createElement("div",{className:Yn.challengeName,key:Ao},"\u7B2C",(0,xo.EM)(Ao+1),"\u9898\xA0",ra))),le.createElement(at.Z,{className:Yn.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(hn.Z,{className:Yn.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:Yn.shixunInfo},Yo.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:Yn.shixunInfo},xa),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:Yn.shixunInfo},bo)),le.createElement(Oe.ZP,{type:"primary",className:Yn.btnToDetail,onClick:()=>(0,xo.xg)(`/shixuns/${ma}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(qr==null?void 0:qr.shixun_tag_num)===1&&le.createElement("a",{target:"_blank",href:`/shixuns/${qr==null?void 0:qr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:Li==null?void 0:Li.items,rowSelection:{selectedRowKeys:ga,preserveSelectedRowKeys:!0,getCheckboxProps:No=>({disabled:No.shixun_tag_num===1}),onChange(No,qr){var Bi,eo,Yo;console.log(No),Uo(No);const ma=[];for(const bo of Ua)No.includes(bo.id)&&ma.push(bo);const xa=ma.map(bo=>bo.id);for(const bo of qr)bo&&No.includes(bo.id)&&!xa.includes(bo.id)&&ma.push({id:bo.id,difficulty:bo.level,identifier:bo.identifier,name:bo.name,real_name:(Bi=bo==null?void 0:bo.author_name)==null?void 0:Bi.split("\u3001")[0],school_name:bo.author_school_name,challenge_names:bo.challenge_names,challenges:(eo=bo.challenge_names)==null?void 0:eo.map((ra,Ao)=>({subject:ra,id:Ao,score:5})),score:((Yo=bo.challenge_names)==null?void 0:Yo.length)*5,study_count:bo.study_count,challenges_count:bo.challenges_count});Ka(ma)}},pagination:{current:ki.page,pageSize:ki.limit,total:Li==null?void 0:Li.items_count,showTotal:No=>le.createElement("span",null,"\u5171\xA0",le.createElement("span",{style:{color:"#165DFF"}},No),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(No,qr){ii({page:No,limit:qr})},size:"default"},scroll:{y:400}}))},Ia=me(78113),Ma=me(59301),xs=Object.defineProperty,Wa=Object.defineProperties,Ps=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Po=Object.prototype.hasOwnProperty,Xr=Object.prototype.propertyIsEnumerable,ha=(En,Nn,ri)=>Nn in En?xs(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,br=(En,Nn)=>{for(var ri in Nn||(Nn={}))Po.call(Nn,ri)&&ha(En,ri,Nn[ri]);if(Lo)for(var ri of Lo(Nn))Xr.call(Nn,ri)&&ha(En,ri,Nn[ri]);return En},Ur=(En,Nn)=>Wa(En,Ps(Nn)),fi=({onDelete:En,list:Nn,onSelect:ri})=>{const[qi,$i]=(0,le.useState)(!1),{dispatch:ki,disabled:Ri}=(0,le.useContext)(St),ii=(Uo,Ua,Ka)=>{const No=Array.from(Uo),[qr]=No.splice(Ua,1);return No.splice(Ka,0,qr),No},[Li,ur]=(0,le.useState)(null),[Zr,ga]=(0,le.useState)(!1);return Ma.createElement(Ia.Z5,{onDragStart:()=>{ga(!0)},onDragEnd:Uo=>{if(ga(!1),!Uo.destination)return;const Ua=ii(Nn,Uo.source.index,Uo.destination.index);ki({type:"updateItemTypes",payload:Ua})}},Ma.createElement(Ia.bK,{droppableId:"droppable"},(Uo,Ua)=>Ma.createElement("div",Ur(br({},Uo.droppableProps),{ref:Uo.innerRef}),Ma.createElement(Ct.Z,{spinning:qi},Nn.map((Ka,No)=>Ma.createElement(Ia._l,{key:No,draggableId:No.toString(),index:No,isDragDisabled:Li!==Ka.item_type},(qr,Bi)=>Ma.createElement(at.Z,Ur(br(br({align:"middle",wrap:!1,ref:qr.innerRef},qr.draggableProps),qr.dragHandleProps),{className:`${Yn.dragItem} ${Zr?Yn.dragging:""}`}),Ma.createElement(hn.Z,{className:Yn.contentArea,onClick:()=>{ri(Ka.item_type),(0,xo.k3)()}},Ma.createElement("span",{className:Yn.blackText},(0,xo.EM)(No+1),"\u3001\u3010",Ka.item_type_text,"\u3011"),Ma.createElement(la.Z,{title:`\uFF08${Ka.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(Ka.total_score).toFixed(1)}\u5206\uFF09`},Ma.createElement("span",{className:Yn.greyText},`\uFF08${Ka.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(Ka.total_score).toFixed(1)}\u5206\uFF09`))),!Ri&&Ma.createElement(Ma.Fragment,null,Ma.createElement(la.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F",open:Li===Ka.item_type&&!Zr},Ma.createElement("div",{style:{cursor:"grab"},className:`${Yn.iconWrapper} ${Zr?Yn.hidden:""}`,onMouseEnter:()=>{ur(Ka.item_type)},onMouseLeave:()=>ur(null)},Ma.createElement("i",{className:`iconfont icon-tuodong1 ${Yn.dragIcon}`}))),Ma.createElement(la.Z,{title:"\u5220\u9664"},Ma.createElement("div",{className:`${Yn.iconWrapper} ${Zr?Yn.hidden:""}`,style:{cursor:"pointer"},onClick:()=>En(Ka.item_type)},Ma.createElement("i",{className:`iconfont icon-shanchu12 ${Yn.deleteIcon}`})))))))),Uo.placeholder)))},Ba=me(10777),Eo={flex_box_center:"flex_box_center___ppkzA",flex_space_between:"flex_space_between___Z1syx",flex_box_vertical_center:"flex_box_vertical_center___twJ9S",flex_box_center_end:"flex_box_center_end___uI0uW",flex_box_column:"flex_box_column___JRp7D",timelineWrapper:"timelineWrapper___LP9aM",title:"title___KUHj_",desc:"desc___ubc8E",titles:"titles___njkjf",questionDetailWrapper:"questionDetailWrapper___p4SFM",questionTitle:"questionTitle___JC9X6",questionScoreInfo:"questionScoreInfo___NgOJI",deleteIcon:"deleteIcon___oMVTN",deleteBtn:"deleteBtn___JUPEl",normalText:"normalText___FW9Y_",folderIcon:"folderIcon___gvacQ",challengeNameWrapper:"challengeNameWrapper___fG7Vv",challengeName:"challengeName___Ia1Xs",shixunPreviewFooter:"shixunPreviewFooter___rKsnN",shixunInfoWrapper:"shixunInfoWrapper___FEnDb",shixunInfo:"shixunInfo___TbrA2",btnToDetail:"btnToDetail___dqLQP",q_title:"q_title___qnv4p"},es=me(73631),fa=me(31328);const va=(En,Nn,ri,qi)=>{const $i={[Lt.OnlyDifficulty]:[{title:"\u96BE\u5EA6",key:"difficulty",render(ki,Ri){const{difficulty:ii}=Ri;return le.createElement("span",{style:{color:Pe[ii].color}},Pe[ii].label)}}],[Lt.OnlyKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",width:180,ellipsis:{showTitle:!0},render(ki,Ri){return`${ki}`}}],[Lt.OnlyFileFolder]:[{title:"\u6587\u4EF6\u5939",render(ki,Ri,ii){const{group_name:Li,teacher_group_name:ur}=Ri,Zr=Li||ur,ga=ur?fa:es;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:ga,className:Eo.folderIcon})," ",le.createElement(la.Z,{title:Zr},le.createElement("span",{className:Eo.titles},Zr)))}},{title:"\u7C7B\u578B",render(ki,Ri){const{teacher_group_name:ii}=Ri;return le.createElement("span",null,ii?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[Lt.KnowledgeAndDiff]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:{showTitle:!0}},{title:"\u65B9\u5411&\u8BFE\u7A0B",width:180,dataIndex:"sub_discipline_name",ellipsis:{showTitle:!0}},{title:"\u96BE\u5EA6",key:"difficulty",render(ki,Ri){const{difficulty:ii}=Ri;return le.createElement("span",{style:{color:Pe[ii].color}},Pe[ii].label)}}],[Lt.FileFolderAndKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(ki,Ri){const{group_name:ii,teacher_group_name:Li}=Ri,ur=ii||Li,Zr=Li?fa:es;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:Zr,className:Eo.folderIcon})," ",le.createElement(la.Z,{title:ur},le.createElement("span",{className:Eo.titles},ur)))}},{title:"\u7C7B\u578B",render(ki,Ri){const{teacher_group_name:ii}=Ri;return le.createElement("span",null,ii?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[Lt.FileFolderAndDiff]:[{title:"\u6587\u4EF6\u5939",render(ki,Ri){const{group_name:ii,teacher_group_name:Li}=Ri,ur=ii||Li,Zr=Li?fa:es;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:Zr,className:Eo.folderIcon})," ",le.createElement(la.Z,{title:ur},le.createElement("span",{className:Eo.titles},ur)))}},{title:"\u7C7B\u578B",render(ki,Ri){const{teacher_group_name:ii}=Ri;return le.createElement("span",null,ii?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(ki,Ri){const{difficulty:ii}=Ri;return le.createElement("span",{style:{color:Pe[ii].color}},Pe[ii].label)}}],[Lt.All]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(ki,Ri){const{group_name:ii,teacher_group_name:Li,teacher_group_id:ur}=Ri,Zr=ii||Li,ga=ur||ur===0?fa:es;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:ga,className:Eo.folderIcon})," ",le.createElement(la.Z,{title:Zr},le.createElement("span",{className:Eo.titles},Zr)))}},{title:"\u7C7B\u578B",render(ki,Ri){const{teacher_group_id:ii}=Ri;return le.createElement("span",null,ii||ii===0?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(ki,Ri){const{difficulty:ii}=Ri;return le.createElement("span",{style:{color:Pe[ii].color}},Pe[ii].label)}}],[Lt.Shixun]:[]};for(const ki of Object.values($i))ki.push({title:"\u62BD\u9898\u6570\u91CF",key:"quanlity",render(Ri,ii){const{item_bank_num:Li,quanlity:ur,id:Zr,teacher_group_id:ga}=ii||{};return le.createElement(at.Z,{align:"middle"},le.createElement(mt.Z,{disabled:qi,min:1,max:Li,size:"large",precision:0,value:ur,onChange:Uo=>{Nn({type:"changeQuestionNum",payload:{itemType:ri,id:Zr,num:Uo,teacher_group_id:ga}})}}),le.createElement("span",{className:"ml10 font14",style:{color:"#333333"}},"/",Li))}},{title:"\u64CD\u4F5C",key:"action",align:"right",render(Ri,ii){const{id:Li,is_share:ur}=ii;return qi?le.createElement("span",{className:"cursorNotAllowed c-grey-999"},"\u5220\u9664"):le.createElement("span",{className:Eo.deleteBtn,onClick:()=>{Nn({type:"deleteRule",payload:{itemType:ri,id:Li,is_share:ur}})}},"\u5220\u9664")}});return $i[En]},$a=({setVisibleModalType:En})=>{var Nn,ri,qi,$i;const{data:ki,dispatch:Ri,disabled:ii}=(0,le.useContext)(St),Li=(Nn=ki==null?void 0:ki.item_types)==null?void 0:Nn.find(ur=>ur.item_type==="PRACTICAL");return le.createElement(Ba.Z,{className:Eo.timelineWrapper,items:[{children:le.createElement("div",{style:{transform:"translateY(-4px)"}},le.createElement(at.Z,{className:"mb20",align:"middle",justify:"space-between"},le.createElement(hn.Z,null,le.createElement("span",{className:Eo.title},"\u9898\u5E93\u9009\u9898"),le.createElement("span",{className:Eo.desc},"\uFF08\u9700\u8981\u5148\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9\u5B9E\u8BAD\u9898\uFF0C\u518D\u8BBE\u7F6E\u4ECE\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898\u7684\u6570\u91CF\uFF09")),!ii&&le.createElement(jn.op,{style:{width:102},onClick:()=>En("selectShixun")},"\u4ECE\u9898\u5E93\u9009\u62E9")),((ri=Li==null?void 0:Li.item_banks)==null?void 0:ri.length)===0?le.createElement(mi.Z,{customText:"\u6682\u65E0\u5F85\u62BD\u8BD5\u9898\uFF0C\u8BF7\u5148\u4ECE\u9898\u5E93\u8FDB\u884C\u9009\u62E9\uFF5E"}):le.createElement(dr.default,{rowKey:"id",className:"mb10",columns:[{title:"\u5E8F\u53F7",width:60,render(ur,Zr,ga){return le.createElement("span",null,ga+1)}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"40%",ellipsis:{showTitle:!0},render:(ur,Zr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:Zr!=null&&Zr.high_resources_consume?Eo.q_title:"",title:ur||"--"},le.createElement(Ar.Z,{key:1,showLines:1,showTextOnly:!0,value:ur})),(Zr==null?void 0:Zr.high_resources_consume)&&le.createElement(Hi.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(ur,Zr,ga)=>le.createElement("span",null,ur||"- -")},{title:"\u96BE\u5EA6",dataIndex:"difficulty"},{title:"\u64CD\u4F5C",align:"right",width:180,render(ur,Zr,ga){const{id:Uo,identifier:Ua,name:Ka,challenge_names:No=[],real_name:qr,school_name:Bi,study_count:eo,challenges:Yo=[]}=Zr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer",marginLeft:20},onClick:()=>{Vn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(Ar.Z,{value:Ka,style:{marginBottom:18}}),le.createElement("div",{className:Eo.challengeNameWrapper},Yo==null?void 0:Yo.map((ma,xa)=>le.createElement("div",{className:Eo.challengeName,key:xa},"\u7B2C",(0,xo.EM)(xa+1),"\u9898\xA0",ma==null?void 0:ma.subject))),le.createElement(at.Z,{className:Eo.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(hn.Z,{className:Eo.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:Eo.shixunInfo},qr),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:Eo.shixunInfo},Bi),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:Eo.shixunInfo},eo)),le.createElement(Oe.ZP,{type:"primary",className:Eo.btnToDetail,onClick:()=>(0,xo.xg)(`/shixuns/${Ua}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),!ii&&le.createElement("span",{onClick:()=>{Ri({type:"deleteShixunQuestion",payload:{shixunId:Uo}})},className:`ml20 ${Eo.deleteBtn}`},"\u5220\u9664"))}}],dataSource:(Li==null?void 0:Li.item_banks)||[],pagination:!1}))},{children:le.createElement(at.Z,{style:{transform:(qi=Li==null?void 0:Li.item_banks)!=null&&qi.length?"translateY(-8px)":"none"},align:"middle",justify:"space-between"},le.createElement("span",{className:Eo.title},"\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898"),!!(($i=Li==null?void 0:Li.item_banks)!=null&&$i.length)&&le.createElement(hn.Z,null,le.createElement(at.Z,{align:"middle"},le.createElement("span",{className:Eo.normalText},"\u62BD\u9898\u6570\u91CF"),le.createElement(mt.Z,{min:0,disabled:ii,max:Li==null?void 0:Li.item_bank_num,size:"large",className:"ml10 mr10",value:(Li==null?void 0:Li.item_bank_count)||1,onChange:ur=>Ri({type:"changeQuestionNum",payload:{num:ur||1,itemType:"PRACTICAL"}})}),le.createElement("span",{className:`${Eo.normalText} mr30`},"/",Li==null?void 0:Li.item_bank_num),le.createElement("span",{className:Eo.normalText},"\u6BCF\u9898\u5206\u503C"),le.createElement(mt.Z,{disabled:ii,min:0,max:100,size:"large",precision:1,className:"ml10 mr10",value:Li==null?void 0:Li.score,onChange:ur=>Ri({type:"changeQuestionScore",payload:{score:ur,itemType:"PRACTICAL"}})}),le.createElement("span",{className:Eo.normalText},"\u5206"))))}]})};var fs=({setVisibleModalType:En,currentItemType:Nn,onDelete:ri})=>{var qi,$i;const ki=(0,Ve.useParams)(),{data:Ri,dispatch:ii,disabled:Li}=(0,le.useContext)(St),ur=((qi=Ri==null?void 0:Ri.item_types)==null?void 0:qi.findIndex(ga=>ga.item_type===Nn))+1,Zr=($i=Ri==null?void 0:Ri.item_types)==null?void 0:$i.find(ga=>ga.item_type===Nn);return le.createElement("div",{className:Eo.questionDetailWrapper},le.createElement(at.Z,{justify:"space-between",align:"middle",className:"mb30"},le.createElement(hn.Z,null,le.createElement("span",{className:Eo.questionTitle},`${(0,xo.EM)(ur)}\u3001${Zr==null?void 0:Zr.item_type_text}`),le.createElement("span",{className:Eo.questionScoreInfo},"\uFF08",le.createElement("span",{style:{color:"#3061D0"}},Zr==null?void 0:Zr.item_bank_count),"\u5C0F\u9898 ",le.createElement("span",null,"\uFF0C\u5171",le.createElement("span",{style:{color:"#3061D0"}},Zr==null?void 0:Zr.total_score),"\u5206"),"\uFF09")),!Li&&le.createElement("i",{className:`iconfont icon-shanchutimu ${Eo.deleteIcon}`,onClick:()=>ri(Nn)})),Nn==="PRACTICAL"?le.createElement($a,{setVisibleModalType:En}):le.createElement(le.Fragment,null,(Zr==null?void 0:Zr.contents.length)===0?le.createElement(mi.Z,{styles:{margin:"70px auto 100px auto"},customText:le.createElement("span",null,"\u6682\u65E0\u62BD\u9898\u89C4\u5219\uFF0C\u652F\u6301",le.createElement("span",{style:{color:"#EA9741"}},"\u6307\u5B9A\u6587\u4EF6\u5939\u3001\u96BE\u5EA6\u3001\u77E5\u8BC6\u70B9"),"\u8FDB\u884C\u62BD\u9898\uFF5E"),ButtonTwo:(ki==null?void 0:ki.id)&&le.createElement(at.Z,{justify:"center",className:"mt30"},le.createElement(jn.op,{style:{width:136,marginTop:-10},onClick:()=>En("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219"))}):le.createElement(le.Fragment,null,le.createElement(at.Z,{justify:"space-between",align:"middle",className:"mb20"},le.createElement(hn.Z,null,le.createElement(at.Z,{align:"middle"},le.createElement("span",{className:`${Eo.normalText}`},"\u6BCF\u9898\u5206\u503C"),le.createElement(mt.Z,{disabled:Li,size:"large",className:"ml10 mr10",min:.1,max:100,value:Zr==null?void 0:Zr.score,precision:1,onChange:ga=>ii({type:"changeQuestionScore",payload:{score:ga,itemType:Nn}})}),le.createElement("span",{className:Eo.normalText},"\u5206"))),(ki==null?void 0:ki.id)&&le.createElement(jn.op,{onClick:()=>En("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219")),le.createElement(dr.default,{columns:va(Zr==null?void 0:Zr.random_rule_type,ii,Nn,Li),dataSource:Zr==null?void 0:Zr.contents,pagination:!1,rowKey:"id"}))))},Rs=me(75872),Zs=me(30897),Bn=me(73898),Fs=me(32637),Go=me(59301),kl=Object.defineProperty,_s=Object.defineProperties,sl=Object.getOwnPropertyDescriptors,yu=Object.getOwnPropertySymbols,Kl=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable,ya=(En,Nn,ri)=>Nn in En?kl(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,dl=(En,Nn)=>{for(var ri in Nn||(Nn={}))Kl.call(Nn,ri)&&ya(En,ri,Nn[ri]);if(yu)for(var ri of yu(Nn))gs.call(Nn,ri)&&ya(En,ri,Nn[ri]);return En},Vo=(En,Nn)=>_s(En,sl(Nn)),Ea=(En,Nn,ri)=>new Promise((qi,$i)=>{var ki=Li=>{try{ii(ri.next(Li))}catch(ur){$i(ur)}},Ri=Li=>{try{ii(ri.throw(Li))}catch(ur){$i(ur)}},ii=Li=>Li.done?qi(Li.value):Promise.resolve(Li.value).then(ki,Ri);ii((ri=ri.apply(En,Nn)).next())}),pr=({})=>{var En,Nn,ri,qi,$i,ki,Ri,ii,Li,ur,Zr,ga,Uo,Ua,Ka;const[No]=(0,Ve.useSearchParams)(),qr=(0,Ve.useParams)(),{data:Bi,dispatch:eo,setPreview:Yo,getData:ma,handlePreview:xa,disabled:bo}=(0,le.useContext)(St),[ra,Ao]=(0,le.useState)(""),[Or,Aa]=(0,le.useState)((Nn=(En=Bi==null?void 0:Bi.item_types)==null?void 0:En[0])==null?void 0:Nn.item_type),[Ha,La]=(0,le.useState)(!0),[gl,xu]=(0,le.useState)(!1),en=(nn,sr)=>Ea(void 0,null,function*(){var kr,yr,lr,Mi,wr,to;const yo=Bi.item_types.map(Ii=>Ii.item_type_text),fr=(kr=Bi==null?void 0:Bi.item_types)==null?void 0:kr.filter(Ii=>{var Gr,Zo;return((Gr=Ii.contents)==null?void 0:Gr.length)>0||((Zo=Ii==null?void 0:Ii.item_banks)==null?void 0:Zo.length)>0});if(Bi.sort_by_item_type=yo,!((yr=Bi.item_types)!=null&&yr.length)){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((fr==null?void 0:fr.length)===0){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}let vr=()=>Ea(void 0,null,function*(){const Ii=(0,qe.cloneDeep)(Bi),{item_types:Gr}=Ii||{};Ii.item_types=Gr.filter(Fr=>Fr.item_type===Or),(yield je(qr.id||qr.categoryId,Ii)).status===0&&(Aa(sr),He.ZP.success("\u4FDD\u5B58\u6210\u529F"),nn||Ve.history.push("/paperlibrary"))}),xr=(Mi=(lr=Bi==null?void 0:Bi.item_types)==null?void 0:lr.filter(Ii=>Ii.item_type_text==="\u5B9E\u8BAD\u9898")[0])==null?void 0:Mi.item_banks,_i=0;xr==null||xr.map(Ii=>{Ii.high_resources_consume&&(_i=_i+1)}),console.log(_i),_i>0?Vn.default.info({centered:!0,icon:null,width:600,okText:"\u6211\u77E5\u9053\u4E86",title:"\u63D0\u793A",content:Go.createElement("div",null,Go.createElement("div",{className:Yn.tipcontent},Go.createElement("div",null,Go.createElement("div",{className:Yn.name},"\u60A8\u597D\uFF01",(wr=(0,Bn.eY)())==null?void 0:wr.username,"\uFF08",(to=(0,Bn.eY)())==null?void 0:to.login,"\uFF09\uFF1A"),Go.createElement("div",{className:Yn.tip},"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",Go.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002\u53D1\u5E03\u8003\u8BD5\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),Go.createElement("div",{className:Yn.info},Go.createElement("i",{className:"iconfont icon-xunifangzhenti1 mr10 font26"}),Go.createElement("span",{className:"mr10",style:{color:"#6A7283"}},"\u9AD8\u6D88\u8017\u5B9E\u9A8C"),Go.createElement("span",{style:{color:"#232B40"}},`${_i}\u4E2A`))),Go.createElement("div",null,Go.createElement("div",{className:Yn.img},Go.createElement("img",{src:Fs,width:"124px",height:"124px"})),Go.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")))),onOk:()=>{vr()}}):vr()}),Xt=(nn,sr,kr,yr=!1)=>Ea(void 0,null,function*(){console.log(Bi);const lr=Vo(dl(dl({},Bi.exercise),qr),{exerciseId:qr.categoryId,sort_by_item_type:Bi.sort_by_item_type,difficulty:Bi.examination_bank.difficulty,exam_notes:Bi.examination_bank.exam_notes,exercise_name:Bi.examination_bank.name,time:Bi.examination_bank.time,changed_item_type:Or,item_types:Bi.item_types,sub_discipline_id:Bi.examination_bank.sub_discipline_id});(!nn||sr===1)&&(lr.is_reset=1);const Mi=yield(0,Zs.wy)(lr);return Mi.status===0&&(yr||He.ZP.success("\u4FEE\u6539\u6210\u529F "),Aa(kr),nn||Ve.history.push(`/classrooms/${qr.coursesId}/exercise/${qr.categoryId}/detail?random=true`)),Mi}),On=nn=>{Vn.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closable:!0,content:Go.createElement("div",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u9898\u578B\uFF1F"),onOk:()=>Ea(void 0,null,function*(){var sr,kr,yr,lr;if(qr.id){if((yield Mt(qr.id,{item_type:[nn]})).status!==0)return}else{const Mi=yield ot(qr.categoryId,{item_type:[nn]});if(ma(),Mi.status!==0)return}if(eo({type:"deleteQuestionType",payload:nn}),nn===Or){const Mi=Ne(Bi,{type:"deleteQuestionType",payload:nn});Aa(Mi.item_types.length?Mi.item_types[0].item_type:(kr=(sr=Bi==null?void 0:Bi.item_types)==null?void 0:sr[0])==null?void 0:kr.item_type)}else Aa((lr=(yr=Bi==null?void 0:Bi.item_types)==null?void 0:yr[0])==null?void 0:lr.item_type)})})};(0,le.useEffect)(()=>{var nn;(nn=Bi==null?void 0:Bi.examination_bank)!=null&&nn.name&&La(!1),(0,xo.Dk)("\u968F\u673A\u7EC4\u5377")},[(ri=Bi==null?void 0:Bi.examination_bank)==null?void 0:ri.name]);const tt=()=>Ea(void 0,null,function*(){var nn;let sr=yield Xt(!0,1,Or,!0);if((sr==null?void 0:sr.status)===0){const kr=yield(0,te.ZP)(`/api/exercises/${qr==null?void 0:qr.categoryId}/simulate_start_answer.json`,{method:"get",params:{coursesId:qr==null?void 0:qr.coursesId,categoryId:qr==null?void 0:qr.categoryId}});(kr==null?void 0:kr.status)!=-1&&window.open(`/classrooms/${qr.coursesId}/exercise/${qr.categoryId}/${(nn=(0,Bn.eY)())==null?void 0:nn.login}/initate_answer`)}});return Go.createElement("div",{className:Yn.questionInfo},Go.createElement("div",{className:"tc mb20"},Go.createElement(Le.VP,{defaultValue:(qi=Bi==null?void 0:Bi.examination_bank)==null?void 0:qi.name,onFinish:nn=>Ea(void 0,null,function*(){return eo({type:"updateBaseInfo",payload:Vo(dl({},Bi.examination_bank),{name:nn})}),(0,Zs.wy)({exercise_name:nn,exerciseId:qr==null?void 0:qr.categoryId}),!0})})),Go.createElement(at.Z,{justify:"center",className:"mb20"},Go.createElement(hn.Z,{className:"mr30"},Go.createElement("span",{className:Yn.label},"\u7B54\u9898\u65F6\u957F"),Go.createElement("span",null,(($i=Bi==null?void 0:Bi.examination_bank)==null?void 0:$i.time)===-1?"\u4E0D\u9650":((ki=Bi==null?void 0:Bi.examination_bank)==null?void 0:ki.time)||"\u4E0D\u9650")),Go.createElement(hn.Z,{className:"mr30"},Go.createElement("span",{className:Yn.label},"\u96BE\u5EA6"),Go.createElement("span",null,(ii=Pe[`${(Ri=Bi==null?void 0:Bi.examination_bank)==null?void 0:Ri.difficulty}`])==null?void 0:ii.label)),Go.createElement(hn.Z,{className:"mr30"},Go.createElement("span",{className:Yn.label},"\u8BD5\u9898\u603B\u6570"),Go.createElement("span",null,((Li=Bi==null?void 0:Bi.examination_bank)==null?void 0:Li.question_count)||0)),Go.createElement(hn.Z,null,Go.createElement("span",{className:Yn.label},"\u603B\u5206"),Go.createElement("span",null,((Zr=(ur=Bi==null?void 0:Bi.examination_bank)==null?void 0:ur.total_score)==null?void 0:Zr.toFixed(1))||0))),Go.createElement("div",{className:Yn.content,style:{border:((ga=Bi==null?void 0:Bi.item_types)==null?void 0:ga.length)<=0&&"none"}},((Uo=Bi==null?void 0:Bi.item_types)==null?void 0:Uo.length)>0?Go.createElement(at.Z,{wrap:!1},Go.createElement(hn.Z,{flex:"260px",className:Yn.leftPart},!bo&&Go.createElement(at.Z,{className:"mb20"},Go.createElement(jn.op,{style:{margin:"0 15px",borderRadius:2},onClick:()=>Ao("setScore")},"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C"),(qr==null?void 0:qr.id)&&Go.createElement(jn.op,{shape:"default",onClick:()=>Ao("questionType")},"\u6DFB\u52A0\u9898\u578B")),Go.createElement(fi,{list:Bi.item_types,onSelect:nn=>Ea(void 0,null,function*(){if(nn===Or)return;La(!0);const sr=Bi.item_types.find(kr=>kr.item_type===Or);if(Or!=="PRACTICAL"&&sr.contents.length>0&&(qr!=null&&qr.id)){const kr=(0,qe.cloneDeep)(Bi),{item_types:yr}=kr||{};kr.item_types=yr.filter(lr=>lr.item_type===Or);try{(yield je(qr.id||qr.categoryId,kr)).status===0&&Aa(nn)}catch(lr){}}else qr.categoryId?Xt(!0,2,nn):en(!0,nn);La(!1)}),onDelete:On})),Go.createElement(hn.Z,{flex:1,className:Yn.rightPart},Go.createElement(Ct.Z,{spinning:Ha},Go.createElement(fs,{setVisibleModalType:Ao,currentItemType:Or,onDelete:On})))):Go.createElement(mi.Z,{customText:"\u8BF7\u5148\u8BBE\u7F6E\u8BD5\u5377\u9898\u578B",styles:{margin:"70px auto"},ButtonTwo:Go.createElement(at.Z,{justify:"center",className:"mt20"},(qr==null?void 0:qr.id)&&Go.createElement(jn.op,{style:{width:88},onClick:()=>Ao("questionType")},"\u6DFB\u52A0\u9898\u578B"))})),!!(qr!=null&&qr.id)&&Go.createElement("div",{className:Yn.fixedBottom},Go.createElement(Rs.Z,{className:`${Yn.previewBtn} mr20`,onClick:()=>Ea(void 0,null,function*(){var nn,sr;const kr=(nn=Bi==null?void 0:Bi.item_types)==null?void 0:nn.filter(yr=>{var lr,Mi;return((lr=yr.contents)==null?void 0:lr.length)>0||((Mi=yr==null?void 0:yr.item_banks)==null?void 0:Mi.length)>0});if(!((sr=Bi.item_types)!=null&&sr.length)){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((kr==null?void 0:kr.length)===0){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}yield en(!0,Or),xa()})},"\u8BD5\u5377\u9884\u89C8"),Go.createElement(Rs.Z,{type:"primary",className:Yn.confirmBtn,onClick:()=>en()},Go.createElement("i",{className:"iconfont icon-baocun1 mr5"}),"\u4FDD\u5B58\u8BD5\u5377")),!!(qr!=null&&qr.categoryId)&&Go.createElement("div",{className:Yn.fixedBottom,style:{justifyContent:((Ua=Bi==null?void 0:Bi.exercise)==null?void 0:Ua.exercise_status)!==1?"end":"center"}},Go.createElement(Rs.Z,{className:`${Yn.previewBtn} mr20`,onClick:()=>Ea(void 0,null,function*(){var nn,sr;document.body.scrollIntoView(),Ve.history.push(`/classrooms/${qr.coursesId}/exercise/${(nn=Bi==null?void 0:Bi.exercise)==null?void 0:nn.id}/detail?random=${(sr=Bi==null?void 0:Bi.exercise)==null?void 0:sr.is_random}`)})},"\u8FD4\u56DE"),((Ka=Bi==null?void 0:Bi.exercise)==null?void 0:Ka.exercise_status)===1&&Go.createElement(Rs.Z,{className:`${Yn.previewBtn} mr20`,onClick:tt},"\u6A21\u62DF\u8003\u8BD5"),(Bi==null?void 0:Bi.exercise.exercise_status)===1&&Go.createElement(Rs.Z,{type:"primary",className:Yn.confirmBtn,onClick:()=>Xt()},"\u63D0\u4EA4")),Go.createElement(Wi,{open:ra==="questionType",onCancel:()=>Ao(""),onOk:nn=>Ea(void 0,null,function*(){var sr,kr;const yr=[],lr=Ne(Bi,{type:"setQuestionType",payload:nn}),Mi=((sr=lr==null?void 0:lr.item_types)==null?void 0:sr.map(wr=>wr.item_type))||[];for(const wr of((kr=Bi==null?void 0:Bi.item_types)==null?void 0:kr.map(to=>to.item_type))||[])Mi.includes(wr)||yr.push(wr);qr.id&&yr.length>0&&(yield Mt(qr.id,{item_type:yr})).status!==0||(eo({type:"setQuestionType",payload:nn}),Aa(Or||lr.item_types[0].item_type),Ao(""))})}),Go.createElement(hr,{open:ra==="setScore",onCancel:()=>{Ao("")},onOk:nn=>Ea(void 0,null,function*(){console.log("---newData",nn);const sr=nn.item_types.map(kr=>({item_type:kr.item_type,score:kr.score}));qr.id?(yield ht(qr.id,{score_settings:sr})).status===0&&eo({type:"init",payload:nn}):(yield Ze(qr.categoryId,{score_settings:sr})).status===0&&eo({type:"init",payload:nn}),Ao("")})}),Go.createElement(Ji,{open:ra==="rule",onCancel:()=>Ao(""),currentItemType:Or,setVisibleModalType:Ao}),No.get("type")==="settings"&&Go.createElement(_o,{open:ra==="selectShixun",onCancel:()=>Ao(""),onOk:nn=>{if(console.log(nn),(nn==null?void 0:nn.length)<=0){He.ZP.info("\u5B9E\u8BAD\u6570\u4E0D\u80FD\u4E3A0");return}eo({type:"addShixun",payload:{shixunList:[...nn]}}),Ao("")}}))},ks=me(78978),os=me(59301),ll=Object.defineProperty,zl=Object.defineProperties,ou=Object.getOwnPropertyDescriptors,Qi=Object.getOwnPropertySymbols,Ss=Object.prototype.hasOwnProperty,Us=Object.prototype.propertyIsEnumerable,Vl=(En,Nn,ri)=>Nn in En?ll(En,Nn,{enumerable:!0,configurable:!0,writable:!0,value:ri}):En[Nn]=ri,Tl=(En,Nn)=>{for(var ri in Nn||(Nn={}))Ss.call(Nn,ri)&&Vl(En,ri,Nn[ri]);if(Qi)for(var ri of Qi(Nn))Us.call(Nn,ri)&&Vl(En,ri,Nn[ri]);return En},Ul=(En,Nn)=>zl(En,ou(Nn)),Io=(En,Nn,ri)=>new Promise((qi,$i)=>{var ki=Li=>{try{ii(ri.next(Li))}catch(ur){$i(ur)}},Ri=Li=>{try{ii(ri.throw(Li))}catch(ur){$i(ur)}},ii=Li=>Li.done?qi(Li.value):Promise.resolve(Li.value).then(ki,Ri);ii((ri=ri.apply(En,Nn)).next())}),Zl=()=>{var En,Nn,ri,qi;const[$i,ki]=(0,le.useState)("baseInfo"),Ri=(0,Ve.useDispatch)();(0,le.useEffect)(()=>{Ri({type:"globalSetting/footerToggle",payload:!1})},[]);const ii=(0,Ve.useParams)(),Li=!!(ii.id||ii.categoryId),[ur]=(0,Ve.useSearchParams)();(0,le.useEffect)(()=>{ur.get("type")==="settings"&&ki("settings")},[]);const[Zr,ga]=(0,le.useReducer)(Ne,null),[Uo,Ua]=(0,le.useState)(!1),Ka=()=>Io(void 0,null,function*(){Ua(!0);let Or;ii.categoryId?Or=yield Wt(ii):Or=yield Be(ii.id),Ua(!1),Or.status===0&&ga({type:"init",payload:Or})});(0,le.useEffect)(()=>{Li?Ka():ga({type:"init",payload:{examination_bank:{difficulty:2}}})},[ii]);const[No,qr]=(0,le.useState)(""),Bi=(Or,Aa)=>Io(void 0,null,function*(){var Ha,La,gl,xu;const en=(Ha=Zr==null?void 0:Zr.item_types)==null?void 0:Ha.filter(tt=>{var nn;return((nn=tt==null?void 0:tt.item_type)==null?void 0:nn.toUpperCase())===(Aa==null?void 0:Aa.type)}),Xt={sort_by_item_type:Zr.sort_by_item_type,difficulty:Zr.examination_bank.difficulty,exam_notes:Zr.examination_bank.exam_notes,name:Zr.examination_bank.name,time:Zr.examination_bank.time,item_types:Zr.item_types};if(Or!==void 0&&!(Or!=null&&Or.single_question_id)){Xt.seleted_item_bank_ids=Or==null?void 0:Or.seleted_item_bank_ids,Xt.item_types=en;const tt=yield Pt(Xt);if((tt==null?void 0:tt.status)===0){let nn=(0,qe.cloneDeep)(bo.data);nn.questionList=(La=nn==null?void 0:nn.questionList)==null?void 0:La.map(sr=>{var kr;return sr.type===Aa.type?Ul(Tl({},sr),{questions:((kr=tt==null?void 0:tt.questions)==null?void 0:kr.questions)||[]}):sr}),ra({show:!0,data:nn})}return}if(Or!==void 0&&(Or!=null&&Or.single_question_id)){Xt.seleted_item_bank_ids=Or==null?void 0:Or.seleted_item_bank_ids,Xt.single_question_id=Or==null?void 0:Or.single_question_id,Xt.item_types=en;const tt=yield Pt(Xt);if((tt==null?void 0:tt.status)===0){let nn=(0,qe.cloneDeep)(bo.data);nn.questionList=(gl=nn==null?void 0:nn.questionList)==null?void 0:gl.map(sr=>{var kr,yr;if(sr.type===Aa.type){const lr=(0,qe.cloneDeep)(sr==null?void 0:sr.questions);return lr.splice(Aa.index,1,(yr=(kr=tt==null?void 0:tt.questions)==null?void 0:kr.questions)==null?void 0:yr[0]),console.log(sr==null?void 0:sr.questions,lr,Aa.index,"new_questions"),Ul(Tl({},sr),{questions:lr})}return sr}),ra({show:!0,data:nn})}return}const On=yield Ot(Xt);if((On==null?void 0:On.status)===0){const tt=(0,xo.ad)(On);let nn=[];(xu=Zr==null?void 0:Zr.item_types)==null||xu.forEach(sr=>{var kr;const yr=(kr=tt==null?void 0:tt.questionList)==null?void 0:kr.find(lr=>sr.item_type===lr.type);nn.push(yr)}),console.log(Zr,"sortList"),nn=(0,qe.compact)(nn),tt.questionList=nn,ra({show:!0,data:tt}),qr(new Date)}}),eo=Or=>{var Aa;let Ha=(0,qe.cloneDeep)(bo.data);Ha.questionList=(Aa=Ha==null?void 0:Ha.questionList)==null?void 0:Aa.map(La=>La.type===Or.type?Ul(Tl({},La),{questions_score:Or.scoreTotal}):La),ga({type:"changeQuestionScore",payload:{score:Or.score,itemType:Or.type}}),ra({show:!0,data:Ha})},Yo=Or=>Io(void 0,null,function*(){const Aa={sort_by_item_type:Zr.sort_by_item_type,difficulty:Zr.examination_bank.difficulty,exam_notes:Zr.examination_bank.exam_notes,name:Zr.examination_bank.name,time:Zr.examination_bank.time,item_types:Zr.item_types,sub_discipline_id:Zr.examination_bank.sub_discipline_id};if(Or){(yield Dt(Tl(Tl({},Aa),Or))).status===0&&He.ZP.success("\u4FDD\u5B58\u6210\u529F");return}(yield je(ii.id,Aa)).status===0&&(He.ZP.success("\u63D0\u4EA4\u6210\u529F"),Ve.history.push("/paperlibrary?defaultActiveKey=0"))}),ma=(0,Ro.g)(),[xa]=lt.default.useForm(),[bo,ra]=(0,le.useState)({show:!1,data:{}}),Ao=!!((En=Zr==null?void 0:Zr.exercise)!=null&&En.exercise_status)&&((Nn=Zr==null?void 0:Zr.exercise)==null?void 0:Nn.exercise_status)!==1;return os.createElement(St.Provider,{value:{data:Zr,disabled:Ao,dispatch:ga,setPreview:ra,getData:Ka,handlePreview:Bi}},bo.show?os.createElement(ks.Z,{key:No,data:bo.data,onExchange:Bi,onTypeScore:eo,submit:Yo,goBack:()=>ra({show:!1,data:{}})}):os.createElement("div",{className:Te.wrapper},os.createElement("div",{className:"edu-container"},os.createElement(We.Z,{className:Te.breadCrumbWrapper,separator:">",items:ii!=null&&ii.categoryId?[{title:os.createElement(Ve.Link,{to:`/classrooms/${ii.coursesId}/exercise`},(qi=(ri=(0,Bn.eY)())==null?void 0:ri.course)==null?void 0:qi.course_name)},{title:os.createElement(Ve.Link,{to:`/classrooms/${ii.coursesId}/exercise`},"\u8BD5\u5377\u5217\u8868")},{title:"\u7F16\u8F91\u8BD5\u5377"}]:[{title:os.createElement(Ve.Link,{to:"/paperlibrary"},"\u8BD5\u5377\u5E93")},{title:"\u968F\u673A\u7EC4\u5377"}]}),os.createElement(Le.d4,{activeKey:$i,tabs:[{key:"baseInfo",label:"\u8BD5\u5377\u57FA\u7840\u4FE1\u606F"},{key:"settings",label:"\u7EC4\u5377\u914D\u7F6E"}],onChange:Or=>Io(void 0,null,function*(){if(Or==="settings"&&(yield xa.validateFields(),!Li)){const Aa=yield _e(Zr);Aa.status===0&&Ve.history.replace(`/randompaper/edit/${Aa==null?void 0:Aa.examination_bank_id}?type=settings`)}ki(Or)})}),$i==="baseInfo"&&os.createElement(Rn,{courseOptions:ma,setCurrentKey:ki,loading:Uo,form:xa}),os.createElement("div",{style:{display:$i==="settings"?"block":"none"}},Zr&&os.createElement(pr,null)))))}},66231:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ue}});var le=me(43418),Te={ul:"ul___TdfYY"},He=me(32637),lt=me(59301),We=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Ct=(bt,at)=>{var mt={};for(var Oe in bt)Ve.call(bt,Oe)&&at.indexOf(Oe)<0&&(mt[Oe]=bt[Oe]);if(bt!=null&&We)for(var Oe of We(bt))at.indexOf(Oe)<0&&Le.call(bt,Oe)&&(mt[Oe]=bt[Oe]);return mt},Ue=bt=>{var at=bt,{open:mt,onCancel:Oe}=at,te=Ct(at,["open","onCancel"]);return lt.createElement(le.default,{centered:!0,open:mt,title:lt.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:Oe,footer:null},lt.createElement("div",null,lt.createElement("div",{className:"tc"},lt.createElement("img",{className:"mt10",src:He,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),lt.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),lt.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),lt.createElement("div",{style:{color:"#333"},className:"pt30 font14"},lt.createElement("ul",{className:Te.ul},lt.createElement("li",null,"1\u3001\u89E3\u7B54\u8001\u5E08\u7591\u60D1\u3001\u5E2E\u52A9\u8001\u5E08\u66F4\u5FEB\u719F\u6089\u548C\u4F7F\u7528\u5E73\u53F0\u6559\u5B66\u3002"),lt.createElement("li",null,"2\u3001\u534F\u52A9\u8001\u5E08\u521B\u5EFA\u8BFE\u5802\u3001\u8BFE\u7A0B\u8BBE\u8BA1\u3001\u505A\u597D\u6559\u5B66\u5DE5\u4F5C\u3002"),lt.createElement("li",null,"3\u3001\u6839\u636E\u8001\u5E08\u6559\u5B66\u65B9\u5411\uFF0C\u5206\u4EAB\u5934\u6B4C\u5E73\u53F0C9\u9662\u6821\u3001985\u9AD8\u6821\u3001211\u9AD8\u6821\u3001\u53CC\u4E00\u6D41\u9AD8\u6821\u8001\u5E08\u7ECF\u5178\u5B9E\u8DF5\u6559\u5B66\u6848\u4F8B\u3002")))))}},38389:function(Tn,xn,me){"use strict";me.d(xn,{g:function(){return We}});var le=me(59301),Te=me(83609),He=me(73802),lt=(Ve,Le,Ct)=>new Promise((xt,Ue)=>{var bt=Oe=>{try{mt(Ct.next(Oe))}catch(te){Ue(te)}},at=Oe=>{try{mt(Ct.throw(Oe))}catch(te){Ue(te)}},mt=Oe=>Oe.done?xt(Oe.value):Promise.resolve(Oe.value).then(bt,at);mt((Ct=Ct.apply(Ve,Le)).next())});const We=()=>{const[Ve,Le]=(0,le.useState)([]);return(0,le.useEffect)(()=>{lt(void 0,null,function*(){const xt=yield(0,Te.d1)({source:"question"});xt!=null&&xt.disciplines&&Le((0,He.L)(xt==null?void 0:xt.disciplines))})},[]),Ve}},59579:function(Tn,xn,me){"use strict";me.d(xn,{U:function(){return xt}});var le=me(59301),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ve=(Ue,bt,at)=>bt in Ue?Te(Ue,bt,{enumerable:!0,configurable:!0,writable:!0,value:at}):Ue[bt]=at,Le=(Ue,bt)=>{for(var at in bt||(bt={}))lt.call(bt,at)&&Ve(Ue,at,bt[at]);if(He)for(var at of He(bt))We.call(bt,at)&&Ve(Ue,at,bt[at]);return Ue},Ct=(Ue,bt,at)=>new Promise((mt,Oe)=>{var te=se=>{try{de(at.next(se))}catch(he){Oe(he)}},ee=se=>{try{de(at.throw(se))}catch(he){Oe(he)}},de=se=>se.done?mt(se.value):Promise.resolve(se.value).then(te,ee);de((at=at.apply(Ue,bt)).next())});function xt(Ue,bt){const[at,mt]=(0,le.useState)(bt),[Oe,te]=(0,le.useState)(!1),[ee,de]=(0,le.useState)();return[at,Oe,(he,ve=!1)=>Ct(this,null,function*(){const Ee=ve?bt:Le(Le({},at),he);te(!0),mt(Ee);const Me=yield Ue(Ee);return te(!1),de(Me),Me}),ee]}},85187:function(Tn,xn,me){"use strict";me.d(xn,{AL:function(){return Ee},Iy:function(){return bt},Qv:function(){return Oe},ez:function(){return ve},jb:function(){return at}});var le=me(32834),Te=me.n(le),He=me(11690),lt=me.n(He);let We=1;function Ve(Je,Xe){const ht=Je.match(/^(\s+)(?:```)/);if(ht===null)return Xe;const Ze=ht[1];return Xe.split(`
|
|
|
`).map(Mt=>{const ot=Mt.match(/^\s+/);if(ot===null)return Mt;const[Ot]=ot;return Ot.length>=Ze.length?Mt.slice(Ze.length):Mt}).join(`
|
|
|
`)}let Le=[],Ct=["<ul>"];const xt=new(Te()).Renderer,Ue=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function bt(){Le.length=0,Ct=["<ul>"]}const at={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function mt(Je,Xe,ht,Ze){if(Xe>=Je.length||Je[Xe].level<=ht)return Xe;var Mt=Je[Xe];Ze.push("<li><a href='#"+We+Mt.anchor+"'>"+Mt.text+"</a>"),Xe++;var ot=[];return Xe=mt(Je,Xe,Mt.level,ot),ot.length>0&&(Ze.push("<ul>"),ot.forEach(function(Ot){Ze.push(Ot)}),Ze.push("</ul>")),Ze.push("</li>"),Xe=mt(Je,Xe,ht,Ze),Xe}function Oe(){return mt(Le,0,0,Ct),Ct.push("</ul>"),Ct.join("")}const te={heading(Je){const Xe=Ue.exec(Je);if(We+=1,Xe)return{type:"heading",raw:Xe[0],depth:Xe[1].length,text:Xe[2]}},fences(Je){const Xe=this.rules.block.fences.exec(Je);if(Xe){const ht=Xe[0];let Ze=Ve(ht,Xe[3]||"");const Mt=Xe[2]?Xe[2].trim():Xe[2];if(["latex","katex","math"].indexOf(Mt)>=0){const ot=se(),Ot=Ze;Ze=ot,he[ot]={type:"block",expression:Ot}}return{type:"code",raw:ht,lang:Mt,text:Ze}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let de=0;const se=()=>`__special_katext_id_${de++}__`;let he={};function ve(){return he}function Ee(){de=0,he={}}function Me(Je){return Je=Je.replace(ee,(Xe,ht)=>{const Ze=se();return he[Ze]={type:"inline",expression:ht},Ze}),Je}const Be=xt.listitem;xt.listitem=function(Je){return Be(Me(Je))};const je=xt.paragraph;xt.paragraph=function(Je){return je(Me(Je))};const _e=xt.tablecell;xt.tablecell=function(Je,Xe){return _e(Me(Je),Xe)},xt.code=function(Je,Xe,ht){const Ze=(Xe||"").match(/\S*/)[0];return Ze?["latex","katex","math"].indexOf(Ze)>=0?`<p class='editormd-tex'>${Je}</p>`:`<pre class="prettyprint linenums"><code class="language-${Xe}">${ht?Je:(0,He.escape)(Je,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(ht?Je:(0,He.escape)(Je,!0))+"</code></pre>"},xt.heading=function(Je,Xe,ht){let Ze=this.options.headerPrefix+ht.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Le.push({anchor:Ze,level:Xe,text:Je}),"<h"+Xe+' id="'+We+Ze+'">'+Je+"</h"+Xe+">"},Te().setOptions({silent:!0,gfm:!0,pedantic:!1}),Te().use({tokenizer:te,renderer:xt}),xn.ZP=Te()},50371:function(Tn,xn){"use strict";function me(){const le=Object.assign({},arguments.length<=0?void 0:arguments[0]);for(let Te=1;Te<arguments.length;Te++){const He=Te<0||arguments.length<=Te?void 0:arguments[Te];He&&Object.keys(He).forEach(lt=>{const We=He[lt];We!==void 0&&(le[lt]=We)})}return le}xn.Z=me},77578:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return le}});const le=Te=>Te?typeof Te=="function"?Te():Te:null},13845:function(Tn,xn,me){"use strict";me.d(xn,{F:function(){return le},Z:function(){return Te}});function le(He){return He!=null&&He===He.window}function Te(He,lt){var We,Ve;if(typeof window=="undefined")return 0;const Le=lt?"scrollTop":"scrollLeft";let Ct=0;return le(He)?Ct=He[lt?"pageYOffset":"pageXOffset"]:He instanceof Document?Ct=He.documentElement[Le]:(He instanceof HTMLElement||He)&&(Ct=He[Le]),He&&!le(He)&&typeof Ct!="number"&&(Ct=(Ve=((We=He.ownerDocument)!==null&&We!==void 0?We:He).documentElement)===null||Ve===void 0?void 0:Ve[Le]),Ct}},56762:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Te}});var le=me(59301);function Te(){const[,He]=le.useReducer(lt=>lt+1,0);return He}},68031:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return lt}});var le=me(16089);function Te(We,Ve,Le,Ct){const xt=Le-Ve;return We/=Ct/2,We<1?xt/2*We*We*We+Ve:xt/2*((We-=2)*We*We+2)+Ve}var He=me(13845);function lt(We){let Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Le=()=>window,callback:Ct,duration:xt=450}=Ve,Ue=Le(),bt=(0,He.Z)(Ue,!0),at=Date.now(),mt=()=>{const te=Date.now()-at,ee=Te(te>xt?xt:te,bt,We,xt);(0,He.F)(Ue)?Ue.scrollTo(window.pageXOffset,ee):Ue instanceof Document||Ue.constructor.name==="HTMLDocument"?Ue.documentElement.scrollTop=ee:Ue.scrollTop=ee,te<xt?(0,le.Z)(mt):typeof Ct=="function"&&Ct()};(0,le.Z)(mt)}},66104:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ot}});var le=me(92310),Te=me.n(le),He=me(11592),lt=me(26112),We=me(59301),Ve=me(92343),Le=me(36355),Ct=me(84105),xt=me(91857);const Ue=Pt=>{let{children:Dt}=Pt;const{getPrefixCls:Wt}=We.useContext(Le.E_),Lt=Wt("breadcrumb");return We.createElement("li",{className:`${Lt}-separator`,"aria-hidden":"true"},Dt===""?Dt:Dt||"/")};Ue.__ANT_BREADCRUMB_SEPARATOR=!0;var bt=Ue,at=function(Pt,Dt){var Wt={};for(var Lt in Pt)Object.prototype.hasOwnProperty.call(Pt,Lt)&&Dt.indexOf(Lt)<0&&(Wt[Lt]=Pt[Lt]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Lt=Object.getOwnPropertySymbols(Pt);qe<Lt.length;qe++)Dt.indexOf(Lt[qe])<0&&Object.prototype.propertyIsEnumerable.call(Pt,Lt[qe])&&(Wt[Lt[qe]]=Pt[Lt[qe]]);return Wt};function mt(Pt,Dt){if(Pt.title===void 0||Pt.title===null)return null;const Wt=Object.keys(Dt).join("|");return typeof Pt.title=="object"?Pt.title:String(Pt.title).replace(new RegExp(`:(${Wt})`,"g"),(Lt,qe)=>Dt[qe]||Lt)}function Oe(Pt,Dt,Wt,Lt){if(Wt==null)return null;const{className:qe,onClick:Ke}=Dt,Rt=at(Dt,["className","onClick"]),Sn=Object.assign(Object.assign({},(0,lt.Z)(Rt,{data:!0,aria:!0})),{onClick:Ke});return Lt!==void 0?We.createElement("a",Object.assign({},Sn,{className:Te()(`${Pt}-link`,qe),href:Lt}),Wt):We.createElement("span",Object.assign({},Sn,{className:Te()(`${Pt}-link`,qe)}),Wt)}function te(Pt,Dt){return(Lt,qe,Ke,Rt,Sn)=>{if(Dt)return Dt(Lt,qe,Ke,Rt);const Pn=mt(Lt,qe);return Oe(Pt,Lt,Pn,Sn)}}var ee=function(Pt,Dt){var Wt={};for(var Lt in Pt)Object.prototype.hasOwnProperty.call(Pt,Lt)&&Dt.indexOf(Lt)<0&&(Wt[Lt]=Pt[Lt]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Lt=Object.getOwnPropertySymbols(Pt);qe<Lt.length;qe++)Dt.indexOf(Lt[qe])<0&&Object.prototype.propertyIsEnumerable.call(Pt,Lt[qe])&&(Wt[Lt[qe]]=Pt[Lt[qe]]);return Wt};const de=Pt=>{const{prefixCls:Dt,separator:Wt="/",children:Lt,menu:qe,overlay:Ke,dropdownProps:Rt,href:Sn}=Pt,_t=(rn=>{if(qe||Ke){const ln=Object.assign({},Rt);if(qe){const Wn=qe||{},{items:un}=Wn,_n=ee(Wn,["items"]);ln.menu=Object.assign(Object.assign({},_n),{items:un==null?void 0:un.map((St,Zn)=>{var{key:li,title:Ge,label:be,path:Pe}=St,Ae=ee(St,["key","title","label","path"]);let Ne=be!=null?be:Ge;return Pe&&(Ne=We.createElement("a",{href:`${Sn}${Pe}`},Ne)),Object.assign(Object.assign({},Ae),{key:li!=null?li:Zn,label:Ne})})})}else Ke&&(ln.overlay=Ke);return We.createElement(xt.Z,Object.assign({placement:"bottom"},ln),We.createElement("span",{className:`${Dt}-overlay-link`},rn,We.createElement(Ct.Z,null)))}return rn})(Lt);return _t!=null?We.createElement(We.Fragment,null,We.createElement("li",null,_t),Wt&&We.createElement(bt,null,Wt)):null},se=Pt=>{const{prefixCls:Dt,children:Wt,href:Lt}=Pt,qe=ee(Pt,["prefixCls","children","href"]),{getPrefixCls:Ke}=We.useContext(Le.E_),Rt=Ke("breadcrumb",Dt);return We.createElement(de,Object.assign({},qe,{prefixCls:Rt}),Oe(Rt,qe,Wt,Lt))};se.__ANT_BREADCRUMB_ITEM=!0;var he=se,ve=me(17313),Ee=me(83116),Me=me(37613);const Be=Pt=>{const{componentCls:Dt,iconCls:Wt}=Pt;return{[Dt]:Object.assign(Object.assign({},(0,ve.Wf)(Pt)),{color:Pt.itemColor,fontSize:Pt.fontSize,[Wt]:{fontSize:Pt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:Pt.linkColor,transition:`color ${Pt.motionDurationMid}`,padding:`0 ${Pt.paddingXXS}px`,borderRadius:Pt.borderRadiusSM,height:Pt.lineHeight*Pt.fontSize,display:"inline-block",marginInline:-Pt.marginXXS,"&:hover":{color:Pt.linkHoverColor,backgroundColor:Pt.colorBgTextHover}},(0,ve.Qy)(Pt)),"li:last-child":{color:Pt.lastItemColor},[`${Dt}-separator`]:{marginInline:Pt.separatorMargin,color:Pt.separatorColor},[`${Dt}-link`]:{[`
|
|
|
> ${Wt} + span,
|
|
|
> ${Wt} + a
|
|
|
`]:{marginInlineStart:Pt.marginXXS}},[`${Dt}-overlay-link`]:{borderRadius:Pt.borderRadiusSM,height:Pt.lineHeight*Pt.fontSize,display:"inline-block",padding:`0 ${Pt.paddingXXS}px`,marginInline:-Pt.marginXXS,[`> ${Wt}`]:{marginInlineStart:Pt.marginXXS,fontSize:Pt.fontSizeIcon},"&:hover":{color:Pt.linkHoverColor,backgroundColor:Pt.colorBgTextHover,a:{color:Pt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${Pt.componentCls}-rtl`]:{direction:"rtl"}})}};var je=(0,Ee.Z)("Breadcrumb",Pt=>{const Dt=(0,Me.TS)(Pt,{});return[Be(Dt)]},Pt=>({itemColor:Pt.colorTextDescription,lastItemColor:Pt.colorText,iconFontSize:Pt.fontSize,linkColor:Pt.colorTextDescription,linkHoverColor:Pt.colorText,separatorColor:Pt.colorTextDescription,separatorMargin:Pt.marginXS})),_e=function(Pt,Dt){var Wt={};for(var Lt in Pt)Object.prototype.hasOwnProperty.call(Pt,Lt)&&Dt.indexOf(Lt)<0&&(Wt[Lt]=Pt[Lt]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Lt=Object.getOwnPropertySymbols(Pt);qe<Lt.length;qe++)Dt.indexOf(Lt[qe])<0&&Object.prototype.propertyIsEnumerable.call(Pt,Lt[qe])&&(Wt[Lt[qe]]=Pt[Lt[qe]]);return Wt};function Je(Pt){const{breadcrumbName:Dt,children:Wt}=Pt,Lt=_e(Pt,["breadcrumbName","children"]),qe=Object.assign({title:Dt},Lt);return Wt&&(qe.menu={items:Wt.map(Ke=>{var{breadcrumbName:Rt}=Ke,Sn=_e(Ke,["breadcrumbName"]);return Object.assign(Object.assign({},Sn),{title:Rt})})}),qe}function Xe(Pt,Dt){return(0,We.useMemo)(()=>Pt||(Dt?Dt.map(Je):null),[Pt,Dt])}var ht=function(Pt,Dt){var Wt={};for(var Lt in Pt)Object.prototype.hasOwnProperty.call(Pt,Lt)&&Dt.indexOf(Lt)<0&&(Wt[Lt]=Pt[Lt]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,Lt=Object.getOwnPropertySymbols(Pt);qe<Lt.length;qe++)Dt.indexOf(Lt[qe])<0&&Object.prototype.propertyIsEnumerable.call(Pt,Lt[qe])&&(Wt[Lt[qe]]=Pt[Lt[qe]]);return Wt};const Ze=(Pt,Dt)=>{if(Dt===void 0)return Dt;let Wt=(Dt||"").replace(/^\//,"");return Object.keys(Pt).forEach(Lt=>{Wt=Wt.replace(`:${Lt}`,Pt[Lt])}),Wt},Mt=Pt=>{const{prefixCls:Dt,separator:Wt="/",style:Lt,className:qe,rootClassName:Ke,routes:Rt,items:Sn,children:Pn,itemRender:_t,params:rn={}}=Pt,ln=ht(Pt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Wn,direction:un,breadcrumb:_n}=We.useContext(Le.E_);let St;const Zn=Wn("breadcrumb",Dt),[li,Ge]=je(Zn),be=Xe(Sn,Rt),Pe=te(Zn,_t);if(be&&be.length>0){const xe=[],ut=Sn||Rt;St=be.map((Bt,Qe)=>{const{path:it,key:Ft,type:Nt,menu:dt,overlay:Kt,onClick:wn,className:sn,separator:qt,dropdownProps:Rn}=Bt,Vn=Ze(rn,it);Vn!==void 0&&xe.push(Vn);const hn=Ft!=null?Ft:Qe;if(Nt==="separator")return We.createElement(bt,{key:hn},qt);const Yn={},mi=Qe===be.length-1;dt?Yn.menu=dt:Kt&&(Yn.overlay=Kt);let{href:jn}=Bt;return xe.length&&Vn!==void 0&&(jn=`#/${xe.join("/")}`),We.createElement(de,Object.assign({key:hn},Yn,(0,lt.Z)(Bt,{data:!0,aria:!0}),{className:sn,dropdownProps:Rn,href:jn,separator:mi?"":Wt,onClick:wn,prefixCls:Zn}),Pe(Bt,rn,ut,xe,jn))})}else if(Pn){const xe=(0,He.Z)(Pn).length;St=(0,He.Z)(Pn).map((ut,Bt)=>{if(!ut)return ut;const Qe=Bt===xe-1;return(0,Ve.Tm)(ut,{separator:Qe?"":Wt,key:Bt})})}const Ae=Te()(Zn,_n==null?void 0:_n.className,{[`${Zn}-rtl`]:un==="rtl"},qe,Ke,Ge),Ne=Object.assign(Object.assign({},_n==null?void 0:_n.style),Lt);return li(We.createElement("nav",Object.assign({className:Ae,style:Ne},ln),We.createElement("ol",null,St)))};Mt.Item=he,Mt.Separator=bt;var ot=Mt,Ot=ot},19842:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Pr}});var le=me(26407),Te=me(59301),He=me(33853),lt=me(58617),We=me(38819),Ve=me(92310),Le=me.n(Ve),Ct=me(92413),xt=me(33606),Ue=me(37061),bt=me(77861),at=me(17115),mt=me(90782),Oe=me(6089),te=me(18929),ee=Te.createContext(null),de=ee,se=me(39559),he=me(400),ve=me(33708),Ee="__rc_cascader_search_mark__",Me=function(vi,Zi,er){var Gn=er.label;return Zi.some(function($t){return String($t[Gn]).toLowerCase().includes(vi.toLowerCase())})},Be=function(vi,Zi,er,Gn){return Zi.map(function($t){return $t[Gn.label]}).join(" / ")},je=function(Ln,vi,Zi,er,Gn,$t){var Gt=Gn.filter,Zt=Gt===void 0?Me:Gt,wt=Gn.render,vn=wt===void 0?Be:wt,cn=Gn.limit,It=cn===void 0?50:cn,ct=Gn.sort;return Te.useMemo(function(){var an=[];if(!Ln)return[];function dn(ei,pn){var zt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;ei.forEach(function(In){if(!(!ct&&It!==!1&&It>0&&an.length>=It)){var Qn=[].concat((0,le.Z)(pn),[In]),xi=In[Zi.children],tn=zt||In.disabled;if((!xi||xi.length===0||$t)&&Zt(Ln,Qn,{label:Zi.label})){var fn;an.push((0,ve.Z)((0,ve.Z)({},In),{},(fn={disabled:tn},(0,he.Z)(fn,Zi.label,vn(Ln,Qn,er,Zi)),(0,he.Z)(fn,Ee,Qn),(0,he.Z)(fn,Zi.children,void 0),fn)))}xi&&dn(In[Zi.children],Qn,tn)}})}return dn(vi,[]),ct&&an.sort(function(ei,pn){return ct(ei[Ee],pn[Ee],Ln,Zi)}),It!==!1&&It>0?an.slice(0,It):an},[Ln,vi,Zi,er,vn,$t,Zt,ct,It])},_e="__RC_CASCADER_SPLIT__",Je="SHOW_PARENT",Xe="SHOW_CHILD";function ht(Ln){return Ln.join(_e)}function Ze(Ln){return Ln.map(ht)}function Mt(Ln){return Ln.split(_e)}function ot(Ln){var vi=Ln||{},Zi=vi.label,er=vi.value,Gn=vi.children,$t=er||"value";return{label:Zi||"label",value:$t,key:$t,children:Gn||"children"}}function Ot(Ln,vi){var Zi,er;return(Zi=Ln.isLeaf)!==null&&Zi!==void 0?Zi:!((er=Ln[vi.children])!==null&&er!==void 0&&er.length)}function Pt(Ln){var vi=Ln.parentElement;if(vi){var Zi=Ln.offsetTop-vi.offsetTop;Zi-vi.scrollTop<0?vi.scrollTo({top:Zi}):Zi+Ln.offsetHeight-vi.scrollTop>vi.offsetHeight&&vi.scrollTo({top:Zi+Ln.offsetHeight-vi.offsetHeight})}}function Dt(Ln,vi){return Ln.map(function(Zi){var er;return(er=Zi[Ee])===null||er===void 0?void 0:er.map(function(Gn){return Gn[vi.value]})})}function Wt(Ln,vi,Zi){var er=new Set(Ln),Gn=vi();return Ln.filter(function($t){var Gt=Gn[$t],Zt=Gt?Gt.parent:null,wt=Gt?Gt.children:null;return Gt&&Gt.node.disabled?!0:Zi===Xe?!(wt&&wt.some(function(vn){return vn.key&&er.has(vn.key)})):!(Zt&&!Zt.node.disabled&&er.has(Zt.key))})}function Lt(Ln,vi,Zi){for(var er=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Gn=vi,$t=[],Gt=function(){var vn,cn,It,ct=Ln[Zt],an=(vn=Gn)===null||vn===void 0?void 0:vn.findIndex(function(ei){var pn=ei[Zi.value];return er?String(pn)===String(ct):pn===ct}),dn=an!==-1?(cn=Gn)===null||cn===void 0?void 0:cn[an]:null;$t.push({value:(It=dn==null?void 0:dn[Zi.value])!==null&&It!==void 0?It:ct,index:an,option:dn}),Gn=dn==null?void 0:dn[Zi.children]},Zt=0;Zt<Ln.length;Zt+=1)Gt();return $t}var qe=function(Ln,vi,Zi,er,Gn){return Te.useMemo(function(){var $t=Gn||function(Gt){var Zt=er?Gt.slice(-1):Gt,wt=" / ";return Zt.every(function(vn){return["string","number"].includes((0,se.Z)(vn))})?Zt.join(wt):Zt.reduce(function(vn,cn,It){var ct=Te.isValidElement(cn)?Te.cloneElement(cn,{key:It}):cn;return It===0?[ct]:[].concat((0,le.Z)(vn),[wt,ct])},[])};return Ln.map(function(Gt){var Zt,wt,vn=Lt(Gt,vi,Zi),cn=$t(vn.map(function(ct){var an,dn=ct.option,ei=ct.value;return(an=dn==null?void 0:dn[Zi.label])!==null&&an!==void 0?an:ei}),vn.map(function(ct){var an=ct.option;return an})),It=ht(Gt);return{label:cn,value:It,key:It,valueCells:Gt,disabled:(Zt=vn[vn.length-1])===null||Zt===void 0||(wt=Zt.option)===null||wt===void 0?void 0:wt.disabled}})},[Ln,vi,Zi,Gn,er])},Ke=me(71430),Rt=function(Ln,vi){var Zi=Te.useRef({options:null,info:null}),er=Te.useCallback(function(){return Zi.current.options!==Ln&&(Zi.current.options=Ln,Zi.current.info=(0,Ke.I8)(Ln,{fieldNames:vi,initWrapper:function($t){return(0,ve.Z)((0,ve.Z)({},$t),{},{pathKeyEntities:{}})},processEntity:function($t,Gt){var Zt=$t.nodes.map(function(wt){return wt[vi.value]}).join(_e);Gt.pathKeyEntities[Zt]=$t,$t.key=Zt}})),Zi.current.info.pathKeyEntities},[vi,Ln]);return er},Sn=function(Ln,vi){return Te.useCallback(function(Zi){var er=[],Gn=[];return Zi.forEach(function($t){var Gt=Lt($t,Ln,vi);Gt.every(function(Zt){return Zt.option})?Gn.push($t):er.push($t)}),[Gn,er]},[Ln,vi])},Pn=me(48736);function _t(Ln){return Te.useMemo(function(){if(!Ln)return[!1,{}];var vi={matchInputWidth:!0,limit:50};return Ln&&(0,se.Z)(Ln)==="object"&&(vi=(0,ve.Z)((0,ve.Z)({},vi),Ln)),vi.limit<=0&&delete vi.limit,[!0,vi]},[Ln])}var rn=Te.memo(function(Ln){var vi=Ln.children;return vi},function(Ln,vi){return!vi.open}),ln=rn;function Wn(Ln){var vi,Zi=Ln.prefixCls,er=Ln.checked,Gn=Ln.halfChecked,$t=Ln.disabled,Gt=Ln.onClick,Zt=Ln.disableCheckbox,wt=Te.useContext(de),vn=wt.checkable,cn=typeof vn!="boolean"?vn:null;return Te.createElement("span",{className:Le()("".concat(Zi),(vi={},(0,he.Z)(vi,"".concat(Zi,"-checked"),er),(0,he.Z)(vi,"".concat(Zi,"-indeterminate"),!er&&Gn),(0,he.Z)(vi,"".concat(Zi,"-disabled"),$t||Zt),vi)),onClick:Gt},cn)}var un="__cascader_fix_label__";function _n(Ln){var vi=Ln.prefixCls,Zi=Ln.multiple,er=Ln.options,Gn=Ln.activeValue,$t=Ln.prevValuePath,Gt=Ln.onToggleOpen,Zt=Ln.onSelect,wt=Ln.onActive,vn=Ln.checkedSet,cn=Ln.halfCheckedSet,It=Ln.loadingKeys,ct=Ln.isSelectable,an=Ln.searchValue,dn="".concat(vi,"-menu"),ei="".concat(vi,"-menu-item"),pn=Te.useContext(de),zt=pn.fieldNames,In=pn.changeOnSelect,Qn=pn.expandTrigger,xi=pn.expandIcon,tn=pn.loadingIcon,fn=pn.dropdownMenuColumnStyle,kn=Qn==="hover",zi=Te.useMemo(function(){return er.map(function(Di){var Si,Fi=Di.disabled,Ti=Di.disableCheckbox,nr=Di[Ee],$r=(Si=Di[un])!==null&&Si!==void 0?Si:Di[zt.label],ci=Di[zt.value],Ki=Ot(Di,zt),Yr=nr?nr.map(function(mr){return mr[zt.value]}):[].concat((0,le.Z)($t),[ci]),Qr=ht(Yr),Cr=It.includes(Qr),Jt=vn.has(Qr),gi=cn.has(Qr);return{disabled:Fi,label:$r,value:ci,isLeaf:Ki,isLoading:Cr,checked:Jt,halfChecked:gi,option:Di,disableCheckbox:Ti,fullPath:Yr,fullPathKey:Qr}})},[er,vn,zt,cn,It,$t]);return Te.createElement("ul",{className:dn,role:"menu"},zi.map(function(Di){var Si,Fi=Di.disabled,Ti=Di.label,nr=Di.value,$r=Di.isLeaf,ci=Di.isLoading,Ki=Di.checked,Yr=Di.halfChecked,Qr=Di.option,Cr=Di.fullPath,Jt=Di.fullPathKey,gi=Di.disableCheckbox,mr=function(){if(!(Fi||an)){var lo=(0,le.Z)(Cr);kn&&$r&&lo.pop(),wt(lo)}},tr=function(){ct(Qr)&&Zt(Cr,$r)},Hr;return typeof Qr.title=="string"?Hr=Qr.title:typeof Ti=="string"&&(Hr=Ti),Te.createElement("li",{key:Jt,className:Le()(ei,(Si={},(0,he.Z)(Si,"".concat(ei,"-expand"),!$r),(0,he.Z)(Si,"".concat(ei,"-active"),Gn===nr||Gn===Jt),(0,he.Z)(Si,"".concat(ei,"-disabled"),Fi),(0,he.Z)(Si,"".concat(ei,"-loading"),ci),Si)),style:fn,role:"menuitemcheckbox",title:Hr,"aria-checked":Ki,"data-path-key":Jt,onClick:function(){mr(),!gi&&(!Zi||$r)&&tr()},onDoubleClick:function(){In&&Gt(!1)},onMouseEnter:function(){kn&&mr()},onMouseDown:function(lo){lo.preventDefault()}},Zi&&Te.createElement(Wn,{prefixCls:"".concat(vi,"-checkbox"),checked:Ki,halfChecked:Yr,disabled:Fi||gi,disableCheckbox:gi,onClick:function(lo){gi||(lo.stopPropagation(),tr())}}),Te.createElement("div",{className:"".concat(ei,"-content")},Ti),!ci&&xi&&!$r&&Te.createElement("div",{className:"".concat(ei,"-expand-icon")},xi),ci&&tn&&Te.createElement("div",{className:"".concat(ei,"-loading-icon")},tn))}))}var St=function(){var Ln=(0,bt.lk)(),vi=Ln.multiple,Zi=Ln.open,er=Te.useContext(de),Gn=er.values,$t=Te.useState([]),Gt=(0,xt.Z)($t,2),Zt=Gt[0],wt=Gt[1];return Te.useEffect(function(){if(Zi&&!vi){var vn=Gn[0];wt(vn||[])}},[Zi]),[Zt,wt]},Zn=me(10228),li=function(Ln,vi,Zi,er,Gn,$t){var Gt=(0,bt.lk)(),Zt=Gt.direction,wt=Gt.searchValue,vn=Gt.toggleOpen,cn=Gt.open,It=Zt==="rtl",ct=Te.useMemo(function(){for(var fn=-1,kn=vi,zi=[],Di=[],Si=er.length,Fi=Dt(vi,Zi),Ti=function(Qr){var Cr=kn.findIndex(function(Jt,gi){return(Fi[gi]?ht(Fi[gi]):Jt[Zi.value])===er[Qr]});if(Cr===-1)return"break";fn=Cr,zi.push(fn),Di.push(er[Qr]),kn=kn[fn][Zi.children]},nr=0;nr<Si&&kn;nr+=1){var $r=Ti(nr);if($r==="break")break}for(var ci=vi,Ki=0;Ki<zi.length-1;Ki+=1)ci=ci[zi[Ki]][Zi.children];return[Di,fn,ci,Fi]},[er,Zi,vi]),an=(0,xt.Z)(ct,4),dn=an[0],ei=an[1],pn=an[2],zt=an[3],In=function(kn){Gn(kn)},Qn=function(kn){var zi=pn.length,Di=ei;Di===-1&&kn<0&&(Di=zi);for(var Si=0;Si<zi;Si+=1){Di=(Di+kn+zi)%zi;var Fi=pn[Di];if(Fi&&!Fi.disabled){var Ti=dn.slice(0,-1).concat(zt[Di]?ht(zt[Di]):Fi[Zi.value]);In(Ti);return}}},xi=function(){if(dn.length>1){var kn=dn.slice(0,-1);In(kn)}else vn(!1)},tn=function(){var kn,zi=((kn=pn[ei])===null||kn===void 0?void 0:kn[Zi.children])||[],Di=zi.find(function(Fi){return!Fi.disabled});if(Di){var Si=[].concat((0,le.Z)(dn),[Di[Zi.value]]);In(Si)}};Te.useImperativeHandle(Ln,function(){return{onKeyDown:function(kn){var zi=kn.which;switch(zi){case Zn.Z.UP:case Zn.Z.DOWN:{var Di=0;zi===Zn.Z.UP?Di=-1:zi===Zn.Z.DOWN&&(Di=1),Di!==0&&Qn(Di);break}case Zn.Z.LEFT:{if(wt)break;It?tn():xi();break}case Zn.Z.RIGHT:{if(wt)break;It?xi():tn();break}case Zn.Z.BACKSPACE:{wt||xi();break}case Zn.Z.ENTER:{if(dn.length){var Si=pn[ei],Fi=(Si==null?void 0:Si[Ee])||[];Fi.length?$t(Fi.map(function(Ti){return Ti[Zi.value]}),Fi[Fi.length-1]):$t(dn,pn[ei])}break}case Zn.Z.ESC:vn(!1),cn&&kn.stopPropagation()}},onKeyUp:function(){}}})},Ge=Te.forwardRef(function(Ln,vi){var Zi,er,Gn,$t,Gt=(0,bt.lk)(),Zt=Gt.prefixCls,wt=Gt.multiple,vn=Gt.searchValue,cn=Gt.toggleOpen,It=Gt.notFoundContent,ct=Gt.direction,an=Gt.open,dn=Te.useRef(),ei=ct==="rtl",pn=Te.useContext(de),zt=pn.options,In=pn.values,Qn=pn.halfValues,xi=pn.fieldNames,tn=pn.changeOnSelect,fn=pn.onSelect,kn=pn.searchOptions,zi=pn.dropdownPrefixCls,Di=pn.loadData,Si=pn.expandTrigger,Fi=zi||Zt,Ti=Te.useState([]),nr=(0,xt.Z)(Ti,2),$r=nr[0],ci=nr[1],Ki=function(Ji){if(!(!Di||vn)){var la=Lt(Ji,zt,xi),Ro=la.map(function(xo){var Wo=xo.option;return Wo}),Nr=Ro[Ro.length-1];if(Nr&&!Ot(Nr,xi)){var Ar=ht(Ji);ci(function(xo){return[].concat((0,le.Z)(xo),[Ar])}),Di(Ro)}}};Te.useEffect(function(){$r.length&&$r.forEach(function(Ko){var Ji=Mt(Ko),la=Lt(Ji,zt,xi,!0).map(function(Nr){var Ar=Nr.option;return Ar}),Ro=la[la.length-1];(!Ro||Ro[xi.children]||Ot(Ro,xi))&&ci(function(Nr){return Nr.filter(function(Ar){return Ar!==Ko})})})},[zt,$r,xi]);var Yr=Te.useMemo(function(){return new Set(Ze(In))},[In]),Qr=Te.useMemo(function(){return new Set(Ze(Qn))},[Qn]),Cr=St(),Jt=(0,xt.Z)(Cr,2),gi=Jt[0],mr=Jt[1],tr=function(Ji){mr(Ji),Ki(Ji)},Hr=function(Ji){var la=Ji.disabled,Ro=Ot(Ji,xi);return!la&&(Ro||tn||wt)},Lr=function(Ji,la){var Ro=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;fn(Ji),!wt&&(la||tn&&(Si==="hover"||Ro))&&cn(!1)},lo=Te.useMemo(function(){return vn?kn:zt},[vn,kn,zt]),Wr=Te.useMemo(function(){for(var Ko=[{options:lo}],Ji=lo,la=Dt(Ji,xi),Ro=function(){var Wo=gi[Nr],Hi=Ji.find(function(_o,Ia){return(la[Ia]?ht(la[Ia]):_o[xi.value])===Wo}),st=Hi==null?void 0:Hi[xi.children];if(!(st!=null&&st.length))return"break";Ji=st,Ko.push({options:st})},Nr=0;Nr<gi.length;Nr+=1){var Ar=Ro();if(Ar==="break")break}return Ko},[lo,gi,xi]),jr=function(Ji,la){Hr(la)&&Lr(Ji,Ot(la,xi),!0)};li(vi,lo,xi,gi,tr,jr),Te.useEffect(function(){for(var Ko=0;Ko<gi.length;Ko+=1){var Ji,la=gi.slice(0,Ko+1),Ro=ht(la),Nr=(Ji=dn.current)===null||Ji===void 0?void 0:Ji.querySelector('li[data-path-key="'.concat(Ro.replace(/\\{0,2}"/g,'\\"'),'"]'));Nr&&Pt(Nr)}},[gi]);var fo=!((Zi=Wr[0])!==null&&Zi!==void 0&&(er=Zi.options)!==null&&er!==void 0&&er.length),$n=[(Gn={},(0,he.Z)(Gn,xi.value,"__EMPTY__"),(0,he.Z)(Gn,un,It),(0,he.Z)(Gn,"disabled",!0),Gn)],aa=(0,ve.Z)((0,ve.Z)({},Ln),{},{multiple:!fo&&wt,onSelect:Lr,onActive:tr,onToggleOpen:cn,checkedSet:Yr,halfCheckedSet:Qr,loadingKeys:$r,isSelectable:Hr}),Un=fo?[{options:$n}]:Wr,Do=Un.map(function(Ko,Ji){var la=gi.slice(0,Ji),Ro=gi[Ji];return Te.createElement(_n,(0,Ct.Z)({key:Ji},aa,{searchValue:vn,prefixCls:Fi,options:Ko.options,prevValuePath:la,activeValue:Ro}))});return Te.createElement(ln,{open:an},Te.createElement("div",{className:Le()("".concat(Fi,"-menus"),($t={},(0,he.Z)($t,"".concat(Fi,"-menu-empty"),fo),(0,he.Z)($t,"".concat(Fi,"-rtl"),ei),$t)),ref:dn},Do))}),be=Ge;function Pe(Ln){var vi=Ln.onPopupVisibleChange,Zi=Ln.popupVisible,er=Ln.popupClassName,Gn=Ln.popupPlacement;warning(!vi,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(Zi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(er===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(Gn===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Ae(Ln,vi){if(Ln){var Zi=function er(Gn){for(var $t=0;$t<Gn.length;$t++){var Gt=Gn[$t];if(Gt[vi==null?void 0:vi.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Gt[vi==null?void 0:vi.children])&&er(Gt[vi==null?void 0:vi.children]))return!0}};Zi(Ln)}}var Ne=null,xe=["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 ut(Ln){return Array.isArray(Ln)&&Array.isArray(Ln[0])}function Bt(Ln){return Ln?ut(Ln)?Ln:(Ln.length===0?[]:[Ln]).map(function(vi){return Array.isArray(vi)?vi:[vi]}):[]}var Qe=Te.forwardRef(function(Ln,vi){var Zi=Ln.id,er=Ln.prefixCls,Gn=er===void 0?"rc-cascader":er,$t=Ln.fieldNames,Gt=Ln.defaultValue,Zt=Ln.value,wt=Ln.changeOnSelect,vn=Ln.onChange,cn=Ln.displayRender,It=Ln.checkable,ct=Ln.autoClearSearchValue,an=ct===void 0?!0:ct,dn=Ln.searchValue,ei=Ln.onSearch,pn=Ln.showSearch,zt=Ln.expandTrigger,In=Ln.options,Qn=Ln.dropdownPrefixCls,xi=Ln.loadData,tn=Ln.popupVisible,fn=Ln.open,kn=Ln.popupClassName,zi=Ln.dropdownClassName,Di=Ln.dropdownMenuColumnStyle,Si=Ln.popupPlacement,Fi=Ln.placement,Ti=Ln.onDropdownVisibleChange,nr=Ln.onPopupVisibleChange,$r=Ln.expandIcon,ci=$r===void 0?">":$r,Ki=Ln.loadingIcon,Yr=Ln.children,Qr=Ln.dropdownMatchSelectWidth,Cr=Qr===void 0?!1:Qr,Jt=Ln.showCheckedStrategy,gi=Jt===void 0?Je:Jt,mr=(0,Ue.Z)(Ln,xe),tr=(0,at.ZP)(Zi),Hr=!!It,Lr=(0,te.Z)(Gt,{value:Zt,postState:Bt}),lo=(0,xt.Z)(Lr,2),Wr=lo[0],jr=lo[1],fo=Te.useMemo(function(){return ot($t)},[JSON.stringify($t)]),$n=Te.useMemo(function(){return In||[]},[In]),aa=Rt($n,fo),Un=Te.useCallback(function(fa){var va=aa();return fa.map(function($a){var ms=va[$a].nodes;return ms.map(function(fs){return fs[fo.value]})})},[aa,fo]),Do=(0,te.Z)("",{value:dn,postState:function(va){return va||""}}),Ko=(0,xt.Z)(Do,2),Ji=Ko[0],la=Ko[1],Ro=function(va,$a){la(va),$a.source!=="blur"&&ei&&ei(va)},Nr=_t(pn),Ar=(0,xt.Z)(Nr,2),xo=Ar[0],Wo=Ar[1],Hi=je(Ji,$n,fo,Qn||Gn,Wo,wt),st=Sn($n,fo),_o=Te.useMemo(function(){var fa=st(Wr),va=(0,xt.Z)(fa,2),$a=va[0],ms=va[1];if(!Hr||!Wr.length)return[$a,[],ms];var fs=Ze($a),Rs=aa(),Zs=(0,mt.S)(fs,!0,Rs),Bn=Zs.checkedKeys,Fs=Zs.halfCheckedKeys;return[Un(Bn),Un(Fs),ms]},[Hr,Wr,aa,Un,st]),Ia=(0,xt.Z)(_o,3),Ma=Ia[0],xs=Ia[1],Wa=Ia[2],Ps=Te.useMemo(function(){var fa=Ze(Ma),va=Wt(fa,aa,gi);return[].concat((0,le.Z)(Wa),(0,le.Z)(Un(va)))},[Ma,aa,Un,Wa,gi]),Lo=qe(Ps,$n,fo,Hr,cn),Po=(0,Oe.Z)(function(fa){if(jr(fa),vn){var va=Bt(fa),$a=va.map(function(Rs){return Lt(Rs,$n,fo).map(function(Zs){return Zs.option})}),ms=Hr?va:va[0],fs=Hr?$a:$a[0];vn(ms,fs)}}),Xr=(0,Oe.Z)(function(fa){if((!Hr||an)&&la(""),!Hr)Po(fa);else{var va=ht(fa),$a=Ze(Ma),ms=Ze(xs),fs=$a.includes(va),Rs=Wa.some(function(Kl){return ht(Kl)===va}),Zs=Ma,Bn=Wa;if(Rs&&!fs)Bn=Wa.filter(function(Kl){return ht(Kl)!==va});else{var Fs=fs?$a.filter(function(Kl){return Kl!==va}):[].concat((0,le.Z)($a),[va]),Go=aa(),kl;if(fs){var _s=(0,mt.S)(Fs,{checked:!1,halfCheckedKeys:ms},Go);kl=_s.checkedKeys}else{var sl=(0,mt.S)(Fs,!0,Go);kl=sl.checkedKeys}var yu=Wt(kl,aa,gi);Zs=Un(yu)}Po([].concat((0,le.Z)(Bn),(0,le.Z)(Zs)))}}),ha=function(va,$a){if($a.type==="clear"){Po([]);return}var ms=$a.values[0],fs=ms.valueCells;Xr(fs)},br=fn!==void 0?fn:tn,Ur=zi||kn,wo=Fi||Si,fi=function(va){Ti==null||Ti(va),nr==null||nr(va)},Ba=Te.useMemo(function(){return{options:$n,fieldNames:fo,values:Ma,halfValues:xs,changeOnSelect:wt,onSelect:Xr,checkable:It,searchOptions:Hi,dropdownPrefixCls:Qn,loadData:xi,expandTrigger:zt,expandIcon:ci,loadingIcon:Ki,dropdownMenuColumnStyle:Di}},[$n,fo,Ma,xs,wt,Xr,It,Hi,Qn,xi,zt,ci,Ki,Di]),Eo=!(Ji?Hi:$n).length,es=Ji&&Wo.matchInputWidth||Eo?{}:{minWidth:"auto"};return Te.createElement(de.Provider,{value:Ba},Te.createElement(bt.Ac,(0,Ct.Z)({},mr,{ref:vi,id:tr,prefixCls:Gn,autoClearSearchValue:an,dropdownMatchSelectWidth:Cr,dropdownStyle:es,displayValues:Lo,onDisplayValuesChange:ha,mode:Hr?"multiple":void 0,searchValue:Ji,onSearch:Ro,showSearch:xo,OptionList:be,emptyOptions:Eo,open:br,dropdownClassName:Ur,placement:wo,onDropdownVisibleChange:fi,getRawInputElement:function(){return Yr}})))});Qe.SHOW_PARENT=Je,Qe.SHOW_CHILD=Xe;var it=Qe,Ft=it,Nt=me(2738),dt=me(62892),Kt=me(53487),wn=me(19080),sn=me(36355),qt=me(93891),Rn=me(1684),Vn=me(19716),hn=me(32441),Yn=me(14154),mi=me(58582),jn=me(84443),An=me(66339),wi=me(33234),ji=me(98447),Wi=me(17313),dr=me(74207),Mr=me(83116);const pi=Ln=>{const{prefixCls:vi,componentCls:Zi,antCls:er}=Ln,Gn=`${Zi}-menu-item`,$t=`
|
|
|
&${Gn}-expand ${Gn}-expand-icon,
|
|
|
${Gn}-loading-icon
|
|
|
`;return[{[Zi]:{width:Ln.controlWidth}},{[`${Zi}-dropdown`]:[(0,ji.C2)(`${vi}-checkbox`,Ln),{[`&${er}-select-dropdown`]:{padding:0}},{[Zi]:{"&-checkbox":{top:0,marginInlineEnd:Ln.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${Zi}-menu-empty`]:{[`${Zi}-menu`]:{width:"100%",height:"auto",[Gn]:{color:Ln.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:Ln.controlItemWidth,height:Ln.dropdownHeight,margin:0,padding:Ln.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${Ln.lineWidth}px ${Ln.lineType} ${Ln.colorSplit}`},"&-item":Object.assign(Object.assign({},Wi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:Ln.optionPadding,lineHeight:Ln.lineHeight,cursor:"pointer",transition:`all ${Ln.motionDurationMid}`,borderRadius:Ln.borderRadiusSM,"&:hover":{background:Ln.controlItemBgHover},"&-disabled":{color:Ln.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[$t]:{color:Ln.colorTextDisabled}},[`&-active:not(${Gn}-disabled)`]:{"&, &:hover":{fontWeight:Ln.optionSelectedFontWeight,backgroundColor:Ln.optionSelectedBg}},"&-content":{flex:"auto"},[$t]:{marginInlineStart:Ln.paddingXXS,color:Ln.colorTextDescription,fontSize:Ln.fontSizeIcon},"&-keyword":{color:Ln.colorHighlight}})}}}]},{[`${Zi}-dropdown-rtl`]:{direction:"rtl"}},(0,dr.c)(Ln)]};var ui=(0,Mr.Z)("Cascader",Ln=>[pi(Ln)],Ln=>{const vi=Math.round((Ln.controlHeight-Ln.fontSize*Ln.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:Ln.controlItemBgActive,optionSelectedFontWeight:Ln.fontWeightStrong,optionPadding:`${vi}px ${Ln.paddingSM}px`,menuPadding:Ln.paddingXXS}}),Ci=function(Ln,vi){var Zi={};for(var er in Ln)Object.prototype.hasOwnProperty.call(Ln,er)&&vi.indexOf(er)<0&&(Zi[er]=Ln[er]);if(Ln!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gn=0,er=Object.getOwnPropertySymbols(Ln);Gn<er.length;Gn++)vi.indexOf(er[Gn])<0&&Object.prototype.propertyIsEnumerable.call(Ln,er[Gn])&&(Zi[er[Gn]]=Ln[er[Gn]]);return Zi};const{SHOW_CHILD:Xi,SHOW_PARENT:Ni}=Ft;function io(Ln,vi,Zi){const er=Ln.toLowerCase().split(vi).reduce((Gt,Zt,wt)=>wt===0?[Zt]:[].concat((0,le.Z)(Gt),[vi,Zt]),[]),Gn=[];let $t=0;return er.forEach((Gt,Zt)=>{const wt=$t+Gt.length;let vn=Ln.slice($t,wt);$t=wt,Zt%2===1&&(vn=Te.createElement("span",{className:`${Zi}-menu-item-keyword`,key:`separator-${Zt}`},vn)),Gn.push(vn)}),Gn}const hr=(Ln,vi,Zi,er)=>{const Gn=[],$t=Ln.toLowerCase();return vi.forEach((Gt,Zt)=>{Zt!==0&&Gn.push(" / ");let wt=Gt[er.label];const vn=typeof wt;(vn==="string"||vn==="number")&&(wt=io(String(wt),$t,Zi)),Gn.push(wt)}),Gn},De=Te.forwardRef((Ln,vi)=>{const{prefixCls:Zi,size:er,disabled:Gn,className:$t,rootClassName:Gt,multiple:Zt,bordered:wt=!0,transitionName:vn,choiceTransitionName:cn="",popupClassName:It,dropdownClassName:ct,expandIcon:an,placement:dn,showSearch:ei,allowClear:pn=!0,notFoundContent:zt,direction:In,getPopupContainer:Qn,status:xi,showArrow:tn,builtinPlacements:fn,style:kn}=Ln,zi=Ci(Ln,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),Di=(0,Nt.Z)(zi,["suffixIcon"]),{getPopupContainer:Si,getPrefixCls:Fi,renderEmpty:Ti,direction:nr,popupOverflow:$r,cascader:ci}=Te.useContext(sn.E_),Ki=In||nr,Yr=Ki==="rtl",{status:Qr,hasFeedback:Cr,isFormItemInput:Jt,feedbackIcon:gi}=Te.useContext(hn.aM),mr=(0,wn.F)(Qr,xi),tr=zt||(Ti==null?void 0:Ti("Cascader"))||Te.createElement(qt.Z,{componentName:"Cascader"}),Hr=Fi(),Lr=Fi("select",Zi),lo=Fi("cascader",Zi),[Wr,jr]=(0,Yn.Z)(Lr),[fo]=ui(lo),{compactSize:$n,compactItemClassnames:aa}=(0,wi.ri)(Lr,In),Un=Le()(It||ct,`${lo}-dropdown`,{[`${lo}-dropdown-rtl`]:Ki==="rtl"},Gt,jr),Do=Te.useMemo(()=>{if(!ei)return ei;let Wa={render:hr};return typeof ei=="object"&&(Wa=Object.assign(Object.assign({},Wa),ei)),Wa},[ei]),Ko=(0,Vn.Z)(Wa=>{var Ps;return(Ps=er!=null?er:$n)!==null&&Ps!==void 0?Ps:Wa}),Ji=Te.useContext(Rn.Z),la=Gn!=null?Gn:Ji;let Ro=an;an||(Ro=Yr?Te.createElement(He.Z,null):Te.createElement(We.Z,null));const Nr=Te.createElement("span",{className:`${Lr}-menu-item-loading-icon`},Te.createElement(lt.Z,{spin:!0})),Ar=Te.useMemo(()=>Zt?Te.createElement("span",{className:`${lo}-checkbox-inner`}):!1,[Zt]),xo=(0,jn.Z)(Ln.suffixIcon,tn),{suffixIcon:Wo,removeIcon:Hi,clearIcon:st}=(0,An.Z)(Object.assign(Object.assign({},Ln),{hasFeedback:Cr,feedbackIcon:gi,showSuffixIcon:xo,multiple:Zt,prefixCls:Lr,componentName:"Cascader"})),_o=Te.useMemo(()=>dn!==void 0?dn:Yr?"bottomRight":"bottomLeft",[dn,Yr]),Ia=(0,mi.Z)(fn,$r),Ma=pn===!0?{clearIcon:st}:pn,xs=Te.createElement(Ft,Object.assign({prefixCls:Lr,className:Le()(!Zi&&lo,{[`${Lr}-lg`]:Ko==="large",[`${Lr}-sm`]:Ko==="small",[`${Lr}-rtl`]:Yr,[`${Lr}-borderless`]:!wt,[`${Lr}-in-form-item`]:Jt},(0,wn.Z)(Lr,mr,Cr),aa,ci==null?void 0:ci.className,$t,Gt,jr),disabled:la,style:Object.assign(Object.assign({},ci==null?void 0:ci.style),kn)},Di,{builtinPlacements:Ia,direction:Ki,placement:_o,notFoundContent:tr,allowClear:Ma,showSearch:Do,expandIcon:Ro,suffixIcon:Wo,removeIcon:Hi,loadingIcon:Nr,checkable:Ar,dropdownClassName:Un,dropdownPrefixCls:Zi||lo,choiceTransitionName:(0,dt.m)(Hr,"",cn),transitionName:(0,dt.m)(Hr,"slide-up",vn),getPopupContainer:Qn||Si,ref:vi}));return fo(Wr(xs))}),Ei=(0,Kt.Z)(De);De.SHOW_PARENT=Ni,De.SHOW_CHILD=Xi,De._InternalPanelDoNotUseOrYouWillBeFired=Ei;var Pr=De},24905:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return je}});var le=me(92310),Te=me.n(le),He=me(5630),lt=me(59301),We=me(36355),Ve=me(1684),Le=me(32441),xt=lt.createContext(null),Ue=me(98447),bt=me(14088),at=me(4572),mt=function(_e,Je){var Xe={};for(var ht in _e)Object.prototype.hasOwnProperty.call(_e,ht)&&Je.indexOf(ht)<0&&(Xe[ht]=_e[ht]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,ht=Object.getOwnPropertySymbols(_e);Ze<ht.length;Ze++)Je.indexOf(ht[Ze])<0&&Object.prototype.propertyIsEnumerable.call(_e,ht[Ze])&&(Xe[ht[Ze]]=_e[ht[Ze]]);return Xe};const Oe=(_e,Je)=>{var Xe;const{prefixCls:ht,className:Ze,rootClassName:Mt,children:ot,indeterminate:Ot=!1,style:Pt,onMouseEnter:Dt,onMouseLeave:Wt,skipGroup:Lt=!1,disabled:qe}=_e,Ke=mt(_e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Rt,direction:Sn,checkbox:Pn}=lt.useContext(We.E_),_t=lt.useContext(xt),{isFormItemInput:rn}=lt.useContext(Le.aM),ln=lt.useContext(Ve.Z),Wn=(Xe=(_t==null?void 0:_t.disabled)||qe)!==null&&Xe!==void 0?Xe:ln,un=lt.useRef(Ke.value);lt.useEffect(()=>{_t==null||_t.registerValue(Ke.value)},[]),lt.useEffect(()=>{if(!Lt)return Ke.value!==un.current&&(_t==null||_t.cancelValue(un.current),_t==null||_t.registerValue(Ke.value),un.current=Ke.value),()=>_t==null?void 0:_t.cancelValue(Ke.value)},[Ke.value]);const _n=Rt("checkbox",ht),[St,Zn]=(0,Ue.ZP)(_n),li=Object.assign({},Ke);_t&&!Lt&&(li.onChange=function(){Ke.onChange&&Ke.onChange.apply(Ke,arguments),_t.toggleOption&&_t.toggleOption({label:ot,value:Ke.value})},li.name=_t.name,li.checked=_t.value.includes(Ke.value));const Ge=Te()(`${_n}-wrapper`,{[`${_n}-rtl`]:Sn==="rtl",[`${_n}-wrapper-checked`]:li.checked,[`${_n}-wrapper-disabled`]:Wn,[`${_n}-wrapper-in-form-item`]:rn},Pn==null?void 0:Pn.className,Ze,Mt,Zn),be=Te()({[`${_n}-indeterminate`]:Ot},at.A,Zn),Pe=Ot?"mixed":void 0;return St(lt.createElement(bt.Z,{component:"Checkbox",disabled:Wn},lt.createElement("label",{className:Ge,style:Object.assign(Object.assign({},Pn==null?void 0:Pn.style),Pt),onMouseEnter:Dt,onMouseLeave:Wt},lt.createElement(He.Z,Object.assign({"aria-checked":Pe},li,{prefixCls:_n,className:be,disabled:Wn,ref:Je})),ot!==void 0&<.createElement("span",null,ot))))};var ee=lt.forwardRef(Oe),de=me(26407),se=me(2738),he=function(_e,Je){var Xe={};for(var ht in _e)Object.prototype.hasOwnProperty.call(_e,ht)&&Je.indexOf(ht)<0&&(Xe[ht]=_e[ht]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,ht=Object.getOwnPropertySymbols(_e);Ze<ht.length;Ze++)Je.indexOf(ht[Ze])<0&&Object.prototype.propertyIsEnumerable.call(_e,ht[Ze])&&(Xe[ht[Ze]]=_e[ht[Ze]]);return Xe};const ve=(_e,Je)=>{const{defaultValue:Xe,children:ht,options:Ze=[],prefixCls:Mt,className:ot,rootClassName:Ot,style:Pt,onChange:Dt}=_e,Wt=he(_e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Lt,direction:qe}=lt.useContext(We.E_),[Ke,Rt]=lt.useState(Wt.value||Xe||[]),[Sn,Pn]=lt.useState([]);lt.useEffect(()=>{"value"in Wt&&Rt(Wt.value||[])},[Wt.value]);const _t=lt.useMemo(()=>Ze.map(Ae=>typeof Ae=="string"||typeof Ae=="number"?{label:Ae,value:Ae}:Ae),[Ze]),rn=Ae=>{Pn(Ne=>Ne.filter(xe=>xe!==Ae))},ln=Ae=>{Pn(Ne=>[].concat((0,de.Z)(Ne),[Ae]))},Wn=Ae=>{const Ne=Ke.indexOf(Ae.value),xe=(0,de.Z)(Ke);Ne===-1?xe.push(Ae.value):xe.splice(Ne,1),"value"in Wt||Rt(xe),Dt==null||Dt(xe.filter(ut=>Sn.includes(ut)).sort((ut,Bt)=>{const Qe=_t.findIndex(Ft=>Ft.value===ut),it=_t.findIndex(Ft=>Ft.value===Bt);return Qe-it}))},un=Lt("checkbox",Mt),_n=`${un}-group`,[St,Zn]=(0,Ue.ZP)(un),li=(0,se.Z)(Wt,["value","disabled"]),Ge=Ze.length?_t.map(Ae=>lt.createElement(ee,{prefixCls:un,key:Ae.value.toString(),disabled:"disabled"in Ae?Ae.disabled:Wt.disabled,value:Ae.value,checked:Ke.includes(Ae.value),onChange:Ae.onChange,className:`${_n}-item`,style:Ae.style,title:Ae.title},Ae.label)):ht,be={toggleOption:Wn,value:Ke,disabled:Wt.disabled,name:Wt.name,registerValue:ln,cancelValue:rn},Pe=Te()(_n,{[`${_n}-rtl`]:qe==="rtl"},ot,Ot,Zn);return St(lt.createElement("div",Object.assign({className:Pe,style:Pt},li,{ref:Je}),lt.createElement(xt.Provider,{value:be},Ge)))},Ee=lt.forwardRef(ve);var Me=lt.memo(Ee);const Be=ee;Be.Group=Me,Be.__ANT_CHECKBOX=!0;var je=Be},98447:function(Tn,xn,me){"use strict";me.d(xn,{C2:function(){return We}});var le=me(17313),Te=me(37613),He=me(83116);const lt=Ve=>{const{checkboxCls:Le}=Ve,Ct=`${Le}-wrapper`;return[{[`${Le}-group`]:Object.assign(Object.assign({},(0,le.Wf)(Ve)),{display:"inline-flex",flexWrap:"wrap",columnGap:Ve.marginXS,[`> ${Ve.antCls}-row`]:{flex:1}}),[Ct]:Object.assign(Object.assign({},(0,le.Wf)(Ve)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Ct}`]:{marginInlineStart:0},[`&${Ct}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Le]:Object.assign(Object.assign({},(0,le.Wf)(Ve)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Ve.borderRadiusSM,alignSelf:"center",[`${Le}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Le}-inner`]:Object.assign({},(0,le.oN)(Ve))},[`${Le}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Ve.checkboxSize,height:Ve.checkboxSize,direction:"ltr",backgroundColor:Ve.colorBgContainer,border:`${Ve.lineWidth}px ${Ve.lineType} ${Ve.colorBorder}`,borderRadius:Ve.borderRadiusSM,borderCollapse:"separate",transition:`all ${Ve.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Ve.checkboxSize/14*5,height:Ve.checkboxSize/14*8,border:`${Ve.lineWidthBold}px solid ${Ve.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Ve.motionDurationFast} ${Ve.motionEaseInBack}, opacity ${Ve.motionDurationFast}`}},"& + span":{paddingInlineStart:Ve.paddingXS,paddingInlineEnd:Ve.paddingXS}})},{[`
|
|
|
${Ct}:not(${Ct}-disabled),
|
|
|
${Le}:not(${Le}-disabled)
|
|
|
`]:{[`&:hover ${Le}-inner`]:{borderColor:Ve.colorPrimary}},[`${Ct}:not(${Ct}-disabled)`]:{[`&:hover ${Le}-checked:not(${Le}-disabled) ${Le}-inner`]:{backgroundColor:Ve.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Le}-checked:not(${Le}-disabled):after`]:{borderColor:Ve.colorPrimaryHover}}},{[`${Le}-checked`]:{[`${Le}-inner`]:{backgroundColor:Ve.colorPrimary,borderColor:Ve.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Ve.motionDurationMid} ${Ve.motionEaseOutBack} ${Ve.motionDurationFast}`}}},[`
|
|
|
${Ct}-checked:not(${Ct}-disabled),
|
|
|
${Le}-checked:not(${Le}-disabled)
|
|
|
`]:{[`&:hover ${Le}-inner`]:{backgroundColor:Ve.colorPrimaryHover,borderColor:"transparent"}}},{[Le]:{"&-indeterminate":{[`${Le}-inner`]:{backgroundColor:Ve.colorBgContainer,borderColor:Ve.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Ve.fontSizeLG/2,height:Ve.fontSizeLG/2,backgroundColor:Ve.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Ct}-disabled`]:{cursor:"not-allowed"},[`${Le}-disabled`]:{[`&, ${Le}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Le}-inner`]:{background:Ve.colorBgContainerDisabled,borderColor:Ve.colorBorder,"&:after":{borderColor:Ve.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Ve.colorTextDisabled},[`&${Le}-indeterminate ${Le}-inner::after`]:{background:Ve.colorTextDisabled}}}]};function We(Ve,Le){const Ct=(0,Te.TS)(Le,{checkboxCls:`.${Ve}`,checkboxSize:Le.controlInteractiveSize});return[lt(Ct)]}xn.ZP=(0,He.Z)("Checkbox",(Ve,Le)=>{let{prefixCls:Ct}=Le;return[We(Ct,Ve)]})},36381:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return li}});var le=me(38819),Te=me(92310),He=me.n(Te),lt=me(92413),We=me(26407),Ve=me(33606),Le=me(39559),Ct=me(18929),xt=me(48736),Ue=me(59301),bt=me(37061),at=me(11592),mt=me(400),Oe=me(77900),te=me(10228),ee=Ue.forwardRef(function(Ge,be){var Pe=Ge.prefixCls,Ae=Ge.forceRender,Ne=Ge.className,xe=Ge.style,ut=Ge.children,Bt=Ge.isActive,Qe=Ge.role,it=Ue.useState(Bt||Ae),Ft=(0,Ve.Z)(it,2),Nt=Ft[0],dt=Ft[1];return Ue.useEffect(function(){(Ae||Bt)&&dt(!0)},[Ae,Bt]),Nt?Ue.createElement("div",{ref:be,className:He()("".concat(Pe,"-content"),(0,mt.Z)((0,mt.Z)({},"".concat(Pe,"-content-active"),Bt),"".concat(Pe,"-content-inactive"),!Bt),Ne),style:xe,role:Qe},Ue.createElement("div",{className:"".concat(Pe,"-content-box")},ut)):null});ee.displayName="PanelContent";var de=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],he=Ue.forwardRef(function(Ge,be){var Pe=Ge.showArrow,Ae=Pe===void 0?!0:Pe,Ne=Ge.headerClass,xe=Ge.isActive,ut=Ge.onItemClick,Bt=Ge.forceRender,Qe=Ge.className,it=Ge.prefixCls,Ft=Ge.collapsible,Nt=Ge.accordion,dt=Ge.panelKey,Kt=Ge.extra,wn=Ge.header,sn=Ge.expandIcon,qt=Ge.openMotion,Rn=Ge.destroyInactivePanel,Vn=Ge.children,hn=(0,bt.Z)(Ge,se),Yn=Ft==="disabled",mi=Ft==="header",jn=Ft==="icon",An=Kt!=null&&typeof Kt!="boolean",wi=function(){ut==null||ut(dt)},ji=function(Ci){(Ci.key==="Enter"||Ci.keyCode===te.Z.ENTER||Ci.which===te.Z.ENTER)&&wi()},Wi=typeof sn=="function"?sn(Ge):Ue.createElement("i",{className:"arrow"});Wi&&(Wi=Ue.createElement("div",{className:"".concat(it,"-expand-icon"),onClick:["header","icon"].includes(Ft)?wi:void 0},Wi));var dr=He()((0,mt.Z)((0,mt.Z)((0,mt.Z)({},"".concat(it,"-item"),!0),"".concat(it,"-item-active"),xe),"".concat(it,"-item-disabled"),Yn),Qe),Mr=He()(Ne,(0,mt.Z)((0,mt.Z)((0,mt.Z)({},"".concat(it,"-header"),!0),"".concat(it,"-header-collapsible-only"),mi),"".concat(it,"-icon-collapsible-only"),jn)),pi={className:Mr,"aria-expanded":xe,"aria-disabled":Yn,onKeyDown:ji};return!mi&&!jn&&(pi.onClick=wi,pi.role=Nt?"tab":"button",pi.tabIndex=Yn?-1:0),Ue.createElement("div",(0,lt.Z)({},hn,{ref:be,className:dr}),Ue.createElement("div",pi,Ae&&Wi,Ue.createElement("span",{className:"".concat(it,"-header-text"),onClick:Ft==="header"?wi:void 0},wn),An&&Ue.createElement("div",{className:"".concat(it,"-extra")},Kt)),Ue.createElement(Oe.default,(0,lt.Z)({visible:xe,leavedClassName:"".concat(it,"-content-hidden")},qt,{forceRender:Bt,removeOnLeave:Rn}),function(ui,Ci){var Xi=ui.className,Ni=ui.style;return Ue.createElement(de,{ref:Ci,prefixCls:it,className:Xi,style:Ni,isActive:xe,forceRender:Bt,role:Nt?"tabpanel":void 0},Vn)}))}),ve=he,Ee=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Me=function(be,Pe){var Ae=Pe.prefixCls,Ne=Pe.accordion,xe=Pe.collapsible,ut=Pe.destroyInactivePanel,Bt=Pe.onItemClick,Qe=Pe.activeKey,it=Pe.openMotion,Ft=Pe.expandIcon;return be.map(function(Nt,dt){var Kt=Nt.children,wn=Nt.label,sn=Nt.key,qt=Nt.collapsible,Rn=Nt.onItemClick,Vn=Nt.destroyInactivePanel,hn=(0,bt.Z)(Nt,Ee),Yn=String(sn!=null?sn:dt),mi=qt!=null?qt:xe,jn=Vn!=null?Vn:ut,An=function(Wi){mi!=="disabled"&&(Bt(Wi),Rn==null||Rn(Wi))},wi=!1;return Ne?wi=Qe[0]===Yn:wi=Qe.indexOf(Yn)>-1,Ue.createElement(ve,(0,lt.Z)({},hn,{prefixCls:Ae,key:Yn,panelKey:Yn,isActive:wi,accordion:Ne,openMotion:it,expandIcon:Ft,header:wn,collapsible:mi,onItemClick:An,destroyInactivePanel:jn}),Kt)})},Be=function(be,Pe,Ae){if(!be)return null;var Ne=Ae.prefixCls,xe=Ae.accordion,ut=Ae.collapsible,Bt=Ae.destroyInactivePanel,Qe=Ae.onItemClick,it=Ae.activeKey,Ft=Ae.openMotion,Nt=Ae.expandIcon,dt=be.key||String(Pe),Kt=be.props,wn=Kt.header,sn=Kt.headerClass,qt=Kt.destroyInactivePanel,Rn=Kt.collapsible,Vn=Kt.onItemClick,hn=!1;xe?hn=it[0]===dt:hn=it.indexOf(dt)>-1;var Yn=Rn!=null?Rn:ut,mi=function(wi){Yn!=="disabled"&&(Qe(wi),Vn==null||Vn(wi))},jn={key:dt,panelKey:dt,header:wn,headerClass:sn,isActive:hn,prefixCls:Ne,destroyInactivePanel:qt!=null?qt:Bt,openMotion:Ft,accordion:xe,children:be.props.children,onItemClick:mi,expandIcon:Nt,collapsible:Yn};return typeof be.type=="string"?be:(Object.keys(jn).forEach(function(An){typeof jn[An]=="undefined"&&delete jn[An]}),Ue.cloneElement(be,jn))};function je(Ge,be,Pe){return Array.isArray(Ge)?Me(Ge,Pe):(0,at.Z)(be).map(function(Ae,Ne){return Be(Ae,Ne,Pe)})}var _e=je,Je=me(26112);function Xe(Ge){var be=Ge;if(!Array.isArray(be)){var Pe=(0,Le.Z)(be);be=Pe==="number"||Pe==="string"?[be]:[]}return be.map(function(Ae){return String(Ae)})}var ht=Ue.forwardRef(function(Ge,be){var Pe=Ge.prefixCls,Ae=Pe===void 0?"rc-collapse":Pe,Ne=Ge.destroyInactivePanel,xe=Ne===void 0?!1:Ne,ut=Ge.style,Bt=Ge.accordion,Qe=Ge.className,it=Ge.children,Ft=Ge.collapsible,Nt=Ge.openMotion,dt=Ge.expandIcon,Kt=Ge.activeKey,wn=Ge.defaultActiveKey,sn=Ge.onChange,qt=Ge.items,Rn=He()(Ae,Qe),Vn=(0,Ct.Z)([],{value:Kt,onChange:function(ji){return sn==null?void 0:sn(ji)},defaultValue:wn,postState:Xe}),hn=(0,Ve.Z)(Vn,2),Yn=hn[0],mi=hn[1],jn=function(ji){return mi(function(){if(Bt)return Yn[0]===ji?[]:[ji];var Wi=Yn.indexOf(ji),dr=Wi>-1;return dr?Yn.filter(function(Mr){return Mr!==ji}):[].concat((0,We.Z)(Yn),[ji])})};(0,xt.ZP)(!it,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var An=_e(qt,it,{prefixCls:Ae,accordion:Bt,openMotion:Nt,expandIcon:dt,collapsible:Ft,destroyInactivePanel:xe,onItemClick:jn,activeKey:Yn});return Ue.createElement("div",(0,lt.Z)({ref:be,className:Rn,style:ut,role:Bt?"tablist":void 0},(0,Je.Z)(Ge,{aria:!0,data:!0})),An)}),Ze=Object.assign(ht,{Panel:ve}),Mt=Ze,ot=Ze.Panel,Ot=me(2738),Pt=me(62892),Dt=me(92343),Wt=me(36355),Lt=me(19716),Ke=Ue.forwardRef((Ge,be)=>{const{getPrefixCls:Pe}=Ue.useContext(Wt.E_),{prefixCls:Ae,className:Ne,showArrow:xe=!0}=Ge,ut=Pe("collapse",Ae),Bt=He()({[`${ut}-no-arrow`]:!xe},Ne);return Ue.createElement(Mt.Panel,Object.assign({ref:be},Ge,{prefixCls:ut,className:Bt}))}),Rt=me(17313),Sn=me(8378),Pn=me(83116),_t=me(37613);const rn=Ge=>{const{componentCls:be,contentBg:Pe,padding:Ae,headerBg:Ne,headerPadding:xe,collapseHeaderPaddingSM:ut,collapseHeaderPaddingLG:Bt,collapsePanelBorderRadius:Qe,lineWidth:it,lineType:Ft,colorBorder:Nt,colorText:dt,colorTextHeading:Kt,colorTextDisabled:wn,fontSize:sn,fontSizeLG:qt,lineHeight:Rn,marginSM:Vn,paddingSM:hn,paddingLG:Yn,paddingXS:mi,motionDurationSlow:jn,fontSizeIcon:An,contentPadding:wi}=Ge,ji=`${it}px ${Ft} ${Nt}`;return{[be]:Object.assign(Object.assign({},(0,Rt.Wf)(Ge)),{backgroundColor:Ne,border:ji,borderBottom:0,borderRadius:`${Qe}px`,"&-rtl":{direction:"rtl"},[`& > ${be}-item`]:{borderBottom:ji,"&:last-child":{[`
|
|
|
&,
|
|
|
& > ${be}-header`]:{borderRadius:`0 0 ${Qe}px ${Qe}px`}},[`> ${be}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:xe,color:Kt,lineHeight:Rn,cursor:"pointer",transition:`all ${jn}, visibility 0s`,[`> ${be}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${be}-expand-icon`]:{height:sn*Rn,display:"flex",alignItems:"center",paddingInlineEnd:Vn},[`${be}-arrow`]:Object.assign(Object.assign({},(0,Rt.Ro)()),{fontSize:An,svg:{transition:`transform ${jn}`}}),[`${be}-header-text`]:{marginInlineEnd:"auto"}},[`${be}-header-collapsible-only`]:{cursor:"default",[`${be}-header-text`]:{flex:"none",cursor:"pointer"}},[`${be}-icon-collapsible-only`]:{cursor:"default",[`${be}-expand-icon`]:{cursor:"pointer"}}},[`${be}-content`]:{color:dt,backgroundColor:Pe,borderTop:ji,[`& > ${be}-content-box`]:{padding:wi},"&-hidden":{display:"none"}},"&-small":{[`> ${be}-item`]:{[`> ${be}-header`]:{padding:ut,paddingInlineStart:mi,[`> ${be}-expand-icon`]:{marginInlineStart:hn-mi}},[`> ${be}-content > ${be}-content-box`]:{padding:hn}}},"&-large":{[`> ${be}-item`]:{fontSize:qt,[`> ${be}-header`]:{padding:Bt,paddingInlineStart:Ae,[`> ${be}-expand-icon`]:{height:qt*Rn,marginInlineStart:Yn-Ae}},[`> ${be}-content > ${be}-content-box`]:{padding:Yn}}},[`${be}-item:last-child`]:{[`> ${be}-content`]:{borderRadius:`0 0 ${Qe}px ${Qe}px`}},[`& ${be}-item-disabled > ${be}-header`]:{"\n &,\n & > .arrow\n ":{color:wn,cursor:"not-allowed"}},[`&${be}-icon-position-end`]:{[`& > ${be}-item`]:{[`> ${be}-header`]:{[`${be}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:Vn}}}}})}},ln=Ge=>{const{componentCls:be}=Ge,Pe=`> ${be}-item > ${be}-header ${be}-arrow svg`;return{[`${be}-rtl`]:{[Pe]:{transform:"rotate(180deg)"}}}},Wn=Ge=>{const{componentCls:be,headerBg:Pe,paddingXXS:Ae,colorBorder:Ne}=Ge;return{[`${be}-borderless`]:{backgroundColor:Pe,border:0,[`> ${be}-item`]:{borderBottom:`1px solid ${Ne}`},[`
|
|
|
> ${be}-item:last-child,
|
|
|
> ${be}-item:last-child ${be}-header
|
|
|
`]:{borderRadius:0},[`> ${be}-item:last-child`]:{borderBottom:0},[`> ${be}-item > ${be}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${be}-item > ${be}-content > ${be}-content-box`]:{paddingTop:Ae}}}},un=Ge=>{const{componentCls:be,paddingSM:Pe}=Ge;return{[`${be}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${be}-item`]:{borderBottom:0,[`> ${be}-content`]:{backgroundColor:"transparent",border:0,[`> ${be}-content-box`]:{paddingBlock:Pe}}}}}};var _n=(0,Pn.Z)("Collapse",Ge=>{const be=(0,_t.TS)(Ge,{collapseHeaderPaddingSM:`${Ge.paddingXS}px ${Ge.paddingSM}px`,collapseHeaderPaddingLG:`${Ge.padding}px ${Ge.paddingLG}px`,collapsePanelBorderRadius:Ge.borderRadiusLG});return[rn(be),Wn(be),un(be),ln(be),(0,Sn.Z)(be)]},Ge=>({headerPadding:`${Ge.paddingSM}px ${Ge.padding}px`,headerBg:Ge.colorFillAlter,contentPadding:`${Ge.padding}px 16px`,contentBg:Ge.colorBgContainer})),Zn=Object.assign(Ue.forwardRef((Ge,be)=>{const{getPrefixCls:Pe,direction:Ae,collapse:Ne}=Ue.useContext(Wt.E_),{prefixCls:xe,className:ut,rootClassName:Bt,style:Qe,bordered:it=!0,ghost:Ft,size:Nt,expandIconPosition:dt="start",children:Kt,expandIcon:wn}=Ge,sn=(0,Lt.Z)(ji=>{var Wi;return(Wi=Nt!=null?Nt:ji)!==null&&Wi!==void 0?Wi:"middle"}),qt=Pe("collapse",xe),Rn=Pe(),[Vn,hn]=_n(qt),Yn=Ue.useMemo(()=>dt==="left"?"start":dt==="right"?"end":dt,[dt]),mi=function(){let ji=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const Wi=wn?wn(ji):Ue.createElement(le.Z,{rotate:ji.isActive?90:void 0});return(0,Dt.Tm)(Wi,()=>({className:He()(Wi.props.className,`${qt}-arrow`)}))},jn=He()(`${qt}-icon-position-${Yn}`,{[`${qt}-borderless`]:!it,[`${qt}-rtl`]:Ae==="rtl",[`${qt}-ghost`]:!!Ft,[`${qt}-${sn}`]:sn!=="middle"},Ne==null?void 0:Ne.className,ut,Bt,hn),An=Object.assign(Object.assign({},(0,Pt.Z)(Rn)),{motionAppear:!1,leavedClassName:`${qt}-content-hidden`}),wi=Ue.useMemo(()=>Kt?(0,at.Z)(Kt).map((ji,Wi)=>{var dr,Mr;if(!((dr=ji.props)===null||dr===void 0)&&dr.disabled){const pi=(Mr=ji.key)!==null&&Mr!==void 0?Mr:String(Wi),{disabled:ui,collapsible:Ci}=ji.props,Xi=Object.assign(Object.assign({},(0,Ot.Z)(ji.props,["disabled"])),{key:pi,collapsible:Ci!=null?Ci:ui?"disabled":void 0});return(0,Dt.Tm)(ji,Xi)}return ji}):null,[Kt]);return Vn(Ue.createElement(Mt,Object.assign({ref:be,openMotion:An},(0,Ot.Z)(Ge,["rootClassName"]),{expandIcon:mi,prefixCls:qt,className:jn,style:Object.assign(Object.assign({},Ne==null?void 0:Ne.style),Qe)}),wi))}),{Panel:Ke}),li=Zn},93891:function(Tn,xn,me){"use strict";var le=me(59301),Te=me(36355),He=me(64165);const lt=We=>{const{componentName:Ve}=We,{getPrefixCls:Le}=(0,le.useContext)(Te.E_),Ct=Le("empty");switch(Ve){case"Table":case"List":return le.createElement(He.Z,{image:He.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return le.createElement(He.Z,{image:He.Z.PRESENTED_IMAGE_SIMPLE,className:`${Ct}-small`});default:return le.createElement(He.Z,null)}};xn.Z=lt},28103:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return at}});var le=me(92310),Te=me.n(le),He=me(59301),lt=me(36355),We=me(17313),Ve=me(83116),Le=me(37613);const Ct=mt=>{const{componentCls:Oe,sizePaddingEdgeHorizontal:te,colorSplit:ee,lineWidth:de,textPaddingInline:se,orientationMargin:he,verticalMarginInline:ve}=mt;return{[Oe]:Object.assign(Object.assign({},(0,We.Wf)(mt)),{borderBlockStart:`${de}px solid ${ee}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:ve,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${de}px solid ${ee}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${mt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${Oe}-with-text`]:{display:"flex",alignItems:"center",margin:`${mt.dividerHorizontalWithTextGutterMargin}px 0`,color:mt.colorTextHeading,fontWeight:500,fontSize:mt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${ee}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${de}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${Oe}-with-text-left`]:{"&::before":{width:`${he*100}%`},"&::after":{width:`${100-he*100}%`}},[`&-horizontal${Oe}-with-text-right`]:{"&::before":{width:`${100-he*100}%`},"&::after":{width:`${he*100}%`}},[`${Oe}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:se},"&-dashed":{background:"none",borderColor:ee,borderStyle:"dashed",borderWidth:`${de}px 0 0`},[`&-horizontal${Oe}-with-text${Oe}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${Oe}-dashed`]:{borderInlineStartWidth:de,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${Oe}-with-text`]:{color:mt.colorText,fontWeight:"normal",fontSize:mt.fontSize},[`&-horizontal${Oe}-with-text-left${Oe}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${Oe}-inner-text`]:{paddingInlineStart:te}},[`&-horizontal${Oe}-with-text-right${Oe}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${Oe}-inner-text`]:{paddingInlineEnd:te}}})}};var xt=(0,Ve.Z)("Divider",mt=>{const Oe=(0,Le.TS)(mt,{dividerHorizontalWithTextGutterMargin:mt.margin,dividerHorizontalGutterMargin:mt.marginLG,sizePaddingEdgeHorizontal:0});return[Ct(Oe)]},mt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:mt.marginXS})),Ue=function(mt,Oe){var te={};for(var ee in mt)Object.prototype.hasOwnProperty.call(mt,ee)&&Oe.indexOf(ee)<0&&(te[ee]=mt[ee]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,ee=Object.getOwnPropertySymbols(mt);de<ee.length;de++)Oe.indexOf(ee[de])<0&&Object.prototype.propertyIsEnumerable.call(mt,ee[de])&&(te[ee[de]]=mt[ee[de]]);return te},at=mt=>{const{getPrefixCls:Oe,direction:te,divider:ee}=He.useContext(lt.E_),{prefixCls:de,type:se="horizontal",orientation:he="center",orientationMargin:ve,className:Ee,rootClassName:Me,children:Be,dashed:je,plain:_e,style:Je}=mt,Xe=Ue(mt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),ht=Oe("divider",de),[Ze,Mt]=xt(ht),ot=he.length>0?`-${he}`:he,Ot=!!Be,Pt=he==="left"&&ve!=null,Dt=he==="right"&&ve!=null,Wt=Te()(ht,ee==null?void 0:ee.className,Mt,`${ht}-${se}`,{[`${ht}-with-text`]:Ot,[`${ht}-with-text${ot}`]:Ot,[`${ht}-dashed`]:!!je,[`${ht}-plain`]:!!_e,[`${ht}-rtl`]:te==="rtl",[`${ht}-no-default-orientation-margin-left`]:Pt,[`${ht}-no-default-orientation-margin-right`]:Dt},Ee,Me),Lt=He.useMemo(()=>typeof ve=="number"?ve:/^\d+$/.test(ve)?Number(ve):ve,[ve]),qe=Object.assign(Object.assign({},Pt&&{marginLeft:Lt}),Dt&&{marginRight:Lt});return Ze(He.createElement("div",Object.assign({className:Wt,style:Object.assign(Object.assign({},ee==null?void 0:ee.style),Je)},Xe,{role:"separator"}),Be&&se!=="vertical"&&He.createElement("span",{className:`${ht}-inner-text`,style:qe},Be)))}},91857:function(Tn,xn,me){"use strict";var le=me(59301),Te=me(38819),He=me(92310),lt=me.n(He),We=me(31561),Ve=me(70425),Le=me(18929),Ct=me(2738),xt=me(79676),Ue=me(53487),bt=me(92343),at=me(36355),mt=me(20834),Oe=me(40875),te=me(88088),ee=me(47211);const de=null,se=Me=>{const{menu:Be,arrow:je,prefixCls:_e,children:Je,trigger:Xe,disabled:ht,dropdownRender:Ze,getPopupContainer:Mt,overlayClassName:ot,rootClassName:Ot,open:Pt,onOpenChange:Dt,visible:Wt,onVisibleChange:Lt,mouseEnterDelay:qe=.15,mouseLeaveDelay:Ke=.1,autoAdjustOverflow:Rt=!0,placement:Sn="",overlay:Pn,transitionName:_t}=Me,{getPopupContainer:rn,getPrefixCls:ln,direction:Wn}=le.useContext(at.E_),un=le.useMemo(()=>{const dt=ln();return _t!==void 0?_t:Sn.includes("top")?`${dt}-slide-down`:`${dt}-slide-up`},[ln,Sn,_t]),_n=le.useMemo(()=>Sn?Sn.includes("Center")?Sn.slice(0,Sn.indexOf("Center")):Sn:Wn==="rtl"?"bottomRight":"bottomLeft",[Sn,Wn]),St=ln("dropdown",_e),[Zn,li]=(0,ee.Z)(St),[,Ge]=(0,te.Z)(),be=le.Children.only(Je),Pe=(0,bt.Tm)(be,{className:lt()(`${St}-trigger`,{[`${St}-rtl`]:Wn==="rtl"},be.props.className),disabled:ht}),Ae=ht?[]:Xe;let Ne;Ae&&Ae.includes("contextMenu")&&(Ne=!0);const[xe,ut]=(0,Le.Z)(!1,{value:Pt!=null?Pt:Wt}),Bt=(0,Ve.useEvent)(dt=>{Dt==null||Dt(dt),Lt==null||Lt(dt),ut(dt)}),Qe=lt()(ot,Ot,li,{[`${St}-rtl`]:Wn==="rtl"}),it=(0,xt.Z)({arrowPointAtCenter:typeof je=="object"&&je.pointAtCenter,autoAdjustOverflow:Rt,offset:Ge.marginXXS,arrowWidth:je?Ge.sizePopupArrow:0,borderRadius:Ge.borderRadius}),Ft=le.useCallback(()=>{ut(!1)},[]),Nt=()=>{let dt;return Be!=null&&Be.items?dt=le.createElement(mt.default,Object.assign({},Be)):typeof Pn=="function"?dt=Pn():dt=Pn,Ze&&(dt=Ze(dt)),dt=le.Children.only(typeof dt=="string"?le.createElement("span",null,dt):dt),le.createElement(Oe.J,{prefixCls:`${St}-menu`,expandIcon:le.createElement("span",{className:`${St}-menu-submenu-arrow`},le.createElement(Te.Z,{className:`${St}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Ft,validator:Kt=>{let{mode:wn}=Kt}},dt)};return Zn(le.createElement(We.Z,Object.assign({alignPoint:Ne},(0,Ct.Z)(Me,["rootClassName"]),{mouseEnterDelay:qe,mouseLeaveDelay:Ke,visible:xe,builtinPlacements:it,arrow:!!je,overlayClassName:Qe,prefixCls:St,getPopupContainer:Mt||rn,transitionName:un,trigger:Ae,overlay:Nt,placement:_n,onVisibleChange:Bt}),Pe))};function he(Me){return Object.assign(Object.assign({},Me),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ve=(0,Ue.Z)(se,"dropdown",Me=>Me,he),Ee=Me=>le.createElement(ve,Object.assign({},Me),le.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=Ee,xn.Z=se},38854:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return te}});var le=me(91857),Te=me(92310),He=me.n(Te),lt=me(59301),We=me(18785),Ve=me(3113),Le=me(36355),Ct=me(81327),xt=me(33234),Ue=me(47211),bt=function(ee,de){var se={};for(var he in ee)Object.prototype.hasOwnProperty.call(ee,he)&&de.indexOf(he)<0&&(se[he]=ee[he]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,he=Object.getOwnPropertySymbols(ee);ve<he.length;ve++)de.indexOf(he[ve])<0&&Object.prototype.propertyIsEnumerable.call(ee,he[ve])&&(se[he[ve]]=ee[he[ve]]);return se};const at=ee=>{const{getPopupContainer:de,getPrefixCls:se,direction:he}=lt.useContext(Le.E_),{prefixCls:ve,type:Ee="default",danger:Me,disabled:Be,loading:je,onClick:_e,htmlType:Je,children:Xe,className:ht,menu:Ze,arrow:Mt,autoFocus:ot,overlay:Ot,trigger:Pt,align:Dt,open:Wt,onOpenChange:Lt,placement:qe,getPopupContainer:Ke,href:Rt,icon:Sn=lt.createElement(We.Z,null),title:Pn,buttonsRender:_t=Nt=>Nt,mouseEnterDelay:rn,mouseLeaveDelay:ln,overlayClassName:Wn,overlayStyle:un,destroyPopupOnHide:_n,dropdownRender:St}=ee,Zn=bt(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"]),li=se("dropdown",ve),Ge=`${li}-button`,[be,Pe]=(0,Ue.Z)(li),Ae={menu:Ze,arrow:Mt,autoFocus:ot,align:Dt,disabled:Be,trigger:Be?[]:Pt,onOpenChange:Lt,getPopupContainer:Ke||de,mouseEnterDelay:rn,mouseLeaveDelay:ln,overlayClassName:Wn,overlayStyle:un,destroyPopupOnHide:_n,dropdownRender:St},{compactSize:Ne,compactItemClassnames:xe}=(0,xt.ri)(li,he),ut=He()(Ge,xe,ht,Pe);"overlay"in ee&&(Ae.overlay=Ot),"open"in ee&&(Ae.open=Wt),"placement"in ee?Ae.placement=qe:Ae.placement=he==="rtl"?"bottomLeft":"bottomRight";const Bt=lt.createElement(Ve.ZP,{type:Ee,danger:Me,disabled:Be,loading:je,onClick:_e,htmlType:Je,href:Rt,title:Pn},Xe),Qe=lt.createElement(Ve.ZP,{type:Ee,danger:Me,icon:Sn}),[it,Ft]=_t([Bt,Qe]);return be(lt.createElement(Ct.Z.Compact,Object.assign({className:ut,size:Ne,block:!0},Zn),it,lt.createElement(le.Z,Object.assign({},Ae),Ft)))};at.__ANT_BUTTON=!0;var mt=at;const Oe=le.Z;Oe.Button=mt;var te=Oe},47211:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return bt}});var le=me(17313),Te=me(13826),He=me(92899),lt=me(29878),We=me(19447),Ve=me(83116),Le=me(37613),xt=at=>{const{componentCls:mt,menuCls:Oe,colorError:te,colorTextLightSolid:ee}=at,de=`${Oe}-item`;return{[`${mt}, ${mt}-menu-submenu`]:{[`${Oe} ${de}`]:{[`&${de}-danger:not(${de}-disabled)`]:{color:te,"&:hover":{color:ee,backgroundColor:te}}}}}};const Ue=at=>{const{componentCls:mt,menuCls:Oe,zIndexPopup:te,dropdownArrowDistance:ee,sizePopupArrow:de,antCls:se,iconCls:he,motionDurationMid:ve,dropdownPaddingVertical:Ee,fontSize:Me,dropdownEdgeChildPadding:Be,colorTextDisabled:je,fontSizeIcon:_e,controlPaddingHorizontal:Je,colorBgElevated:Xe}=at;return[{[mt]:Object.assign(Object.assign({},(0,le.Wf)(at)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te,display:"block","&::before":{position:"absolute",insetBlock:-ee+de/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${he}-down, & > ${se}-btn-icon > ${he}-down`]:{fontSize:_e}},[`${mt}-wrap`]:{position:"relative",[`${se}-btn > ${he}-down`]:{fontSize:_e},[`${he}-down::before`]:{transition:`transform ${ve}`}},[`${mt}-wrap-open`]:{[`${he}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${se}-slide-down-enter${se}-slide-down-enter-active${mt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${mt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${mt}-placement-bottom,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${mt}-placement-bottom,
|
|
|
&${se}-slide-down-enter${se}-slide-down-enter-active${mt}-placement-bottomRight,
|
|
|
&${se}-slide-down-appear${se}-slide-down-appear-active${mt}-placement-bottomRight`]:{animationName:Te.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${mt}-placement-topLeft,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${mt}-placement-topLeft,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${mt}-placement-top,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${mt}-placement-top,
|
|
|
&${se}-slide-up-enter${se}-slide-up-enter-active${mt}-placement-topRight,
|
|
|
&${se}-slide-up-appear${se}-slide-up-appear-active${mt}-placement-topRight`]:{animationName:Te.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${mt}-placement-bottomLeft,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${mt}-placement-bottom,
|
|
|
&${se}-slide-down-leave${se}-slide-down-leave-active${mt}-placement-bottomRight`]:{animationName:Te.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${mt}-placement-topLeft,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${mt}-placement-top,
|
|
|
&${se}-slide-up-leave${se}-slide-up-leave-active${mt}-placement-topRight`]:{animationName:Te.ly}})},(0,We.ZP)(at,{colorBg:Xe,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${mt} ${Oe}`]:{position:"relative",margin:0},[`${Oe}-submenu-popup`]:{position:"absolute",zIndex:te,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${mt}, ${mt}-menu-submenu`]:{[Oe]:Object.assign(Object.assign({padding:Be,listStyleType:"none",backgroundColor:Xe,backgroundClip:"padding-box",borderRadius:at.borderRadiusLG,outline:"none",boxShadow:at.boxShadowSecondary},(0,le.Qy)(at)),{[`${Oe}-item-group-title`]:{padding:`${Ee}px ${Je}px`,color:at.colorTextDescription,transition:`all ${ve}`},[`${Oe}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Oe}-item-icon`]:{minWidth:Me,marginInlineEnd:at.marginXS,fontSize:at.fontSizeSM},[`${Oe}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ve}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Oe}-item, ${Oe}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Ee}px ${Je}px`,color:at.colorText,fontWeight:"normal",fontSize:Me,lineHeight:at.lineHeight,cursor:"pointer",transition:`all ${ve}`,borderRadius:at.borderRadiusSM,"&:hover, &-active":{backgroundColor:at.controlItemBgHover}},(0,le.Qy)(at)),{"&-selected":{color:at.colorPrimary,backgroundColor:at.controlItemBgActive,"&:hover, &-active":{backgroundColor:at.controlItemBgActiveHover}},"&-disabled":{color:je,cursor:"not-allowed","&:hover":{color:je,backgroundColor:Xe,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${at.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:at.colorSplit},[`${mt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:at.paddingXS,[`${mt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:at.colorTextDescription,fontSize:_e,fontStyle:"normal"}}}),[`${Oe}-item-group-list`]:{margin:`0 ${at.marginXS}px`,padding:0,listStyle:"none"},[`${Oe}-submenu-title`]:{paddingInlineEnd:Je+at.fontSizeSM},[`${Oe}-submenu-vertical`]:{position:"relative"},[`${Oe}-submenu${Oe}-submenu-disabled ${mt}-menu-submenu-title`]:{[`&, ${mt}-menu-submenu-arrow-icon`]:{color:je,backgroundColor:Xe,cursor:"not-allowed"}},[`${Oe}-submenu-selected ${mt}-menu-submenu-title`]:{color:at.colorPrimary}})}},[(0,Te.oN)(at,"slide-up"),(0,Te.oN)(at,"slide-down"),(0,He.Fm)(at,"move-up"),(0,He.Fm)(at,"move-down"),(0,lt._y)(at,"zoom-big")]]};var bt=(0,Ve.Z)("Dropdown",(at,mt)=>{let{rootPrefixCls:Oe}=mt;const{marginXXS:te,sizePopupArrow:ee,controlHeight:de,fontSize:se,lineHeight:he,paddingXXS:ve,componentCls:Ee,borderRadiusLG:Me}=at,Be=(de-se*he)/2,{dropdownArrowOffset:je}=(0,We.fS)({contentRadius:Me}),_e=(0,Le.TS)(at,{menuCls:`${Ee}-menu`,rootPrefixCls:Oe,dropdownArrowDistance:ee/2+te,dropdownArrowOffset:je,dropdownPaddingVertical:Be,dropdownEdgeChildPadding:ve});return[Ue(_e),xt(_e)]},at=>({zIndexPopup:at.zIndexPopupBase+50}))},64165:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return ve}});var le=me(92310),Te=me.n(le),He=me(59301),lt=me(36355),We=me(9763),Ve=me(64993),Le=me(88088),xt=()=>{const[,Ee]=(0,Le.Z)(),Be=new Ve.C(Ee.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return He.createElement("svg",{style:Be,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},He.createElement("g",{fill:"none",fillRule:"evenodd"},He.createElement("g",{transform:"translate(24 31.67)"},He.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),He.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"}),He.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)"}),He.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"}),He.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"})),He.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"}),He.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},He.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),He.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},bt=()=>{const[,Ee]=(0,Le.Z)(),{colorFill:Me,colorFillTertiary:Be,colorFillQuaternary:je,colorBgContainer:_e}=Ee,{borderColor:Je,shadowColor:Xe,contentColor:ht}=(0,He.useMemo)(()=>({borderColor:new Ve.C(Me).onBackground(_e).toHexShortString(),shadowColor:new Ve.C(Be).onBackground(_e).toHexShortString(),contentColor:new Ve.C(je).onBackground(_e).toHexShortString()}),[Me,Be,je,_e]);return He.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},He.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},He.createElement("ellipse",{fill:Xe,cx:"32",cy:"33",rx:"32",ry:"7"}),He.createElement("g",{fillRule:"nonzero",stroke:Je},He.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"}),He.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:ht}))))},at=me(83116),mt=me(37613);const Oe=Ee=>{const{componentCls:Me,margin:Be,marginXS:je,marginXL:_e,fontSize:Je,lineHeight:Xe}=Ee;return{[Me]:{marginInline:je,fontSize:Je,lineHeight:Xe,textAlign:"center",[`${Me}-image`]:{height:Ee.emptyImgHeight,marginBottom:je,opacity:Ee.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Me}-description`]:{color:Ee.colorText},[`${Me}-footer`]:{marginTop:Be},"&-normal":{marginBlock:_e,color:Ee.colorTextDisabled,[`${Me}-description`]:{color:Ee.colorTextDisabled},[`${Me}-image`]:{height:Ee.emptyImgHeightMD}},"&-small":{marginBlock:je,color:Ee.colorTextDisabled,[`${Me}-image`]:{height:Ee.emptyImgHeightSM}}}}};var te=(0,at.Z)("Empty",Ee=>{const{componentCls:Me,controlHeightLG:Be}=Ee,je=(0,mt.TS)(Ee,{emptyImgCls:`${Me}-img`,emptyImgHeight:Be*2.5,emptyImgHeightMD:Be,emptyImgHeightSM:Be*.875});return[Oe(je)]}),ee=function(Ee,Me){var Be={};for(var je in Ee)Object.prototype.hasOwnProperty.call(Ee,je)&&Me.indexOf(je)<0&&(Be[je]=Ee[je]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _e=0,je=Object.getOwnPropertySymbols(Ee);_e<je.length;_e++)Me.indexOf(je[_e])<0&&Object.prototype.propertyIsEnumerable.call(Ee,je[_e])&&(Be[je[_e]]=Ee[je[_e]]);return Be};const de=He.createElement(xt,null),se=He.createElement(bt,null),he=Ee=>{var{className:Me,rootClassName:Be,prefixCls:je,image:_e=de,description:Je,children:Xe,imageStyle:ht,style:Ze}=Ee,Mt=ee(Ee,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:ot,direction:Ot,empty:Pt}=He.useContext(lt.E_),Dt=ot("empty",je),[Wt,Lt]=te(Dt),[qe]=(0,We.Z)("Empty"),Ke=typeof Je!="undefined"?Je:qe==null?void 0:qe.description,Rt=typeof Ke=="string"?Ke:"empty";let Sn=null;return typeof _e=="string"?Sn=He.createElement("img",{alt:Rt,src:_e}):Sn=_e,Wt(He.createElement("div",Object.assign({className:Te()(Lt,Dt,Pt==null?void 0:Pt.className,{[`${Dt}-normal`]:_e===se,[`${Dt}-rtl`]:Ot==="rtl"},Me,Be),style:Object.assign(Object.assign({},Pt==null?void 0:Pt.style),Ze)},Mt),He.createElement("div",{className:`${Dt}-image`,style:ht},Sn),Ke&&He.createElement("div",{className:`${Dt}-description`},Ke),Xe&&He.createElement("div",{className:`${Dt}-footer`},Xe)))};he.PRESENTED_IMAGE_DEFAULT=de,he.PRESENTED_IMAGE_SIMPLE=se;var ve=he},78241:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return Zt}});var le=me(26407),Te=me(92310),He=me.n(Te),lt=me(77900),We=me(59301),Ve=me(62892),Le=me(32441);function Ct(wt){const[vn,cn]=We.useState(wt);return We.useEffect(()=>{const It=setTimeout(()=>{cn(wt)},wt.length?0:10);return()=>{clearTimeout(It)}},[wt]),vn}var xt=me(17313),Ue=me(29878),bt=me(8378),at=me(37613),mt=me(83116),te=wt=>{const{componentCls:vn}=wt,cn=`${vn}-show-help`,It=`${vn}-show-help-item`;return{[cn]:{transition:`opacity ${wt.motionDurationSlow} ${wt.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[It]:{overflow:"hidden",transition:`height ${wt.motionDurationSlow} ${wt.motionEaseInOut},
|
|
|
opacity ${wt.motionDurationSlow} ${wt.motionEaseInOut},
|
|
|
transform ${wt.motionDurationSlow} ${wt.motionEaseInOut} !important`,[`&${It}-appear, &${It}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${It}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=wt=>({legend:{display:"block",width:"100%",marginBottom:wt.marginLG,padding:0,color:wt.colorTextDescription,fontSize:wt.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${wt.lineWidth}px ${wt.lineType} ${wt.colorBorder}`},label:{fontSize:wt.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 ${wt.controlOutlineWidth}px ${wt.controlOutline}`},output:{display:"block",paddingTop:15,color:wt.colorText,fontSize:wt.fontSize,lineHeight:wt.lineHeight}}),de=(wt,vn)=>{const{formItemCls:cn}=wt;return{[cn]:{[`${cn}-label > label`]:{height:vn},[`${cn}-control-input`]:{minHeight:vn}}}},se=wt=>{const{componentCls:vn}=wt;return{[wt.componentCls]:Object.assign(Object.assign(Object.assign({},(0,xt.Wf)(wt)),ee(wt)),{[`${vn}-text`]:{display:"inline-block",paddingInlineEnd:wt.paddingSM},"&-small":Object.assign({},de(wt,wt.controlHeightSM)),"&-large":Object.assign({},de(wt,wt.controlHeightLG))})}},he=wt=>{const{formItemCls:vn,iconCls:cn,componentCls:It,rootPrefixCls:ct,labelRequiredMarkColor:an,labelColor:dn,labelFontSize:ei,labelHeight:pn,labelColonMarginInlineStart:zt,labelColonMarginInlineEnd:In,itemMarginBottom:Qn}=wt;return{[vn]:Object.assign(Object.assign({},(0,xt.Wf)(wt)),{marginBottom:Qn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${ct}-row`]:{display:"none"},"&-has-warning":{[`${vn}-split`]:{color:wt.colorError}},"&-has-error":{[`${vn}-split`]:{color:wt.colorWarning}},[`${vn}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${wt.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:pn,color:dn,fontSize:ei,[`> ${cn}`]:{fontSize:wt.fontSize,verticalAlign:"top"},[`&${vn}-required:not(${vn}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:wt.marginXXS,color:an,fontSize:wt.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${It}-hide-required-mark &`]:{display:"none"}},[`${vn}-optional`]:{display:"inline-block",marginInlineStart:wt.marginXXS,color:wt.colorTextDescription,[`${It}-hide-required-mark &`]:{display:"none"}},[`${vn}-tooltip`]:{color:wt.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:wt.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:zt,marginInlineEnd:In},[`&${vn}-no-colon::after`]:{content:'"\\a0"'}}},[`${vn}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ct}-col-'"]):not([class*="' ${ct}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:wt.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[vn]:{"&-explain, &-extra":{clear:"both",color:wt.colorTextDescription,fontSize:wt.fontSize,lineHeight:wt.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:wt.controlHeightSM,transition:`color ${wt.motionDurationMid} ${wt.motionEaseOut}`},"&-explain":{"&-error":{color:wt.colorError},"&-warning":{color:wt.colorWarning}}},[`&-with-help ${vn}-explain`]:{height:"auto",opacity:1},[`${vn}-feedback-icon`]:{fontSize:wt.fontSize,textAlign:"center",visibility:"visible",animationName:Ue.kr,animationDuration:wt.motionDurationMid,animationTimingFunction:wt.motionEaseOutBack,pointerEvents:"none","&-success":{color:wt.colorSuccess},"&-error":{color:wt.colorError},"&-warning":{color:wt.colorWarning},"&-validating":{color:wt.colorPrimary}}})}},ve=wt=>{const{componentCls:vn,formItemCls:cn}=wt;return{[`${vn}-horizontal`]:{[`${cn}-label`]:{flexGrow:0},[`${cn}-control`]:{flex:"1 1 0",minWidth:0},[`${cn}-label[class$='-24'], ${cn}-label[class*='-24 ']`]:{[`& + ${cn}-control`]:{minWidth:"unset"}}}}},Ee=wt=>{const{componentCls:vn,formItemCls:cn}=wt;return{[`${vn}-inline`]:{display:"flex",flexWrap:"wrap",[cn]:{flex:"none",marginInlineEnd:wt.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${cn}-label,
|
|
|
> ${cn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${cn}-label`]:{flex:"none"},[`${vn}-text`]:{display:"inline-block"},[`${cn}-has-feedback`]:{display:"inline-block"}}}}},Me=wt=>({padding:wt.verticalLabelPadding,margin:wt.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Be=wt=>{const{componentCls:vn,formItemCls:cn,rootPrefixCls:It}=wt;return{[`${cn} ${cn}-label`]:Me(wt),[vn]:{[cn]:{flexWrap:"wrap",[`${cn}-label, ${cn}-control`]:{[`&:not([class*=" ${It}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},je=wt=>{const{componentCls:vn,formItemCls:cn,rootPrefixCls:It}=wt;return{[`${vn}-vertical`]:{[cn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${vn}-item-control`]:{width:"100%"}}},[`${vn}-vertical ${cn}-label,
|
|
|
.${It}-col-24${cn}-label,
|
|
|
.${It}-col-xl-24${cn}-label`]:Me(wt),[`@media (max-width: ${wt.screenXSMax}px)`]:[Be(wt),{[vn]:{[`.${It}-col-xs-24${cn}-label`]:Me(wt)}}],[`@media (max-width: ${wt.screenSMMax}px)`]:{[vn]:{[`.${It}-col-sm-24${cn}-label`]:Me(wt)}},[`@media (max-width: ${wt.screenMDMax}px)`]:{[vn]:{[`.${It}-col-md-24${cn}-label`]:Me(wt)}},[`@media (max-width: ${wt.screenLGMax}px)`]:{[vn]:{[`.${It}-col-lg-24${cn}-label`]:Me(wt)}}}},_e=(wt,vn)=>(0,at.TS)(wt,{formItemCls:`${wt.componentCls}-item`,rootPrefixCls:vn});var Je=(0,mt.Z)("Form",(wt,vn)=>{let{rootPrefixCls:cn}=vn;const It=_e(wt,cn);return[se(It),he(It),te(It),ve(It),Ee(It),je(It),(0,bt.Z)(It),Ue.kr]},wt=>({labelRequiredMarkColor:wt.colorError,labelColor:wt.colorTextHeading,labelFontSize:wt.fontSize,labelHeight:wt.controlHeight,labelColonMarginInlineStart:wt.marginXXS/2,labelColonMarginInlineEnd:wt.marginXS,itemMarginBottom:wt.marginLG,verticalLabelPadding:`0 0 ${wt.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Xe=[];function ht(wt,vn,cn){let It=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof wt=="string"?wt:`${vn}-${It}`,error:wt,errorStatus:cn}}var Mt=wt=>{let{help:vn,helpStatus:cn,errors:It=Xe,warnings:ct=Xe,className:an,fieldId:dn,onVisibleChanged:ei}=wt;const{prefixCls:pn}=We.useContext(Le.Rk),zt=`${pn}-item-explain`,[,In]=Je(pn),Qn=(0,We.useMemo)(()=>(0,Ve.Z)(pn),[pn]),xi=Ct(It),tn=Ct(ct),fn=We.useMemo(()=>vn!=null?[ht(vn,"help",cn)]:[].concat((0,le.Z)(xi.map((zi,Di)=>ht(zi,"error","error",Di))),(0,le.Z)(tn.map((zi,Di)=>ht(zi,"warning","warning",Di)))),[vn,cn,xi,tn]),kn={};return dn&&(kn.id=`${dn}_help`),We.createElement(lt.default,{motionDeadline:Qn.motionDeadline,motionName:`${pn}-show-help`,visible:!!fn.length,onVisibleChanged:ei},zi=>{const{className:Di,style:Si}=zi;return We.createElement("div",Object.assign({},kn,{className:He()(zt,Di,an,In),style:Si,role:"alert"}),We.createElement(lt.CSSMotionList,Object.assign({keys:fn},(0,Ve.Z)(pn),{motionName:`${pn}-show-help-item`,component:!1}),Fi=>{const{key:Ti,error:nr,errorStatus:$r,className:ci,style:Ki}=Fi;return We.createElement("div",{key:Ti,className:He()(ci,{[`${zt}-${$r}`]:$r}),style:Ki},nr)}))})},ot=me(95013),Ot=me(36355),Pt=me(1684),Dt=me(52946),Wt=me(19716),Lt=me(16722);const qe=["parentNode"],Ke="form_item";function Rt(wt){return wt===void 0||wt===!1?[]:Array.isArray(wt)?wt:[wt]}function Sn(wt,vn){if(!wt.length)return;const cn=wt.join("_");return vn?`${vn}_${cn}`:qe.includes(cn)?`${Ke}_${cn}`:cn}function Pn(wt,vn,cn,It,ct,an){let dn=It;return an!==void 0?dn=an:cn.validating?dn="validating":wt.length?dn="error":vn.length?dn="warning":(cn.touched||ct&&cn.validated)&&(dn="success"),dn}function _t(wt){return Rt(wt).join("_")}function rn(wt){const[vn]=(0,ot.useForm)(),cn=We.useRef({}),It=We.useMemo(()=>wt!=null?wt:Object.assign(Object.assign({},vn),{__INTERNAL__:{itemRef:ct=>an=>{const dn=_t(ct);an?cn.current[dn]=an:delete cn.current[dn]}},scrollToField:function(ct){let an=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const dn=Rt(ct),ei=Sn(dn,It.__INTERNAL__.name),pn=ei?document.getElementById(ei):null;pn&&(0,Lt.Z)(pn,Object.assign({scrollMode:"if-needed",block:"nearest"},an))},getFieldInstance:ct=>{const an=_t(ct);return cn.current[an]}}),[wt,vn]);return[It]}var ln=me(28726),Wn=function(wt,vn){var cn={};for(var It in wt)Object.prototype.hasOwnProperty.call(wt,It)&&vn.indexOf(It)<0&&(cn[It]=wt[It]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,It=Object.getOwnPropertySymbols(wt);ct<It.length;ct++)vn.indexOf(It[ct])<0&&Object.prototype.propertyIsEnumerable.call(wt,It[ct])&&(cn[It[ct]]=wt[It[ct]]);return cn};const un=(wt,vn)=>{const cn=We.useContext(Pt.Z),{getPrefixCls:It,direction:ct,form:an}=We.useContext(Ot.E_),{prefixCls:dn,className:ei,rootClassName:pn,size:zt,disabled:In=cn,form:Qn,colon:xi,labelAlign:tn,labelWrap:fn,labelCol:kn,wrapperCol:zi,hideRequiredMark:Di,layout:Si="horizontal",scrollToFirstError:Fi,requiredMark:Ti,onFinishFailed:nr,name:$r,style:ci,feedbackIcons:Ki}=wt,Yr=Wn(wt,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Qr=(0,Wt.Z)(zt),Cr=We.useContext(ln.Z),Jt=(0,We.useMemo)(()=>Ti!==void 0?Ti:an&&an.requiredMark!==void 0?an.requiredMark:!Di,[Di,Ti,an]),gi=xi!=null?xi:an==null?void 0:an.colon,mr=It("form",dn),[tr,Hr]=Je(mr),Lr=He()(mr,`${mr}-${Si}`,{[`${mr}-hide-required-mark`]:Jt===!1,[`${mr}-rtl`]:ct==="rtl",[`${mr}-${Qr}`]:Qr},Hr,an==null?void 0:an.className,ei,pn),[lo]=rn(Qn),{__INTERNAL__:Wr}=lo;Wr.name=$r;const jr=(0,We.useMemo)(()=>({name:$r,labelAlign:tn,labelCol:kn,labelWrap:fn,wrapperCol:zi,vertical:Si==="vertical",colon:gi,requiredMark:Jt,itemRef:Wr.itemRef,form:lo,feedbackIcons:Ki}),[$r,tn,kn,zi,Si,gi,Jt,lo,Ki]);We.useImperativeHandle(vn,()=>lo);const fo=(aa,Un)=>{if(aa){let Do={block:"nearest"};typeof aa=="object"&&(Do=aa),lo.scrollToField(Un,Do)}},$n=aa=>{if(nr==null||nr(aa),aa.errorFields.length){const Un=aa.errorFields[0].name;if(Fi!==void 0){fo(Fi,Un);return}an&&an.scrollToFirstError!==void 0&&fo(an.scrollToFirstError,Un)}};return tr(We.createElement(Pt.n,{disabled:In},We.createElement(Dt.q,{size:Qr},We.createElement(Le.RV,Object.assign({},{validateMessages:Cr}),We.createElement(Le.q3.Provider,{value:jr},We.createElement(ot.default,Object.assign({id:$r},Yr,{name:$r,onFinishFailed:$n,form:lo,style:Object.assign(Object.assign({},an==null?void 0:an.style),ci),className:Lr})))))))};var St=We.forwardRef(un),Zn=me(41799),li=me(8654),Ge=me(92343),be=me(11592);function Pe(wt){if(typeof wt=="function")return wt;const vn=(0,be.Z)(wt);return vn.length<=1?vn[0]:vn}const Ae=()=>{const{status:wt,errors:vn=[],warnings:cn=[]}=(0,We.useContext)(Le.aM);return{status:wt,errors:vn,warnings:cn}};Ae.Context=Le.aM;var Ne=Ae,xe=me(16089);function ut(wt){const[vn,cn]=We.useState(wt),It=(0,We.useRef)(null),ct=(0,We.useRef)([]),an=(0,We.useRef)(!1);We.useEffect(()=>(an.current=!1,()=>{an.current=!0,xe.Z.cancel(It.current),It.current=null}),[]);function dn(ei){an.current||(It.current===null&&(ct.current=[],It.current=(0,xe.Z)(()=>{It.current=null,cn(pn=>{let zt=pn;return ct.current.forEach(In=>{zt=In(zt)}),zt})})),ct.current.push(ei))}return[vn,dn]}function Bt(){const{itemRef:wt}=We.useContext(Le.q3),vn=We.useRef({});function cn(It,ct){const an=ct&&typeof ct=="object"&&ct.ref,dn=It.join("_");return(vn.current.name!==dn||vn.current.originRef!==an)&&(vn.current.name=dn,vn.current.originRef=an,vn.current.ref=(0,li.sQ)(wt(It),an)),vn.current.ref}return cn}var Qe=me(29194),it=me(34280),Ft=me(2738),Nt=me(27382),dt=me(37028);const Kt=wt=>{const{formItemCls:vn}=wt;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${vn}-control`]:{display:"flex"}}}};var wn=(0,mt.b)(["Form","item-item"],(wt,vn)=>{let{rootPrefixCls:cn}=vn;const It=_e(wt,cn);return[Kt(It)]}),qt=wt=>{const{prefixCls:vn,status:cn,wrapperCol:It,children:ct,errors:an,warnings:dn,_internalItemRender:ei,extra:pn,help:zt,fieldId:In,marginBottom:Qn,onErrorVisibleChanged:xi}=wt,tn=`${vn}-item`,fn=We.useContext(Le.q3),kn=It||fn.wrapperCol||{},zi=He()(`${tn}-control`,kn.className),Di=We.useMemo(()=>Object.assign({},fn),[fn]);delete Di.labelCol,delete Di.wrapperCol;const Si=We.createElement("div",{className:`${tn}-control-input`},We.createElement("div",{className:`${tn}-control-input-content`},ct)),Fi=We.useMemo(()=>({prefixCls:vn,status:cn}),[vn,cn]),Ti=Qn!==null||an.length||dn.length?We.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},We.createElement(Le.Rk.Provider,{value:Fi},We.createElement(Mt,{fieldId:In,errors:an,warnings:dn,help:zt,helpStatus:cn,className:`${tn}-explain-connected`,onVisibleChanged:xi})),!!Qn&&We.createElement("div",{style:{width:0,height:Qn}})):null,nr={};In&&(nr.id=`${In}_extra`);const $r=pn?We.createElement("div",Object.assign({},nr,{className:`${tn}-extra`}),pn):null,ci=ei&&ei.mark==="pro_table_render"&&ei.render?ei.render(wt,{input:Si,errorList:Ti,extra:$r}):We.createElement(We.Fragment,null,Si,Ti,$r);return We.createElement(Le.q3.Provider,{value:Di},We.createElement(dt.Z,Object.assign({},kn,{className:zi}),ci),We.createElement(wn,{prefixCls:vn}))},Rn=me(61485),Vn=me(31724),hn=me(9763),Yn=me(6848),mi=function(wt,vn){var cn={};for(var It in wt)Object.prototype.hasOwnProperty.call(wt,It)&&vn.indexOf(It)<0&&(cn[It]=wt[It]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,It=Object.getOwnPropertySymbols(wt);ct<It.length;ct++)vn.indexOf(It[ct])<0&&Object.prototype.propertyIsEnumerable.call(wt,It[ct])&&(cn[It[ct]]=wt[It[ct]]);return cn};function jn(wt){return wt?typeof wt=="object"&&!We.isValidElement(wt)?wt:{title:wt}:null}var wi=wt=>{let{prefixCls:vn,label:cn,htmlFor:It,labelCol:ct,labelAlign:an,colon:dn,required:ei,requiredMark:pn,tooltip:zt}=wt;var In;const[Qn]=(0,hn.Z)("Form"),{vertical:xi,labelAlign:tn,labelCol:fn,labelWrap:kn,colon:zi}=We.useContext(Le.q3);if(!cn)return null;const Di=ct||fn||{},Si=an||tn,Fi=`${vn}-item-label`,Ti=He()(Fi,Si==="left"&&`${Fi}-left`,Di.className,{[`${Fi}-wrap`]:!!kn});let nr=cn;const $r=dn===!0||zi!==!1&&dn!==!1;$r&&!xi&&typeof cn=="string"&&cn.trim()!==""&&(nr=cn.replace(/[:|:]\s*$/,""));const Ki=jn(zt);if(Ki){const{icon:Jt=We.createElement(Rn.Z,null)}=Ki,gi=mi(Ki,["icon"]),mr=We.createElement(Yn.Z,Object.assign({},gi),We.cloneElement(Jt,{className:`${vn}-item-tooltip`,title:""}));nr=We.createElement(We.Fragment,null,nr,mr)}const Yr=pn==="optional",Qr=typeof pn=="function";Qr?nr=pn(nr,{required:!!ei}):Yr&&!ei&&(nr=We.createElement(We.Fragment,null,nr,We.createElement("span",{className:`${vn}-item-optional`,title:""},(Qn==null?void 0:Qn.optional)||((In=Vn.Z.Form)===null||In===void 0?void 0:In.optional))));const Cr=He()({[`${vn}-item-required`]:ei,[`${vn}-item-required-mark-optional`]:Yr||Qr,[`${vn}-item-no-colon`]:!$r});return We.createElement(dt.Z,Object.assign({},Di,{className:Ti}),We.createElement("label",{htmlFor:It,className:Cr,title:typeof cn=="string"?cn:""},nr))},ji=me(29679),Wi=me(19248),dr=me(96512),Mr=me(58617);const pi={success:ji.Z,warning:dr.Z,error:Wi.Z,validating:Mr.Z};function ui(wt){let{children:vn,errors:cn,warnings:It,hasFeedback:ct,validateStatus:an,prefixCls:dn,meta:ei,noStyle:pn}=wt;const zt=`${dn}-item`,{feedbackIcons:In}=We.useContext(Le.q3),Qn=Pn(cn,It,ei,null,!!ct,an),{isFormItemInput:xi,status:tn}=We.useContext(Le.aM),fn=We.useMemo(()=>{var kn;let zi;if(ct){const Fi=ct!==!0&&ct.icons||In,Ti=Qn&&((kn=Fi==null?void 0:Fi({status:Qn,errors:cn,warnings:It}))===null||kn===void 0?void 0:kn[Qn]),nr=Qn&&pi[Qn];zi=Ti!==!1&&nr?We.createElement("span",{className:He()(`${zt}-feedback-icon`,`${zt}-feedback-icon-${Qn}`)},Ti||We.createElement(nr,null)):null}let Di=!0,Si=Qn||"";return pn&&(Di=xi,Si=(Qn!=null?Qn:tn)||""),{status:Si,errors:cn,warnings:It,hasFeedback:!!ct,feedbackIcon:zi,isFormItemInput:Di}},[Qn,ct,pn,xi,tn]);return We.createElement(Le.aM.Provider,{value:fn},vn)}var Ci=function(wt,vn){var cn={};for(var It in wt)Object.prototype.hasOwnProperty.call(wt,It)&&vn.indexOf(It)<0&&(cn[It]=wt[It]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,It=Object.getOwnPropertySymbols(wt);ct<It.length;ct++)vn.indexOf(It[ct])<0&&Object.prototype.propertyIsEnumerable.call(wt,It[ct])&&(cn[It[ct]]=wt[It[ct]]);return cn};function Xi(wt){const{prefixCls:vn,className:cn,rootClassName:It,style:ct,help:an,errors:dn,warnings:ei,validateStatus:pn,meta:zt,hasFeedback:In,hidden:Qn,children:xi,fieldId:tn,required:fn,isRequired:kn,onSubItemMetaChange:zi}=wt,Di=Ci(wt,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Si=`${vn}-item`,{requiredMark:Fi}=We.useContext(Le.q3),Ti=We.useRef(null),nr=Ct(dn),$r=Ct(ei),ci=an!=null,Ki=!!(ci||dn.length||ei.length),Yr=!!Ti.current&&(0,Qe.Z)(Ti.current),[Qr,Cr]=We.useState(null);(0,it.Z)(()=>{if(Ki&&Ti.current){const Hr=getComputedStyle(Ti.current);Cr(parseInt(Hr.marginBottom,10))}},[Ki,Yr]);const Jt=Hr=>{Hr||Cr(null)},mr=function(){let Hr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Lr=Hr?nr:zt.errors,lo=Hr?$r:zt.warnings;return Pn(Lr,lo,zt,"",!!In,pn)}(),tr=He()(Si,cn,It,{[`${Si}-with-help`]:ci||nr.length||$r.length,[`${Si}-has-feedback`]:mr&&In,[`${Si}-has-success`]:mr==="success",[`${Si}-has-warning`]:mr==="warning",[`${Si}-has-error`]:mr==="error",[`${Si}-is-validating`]:mr==="validating",[`${Si}-hidden`]:Qn});return We.createElement("div",{className:tr,style:ct,ref:Ti},We.createElement(Nt.Z,Object.assign({className:`${Si}-row`},(0,Ft.Z)(Di,["_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"])),We.createElement(wi,Object.assign({htmlFor:tn},wt,{requiredMark:Fi,required:fn!=null?fn:kn,prefixCls:vn})),We.createElement(qt,Object.assign({},wt,zt,{errors:nr,warnings:$r,prefixCls:vn,status:mr,help:an,marginBottom:Qr,onErrorVisibleChanged:Jt}),We.createElement(Le.qI.Provider,{value:zi},We.createElement(ui,{prefixCls:vn,meta:zt,errors:zt.errors,warnings:zt.warnings,hasFeedback:In,validateStatus:mr},xi)))),!!Qr&&We.createElement("div",{className:`${Si}-margin-offset`,style:{marginBottom:-Qr}}))}const Ni="__SPLIT__",io=null,hr=We.memo(wt=>{let{children:vn}=wt;return vn},(wt,vn)=>wt.value===vn.value&&wt.update===vn.update&&wt.childProps.length===vn.childProps.length&&wt.childProps.every((cn,It)=>cn===vn.childProps[It]));function De(wt){return wt!=null}function Ei(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Pr(wt){const{name:vn,noStyle:cn,className:It,dependencies:ct,prefixCls:an,shouldUpdate:dn,rules:ei,children:pn,required:zt,label:In,messageVariables:Qn,trigger:xi="onChange",validateTrigger:tn,hidden:fn,help:kn}=wt,{getPrefixCls:zi}=We.useContext(Ot.E_),{name:Di}=We.useContext(Le.q3),Si=Pe(pn),Fi=typeof Si=="function",Ti=We.useContext(Le.qI),{validateTrigger:nr}=We.useContext(ot.FieldContext),$r=tn!==void 0?tn:nr,ci=De(vn),Ki=zi("form",an),[Yr,Qr]=Je(Ki),Cr=We.useContext(ot.ListContext),Jt=We.useRef(),[gi,mr]=ut({}),[tr,Hr]=(0,Zn.Z)(()=>Ei()),Lr=Un=>{const Do=Cr==null?void 0:Cr.getKey(Un.name);if(Hr(Un.destroy?Ei():Un,!0),cn&&kn!==!1&&Ti){let Ko=Un.name;if(Un.destroy)Ko=Jt.current||Ko;else if(Do!==void 0){const[Ji,la]=Do;Ko=[Ji].concat((0,le.Z)(la)),Jt.current=Ko}Ti(Un,Ko)}},lo=(Un,Do)=>{mr(Ko=>{const Ji=Object.assign({},Ko),Ro=[].concat((0,le.Z)(Un.name.slice(0,-1)),(0,le.Z)(Do)).join(Ni);return Un.destroy?delete Ji[Ro]:Ji[Ro]=Un,Ji})},[Wr,jr]=We.useMemo(()=>{const Un=(0,le.Z)(tr.errors),Do=(0,le.Z)(tr.warnings);return Object.values(gi).forEach(Ko=>{Un.push.apply(Un,(0,le.Z)(Ko.errors||[])),Do.push.apply(Do,(0,le.Z)(Ko.warnings||[]))}),[Un,Do]},[gi,tr.errors,tr.warnings]),fo=Bt();function $n(Un,Do,Ko){return cn&&!fn?We.createElement(ui,{prefixCls:Ki,hasFeedback:wt.hasFeedback,validateStatus:wt.validateStatus,meta:tr,errors:Wr,warnings:jr,noStyle:!0},Un):We.createElement(Xi,Object.assign({key:"row"},wt,{className:He()(It,Qr),prefixCls:Ki,fieldId:Do,isRequired:Ko,errors:Wr,warnings:jr,meta:tr,onSubItemMetaChange:lo}),Un)}if(!ci&&!Fi&&!ct)return Yr($n(Si));let aa={};return typeof In=="string"?aa.label=In:vn&&(aa.label=String(vn)),Qn&&(aa=Object.assign(Object.assign({},aa),Qn)),Yr(We.createElement(ot.Field,Object.assign({},wt,{messageVariables:aa,trigger:xi,validateTrigger:$r,onMetaChange:Lr}),(Un,Do,Ko)=>{const Ji=Rt(vn).length&&Do?Do.name:[],la=Sn(Ji,Di),Ro=zt!==void 0?zt:!!(ei&&ei.some(xo=>{if(xo&&typeof xo=="object"&&xo.required&&!xo.warningOnly)return!0;if(typeof xo=="function"){const Wo=xo(Ko);return Wo&&Wo.required&&!Wo.warningOnly}return!1})),Nr=Object.assign({},Un);let Ar=null;if(Array.isArray(Si)&&ci)Ar=Si;else if(!(Fi&&(!(dn||ct)||ci))){if(!(ct&&!Fi&&!ci))if((0,Ge.l$)(Si)){const xo=Object.assign(Object.assign({},Si.props),Nr);if(xo.id||(xo.id=la),kn||Wr.length>0||jr.length>0||wt.extra){const st=[];(kn||Wr.length>0)&&st.push(`${la}_help`),wt.extra&&st.push(`${la}_extra`),xo["aria-describedby"]=st.join(" ")}Wr.length>0&&(xo["aria-invalid"]="true"),Ro&&(xo["aria-required"]="true"),(0,li.Yr)(Si)&&(xo.ref=fo(Ji,Si)),new Set([].concat((0,le.Z)(Rt(xi)),(0,le.Z)(Rt($r)))).forEach(st=>{xo[st]=function(){for(var _o,Ia,Ma,xs,Wa,Ps=arguments.length,Lo=new Array(Ps),Po=0;Po<Ps;Po++)Lo[Po]=arguments[Po];(Ma=Nr[st])===null||Ma===void 0||(_o=Ma).call.apply(_o,[Nr].concat(Lo)),(Wa=(xs=Si.props)[st])===null||Wa===void 0||(Ia=Wa).call.apply(Ia,[xs].concat(Lo))}});const Hi=[xo["aria-required"],xo["aria-invalid"],xo["aria-describedby"]];Ar=We.createElement(hr,{value:Nr[wt.valuePropName||"value"],update:Si,childProps:Hi},(0,Ge.Tm)(Si,xo))}else Fi&&(dn||ct)&&!ci?Ar=Si(Ko):Ar=Si}return $n(Ar,la,Ro)}))}const Ln=Pr;Ln.useStatus=Ne;var vi=Ln,Zi=function(wt,vn){var cn={};for(var It in wt)Object.prototype.hasOwnProperty.call(wt,It)&&vn.indexOf(It)<0&&(cn[It]=wt[It]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,It=Object.getOwnPropertySymbols(wt);ct<It.length;ct++)vn.indexOf(It[ct])<0&&Object.prototype.propertyIsEnumerable.call(wt,It[ct])&&(cn[It[ct]]=wt[It[ct]]);return cn},Gn=wt=>{var{prefixCls:vn,children:cn}=wt,It=Zi(wt,["prefixCls","children"]);const{getPrefixCls:ct}=We.useContext(Ot.E_),an=ct("form",vn),dn=We.useMemo(()=>({prefixCls:an,status:"error"}),[an]);return We.createElement(ot.List,Object.assign({},It),(ei,pn,zt)=>We.createElement(Le.Rk.Provider,{value:dn},cn(ei.map(In=>Object.assign(Object.assign({},In),{fieldKey:In.key})),pn,{errors:zt.errors,warnings:zt.warnings})))};function $t(){const{form:wt}=(0,We.useContext)(Le.q3);return wt}const Gt=St;Gt.Item=vi,Gt.List=Gn,Gt.ErrorList=Mt,Gt.useForm=rn,Gt.useFormInstance=$t,Gt.useWatch=ot.useWatch,Gt.Provider=Le.RV,Gt.create=()=>{};var Zt=Gt},8628:function(Tn,xn,me){"use strict";var le=me(59301),Te=me(34280),He=me(56762),lt=me(69507);function We(){let Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Le=(0,le.useRef)({}),Ct=(0,He.Z)(),xt=(0,lt.ZP)();return(0,Te.Z)(()=>{const Ue=xt.subscribe(bt=>{Le.current=bt,Ve&&Ct()});return()=>xt.unsubscribe(Ue)},[]),Le.current}xn.Z=We},9432:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return he},n:function(){return de}});var le=me(19248),Te=me(92310),He=me.n(Te),lt=me(93681),We=me(8654),Ve=me(59301),Le=me(19080),Ct=me(36355),xt=me(1684),Ue=me(19716),bt=me(32441),at=me(33234),mt=me(59412),Oe=me(9937);function te(ve){return!!(ve.prefix||ve.suffix||ve.allowClear)}var ee=function(ve,Ee){var Me={};for(var Be in ve)Object.prototype.hasOwnProperty.call(ve,Be)&&Ee.indexOf(Be)<0&&(Me[Be]=ve[Be]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Be=Object.getOwnPropertySymbols(ve);je<Be.length;je++)Ee.indexOf(Be[je])<0&&Object.prototype.propertyIsEnumerable.call(ve,Be[je])&&(Me[Be[je]]=ve[Be[je]]);return Me};function de(ve,Ee){if(!ve)return;ve.focus(Ee);const{cursor:Me}=Ee||{};if(Me){const Be=ve.value.length;switch(Me){case"start":ve.setSelectionRange(0,0);break;case"end":ve.setSelectionRange(Be,Be);break;default:ve.setSelectionRange(0,Be);break}}}var he=(0,Ve.forwardRef)((ve,Ee)=>{var Me;const{prefixCls:Be,bordered:je=!0,status:_e,size:Je,disabled:Xe,onBlur:ht,onFocus:Ze,suffix:Mt,allowClear:ot,addonAfter:Ot,addonBefore:Pt,className:Dt,style:Wt,styles:Lt,rootClassName:qe,onChange:Ke,classNames:Rt}=ve,Sn=ee(ve,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Pn,direction:_t,input:rn}=Ve.useContext(Ct.E_),ln=Pn("input",Be),Wn=(0,Ve.useRef)(null),[un,_n]=(0,Oe.ZP)(ln),{compactSize:St,compactItemClassnames:Zn}=(0,at.ri)(ln,_t),li=(0,Ue.Z)(wn=>{var sn;return(sn=Je!=null?Je:St)!==null&&sn!==void 0?sn:wn}),Ge=Ve.useContext(xt.Z),be=Xe!=null?Xe:Ge,{status:Pe,hasFeedback:Ae,feedbackIcon:Ne}=(0,Ve.useContext)(bt.aM),xe=(0,Le.F)(Pe,_e),ut=te(ve)||!!Ae,Bt=(0,Ve.useRef)(ut);(0,Ve.useEffect)(()=>{var wn;ut&&Bt.current,Bt.current=ut},[ut]);const Qe=(0,mt.Z)(Wn,!0),it=wn=>{Qe(),ht==null||ht(wn)},Ft=wn=>{Qe(),Ze==null||Ze(wn)},Nt=wn=>{Qe(),Ke==null||Ke(wn)},dt=(Ae||Mt)&&Ve.createElement(Ve.Fragment,null,Mt,Ae&&Ne);let Kt;return typeof ot=="object"&&(ot!=null&&ot.clearIcon)?Kt=ot:ot&&(Kt={clearIcon:Ve.createElement(le.Z,null)}),un(Ve.createElement(lt.default,Object.assign({ref:(0,We.sQ)(Ee,Wn),prefixCls:ln,autoComplete:rn==null?void 0:rn.autoComplete},Sn,{disabled:be,onBlur:it,onFocus:Ft,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Wt),styles:Object.assign(Object.assign({},rn==null?void 0:rn.styles),Lt),suffix:dt,allowClear:Kt,className:He()(Dt,qe,Zn,rn==null?void 0:rn.className),onChange:Nt,addonAfter:Ot&&Ve.createElement(at.BR,null,Ve.createElement(bt.Ux,{override:!0,status:!0},Ot)),addonBefore:Pt&&Ve.createElement(at.BR,null,Ve.createElement(bt.Ux,{override:!0,status:!0},Pt)),classNames:Object.assign(Object.assign(Object.assign({},Rt),rn==null?void 0:rn.classNames),{input:He()({[`${ln}-sm`]:li==="small",[`${ln}-lg`]:li==="large",[`${ln}-rtl`]:_t==="rtl",[`${ln}-borderless`]:!je},!ut&&(0,Le.Z)(ln,xe),Rt==null?void 0:Rt.input,(Me=rn==null?void 0:rn.classNames)===null||Me===void 0?void 0:Me.input,_n)}),classes:{affixWrapper:He()({[`${ln}-affix-wrapper-sm`]:li==="small",[`${ln}-affix-wrapper-lg`]:li==="large",[`${ln}-affix-wrapper-rtl`]:_t==="rtl",[`${ln}-affix-wrapper-borderless`]:!je},(0,Le.Z)(`${ln}-affix-wrapper`,xe,Ae),_n),wrapper:He()({[`${ln}-group-rtl`]:_t==="rtl"},_n),group:He()({[`${ln}-group-wrapper-sm`]:li==="small",[`${ln}-group-wrapper-lg`]:li==="large",[`${ln}-group-wrapper-rtl`]:_t==="rtl",[`${ln}-group-wrapper-disabled`]:be},(0,Le.Z)(`${ln}-group-wrapper`,xe,Ae),_n)}})))})},1643:function(Tn,xn,me){"use strict";var le=me(19248),Te=me(92310),He=me.n(Te),lt=me(9296),We=me(59301),Ve=me(19080),Le=me(36355),Ct=me(1684),xt=me(19716),Ue=me(32441),bt=me(9432),at=me(9937),mt=function(te,ee){var de={};for(var se in te)Object.prototype.hasOwnProperty.call(te,se)&&ee.indexOf(se)<0&&(de[se]=te[se]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,se=Object.getOwnPropertySymbols(te);he<se.length;he++)ee.indexOf(se[he])<0&&Object.prototype.propertyIsEnumerable.call(te,se[he])&&(de[se[he]]=te[se[he]]);return de};const Oe=(0,We.forwardRef)((te,ee)=>{const{prefixCls:de,bordered:se=!0,size:he,disabled:ve,status:Ee,allowClear:Me,showCount:Be,classNames:je,rootClassName:_e,className:Je}=te,Xe=mt(te,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:ht,direction:Ze}=We.useContext(Le.E_),Mt=(0,xt.Z)(he),ot=We.useContext(Ct.Z),Ot=ve!=null?ve:ot,{status:Pt,hasFeedback:Dt,feedbackIcon:Wt}=We.useContext(Ue.aM),Lt=(0,Ve.F)(Pt,Ee),qe=We.useRef(null);We.useImperativeHandle(ee,()=>{var _t;return{resizableTextArea:(_t=qe.current)===null||_t===void 0?void 0:_t.resizableTextArea,focus:rn=>{var ln,Wn;(0,bt.n)((Wn=(ln=qe.current)===null||ln===void 0?void 0:ln.resizableTextArea)===null||Wn===void 0?void 0:Wn.textArea,rn)},blur:()=>{var rn;return(rn=qe.current)===null||rn===void 0?void 0:rn.blur()}}});const Ke=ht("input",de);let Rt;typeof Me=="object"&&(Me!=null&&Me.clearIcon)?Rt=Me:Me&&(Rt={clearIcon:We.createElement(le.Z,null)});const[Sn,Pn]=(0,at.ZP)(Ke);return Sn(We.createElement(lt.default,Object.assign({},Xe,{disabled:Ot,allowClear:Rt,className:He()(Je,_e),classes:{affixWrapper:He()(`${Ke}-textarea-affix-wrapper`,{[`${Ke}-affix-wrapper-rtl`]:Ze==="rtl",[`${Ke}-affix-wrapper-borderless`]:!se,[`${Ke}-affix-wrapper-sm`]:Mt==="small",[`${Ke}-affix-wrapper-lg`]:Mt==="large",[`${Ke}-textarea-show-count`]:Be},(0,Ve.Z)(`${Ke}-affix-wrapper`,Lt),Pn)},classNames:Object.assign(Object.assign({},je),{textarea:He()({[`${Ke}-borderless`]:!se,[`${Ke}-sm`]:Mt==="small",[`${Ke}-lg`]:Mt==="large"},(0,Ve.Z)(Ke,Lt),Pn,je==null?void 0:je.textarea)}),prefixCls:Ke,suffix:Dt&&We.createElement("span",{className:`${Ke}-textarea-suffix`},Wt),showCount:Be,ref:qe})))});xn.Z=Oe},59412:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Te}});var le=me(59301);function Te(He,lt){const We=(0,le.useRef)([]),Ve=()=>{We.current.push(setTimeout(()=>{var Le,Ct,xt,Ue;!((Le=He.current)===null||Le===void 0)&&Le.input&&((Ct=He.current)===null||Ct===void 0?void 0:Ct.input.getAttribute("type"))==="password"&&(!((xt=He.current)===null||xt===void 0)&&xt.input.hasAttribute("value"))&&((Ue=He.current)===null||Ue===void 0||Ue.input.removeAttribute("value"))}))};return(0,le.useEffect)(()=>(lt&&Ve(),()=>We.current.forEach(Le=>{Le&&clearTimeout(Le)})),[]),Ve}},92832:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return Mt}});var le=me(92310),Te=me.n(le),He=me(59301),lt=me(36355),We=me(32441),Ve=me(9937),Ct=ot=>{const{getPrefixCls:Ot,direction:Pt}=(0,He.useContext)(lt.E_),{prefixCls:Dt,className:Wt}=ot,Lt=Ot("input-group",Dt),qe=Ot("input"),[Ke,Rt]=(0,Ve.ZP)(qe),Sn=Te()(Lt,{[`${Lt}-lg`]:ot.size==="large",[`${Lt}-sm`]:ot.size==="small",[`${Lt}-compact`]:ot.compact,[`${Lt}-rtl`]:Pt==="rtl"},Rt,Wt),Pn=(0,He.useContext)(We.aM),_t=(0,He.useMemo)(()=>Object.assign(Object.assign({},Pn),{isFormItemInput:!1}),[Pn]);return Ke(He.createElement("span",{className:Sn,style:ot.style,onMouseEnter:ot.onMouseEnter,onMouseLeave:ot.onMouseLeave,onFocus:ot.onFocus,onBlur:ot.onBlur},He.createElement(We.aM.Provider,{value:_t},ot.children)))},xt=me(9432),Ue=me(73331),bt=me(15277),at=me(2738),mt=me(8654),Oe=me(59412),te=function(ot,Ot){var Pt={};for(var Dt in ot)Object.prototype.hasOwnProperty.call(ot,Dt)&&Ot.indexOf(Dt)<0&&(Pt[Dt]=ot[Dt]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Dt=Object.getOwnPropertySymbols(ot);Wt<Dt.length;Wt++)Ot.indexOf(Dt[Wt])<0&&Object.prototype.propertyIsEnumerable.call(ot,Dt[Wt])&&(Pt[Dt[Wt]]=ot[Dt[Wt]]);return Pt};const ee=ot=>ot?He.createElement(bt.Z,null):He.createElement(Ue.Z,null),de={click:"onClick",hover:"onMouseOver"};var he=He.forwardRef((ot,Ot)=>{const{visibilityToggle:Pt=!0}=ot,Dt=typeof Pt=="object"&&Pt.visible!==void 0,[Wt,Lt]=(0,He.useState)(()=>Dt?Pt.visible:!1),qe=(0,He.useRef)(null);He.useEffect(()=>{Dt&&Lt(Pt.visible)},[Dt,Pt]);const Ke=(0,Oe.Z)(qe),Rt=()=>{const{disabled:be}=ot;be||(Wt&&Ke(),Lt(Pe=>{var Ae;const Ne=!Pe;return typeof Pt=="object"&&((Ae=Pt.onVisibleChange)===null||Ae===void 0||Ae.call(Pt,Ne)),Ne}))},Sn=be=>{const{action:Pe="click",iconRender:Ae=ee}=ot,Ne=de[Pe]||"",xe=Ae(Wt),ut={[Ne]:Rt,className:`${be}-icon`,key:"passwordIcon",onMouseDown:Bt=>{Bt.preventDefault()},onMouseUp:Bt=>{Bt.preventDefault()}};return He.cloneElement(He.isValidElement(xe)?xe:He.createElement("span",null,xe),ut)},{className:Pn,prefixCls:_t,inputPrefixCls:rn,size:ln}=ot,Wn=te(ot,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:un}=He.useContext(lt.E_),_n=un("input",rn),St=un("input-password",_t),Zn=Pt&&Sn(St),li=Te()(St,Pn,{[`${St}-${ln}`]:!!ln}),Ge=Object.assign(Object.assign({},(0,at.Z)(Wn,["suffix","iconRender","visibilityToggle"])),{type:Wt?"text":"password",className:li,prefixCls:_n,suffix:Zn});return ln&&(Ge.size=ln),He.createElement(xt.Z,Object.assign({ref:(0,mt.sQ)(Ot,qe)},Ge))}),ve=me(47472),Ee=me(92343),Me=me(3113),Be=me(19716),je=me(33234),_e=function(ot,Ot){var Pt={};for(var Dt in ot)Object.prototype.hasOwnProperty.call(ot,Dt)&&Ot.indexOf(Dt)<0&&(Pt[Dt]=ot[Dt]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Dt=Object.getOwnPropertySymbols(ot);Wt<Dt.length;Wt++)Ot.indexOf(Dt[Wt])<0&&Object.prototype.propertyIsEnumerable.call(ot,Dt[Wt])&&(Pt[Dt[Wt]]=ot[Dt[Wt]]);return Pt},Xe=He.forwardRef((ot,Ot)=>{const{prefixCls:Pt,inputPrefixCls:Dt,className:Wt,size:Lt,suffix:qe,enterButton:Ke=!1,addonAfter:Rt,loading:Sn,disabled:Pn,onSearch:_t,onChange:rn,onCompositionStart:ln,onCompositionEnd:Wn}=ot,un=_e(ot,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:_n,direction:St}=He.useContext(lt.E_),Zn=He.useRef(!1),li=_n("input-search",Pt),Ge=_n("input",Dt),{compactSize:be}=(0,je.ri)(li,St),Pe=(0,Be.Z)(qt=>{var Rn;return(Rn=Lt!=null?Lt:be)!==null&&Rn!==void 0?Rn:qt}),Ae=He.useRef(null),Ne=qt=>{qt&&qt.target&&qt.type==="click"&&_t&&_t(qt.target.value,qt,{source:"clear"}),rn&&rn(qt)},xe=qt=>{var Rn;document.activeElement===((Rn=Ae.current)===null||Rn===void 0?void 0:Rn.input)&&qt.preventDefault()},ut=qt=>{var Rn,Vn;_t&&_t((Vn=(Rn=Ae.current)===null||Rn===void 0?void 0:Rn.input)===null||Vn===void 0?void 0:Vn.value,qt,{source:"input"})},Bt=qt=>{Zn.current||Sn||ut(qt)},Qe=typeof Ke=="boolean"?He.createElement(ve.Z,null):null,it=`${li}-button`;let Ft;const Nt=Ke||{},dt=Nt.type&&Nt.type.__ANT_BUTTON===!0;dt||Nt.type==="button"?Ft=(0,Ee.Tm)(Nt,Object.assign({onMouseDown:xe,onClick:qt=>{var Rn,Vn;(Vn=(Rn=Nt==null?void 0:Nt.props)===null||Rn===void 0?void 0:Rn.onClick)===null||Vn===void 0||Vn.call(Rn,qt),ut(qt)},key:"enterButton"},dt?{className:it,size:Pe}:{})):Ft=He.createElement(Me.ZP,{className:it,type:Ke?"primary":void 0,size:Pe,disabled:Pn,key:"enterButton",onMouseDown:xe,onClick:ut,loading:Sn,icon:Qe},Ke),Rt&&(Ft=[Ft,(0,Ee.Tm)(Rt,{key:"addonAfter"})]);const Kt=Te()(li,{[`${li}-rtl`]:St==="rtl",[`${li}-${Pe}`]:!!Pe,[`${li}-with-button`]:!!Ke},Wt),wn=qt=>{Zn.current=!0,ln==null||ln(qt)},sn=qt=>{Zn.current=!1,Wn==null||Wn(qt)};return He.createElement(xt.Z,Object.assign({ref:(0,mt.sQ)(Ae,Ot),onPressEnter:Bt},un,{size:Pe,onCompositionStart:wn,onCompositionEnd:sn,prefixCls:Ge,addonAfter:Ft,suffix:qe,onChange:Ne,className:Kt,disabled:Pn}))}),ht=me(1643);const Ze=xt.Z;Ze.Group=Ct,Ze.Search=Xe,Ze.TextArea=ht.Z,Ze.Password=he;var Mt=Ze},45818:function(Tn,xn,me){"use strict";me.d(xn,{D:function(){return ve},Z:function(){return Be}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(_e,Je){return Te.createElement(We.Z,(0,le.Z)({},_e,{ref:Je,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le,xt=me(33853),Ue=me(38819),bt=me(92310),at=me.n(bt),mt=me(2738),te=je=>!isNaN(parseFloat(je))&&isFinite(je),ee=me(36355),de=me(84966),se=function(je,_e){var Je={};for(var Xe in je)Object.prototype.hasOwnProperty.call(je,Xe)&&_e.indexOf(Xe)<0&&(Je[Xe]=je[Xe]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Xe=Object.getOwnPropertySymbols(je);ht<Xe.length;ht++)_e.indexOf(Xe[ht])<0&&Object.prototype.propertyIsEnumerable.call(je,Xe[ht])&&(Je[Xe[ht]]=je[Xe[ht]]);return Je};const he={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},ve=Te.createContext({}),Ee=(()=>{let je=0;return function(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return je+=1,`${_e}${je}`}})();var Be=Te.forwardRef((je,_e)=>{const{prefixCls:Je,className:Xe,trigger:ht,children:Ze,defaultCollapsed:Mt=!1,theme:ot="dark",style:Ot={},collapsible:Pt=!1,reverseArrow:Dt=!1,width:Wt=200,collapsedWidth:Lt=80,zeroWidthTriggerStyle:qe,breakpoint:Ke,onCollapse:Rt,onBreakpoint:Sn}=je,Pn=se(je,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:_t}=(0,Te.useContext)(de.Gs),[rn,ln]=(0,Te.useState)("collapsed"in je?je.collapsed:Mt),[Wn,un]=(0,Te.useState)(!1);(0,Te.useEffect)(()=>{"collapsed"in je&&ln(je.collapsed)},[je.collapsed]);const _n=(Pe,Ae)=>{"collapsed"in je||ln(Pe),Rt==null||Rt(Pe,Ae)},St=(0,Te.useRef)();St.current=Pe=>{un(Pe.matches),Sn==null||Sn(Pe.matches),rn!==Pe.matches&&_n(Pe.matches,"responsive")},(0,Te.useEffect)(()=>{function Pe(Ne){return St.current(Ne)}let Ae;if(typeof window!="undefined"){const{matchMedia:Ne}=window;if(Ne&&Ke&&Ke in he){Ae=Ne(`(max-width: ${he[Ke]})`);try{Ae.addEventListener("change",Pe)}catch(xe){Ae.addListener(Pe)}Pe(Ae)}}return()=>{try{Ae==null||Ae.removeEventListener("change",Pe)}catch(Ne){Ae==null||Ae.removeListener(Pe)}}},[Ke]),(0,Te.useEffect)(()=>{const Pe=Ee("ant-sider-");return _t.addSider(Pe),()=>_t.removeSider(Pe)},[]);const Zn=()=>{_n(!rn,"clickTrigger")},{getPrefixCls:li}=(0,Te.useContext)(ee.E_),Ge=()=>{const Pe=li("layout-sider",Je),Ae=(0,mt.Z)(Pn,["collapsed"]),Ne=rn?Lt:Wt,xe=te(Ne)?`${Ne}px`:String(Ne),ut=parseFloat(String(Lt||0))===0?Te.createElement("span",{onClick:Zn,className:at()(`${Pe}-zero-width-trigger`,`${Pe}-zero-width-trigger-${Dt?"right":"left"}`),style:qe},ht||Te.createElement(Ct,null)):null,it={expanded:Dt?Te.createElement(Ue.Z,null):Te.createElement(xt.Z,null),collapsed:Dt?Te.createElement(xt.Z,null):Te.createElement(Ue.Z,null)}[rn?"collapsed":"expanded"],Ft=ht!==null?ut||Te.createElement("div",{className:`${Pe}-trigger`,onClick:Zn,style:{width:xe}},ht||it):null,Nt=Object.assign(Object.assign({},Ot),{flex:`0 0 ${xe}`,maxWidth:xe,minWidth:xe,width:xe}),dt=at()(Pe,`${Pe}-${ot}`,{[`${Pe}-collapsed`]:!!rn,[`${Pe}-has-trigger`]:Pt&&ht!==null&&!ut,[`${Pe}-below`]:!!Wn,[`${Pe}-zero-width`]:parseFloat(xe)===0},Xe);return Te.createElement("aside",Object.assign({className:dt},Ae,{style:Nt,ref:_e}),Te.createElement("div",{className:`${Pe}-children`},Ze),Pt||Wn&&ut?Ft:null)},be=Te.useMemo(()=>({siderCollapsed:rn}),[rn]);return Te.createElement(ve.Provider,{value:be},Ge())})},84966:function(Tn,xn,me){"use strict";me.d(xn,{VY:function(){return ve},$_:function(){return he},h4:function(){return se},Gs:function(){return mt},ZP:function(){return Ee}});var le=me(26407),Te=me(92310),He=me.n(Te),lt=me(2738),We=me(59301),Ve=me(36355),Le=me(83116),xt=Me=>{const{componentCls:Be,bodyBg:je,lightSiderBg:_e,lightTriggerBg:Je,lightTriggerColor:Xe}=Me;return{[`${Be}-sider-light`]:{background:_e,[`${Be}-sider-trigger`]:{color:Xe,background:Je},[`${Be}-sider-zero-width-trigger`]:{color:Xe,background:Je,border:`1px solid ${je}`,borderInlineStart:0}}}};const Ue=Me=>{const{antCls:Be,componentCls:je,colorText:_e,triggerColor:Je,footerBg:Xe,triggerBg:ht,headerHeight:Ze,headerPadding:Mt,headerColor:ot,footerPadding:Ot,triggerHeight:Pt,zeroTriggerHeight:Dt,zeroTriggerWidth:Wt,motionDurationMid:Lt,motionDurationSlow:qe,fontSize:Ke,borderRadius:Rt,bodyBg:Sn,headerBg:Pn,siderBg:_t}=Me;return{[je]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Sn,"&, *":{boxSizing:"border-box"},[`&${je}-has-sider`]:{flexDirection:"row",[`> ${je}, > ${je}-content`]:{width:0}},[`${je}-header, &${je}-footer`]:{flex:"0 0 auto"},[`${je}-sider`]:{position:"relative",minWidth:0,background:_t,transition:`all ${Lt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Be}-menu${Be}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:Pt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:Pt,color:Je,lineHeight:`${Pt}px`,textAlign:"center",background:ht,cursor:"pointer",transition:`all ${Lt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ze,insetInlineEnd:-Wt,zIndex:1,width:Wt,height:Dt,color:Je,fontSize:Me.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:_t,borderStartStartRadius:0,borderStartEndRadius:Rt,borderEndEndRadius:Rt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${qe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${qe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Wt,borderStartStartRadius:Rt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Rt}}}}},xt(Me)),{"&-rtl":{direction:"rtl"}}),[`${je}-header`]:{height:Ze,padding:Mt,color:ot,lineHeight:`${Ze}px`,background:Pn,[`${Be}-menu`]:{lineHeight:"inherit"}},[`${je}-footer`]:{padding:Ot,color:_e,fontSize:Ke,background:Xe},[`${je}-content`]:{flex:"auto",minHeight:0}}};var bt=(0,Le.Z)("Layout",Me=>[Ue(Me)],Me=>{const{colorBgLayout:Be,controlHeight:je,controlHeightLG:_e,colorText:Je,controlHeightSM:Xe,marginXXS:ht,colorTextLightSolid:Ze,colorBgContainer:Mt}=Me,ot=_e*1.25;return{colorBgHeader:"#001529",colorBgBody:Be,colorBgTrigger:"#002140",bodyBg:Be,headerBg:"#001529",headerHeight:je*2,headerPadding:`0 ${ot}px`,headerColor:Je,footerPadding:`${Xe}px ${ot}px`,footerBg:Be,siderBg:"#001529",triggerHeight:_e+ht*2,triggerBg:"#002140",triggerColor:Ze,zeroTriggerWidth:_e,zeroTriggerHeight:_e,lightSiderBg:Mt,lightTriggerBg:Mt,lightTriggerColor:Je}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),at=function(Me,Be){var je={};for(var _e in Me)Object.prototype.hasOwnProperty.call(Me,_e)&&Be.indexOf(_e)<0&&(je[_e]=Me[_e]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Je=0,_e=Object.getOwnPropertySymbols(Me);Je<_e.length;Je++)Be.indexOf(_e[Je])<0&&Object.prototype.propertyIsEnumerable.call(Me,_e[Je])&&(je[_e[Je]]=Me[_e[Je]]);return je};const mt=We.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Oe(Me){let{suffixCls:Be,tagName:je,displayName:_e}=Me;return Je=>We.forwardRef((ht,Ze)=>We.createElement(Je,Object.assign({ref:Ze,suffixCls:Be,tagName:je},ht)))}const te=We.forwardRef((Me,Be)=>{const{prefixCls:je,suffixCls:_e,className:Je,tagName:Xe}=Me,ht=at(Me,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ze}=We.useContext(Ve.E_),Mt=Ze("layout",je),[ot,Ot]=bt(Mt),Pt=_e?`${Mt}-${_e}`:Mt;return ot(We.createElement(Xe,Object.assign({className:He()(je||Pt,Je,Ot),ref:Be},ht)))}),ee=We.forwardRef((Me,Be)=>{const{direction:je}=We.useContext(Ve.E_),[_e,Je]=We.useState([]),{prefixCls:Xe,className:ht,rootClassName:Ze,children:Mt,hasSider:ot,tagName:Ot,style:Pt}=Me,Dt=at(Me,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Wt=(0,lt.Z)(Dt,["suffixCls"]),{getPrefixCls:Lt,layout:qe}=We.useContext(Ve.E_),Ke=Lt("layout",Xe),[Rt,Sn]=bt(Ke),Pn=He()(Ke,{[`${Ke}-has-sider`]:typeof ot=="boolean"?ot:_e.length>0,[`${Ke}-rtl`]:je==="rtl"},qe==null?void 0:qe.className,ht,Ze,Sn),_t=We.useMemo(()=>({siderHook:{addSider:rn=>{Je(ln=>[].concat((0,le.Z)(ln),[rn]))},removeSider:rn=>{Je(ln=>ln.filter(Wn=>Wn!==rn))}}}),[]);return Rt(We.createElement(mt.Provider,{value:_t},We.createElement(Ot,Object.assign({ref:Be,className:Pn,style:Object.assign(Object.assign({},qe==null?void 0:qe.style),Pt)},Wt),Mt)))}),de=Oe({tagName:"div",displayName:"Layout"})(ee),se=Oe({suffixCls:"header",tagName:"header",displayName:"Header"})(te),he=Oe({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(te),ve=Oe({suffixCls:"content",tagName:"main",displayName:"Content"})(te);var Ee=de},40875:function(Tn,xn,me){"use strict";me.d(xn,{J:function(){return Ve}});var le=me(59301),Te=me(33234),He=me(70425),lt=function(Le,Ct){var xt={};for(var Ue in Le)Object.prototype.hasOwnProperty.call(Le,Ue)&&Ct.indexOf(Ue)<0&&(xt[Ue]=Le[Ue]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,Ue=Object.getOwnPropertySymbols(Le);bt<Ue.length;bt++)Ct.indexOf(Ue[bt])<0&&Object.prototype.propertyIsEnumerable.call(Le,Ue[bt])&&(xt[Ue[bt]]=Le[Ue[bt]]);return xt};const We=le.createContext(null),Ve=le.forwardRef((Le,Ct)=>{const{children:xt}=Le,Ue=lt(Le,["children"]),bt=le.useContext(We),at=le.useMemo(()=>Object.assign(Object.assign({},bt),Ue),[bt,Ue.prefixCls,Ue.mode,Ue.selectable]);return le.createElement(We.Provider,{value:at},le.createElement(Te.BR,null,(0,He.supportNodeRef)(xt)?le.cloneElement(xt,{ref:Ct}):xt))});xn.Z=We},20834:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return be}});var le=me(15285),Te=me(59301),He=me(45818),lt=me(92310),We=me.n(lt),Ve=me(36355),Le=function(Pe,Ae){var Ne={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ae.indexOf(xe)<0&&(Ne[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,xe=Object.getOwnPropertySymbols(Pe);ut<xe.length;ut++)Ae.indexOf(xe[ut])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ut])&&(Ne[xe[ut]]=Pe[xe[ut]]);return Ne},xt=Pe=>{const{prefixCls:Ae,className:Ne,dashed:xe}=Pe,ut=Le(Pe,["prefixCls","className","dashed"]),{getPrefixCls:Bt}=Te.useContext(Ve.E_),Qe=Bt("menu",Ae),it=We()({[`${Qe}-item-divider-dashed`]:!!xe},Ne);return Te.createElement(le.iz,Object.assign({className:it},ut))},Ue=me(11592),bt=me(2738),at=me(6848),mt=me(92343),te=(0,Te.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),de=Pe=>{var Ae;const{className:Ne,children:xe,icon:ut,title:Bt,danger:Qe}=Pe,{prefixCls:it,firstLevel:Ft,direction:Nt,disableMenuItemTitleTooltip:dt,inlineCollapsed:Kt}=Te.useContext(te),wn=Yn=>{const mi=Te.createElement("span",{className:`${it}-title-content`},xe);return(!ut||(0,mt.l$)(xe)&&xe.type==="span")&&xe&&Yn&&Ft&&typeof xe=="string"?Te.createElement("div",{className:`${it}-inline-collapsed-noicon`},xe.charAt(0)):mi},{siderCollapsed:sn}=Te.useContext(He.D);let qt=Bt;typeof Bt=="undefined"?qt=Ft?xe:"":Bt===!1&&(qt="");const Rn={title:qt};!sn&&!Kt&&(Rn.title=null,Rn.open=!1);const Vn=(0,Ue.Z)(xe).length;let hn=Te.createElement(le.ck,Object.assign({},(0,bt.Z)(Pe,["title","icon","danger"]),{className:We()({[`${it}-item-danger`]:Qe,[`${it}-item-only-child`]:(ut?Vn+1:Vn)===1},Ne),title:typeof Bt=="string"?Bt:void 0}),(0,mt.Tm)(ut,{className:We()((0,mt.l$)(ut)?(Ae=ut.props)===null||Ae===void 0?void 0:Ae.className:"",`${it}-item-icon`)}),wn(Kt));return dt||(hn=Te.createElement(at.Z,Object.assign({},Rn,{placement:Nt==="rtl"?"left":"right",overlayClassName:`${it}-inline-collapsed-tooltip`}),hn)),hn},he=Pe=>{var Ae;const{popupClassName:Ne,icon:xe,title:ut,theme:Bt}=Pe,Qe=Te.useContext(te),{prefixCls:it,inlineCollapsed:Ft,theme:Nt}=Qe,dt=(0,le.Xl)();let Kt;if(!xe)Kt=Ft&&!dt.length&&ut&&typeof ut=="string"?Te.createElement("div",{className:`${it}-inline-collapsed-noicon`},ut.charAt(0)):Te.createElement("span",{className:`${it}-title-content`},ut);else{const sn=(0,mt.l$)(ut)&&ut.type==="span";Kt=Te.createElement(Te.Fragment,null,(0,mt.Tm)(xe,{className:We()((0,mt.l$)(xe)?(Ae=xe.props)===null||Ae===void 0?void 0:Ae.className:"",`${it}-item-icon`)}),sn?ut:Te.createElement("span",{className:`${it}-title-content`},ut))}const wn=Te.useMemo(()=>Object.assign(Object.assign({},Qe),{firstLevel:!1}),[Qe]);return Te.createElement(te.Provider,{value:wn},Te.createElement(le.Wd,Object.assign({},(0,bt.Z)(Pe,["icon"]),{title:Kt,popupClassName:We()(it,Ne,`${it}-${Bt||Nt}`)})))},ve=me(18785),Ee=me(70425),Me=me(62892),Be=me(40875),je=function(Pe,Ae){var Ne={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ae.indexOf(xe)<0&&(Ne[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,xe=Object.getOwnPropertySymbols(Pe);ut<xe.length;ut++)Ae.indexOf(xe[ut])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ut])&&(Ne[xe[ut]]=Pe[xe[ut]]);return Ne};function _e(Pe){return(Pe||[]).map((Ae,Ne)=>{if(Ae&&typeof Ae=="object"){const xe=Ae,{label:ut,children:Bt,key:Qe,type:it}=xe,Ft=je(xe,["label","children","key","type"]),Nt=Qe!=null?Qe:`tmp-${Ne}`;return Bt||it==="group"?it==="group"?Te.createElement(le.BW,Object.assign({key:Nt},Ft,{title:ut}),_e(Bt)):Te.createElement(he,Object.assign({key:Nt},Ft,{title:ut}),_e(Bt)):it==="divider"?Te.createElement(xt,Object.assign({key:Nt},Ft)):Te.createElement(de,Object.assign({key:Nt},Ft),ut)}return null}).filter(Ae=>Ae)}function Je(Pe){return Te.useMemo(()=>Pe&&_e(Pe),[Pe])}var Xe=me(64993),ht=me(17313),Ze=me(8378),Mt=me(13826),ot=me(29878),Ot=me(83116),Pt=me(37613),Wt=Pe=>{const{componentCls:Ae,motionDurationSlow:Ne,horizontalLineHeight:xe,colorSplit:ut,lineWidth:Bt,lineType:Qe,itemPaddingInline:it}=Pe;return{[`${Ae}-horizontal`]:{lineHeight:xe,border:0,borderBottom:`${Bt}px ${Qe} ${ut}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ae}-item, ${Ae}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:it},[`> ${Ae}-item:hover,
|
|
|
> ${Ae}-item-active,
|
|
|
> ${Ae}-submenu ${Ae}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ae}-item, ${Ae}-submenu-title`]:{transition:[`border-color ${Ne}`,`background ${Ne}`].join(",")},[`${Ae}-submenu-arrow`]:{display:"none"}}}},qe=Pe=>{let{componentCls:Ae,menuArrowOffset:Ne}=Pe;return{[`${Ae}-rtl`]:{direction:"rtl"},[`${Ae}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ae}-rtl${Ae}-vertical,
|
|
|
${Ae}-submenu-rtl ${Ae}-vertical`]:{[`${Ae}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Ne})`},"&::after":{transform:`rotate(45deg) translateY(${Ne})`}}}}};const Ke=Pe=>Object.assign({},(0,ht.oN)(Pe));var Sn=(Pe,Ae)=>{const{componentCls:Ne,itemColor:xe,itemSelectedColor:ut,groupTitleColor:Bt,itemBg:Qe,subMenuItemBg:it,itemSelectedBg:Ft,activeBarHeight:Nt,activeBarWidth:dt,activeBarBorderWidth:Kt,motionDurationSlow:wn,motionEaseInOut:sn,motionEaseOut:qt,itemPaddingInline:Rn,motionDurationMid:Vn,itemHoverColor:hn,lineType:Yn,colorSplit:mi,itemDisabledColor:jn,dangerItemColor:An,dangerItemHoverColor:wi,dangerItemSelectedColor:ji,dangerItemActiveBg:Wi,dangerItemSelectedBg:dr,itemHoverBg:Mr,itemActiveBg:pi,menuSubMenuBg:ui,horizontalItemSelectedColor:Ci,horizontalItemSelectedBg:Xi,horizontalItemBorderRadius:Ni,horizontalItemHoverBg:io,popupBg:hr}=Pe;return{[`${Ne}-${Ae}, ${Ne}-${Ae} > ${Ne}`]:{color:xe,background:Qe,[`&${Ne}-root:focus-visible`]:Object.assign({},Ke(Pe)),[`${Ne}-item-group-title`]:{color:Bt},[`${Ne}-submenu-selected`]:{[`> ${Ne}-submenu-title`]:{color:ut}},[`${Ne}-item-disabled, ${Ne}-submenu-disabled`]:{color:`${jn} !important`},[`${Ne}-item:not(${Ne}-item-selected):not(${Ne}-submenu-selected)`]:{[`&:hover, > ${Ne}-submenu-title:hover`]:{color:hn}},[`&:not(${Ne}-horizontal)`]:{[`${Ne}-item:not(${Ne}-item-selected)`]:{"&:hover":{backgroundColor:Mr},"&:active":{backgroundColor:pi}},[`${Ne}-submenu-title`]:{"&:hover":{backgroundColor:Mr},"&:active":{backgroundColor:pi}}},[`${Ne}-item-danger`]:{color:An,[`&${Ne}-item:hover`]:{[`&:not(${Ne}-item-selected):not(${Ne}-submenu-selected)`]:{color:wi}},[`&${Ne}-item:active`]:{background:Wi}},[`${Ne}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Ne}-item-selected`]:{color:ut,[`&${Ne}-item-danger`]:{color:ji},"a, a:hover":{color:"inherit"}},[`& ${Ne}-item-selected`]:{backgroundColor:Ft,[`&${Ne}-item-danger`]:{backgroundColor:dr}},[`${Ne}-item, ${Ne}-submenu-title`]:{[`&:not(${Ne}-item-disabled):focus-visible`]:Object.assign({},Ke(Pe))},[`&${Ne}-submenu > ${Ne}`]:{backgroundColor:ui},[`&${Ne}-popup > ${Ne}`]:{backgroundColor:hr},[`&${Ne}-horizontal`]:Object.assign(Object.assign({},Ae==="dark"?{borderBottom:0}:{}),{[`> ${Ne}-item, > ${Ne}-submenu`]:{top:Kt,marginTop:-Kt,marginBottom:0,borderRadius:Ni,"&::after":{position:"absolute",insetInline:Rn,bottom:0,borderBottom:`${Nt}px solid transparent`,transition:`border-color ${wn} ${sn}`,content:'""'},"&:hover, &-active, &-open":{background:io,"&::after":{borderBottomWidth:Nt,borderBottomColor:Ci}},"&-selected":{color:Ci,backgroundColor:Xi,"&:hover":{backgroundColor:Xi},"&::after":{borderBottomWidth:Nt,borderBottomColor:Ci}}}}),[`&${Ne}-root`]:{[`&${Ne}-inline, &${Ne}-vertical`]:{borderInlineEnd:`${Kt}px ${Yn} ${mi}`}},[`&${Ne}-inline`]:{[`${Ne}-sub${Ne}-inline`]:{background:it},[`${Ne}-item, ${Ne}-submenu-title`]:Kt&&dt?{width:`calc(100% + ${Kt}px)`}:{},[`${Ne}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${dt}px solid ${ut}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Vn} ${qt}`,`opacity ${Vn} ${qt}`].join(","),content:'""'},[`&${Ne}-item-danger`]:{"&::after":{borderInlineEndColor:ji}}},[`${Ne}-selected, ${Ne}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Vn} ${sn}`,`opacity ${Vn} ${sn}`].join(",")}}}}}};const Pn=Pe=>{const{componentCls:Ae,itemHeight:Ne,itemMarginInline:xe,padding:ut,menuArrowSize:Bt,marginXS:Qe,itemMarginBlock:it}=Pe,Ft=ut+Bt+Qe;return{[`${Ae}-item`]:{position:"relative",overflow:"hidden"},[`${Ae}-item, ${Ae}-submenu-title`]:{height:Ne,lineHeight:`${Ne}px`,paddingInline:ut,overflow:"hidden",textOverflow:"ellipsis",marginInline:xe,marginBlock:it,width:`calc(100% - ${xe*2}px)`},[`> ${Ae}-item,
|
|
|
> ${Ae}-submenu > ${Ae}-submenu-title`]:{height:Ne,lineHeight:`${Ne}px`},[`${Ae}-item-group-list ${Ae}-submenu-title,
|
|
|
${Ae}-submenu-title`]:{paddingInlineEnd:Ft}}};var rn=Pe=>{const{componentCls:Ae,iconCls:Ne,itemHeight:xe,colorTextLightSolid:ut,dropdownWidth:Bt,controlHeightLG:Qe,motionDurationMid:it,motionEaseOut:Ft,paddingXL:Nt,itemMarginInline:dt,fontSizeLG:Kt,motionDurationSlow:wn,paddingXS:sn,boxShadowSecondary:qt,collapsedWidth:Rn,collapsedIconSize:Vn}=Pe,hn={height:xe,lineHeight:`${xe}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Ae]:{"&-inline, &-vertical":Object.assign({[`&${Ae}-root`]:{boxShadow:"none"}},Pn(Pe))},[`${Ae}-submenu-popup`]:{[`${Ae}-vertical`]:Object.assign(Object.assign({},Pn(Pe)),{boxShadow:qt})}},{[`${Ae}-submenu-popup ${Ae}-vertical${Ae}-sub`]:{minWidth:Bt,maxHeight:`calc(100vh - ${Qe*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ae}-inline`]:{width:"100%",[`&${Ae}-root`]:{[`${Ae}-item, ${Ae}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${wn}`,`background ${wn}`,`padding ${it} ${Ft}`].join(","),[`> ${Ae}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ae}-sub${Ae}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ae}-submenu > ${Ae}-submenu-title`]:hn,[`& ${Ae}-item-group-title`]:{paddingInlineStart:Nt}},[`${Ae}-item`]:hn}},{[`${Ae}-inline-collapsed`]:{width:Rn,[`&${Ae}-root`]:{[`${Ae}-item, ${Ae}-submenu ${Ae}-submenu-title`]:{[`> ${Ae}-inline-collapsed-noicon`]:{fontSize:Kt,textAlign:"center"}}},[`> ${Ae}-item,
|
|
|
> ${Ae}-item-group > ${Ae}-item-group-list > ${Ae}-item,
|
|
|
> ${Ae}-item-group > ${Ae}-item-group-list > ${Ae}-submenu > ${Ae}-submenu-title,
|
|
|
> ${Ae}-submenu > ${Ae}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Kt/2}px - ${dt}px)`,textOverflow:"clip",[`
|
|
|
${Ae}-submenu-arrow,
|
|
|
${Ae}-submenu-expand-icon
|
|
|
`]:{opacity:0},[`${Ae}-item-icon, ${Ne}`]:{margin:0,fontSize:Vn,lineHeight:`${xe}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Ae}-item-icon, ${Ne}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ae}-item-icon, ${Ne}`]:{display:"none"},"a, a:hover":{color:ut}},[`${Ae}-item-group-title`]:Object.assign(Object.assign({},ht.vS),{paddingInline:sn})}}]};const ln=Pe=>{const{componentCls:Ae,motionDurationSlow:Ne,motionDurationMid:xe,motionEaseInOut:ut,motionEaseOut:Bt,iconCls:Qe,iconSize:it,iconMarginInlineEnd:Ft}=Pe;return{[`${Ae}-item, ${Ae}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Ne}`,`background ${Ne}`,`padding ${Ne} ${ut}`].join(","),[`${Ae}-item-icon, ${Qe}`]:{minWidth:it,fontSize:it,transition:[`font-size ${xe} ${Bt}`,`margin ${Ne} ${ut}`,`color ${Ne}`].join(","),"+ span":{marginInlineStart:Ft,opacity:1,transition:[`opacity ${Ne} ${ut}`,`margin ${Ne}`,`color ${Ne}`].join(",")}},[`${Ae}-item-icon`]:Object.assign({},(0,ht.Ro)()),[`&${Ae}-item-only-child`]:{[`> ${Qe}, > ${Ae}-item-icon`]:{marginInlineEnd:0}}},[`${Ae}-item-disabled, ${Ae}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Ae}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Wn=Pe=>{const{componentCls:Ae,motionDurationSlow:Ne,motionEaseInOut:xe,borderRadius:ut,menuArrowSize:Bt,menuArrowOffset:Qe}=Pe;return{[`${Ae}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Pe.margin,width:Bt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Ne} ${xe}, opacity ${Ne}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Bt*.6,height:Bt*.15,backgroundColor:"currentcolor",borderRadius:ut,transition:[`background ${Ne} ${xe}`,`transform ${Ne} ${xe}`,`top ${Ne} ${xe}`,`color ${Ne} ${xe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${Qe})`},"&::after":{transform:`rotate(-45deg) translateY(${Qe})`}}}}},un=Pe=>{const{antCls:Ae,componentCls:Ne,fontSize:xe,motionDurationSlow:ut,motionDurationMid:Bt,motionEaseInOut:Qe,paddingXS:it,padding:Ft,colorSplit:Nt,lineWidth:dt,zIndexPopup:Kt,borderRadiusLG:wn,subMenuItemBorderRadius:sn,menuArrowSize:qt,menuArrowOffset:Rn,lineType:Vn,menuPanelMaskInset:hn,groupTitleLineHeight:Yn,groupTitleFontSize:mi}=Pe;return[{"":{[`${Ne}`]:Object.assign(Object.assign({},(0,ht.dF)()),{"&-hidden":{display:"none"}})},[`${Ne}-submenu-hidden`]:{display:"none"}},{[Ne]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ht.Wf)(Pe)),(0,ht.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:xe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ut} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Ne}-item`]:{flex:"none"}},[`${Ne}-item, ${Ne}-submenu, ${Ne}-submenu-title`]:{borderRadius:Pe.itemBorderRadius},[`${Ne}-item-group-title`]:{padding:`${it}px ${Ft}px`,fontSize:mi,lineHeight:Yn,transition:`all ${ut}`},[`&-horizontal ${Ne}-submenu`]:{transition:[`border-color ${ut} ${Qe}`,`background ${ut} ${Qe}`].join(",")},[`${Ne}-submenu, ${Ne}-submenu-inline`]:{transition:[`border-color ${ut} ${Qe}`,`background ${ut} ${Qe}`,`padding ${Bt} ${Qe}`].join(",")},[`${Ne}-submenu ${Ne}-sub`]:{cursor:"initial",transition:[`background ${ut} ${Qe}`,`padding ${ut} ${Qe}`].join(",")},[`${Ne}-title-content`]:{transition:`color ${ut}`},[`${Ne}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Ne}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Nt,borderStyle:Vn,borderWidth:0,borderTopWidth:dt,marginBlock:dt,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ln(Pe)),{[`${Ne}-item-group`]:{[`${Ne}-item-group-list`]:{margin:0,padding:0,[`${Ne}-item, ${Ne}-submenu-title`]:{paddingInline:`${xe*2}px ${Ft}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Kt,borderRadius:wn,boxShadow:"none",transformOrigin:"0 0",[`&${Ne}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${hn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:hn},"\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},[`> ${Ne}`]:Object.assign(Object.assign(Object.assign({borderRadius:wn},ln(Pe)),Wn(Pe)),{[`${Ne}-item, ${Ne}-submenu > ${Ne}-submenu-title`]:{borderRadius:sn},[`${Ne}-submenu-title::after`]:{transition:`transform ${ut} ${Qe}`}})}}),Wn(Pe)),{[`&-inline-collapsed ${Ne}-submenu-arrow,
|
|
|
&-inline ${Ne}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Rn})`},"&::after":{transform:`rotate(45deg) translateX(-${Rn})`}},[`${Ne}-submenu-open${Ne}-submenu-inline > ${Ne}-submenu-title > ${Ne}-submenu-arrow`]:{transform:`translateY(-${qt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${Rn})`},"&::before":{transform:`rotate(45deg) translateX(${Rn})`}}})},{[`${Ae}-layout-header`]:{[Ne]:{lineHeight:"inherit"}}}]};var _n=(Pe,Ae)=>(0,Ot.Z)("Menu",xe=>{if(Ae===!1)return[];const{colorBgElevated:ut,colorPrimary:Bt,colorTextLightSolid:Qe,controlHeightLG:it,fontSize:Ft,darkItemColor:Nt,darkDangerItemColor:dt,darkItemBg:Kt,darkSubMenuItemBg:wn,darkItemSelectedColor:sn,darkItemSelectedBg:qt,darkDangerItemSelectedBg:Rn,darkItemHoverBg:Vn,darkGroupTitleColor:hn,darkItemHoverColor:Yn,darkItemDisabledColor:mi,darkDangerItemHoverColor:jn,darkDangerItemSelectedColor:An,darkDangerItemActiveBg:wi}=xe,ji=Ft/7*5,Wi=(0,Pt.TS)(xe,{menuArrowSize:ji,menuHorizontalHeight:it*1.15,menuArrowOffset:`${ji*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:ut}),dr=(0,Pt.TS)(Wi,{itemColor:Nt,itemHoverColor:Yn,groupTitleColor:hn,itemSelectedColor:sn,itemBg:Kt,popupBg:Kt,subMenuItemBg:wn,itemActiveBg:"transparent",itemSelectedBg:qt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Vn,itemDisabledColor:mi,dangerItemColor:dt,dangerItemHoverColor:jn,dangerItemSelectedColor:An,dangerItemActiveBg:wi,dangerItemSelectedBg:Rn,menuSubMenuBg:wn,horizontalItemSelectedColor:Qe,horizontalItemSelectedBg:Bt});return[un(Wi),Wt(Wi),rn(Wi),Sn(Wi,"light"),Sn(dr,"dark"),qe(Wi),(0,Ze.Z)(Wi),(0,Mt.oN)(Wi,"slide-up"),(0,Mt.oN)(Wi,"slide-down"),(0,ot._y)(Wi,"zoom-big")]},xe=>{const{colorPrimary:ut,colorError:Bt,colorTextDisabled:Qe,colorErrorBg:it,colorText:Ft,colorTextDescription:Nt,colorBgContainer:dt,colorFillAlter:Kt,colorFillContent:wn,lineWidth:sn,lineWidthBold:qt,controlItemBgActive:Rn,colorBgTextHover:Vn,controlHeightLG:hn,lineHeight:Yn,colorBgElevated:mi,marginXXS:jn,padding:An,fontSize:wi,controlHeightSM:ji,fontSizeLG:Wi,colorTextLightSolid:dr,colorErrorHover:Mr}=xe,pi=new Xe.C(dr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:xe.zIndexPopupBase+50,radiusItem:xe.borderRadiusLG,itemBorderRadius:xe.borderRadiusLG,radiusSubMenuItem:xe.borderRadiusSM,subMenuItemBorderRadius:xe.borderRadiusSM,colorItemText:Ft,itemColor:Ft,colorItemTextHover:Ft,itemHoverColor:Ft,colorItemTextHoverHorizontal:ut,horizontalItemHoverColor:ut,colorGroupTitle:Nt,groupTitleColor:Nt,colorItemTextSelected:ut,itemSelectedColor:ut,colorItemTextSelectedHorizontal:ut,horizontalItemSelectedColor:ut,colorItemBg:dt,itemBg:dt,colorItemBgHover:Vn,itemHoverBg:Vn,colorItemBgActive:wn,itemActiveBg:Rn,colorSubItemBg:Kt,subMenuItemBg:Kt,colorItemBgSelected:Rn,itemSelectedBg:Rn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:qt,activeBarHeight:qt,colorActiveBarBorderSize:sn,activeBarBorderWidth:sn,colorItemTextDisabled:Qe,itemDisabledColor:Qe,colorDangerItemText:Bt,dangerItemColor:Bt,colorDangerItemTextHover:Bt,dangerItemHoverColor:Bt,colorDangerItemTextSelected:Bt,dangerItemSelectedColor:Bt,colorDangerItemBgActive:it,dangerItemActiveBg:it,colorDangerItemBgSelected:it,dangerItemSelectedBg:it,itemMarginInline:xe.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:hn,groupTitleLineHeight:Yn,collapsedWidth:hn*2,popupBg:mi,itemMarginBlock:jn,itemPaddingInline:An,horizontalLineHeight:`${hn*1.15}px`,iconSize:wi,iconMarginInlineEnd:ji-wi,collapsedIconSize:Wi,groupTitleFontSize:wi,darkItemDisabledColor:new Xe.C(dr).setAlpha(.25).toRgbString(),darkItemColor:pi,darkDangerItemColor:Bt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:dr,darkItemSelectedBg:ut,darkDangerItemSelectedBg:Bt,darkItemHoverBg:"transparent",darkGroupTitleColor:pi,darkItemHoverColor:dr,darkDangerItemHoverColor:Mr,darkDangerItemSelectedColor:dr,darkDangerItemActiveBg:Bt}},{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),St=function(Pe,Ae){var Ne={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ae.indexOf(xe)<0&&(Ne[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,xe=Object.getOwnPropertySymbols(Pe);ut<xe.length;ut++)Ae.indexOf(xe[ut])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ut])&&(Ne[xe[ut]]=Pe[xe[ut]]);return Ne},li=(0,Te.forwardRef)((Pe,Ae)=>{var Ne,xe;const ut=Te.useContext(Be.Z),Bt=ut||{},{getPrefixCls:Qe,getPopupContainer:it,direction:Ft,menu:Nt}=Te.useContext(Ve.E_),dt=Qe(),{prefixCls:Kt,className:wn,style:sn,theme:qt="light",expandIcon:Rn,_internalDisableMenuItemTitleTooltip:Vn,inlineCollapsed:hn,siderCollapsed:Yn,items:mi,children:jn,rootClassName:An,mode:wi,selectable:ji,onClick:Wi,overflowedIndicatorPopupClassName:dr}=Pe,Mr=St(Pe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),pi=(0,bt.Z)(Mr,["collapsedWidth"]),ui=Je(mi)||jn;(Ne=Bt.validator)===null||Ne===void 0||Ne.call(Bt,{mode:wi});const Ci=(0,Ee.useEvent)(function(){var er;Wi==null||Wi.apply(void 0,arguments),(er=Bt.onClick)===null||er===void 0||er.call(Bt)}),Xi=Bt.mode||wi,Ni=ji!=null?ji:Bt.selectable,io=Te.useMemo(()=>Yn!==void 0?Yn:hn,[hn,Yn]),hr={horizontal:{motionName:`${dt}-slide-up`},inline:(0,Me.Z)(dt),other:{motionName:`${dt}-zoom-big`}},De=Qe("menu",Kt||Bt.prefixCls),[Ei,Pr]=_n(De,!ut),Ln=We()(`${De}-${qt}`,Nt==null?void 0:Nt.className,wn);let vi;if(typeof Rn=="function")vi=Rn;else if(Rn===null||Rn===!1)vi=null;else if(Bt.expandIcon===null||Bt.expandIcon===!1)vi=null;else{const er=Rn!=null?Rn:Bt.expandIcon;vi=(0,mt.Tm)(er,{className:We()(`${De}-submenu-expand-icon`,(0,mt.l$)(er)?(xe=er.props)===null||xe===void 0?void 0:xe.className:"")})}const Zi=Te.useMemo(()=>({prefixCls:De,inlineCollapsed:io||!1,direction:Ft,firstLevel:!0,theme:qt,mode:Xi,disableMenuItemTitleTooltip:Vn}),[De,io,Ft,Vn,qt]);return Ei(Te.createElement(Be.Z.Provider,{value:null},Te.createElement(te.Provider,{value:Zi},Te.createElement(le.ZP,Object.assign({getPopupContainer:it,overflowedIndicator:Te.createElement(ve.Z,null),overflowedIndicatorPopupClassName:We()(De,`${De}-${qt}`,dr),mode:Xi,selectable:Ni,onClick:Ci},pi,{inlineCollapsed:io,style:Object.assign(Object.assign({},Nt==null?void 0:Nt.style),sn),className:Ln,prefixCls:De,direction:Ft,defaultMotions:hr,expandIcon:vi,ref:Ae,rootClassName:We()(An,Pr)}),ui))))});const Ge=(0,Te.forwardRef)((Pe,Ae)=>{const Ne=(0,Te.useRef)(null),xe=Te.useContext(He.D);return(0,Te.useImperativeHandle)(Ae,()=>({menu:Ne.current,focus:ut=>{var Bt;(Bt=Ne.current)===null||Bt===void 0||Bt.focus(ut)}})),Te.createElement(li,Object.assign({ref:Ne},Pe,xe))});Ge.Item=de,Ge.SubMenu=he,Ge.Divider=xt,Ge.ItemGroup=le.BW;var be=Ge},58421:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Bt}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(it,Ft){return Te.createElement(We.Z,(0,le.Z)({},it,{ref:Ft,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le,xt=me(49198),Ue=me(33853),bt=me(38819),at=me(92310),mt=me.n(at),Oe=me(400),te=me(33708),ee=me(6909),de=me(4771),se=me(9427),he=me(25440),ve=me(26112),Ee={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Me=Ee,Be=me(91735),je=function(Qe){(0,se.Z)(Ft,Qe);var it=(0,he.Z)(Ft);function Ft(){var Nt;(0,ee.Z)(this,Ft);for(var dt=arguments.length,Kt=new Array(dt),wn=0;wn<dt;wn++)Kt[wn]=arguments[wn];return Nt=it.call.apply(it,[this].concat(Kt)),Nt.state={goInputText:""},Nt.getValidValue=function(){var sn=Nt.state.goInputText;return!sn||Number.isNaN(sn)?void 0:Number(sn)},Nt.buildOptionText=function(sn){return"".concat(sn," ").concat(Nt.props.locale.items_per_page)},Nt.changeSize=function(sn){Nt.props.changeSize(Number(sn))},Nt.handleChange=function(sn){Nt.setState({goInputText:sn.target.value})},Nt.handleBlur=function(sn){var qt=Nt.props,Rn=qt.goButton,Vn=qt.quickGo,hn=qt.rootPrefixCls,Yn=Nt.state.goInputText;Rn||Yn===""||(Nt.setState({goInputText:""}),!(sn.relatedTarget&&(sn.relatedTarget.className.indexOf("".concat(hn,"-item-link"))>=0||sn.relatedTarget.className.indexOf("".concat(hn,"-item"))>=0))&&Vn(Nt.getValidValue()))},Nt.go=function(sn){var qt=Nt.state.goInputText;qt!==""&&(sn.keyCode===Me.ENTER||sn.type==="click")&&(Nt.setState({goInputText:""}),Nt.props.quickGo(Nt.getValidValue()))},Nt}return(0,de.Z)(Ft,[{key:"getPageSizeOptions",value:function(){var dt=this.props,Kt=dt.pageSize,wn=dt.pageSizeOptions;return wn.some(function(sn){return sn.toString()===Kt.toString()})?wn:wn.concat([Kt.toString()]).sort(function(sn,qt){var Rn=Number.isNaN(Number(sn))?0:Number(sn),Vn=Number.isNaN(Number(qt))?0:Number(qt);return Rn-Vn})}},{key:"render",value:function(){var dt=this,Kt=this.props,wn=Kt.pageSize,sn=Kt.locale,qt=Kt.rootPrefixCls,Rn=Kt.changeSize,Vn=Kt.quickGo,hn=Kt.goButton,Yn=Kt.selectComponentClass,mi=Kt.buildOptionText,jn=Kt.selectPrefixCls,An=Kt.disabled,wi=this.state.goInputText,ji="".concat(qt,"-options"),Wi=Yn,dr=null,Mr=null,pi=null;if(!Rn&&!Vn)return null;var ui=this.getPageSizeOptions();if(Rn&&Wi){var Ci=ui.map(function(Xi,Ni){return Te.createElement(Wi.Option,{key:Ni,value:Xi.toString()},(mi||dt.buildOptionText)(Xi))});dr=Te.createElement(Wi,{disabled:An,prefixCls:jn,showSearch:!1,className:"".concat(ji,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(wn||ui[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Ni){return Ni.parentNode},"aria-label":sn.page_size,defaultOpen:!1},Ci)}return Vn&&(hn&&(pi=typeof hn=="boolean"?Te.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:An,className:"".concat(ji,"-quick-jumper-button")},sn.jump_to_confirm):Te.createElement("span",{onClick:this.go,onKeyUp:this.go},hn)),Mr=Te.createElement("div",{className:"".concat(ji,"-quick-jumper")},sn.jump_to,Te.createElement("input",{disabled:An,type:"text",value:wi,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":sn.page}),sn.page,pi)),Te.createElement("li",{className:"".concat(ji)},dr,Mr)}}]),Ft}(Te.Component);je.defaultProps={pageSizeOptions:["10","20","50","100"]};var _e=je,Je=function(it){var Ft,Nt=it.rootPrefixCls,dt=it.page,Kt=it.active,wn=it.className,sn=it.showTitle,qt=it.onClick,Rn=it.onKeyPress,Vn=it.itemRender,hn="".concat(Nt,"-item"),Yn=mt()(hn,"".concat(hn,"-").concat(dt),(Ft={},(0,Oe.Z)(Ft,"".concat(hn,"-active"),Kt),(0,Oe.Z)(Ft,"".concat(hn,"-disabled"),!dt),(0,Oe.Z)(Ft,it.className,wn),Ft)),mi=function(){qt(dt)},jn=function(ji){Rn(ji,qt,dt)},An=Vn(dt,"page",Te.createElement("a",{rel:"nofollow"},dt));return An?Te.createElement("li",{title:sn?dt.toString():null,className:Yn,onClick:mi,onKeyPress:jn,tabIndex:0},An):null},Xe=Je;function ht(){}function Ze(Qe){var it=Number(Qe);return typeof it=="number"&&!Number.isNaN(it)&&isFinite(it)&&Math.floor(it)===it}var Mt=function(it,Ft,Nt){return Nt};function ot(Qe,it,Ft){var Nt=typeof Qe=="undefined"?it.pageSize:Qe;return Math.floor((Ft.total-1)/Nt)+1}var Ot=function(Qe){(0,se.Z)(Ft,Qe);var it=(0,he.Z)(Ft);function Ft(Nt){var dt;(0,ee.Z)(this,Ft),dt=it.call(this,Nt),dt.paginationNode=Te.createRef(),dt.getJumpPrevPage=function(){return Math.max(1,dt.state.current-(dt.props.showLessItems?3:5))},dt.getJumpNextPage=function(){return Math.min(ot(void 0,dt.state,dt.props),dt.state.current+(dt.props.showLessItems?3:5))},dt.getItemIcon=function(Rn,Vn){var hn=dt.props.prefixCls,Yn=Rn||Te.createElement("button",{type:"button","aria-label":Vn,className:"".concat(hn,"-item-link")});return typeof Rn=="function"&&(Yn=Te.createElement(Rn,(0,te.Z)({},dt.props))),Yn},dt.isValid=function(Rn){var Vn=dt.props.total;return Ze(Rn)&&Rn!==dt.state.current&&Ze(Vn)&&Vn>0},dt.shouldDisplayQuickJumper=function(){var Rn=dt.props,Vn=Rn.showQuickJumper,hn=Rn.total,Yn=dt.state.pageSize;return hn<=Yn?!1:Vn},dt.handleKeyDown=function(Rn){(Rn.keyCode===Me.ARROW_UP||Rn.keyCode===Me.ARROW_DOWN)&&Rn.preventDefault()},dt.handleKeyUp=function(Rn){var Vn=dt.getValidValue(Rn),hn=dt.state.currentInputValue;Vn!==hn&&dt.setState({currentInputValue:Vn}),Rn.keyCode===Me.ENTER?dt.handleChange(Vn):Rn.keyCode===Me.ARROW_UP?dt.handleChange(Vn-1):Rn.keyCode===Me.ARROW_DOWN&&dt.handleChange(Vn+1)},dt.handleBlur=function(Rn){var Vn=dt.getValidValue(Rn);dt.handleChange(Vn)},dt.changePageSize=function(Rn){var Vn=dt.state.current,hn=ot(Rn,dt.state,dt.props);Vn=Vn>hn?hn:Vn,hn===0&&(Vn=dt.state.current),typeof Rn=="number"&&("pageSize"in dt.props||dt.setState({pageSize:Rn}),"current"in dt.props||dt.setState({current:Vn,currentInputValue:Vn})),dt.props.onShowSizeChange(Vn,Rn),"onChange"in dt.props&&dt.props.onChange&&dt.props.onChange(Vn,Rn)},dt.handleChange=function(Rn){var Vn=dt.props,hn=Vn.disabled,Yn=Vn.onChange,mi=dt.state,jn=mi.pageSize,An=mi.current,wi=mi.currentInputValue;if(dt.isValid(Rn)&&!hn){var ji=ot(void 0,dt.state,dt.props),Wi=Rn;return Rn>ji?Wi=ji:Rn<1&&(Wi=1),"current"in dt.props||dt.setState({current:Wi}),Wi!==wi&&dt.setState({currentInputValue:Wi}),Yn(Wi,jn),Wi}return An},dt.prev=function(){dt.hasPrev()&&dt.handleChange(dt.state.current-1)},dt.next=function(){dt.hasNext()&&dt.handleChange(dt.state.current+1)},dt.jumpPrev=function(){dt.handleChange(dt.getJumpPrevPage())},dt.jumpNext=function(){dt.handleChange(dt.getJumpNextPage())},dt.hasPrev=function(){return dt.state.current>1},dt.hasNext=function(){return dt.state.current<ot(void 0,dt.state,dt.props)},dt.runIfEnter=function(Rn,Vn){if(Rn.key==="Enter"||Rn.charCode===13){for(var hn=arguments.length,Yn=new Array(hn>2?hn-2:0),mi=2;mi<hn;mi++)Yn[mi-2]=arguments[mi];Vn.apply(void 0,Yn)}},dt.runIfEnterPrev=function(Rn){dt.runIfEnter(Rn,dt.prev)},dt.runIfEnterNext=function(Rn){dt.runIfEnter(Rn,dt.next)},dt.runIfEnterJumpPrev=function(Rn){dt.runIfEnter(Rn,dt.jumpPrev)},dt.runIfEnterJumpNext=function(Rn){dt.runIfEnter(Rn,dt.jumpNext)},dt.handleGoTO=function(Rn){(Rn.keyCode===Me.ENTER||Rn.type==="click")&&dt.handleChange(dt.state.currentInputValue)},dt.renderPrev=function(Rn){var Vn=dt.props,hn=Vn.prevIcon,Yn=Vn.itemRender,mi=Yn(Rn,"prev",dt.getItemIcon(hn,"prev page")),jn=!dt.hasPrev();return(0,Te.isValidElement)(mi)?(0,Te.cloneElement)(mi,{disabled:jn}):mi},dt.renderNext=function(Rn){var Vn=dt.props,hn=Vn.nextIcon,Yn=Vn.itemRender,mi=Yn(Rn,"next",dt.getItemIcon(hn,"next page")),jn=!dt.hasNext();return(0,Te.isValidElement)(mi)?(0,Te.cloneElement)(mi,{disabled:jn}):mi};var Kt=Nt.onChange!==ht,wn="current"in Nt;wn&&!Kt&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var sn=Nt.defaultCurrent;"current"in Nt&&(sn=Nt.current);var qt=Nt.defaultPageSize;return"pageSize"in Nt&&(qt=Nt.pageSize),sn=Math.min(sn,ot(qt,void 0,Nt)),dt.state={current:sn,currentInputValue:sn,pageSize:qt},dt}return(0,de.Z)(Ft,[{key:"componentDidUpdate",value:function(dt,Kt){var wn=this.props.prefixCls;if(Kt.current!==this.state.current&&this.paginationNode.current){var sn=this.paginationNode.current.querySelector(".".concat(wn,"-item-").concat(Kt.current));if(sn&&document.activeElement===sn){var qt;sn==null||(qt=sn.blur)===null||qt===void 0||qt.call(sn)}}}},{key:"getValidValue",value:function(dt){var Kt=dt.target.value,wn=ot(void 0,this.state,this.props),sn=this.state.currentInputValue,qt;return Kt===""?qt=Kt:Number.isNaN(Number(Kt))?qt=sn:Kt>=wn?qt=wn:qt=Number(Kt),qt}},{key:"getShowSizeChanger",value:function(){var dt=this.props,Kt=dt.showSizeChanger,wn=dt.total,sn=dt.totalBoundaryShowSizeChanger;return typeof Kt!="undefined"?Kt:wn>sn}},{key:"render",value:function(){var dt=this.props,Kt=dt.prefixCls,wn=dt.className,sn=dt.style,qt=dt.disabled,Rn=dt.hideOnSinglePage,Vn=dt.total,hn=dt.locale,Yn=dt.showQuickJumper,mi=dt.showLessItems,jn=dt.showTitle,An=dt.showTotal,wi=dt.simple,ji=dt.itemRender,Wi=dt.showPrevNextJumpers,dr=dt.jumpPrevIcon,Mr=dt.jumpNextIcon,pi=dt.selectComponentClass,ui=dt.selectPrefixCls,Ci=dt.pageSizeOptions,Xi=this.state,Ni=Xi.current,io=Xi.pageSize,hr=Xi.currentInputValue;if(Rn===!0&&Vn<=io)return null;var De=ot(void 0,this.state,this.props),Ei=[],Pr=null,Ln=null,vi=null,Zi=null,er=null,Gn=Yn&&Yn.goButton,$t=mi?1:2,Gt=Ni-1>0?Ni-1:0,Zt=Ni+1<De?Ni+1:De,wt=(0,ve.Z)(this.props,{aria:!0,data:!0}),vn=An&&Te.createElement("li",{className:"".concat(Kt,"-total-text")},An(Vn,[Vn===0?0:(Ni-1)*io+1,Ni*io>Vn?Vn:Ni*io]));if(wi){Gn&&(typeof Gn=="boolean"?er=Te.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},hn.jump_to_confirm):er=Te.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Gn),er=Te.createElement("li",{title:jn?"".concat(hn.jump_to).concat(Ni,"/").concat(De):null,className:"".concat(Kt,"-simple-pager")},er));var cn=this.renderPrev(Gt);return Te.createElement("ul",(0,le.Z)({className:mt()(Kt,"".concat(Kt,"-simple"),(0,Oe.Z)({},"".concat(Kt,"-disabled"),qt),wn),style:sn,ref:this.paginationNode},wt),vn,cn?Te.createElement("li",{title:jn?hn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:mt()("".concat(Kt,"-prev"),(0,Oe.Z)({},"".concat(Kt,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},cn):null,Te.createElement("li",{title:jn?"".concat(Ni,"/").concat(De):null,className:"".concat(Kt,"-simple-pager")},Te.createElement("input",{type:"text",value:hr,disabled:qt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Te.createElement("span",{className:"".concat(Kt,"-slash")},"/"),De),Te.createElement("li",{title:jn?hn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:mt()("".concat(Kt,"-next"),(0,Oe.Z)({},"".concat(Kt,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Zt)),er)}if(De<=3+$t*2){var It={locale:hn,rootPrefixCls:Kt,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:jn,itemRender:ji};De||Ei.push(Te.createElement(Xe,(0,le.Z)({},It,{key:"noPager",page:1,className:"".concat(Kt,"-item-disabled")})));for(var ct=1;ct<=De;ct+=1){var an=Ni===ct;Ei.push(Te.createElement(Xe,(0,le.Z)({},It,{key:ct,page:ct,active:an})))}}else{var dn=mi?hn.prev_3:hn.prev_5,ei=mi?hn.next_3:hn.next_5,pn=ji(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(dr,"prev page")),zt=ji(this.getJumpNextPage(),"jump-next",this.getItemIcon(Mr,"next page"));Wi&&(Pr=pn?Te.createElement("li",{title:jn?dn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:mt()("".concat(Kt,"-jump-prev"),(0,Oe.Z)({},"".concat(Kt,"-jump-prev-custom-icon"),!!dr))},pn):null,Ln=zt?Te.createElement("li",{title:jn?ei:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:mt()("".concat(Kt,"-jump-next"),(0,Oe.Z)({},"".concat(Kt,"-jump-next-custom-icon"),!!Mr))},zt):null),Zi=Te.createElement(Xe,{locale:hn,last:!0,rootPrefixCls:Kt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:De,page:De,active:!1,showTitle:jn,itemRender:ji}),vi=Te.createElement(Xe,{locale:hn,rootPrefixCls:Kt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:jn,itemRender:ji});var In=Math.max(1,Ni-$t),Qn=Math.min(Ni+$t,De);Ni-1<=$t&&(Qn=1+$t*2),De-Ni<=$t&&(In=De-$t*2);for(var xi=In;xi<=Qn;xi+=1){var tn=Ni===xi;Ei.push(Te.createElement(Xe,{locale:hn,rootPrefixCls:Kt,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:xi,page:xi,active:tn,showTitle:jn,itemRender:ji}))}Ni-1>=$t*2&&Ni!==3&&(Ei[0]=(0,Te.cloneElement)(Ei[0],{className:"".concat(Kt,"-item-after-jump-prev")}),Ei.unshift(Pr)),De-Ni>=$t*2&&Ni!==De-2&&(Ei[Ei.length-1]=(0,Te.cloneElement)(Ei[Ei.length-1],{className:"".concat(Kt,"-item-before-jump-next")}),Ei.push(Ln)),In!==1&&Ei.unshift(vi),Qn!==De&&Ei.push(Zi)}var fn=!this.hasPrev()||!De,kn=!this.hasNext()||!De,zi=this.renderPrev(Gt),Di=this.renderNext(Zt);return Te.createElement("ul",(0,le.Z)({className:mt()(Kt,wn,(0,Oe.Z)({},"".concat(Kt,"-disabled"),qt)),style:sn,ref:this.paginationNode},wt),vn,zi?Te.createElement("li",{title:jn?hn.prev_page:null,onClick:this.prev,tabIndex:fn?null:0,onKeyPress:this.runIfEnterPrev,className:mt()("".concat(Kt,"-prev"),(0,Oe.Z)({},"".concat(Kt,"-disabled"),fn)),"aria-disabled":fn},zi):null,Ei,Di?Te.createElement("li",{title:jn?hn.next_page:null,onClick:this.next,tabIndex:kn?null:0,onKeyPress:this.runIfEnterNext,className:mt()("".concat(Kt,"-next"),(0,Oe.Z)({},"".concat(Kt,"-disabled"),kn)),"aria-disabled":kn},Di):null,Te.createElement(_e,{disabled:qt,locale:hn,rootPrefixCls:Kt,selectComponentClass:pi,selectPrefixCls:ui,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Ni,pageSize:io,pageSizeOptions:Ci,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Gn}))}}],[{key:"getDerivedStateFromProps",value:function(dt,Kt){var wn={};if("current"in dt&&(wn.current=dt.current,dt.current!==Kt.current&&(wn.currentInputValue=wn.current)),"pageSize"in dt&&dt.pageSize!==Kt.pageSize){var sn=Kt.current,qt=ot(dt.pageSize,Kt,dt);sn=sn>qt?qt:sn,"current"in dt||(wn.current=sn,wn.currentInputValue=sn),wn.pageSize=dt.pageSize}return wn}}]),Ft}(Te.Component);Ot.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:ht,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:ht,locale:Be.Z,style:{},itemRender:Mt,totalBoundaryShowSizeChanger:50};var Pt=Ot,Dt=me(22075),Wt=me(36355),Lt=me(19716),qe=me(8628),Ke=me(9763),Rt=me(57809);const Sn=Qe=>Te.createElement(Rt.default,Object.assign({},Qe,{showSearch:!0,size:"small"})),Pn=Qe=>Te.createElement(Rt.default,Object.assign({},Qe,{showSearch:!0,size:"middle"}));Sn.Option=Rt.default.Option,Pn.Option=Rt.default.Option;var _t=me(9937),rn=me(17313),ln=me(83116),Wn=me(37613);const un=Qe=>{const{componentCls:it}=Qe;return{[`${it}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${it}-item-link`]:{color:Qe.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${it}-item-link`]:{color:Qe.colorTextDisabled,cursor:"not-allowed"}}},[`&${it}-disabled`]:{cursor:"not-allowed",[`${it}-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}}},[`${it}-item-link`]:{color:Qe.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${it}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${it}-simple-pager`]:{color:Qe.colorTextDisabled},[`${it}-jump-prev, ${it}-jump-next`]:{[`${it}-item-link-icon`]:{opacity:0},[`${it}-item-ellipsis`]:{opacity:1}}},[`&${it}-simple`]:{[`${it}-prev, ${it}-next`]:{[`&${it}-disabled ${it}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},_n=Qe=>{const{componentCls:it}=Qe;return{[`&${it}-mini ${it}-total-text, &${it}-mini ${it}-simple-pager`]:{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`},[`&${it}-mini ${it}-item`]:{minWidth:Qe.itemSizeSM,height:Qe.itemSizeSM,margin:0,lineHeight:`${Qe.itemSizeSM-2}px`},[`&${it}-mini:not(${it}-disabled) ${it}-item:not(${it}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:Qe.colorBgTextHover},"&:active":{backgroundColor:Qe.colorBgTextActive}},[`&${it}-mini ${it}-prev, &${it}-mini ${it}-next`]:{minWidth:Qe.itemSizeSM,height:Qe.itemSizeSM,margin:0,lineHeight:`${Qe.itemSizeSM}px`},[`&${it}-mini:not(${it}-disabled)`]:{[`${it}-prev, ${it}-next`]:{[`&:hover ${it}-item-link`]:{backgroundColor:Qe.colorBgTextHover},[`&:active ${it}-item-link`]:{backgroundColor:Qe.colorBgTextActive},[`&${it}-disabled:hover ${it}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
|
&${it}-mini ${it}-prev ${it}-item-link,
|
|
|
&${it}-mini ${it}-next ${it}-item-link
|
|
|
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`}},[`&${it}-mini ${it}-jump-prev, &${it}-mini ${it}-jump-next`]:{height:Qe.itemSizeSM,marginInlineEnd:0,lineHeight:`${Qe.itemSizeSM}px`},[`&${it}-mini ${it}-options`]:{marginInlineStart:Qe.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:Qe.miniOptionsSizeChangerTop},"&-quick-jumper":{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,_t.x0)(Qe)),{width:Qe.paginationMiniQuickJumperInputWidth,height:Qe.controlHeightSM})}}}},St=Qe=>{const{componentCls:it}=Qe;return{[`
|
|
|
&${it}-simple ${it}-prev,
|
|
|
&${it}-simple ${it}-next
|
|
|
`]:{height:Qe.itemSizeSM,lineHeight:`${Qe.itemSizeSM}px`,verticalAlign:"top",[`${it}-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`}}},[`&${it}-simple ${it}-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"}}}}},Zn=Qe=>{const{componentCls:it}=Qe;return{[`${it}-jump-prev, ${it}-jump-next`]:{outline:0,[`${it}-item-container`]:{position:"relative",[`${it}-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"}},[`${it}-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":{[`${it}-item-link-icon`]:{opacity:1},[`${it}-item-ellipsis`]:{opacity:0}}},[`
|
|
|
${it}-prev,
|
|
|
${it}-jump-prev,
|
|
|
${it}-jump-next
|
|
|
`]:{marginInlineEnd:Qe.marginXS},[`
|
|
|
${it}-prev,
|
|
|
${it}-next,
|
|
|
${it}-jump-prev,
|
|
|
${it}-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}`},[`${it}-prev, ${it}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:Qe.colorText,cursor:"pointer",userSelect:"none"},[`${it}-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 ${it}-item-link`]:{backgroundColor:Qe.colorBgTextHover},[`&:active ${it}-item-link`]:{backgroundColor:Qe.colorBgTextActive},[`&${it}-disabled:hover`]:{[`${it}-item-link`]:{backgroundColor:"transparent"}}},[`${it}-slash`]:{marginInlineEnd:Qe.paginationSlashMarginInlineEnd,marginInlineStart:Qe.paginationSlashMarginInlineStart},[`${it}-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,_t.ik)(Qe)),{width:Qe.controlHeightLG*1.25,height:Qe.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:Qe.marginXS,marginInlineEnd:Qe.marginXS})}}}},li=Qe=>{const{componentCls:it}=Qe;return{[`${it}-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(${it}-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}}}}},Ge=Qe=>{const{componentCls:it}=Qe;return{[it]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,rn.Wf)(Qe)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${it}-total-text`]:{display:"inline-block",height:Qe.itemSize,marginInlineEnd:Qe.marginXS,lineHeight:`${Qe.itemSize-2}px`,verticalAlign:"middle"}}),li(Qe)),Zn(Qe)),St(Qe)),_n(Qe)),un(Qe)),{[`@media only screen and (max-width: ${Qe.screenLG}px)`]:{[`${it}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${Qe.screenSM}px)`]:{[`${it}-options`]:{display:"none"}}}),[`&${Qe.componentCls}-rtl`]:{direction:"rtl"}}},be=Qe=>{const{componentCls:it}=Qe;return{[`${it}${it}-disabled:not(${it}-mini)`]:{"&, &:hover":{[`${it}-item-link`]:{borderColor:Qe.colorBorder}},"&:focus-visible":{[`${it}-item-link`]:{borderColor:Qe.colorBorder}},[`${it}-item, ${it}-item-link`]:{backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder,[`&:hover:not(${it}-item-active)`]:{backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder,a:{color:Qe.colorTextDisabled}},[`&${it}-item-active`]:{backgroundColor:Qe.itemActiveBgDisabled}},[`${it}-prev, ${it}-next`]:{"&:hover button":{backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder,color:Qe.colorTextDisabled},[`${it}-item-link`]:{backgroundColor:Qe.colorBgContainerDisabled,borderColor:Qe.colorBorder}}},[`${it}:not(${it}-mini)`]:{[`${it}-prev, ${it}-next`]:{"&:hover button":{borderColor:Qe.colorPrimaryHover,backgroundColor:Qe.itemBg},[`${it}-item-link`]:{backgroundColor:Qe.itemLinkBg,borderColor:Qe.colorBorder},[`&:hover ${it}-item-link`]:{borderColor:Qe.colorPrimary,backgroundColor:Qe.itemBg,color:Qe.colorPrimary},[`&${it}-disabled`]:{[`${it}-item-link`]:{borderColor:Qe.colorBorder,color:Qe.colorTextDisabled}}},[`${it}-item`]:{backgroundColor:Qe.itemBg,border:`${Qe.lineWidth}px ${Qe.lineType} ${Qe.colorBorder}`,[`&:hover:not(${it}-item-active)`]:{borderColor:Qe.colorPrimary,backgroundColor:Qe.itemBg,a:{color:Qe.colorPrimary}},"&-active":{borderColor:Qe.colorPrimary}}}}},Pe=Qe=>{const{componentCls:it}=Qe;return{[`${it}:not(${it}-disabled)`]:{[`${it}-item`]:Object.assign({},(0,rn.Qy)(Qe)),[`${it}-jump-prev, ${it}-jump-next`]:{"&:focus-visible":Object.assign({[`${it}-item-link-icon`]:{opacity:1},[`${it}-item-ellipsis`]:{opacity:0}},(0,rn.oN)(Qe))},[`${it}-prev, ${it}-next`]:{[`&:focus-visible ${it}-item-link`]:Object.assign({},(0,rn.oN)(Qe))}}}};var Ae=(0,ln.Z)("Pagination",Qe=>{const it=(0,Wn.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,_t.e5)(Qe),(0,_t.TM)(Qe));return[Ge(it),Pe(it),Qe.wireframe&&be(it)]},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})),Ne=function(Qe,it){var Ft={};for(var Nt in Qe)Object.prototype.hasOwnProperty.call(Qe,Nt)&&it.indexOf(Nt)<0&&(Ft[Nt]=Qe[Nt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Nt=Object.getOwnPropertySymbols(Qe);dt<Nt.length;dt++)it.indexOf(Nt[dt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Nt[dt])&&(Ft[Nt[dt]]=Qe[Nt[dt]]);return Ft},ut=Qe=>{const{prefixCls:it,selectPrefixCls:Ft,className:Nt,rootClassName:dt,style:Kt,size:wn,locale:sn,selectComponentClass:qt,responsive:Rn,showSizeChanger:Vn}=Qe,hn=Ne(Qe,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Yn}=(0,qe.Z)(Rn),{getPrefixCls:mi,direction:jn,pagination:An={}}=Te.useContext(Wt.E_),wi=mi("pagination",it),[ji,Wi]=Ae(wi),dr=Vn!=null?Vn:An.showSizeChanger,Mr=Te.useMemo(()=>{const De=Te.createElement("span",{className:`${wi}-item-ellipsis`},"\u2022\u2022\u2022"),Ei=Te.createElement("button",{className:`${wi}-item-link`,type:"button",tabIndex:-1},jn==="rtl"?Te.createElement(bt.Z,null):Te.createElement(Ue.Z,null)),Pr=Te.createElement("button",{className:`${wi}-item-link`,type:"button",tabIndex:-1},jn==="rtl"?Te.createElement(Ue.Z,null):Te.createElement(bt.Z,null)),Ln=Te.createElement("a",{className:`${wi}-item-link`},Te.createElement("div",{className:`${wi}-item-container`},jn==="rtl"?Te.createElement(xt.Z,{className:`${wi}-item-link-icon`}):Te.createElement(Ct,{className:`${wi}-item-link-icon`}),De)),vi=Te.createElement("a",{className:`${wi}-item-link`},Te.createElement("div",{className:`${wi}-item-container`},jn==="rtl"?Te.createElement(Ct,{className:`${wi}-item-link-icon`}):Te.createElement(xt.Z,{className:`${wi}-item-link-icon`}),De));return{prevIcon:Ei,nextIcon:Pr,jumpPrevIcon:Ln,jumpNextIcon:vi}},[jn,wi]),[pi]=(0,Ke.Z)("Pagination",Dt.Z),ui=Object.assign(Object.assign({},pi),sn),Ci=(0,Lt.Z)(wn),Xi=Ci==="small"||!!(Yn&&!Ci&&Rn),Ni=mi("select",Ft),io=mt()({[`${wi}-mini`]:Xi,[`${wi}-rtl`]:jn==="rtl"},An==null?void 0:An.className,Nt,dt,Wi),hr=Object.assign(Object.assign({},An==null?void 0:An.style),Kt);return ji(Te.createElement(Pt,Object.assign({},Mr,hn,{style:hr,prefixCls:wi,selectPrefixCls:Ni,className:io,selectComponentClass:qt||(Xi?Sn:Pn),locale:ui,showSizeChanger:dr})))},Bt=ut},39722:function(Tn,xn,me){"use strict";me.d(xn,{t5:function(){return Ue}});var le=me(92310),Te=me.n(le),He=me(55477),lt=me(59301),We=me(36355),Ve=me(77578),Le=me(17356),Ct=function(at,mt){var Oe={};for(var te in at)Object.prototype.hasOwnProperty.call(at,te)&&mt.indexOf(te)<0&&(Oe[te]=at[te]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,te=Object.getOwnPropertySymbols(at);ee<te.length;ee++)mt.indexOf(te[ee])<0&&Object.prototype.propertyIsEnumerable.call(at,te[ee])&&(Oe[te[ee]]=at[te[ee]]);return Oe};const xt=(at,mt,Oe)=>{if(!(!mt&&!Oe))return lt.createElement(lt.Fragment,null,mt&<.createElement("div",{className:`${at}-title`},(0,Ve.Z)(mt)),lt.createElement("div",{className:`${at}-inner-content`},(0,Ve.Z)(Oe)))},Ue=at=>{const{hashId:mt,prefixCls:Oe,className:te,style:ee,placement:de="top",title:se,content:he,children:ve}=at;return lt.createElement("div",{className:Te()(mt,Oe,`${Oe}-pure`,`${Oe}-placement-${de}`,te),style:ee},lt.createElement("div",{className:`${Oe}-arrow`}),lt.createElement(He.G,Object.assign({},at,{className:mt,prefixCls:Oe}),ve||xt(Oe,se,he)))},bt=at=>{const{prefixCls:mt}=at,Oe=Ct(at,["prefixCls"]),{getPrefixCls:te}=lt.useContext(We.E_),ee=te("popover",mt),[de,se]=(0,Le.Z)(ee);return de(lt.createElement(Ue,Object.assign({},Oe,{prefixCls:ee,hashId:se})))};xn.ZP=bt},60324:function(Tn,xn,me){"use strict";var le=me(92310),Te=me.n(le),He=me(59301),lt=me(77578),We=me(62892),Ve=me(36355),Le=me(6848),Ct=me(39722),xt=me(17356),Ue=function(mt,Oe){var te={};for(var ee in mt)Object.prototype.hasOwnProperty.call(mt,ee)&&Oe.indexOf(ee)<0&&(te[ee]=mt[ee]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,ee=Object.getOwnPropertySymbols(mt);de<ee.length;de++)Oe.indexOf(ee[de])<0&&Object.prototype.propertyIsEnumerable.call(mt,ee[de])&&(te[ee[de]]=mt[ee[de]]);return te};const bt=mt=>{let{title:Oe,content:te,prefixCls:ee}=mt;return He.createElement(He.Fragment,null,Oe&&He.createElement("div",{className:`${ee}-title`},(0,lt.Z)(Oe)),He.createElement("div",{className:`${ee}-inner-content`},(0,lt.Z)(te)))},at=He.forwardRef((mt,Oe)=>{const{prefixCls:te,title:ee,content:de,overlayClassName:se,placement:he="top",trigger:ve="hover",mouseEnterDelay:Ee=.1,mouseLeaveDelay:Me=.1,overlayStyle:Be={}}=mt,je=Ue(mt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:_e}=He.useContext(Ve.E_),Je=_e("popover",te),[Xe,ht]=(0,xt.Z)(Je),Ze=_e(),Mt=Te()(se,ht);return Xe(He.createElement(Le.Z,Object.assign({placement:he,trigger:ve,mouseEnterDelay:Ee,mouseLeaveDelay:Me,overlayStyle:Be},je,{prefixCls:Je,overlayClassName:Mt,ref:Oe,overlay:ee||de?He.createElement(bt,{prefixCls:Je,title:ee,content:de}):null,transitionName:(0,We.m)(Ze,"zoom-big",je.transitionName),"data-popover-inject":!0})))});at._InternalPanelDoNotUseOrYouWillBeFired=Ct.ZP,xn.Z=at},17356:function(Tn,xn,me){"use strict";var le=me(17313),Te=me(29878),He=me(19447),lt=me(33166),We=me(83116),Ve=me(37613);const Le=Ue=>{const{componentCls:bt,popoverColor:at,minWidth:mt,fontWeightStrong:Oe,popoverPadding:te,boxShadowSecondary:ee,colorTextHeading:de,borderRadiusLG:se,zIndexPopup:he,marginXS:ve,colorBgElevated:Ee,popoverBg:Me}=Ue;return[{[bt]:Object.assign(Object.assign({},(0,le.Wf)(Ue)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:he,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":Ee,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${bt}-content`]:{position:"relative"},[`${bt}-inner`]:{backgroundColor:Me,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:te},[`${bt}-title`]:{minWidth:mt,marginBottom:ve,color:de,fontWeight:Oe},[`${bt}-inner-content`]:{color:at}})},(0,He.ZP)(Ue,{colorBg:"var(--antd-arrow-background-color)"}),{[`${bt}-pure`]:{position:"relative",maxWidth:"none",margin:Ue.sizePopupArrow,display:"inline-block",[`${bt}-content`]:{display:"inline-block"}}}]},Ct=Ue=>{const{componentCls:bt}=Ue;return{[bt]:lt.i.map(at=>{const mt=Ue[`${at}6`];return{[`&${bt}-${at}`]:{"--antd-arrow-background-color":mt,[`${bt}-inner`]:{backgroundColor:mt},[`${bt}-arrow`]:{background:"transparent"}}}})}},xt=Ue=>{const{componentCls:bt,lineWidth:at,lineType:mt,colorSplit:Oe,paddingSM:te,controlHeight:ee,fontSize:de,lineHeight:se,padding:he}=Ue,ve=ee-Math.round(de*se),Ee=ve/2,Me=ve/2-at,Be=he;return{[bt]:{[`${bt}-inner`]:{padding:0},[`${bt}-title`]:{margin:0,padding:`${Ee}px ${Be}px ${Me}px`,borderBottom:`${at}px ${mt} ${Oe}`},[`${bt}-inner-content`]:{padding:`${te}px ${Be}px`}}}};xn.Z=(0,We.Z)("Popover",Ue=>{const{colorBgElevated:bt,colorText:at,wireframe:mt}=Ue,Oe=(0,Ve.TS)(Ue,{popoverPadding:12,popoverBg:bt,popoverColor:at});return[Le(Oe),Ct(Oe),mt&&xt(Oe),(0,Te._y)(Oe,"zoom-big")]},Ue=>({width:177,minWidth:177,zIndexPopup:Ue.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},13570:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ke}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(Sn,Pn){return Te.createElement(We.Z,(0,le.Z)({},Sn,{ref:Pn,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le,xt=me(92310),Ue=me.n(xt),bt=me(400),at=me(33606),mt=me(37061),Oe=me(18929),te=me(10228),ee=me(26112);function de(Rt,Sn){var Pn=Rt.disabled,_t=Rt.prefixCls,rn=Rt.character,ln=Rt.characterRender,Wn=Rt.index,un=Rt.count,_n=Rt.value,St=Rt.allowHalf,Zn=Rt.focused,li=Rt.onHover,Ge=Rt.onClick,be=function(it){li(it,Wn)},Pe=function(it){Ge(it,Wn)},Ae=function(it){it.keyCode===te.Z.ENTER&&Ge(it,Wn)},Ne=Wn+1,xe=new Set([_t]);_n===0&&Wn===0&&Zn?xe.add("".concat(_t,"-focused")):St&&_n+.5>=Ne&&_n<Ne?(xe.add("".concat(_t,"-half")),xe.add("".concat(_t,"-active")),Zn&&xe.add("".concat(_t,"-focused"))):(Ne<=_n?xe.add("".concat(_t,"-full")):xe.add("".concat(_t,"-zero")),Ne===_n&&Zn&&xe.add("".concat(_t,"-focused")));var ut=typeof rn=="function"?rn(Rt):rn,Bt=Te.createElement("li",{className:Ue()(Array.from(xe)),ref:Sn},Te.createElement("div",{onClick:Pn?null:Pe,onKeyDown:Pn?null:Ae,onMouseMove:Pn?null:be,role:"radio","aria-checked":_n>Wn?"true":"false","aria-posinset":Wn+1,"aria-setsize":un,tabIndex:Pn?-1:0},Te.createElement("div",{className:"".concat(_t,"-first")},ut),Te.createElement("div",{className:"".concat(_t,"-second")},ut)));return ln&&(Bt=ln(Bt,Rt)),Bt}var se=Te.forwardRef(de);function he(){var Rt=Te.useRef({});function Sn(_t){return Rt.current[_t]}function Pn(_t){return function(rn){Rt.current[_t]=rn}}return[Sn,Pn]}function ve(Rt){var Sn=Rt.pageXOffset,Pn="scrollLeft";if(typeof Sn!="number"){var _t=Rt.document;Sn=_t.documentElement[Pn],typeof Sn!="number"&&(Sn=_t.body[Pn])}return Sn}function Ee(Rt){var Sn,Pn,_t=Rt.ownerDocument,rn=_t.body,ln=_t&&_t.documentElement,Wn=Rt.getBoundingClientRect();return Sn=Wn.left,Pn=Wn.top,Sn-=ln.clientLeft||rn.clientLeft||0,Pn-=ln.clientTop||rn.clientTop||0,{left:Sn,top:Pn}}function Me(Rt){var Sn=Ee(Rt),Pn=Rt.ownerDocument,_t=Pn.defaultView||Pn.parentWindow;return Sn.left+=ve(_t),Sn.left}var Be=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function je(Rt,Sn){var Pn,_t=Rt.prefixCls,rn=_t===void 0?"rc-rate":_t,ln=Rt.className,Wn=Rt.defaultValue,un=Rt.value,_n=Rt.count,St=_n===void 0?5:_n,Zn=Rt.allowHalf,li=Zn===void 0?!1:Zn,Ge=Rt.allowClear,be=Ge===void 0?!0:Ge,Pe=Rt.character,Ae=Pe===void 0?"\u2605":Pe,Ne=Rt.characterRender,xe=Rt.disabled,ut=Rt.direction,Bt=ut===void 0?"ltr":ut,Qe=Rt.tabIndex,it=Qe===void 0?0:Qe,Ft=Rt.autoFocus,Nt=Rt.onHoverChange,dt=Rt.onChange,Kt=Rt.onFocus,wn=Rt.onBlur,sn=Rt.onKeyDown,qt=Rt.onMouseLeave,Rn=(0,mt.Z)(Rt,Be),Vn=he(),hn=(0,at.Z)(Vn,2),Yn=hn[0],mi=hn[1],jn=Te.useRef(null),An=function(){if(!xe){var ct;(ct=jn.current)===null||ct===void 0||ct.focus()}};Te.useImperativeHandle(Sn,function(){return{focus:An,blur:function(){if(!xe){var ct;(ct=jn.current)===null||ct===void 0||ct.blur()}}}});var wi=(0,Oe.Z)(Wn||0,{value:un}),ji=(0,at.Z)(wi,2),Wi=ji[0],dr=ji[1],Mr=(0,Oe.Z)(null),pi=(0,at.Z)(Mr,2),ui=pi[0],Ci=pi[1],Xi=function(ct,an){var dn=Bt==="rtl",ei=ct+1;if(li){var pn=Yn(ct),zt=Me(pn),In=pn.clientWidth;(dn&&an-zt>In/2||!dn&&an-zt<In/2)&&(ei-=.5)}return ei},Ni=function(ct){dr(ct),dt==null||dt(ct)},io=Te.useState(!1),hr=(0,at.Z)(io,2),De=hr[0],Ei=hr[1],Pr=function(){Ei(!0),Kt==null||Kt()},Ln=function(){Ei(!1),wn==null||wn()},vi=Te.useState(null),Zi=(0,at.Z)(vi,2),er=Zi[0],Gn=Zi[1],$t=function(ct,an){var dn=Xi(an,ct.pageX);dn!==ui&&(Gn(dn),Ci(null)),Nt==null||Nt(dn)},Gt=function(ct){xe||(Gn(null),Ci(null),Nt==null||Nt(void 0)),ct&&(qt==null||qt(ct))},Zt=function(ct,an){var dn=Xi(an,ct.pageX),ei=!1;be&&(ei=dn===Wi),Gt(),Ni(ei?0:dn),Ci(ei?dn:null)},wt=function(ct){var an=ct.keyCode,dn=Bt==="rtl",ei=Wi;an===te.Z.RIGHT&&ei<St&&!dn?(li?ei+=.5:ei+=1,Ni(ei),ct.preventDefault()):an===te.Z.LEFT&&ei>0&&!dn||an===te.Z.RIGHT&&ei>0&&dn?(li?ei-=.5:ei-=1,Ni(ei),ct.preventDefault()):an===te.Z.LEFT&&ei<St&&dn&&(li?ei+=.5:ei+=1,Ni(ei),ct.preventDefault()),sn==null||sn(ct)};Te.useEffect(function(){Ft&&!xe&&An()},[]);var vn=new Array(St).fill(0).map(function(It,ct){return Te.createElement(se,{ref:mi(ct),index:ct,count:St,disabled:xe,prefixCls:"".concat(rn,"-star"),allowHalf:li,value:er===null?Wi:er,onClick:Zt,onHover:$t,key:It||ct,character:Ae,characterRender:Ne,focused:De})}),cn=Ue()(rn,ln,(Pn={},(0,bt.Z)(Pn,"".concat(rn,"-disabled"),xe),(0,bt.Z)(Pn,"".concat(rn,"-rtl"),Bt==="rtl"),Pn));return Te.createElement("ul",(0,le.Z)({className:cn,onMouseLeave:Gt,tabIndex:xe?-1:it,onFocus:xe?null:Pr,onBlur:xe?null:Ln,onKeyDown:xe?null:wt,ref:jn,role:"radiogroup"},(0,ee.Z)(Rn,{aria:!0,data:!0,attr:!0})),vn)}var _e=Te.forwardRef(je),Je=_e,Xe=me(36355),ht=me(6848),Ze=me(17313),Mt=me(83116),ot=me(37613);const Ot=Rt=>{const{componentCls:Sn}=Rt;return{[`${Sn}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:Rt.marginXS},"> div":{transition:`all ${Rt.motionDurationMid}, outline 0s`,"&:hover":{transform:Rt.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${Rt.lineWidth}px dashed ${Rt.starColor}`,transform:Rt.starHoverScale}},"&-first, &-second":{color:Rt.starBg,transition:`all ${Rt.motionDurationMid}`,userSelect:"none",[Rt.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${Sn}-star-first, &-half ${Sn}-star-second`]:{opacity:1},[`&-half ${Sn}-star-first, &-full ${Sn}-star-second`]:{color:"inherit"}}}},Pt=Rt=>({[`&-rtl${Rt.componentCls}`]:{direction:"rtl"}}),Dt=Rt=>{const{componentCls:Sn}=Rt;return{[Sn]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ze.Wf)(Rt)),{display:"inline-block",margin:0,padding:0,color:Rt.starColor,fontSize:Rt.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${Sn} ${Sn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Ot(Rt)),{[`+ ${Sn}-text`]:{display:"inline-block",marginInlineStart:Rt.marginXS,fontSize:Rt.fontSize}}),Pt(Rt))}};var Wt=(0,Mt.Z)("Rate",Rt=>{const Sn=(0,ot.TS)(Rt,{});return[Dt(Sn)]},Rt=>({starColor:Rt.yellow6,starSize:Rt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:Rt.colorFillContent})),Lt=function(Rt,Sn){var Pn={};for(var _t in Rt)Object.prototype.hasOwnProperty.call(Rt,_t)&&Sn.indexOf(_t)<0&&(Pn[_t]=Rt[_t]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var rn=0,_t=Object.getOwnPropertySymbols(Rt);rn<_t.length;rn++)Sn.indexOf(_t[rn])<0&&Object.prototype.propertyIsEnumerable.call(Rt,_t[rn])&&(Pn[_t[rn]]=Rt[_t[rn]]);return Pn},Ke=Te.forwardRef((Rt,Sn)=>{const{prefixCls:Pn,className:_t,rootClassName:rn,style:ln,tooltips:Wn,character:un=Te.createElement(Ct,null)}=Rt,_n=Lt(Rt,["prefixCls","className","rootClassName","style","tooltips","character"]),St=(xe,ut)=>{let{index:Bt}=ut;return Wn?Te.createElement(ht.Z,{title:Wn[Bt]},xe):xe},{getPrefixCls:Zn,direction:li,rate:Ge}=Te.useContext(Xe.E_),be=Zn("rate",Pn),[Pe,Ae]=Wt(be),Ne=Object.assign(Object.assign({},Ge==null?void 0:Ge.style),ln);return Pe(Te.createElement(Je,Object.assign({ref:Sn,character:un,characterRender:St},_n,{className:Ue()(_t,rn,Ae,Ge==null?void 0:Ge.className),style:Ne,prefixCls:be,direction:li})))})},57809:function(Tn,xn,me){"use strict";var le=me(92310),Te=me.n(le),He=me(77861),lt=me(2738),We=me(59301),Ve=me(53487),Le=me(62892),Ct=me(19080),xt=me(36355),Ue=me(1684),bt=me(93891),at=me(19716),mt=me(32441),Oe=me(33234),te=me(14154),ee=me(58582),de=me(84443),se=me(66339),he=function(je,_e){var Je={};for(var Xe in je)Object.prototype.hasOwnProperty.call(je,Xe)&&_e.indexOf(Xe)<0&&(Je[Xe]=je[Xe]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Xe=Object.getOwnPropertySymbols(je);ht<Xe.length;ht++)_e.indexOf(Xe[ht])<0&&Object.prototype.propertyIsEnumerable.call(je,Xe[ht])&&(Je[Xe[ht]]=je[Xe[ht]]);return Je};const ve="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ee=(je,_e)=>{var Je,{prefixCls:Xe,bordered:ht=!0,className:Ze,rootClassName:Mt,getPopupContainer:ot,popupClassName:Ot,dropdownClassName:Pt,listHeight:Dt=256,placement:Wt,listItemHeight:Lt=24,size:qe,disabled:Ke,notFoundContent:Rt,status:Sn,builtinPlacements:Pn,dropdownMatchSelectWidth:_t,popupMatchSelectWidth:rn,direction:ln,style:Wn,allowClear:un}=je,_n=he(je,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:St,getPrefixCls:Zn,renderEmpty:li,direction:Ge,virtual:be,popupMatchSelectWidth:Pe,popupOverflow:Ae,select:Ne}=We.useContext(xt.E_),xe=Zn("select",Xe),ut=Zn(),Bt=ln!=null?ln:Ge,{compactSize:Qe,compactItemClassnames:it}=(0,Oe.ri)(xe,Bt),[Ft,Nt]=(0,te.Z)(xe),dt=We.useMemo(()=>{const{mode:hr}=_n;if(hr!=="combobox")return hr===ve?"combobox":hr},[_n.mode]),Kt=dt==="multiple"||dt==="tags",wn=(0,de.Z)(_n.suffixIcon,_n.showArrow),sn=(Je=rn!=null?rn:_t)!==null&&Je!==void 0?Je:Pe,{status:qt,hasFeedback:Rn,isFormItemInput:Vn,feedbackIcon:hn}=We.useContext(mt.aM),Yn=(0,Ct.F)(qt,Sn);let mi;Rt!==void 0?mi=Rt:dt==="combobox"?mi=null:mi=(li==null?void 0:li("Select"))||We.createElement(bt.Z,{componentName:"Select"});const{suffixIcon:jn,itemIcon:An,removeIcon:wi,clearIcon:ji}=(0,se.Z)(Object.assign(Object.assign({},_n),{multiple:Kt,hasFeedback:Rn,feedbackIcon:hn,showSuffixIcon:wn,prefixCls:xe,showArrow:_n.showArrow,componentName:"Select"})),Wi=un===!0?{clearIcon:ji}:un,dr=(0,lt.Z)(_n,["suffixIcon","itemIcon"]),Mr=Te()(Ot||Pt,{[`${xe}-dropdown-${Bt}`]:Bt==="rtl"},Mt,Nt),pi=(0,at.Z)(hr=>{var De;return(De=qe!=null?qe:Qe)!==null&&De!==void 0?De:hr}),ui=We.useContext(Ue.Z),Ci=Ke!=null?Ke:ui,Xi=Te()({[`${xe}-lg`]:pi==="large",[`${xe}-sm`]:pi==="small",[`${xe}-rtl`]:Bt==="rtl",[`${xe}-borderless`]:!ht,[`${xe}-in-form-item`]:Vn},(0,Ct.Z)(xe,Yn,Rn),it,Ne==null?void 0:Ne.className,Ze,Mt,Nt),Ni=We.useMemo(()=>Wt!==void 0?Wt:Bt==="rtl"?"bottomRight":"bottomLeft",[Wt,Bt]),io=(0,ee.Z)(Pn,Ae);return Ft(We.createElement(He.ZP,Object.assign({ref:_e,virtual:be,showSearch:Ne==null?void 0:Ne.showSearch},dr,{style:Object.assign(Object.assign({},Ne==null?void 0:Ne.style),Wn),dropdownMatchSelectWidth:sn,builtinPlacements:io,transitionName:(0,Le.m)(ut,"slide-up",_n.transitionName),listHeight:Dt,listItemHeight:Lt,mode:dt,prefixCls:xe,placement:Ni,direction:Bt,suffixIcon:jn,menuItemSelectedIcon:An,removeIcon:wi,allowClear:Wi,notFoundContent:mi,className:Xi,getPopupContainer:ot||St,dropdownClassName:Mr,disabled:Ci})))},Me=We.forwardRef(Ee),Be=(0,Ve.Z)(Me);Me.SECRET_COMBOBOX_MODE_DO_NOT_USE=ve,Me.Option=He.Wx,Me.OptGroup=He.Xo,Me._InternalPanelDoNotUseOrYouWillBeFired=Be,xn.default=Me},14154:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Me}});var le=me(17313),Te=me(74207),He=me(37613),lt=me(83116),We=me(13826),Ve=me(92899);const Le=Be=>{const{optionHeight:je,optionFontSize:_e,optionLineHeight:Je,optionPadding:Xe}=Be;return{position:"relative",display:"block",minHeight:je,padding:Xe,color:Be.colorText,fontWeight:"normal",fontSize:_e,lineHeight:Je,boxSizing:"border-box"}};var xt=Be=>{const{antCls:je,componentCls:_e}=Be,Je=`${_e}-item`,Xe=`&${je}-slide-up-enter${je}-slide-up-enter-active`,ht=`&${je}-slide-up-appear${je}-slide-up-appear-active`,Ze=`&${je}-slide-up-leave${je}-slide-up-leave-active`,Mt=`${_e}-dropdown-placement-`;return[{[`${_e}-dropdown`]:Object.assign(Object.assign({},(0,le.Wf)(Be)),{position:"absolute",top:-9999,zIndex:Be.zIndexPopup,boxSizing:"border-box",padding:Be.paddingXXS,overflow:"hidden",fontSize:Be.fontSize,fontVariant:"initial",backgroundColor:Be.colorBgElevated,borderRadius:Be.borderRadiusLG,outline:"none",boxShadow:Be.boxShadowSecondary,[`
|
|
|
${Xe}${Mt}bottomLeft,
|
|
|
${ht}${Mt}bottomLeft
|
|
|
`]:{animationName:We.fJ},[`
|
|
|
${Xe}${Mt}topLeft,
|
|
|
${ht}${Mt}topLeft,
|
|
|
${Xe}${Mt}topRight,
|
|
|
${ht}${Mt}topRight
|
|
|
`]:{animationName:We.Qt},[`${Ze}${Mt}bottomLeft`]:{animationName:We.Uw},[`
|
|
|
${Ze}${Mt}topLeft,
|
|
|
${Ze}${Mt}topRight
|
|
|
`]:{animationName:We.ly},"&-hidden":{display:"none"},[`${Je}`]:Object.assign(Object.assign({},Le(Be)),{cursor:"pointer",transition:`background ${Be.motionDurationSlow} ease`,borderRadius:Be.borderRadiusSM,"&-group":{color:Be.colorTextDescription,fontSize:Be.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},le.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Je}-option-disabled)`]:{backgroundColor:Be.optionActiveBg},[`&-selected:not(${Je}-option-disabled)`]:{color:Be.optionSelectedColor,fontWeight:Be.optionSelectedFontWeight,backgroundColor:Be.optionSelectedBg,[`${Je}-option-state`]:{color:Be.colorPrimary}},"&-disabled":{[`&${Je}-option-selected`]:{backgroundColor:Be.colorBgContainerDisabled},color:Be.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Be.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,We.oN)(Be,"slide-up"),(0,We.oN)(Be,"slide-down"),(0,Ve.Fm)(Be,"move-up"),(0,Ve.Fm)(Be,"move-down")]};const Ue=2,bt=Be=>{let{controlHeightSM:je,controlHeight:_e,lineWidth:Je}=Be;const Xe=(_e-je)/2-Je,ht=Math.ceil(Xe/2);return[Xe,ht]};function at(Be,je){const{componentCls:_e,iconCls:Je}=Be,Xe=`${_e}-selection-overflow`,ht=Be.multipleSelectItemHeight,[Ze]=bt(Be),Mt=je?`${_e}-${je}`:"";return{[`${_e}-multiple${Mt}`]:{fontSize:Be.fontSize,[Xe]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${_e}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ze-Ue}px ${Ue*2}px`,borderRadius:Be.borderRadius,[`${_e}-show-search&`]:{cursor:"text"},[`${_e}-disabled&`]:{background:Be.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ue}px 0`,lineHeight:`${ht}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${_e}-show-arrow ${_e}-selector,
|
|
|
&${_e}-allow-clear ${_e}-selector
|
|
|
`]:{paddingInlineEnd:Be.fontSizeIcon+Be.controlPaddingHorizontal},[`${_e}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:ht,marginTop:Ue,marginBottom:Ue,lineHeight:`${ht-Be.lineWidth*2}px`,background:Be.multipleItemBg,border:`${Be.lineWidth}px ${Be.lineType} ${Be.multipleItemBorderColor}`,borderRadius:Be.borderRadiusSM,cursor:"default",transition:`font-size ${Be.motionDurationSlow}, line-height ${Be.motionDurationSlow}, height ${Be.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Ue*2,paddingInlineStart:Be.paddingXS,paddingInlineEnd:Be.paddingXS/2,[`${_e}-disabled&`]:{color:Be.multipleItemColorDisabled,borderColor:Be.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Be.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,le.Ro)()),{display:"inline-flex",alignItems:"center",color:Be.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Je}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Be.colorIconHover}})},[`${Xe}-item + ${Xe}-item`]:{[`${_e}-selection-search`]:{marginInlineStart:0}},[`${_e}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Be.inputPaddingHorizontalBase-Ze,"\n &-input,\n &-mirror\n ":{height:ht,fontFamily:Be.fontFamily,lineHeight:`${ht}px`,transition:`all ${Be.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${_e}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Be.inputPaddingHorizontalBase,insetInlineEnd:Be.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Be.motionDurationSlow}`}}}}var Oe=Be=>{const{componentCls:je}=Be,_e=(0,He.TS)(Be,{controlHeight:Be.controlHeightSM,multipleSelectItemHeight:Be.controlHeightXS,borderRadius:Be.borderRadiusSM,borderRadiusSM:Be.borderRadiusXS}),Je=(0,He.TS)(Be,{fontSize:Be.fontSizeLG,controlHeight:Be.controlHeightLG,multipleSelectItemHeight:Be.multipleItemHeightLG,borderRadius:Be.borderRadiusLG,borderRadiusSM:Be.borderRadius}),[,Xe]=bt(Be);return[at(Be),at(_e,"sm"),{[`${je}-multiple${je}-sm`]:{[`${je}-selection-placeholder`]:{insetInline:Be.controlPaddingHorizontalSM-Be.lineWidth},[`${je}-selection-search`]:{marginInlineStart:Xe}}},at(Je,"lg")]};function te(Be,je){const{componentCls:_e,inputPaddingHorizontalBase:Je,borderRadius:Xe}=Be,ht=Be.controlHeight-Be.lineWidth*2,Ze=Math.ceil(Be.fontSize*1.25),Mt=je?`${_e}-${je}`:"";return{[`${_e}-single${Mt}`]:{fontSize:Be.fontSize,[`${_e}-selector`]:Object.assign(Object.assign({},(0,le.Wf)(Be)),{display:"flex",borderRadius:Xe,[`${_e}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Je,insetInlineEnd:Je,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${_e}-selection-item,
|
|
|
${_e}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${ht}px`,transition:`all ${Be.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${ht}px`}},[`${_e}-selection-item`]:{position:"relative",userSelect:"none"},[`${_e}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${_e}-selection-item:after`,`${_e}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${_e}-show-arrow ${_e}-selection-item,
|
|
|
&${_e}-show-arrow ${_e}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Ze},[`&${_e}-open ${_e}-selection-item`]:{color:Be.colorTextPlaceholder},[`&:not(${_e}-customize-input)`]:{[`${_e}-selector`]:{width:"100%",height:Be.controlHeight,padding:`0 ${Je}px`,[`${_e}-selection-search-input`]:{height:ht},"&:after":{lineHeight:`${ht}px`}}},[`&${_e}-customize-input`]:{[`${_e}-selector`]:{"&:after":{display:"none"},[`${_e}-selection-search`]:{position:"static",width:"100%"},[`${_e}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Je}px`,"&:after":{display:"none"}}}}}}}function ee(Be){const{componentCls:je}=Be,_e=Be.controlPaddingHorizontalSM-Be.lineWidth;return[te(Be),te((0,He.TS)(Be,{controlHeight:Be.controlHeightSM,borderRadius:Be.borderRadiusSM}),"sm"),{[`${je}-single${je}-sm`]:{[`&:not(${je}-customize-input)`]:{[`${je}-selection-search`]:{insetInlineStart:_e,insetInlineEnd:_e},[`${je}-selector`]:{padding:`0 ${_e}px`},[`&${je}-show-arrow ${je}-selection-search`]:{insetInlineEnd:_e+Be.fontSize*1.5},[`
|
|
|
&${je}-show-arrow ${je}-selection-item,
|
|
|
&${je}-show-arrow ${je}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:Be.fontSize*1.5}}}},te((0,He.TS)(Be,{controlHeight:Be.singleItemHeightLG,fontSize:Be.fontSizeLG,borderRadius:Be.borderRadiusLG}),"lg")]}const de=Be=>{const{componentCls:je,selectorBg:_e}=Be;return{position:"relative",backgroundColor:_e,border:`${Be.lineWidth}px ${Be.lineType} ${Be.colorBorder}`,transition:`all ${Be.motionDurationMid} ${Be.motionEaseInOut}`,input:{cursor:"pointer"},[`${je}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${je}-disabled&`]:{color:Be.colorTextDisabled,background:Be.colorBgContainerDisabled,cursor:"not-allowed",[`${je}-multiple&`]:{background:Be.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Be,je){let _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Je,borderHoverColor:Xe,outlineColor:ht,antCls:Ze}=je,Mt=_e?{[`${Je}-selector`]:{borderColor:Xe}}:{};return{[Be]:{[`&:not(${Je}-disabled):not(${Je}-customize-input):not(${Ze}-pagination-size-changer)`]:Object.assign(Object.assign({},Mt),{[`${Je}-focused& ${Je}-selector`]:{borderColor:Xe,boxShadow:`0 0 0 ${je.controlOutlineWidth}px ${ht}`,outline:0},[`&:hover ${Je}-selector`]:{borderColor:Xe}})}}},he=Be=>{const{componentCls:je}=Be;return{[`${je}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},ve=Be=>{const{componentCls:je,inputPaddingHorizontalBase:_e,iconCls:Je}=Be;return{[je]:Object.assign(Object.assign({},(0,le.Wf)(Be)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${je}-customize-input) ${je}-selector`]:Object.assign(Object.assign({},de(Be)),he(Be)),[`${je}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},le.vS),[`${je}-selection-placeholder`]:Object.assign(Object.assign({},le.vS),{flex:1,color:Be.colorTextPlaceholder,pointerEvents:"none"}),[`${je}-arrow`]:Object.assign(Object.assign({},(0,le.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:_e,height:Be.fontSizeIcon,marginTop:-Be.fontSizeIcon/2,color:Be.colorTextQuaternary,fontSize:Be.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Je]:{verticalAlign:"top",transition:`transform ${Be.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${je}-suffix)`]:{pointerEvents:"auto"}},[`${je}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${je}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:_e,zIndex:1,display:"inline-block",width:Be.fontSizeIcon,height:Be.fontSizeIcon,marginTop:-Be.fontSizeIcon/2,color:Be.colorTextQuaternary,fontSize:Be.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Be.clearBg,cursor:"pointer",opacity:0,transition:`color ${Be.motionDurationMid} ease, opacity ${Be.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Be.colorTextTertiary}},"&:hover":{[`${je}-clear`]:{opacity:1}}}),[`${je}-has-feedback`]:{[`${je}-clear`]:{insetInlineEnd:_e+Be.fontSize+Be.paddingXS}}}},Ee=Be=>{const{componentCls:je}=Be;return[{[je]:{[`&-borderless ${je}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${je}-in-form-item`]:{width:"100%"}}},ve(Be),ee(Be),Oe(Be),xt(Be),{[`${je}-rtl`]:{direction:"rtl"}},se(je,(0,He.TS)(Be,{borderHoverColor:Be.colorPrimaryHover,outlineColor:Be.controlOutline})),se(`${je}-status-error`,(0,He.TS)(Be,{borderHoverColor:Be.colorErrorHover,outlineColor:Be.colorErrorOutline}),!0),se(`${je}-status-warning`,(0,He.TS)(Be,{borderHoverColor:Be.colorWarningHover,outlineColor:Be.colorWarningOutline}),!0),(0,Te.c)(Be,{borderElCls:`${je}-selector`,focusElCls:`${je}-focused`})]};var Me=(0,lt.Z)("Select",(Be,je)=>{let{rootPrefixCls:_e}=je;const Je=(0,He.TS)(Be,{rootPrefixCls:_e,inputPaddingHorizontalBase:Be.paddingSM-1,multipleSelectItemHeight:Be.multipleItemHeight});return[Ee(Je)]},Be=>{const{fontSize:je,lineHeight:_e,controlHeight:Je,controlPaddingHorizontal:Xe,zIndexPopupBase:ht,colorText:Ze,fontWeightStrong:Mt,controlItemBgActive:ot,controlItemBgHover:Ot,colorBgContainer:Pt,colorFillSecondary:Dt,controlHeightLG:Wt,controlHeightSM:Lt,colorBgContainerDisabled:qe,colorTextDisabled:Ke}=Be;return{zIndexPopup:ht+50,optionSelectedColor:Ze,optionSelectedFontWeight:Mt,optionSelectedBg:ot,optionActiveBg:Ot,optionPadding:`${(Je-je*_e)/2}px ${Xe}px`,optionFontSize:je,optionLineHeight:_e,optionHeight:Je,selectorBg:Pt,clearBg:Pt,singleItemHeightLG:Wt,multipleItemBg:Dt,multipleItemBorderColor:"transparent",multipleItemHeight:Lt,multipleItemHeightLG:Je,multipleSelectorBgDisabled:qe,multipleItemColorDisabled:Ke,multipleItemBorderColorDisabled:"transparent"}})},58582:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Te}});const le=He=>{const We={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:He==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},We),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},We),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},We),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},We),{points:["br","tr"],offset:[0,-4]})}};function Te(He,lt){return He||le(lt)}},84443:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return le}});function le(Te,He){return He!==void 0?He:Te!==null}},66339:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});var le=me(40001),Te=me(19248),He=me(99267),lt=me(84105),We=me(58617),Ve=me(47472),Le=me(59301);function Ct(xt){let{suffixIcon:Ue,clearIcon:bt,menuItemSelectedIcon:at,removeIcon:mt,loading:Oe,multiple:te,hasFeedback:ee,prefixCls:de,showSuffixIcon:se,feedbackIcon:he,showArrow:ve,componentName:Ee}=xt;const Me=bt!=null?bt:Le.createElement(Te.Z,null),Be=Xe=>Ue===null&&!ee&&!ve?null:Le.createElement(Le.Fragment,null,se!==!1&&Xe,ee&&he);let je=null;if(Ue!==void 0)je=Be(Ue);else if(Oe)je=Be(Le.createElement(We.Z,{spin:!0}));else{const Xe=`${de}-suffix`;je=ht=>{let{open:Ze,showSearch:Mt}=ht;return Be(Ze&&Mt?Le.createElement(Ve.Z,{className:Xe}):Le.createElement(lt.Z,{className:Xe}))}}let _e=null;at!==void 0?_e=at:te?_e=Le.createElement(le.Z,null):_e=null;let Je=null;return mt!==void 0?Je=mt:Je=Le.createElement(He.Z,null),{clearIcon:Me,suffixIcon:je,itemIcon:_e,removeIcon:Je}}},61621:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ae}});var le=me(92310),Te=me.n(le),He=me(59301),lt=me(36355),We=me(2738),Le=Ne=>{const{prefixCls:xe,className:ut,style:Bt,size:Qe,shape:it}=Ne,Ft=Te()({[`${xe}-lg`]:Qe==="large",[`${xe}-sm`]:Qe==="small"}),Nt=Te()({[`${xe}-circle`]:it==="circle",[`${xe}-square`]:it==="square",[`${xe}-round`]:it==="round"}),dt=He.useMemo(()=>typeof Qe=="number"?{width:Qe,height:Qe,lineHeight:`${Qe}px`}:{},[Qe]);return He.createElement("span",{className:Te()(xe,Ft,Nt,ut),style:Object.assign(Object.assign({},dt),Bt)})},Ct=me(93083),xt=me(83116),Ue=me(37613);const bt=new Ct.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),at=Ne=>({height:Ne,lineHeight:`${Ne}px`}),mt=Ne=>Object.assign({width:Ne},at(Ne)),Oe=Ne=>({background:Ne.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:bt,animationDuration:Ne.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),te=Ne=>Object.assign({width:Ne*5,minWidth:Ne*5},at(Ne)),ee=Ne=>{const{skeletonAvatarCls:xe,gradientFromColor:ut,controlHeight:Bt,controlHeightLG:Qe,controlHeightSM:it}=Ne;return{[`${xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:ut},mt(Bt)),[`${xe}${xe}-circle`]:{borderRadius:"50%"},[`${xe}${xe}-lg`]:Object.assign({},mt(Qe)),[`${xe}${xe}-sm`]:Object.assign({},mt(it))}},de=Ne=>{const{controlHeight:xe,borderRadiusSM:ut,skeletonInputCls:Bt,controlHeightLG:Qe,controlHeightSM:it,gradientFromColor:Ft}=Ne;return{[`${Bt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ft,borderRadius:ut},te(xe)),[`${Bt}-lg`]:Object.assign({},te(Qe)),[`${Bt}-sm`]:Object.assign({},te(it))}},se=Ne=>Object.assign({width:Ne},at(Ne)),he=Ne=>{const{skeletonImageCls:xe,imageSizeBase:ut,gradientFromColor:Bt,borderRadiusSM:Qe}=Ne;return{[`${xe}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Bt,borderRadius:Qe},se(ut*2)),{[`${xe}-path`]:{fill:"#bfbfbf"},[`${xe}-svg`]:Object.assign(Object.assign({},se(ut)),{maxWidth:ut*4,maxHeight:ut*4}),[`${xe}-svg${xe}-svg-circle`]:{borderRadius:"50%"}}),[`${xe}${xe}-circle`]:{borderRadius:"50%"}}},ve=(Ne,xe,ut)=>{const{skeletonButtonCls:Bt}=Ne;return{[`${ut}${Bt}-circle`]:{width:xe,minWidth:xe,borderRadius:"50%"},[`${ut}${Bt}-round`]:{borderRadius:xe}}},Ee=Ne=>Object.assign({width:Ne*2,minWidth:Ne*2},at(Ne)),Me=Ne=>{const{borderRadiusSM:xe,skeletonButtonCls:ut,controlHeight:Bt,controlHeightLG:Qe,controlHeightSM:it,gradientFromColor:Ft}=Ne;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${ut}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ft,borderRadius:xe,width:Bt*2,minWidth:Bt*2},Ee(Bt))},ve(Ne,Bt,ut)),{[`${ut}-lg`]:Object.assign({},Ee(Qe))}),ve(Ne,Qe,`${ut}-lg`)),{[`${ut}-sm`]:Object.assign({},Ee(it))}),ve(Ne,it,`${ut}-sm`))},Be=Ne=>{const{componentCls:xe,skeletonAvatarCls:ut,skeletonTitleCls:Bt,skeletonParagraphCls:Qe,skeletonButtonCls:it,skeletonInputCls:Ft,skeletonImageCls:Nt,controlHeight:dt,controlHeightLG:Kt,controlHeightSM:wn,gradientFromColor:sn,padding:qt,marginSM:Rn,borderRadius:Vn,titleHeight:hn,blockRadius:Yn,paragraphLiHeight:mi,controlHeightXS:jn,paragraphMarginTop:An}=Ne;return{[`${xe}`]:{display:"table",width:"100%",[`${xe}-header`]:{display:"table-cell",paddingInlineEnd:qt,verticalAlign:"top",[`${ut}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:sn},mt(dt)),[`${ut}-circle`]:{borderRadius:"50%"},[`${ut}-lg`]:Object.assign({},mt(Kt)),[`${ut}-sm`]:Object.assign({},mt(wn))},[`${xe}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Bt}`]:{width:"100%",height:hn,background:sn,borderRadius:Yn,[`+ ${Qe}`]:{marginBlockStart:wn}},[`${Qe}`]:{padding:0,"> li":{width:"100%",height:mi,listStyle:"none",background:sn,borderRadius:Yn,"+ li":{marginBlockStart:jn}}},[`${Qe}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${xe}-content`]:{[`${Bt}, ${Qe} > li`]:{borderRadius:Vn}}},[`${xe}-with-avatar ${xe}-content`]:{[`${Bt}`]:{marginBlockStart:Rn,[`+ ${Qe}`]:{marginBlockStart:An}}},[`${xe}${xe}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Me(Ne)),ee(Ne)),de(Ne)),he(Ne)),[`${xe}${xe}-block`]:{width:"100%",[`${it}`]:{width:"100%"},[`${Ft}`]:{width:"100%"}},[`${xe}${xe}-active`]:{[`
|
|
|
${Bt},
|
|
|
${Qe} > li,
|
|
|
${ut},
|
|
|
${it},
|
|
|
${Ft},
|
|
|
${Nt}
|
|
|
`]:Object.assign({},Oe(Ne))}}};var je=(0,xt.Z)("Skeleton",Ne=>{const{componentCls:xe}=Ne,ut=(0,Ue.TS)(Ne,{skeletonAvatarCls:`${xe}-avatar`,skeletonTitleCls:`${xe}-title`,skeletonParagraphCls:`${xe}-paragraph`,skeletonButtonCls:`${xe}-button`,skeletonInputCls:`${xe}-input`,skeletonImageCls:`${xe}-image`,imageSizeBase:Ne.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Ne.gradientFromColor} 25%, ${Ne.gradientToColor} 37%, ${Ne.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Be(ut)]},Ne=>{const{colorFillContent:xe,colorFill:ut}=Ne,Bt=xe,Qe=ut;return{color:Bt,colorGradientEnd:Qe,gradientFromColor:Bt,gradientToColor:Qe,titleHeight:Ne.controlHeight/2,blockRadius:Ne.borderRadiusSM,paragraphMarginTop:Ne.marginLG+Ne.marginXXS,paragraphLiHeight:Ne.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Je=Ne=>{const{prefixCls:xe,className:ut,rootClassName:Bt,active:Qe,shape:it="circle",size:Ft="default"}=Ne,{getPrefixCls:Nt}=He.useContext(lt.E_),dt=Nt("skeleton",xe),[Kt,wn]=je(dt),sn=(0,We.Z)(Ne,["prefixCls","className"]),qt=Te()(dt,`${dt}-element`,{[`${dt}-active`]:Qe},ut,Bt,wn);return Kt(He.createElement("div",{className:qt},He.createElement(Le,Object.assign({prefixCls:`${dt}-avatar`,shape:it,size:Ft},sn))))},ht=Ne=>{const{prefixCls:xe,className:ut,rootClassName:Bt,active:Qe,block:it=!1,size:Ft="default"}=Ne,{getPrefixCls:Nt}=He.useContext(lt.E_),dt=Nt("skeleton",xe),[Kt,wn]=je(dt),sn=(0,We.Z)(Ne,["prefixCls"]),qt=Te()(dt,`${dt}-element`,{[`${dt}-active`]:Qe,[`${dt}-block`]:it},ut,Bt,wn);return Kt(He.createElement("div",{className:qt},He.createElement(Le,Object.assign({prefixCls:`${dt}-button`,size:Ft},sn))))};const Ze="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var ot=Ne=>{const{prefixCls:xe,className:ut,rootClassName:Bt,style:Qe,active:it}=Ne,{getPrefixCls:Ft}=He.useContext(lt.E_),Nt=Ft("skeleton",xe),[dt,Kt]=je(Nt),wn=Te()(Nt,`${Nt}-element`,{[`${Nt}-active`]:it},ut,Bt,Kt);return dt(He.createElement("div",{className:wn},He.createElement("div",{className:Te()(`${Nt}-image`,ut),style:Qe},He.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Nt}-image-svg`},He.createElement("path",{d:Ze,className:`${Nt}-image-path`})))))},Pt=Ne=>{const{prefixCls:xe,className:ut,rootClassName:Bt,active:Qe,block:it,size:Ft="default"}=Ne,{getPrefixCls:Nt}=He.useContext(lt.E_),dt=Nt("skeleton",xe),[Kt,wn]=je(dt),sn=(0,We.Z)(Ne,["prefixCls"]),qt=Te()(dt,`${dt}-element`,{[`${dt}-active`]:Qe,[`${dt}-block`]:it},ut,Bt,wn);return Kt(He.createElement("div",{className:qt},He.createElement(Le,Object.assign({prefixCls:`${dt}-input`,size:Ft},sn))))},Dt=me(92413),Wt={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"},Lt=Wt,qe=me(7657),Ke=function(xe,ut){return He.createElement(qe.Z,(0,Dt.Z)({},xe,{ref:ut,icon:Lt}))},Rt=He.forwardRef(Ke),Sn=Rt,_t=Ne=>{const{prefixCls:xe,className:ut,rootClassName:Bt,style:Qe,active:it,children:Ft}=Ne,{getPrefixCls:Nt}=He.useContext(lt.E_),dt=Nt("skeleton",xe),[Kt,wn]=je(dt),sn=Te()(dt,`${dt}-element`,{[`${dt}-active`]:it},wn,ut,Bt),qt=Ft!=null?Ft:He.createElement(Sn,null);return Kt(He.createElement("div",{className:sn},He.createElement("div",{className:Te()(`${dt}-image`,ut),style:Qe},qt)))},rn=me(26407),Wn=Ne=>{const xe=Nt=>{const{width:dt,rows:Kt=2}=Ne;if(Array.isArray(dt))return dt[Nt];if(Kt-1===Nt)return dt},{prefixCls:ut,className:Bt,style:Qe,rows:it}=Ne,Ft=(0,rn.Z)(Array(it)).map((Nt,dt)=>He.createElement("li",{key:dt,style:{width:xe(dt)}}));return He.createElement("ul",{className:Te()(ut,Bt),style:Qe},Ft)},_n=Ne=>{let{prefixCls:xe,className:ut,width:Bt,style:Qe}=Ne;return He.createElement("h3",{className:Te()(xe,ut),style:Object.assign({width:Bt},Qe)})};function St(Ne){return Ne&&typeof Ne=="object"?Ne:{}}function Zn(Ne,xe){return Ne&&!xe?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function li(Ne,xe){return!Ne&&xe?{width:"38%"}:Ne&&xe?{width:"50%"}:{}}function Ge(Ne,xe){const ut={};return(!Ne||!xe)&&(ut.width="61%"),!Ne&&xe?ut.rows=3:ut.rows=2,ut}const be=Ne=>{const{prefixCls:xe,loading:ut,className:Bt,rootClassName:Qe,style:it,children:Ft,avatar:Nt=!1,title:dt=!0,paragraph:Kt=!0,active:wn,round:sn}=Ne,{getPrefixCls:qt,direction:Rn,skeleton:Vn}=He.useContext(lt.E_),hn=qt("skeleton",xe),[Yn,mi]=je(hn);if(ut||!("loading"in Ne)){const jn=!!Nt,An=!!dt,wi=!!Kt;let ji;if(jn){const Mr=Object.assign(Object.assign({prefixCls:`${hn}-avatar`},Zn(An,wi)),St(Nt));ji=He.createElement("div",{className:`${hn}-header`},He.createElement(Le,Object.assign({},Mr)))}let Wi;if(An||wi){let Mr;if(An){const ui=Object.assign(Object.assign({prefixCls:`${hn}-title`},li(jn,wi)),St(dt));Mr=He.createElement(_n,Object.assign({},ui))}let pi;if(wi){const ui=Object.assign(Object.assign({prefixCls:`${hn}-paragraph`},Ge(jn,An)),St(Kt));pi=He.createElement(Wn,Object.assign({},ui))}Wi=He.createElement("div",{className:`${hn}-content`},Mr,pi)}const dr=Te()(hn,{[`${hn}-with-avatar`]:jn,[`${hn}-active`]:wn,[`${hn}-rtl`]:Rn==="rtl",[`${hn}-round`]:sn},Vn==null?void 0:Vn.className,Bt,Qe,mi);return Yn(He.createElement("div",{className:dr,style:Object.assign(Object.assign({},Vn==null?void 0:Vn.style),it)},ji,Wi))}return typeof Ft!="undefined"?Ft:null};be.Button=ht,be.Avatar=Je,be.Input=Pt,be.Image=ot,be.Node=_t;var Pe=be,Ae=Pe},81327:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return de}});var le=me(59301),Te=me(92310),He=me.n(Te),lt=me(11592),We=me(36355),Ve=me(33234);const Le=le.createContext({latestIndex:0}),Ct=Le.Provider;var Ue=se=>{let{className:he,index:ve,children:Ee,split:Me,style:Be}=se;const{latestIndex:je}=le.useContext(Le);return Ee==null?null:le.createElement(le.Fragment,null,le.createElement("div",{className:he,style:Be},Ee),ve<je&&Me&&le.createElement("span",{className:`${he}-split`},Me))},bt=me(2856);function at(se){return["small","middle","large"].includes(se)}function mt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Oe=function(se,he){var ve={};for(var Ee in se)Object.prototype.hasOwnProperty.call(se,Ee)&&he.indexOf(Ee)<0&&(ve[Ee]=se[Ee]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Me=0,Ee=Object.getOwnPropertySymbols(se);Me<Ee.length;Me++)he.indexOf(Ee[Me])<0&&Object.prototype.propertyIsEnumerable.call(se,Ee[Me])&&(ve[Ee[Me]]=se[Ee[Me]]);return ve};const ee=le.forwardRef((se,he)=>{var ve,Ee;const{getPrefixCls:Me,space:Be,direction:je}=le.useContext(We.E_),{size:_e=(Be==null?void 0:Be.size)||"small",align:Je,className:Xe,rootClassName:ht,children:Ze,direction:Mt="horizontal",prefixCls:ot,split:Ot,style:Pt,wrap:Dt=!1,classNames:Wt,styles:Lt}=se,qe=Oe(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ke,Rt]=Array.isArray(_e)?_e:[_e,_e],Sn=at(Rt),Pn=at(Ke),_t=mt(Rt),rn=mt(Ke),ln=(0,lt.Z)(Ze,{keepEmpty:!0}),Wn=Je===void 0&&Mt==="horizontal"?"center":Je,un=Me("space",ot),[_n,St]=(0,bt.Z)(un),Zn=He()(un,Be==null?void 0:Be.className,St,`${un}-${Mt}`,{[`${un}-rtl`]:je==="rtl",[`${un}-align-${Wn}`]:Wn,[`${un}-gap-row-${Rt}`]:Sn,[`${un}-gap-col-${Ke}`]:Pn},Xe,ht),li=He()(`${un}-item`,(ve=Wt==null?void 0:Wt.item)!==null&&ve!==void 0?ve:(Ee=Be==null?void 0:Be.classNames)===null||Ee===void 0?void 0:Ee.item);let Ge=0;const be=ln.map((Ne,xe)=>{var ut,Bt;Ne!=null&&(Ge=xe);const Qe=Ne&&Ne.key||`${li}-${xe}`;return le.createElement(Ue,{className:li,key:Qe,index:xe,split:Ot,style:(ut=Lt==null?void 0:Lt.item)!==null&&ut!==void 0?ut:(Bt=Be==null?void 0:Be.styles)===null||Bt===void 0?void 0:Bt.item},Ne)}),Pe=le.useMemo(()=>({latestIndex:Ge}),[Ge]);if(ln.length===0)return null;const Ae={};return Dt&&(Ae.flexWrap="wrap"),!Pn&&rn&&(Ae.columnGap=Ke),!Sn&&_t&&(Ae.rowGap=Rt),_n(le.createElement("div",Object.assign({ref:he,className:Zn,style:Object.assign(Object.assign(Object.assign({},Ae),Be==null?void 0:Be.style),Pt)},qe),le.createElement(Ct,{value:Pe},be)))});ee.Compact=Ve.ZP;var de=ee},31797:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return je}});var le=me(59301),Te=me(56762),He=me(92343),lt=me(92310),We=me.n(lt),Ve=me(36355),Le=me(61621),xt=_e=>{const{value:Je,formatter:Xe,precision:ht,decimalSeparator:Ze,groupSeparator:Mt="",prefixCls:ot}=_e;let Ot;if(typeof Xe=="function")Ot=Xe(Je);else{const Pt=String(Je),Dt=Pt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Dt||Pt==="-")Ot=Pt;else{const Wt=Dt[1];let Lt=Dt[2]||"0",qe=Dt[4]||"";Lt=Lt.replace(/\B(?=(\d{3})+(?!\d))/g,Mt),typeof ht=="number"&&(qe=qe.padEnd(ht,"0").slice(0,ht>0?ht:0)),qe&&(qe=`${Ze}${qe}`),Ot=[le.createElement("span",{key:"int",className:`${ot}-content-value-int`},Wt,Lt),qe&&le.createElement("span",{key:"decimal",className:`${ot}-content-value-decimal`},qe)]}}return le.createElement("span",{className:`${ot}-content-value`},Ot)},Ue=me(17313),bt=me(83116),at=me(37613);const mt=_e=>{const{componentCls:Je,marginXXS:Xe,padding:ht,colorTextDescription:Ze,titleFontSize:Mt,colorTextHeading:ot,contentFontSize:Ot,fontFamily:Pt}=_e;return{[`${Je}`]:Object.assign(Object.assign({},(0,Ue.Wf)(_e)),{[`${Je}-title`]:{marginBottom:Xe,color:Ze,fontSize:Mt},[`${Je}-skeleton`]:{paddingTop:ht},[`${Je}-content`]:{color:ot,fontSize:Ot,fontFamily:Pt,[`${Je}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Je}-content-prefix, ${Je}-content-suffix`]:{display:"inline-block"},[`${Je}-content-prefix`]:{marginInlineEnd:Xe},[`${Je}-content-suffix`]:{marginInlineStart:Xe}}})}};var Oe=(0,bt.Z)("Statistic",_e=>{const Je=(0,at.TS)(_e,{});return[mt(Je)]},_e=>{const{fontSizeHeading3:Je,fontSize:Xe}=_e;return{titleFontSize:Xe,contentFontSize:Je}}),ee=_e=>{const{prefixCls:Je,className:Xe,rootClassName:ht,style:Ze,valueStyle:Mt,value:ot=0,title:Ot,valueRender:Pt,prefix:Dt,suffix:Wt,loading:Lt=!1,onMouseEnter:qe,onMouseLeave:Ke,decimalSeparator:Rt=".",groupSeparator:Sn=","}=_e,{getPrefixCls:Pn,direction:_t,statistic:rn}=le.useContext(Ve.E_),ln=Pn("statistic",Je),[Wn,un]=Oe(ln),_n=le.createElement(xt,Object.assign({decimalSeparator:Rt,groupSeparator:Sn,prefixCls:ln},_e,{value:ot})),St=We()(ln,{[`${ln}-rtl`]:_t==="rtl"},rn==null?void 0:rn.className,Xe,ht,un);return Wn(le.createElement("div",{className:St,style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Ze),onMouseEnter:qe,onMouseLeave:Ke},Ot&&le.createElement("div",{className:`${ln}-title`},Ot),le.createElement(Le.Z,{paragraph:!1,loading:Lt,className:`${ln}-skeleton`},le.createElement("div",{style:Mt,className:`${ln}-content`},Dt&&le.createElement("span",{className:`${ln}-content-prefix`},Dt),Pt?Pt(_n):_n,Wt&&le.createElement("span",{className:`${ln}-content-suffix`},Wt)))))};const de=[["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(_e,Je){let Xe=_e;const ht=/\[[^\]]*]/g,Ze=(Je.match(ht)||[]).map(Pt=>Pt.slice(1,-1)),Mt=Je.replace(ht,"[]"),ot=de.reduce((Pt,Dt)=>{let[Wt,Lt]=Dt;if(Pt.includes(Wt)){const qe=Math.floor(Xe/Lt);return Xe-=qe*Lt,Pt.replace(new RegExp(`${Wt}+`,"g"),Ke=>{const Rt=Ke.length;return qe.toString().padStart(Rt,"0")})}return Pt},Mt);let Ot=0;return ot.replace(ht,()=>{const Pt=Ze[Ot];return Ot+=1,Pt})}function he(_e,Je){const{format:Xe=""}=Je,ht=new Date(_e).getTime(),Ze=Date.now(),Mt=Math.max(ht-Ze,0);return se(Mt,Xe)}const ve=1e3/30;function Ee(_e){return new Date(_e).getTime()}const Me=_e=>{const{value:Je,format:Xe="HH:mm:ss",onChange:ht,onFinish:Ze}=_e,Mt=(0,Te.Z)(),ot=le.useRef(null),Ot=()=>{Ze==null||Ze(),ot.current&&(clearInterval(ot.current),ot.current=null)},Pt=()=>{const Lt=Ee(Je);Lt>=Date.now()&&(ot.current=setInterval(()=>{Mt(),ht==null||ht(Lt-Date.now()),Lt<Date.now()&&Ot()},ve))};le.useEffect(()=>(Pt(),()=>{ot.current&&(clearInterval(ot.current),ot.current=null)}),[Je]);const Dt=(Lt,qe)=>he(Lt,Object.assign(Object.assign({},qe),{format:Xe})),Wt=Lt=>(0,He.Tm)(Lt,{title:void 0});return le.createElement(ee,Object.assign({},_e,{valueRender:Wt,formatter:Dt}))};var Be=le.memo(Me);ee.Countdown=Be;var je=ee},15969:function(Tn,xn,me){"use strict";me.d(xn,{N:function(){return le}});const le=Te=>({color:Te.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${Te.motionDurationSlow}`,"&:focus, &:hover":{color:Te.colorLinkHover},"&:active":{color:Te.colorLinkActive}})},78673:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Mt}});var le=me(58617),Te=me(92310),He=me.n(Te),lt=me(92413),We=me(400),Ve=me(33606),Le=me(37061),Ct=me(59301),xt=me(18929),Ue=me(10228),bt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],at=Ct.forwardRef(function(ot,Ot){var Pt,Dt=ot.prefixCls,Wt=Dt===void 0?"rc-switch":Dt,Lt=ot.className,qe=ot.checked,Ke=ot.defaultChecked,Rt=ot.disabled,Sn=ot.loadingIcon,Pn=ot.checkedChildren,_t=ot.unCheckedChildren,rn=ot.onClick,ln=ot.onChange,Wn=ot.onKeyDown,un=(0,Le.Z)(ot,bt),_n=(0,xt.Z)(!1,{value:qe,defaultValue:Ke}),St=(0,Ve.Z)(_n,2),Zn=St[0],li=St[1];function Ge(Ne,xe){var ut=Zn;return Rt||(ut=Ne,li(ut),ln==null||ln(ut,xe)),ut}function be(Ne){Ne.which===Ue.Z.LEFT?Ge(!1,Ne):Ne.which===Ue.Z.RIGHT&&Ge(!0,Ne),Wn==null||Wn(Ne)}function Pe(Ne){var xe=Ge(!Zn,Ne);rn==null||rn(xe,Ne)}var Ae=He()(Wt,Lt,(Pt={},(0,We.Z)(Pt,"".concat(Wt,"-checked"),Zn),(0,We.Z)(Pt,"".concat(Wt,"-disabled"),Rt),Pt));return Ct.createElement("button",(0,lt.Z)({},un,{type:"button",role:"switch","aria-checked":Zn,disabled:Rt,className:Ae,ref:Ot,onKeyDown:be,onClick:Pe}),Sn,Ct.createElement("span",{className:"".concat(Wt,"-inner")},Ct.createElement("span",{className:"".concat(Wt,"-inner-checked")},Pn),Ct.createElement("span",{className:"".concat(Wt,"-inner-unchecked")},_t)))});at.displayName="Switch";var mt=at,Oe=me(14088),te=me(36355),ee=me(1684),de=me(19716),se=me(64993),he=me(17313),ve=me(83116),Ee=me(37613);const Me=ot=>{const{componentCls:Ot,trackHeightSM:Pt,trackPadding:Dt,trackMinWidthSM:Wt,innerMinMarginSM:Lt,innerMaxMarginSM:qe,handleSizeSM:Ke}=ot,Rt=`${Ot}-inner`;return{[Ot]:{[`&${Ot}-small`]:{minWidth:Wt,height:Pt,lineHeight:`${Pt}px`,[`${Ot}-inner`]:{paddingInlineStart:qe,paddingInlineEnd:Lt,[`${Rt}-checked`]:{marginInlineStart:`calc(-100% + ${Ke+Dt*2}px - ${qe*2}px)`,marginInlineEnd:`calc(100% - ${Ke+Dt*2}px + ${qe*2}px)`},[`${Rt}-unchecked`]:{marginTop:-Pt,marginInlineStart:0,marginInlineEnd:0}},[`${Ot}-handle`]:{width:Ke,height:Ke},[`${Ot}-loading-icon`]:{top:(Ke-ot.switchLoadingIconSize)/2,fontSize:ot.switchLoadingIconSize},[`&${Ot}-checked`]:{[`${Ot}-inner`]:{paddingInlineStart:Lt,paddingInlineEnd:qe,[`${Rt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Rt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ke+Dt*2}px + ${qe*2}px)`,marginInlineEnd:`calc(-100% + ${Ke+Dt*2}px - ${qe*2}px)`}},[`${Ot}-handle`]:{insetInlineStart:`calc(100% - ${Ke+Dt}px)`}},[`&:not(${Ot}-disabled):active`]:{[`&:not(${Ot}-checked) ${Rt}`]:{[`${Rt}-unchecked`]:{marginInlineStart:ot.marginXXS/2,marginInlineEnd:-ot.marginXXS/2}},[`&${Ot}-checked ${Rt}`]:{[`${Rt}-checked`]:{marginInlineStart:-ot.marginXXS/2,marginInlineEnd:ot.marginXXS/2}}}}}}},Be=ot=>{const{componentCls:Ot,handleSize:Pt}=ot;return{[Ot]:{[`${Ot}-loading-icon${ot.iconCls}`]:{position:"relative",top:(Pt-ot.fontSize)/2,color:ot.switchLoadingIconColor,verticalAlign:"top"},[`&${Ot}-checked ${Ot}-loading-icon`]:{color:ot.switchColor}}}},je=ot=>{const{componentCls:Ot,motion:Pt,trackPadding:Dt,handleBg:Wt,handleShadow:Lt,handleSize:qe}=ot,Ke=`${Ot}-handle`;return{[Ot]:{[Ke]:{position:"absolute",top:Dt,insetInlineStart:Dt,width:qe,height:qe,transition:`all ${ot.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Wt,borderRadius:qe/2,boxShadow:Lt,transition:`all ${ot.switchDuration} ease-in-out`,content:'""'}},[`&${Ot}-checked ${Ke}`]:{insetInlineStart:`calc(100% - ${qe+Dt}px)`},[`&:not(${Ot}-disabled):active`]:Pt?{[`${Ke}::before`]:{insetInlineEnd:ot.switchHandleActiveInset,insetInlineStart:0},[`&${Ot}-checked ${Ke}::before`]:{insetInlineEnd:0,insetInlineStart:ot.switchHandleActiveInset}}:{}}}},_e=ot=>{const{componentCls:Ot,trackHeight:Pt,trackPadding:Dt,innerMinMargin:Wt,innerMaxMargin:Lt,handleSize:qe}=ot,Ke=`${Ot}-inner`;return{[Ot]:{[Ke]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Lt,paddingInlineEnd:Wt,transition:`padding-inline-start ${ot.switchDuration} ease-in-out, padding-inline-end ${ot.switchDuration} ease-in-out`,[`${Ke}-checked, ${Ke}-unchecked`]:{display:"block",color:ot.colorTextLightSolid,fontSize:ot.fontSizeSM,transition:`margin-inline-start ${ot.switchDuration} ease-in-out, margin-inline-end ${ot.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ke}-checked`]:{marginInlineStart:`calc(-100% + ${qe+Dt*2}px - ${Lt*2}px)`,marginInlineEnd:`calc(100% - ${qe+Dt*2}px + ${Lt*2}px)`},[`${Ke}-unchecked`]:{marginTop:-Pt,marginInlineStart:0,marginInlineEnd:0}},[`&${Ot}-checked ${Ke}`]:{paddingInlineStart:Wt,paddingInlineEnd:Lt,[`${Ke}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ke}-unchecked`]:{marginInlineStart:`calc(100% - ${qe+Dt*2}px + ${Lt*2}px)`,marginInlineEnd:`calc(-100% + ${qe+Dt*2}px - ${Lt*2}px)`}},[`&:not(${Ot}-disabled):active`]:{[`&:not(${Ot}-checked) ${Ke}`]:{[`${Ke}-unchecked`]:{marginInlineStart:Dt*2,marginInlineEnd:-Dt*2}},[`&${Ot}-checked ${Ke}`]:{[`${Ke}-checked`]:{marginInlineStart:-Dt*2,marginInlineEnd:Dt*2}}}}}},Je=ot=>{const{componentCls:Ot,trackHeight:Pt,trackMinWidth:Dt}=ot;return{[Ot]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(ot)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Dt,height:Pt,lineHeight:`${Pt}px`,verticalAlign:"middle",background:ot.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${ot.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ot}-disabled)`]:{background:ot.colorTextTertiary}}),(0,he.Qy)(ot)),{[`&${Ot}-checked`]:{background:ot.switchColor,[`&:hover:not(${Ot}-disabled)`]:{background:ot.colorPrimaryHover}},[`&${Ot}-loading, &${Ot}-disabled`]:{cursor:"not-allowed",opacity:ot.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ot}-rtl`]:{direction:"rtl"}})}};var Xe=(0,ve.Z)("Switch",ot=>{const Ot=(0,Ee.TS)(ot,{switchDuration:ot.motionDurationMid,switchColor:ot.colorPrimary,switchDisabledOpacity:ot.opacityLoading,switchLoadingIconSize:ot.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${ot.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Je(Ot),_e(Ot),je(Ot),Be(Ot),Me(Ot)]},ot=>{const{fontSize:Ot,lineHeight:Pt,controlHeight:Dt,colorWhite:Wt}=ot,Lt=Ot*Pt,qe=Dt/2,Ke=2,Rt=Lt-Ke*2,Sn=qe-Ke*2;return{trackHeight:Lt,trackHeightSM:qe,trackMinWidth:Rt*2+Ke*4,trackMinWidthSM:Sn*2+Ke*2,trackPadding:Ke,handleBg:Wt,handleSize:Rt,handleSizeSM:Sn,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Rt/2,innerMaxMargin:Rt+Ke+Ke*2,innerMinMarginSM:Sn/2,innerMaxMarginSM:Sn+Ke+Ke*2}}),ht=function(ot,Ot){var Pt={};for(var Dt in ot)Object.prototype.hasOwnProperty.call(ot,Dt)&&Ot.indexOf(Dt)<0&&(Pt[Dt]=ot[Dt]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Dt=Object.getOwnPropertySymbols(ot);Wt<Dt.length;Wt++)Ot.indexOf(Dt[Wt])<0&&Object.prototype.propertyIsEnumerable.call(ot,Dt[Wt])&&(Pt[Dt[Wt]]=ot[Dt[Wt]]);return Pt};const Ze=Ct.forwardRef((ot,Ot)=>{const{prefixCls:Pt,size:Dt,disabled:Wt,loading:Lt,className:qe,rootClassName:Ke,style:Rt}=ot,Sn=ht(ot,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:Pn,direction:_t,switch:rn}=Ct.useContext(te.E_),ln=Ct.useContext(ee.Z),Wn=(Wt!=null?Wt:ln)||Lt,un=Pn("switch",Pt),_n=Ct.createElement("div",{className:`${un}-handle`},Lt&&Ct.createElement(le.Z,{className:`${un}-loading-icon`})),[St,Zn]=Xe(un),li=(0,de.Z)(Dt),Ge=He()(rn==null?void 0:rn.className,{[`${un}-small`]:li==="small",[`${un}-loading`]:Lt,[`${un}-rtl`]:_t==="rtl"},qe,Ke,Zn),be=Object.assign(Object.assign({},rn==null?void 0:rn.style),Rt);return St(Ct.createElement(Oe.Z,{component:"Switch"},Ct.createElement(mt,Object.assign({},Sn,{prefixCls:un,className:Ge,style:be,disabled:Wn,ref:Ot,loadingIcon:_n}))))});Ze.__ANT_SWITCH=!0;var Mt=Ze},1710:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return Xa}});var le={},Te="rc-table-internal-hook",He=me(33606),lt=me(6089),We=me(34280),Ve=me(13697),Le=me(59301),Ct=me(4676);function xt(rt){var et=Le.createContext(void 0),Yt=function(yn){var on=yn.value,Kn=yn.children,zn=Le.useRef(on);zn.current=on;var Xn=Le.useState(function(){return{getValue:function(){return zn.current},listeners:new Set}}),Pi=(0,He.Z)(Xn,1),Jn=Pi[0];return(0,We.Z)(function(){(0,Ct.unstable_batchedUpdates)(function(){Jn.listeners.forEach(function(yi){yi(on)})})},[on]),Le.createElement(et.Provider,{value:Jn},Kn)};return{Context:et,Provider:Yt,defaultValue:rt}}function Ue(rt,et){var Yt=(0,lt.Z)(typeof et=="function"?et:function(yi){if(et===void 0)return yi;if(!Array.isArray(et))return yi[et];var or={};return et.forEach(function(Vi){or[Vi]=yi[Vi]}),or}),Qt=Le.useContext(rt==null?void 0:rt.Context),yn=Qt||{},on=yn.listeners,Kn=yn.getValue,zn=Le.useRef();zn.current=Yt(Qt?Kn():rt==null?void 0:rt.defaultValue);var Xn=Le.useState({}),Pi=(0,He.Z)(Xn,2),Jn=Pi[1];return(0,We.Z)(function(){if(!Qt)return;function yi(or){var Vi=Yt(or);(0,Ve.Z)(zn.current,Vi,!0)||Jn({})}return on.add(yi),function(){on.delete(yi)}},[Qt]),zn.current}var bt=me(92413),at=me(8654);function mt(){var rt=Le.createContext(null);function et(){return Le.useContext(rt)}function Yt(yn,on){var Kn=(0,at.Yr)(yn),zn=function(Pi,Jn){var yi=Kn?{ref:Jn}:{},or=Le.useRef(0),Vi=Le.useRef(Pi),Ui=et();return Ui!==null?Le.createElement(yn,(0,bt.Z)({},Pi,yi)):((!on||on(Vi.current,Pi))&&(or.current+=1),Vi.current=Pi,Le.createElement(rt.Provider,{value:or.current},Le.createElement(yn,(0,bt.Z)({},Pi,yi))))};return Kn?Le.forwardRef(zn):zn}function Qt(yn,on){var Kn=(0,at.Yr)(yn),zn=function(Pi,Jn){var yi=Kn?{ref:Jn}:{};return et(),Le.createElement(yn,(0,bt.Z)({},Pi,yi))};return Kn?Le.memo(Le.forwardRef(zn),on):Le.memo(zn,on)}return{makeImmutable:Yt,responseImmutable:Qt,useImmutableMark:et}}var Oe=mt(),te=Oe.makeImmutable,ee=Oe.responseImmutable,de=Oe.useImmutableMark,se=mt(),he=se.makeImmutable,ve=se.responseImmutable,Ee=se.useImmutableMark,Me=xt(),Be=Me;function je(rt,et){var Yt=Le.useRef(0);Yt.current+=1;var Qt=Le.useRef(rt),yn=[];Object.keys(rt||{}).map(function(Kn){var zn;(rt==null?void 0:rt[Kn])!==((zn=Qt.current)===null||zn===void 0?void 0:zn[Kn])&&yn.push(Kn)}),Qt.current=rt;var on=Le.useRef([]);return yn.length&&(on.current=yn),Le.useDebugValue(Yt.current),Le.useDebugValue(on.current.join(", ")),et&&console.log("".concat(et,":"),Yt.current,on.current),Yt.current}var _e=null,Je=Le.memo(function(){var rt=je();return Le.createElement("h1",null,"Render Times: ",rt)});Je.displayName="RenderBlock";var Xe=me(39559),ht=me(33708),Ze=me(400),Mt=me(92310),ot=me.n(Mt),Ot=me(80547),Pt=me(97938),Dt=me(48736),Wt=Le.createContext({renderWithProps:!1}),Lt=Wt,qe="RC_TABLE_KEY";function Ke(rt){return rt==null?[]:Array.isArray(rt)?rt:[rt]}function Rt(rt){var et=[],Yt={};return rt.forEach(function(Qt){for(var yn=Qt||{},on=yn.key,Kn=yn.dataIndex,zn=on||Ke(Kn).join("-")||qe;Yt[zn];)zn="".concat(zn,"_next");Yt[zn]=!0,et.push(zn)}),et}function Sn(rt){return rt!=null}function Pn(rt){return rt&&(0,Xe.Z)(rt)==="object"&&!Array.isArray(rt)&&!Le.isValidElement(rt)}function _t(rt,et,Yt,Qt,yn,on){var Kn=Le.useContext(Lt),zn=Ee(),Xn=(0,Ot.Z)(function(){if(Sn(Qt))return[Qt];var Pi=et==null||et===""?[]:Array.isArray(et)?et:[et],Jn=(0,Pt.Z)(rt,Pi),yi=Jn,or=void 0;if(yn){var Vi=yn(Jn,rt,Yt);Pn(Vi)?(yi=Vi.children,or=Vi.props,Kn.renderWithProps=!0):yi=Vi}return[yi,or]},[zn,rt,Qt,et,yn,Yt],function(Pi,Jn){if(on){var yi=(0,He.Z)(Pi,2),or=yi[1],Vi=(0,He.Z)(Jn,2),Ui=Vi[1];return on(Ui,or)}return Kn.renderWithProps?!0:!(0,Ve.Z)(Pi,Jn,!0)});return Xn}function rn(rt,et,Yt,Qt){var yn=rt+et-1;return rt<=Qt&&yn>=Yt}function ln(rt,et){return Ue(Be,function(Yt){var Qt=rn(rt,et||1,Yt.hoverStartRow,Yt.hoverEndRow);return[Qt,Yt.onHover]})}var Wn=function(et){var Yt=et.ellipsis,Qt=et.rowType,yn=et.children,on,Kn=Yt===!0?{showTitle:!0}:Yt;return Kn&&(Kn.showTitle||Qt==="header")&&(typeof yn=="string"||typeof yn=="number"?on=yn.toString():Le.isValidElement(yn)&&typeof yn.props.children=="string"&&(on=yn.props.children)),on};function un(rt){var et,Yt,Qt,yn,on,Kn,zn,Xn,Pi=rt.component,Jn=rt.children,yi=rt.ellipsis,or=rt.scope,Vi=rt.prefixCls,Ui=rt.className,Jr=rt.align,rr=rt.record,_r=rt.render,zr=rt.dataIndex,mo=rt.renderIndex,Xo=rt.shouldCellUpdate,sa=rt.index,ro=rt.rowType,$o=rt.colSpan,ka=rt.rowSpan,uo=rt.fixLeft,Oo=rt.fixRight,co=rt.firstFixLeft,Ir=rt.lastFixLeft,Fo=rt.firstFixRight,ta=rt.lastFixRight,Pa=rt.appendNode,wa=rt.additionalProps,oo=wa===void 0?{}:wa,Ta=rt.isSticky,Va="".concat(Vi,"-cell"),ws=Ue(Be,["supportSticky","allColumnsFixedLeft"]),as=ws.supportSticky,qs=ws.allColumnsFixedLeft,Bs=_t(rr,zr,mo,Jn,_r,Xo),Za=(0,He.Z)(Bs,2),oa=Za[0],us=Za[1],el={},Ws=typeof uo=="number"&&as,hl=typeof Oo=="number"&&as;Ws&&(el.position="sticky",el.left=uo),hl&&(el.position="sticky",el.right=Oo);var ba=(et=(Yt=(Qt=us==null?void 0:us.colSpan)!==null&&Qt!==void 0?Qt:oo.colSpan)!==null&&Yt!==void 0?Yt:$o)!==null&&et!==void 0?et:1,ca=(yn=(on=(Kn=us==null?void 0:us.rowSpan)!==null&&Kn!==void 0?Kn:oo.rowSpan)!==null&&on!==void 0?on:ka)!==null&&yn!==void 0?yn:1,Ca=ln(sa,ca),Qo=(0,He.Z)(Ca,2),vs=Qo[0],Jo=Qo[1],Ra=function(fl){var Bl;rr&&Jo(sa,sa+ca-1),oo==null||(Bl=oo.onMouseEnter)===null||Bl===void 0||Bl.call(oo,fl)},rs=function(fl){var Bl;rr&&Jo(-1,-1),oo==null||(Bl=oo.onMouseLeave)===null||Bl===void 0||Bl.call(oo,fl)};if(ba===0||ca===0)return null;var ss=(zn=oo.title)!==null&&zn!==void 0?zn:Wn({rowType:ro,ellipsis:yi,children:oa}),Dl=ot()(Va,Ui,(Xn={},(0,Ze.Z)(Xn,"".concat(Va,"-fix-left"),Ws&&as),(0,Ze.Z)(Xn,"".concat(Va,"-fix-left-first"),co&&as),(0,Ze.Z)(Xn,"".concat(Va,"-fix-left-last"),Ir&&as),(0,Ze.Z)(Xn,"".concat(Va,"-fix-left-all"),Ir&&qs&&as),(0,Ze.Z)(Xn,"".concat(Va,"-fix-right"),hl&&as),(0,Ze.Z)(Xn,"".concat(Va,"-fix-right-first"),Fo&&as),(0,Ze.Z)(Xn,"".concat(Va,"-fix-right-last"),ta&&as),(0,Ze.Z)(Xn,"".concat(Va,"-ellipsis"),yi),(0,Ze.Z)(Xn,"".concat(Va,"-with-append"),Pa),(0,Ze.Z)(Xn,"".concat(Va,"-fix-sticky"),(Ws||hl)&&Ta&&as),(0,Ze.Z)(Xn,"".concat(Va,"-row-hover"),!us&&vs),Xn),oo.className,us==null?void 0:us.className),Fl={};Jr&&(Fl.textAlign=Jr);var Yl=(0,ht.Z)((0,ht.Z)((0,ht.Z)((0,ht.Z)({},el),oo.style),Fl),us==null?void 0:us.style),Cs=oa;return(0,Xe.Z)(Cs)==="object"&&!Array.isArray(Cs)&&!Le.isValidElement(Cs)&&(Cs=null),yi&&(Ir||Fo)&&(Cs=Le.createElement("span",{className:"".concat(Va,"-content")},Cs)),Le.createElement(Pi,(0,bt.Z)({},us,oo,{className:Dl,style:Yl,title:ss,scope:or,onMouseEnter:Ra,onMouseLeave:rs,colSpan:ba!==1?ba:null,rowSpan:ca!==1?ca:null}),Pa,Cs)}var _n=Le.memo(un);function St(rt,et,Yt,Qt,yn,on){var Kn=Yt[rt]||{},zn=Yt[et]||{},Xn,Pi;Kn.fixed==="left"?Xn=Qt.left[yn==="rtl"?et:rt]:zn.fixed==="right"&&(Pi=Qt.right[yn==="rtl"?rt:et]);var Jn=!1,yi=!1,or=!1,Vi=!1,Ui=Yt[et+1],Jr=Yt[rt-1],rr=!(on!=null&&on.children);if(yn==="rtl"){if(Xn!==void 0){var _r=Jr&&Jr.fixed==="left";Vi=!_r&&rr}else if(Pi!==void 0){var zr=Ui&&Ui.fixed==="right";or=!zr&&rr}}else if(Xn!==void 0){var mo=Ui&&Ui.fixed==="left";Jn=!mo&&rr}else if(Pi!==void 0){var Xo=Jr&&Jr.fixed==="right";yi=!Xo&&rr}return{fixLeft:Xn,fixRight:Pi,lastFixLeft:Jn,firstFixRight:yi,lastFixRight:or,firstFixLeft:Vi,isSticky:Qt.isSticky}}var Zn=Le.createContext({}),li=Zn;function Ge(rt){var et=rt.className,Yt=rt.index,Qt=rt.children,yn=rt.colSpan,on=yn===void 0?1:yn,Kn=rt.rowSpan,zn=rt.align,Xn=Ue(Be,["prefixCls","direction"]),Pi=Xn.prefixCls,Jn=Xn.direction,yi=Le.useContext(li),or=yi.scrollColumnIndex,Vi=yi.stickyOffsets,Ui=yi.flattenColumns,Jr=yi.columns,rr=Yt+on-1,_r=rr+1===or?on+1:on,zr=St(Yt,Yt+_r-1,Ui,Vi,Jn,Jr==null?void 0:Jr[Yt]);return Le.createElement(_n,(0,bt.Z)({className:et,index:Yt,component:"td",prefixCls:Pi,record:null,dataIndex:null,align:zn,colSpan:_r,rowSpan:Kn,render:function(){return Qt}},zr))}var be=me(37061),Pe=["children"];function Ae(rt){var et=rt.children,Yt=(0,be.Z)(rt,Pe);return Le.createElement("tr",Yt,et)}function Ne(rt){var et=rt.children;return et}Ne.Row=Ae,Ne.Cell=Ge;var xe=Ne;function ut(rt){var et=rt.children,Yt=rt.stickyOffsets,Qt=rt.flattenColumns,yn=rt.columns,on=Ue(Be,"prefixCls"),Kn=Qt.length-1,zn=Qt[Kn],Xn=Le.useMemo(function(){return{stickyOffsets:Yt,flattenColumns:Qt,scrollColumnIndex:zn!=null&&zn.scrollbar?Kn:null,columns:yn}},[zn,Qt,Kn,Yt,yn]);return Le.createElement(li.Provider,{value:Xn},Le.createElement("tfoot",{className:"".concat(on,"-summary")},et))}var Bt=ve(ut),Qe=xe,it=me(70425),Ft=me(29301),Nt=me(29194),dt=me(24514),Kt=me(75152),wn=me(26112);function sn(rt,et,Yt,Qt,yn,on,Kn){rt.push({record:et,indent:Yt,index:Kn});var zn=on(et),Xn=yn==null?void 0:yn.has(zn);if(et&&Array.isArray(et[Qt])&&Xn)for(var Pi=0;Pi<et[Qt].length;Pi+=1)sn(rt,et[Qt][Pi],Yt+1,Qt,yn,on,Pi)}function qt(rt,et,Yt,Qt){var yn=Le.useMemo(function(){if(Yt!=null&&Yt.size){for(var on=[],Kn=0;Kn<(rt==null?void 0:rt.length);Kn+=1){var zn=rt[Kn];sn(on,zn,0,et,Yt,Qt,Kn)}return on}return rt==null?void 0:rt.map(function(Xn,Pi){return{record:Xn,indent:0,index:Pi}})},[rt,et,Yt,Qt]);return yn}function Rn(rt){var et=rt.prefixCls,Yt=rt.children,Qt=rt.component,yn=rt.cellComponent,on=rt.className,Kn=rt.expanded,zn=rt.colSpan,Xn=rt.isEmpty,Pi=Ue(Be,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Jn=Pi.scrollbarSize,yi=Pi.fixHeader,or=Pi.fixColumn,Vi=Pi.componentWidth,Ui=Pi.horizonScroll,Jr=Yt;return(Xn?Ui&&Vi:or)&&(Jr=Le.createElement("div",{style:{width:Vi-(yi?Jn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(et,"-expanded-row-fixed")},Jr)),Le.createElement(Qt,{className:on,style:{display:Kn?null:"none"}},Le.createElement(_n,{component:yn,prefixCls:et,colSpan:zn},Jr))}var Vn=Rn;function hn(rt,et,Yt,Qt){var yn=Ue(Be,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),on=yn.flattenColumns,Kn=yn.expandableType,zn=yn.expandedKeys,Xn=yn.childrenColumnName,Pi=yn.onTriggerExpand,Jn=yn.rowExpandable,yi=yn.onRow,or=yn.expandRowByClick,Vi=yn.rowClassName,Ui=Kn==="nest",Jr=Kn==="row"&&(!Jn||Jn(rt)),rr=Jr||Ui,_r=zn&&zn.has(et),zr=Xn&&rt&&rt[Xn],mo=(0,it.useEvent)(Pi),Xo=yi==null?void 0:yi(rt,Yt),sa=Xo==null?void 0:Xo.onClick,ro=function(Oo){or&&rr&&Pi(rt,Oo);for(var co=arguments.length,Ir=new Array(co>1?co-1:0),Fo=1;Fo<co;Fo++)Ir[Fo-1]=arguments[Fo];sa==null||sa.apply(void 0,[Oo].concat(Ir))},$o;typeof Vi=="string"?$o=Vi:typeof Vi=="function"&&($o=Vi(rt,Yt,Qt));var ka=Rt(on);return(0,ht.Z)((0,ht.Z)({},yn),{},{columnsKey:ka,nestExpandable:Ui,expanded:_r,hasNestChildren:zr,record:rt,onTriggerExpand:mo,rowSupportExpand:Jr,expandable:rr,rowProps:(0,ht.Z)((0,ht.Z)({},Xo),{},{className:ot()($o,Xo==null?void 0:Xo.className),onClick:ro})})}function Yn(rt,et,Yt,Qt,yn){var on=rt.record,Kn=rt.prefixCls,zn=rt.columnsKey,Xn=rt.fixedInfoList,Pi=rt.expandIconColumnIndex,Jn=rt.nestExpandable,yi=rt.indentSize,or=rt.expandIcon,Vi=rt.expanded,Ui=rt.hasNestChildren,Jr=rt.onTriggerExpand,rr=zn[Yt],_r=Xn[Yt],zr;Yt===(Pi||0)&&Jn&&(zr=Le.createElement(Le.Fragment,null,Le.createElement("span",{style:{paddingLeft:"".concat(yi*Qt,"px")},className:"".concat(Kn,"-row-indent indent-level-").concat(Qt)}),or({prefixCls:Kn,expanded:Vi,expandable:Ui,record:on,onExpand:Jr})));var mo;return et.onCell&&(mo=et.onCell(on,yn)),{key:rr,fixedInfo:_r,appendCellNode:zr,additionalCellProps:mo||{}}}function mi(rt){var et=rt.className,Yt=rt.style,Qt=rt.record,yn=rt.index,on=rt.renderIndex,Kn=rt.rowKey,zn=rt.indent,Xn=zn===void 0?0:zn,Pi=rt.rowComponent,Jn=rt.cellComponent,yi=rt.scopeCellComponent,or=hn(Qt,Kn,yn,Xn),Vi=or.prefixCls,Ui=or.flattenColumns,Jr=or.expandedRowClassName,rr=or.expandedRowRender,_r=or.rowProps,zr=or.expanded,mo=or.rowSupportExpand,Xo=Le.useState(!1),sa=(0,He.Z)(Xo,2),ro=sa[0],$o=sa[1];Le.useEffect(function(){zr&&$o(!0)},[zr]);var ka=Le.createElement(Pi,(0,bt.Z)({},_r,{"data-row-key":Kn,className:ot()(et,"".concat(Vi,"-row"),"".concat(Vi,"-row-level-").concat(Xn),_r==null?void 0:_r.className),style:(0,ht.Z)((0,ht.Z)({},Yt),_r==null?void 0:_r.style)}),Ui.map(function(Ir,Fo){var ta=Ir.render,Pa=Ir.dataIndex,wa=Ir.className,oo=Yn(or,Ir,Fo,Xn,yn),Ta=oo.key,Va=oo.fixedInfo,ws=oo.appendCellNode,as=oo.additionalCellProps;return Le.createElement(_n,(0,bt.Z)({className:wa,ellipsis:Ir.ellipsis,align:Ir.align,scope:Ir.rowScope,component:Ir.rowScope?yi:Jn,prefixCls:Vi,key:Ta,record:Qt,index:yn,renderIndex:on,dataIndex:Pa,render:ta,shouldCellUpdate:Ir.shouldCellUpdate},Va,{appendNode:ws,additionalProps:as}))})),uo;if(mo&&(ro||zr)){var Oo=rr(Qt,yn,Xn+1,zr),co=Jr&&Jr(Qt,yn,Xn);uo=Le.createElement(Vn,{expanded:zr,className:ot()("".concat(Vi,"-expanded-row"),"".concat(Vi,"-expanded-row-level-").concat(Xn+1),co),prefixCls:Vi,component:Pi,cellComponent:Jn,colSpan:Ui.length,isEmpty:!1},Oo)}return Le.createElement(Le.Fragment,null,ka,uo)}mi.displayName="BodyRow";var jn=ve(mi);function An(rt){var et=rt.columnKey,Yt=rt.onColumnResize,Qt=Le.useRef();return Le.useEffect(function(){Qt.current&&Yt(et,Qt.current.offsetWidth)},[]),Le.createElement(Ft.Z,{data:et},Le.createElement("td",{ref:Qt,style:{padding:0,border:0,height:0}},Le.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function wi(rt){var et=rt.prefixCls,Yt=rt.columnsKey,Qt=rt.onColumnResize;return Le.createElement("tr",{"aria-hidden":"true",className:"".concat(et,"-measure-row"),style:{height:0,fontSize:0}},Le.createElement(Ft.Z.Collection,{onBatchResize:function(on){on.forEach(function(Kn){var zn=Kn.data,Xn=Kn.size;Qt(zn,Xn.offsetWidth)})}},Yt.map(function(yn){return Le.createElement(An,{key:yn,columnKey:yn,onColumnResize:Qt})})))}function ji(rt){var et=rt.data,Yt=rt.measureColumnWidth,Qt=Ue(Be,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),yn=Qt.prefixCls,on=Qt.getComponent,Kn=Qt.onColumnResize,zn=Qt.flattenColumns,Xn=Qt.getRowKey,Pi=Qt.expandedKeys,Jn=Qt.childrenColumnName,yi=Qt.emptyNode,or=qt(et,Jn,Pi,Xn),Vi=Le.useRef({renderWithProps:!1}),Ui=on(["body","wrapper"],"tbody"),Jr=on(["body","row"],"tr"),rr=on(["body","cell"],"td"),_r=on(["body","cell"],"th"),zr;et.length?zr=or.map(function(Xo,sa){var ro=Xo.record,$o=Xo.indent,ka=Xo.index,uo=Xn(ro,sa);return Le.createElement(jn,{key:uo,rowKey:uo,record:ro,index:sa,renderIndex:ka,rowComponent:Jr,cellComponent:rr,scopeCellComponent:_r,getRowKey:Xn,indent:$o})}):zr=Le.createElement(Vn,{expanded:!0,className:"".concat(yn,"-placeholder"),prefixCls:yn,component:Jr,cellComponent:rr,colSpan:zn.length,isEmpty:!0},yi);var mo=Rt(zn);return Le.createElement(Lt.Provider,{value:Vi.current},Le.createElement(Ui,{className:"".concat(yn,"-tbody")},Yt&&Le.createElement(wi,{prefixCls:yn,columnsKey:mo,onColumnResize:Kn}),zr))}ji.displayName="Body";var Wi=ve(ji),dr=["expandable"],Mr="RC_TABLE_INTERNAL_COL_DEFINE";function pi(rt){var et=rt.expandable,Yt=(0,be.Z)(rt,dr),Qt;return"expandable"in rt?Qt=(0,ht.Z)((0,ht.Z)({},Yt),et):Qt=Yt,Qt.showExpandColumn===!1&&(Qt.expandIconColumnIndex=-1),Qt}var ui=["columnType"];function Ci(rt){for(var et=rt.colWidths,Yt=rt.columns,Qt=rt.columCount,yn=[],on=Qt||Yt.length,Kn=!1,zn=on-1;zn>=0;zn-=1){var Xn=et[zn],Pi=Yt&&Yt[zn],Jn=Pi&&Pi[Mr];if(Xn||Jn||Kn){var yi=Jn||{},or=yi.columnType,Vi=(0,be.Z)(yi,ui);yn.unshift(Le.createElement("col",(0,bt.Z)({key:zn,style:{width:Xn}},Vi))),Kn=!0}}return Le.createElement("colgroup",null,yn)}var Xi=Ci,Ni=me(26407),io=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function hr(rt,et){return(0,Le.useMemo)(function(){for(var Yt=[],Qt=0;Qt<et;Qt+=1){var yn=rt[Qt];if(yn!==void 0)Yt[Qt]=yn;else return null}return Yt},[rt.join("_"),et])}var De=Le.forwardRef(function(rt,et){var Yt=rt.className,Qt=rt.noData,yn=rt.columns,on=rt.flattenColumns,Kn=rt.colWidths,zn=rt.columCount,Xn=rt.stickyOffsets,Pi=rt.direction,Jn=rt.fixHeader,yi=rt.stickyTopOffset,or=rt.stickyBottomOffset,Vi=rt.stickyClassName,Ui=rt.onScroll,Jr=rt.maxContentScroll,rr=rt.children,_r=(0,be.Z)(rt,io),zr=Ue(Be,["prefixCls","scrollbarSize","isSticky"]),mo=zr.prefixCls,Xo=zr.scrollbarSize,sa=zr.isSticky,ro=sa&&!Jn?0:Xo,$o=Le.useRef(null),ka=Le.useCallback(function(wa){(0,at.mH)(et,wa),(0,at.mH)($o,wa)},[]);Le.useEffect(function(){var wa;function oo(Ta){var Va=Ta,ws=Va.currentTarget,as=Va.deltaX;as&&(Ui({currentTarget:ws,scrollLeft:ws.scrollLeft+as}),Ta.preventDefault())}return(wa=$o.current)===null||wa===void 0||wa.addEventListener("wheel",oo),function(){var Ta;(Ta=$o.current)===null||Ta===void 0||Ta.removeEventListener("wheel",oo)}},[]);var uo=Le.useMemo(function(){return on.every(function(wa){return wa.width})},[on]),Oo=on[on.length-1],co={fixed:Oo?Oo.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(mo,"-cell-scrollbar")}}},Ir=(0,Le.useMemo)(function(){return ro?[].concat((0,Ni.Z)(yn),[co]):yn},[ro,yn]),Fo=(0,Le.useMemo)(function(){return ro?[].concat((0,Ni.Z)(on),[co]):on},[ro,on]),ta=(0,Le.useMemo)(function(){var wa=Xn.right,oo=Xn.left;return(0,ht.Z)((0,ht.Z)({},Xn),{},{left:Pi==="rtl"?[].concat((0,Ni.Z)(oo.map(function(Ta){return Ta+ro})),[0]):oo,right:Pi==="rtl"?wa:[].concat((0,Ni.Z)(wa.map(function(Ta){return Ta+ro})),[0]),isSticky:sa})},[ro,Xn,sa]),Pa=hr(Kn,zn);return Le.createElement("div",{style:(0,ht.Z)({overflow:"hidden"},sa?{top:yi,bottom:or}:{}),ref:ka,className:ot()(Yt,(0,Ze.Z)({},Vi,!!Vi))},Le.createElement("table",{style:{tableLayout:"fixed",visibility:Qt||Pa?null:"hidden"}},(!Qt||!Jr||uo)&&Le.createElement(Xi,{colWidths:Pa?[].concat((0,Ni.Z)(Pa),[ro]):[],columCount:zn+1,columns:Fo}),rr((0,ht.Z)((0,ht.Z)({},_r),{},{stickyOffsets:ta,columns:Ir,flattenColumns:Fo}))))});De.displayName="FixedHolder";var Ei=Le.memo(De);function Pr(rt){var et=rt.cells,Yt=rt.stickyOffsets,Qt=rt.flattenColumns,yn=rt.rowComponent,on=rt.cellComponent,Kn=rt.tdCellComponent,zn=rt.onHeaderRow,Xn=rt.index,Pi=Ue(Be,["prefixCls","direction"]),Jn=Pi.prefixCls,yi=Pi.direction,or;zn&&(or=zn(et.map(function(Ui){return Ui.column}),Xn));var Vi=Rt(et.map(function(Ui){return Ui.column}));return Le.createElement(yn,or,et.map(function(Ui,Jr){var rr=Ui.column,_r=St(Ui.colStart,Ui.colEnd,Qt,Yt,yi,rr),zr;return rr&&rr.onHeaderCell&&(zr=Ui.column.onHeaderCell(rr)),Le.createElement(_n,(0,bt.Z)({},Ui,{scope:rr.title?Ui.colSpan>1?"colgroup":"col":null,ellipsis:rr.ellipsis,align:rr.align,component:rr.title?on:Kn,prefixCls:Jn,key:Vi[Jr]},_r,{additionalProps:zr,rowType:"header"}))}))}Pr.displayName="HeaderRow";var Ln=Pr;function vi(rt){var et=[];function Yt(Kn,zn){var Xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;et[Xn]=et[Xn]||[];var Pi=zn,Jn=Kn.filter(Boolean).map(function(yi){var or={key:yi.key,className:yi.className||"",children:yi.title,column:yi,colStart:Pi},Vi=1,Ui=yi.children;return Ui&&Ui.length>0&&(Vi=Yt(Ui,Pi,Xn+1).reduce(function(Jr,rr){return Jr+rr},0),or.hasSubColumns=!0),"colSpan"in yi&&(Vi=yi.colSpan),"rowSpan"in yi&&(or.rowSpan=yi.rowSpan),or.colSpan=Vi,or.colEnd=or.colStart+Vi-1,et[Xn].push(or),Pi+=Vi,Vi});return Jn}Yt(rt,0);for(var Qt=et.length,yn=function(zn){et[zn].forEach(function(Xn){!("rowSpan"in Xn)&&!Xn.hasSubColumns&&(Xn.rowSpan=Qt-zn)})},on=0;on<Qt;on+=1)yn(on);return et}function Zi(rt){var et=rt.stickyOffsets,Yt=rt.columns,Qt=rt.flattenColumns,yn=rt.onHeaderRow,on=Ue(Be,["prefixCls","getComponent"]),Kn=on.prefixCls,zn=on.getComponent,Xn=Le.useMemo(function(){return vi(Yt)},[Yt]),Pi=zn(["header","wrapper"],"thead"),Jn=zn(["header","row"],"tr"),yi=zn(["header","cell"],"th"),or=zn(["header","cell"],"td");return Le.createElement(Pi,{className:"".concat(Kn,"-thead")},Xn.map(function(Vi,Ui){var Jr=Le.createElement(Ln,{key:Ui,flattenColumns:Qt,cells:Vi,stickyOffsets:et,rowComponent:Jn,cellComponent:yi,tdCellComponent:or,onHeaderRow:yn,index:Ui});return Jr}))}var er=ve(Zi),Gn=me(11592);function $t(rt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof et=="number"?et:et.endsWith("%")?rt*parseFloat(et)/100:null}function Gt(rt,et){return Le.useMemo(function(){if(et&&et>0){var Yt=0,Qt=0;rt.forEach(function(Pi){var Jn=$t(et,Pi.width);Jn?Yt+=Jn:Qt+=1});var yn=et-Yt,on=Qt,Kn=yn/Qt,zn=0,Xn=rt.map(function(Pi){var Jn=(0,ht.Z)({},Pi),yi=$t(et,Jn.width);if(yi)Jn.width=yi;else{var or=Math.floor(Kn);Jn.width=on===1?yn:or,yn-=or,on-=1}return zn+=Jn.width,Jn});return[Xn,zn]}return[rt,et]},[rt,et])}var Zt=["children"],wt=["fixed"];function vn(rt){return(0,Gn.Z)(rt).filter(function(et){return Le.isValidElement(et)}).map(function(et){var Yt=et.key,Qt=et.props,yn=Qt.children,on=(0,be.Z)(Qt,Zt),Kn=(0,ht.Z)({key:Yt},on);return yn&&(Kn.children=vn(yn)),Kn})}function cn(rt){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return rt.filter(function(Yt){return Yt&&(0,Xe.Z)(Yt)==="object"}).reduce(function(Yt,Qt,yn){var on=Qt.fixed,Kn=on===!0?"left":on,zn="".concat(et,"-").concat(yn),Xn=Qt.children;return Xn&&Xn.length>0?[].concat((0,Ni.Z)(Yt),(0,Ni.Z)(cn(Xn,zn).map(function(Pi){return(0,ht.Z)({fixed:Kn},Pi)}))):[].concat((0,Ni.Z)(Yt),[(0,ht.Z)((0,ht.Z)({key:zn},Qt),{},{fixed:Kn})])},[])}function It(rt){for(var et=!0,Yt=0;Yt<rt.length;Yt+=1){var Qt=rt[Yt];if(et&&Qt.fixed!=="left")et=!1;else if(!et&&Qt.fixed==="left"){warning(!1,"Index ".concat(Yt-1," of `columns` missing `fixed='left'` prop."));break}}for(var yn=!0,on=rt.length-1;on>=0;on-=1){var Kn=rt[on];if(yn&&Kn.fixed!=="right")yn=!1;else if(!yn&&Kn.fixed==="right"){warning(!1,"Index ".concat(on+1," of `columns` missing `fixed='right'` prop."));break}}}function ct(rt){return rt.map(function(et){var Yt=et.fixed,Qt=(0,be.Z)(et,wt),yn=Yt;return Yt==="left"?yn="right":Yt==="right"&&(yn="left"),(0,ht.Z)({fixed:yn},Qt)})}function an(rt,et){var Yt=rt.prefixCls,Qt=rt.columns,yn=rt.children,on=rt.expandable,Kn=rt.expandedKeys,zn=rt.columnTitle,Xn=rt.getRowKey,Pi=rt.onTriggerExpand,Jn=rt.expandIcon,yi=rt.rowExpandable,or=rt.expandIconColumnIndex,Vi=rt.direction,Ui=rt.expandRowByClick,Jr=rt.columnWidth,rr=rt.fixed,_r=rt.scrollWidth,zr=Le.useMemo(function(){return Qt||vn(yn)},[Qt,yn]),mo=Le.useMemo(function(){if(on){var Oo,co=zr.slice();if(!co.includes(le)){var Ir=or||0;Ir>=0&&co.splice(Ir,0,le)}var Fo=co.indexOf(le);co=co.filter(function(oo,Ta){return oo!==le||Ta===Fo});var ta=zr[Fo],Pa;(rr==="left"||rr)&&!or?Pa="left":(rr==="right"||rr)&&or===zr.length?Pa="right":Pa=ta?ta.fixed:null;var wa=(Oo={},(0,Ze.Z)(Oo,Mr,{className:"".concat(Yt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ze.Z)(Oo,"title",zn),(0,Ze.Z)(Oo,"fixed",Pa),(0,Ze.Z)(Oo,"className","".concat(Yt,"-row-expand-icon-cell")),(0,Ze.Z)(Oo,"width",Jr),(0,Ze.Z)(Oo,"render",function(Ta,Va,ws){var as=Xn(Va,ws),qs=Kn.has(as),Bs=yi?yi(Va):!0,Za=Jn({prefixCls:Yt,expanded:qs,expandable:Bs,record:Va,onExpand:Pi});return Ui?Le.createElement("span",{onClick:function(us){return us.stopPropagation()}},Za):Za}),Oo);return co.map(function(oo){return oo===le?wa:oo})}return zr.filter(function(oo){return oo!==le})},[on,zr,Xn,Kn,Jn,Vi]),Xo=Le.useMemo(function(){var Oo=mo;return et&&(Oo=et(Oo)),Oo.length||(Oo=[{render:function(){return null}}]),Oo},[et,mo,Vi]),sa=Le.useMemo(function(){return Vi==="rtl"?ct(cn(Xo)):cn(Xo)},[Xo,Vi,_r]),ro=Gt(sa,_r),$o=(0,He.Z)(ro,2),ka=$o[0],uo=$o[1];return[Xo,ka,uo]}var dn=an;function ei(rt){var et,Yt=rt.prefixCls,Qt=rt.record,yn=rt.onExpand,on=rt.expanded,Kn=rt.expandable,zn="".concat(Yt,"-row-expand-icon");if(!Kn)return Le.createElement("span",{className:ot()(zn,"".concat(Yt,"-row-spaced"))});var Xn=function(Jn){yn(Qt,Jn),Jn.stopPropagation()};return Le.createElement("span",{className:ot()(zn,(et={},(0,Ze.Z)(et,"".concat(Yt,"-row-expanded"),on),(0,Ze.Z)(et,"".concat(Yt,"-row-collapsed"),!on),et)),onClick:Xn})}function pn(rt,et,Yt){var Qt=[];function yn(on){(on||[]).forEach(function(Kn,zn){Qt.push(et(Kn,zn)),yn(Kn[Yt])})}return yn(rt),Qt}function zt(rt,et,Yt){var Qt=pi(rt),yn=Qt.expandIcon,on=Qt.expandedRowKeys,Kn=Qt.defaultExpandedRowKeys,zn=Qt.defaultExpandAllRows,Xn=Qt.expandedRowRender,Pi=Qt.onExpand,Jn=Qt.onExpandedRowsChange,yi=Qt.childrenColumnName,or=yn||ei,Vi=yi||"children",Ui=Le.useMemo(function(){return Xn?"row":rt.expandable&&rt.internalHooks===Te&&rt.expandable.__PARENT_RENDER_ICON__||et.some(function(sa){return sa&&(0,Xe.Z)(sa)==="object"&&sa[Vi]})?"nest":!1},[!!Xn,et]),Jr=Le.useState(function(){return Kn||(zn?pn(et,Yt,Vi):[])}),rr=(0,He.Z)(Jr,2),_r=rr[0],zr=rr[1],mo=Le.useMemo(function(){return new Set(on||_r||[])},[on,_r]),Xo=Le.useCallback(function(sa){var ro=Yt(sa,et.indexOf(sa)),$o,ka=mo.has(ro);ka?(mo.delete(ro),$o=(0,Ni.Z)(mo)):$o=[].concat((0,Ni.Z)(mo),[ro]),zr($o),Pi&&Pi(!ka,sa),Jn&&Jn($o)},[Yt,mo,et,Pi,Jn]);return[Qt,Ui,mo,or,Vi,Xo]}function In(rt,et,Yt,Qt){var yn=rt.map(function(on,Kn){return St(Kn,Kn,rt,et,Yt,Qt==null?void 0:Qt[Kn])});return(0,Ot.Z)(function(){return yn},[yn],function(on,Kn){return!(0,Ve.Z)(on,Kn)})}function Qn(rt){var et=(0,Le.useRef)(rt),Yt=(0,Le.useState)({}),Qt=(0,He.Z)(Yt,2),yn=Qt[1],on=(0,Le.useRef)(null),Kn=(0,Le.useRef)([]);function zn(Xn){Kn.current.push(Xn);var Pi=Promise.resolve();on.current=Pi,Pi.then(function(){if(on.current===Pi){var Jn=Kn.current,yi=et.current;Kn.current=[],Jn.forEach(function(or){et.current=or(et.current)}),on.current=null,yi!==et.current&&yn({})}})}return(0,Le.useEffect)(function(){return function(){on.current=null}},[]),[et.current,zn]}function xi(rt){var et=(0,Le.useRef)(rt||null),Yt=(0,Le.useRef)();function Qt(){window.clearTimeout(Yt.current)}function yn(Kn){et.current=Kn,Qt(),Yt.current=window.setTimeout(function(){et.current=null,Yt.current=void 0},100)}function on(){return et.current}return(0,Le.useEffect)(function(){return Qt},[]),[yn,on]}function tn(){var rt=Le.useState(-1),et=(0,He.Z)(rt,2),Yt=et[0],Qt=et[1],yn=Le.useState(-1),on=(0,He.Z)(yn,2),Kn=on[0],zn=on[1],Xn=Le.useCallback(function(Pi,Jn){Qt(Pi),zn(Jn)},[]);return[Yt,Kn,Xn]}var fn=me(47273),kn=(0,fn.Z)()?window:null;function zi(rt,et){var Yt=(0,Xe.Z)(rt)==="object"?rt:{},Qt=Yt.offsetHeader,yn=Qt===void 0?0:Qt,on=Yt.offsetSummary,Kn=on===void 0?0:on,zn=Yt.offsetScroll,Xn=zn===void 0?0:zn,Pi=Yt.getContainer,Jn=Pi===void 0?function(){return kn}:Pi,yi=Jn()||kn;return Le.useMemo(function(){var or=!!rt;return{isSticky:or,stickyClassName:or?"".concat(et,"-sticky-holder"):"",offsetHeader:yn,offsetSummary:Kn,offsetScroll:Xn,container:yi}},[Xn,yn,Kn,et,yi])}function Di(rt,et,Yt){var Qt=(0,Le.useMemo)(function(){for(var yn=[],on=[],Kn=0,zn=0,Xn=0;Xn<et;Xn+=1)if(Yt==="rtl"){on[Xn]=zn,zn+=rt[Xn]||0;var Pi=et-Xn-1;yn[Pi]=Kn,Kn+=rt[Pi]||0}else{yn[Xn]=Kn,Kn+=rt[Xn]||0;var Jn=et-Xn-1;on[Jn]=zn,zn+=rt[Jn]||0}return{left:yn,right:on}},[rt,et,Yt]);return Qt}var Si=Di;function Fi(rt){var et=rt.className,Yt=rt.children;return Le.createElement("div",{className:et},Yt)}var Ti=Fi,nr=me(8224),$r=me(55468),ci=function(et,Yt){var Qt,yn,on=et.scrollBodyRef,Kn=et.onScroll,zn=et.offsetScroll,Xn=et.container,Pi=Ue(Be,"prefixCls"),Jn=((Qt=on.current)===null||Qt===void 0?void 0:Qt.scrollWidth)||0,yi=((yn=on.current)===null||yn===void 0?void 0:yn.clientWidth)||0,or=Jn&&yi*(yi/Jn),Vi=Le.useRef(),Ui=Qn({scrollLeft:0,isHiddenScrollBar:!1}),Jr=(0,He.Z)(Ui,2),rr=Jr[0],_r=Jr[1],zr=Le.useRef({delta:0,x:0}),mo=Le.useState(!1),Xo=(0,He.Z)(mo,2),sa=Xo[0],ro=Xo[1],$o=function(){ro(!1)},ka=function(Fo){Fo.persist(),zr.current.delta=Fo.pageX-rr.scrollLeft,zr.current.x=0,ro(!0),Fo.preventDefault()},uo=function(Fo){var ta,Pa=Fo||((ta=window)===null||ta===void 0?void 0:ta.event),wa=Pa.buttons;if(!sa||wa===0){sa&&ro(!1);return}var oo=zr.current.x+Fo.pageX-zr.current.x-zr.current.delta;oo<=0&&(oo=0),oo+or>=yi&&(oo=yi-or),Kn({scrollLeft:oo/yi*(Jn+2)}),zr.current.x=Fo.pageX},Oo=function(){if(on.current){var Fo=(0,$r.os)(on.current).top,ta=Fo+on.current.offsetHeight,Pa=Xn===window?document.documentElement.scrollTop+window.innerHeight:(0,$r.os)(Xn).top+Xn.clientHeight;ta-(0,Kt.Z)()<=Pa||Fo>=Pa-zn?_r(function(wa){return(0,ht.Z)((0,ht.Z)({},wa),{},{isHiddenScrollBar:!0})}):_r(function(wa){return(0,ht.Z)((0,ht.Z)({},wa),{},{isHiddenScrollBar:!1})})}},co=function(Fo){_r(function(ta){return(0,ht.Z)((0,ht.Z)({},ta),{},{scrollLeft:Fo/Jn*yi||0})})};return Le.useImperativeHandle(Yt,function(){return{setScrollLeft:co}}),Le.useEffect(function(){var Ir=(0,nr.Z)(document.body,"mouseup",$o,!1),Fo=(0,nr.Z)(document.body,"mousemove",uo,!1);return Oo(),function(){Ir.remove(),Fo.remove()}},[or,sa]),Le.useEffect(function(){var Ir=(0,nr.Z)(Xn,"scroll",Oo,!1),Fo=(0,nr.Z)(window,"resize",Oo,!1);return function(){Ir.remove(),Fo.remove()}},[Xn]),Le.useEffect(function(){rr.isHiddenScrollBar||_r(function(Ir){var Fo=on.current;return Fo?(0,ht.Z)((0,ht.Z)({},Ir),{},{scrollLeft:Fo.scrollLeft/Fo.scrollWidth*Fo.clientWidth}):Ir})},[rr.isHiddenScrollBar]),Jn<=yi||!or||rr.isHiddenScrollBar?null:Le.createElement("div",{style:{height:(0,Kt.Z)(),width:yi,bottom:zn},className:"".concat(Pi,"-sticky-scroll")},Le.createElement("div",{onMouseDown:ka,ref:Vi,className:ot()("".concat(Pi,"-sticky-scroll-bar"),(0,Ze.Z)({},"".concat(Pi,"-sticky-scroll-bar-active"),sa)),style:{width:"".concat(or,"px"),transform:"translate3d(".concat(rr.scrollLeft,"px, 0, 0)")}}))},Ki=Le.forwardRef(ci);function Yr(rt){return null}var Qr=Yr;function Cr(rt){return null}var Jt=Cr,gi="rc-table",mr=[],tr={};function Hr(){return"No Data"}function Lr(rt){var et,Yt=(0,ht.Z)({rowKey:"key",prefixCls:gi,emptyText:Hr},rt),Qt=Yt.prefixCls,yn=Yt.className,on=Yt.rowClassName,Kn=Yt.style,zn=Yt.data,Xn=Yt.rowKey,Pi=Yt.scroll,Jn=Yt.tableLayout,yi=Yt.direction,or=Yt.title,Vi=Yt.footer,Ui=Yt.summary,Jr=Yt.caption,rr=Yt.id,_r=Yt.showHeader,zr=Yt.components,mo=Yt.emptyText,Xo=Yt.onRow,sa=Yt.onHeaderRow,ro=Yt.internalHooks,$o=Yt.transformColumns,ka=Yt.internalRefs,uo=Yt.tailor,Oo=Yt.sticky,co=zn||mr,Ir=!!co.length,Fo=ro===Te,ta=Le.useCallback(function(cs,Js){return(0,Pt.Z)(zr,cs)||Js},[zr]),Pa=Le.useMemo(function(){return typeof Xn=="function"?Xn:function(cs){var Js=cs&&cs[Xn];return Js}},[Xn]),wa=ta(["body"]),oo=tn(),Ta=(0,He.Z)(oo,3),Va=Ta[0],ws=Ta[1],as=Ta[2],qs=zt(Yt,co,Pa),Bs=(0,He.Z)(qs,6),Za=Bs[0],oa=Bs[1],us=Bs[2],el=Bs[3],Ws=Bs[4],hl=Bs[5],ba=Pi==null?void 0:Pi.x,ca=Le.useState(0),Ca=(0,He.Z)(ca,2),Qo=Ca[0],vs=Ca[1],Jo=dn((0,ht.Z)((0,ht.Z)((0,ht.Z)({},Yt),Za),{},{expandable:!!Za.expandedRowRender,columnTitle:Za.columnTitle,expandedKeys:us,getRowKey:Pa,onTriggerExpand:hl,expandIcon:el,expandIconColumnIndex:Za.expandIconColumnIndex,direction:yi,scrollWidth:Fo&&uo&&typeof ba=="number"?ba:null}),Fo?$o:null),Ra=(0,He.Z)(Jo,3),rs=Ra[0],ss=Ra[1],Dl=Ra[2],Fl=Dl!=null?Dl:ba,Yl=Le.useMemo(function(){return{columns:rs,flattenColumns:ss}},[rs,ss]),Cs=Le.useRef(),Hl=Le.useRef(),fl=Le.useRef(),Bl=Le.useRef(),_c=Le.useRef(),Es=Le.useState(!1),Is=(0,He.Z)(Es,2),bs=Is[0],Gs=Is[1],ml=Le.useState(!1),ts=(0,He.Z)(ml,2),js=ts[0],Il=ts[1],Xl=Qn(new Map),Gu=(0,He.Z)(Xl,2),Du=Gu[0],vl=Gu[1],Iu=Rt(ss),Ou=Iu.map(function(cs){return Du.get(cs)}),Ms=Le.useMemo(function(){return Ou},[Ou.join("_")]),Wl=Si(Ms,ss.length,yi),$s=Pi&&Sn(Pi.y),zs=Pi&&Sn(Fl)||!!Za.fixed,$u=zs&&ss.some(function(cs){var Js=cs.fixed;return Js}),Vc=Le.useRef(),sc=zi(Oo,Qt),lc=sc.isSticky,Ku=sc.offsetHeader,ku=sc.offsetSummary,ys=sc.offsetScroll,Ys=sc.stickyClassName,yl=sc.container,Xs=Le.useMemo(function(){return Ui==null?void 0:Ui(co)},[Ui,co]),ds=($s||lc)&&Le.isValidElement(Xs)&&Xs.type===xe&&Xs.props.fixed,xl,Su,xc;$s&&(Su={overflowY:"scroll",maxHeight:Pi.y}),zs&&(xl={overflowX:"auto"},$s||(Su={overflowY:"hidden"}),xc={width:Fl===!0?"auto":Fl,minWidth:"100%"});var jd=Le.useCallback(function(cs,Js){(0,Nt.Z)(Cs.current)&&vl(function(nu){if(nu.get(cs)!==Js){var uc=new Map(nu);return uc.set(cs,Js),uc}return nu})},[]),gn=xi(null),sd=(0,He.Z)(gn,2),Bc=sd[0],df=sd[1];function zd(cs,Js){Js&&(typeof Js=="function"?Js(cs):Js.scrollLeft!==cs&&(Js.scrollLeft=cs,Js.scrollLeft!==cs&&setTimeout(function(){Js.scrollLeft=cs},0)))}var Zd=(0,lt.Z)(function(cs){var Js=cs.currentTarget,nu=cs.scrollLeft,uc=yi==="rtl",cc=typeof nu=="number"?nu:Js.scrollLeft,$d=Js||tr;if(!df()||df()===$d){var cd;Bc($d),zd(cc,Hl.current),zd(cc,fl.current),zd(cc,_c.current),zd(cc,(cd=Vc.current)===null||cd===void 0?void 0:cd.setScrollLeft)}var vh=Js||Hl.current;if(vh){var Sc=vh.scrollWidth,Yc=vh.clientWidth;if(Sc===Yc){Gs(!1),Il(!1);return}uc?(Gs(-cc<Sc-Yc),Il(-cc>0)):(Gs(cc>0),Il(cc<Sc-Yc))}}),Rh=function(){zs&&fl.current?Zd({currentTarget:fl.current}):(Gs(!1),Il(!1))},Qg=function(Js){var nu=Js.width;nu!==Qo&&(Rh(),vs(Cs.current?Cs.current.offsetWidth:nu))},Ml=Le.useRef(!1);Le.useEffect(function(){Ml.current&&Rh()},[zs,zn,rs.length]),Le.useEffect(function(){Ml.current=!0},[]);var dh=Le.useState(0),Hd=(0,He.Z)(dh,2),hh=Hd[0],hf=Hd[1],Hf=Le.useState(!0),fh=(0,He.Z)(Hf,2),gh=fh[0],Vu=fh[1];Le.useEffect(function(){(!uo||!Fo)&&(fl.current instanceof Element?hf((0,Kt.o)(fl.current).width):hf((0,Kt.o)(Bl.current).width)),Vu((0,dt.G)("position","sticky"))},[]),Le.useEffect(function(){Fo&&ka&&(ka.body.current=fl.current)});var Wd=Le.useCallback(function(cs){return Le.createElement(Le.Fragment,null,Le.createElement(er,cs),ds==="top"&&Le.createElement(Bt,cs,Xs))},[ds,Xs]),ff=Le.useCallback(function(cs){return Le.createElement(Bt,cs,Xs)},[Xs]),Mc=ta(["table"],"table"),ld=Le.useMemo(function(){return Jn||($u?Fl==="max-content"?"auto":"fixed":$s||lc||ss.some(function(cs){var Js=cs.ellipsis;return Js})?"fixed":"auto")},[$s,$u,ss,Jn,lc]),Gd,Bd={colWidths:Ms,columCount:ss.length,stickyOffsets:Wl,onHeaderRow:sa,fixHeader:$s,scroll:Pi},Pu=Le.useMemo(function(){return Ir?null:typeof mo=="function"?mo():mo},[Ir,mo]),Md=Le.createElement(Wi,{data:co,measureColumnWidth:$s||zs||lc}),_h=Le.createElement(Xi,{colWidths:ss.map(function(cs){var Js=cs.width;return Js}),columns:ss}),Tu=Jr!=null?Le.createElement("caption",{className:"".concat(Qt,"-caption")},Jr):void 0,Uc=(0,wn.Z)(Yt,{data:!0}),ph=(0,wn.Z)(Yt,{aria:!0});if($s||lc){var mh;typeof wa=="function"?(mh=wa(co,{scrollbarSize:hh,ref:fl,onScroll:Zd}),Bd.colWidths=ss.map(function(cs,Js){var nu=cs.width,uc=Js===ss.length-1?nu-hh:nu;return typeof uc=="number"&&!Number.isNaN(uc)?uc:0})):mh=Le.createElement("div",{style:(0,ht.Z)((0,ht.Z)({},xl),Su),onScroll:Zd,ref:fl,className:ot()("".concat(Qt,"-body"))},Le.createElement(Mc,(0,bt.Z)({style:(0,ht.Z)((0,ht.Z)({},xc),{},{tableLayout:ld})},ph),Tu,_h,Md,!ds&&Xs&&Le.createElement(Bt,{stickyOffsets:Wl,flattenColumns:ss,columns:rs},Xs)));var ud=(0,ht.Z)((0,ht.Z)((0,ht.Z)({noData:!co.length,maxContentScroll:zs&&Fl==="max-content"},Bd),Yl),{},{direction:yi,stickyClassName:Ys,onScroll:Zd});Gd=Le.createElement(Le.Fragment,null,_r!==!1&&Le.createElement(Ei,(0,bt.Z)({},ud,{stickyTopOffset:Ku,className:"".concat(Qt,"-header"),ref:Hl}),Wd),mh,ds&&ds!=="top"&&Le.createElement(Ei,(0,bt.Z)({},ud,{stickyBottomOffset:ku,className:"".concat(Qt,"-summary"),ref:_c}),ff),lc&&Le.createElement(Ki,{ref:Vc,offsetScroll:ys,scrollBodyRef:fl,onScroll:Zd,container:yl}))}else Gd=Le.createElement("div",{style:(0,ht.Z)((0,ht.Z)({},xl),Su),className:ot()("".concat(Qt,"-content")),onScroll:Zd,ref:fl},Le.createElement(Mc,(0,bt.Z)({style:(0,ht.Z)((0,ht.Z)({},xc),{},{tableLayout:ld})},ph),Tu,_h,_r!==!1&&Le.createElement(er,(0,bt.Z)({},Bd,Yl)),Md,Xs&&Le.createElement(Bt,{stickyOffsets:Wl,flattenColumns:ss,columns:rs},Xs)));var lu=Le.createElement("div",(0,bt.Z)({className:ot()(Qt,yn,(et={},(0,Ze.Z)(et,"".concat(Qt,"-rtl"),yi==="rtl"),(0,Ze.Z)(et,"".concat(Qt,"-ping-left"),bs),(0,Ze.Z)(et,"".concat(Qt,"-ping-right"),js),(0,Ze.Z)(et,"".concat(Qt,"-layout-fixed"),Jn==="fixed"),(0,Ze.Z)(et,"".concat(Qt,"-fixed-header"),$s),(0,Ze.Z)(et,"".concat(Qt,"-fixed-column"),$u),(0,Ze.Z)(et,"".concat(Qt,"-scroll-horizontal"),zs),(0,Ze.Z)(et,"".concat(Qt,"-has-fix-left"),ss[0]&&ss[0].fixed),(0,Ze.Z)(et,"".concat(Qt,"-has-fix-right"),ss[ss.length-1]&&ss[ss.length-1].fixed==="right"),et)),style:Kn,id:rr,ref:Cs},Uc),or&&Le.createElement(Ti,{className:"".concat(Qt,"-title")},or(co)),Le.createElement("div",{ref:Bl,className:"".concat(Qt,"-container")},Gd),Vi&&Le.createElement(Ti,{className:"".concat(Qt,"-footer")},Vi(co)));zs&&(lu=Le.createElement(Ft.Z,{onResize:Qg},lu));var jh=In(ss,Wl,yi,rs),Ll=Le.useMemo(function(){return{scrollX:Fl,prefixCls:Qt,getComponent:ta,scrollbarSize:hh,direction:yi,fixedInfoList:jh,isSticky:lc,supportSticky:gh,componentWidth:Qo,fixHeader:$s,fixColumn:$u,horizonScroll:zs,tableLayout:ld,rowClassName:on,expandedRowClassName:Za.expandedRowClassName,expandIcon:el,expandableType:oa,expandRowByClick:Za.expandRowByClick,expandedRowRender:Za.expandedRowRender,onTriggerExpand:hl,expandIconColumnIndex:Za.expandIconColumnIndex,indentSize:Za.indentSize,allColumnsFixedLeft:ss.every(function(cs){return cs.fixed==="left"}),emptyNode:Pu,columns:rs,flattenColumns:ss,onColumnResize:jd,hoverStartRow:Va,hoverEndRow:ws,onHover:as,rowExpandable:Za.rowExpandable,onRow:Xo,getRowKey:Pa,expandedKeys:us,childrenColumnName:Ws}},[Fl,Qt,ta,hh,yi,jh,lc,gh,Qo,$s,$u,zs,ld,on,Za.expandedRowClassName,el,oa,Za.expandRowByClick,Za.expandedRowRender,hl,Za.expandIconColumnIndex,Za.indentSize,Pu,rs,ss,jd,Va,ws,as,Za.rowExpandable,Xo,Pa,us,Ws]);return Le.createElement(Be.Provider,{value:Ll},lu)}function lo(rt){return he(Lr,rt)}var Wr=lo();Wr.EXPAND_COLUMN=le,Wr.INTERNAL_HOOKS=Te,Wr.Column=Qr,Wr.ColumnGroup=Jt,Wr.Summary=Qe;var jr=Wr,fo=me(4409),$n=xt(null),aa=xt(null);function Un(rt,et,Yt){var Qt=et||1;return Yt[rt+Qt]-(Yt[rt]||0)}function Do(rt){var et=rt.rowInfo,Yt=rt.column,Qt=rt.colIndex,yn=rt.indent,on=rt.index,Kn=rt.renderIndex,zn=rt.record,Xn=rt.style,Pi=rt.className,Jn=rt.inverse,yi=rt.getHeight,or=Yt.render,Vi=Yt.dataIndex,Ui=Yt.className,Jr=Yt.width,rr=Ue(aa,["columnsOffset"]),_r=rr.columnsOffset,zr=Yn(et,Yt,Qt,yn,on),mo=zr.key,Xo=zr.fixedInfo,sa=zr.appendCellNode,ro=zr.additionalCellProps,$o=ro.style,ka=ro.colSpan,uo=ka===void 0?1:ka,Oo=ro.rowSpan,co=Oo===void 0?1:Oo,Ir=Qt-1,Fo=Un(Ir,uo,_r),ta=uo>1?Jr-Fo:0,Pa=(0,ht.Z)((0,ht.Z)((0,ht.Z)({},$o),Xn),{},{flex:"0 0 ".concat(Fo,"px"),width:"".concat(Fo,"px"),marginRight:ta,pointerEvents:"auto"}),wa=Le.useMemo(function(){return Jn?co<=1:uo===0||co===0||co>1},[co,uo,Jn]);wa?Pa.visibility="hidden":Jn&&(Pa.height=yi==null?void 0:yi(co));var oo=wa?function(){return null}:or,Ta={};return(co===0||uo===0)&&(Ta.rowSpan=1,Ta.colSpan=1),Le.createElement(_n,(0,bt.Z)({className:ot()(Ui,Pi),ellipsis:Yt.ellipsis,align:Yt.align,scope:Yt.rowScope,component:"div",prefixCls:et.prefixCls,key:mo,record:zn,index:on,renderIndex:Kn,dataIndex:Vi,render:oo,shouldCellUpdate:Yt.shouldCellUpdate},Xo,{appendNode:sa,additionalProps:(0,ht.Z)((0,ht.Z)({},ro),{},{style:Pa},Ta)}))}var Ko=Do,Ji=["data","index","className","rowKey","style","extra","getHeight"],la=Le.forwardRef(function(rt,et){var Yt=rt.data,Qt=rt.index,yn=rt.className,on=rt.rowKey,Kn=rt.style,zn=rt.extra,Xn=rt.getHeight,Pi=(0,be.Z)(rt,Ji),Jn=Yt.record,yi=Yt.indent,or=Yt.index,Vi=Ue(Be,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Ui=Vi.scrollX,Jr=Vi.flattenColumns,rr=Vi.prefixCls,_r=Vi.fixColumn,zr=Vi.componentWidth,mo=hn(Jn,on,Qt,yi),Xo=mo.rowSupportExpand,sa=mo.expanded,ro=mo.rowProps,$o=mo.expandedRowRender,ka=mo.expandedRowClassName,uo;if(Xo&&sa){var Oo=$o(Jn,Qt,yi+1,sa),co=ka==null?void 0:ka(Jn,Qt,yi),Ir={};_r&&(Ir={style:(0,Ze.Z)({},"--virtual-width","".concat(zr,"px"))});var Fo="".concat(rr,"-expanded-row-cell");uo=Le.createElement("div",{className:ot()("".concat(rr,"-expanded-row"),"".concat(rr,"-expanded-row-level-").concat(yi+1),co)},Le.createElement(_n,{component:"div",prefixCls:rr,className:ot()(Fo,(0,Ze.Z)({},"".concat(Fo,"-fixed"),_r)),additionalProps:Ir},Oo))}var ta=(0,ht.Z)((0,ht.Z)({},Kn),{},{width:Ui});zn&&(ta.position="absolute",ta.pointerEvents="none");var Pa=Le.createElement("div",(0,bt.Z)({},ro,Pi,{ref:Xo?null:et,className:ot()(yn,"".concat(rr,"-row"),ro==null?void 0:ro.className,(0,Ze.Z)({},"".concat(rr,"-row-extra"),zn)),style:(0,ht.Z)((0,ht.Z)({},ta),ro==null?void 0:ro.style)}),Jr.map(function(wa,oo){return Le.createElement(Ko,{key:oo,rowInfo:mo,column:wa,colIndex:oo,indent:yi,index:Qt,renderIndex:or,record:Jn,inverse:zn,getHeight:Xn})}));return Xo?Le.createElement("div",{ref:et},Pa,uo):Pa}),Ro=ve(la),Nr=Ro,Ar=Le.forwardRef(function(rt,et){var Yt=rt.data,Qt=rt.onScroll,yn=Ue(Be,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),on=yn.flattenColumns,Kn=yn.onColumnResize,zn=yn.getRowKey,Xn=yn.expandedKeys,Pi=yn.prefixCls,Jn=yn.childrenColumnName,yi=yn.emptyNode,or=yn.scrollX,Vi=Ue($n),Ui=Vi.scrollY,Jr=Vi.listItemHeight,rr=Le.useRef(),_r=qt(Yt,Jn,Xn,zn),zr=Le.useMemo(function(){var uo=0;return on.map(function(Oo){var co=Oo.width,Ir=Oo.key;return uo+=co,[Ir,co,uo]})},[on]),mo=Le.useMemo(function(){return zr.map(function(uo){return uo[2]})},[zr]);Le.useEffect(function(){zr.forEach(function(uo){var Oo=(0,He.Z)(uo,2),co=Oo[0],Ir=Oo[1];Kn(co,Ir)})},[zr]),Le.useImperativeHandle(et,function(){var uo={};return Object.defineProperty(uo,"scrollLeft",{get:function(){var co;return((co=rr.current)===null||co===void 0?void 0:co.getScrollInfo().x)||0},set:function(co){var Ir;(Ir=rr.current)===null||Ir===void 0||Ir.scrollTo({left:co})}}),uo});var Xo=function(Oo,co){var Ir,Fo=(Ir=_r[co])===null||Ir===void 0?void 0:Ir.record,ta=Oo.onCell;if(ta){var Pa,wa=ta(Fo,co);return(Pa=wa==null?void 0:wa.rowSpan)!==null&&Pa!==void 0?Pa:1}return 1},sa=function(Oo){var co=Oo.start,Ir=Oo.end,Fo=Oo.getSize,ta=Oo.offsetY;if(Ir<0)return null;for(var Pa=on.filter(function(ba){return Xo(ba,co)===0}),wa=co,oo=function(ca){if(Pa=Pa.filter(function(Ca){return Xo(Ca,ca)===0}),!Pa.length)return wa=ca,"break"},Ta=co;Ta>=0;Ta-=1){var Va=oo(Ta);if(Va==="break")break}for(var ws=on.filter(function(ba){return Xo(ba,Ir)!==1}),as=Ir,qs=function(ca){if(ws=ws.filter(function(Ca){return Xo(Ca,ca)!==1}),!ws.length)return as=Math.max(ca-1,Ir),"break"},Bs=Ir;Bs<_r.length;Bs+=1){var Za=qs(Bs);if(Za==="break")break}for(var oa=[],us=function(ca){var Ca=_r[ca];if(!Ca)return"continue";on.some(function(Qo){return Xo(Qo,ca)>1})&&oa.push(ca)},el=wa;el<=as;el+=1)var Ws=us(el);var hl=oa.map(function(ba){var ca=_r[ba],Ca=zn(ca.record,ba),Qo=function(Ra){var rs=ba+Ra-1,ss=zn(_r[rs].record,rs),Dl=Fo(Ca,ss);return Dl.bottom-Dl.top},vs=Fo(Ca);return Le.createElement(Nr,{key:ba,data:ca,rowKey:Ca,index:ba,style:{top:-ta+vs.top},extra:!0,getHeight:Qo})});return hl},ro=Le.useMemo(function(){return{columnsOffset:mo}},[mo]),$o="".concat(Pi,"-tbody"),ka;return _r.length?ka=Le.createElement(fo.Z,{fullHeight:!1,ref:rr,className:ot()($o,"".concat($o,"-virtual")),height:Ui,itemHeight:Jr||24,data:_r,itemKey:function(Oo){return zn(Oo.record)},scrollWidth:or,onVirtualScroll:function(Oo){var co=Oo.x;Qt({scrollLeft:co})},extraRender:sa},function(uo,Oo,co){var Ir=zn(uo.record,Oo);return Le.createElement(Nr,(0,bt.Z)({data:uo,rowKey:Ir,index:Oo},co))}):ka=Le.createElement("div",{className:ot()("".concat(Pi,"-placeholder"))},Le.createElement(_n,{component:"div",prefixCls:Pi},yi)),Le.createElement(aa.Provider,{value:ro},ka)}),xo=ve(Ar),Wo=xo,Hi=function(et,Yt){var Qt=Yt.ref,yn=Yt.onScroll;return Le.createElement(Wo,{ref:Qt,data:et,onScroll:yn})},st=100;function _o(rt){var et=rt.columns,Yt=rt.scroll,Qt=rt.prefixCls,yn=Qt===void 0?gi:Qt,on=rt.className,Kn=rt.listItemHeight,zn=Yt||{},Xn=zn.x,Pi=zn.y;typeof Xn!="number"&&(Xn=((et||[]).length+1)*st),typeof Pi!="number"&&(Pi=500);var Jn=Le.useMemo(function(){return{scrollY:Pi,listItemHeight:Kn}},[Pi,Kn]);return Le.createElement($n.Provider,{value:Jn},Le.createElement(jr,(0,bt.Z)({},rt,{className:ot()(on,"".concat(yn,"-virtual")),scroll:(0,ht.Z)((0,ht.Z)({},Yt),{},{x:Xn}),components:{body:Hi},columns:et,internalHooks:Te,tailor:!0})))}function Ia(rt){return he(_o,rt)}var Ma=Ia(),xs=null;function Wa(rt){return null}var Ps=Wa;function Lo(rt){return null}var Po=Lo,Xr=me(2738),ha=me(68031),br=me(36355),Ur=me(93891),wo=me(19716),fi=me(8628),Ba=me(31724),Eo=me(58421),es=me(71418),fa=me(88088);function va(rt){return function(Yt){let{prefixCls:Qt,onExpand:yn,record:on,expanded:Kn,expandable:zn}=Yt;const Xn=`${Qt}-row-expand-icon`;return Le.createElement("button",{type:"button",onClick:Pi=>{yn(on,Pi),Pi.stopPropagation()},className:ot()(Xn,{[`${Xn}-spaced`]:!zn,[`${Xn}-expanded`]:zn&&Kn,[`${Xn}-collapsed`]:zn&&!Kn}),"aria-label":Kn?rt.collapse:rt.expand,"aria-expanded":Kn})}}var $a=va;function ms(rt,et){return"key"in rt&&rt.key!==void 0&&rt.key!==null?rt.key:rt.dataIndex?Array.isArray(rt.dataIndex)?rt.dataIndex.join("."):rt.dataIndex:et}function fs(rt,et){return et?`${et}-${rt}`:`${rt}`}function Rs(rt,et){return typeof rt=="function"?rt(et):rt}function Zs(rt,et){const Yt=Rs(rt,et);return Object.prototype.toString.call(Yt)==="[object Object]"?"":Yt}var Bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},Fs=Bn,Go=me(7657),kl=function(et,Yt){return Le.createElement(Go.Z,(0,bt.Z)({},et,{ref:Yt,icon:Fs}))},_s=Le.forwardRef(kl),sl=_s,yu=me(56762);function Kl(rt){const et=Le.useRef(rt),Yt=(0,yu.Z)();return[()=>et.current,Qt=>{et.current=Qt,Yt()}]}var gs=me(3113),ya=me(24905),dl=me(38854),Vo=me(64165),Ea=me(20834),ua=me(40875),pr=me(5112),ks=me(17574),os=me(47472),ll=me(92832);function zl(rt){let{value:et,onChange:Yt,filterSearch:Qt,tablePrefixCls:yn,locale:on}=rt;return Qt?Le.createElement("div",{className:`${yn}-filter-dropdown-search`},Le.createElement(ll.default,{prefix:Le.createElement(os.Z,null),placeholder:on.filterSearchPlaceholder,onChange:Yt,value:et,htmlSize:1,className:`${yn}-filter-dropdown-search-input`})):null}var ou=zl,Qi=me(10228);const Ss=rt=>{const{keyCode:et}=rt;et===Qi.Z.ENTER&&rt.stopPropagation()};var Vl=Le.forwardRef((rt,et)=>Le.createElement("div",{className:rt.className,onClick:Yt=>Yt.stopPropagation(),onKeyDown:Ss,ref:et},rt.children));function Tl(rt){let et=[];return(rt||[]).forEach(Yt=>{let{value:Qt,children:yn}=Yt;et.push(Qt),yn&&(et=[].concat((0,Ni.Z)(et),(0,Ni.Z)(Tl(yn))))}),et}function Ul(rt){return rt.some(et=>{let{children:Yt}=et;return Yt})}function Io(rt,et){return typeof et=="string"||typeof et=="number"?et==null?void 0:et.toString().toLowerCase().includes(rt.trim().toLowerCase()):!1}function ic(rt){let{filters:et,prefixCls:Yt,filteredKeys:Qt,filterMultiple:yn,searchValue:on,filterSearch:Kn}=rt;return et.map((zn,Xn)=>{const Pi=String(zn.value);if(zn.children)return{key:Pi||Xn,label:zn.text,popupClassName:`${Yt}-dropdown-submenu`,children:ic({filters:zn.children,prefixCls:Yt,filteredKeys:Qt,filterMultiple:yn,searchValue:on,filterSearch:Kn})};const Jn=yn?ya.default:pr.ZP,yi={key:zn.value!==void 0?Pi:Xn,label:Le.createElement(Le.Fragment,null,Le.createElement(Jn,{checked:Qt.includes(Pi)}),Le.createElement("span",null,zn.text))};return on.trim()?typeof Kn=="function"?Kn(on,zn)?yi:null:Io(on,zn.text)?yi:null:yi})}function Zl(rt){var et,Yt;const{tablePrefixCls:Qt,prefixCls:yn,column:on,dropdownPrefixCls:Kn,columnKey:zn,filterMultiple:Xn,filterMode:Pi="menu",filterSearch:Jn=!1,filterState:yi,triggerFilter:or,locale:Vi,children:Ui,getPopupContainer:Jr}=rt,{filterDropdownOpen:rr,onFilterDropdownOpenChange:_r,filterResetToDefaultFilteredValue:zr,defaultFilteredValue:mo,filterDropdownVisible:Xo,onFilterDropdownVisibleChange:sa}=on,[ro,$o]=Le.useState(!1),ka=!!(yi&&(!((et=yi.filteredKeys)===null||et===void 0)&&et.length||yi.forceFiltered)),uo=Jo=>{$o(Jo),_r==null||_r(Jo),sa==null||sa(Jo)},Oo=(Yt=rr!=null?rr:Xo)!==null&&Yt!==void 0?Yt:ro,co=yi==null?void 0:yi.filteredKeys,[Ir,Fo]=Kl(co||[]),ta=Jo=>{let{selectedKeys:Ra}=Jo;Fo(Ra)},Pa=(Jo,Ra)=>{let{node:rs,checked:ss}=Ra;ta(Xn?{selectedKeys:Jo}:{selectedKeys:ss&&rs.key?[rs.key]:[]})};Le.useEffect(()=>{ro&&ta({selectedKeys:co||[]})},[co]);const[wa,oo]=Le.useState([]),Ta=Jo=>{oo(Jo)},[Va,ws]=Le.useState(""),as=Jo=>{const{value:Ra}=Jo.target;ws(Ra)};Le.useEffect(()=>{ro||ws("")},[ro]);const qs=Jo=>{const Ra=Jo&&Jo.length?Jo:null;if(Ra===null&&(!yi||!yi.filteredKeys)||(0,Ve.Z)(Ra,yi==null?void 0:yi.filteredKeys,!0))return null;or({column:on,key:zn,filteredKeys:Ra})},Bs=()=>{uo(!1),qs(Ir())},Za=function(){let{confirm:Jo,closeDropdown:Ra}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Jo&&qs([]),Ra&&uo(!1),ws(""),Fo(zr?(mo||[]).map(rs=>String(rs)):[])},oa=function(){let{closeDropdown:Jo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Jo&&uo(!1),qs(Ir())},us=Jo=>{Jo&&co!==void 0&&Fo(co||[]),uo(Jo),!Jo&&!on.filterDropdown&&Bs()},el=ot()({[`${Kn}-menu-without-submenu`]:!Ul(on.filters||[])}),Ws=Jo=>{if(Jo.target.checked){const Ra=Tl(on==null?void 0:on.filters).map(rs=>String(rs));Fo(Ra)}else Fo([])},hl=Jo=>{let{filters:Ra}=Jo;return(Ra||[]).map((rs,ss)=>{const Dl=String(rs.value),Fl={title:rs.text,key:rs.value!==void 0?Dl:ss};return rs.children&&(Fl.children=hl({filters:rs.children})),Fl})},ba=Jo=>{var Ra;return Object.assign(Object.assign({},Jo),{text:Jo.title,value:Jo.key,children:((Ra=Jo.children)===null||Ra===void 0?void 0:Ra.map(rs=>ba(rs)))||[]})};let ca;if(typeof on.filterDropdown=="function")ca=on.filterDropdown({prefixCls:`${Kn}-custom`,setSelectedKeys:Jo=>ta({selectedKeys:Jo}),selectedKeys:Ir(),confirm:oa,clearFilters:Za,filters:on.filters,visible:Oo,close:()=>{uo(!1)}});else if(on.filterDropdown)ca=on.filterDropdown;else{const Jo=Ir()||[],Ra=()=>(on.filters||[]).length===0?Le.createElement(Vo.Z,{image:Vo.Z.PRESENTED_IMAGE_SIMPLE,description:Vi.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Pi==="tree"?Le.createElement(Le.Fragment,null,Le.createElement(ou,{filterSearch:Jn,value:Va,onChange:as,tablePrefixCls:Qt,locale:Vi}),Le.createElement("div",{className:`${Qt}-filter-dropdown-tree`},Xn?Le.createElement(ya.default,{checked:Jo.length===Tl(on.filters).length,indeterminate:Jo.length>0&&Jo.length<Tl(on.filters).length,className:`${Qt}-filter-dropdown-checkall`,onChange:Ws},Vi.filterCheckall):null,Le.createElement(ks.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Xn,checkStrictly:!Xn,className:`${Kn}-menu`,onCheck:Pa,checkedKeys:Jo,selectedKeys:Jo,showIcon:!1,treeData:hl({filters:on.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Va.trim()?ss=>typeof Jn=="function"?Jn(Va,ba(ss)):Io(Va,ss.title):void 0}))):Le.createElement(Le.Fragment,null,Le.createElement(ou,{filterSearch:Jn,value:Va,onChange:as,tablePrefixCls:Qt,locale:Vi}),Le.createElement(Ea.default,{selectable:!0,multiple:Xn,prefixCls:`${Kn}-menu`,className:el,onSelect:ta,onDeselect:ta,selectedKeys:Jo,getPopupContainer:Jr,openKeys:wa,onOpenChange:Ta,items:ic({filters:on.filters||[],filterSearch:Jn,prefixCls:yn,filteredKeys:Ir(),filterMultiple:Xn,searchValue:Va})})),rs=()=>zr?(0,Ve.Z)((mo||[]).map(ss=>String(ss)),Jo,!0):Jo.length===0;ca=Le.createElement(Le.Fragment,null,Ra(),Le.createElement("div",{className:`${yn}-dropdown-btns`},Le.createElement(gs.ZP,{type:"link",size:"small",disabled:rs(),onClick:()=>Za()},Vi.filterReset),Le.createElement(gs.ZP,{type:"primary",size:"small",onClick:Bs},Vi.filterConfirm)))}on.filterDropdown&&(ca=Le.createElement(ua.J,{selectable:void 0},ca));const Ca=()=>Le.createElement(Vl,{className:`${yn}-dropdown`},ca);let Qo;typeof on.filterIcon=="function"?Qo=on.filterIcon(ka):on.filterIcon?Qo=on.filterIcon:Qo=Le.createElement(sl,null);const{direction:vs}=Le.useContext(br.E_);return Le.createElement("div",{className:`${yn}-column`},Le.createElement("span",{className:`${Qt}-column-title`},Ui),Le.createElement(dl.Z,{dropdownRender:Ca,trigger:["click"],open:Oo,onOpenChange:us,getPopupContainer:Jr,placement:vs==="rtl"?"bottomLeft":"bottomRight"},Le.createElement("span",{role:"button",tabIndex:-1,className:ot()(`${yn}-trigger`,{active:ka}),onClick:Jo=>{Jo.stopPropagation()}},Qo)))}var En=Zl;function Nn(rt,et,Yt){let Qt=[];return(rt||[]).forEach((yn,on)=>{var Kn;const zn=fs(on,Yt);if(yn.filters||"filterDropdown"in yn||"onFilter"in yn)if("filteredValue"in yn){let Xn=yn.filteredValue;"filterDropdown"in yn||(Xn=(Kn=Xn==null?void 0:Xn.map(String))!==null&&Kn!==void 0?Kn:Xn),Qt.push({column:yn,key:ms(yn,zn),filteredKeys:Xn,forceFiltered:yn.filtered})}else Qt.push({column:yn,key:ms(yn,zn),filteredKeys:et&&yn.defaultFilteredValue?yn.defaultFilteredValue:void 0,forceFiltered:yn.filtered});"children"in yn&&(Qt=[].concat((0,Ni.Z)(Qt),(0,Ni.Z)(Nn(yn.children,et,zn))))}),Qt}function ri(rt,et,Yt,Qt,yn,on,Kn,zn){return Yt.map((Xn,Pi)=>{const Jn=fs(Pi,zn),{filterMultiple:yi=!0,filterMode:or,filterSearch:Vi}=Xn;let Ui=Xn;if(Ui.filters||Ui.filterDropdown){const Jr=ms(Ui,Jn),rr=Qt.find(_r=>{let{key:zr}=_r;return Jr===zr});Ui=Object.assign(Object.assign({},Ui),{title:_r=>Le.createElement(En,{tablePrefixCls:rt,prefixCls:`${rt}-filter`,dropdownPrefixCls:et,column:Ui,columnKey:Jr,filterState:rr,filterMultiple:yi,filterMode:or,filterSearch:Vi,triggerFilter:on,locale:yn,getPopupContainer:Kn},Rs(Xn.title,_r))})}return"children"in Ui&&(Ui=Object.assign(Object.assign({},Ui),{children:ri(rt,et,Ui.children,Qt,yn,on,Kn,Jn)})),Ui})}function qi(rt){const et={};return rt.forEach(Yt=>{let{key:Qt,filteredKeys:yn,column:on}=Yt;const{filters:Kn,filterDropdown:zn}=on;if(zn)et[Qt]=yn||null;else if(Array.isArray(yn)){const Xn=Tl(Kn);et[Qt]=Xn.filter(Pi=>yn.includes(String(Pi)))}else et[Qt]=null}),et}function $i(rt,et){return et.reduce((Yt,Qt)=>{const{column:{onFilter:yn,filters:on},filteredKeys:Kn}=Qt;return yn&&Kn&&Kn.length?Yt.filter(zn=>Kn.some(Xn=>{const Pi=Tl(on),Jn=Pi.findIndex(or=>String(or)===String(Xn)),yi=Jn!==-1?Pi[Jn]:Xn;return yn(yi,zn)})):Yt},rt)}const ki=rt=>rt.flatMap(et=>"children"in et?[et].concat((0,Ni.Z)(ki(et.children||[]))):[et]);function Ri(rt){let{prefixCls:et,dropdownPrefixCls:Yt,mergedColumns:Qt,onFilterChange:yn,getPopupContainer:on,locale:Kn}=rt;const zn=Le.useMemo(()=>ki(Qt||[]),[Qt]),[Xn,Pi]=Le.useState(()=>Nn(zn,!0)),Jn=Le.useMemo(()=>{const Ui=Nn(zn,!1);if(Ui.length===0)return Ui;let Jr=!0,rr=!0;if(Ui.forEach(_r=>{let{filteredKeys:zr}=_r;zr!==void 0?Jr=!1:rr=!1}),Jr){const _r=(zn||[]).map((zr,mo)=>ms(zr,fs(mo)));return Xn.filter(zr=>{let{key:mo}=zr;return _r.includes(mo)}).map(zr=>{const mo=zn[_r.findIndex(Xo=>Xo===zr.key)];return Object.assign(Object.assign({},zr),{column:Object.assign(Object.assign({},zr.column),mo),forceFiltered:mo.filtered})})}return Ui},[zn,Xn]),yi=Le.useMemo(()=>qi(Jn),[Jn]),or=Ui=>{const Jr=Jn.filter(rr=>{let{key:_r}=rr;return _r!==Ui.key});Jr.push(Ui),Pi(Jr),yn(qi(Jr),Jr)};return[Ui=>ri(et,Yt,Ui,Jn,Kn,or,on),Jn,yi]}var ii=Ri;function Li(rt,et,Yt){const Qt=Le.useRef({});function yn(on){if(!Qt.current||Qt.current.data!==rt||Qt.current.childrenColumnName!==et||Qt.current.getRowKey!==Yt){let zn=function(Xn){Xn.forEach((Pi,Jn)=>{const yi=Yt(Pi,Jn);Kn.set(yi,Pi),Pi&&typeof Pi=="object"&&et in Pi&&zn(Pi[et]||[])})};const Kn=new Map;zn(rt),Qt.current={data:rt,childrenColumnName:et,kvMap:Kn,getRowKey:Yt}}return Qt.current.kvMap.get(on)}return[yn]}var ur=me(50371),Zr=function(rt,et){var Yt={};for(var Qt in rt)Object.prototype.hasOwnProperty.call(rt,Qt)&&et.indexOf(Qt)<0&&(Yt[Qt]=rt[Qt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var yn=0,Qt=Object.getOwnPropertySymbols(rt);yn<Qt.length;yn++)et.indexOf(Qt[yn])<0&&Object.prototype.propertyIsEnumerable.call(rt,Qt[yn])&&(Yt[Qt[yn]]=rt[Qt[yn]]);return Yt};const ga=10;function Uo(rt,et){const Yt={current:rt.current,pageSize:rt.pageSize};return Object.keys(et&&typeof et=="object"?et:{}).forEach(yn=>{const on=rt[yn];typeof on!="function"&&(Yt[yn]=on)}),Yt}function Ua(rt,et,Yt){const Qt=Yt&&typeof Yt=="object"?Yt:{},{total:yn=0}=Qt,on=Zr(Qt,["total"]),[Kn,zn]=(0,Le.useState)(()=>({current:"defaultCurrent"in on?on.defaultCurrent:1,pageSize:"defaultPageSize"in on?on.defaultPageSize:ga})),Xn=(0,ur.Z)(Kn,on,{total:yn>0?yn:rt}),Pi=Math.ceil((yn||rt)/Xn.pageSize);Xn.current>Pi&&(Xn.current=Pi||1);const Jn=(or,Vi)=>{zn({current:or!=null?or:1,pageSize:Vi||Xn.pageSize})},yi=(or,Vi)=>{var Ui;Yt&&((Ui=Yt.onChange)===null||Ui===void 0||Ui.call(Yt,or,Vi)),Jn(or,Vi),et(or,Vi||(Xn==null?void 0:Xn.pageSize))};return Yt===!1?[{},()=>{}]:[Object.assign(Object.assign({},Xn),{onChange:yi}),Jn]}var Ka=Ua,No=me(84105),qr=me(35654),Bi=me(90782),eo=me(71430),Yo=me(18929);const ma={},xa="SELECT_ALL",bo="SELECT_INVERT",ra="SELECT_NONE",Ao=[],Or=(rt,et)=>{let Yt=[];return(et||[]).forEach(Qt=>{Yt.push(Qt),Qt&&typeof Qt=="object"&&rt in Qt&&(Yt=[].concat((0,Ni.Z)(Yt),(0,Ni.Z)(Or(rt,Qt[rt]))))}),Yt};var Ha=(rt,et)=>{const{preserveSelectedRowKeys:Yt,selectedRowKeys:Qt,defaultSelectedRowKeys:yn,getCheckboxProps:on,onChange:Kn,onSelect:zn,onSelectAll:Xn,onSelectInvert:Pi,onSelectNone:Jn,onSelectMultiple:yi,columnWidth:or,type:Vi,selections:Ui,fixed:Jr,renderCell:rr,hideSelectAll:_r,checkStrictly:zr=!0}=et||{},{prefixCls:mo,data:Xo,pageData:sa,getRecordByKey:ro,getRowKey:$o,expandType:ka,childrenColumnName:uo,locale:Oo,getPopupContainer:co}=rt,[Ir,Fo]=(0,Yo.Z)(Qt||yn||Ao,{value:Qt}),ta=Le.useRef(new Map),Pa=(0,Le.useCallback)(ba=>{if(Yt){const ca=new Map;ba.forEach(Ca=>{let Qo=ro(Ca);!Qo&&ta.current.has(Ca)&&(Qo=ta.current.get(Ca)),ca.set(Ca,Qo)}),ta.current=ca}},[ro,Yt]);Le.useEffect(()=>{Pa(Ir)},[Ir]);const{keyEntities:wa}=(0,Le.useMemo)(()=>{if(zr)return{keyEntities:null};let ba=Xo;if(Yt){const ca=new Set(Xo.map((Qo,vs)=>$o(Qo,vs))),Ca=Array.from(ta.current).reduce((Qo,vs)=>{let[Jo,Ra]=vs;return ca.has(Jo)?Qo:Qo.concat(Ra)},[]);ba=[].concat((0,Ni.Z)(ba),(0,Ni.Z)(Ca))}return(0,eo.I8)(ba,{externalGetKey:$o,childrenPropName:uo})},[Xo,$o,zr,uo,Yt]),oo=(0,Le.useMemo)(()=>Or(uo,sa),[uo,sa]),Ta=(0,Le.useMemo)(()=>{const ba=new Map;return oo.forEach((ca,Ca)=>{const Qo=$o(ca,Ca),vs=(on?on(ca):null)||{};ba.set(Qo,vs)}),ba},[oo,$o,on]),Va=(0,Le.useCallback)(ba=>{var ca;return!!(!((ca=Ta.get($o(ba)))===null||ca===void 0)&&ca.disabled)},[Ta,$o]),[ws,as]=(0,Le.useMemo)(()=>{if(zr)return[Ir||[],[]];const{checkedKeys:ba,halfCheckedKeys:ca}=(0,Bi.S)(Ir,!0,wa,Va);return[ba||[],ca]},[Ir,zr,wa,Va]),qs=(0,Le.useMemo)(()=>{const ba=Vi==="radio"?ws.slice(0,1):ws;return new Set(ba)},[ws,Vi]),Bs=(0,Le.useMemo)(()=>Vi==="radio"?new Set:new Set(as),[as,Vi]),[Za,oa]=(0,Le.useState)(null);Le.useEffect(()=>{et||Fo(Ao)},[!!et]);const us=(0,Le.useCallback)((ba,ca)=>{let Ca,Qo;Pa(ba),Yt?(Ca=ba,Qo=ba.map(vs=>ta.current.get(vs))):(Ca=[],Qo=[],ba.forEach(vs=>{const Jo=ro(vs);Jo!==void 0&&(Ca.push(vs),Qo.push(Jo))})),Fo(Ca),Kn==null||Kn(Ca,Qo,{type:ca})},[Fo,ro,Kn,Yt]),el=(0,Le.useCallback)((ba,ca,Ca,Qo)=>{if(zn){const vs=Ca.map(Jo=>ro(Jo));zn(ro(ba),ca,vs,Qo)}us(Ca,"single")},[zn,ro,us]),Ws=(0,Le.useMemo)(()=>!Ui||_r?null:(Ui===!0?[xa,bo,ra]:Ui).map(ca=>ca===xa?{key:"all",text:Oo.selectionAll,onSelect(){us(Xo.map((Ca,Qo)=>$o(Ca,Qo)).filter(Ca=>{const Qo=Ta.get(Ca);return!(Qo!=null&&Qo.disabled)||qs.has(Ca)}),"all")}}:ca===bo?{key:"invert",text:Oo.selectInvert,onSelect(){const Ca=new Set(qs);sa.forEach((vs,Jo)=>{const Ra=$o(vs,Jo),rs=Ta.get(Ra);rs!=null&&rs.disabled||(Ca.has(Ra)?Ca.delete(Ra):Ca.add(Ra))});const Qo=Array.from(Ca);Pi&&Pi(Qo),us(Qo,"invert")}}:ca===ra?{key:"none",text:Oo.selectNone,onSelect(){Jn==null||Jn(),us(Array.from(qs).filter(Ca=>{const Qo=Ta.get(Ca);return Qo==null?void 0:Qo.disabled}),"none")}}:ca).map(ca=>Object.assign(Object.assign({},ca),{onSelect:function(){for(var Ca,Qo,vs=arguments.length,Jo=new Array(vs),Ra=0;Ra<vs;Ra++)Jo[Ra]=arguments[Ra];(Qo=ca.onSelect)===null||Qo===void 0||(Ca=Qo).call.apply(Ca,[ca].concat(Jo)),oa(null)}})),[Ui,qs,sa,$o,Pi,us]);return[(0,Le.useCallback)(ba=>{var ca;if(!et)return ba.filter(Es=>Es!==ma);let Ca=(0,Ni.Z)(ba);const Qo=new Set(qs),vs=oo.map($o).filter(Es=>!Ta.get(Es).disabled),Jo=vs.every(Es=>Qo.has(Es)),Ra=vs.some(Es=>Qo.has(Es)),rs=()=>{const Es=[];Jo?vs.forEach(bs=>{Qo.delete(bs),Es.push(bs)}):vs.forEach(bs=>{Qo.has(bs)||(Qo.add(bs),Es.push(bs))});const Is=Array.from(Qo);Xn==null||Xn(!Jo,Is.map(bs=>ro(bs)),Es.map(bs=>ro(bs))),us(Is,"all"),oa(null)};let ss;if(Vi!=="radio"){let Es;if(Ws){const ts={getPopupContainer:co,items:Ws.map((js,Il)=>{const{key:Xl,text:Gu,onSelect:Du}=js;return{key:Xl!=null?Xl:Il,onClick:()=>{Du==null||Du(vs)},label:Gu}})};Es=Le.createElement("div",{className:`${mo}-selection-extra`},Le.createElement(dl.Z,{menu:ts,getPopupContainer:co},Le.createElement("span",null,Le.createElement(No.Z,null))))}const Is=oo.map((ts,js)=>{const Il=$o(ts,js),Xl=Ta.get(Il)||{};return Object.assign({checked:Qo.has(Il)},Xl)}).filter(ts=>{let{disabled:js}=ts;return js}),bs=!!Is.length&&Is.length===oo.length,Gs=bs&&Is.every(ts=>{let{checked:js}=ts;return js}),ml=bs&&Is.some(ts=>{let{checked:js}=ts;return js});ss=!_r&&Le.createElement("div",{className:`${mo}-selection`},Le.createElement(ya.default,{checked:bs?Gs:!!oo.length&&Jo,indeterminate:bs?!Gs&&ml:!Jo&&Ra,onChange:rs,disabled:oo.length===0||bs,"aria-label":Es?"Custom selection":"Select all",skipGroup:!0}),Es)}let Dl;Vi==="radio"?Dl=(Es,Is,bs)=>{const Gs=$o(Is,bs),ml=Qo.has(Gs);return{node:Le.createElement(pr.ZP,Object.assign({},Ta.get(Gs),{checked:ml,onClick:ts=>ts.stopPropagation(),onChange:ts=>{Qo.has(Gs)||el(Gs,!0,[Gs],ts.nativeEvent)}})),checked:ml}}:Dl=(Es,Is,bs)=>{var Gs;const ml=$o(Is,bs),ts=Qo.has(ml),js=Bs.has(ml),Il=Ta.get(ml);let Xl;return ka==="nest"?Xl=js:Xl=(Gs=Il==null?void 0:Il.indeterminate)!==null&&Gs!==void 0?Gs:js,{node:Le.createElement(ya.default,Object.assign({},Il,{indeterminate:Xl,checked:ts,skipGroup:!0,onClick:Gu=>Gu.stopPropagation(),onChange:Gu=>{let{nativeEvent:Du}=Gu;const{shiftKey:vl}=Du;let Iu=-1,Ou=-1;if(vl&&zr){const Ms=new Set([Za,ml]);vs.some((Wl,$s)=>{if(Ms.has(Wl))if(Iu===-1)Iu=$s;else return Ou=$s,!0;return!1})}if(Ou!==-1&&Iu!==Ou&&zr){const Ms=vs.slice(Iu,Ou+1),Wl=[];ts?Ms.forEach(zs=>{Qo.has(zs)&&(Wl.push(zs),Qo.delete(zs))}):Ms.forEach(zs=>{Qo.has(zs)||(Wl.push(zs),Qo.add(zs))});const $s=Array.from(Qo);yi==null||yi(!ts,$s.map(zs=>ro(zs)),Wl.map(zs=>ro(zs))),us($s,"multiple")}else{const Ms=ws;if(zr){const Wl=ts?(0,qr._5)(Ms,ml):(0,qr.L0)(Ms,ml);el(ml,!ts,Wl,Du)}else{const Wl=(0,Bi.S)([].concat((0,Ni.Z)(Ms),[ml]),!0,wa,Va),{checkedKeys:$s,halfCheckedKeys:zs}=Wl;let $u=$s;if(ts){const Vc=new Set($s);Vc.delete(ml),$u=(0,Bi.S)(Array.from(Vc),{checked:!1,halfCheckedKeys:zs},wa,Va).checkedKeys}el(ml,!ts,$u,Du)}}oa(ts?null:ml)}})),checked:ts}};const Fl=(Es,Is,bs)=>{const{node:Gs,checked:ml}=Dl(Es,Is,bs);return rr?rr(ml,Is,bs,Gs):Gs};if(!Ca.includes(ma))if(Ca.findIndex(Es=>{var Is;return((Is=Es[Mr])===null||Is===void 0?void 0:Is.columnType)==="EXPAND_COLUMN"})===0){const[Es,...Is]=Ca;Ca=[Es,ma].concat((0,Ni.Z)(Is))}else Ca=[ma].concat((0,Ni.Z)(Ca));const Yl=Ca.indexOf(ma);Ca=Ca.filter((Es,Is)=>Es!==ma||Is===Yl);const Cs=Ca[Yl-1],Hl=Ca[Yl+1];let fl=Jr;fl===void 0&&((Hl==null?void 0:Hl.fixed)!==void 0?fl=Hl.fixed:(Cs==null?void 0:Cs.fixed)!==void 0&&(fl=Cs.fixed)),fl&&Cs&&((ca=Cs[Mr])===null||ca===void 0?void 0:ca.columnType)==="EXPAND_COLUMN"&&Cs.fixed===void 0&&(Cs.fixed=fl);const Bl=ot()(`${mo}-selection-col`,{[`${mo}-selection-col-with-dropdown`]:Ui&&Vi==="checkbox"}),_c={fixed:fl,width:or,className:`${mo}-selection-column`,title:et.columnTitle||ss,render:Fl,onCell:et.onCell,[Mr]:{className:Bl}};return Ca.map(Es=>Es===ma?_c:Es)},[$o,oo,et,ws,qs,Bs,or,Ws,ka,Za,Ta,yi,el,Va]),qs]},La=me(89489),gl=me(59477),xu=me(6848);const en="ascend",Xt="descend";function On(rt){return typeof rt.sorter=="object"&&typeof rt.sorter.multiple=="number"?rt.sorter.multiple:!1}function tt(rt){return typeof rt=="function"?rt:rt&&typeof rt=="object"&&rt.compare?rt.compare:!1}function nn(rt,et){return et?rt[rt.indexOf(et)+1]:rt[0]}function sr(rt,et,Yt){let Qt=[];function yn(on,Kn){Qt.push({column:on,key:ms(on,Kn),multiplePriority:On(on),sortOrder:on.sortOrder})}return(rt||[]).forEach((on,Kn)=>{const zn=fs(Kn,Yt);on.children?("sortOrder"in on&&yn(on,zn),Qt=[].concat((0,Ni.Z)(Qt),(0,Ni.Z)(sr(on.children,et,zn)))):on.sorter&&("sortOrder"in on?yn(on,zn):et&&on.defaultSortOrder&&Qt.push({column:on,key:ms(on,zn),multiplePriority:On(on),sortOrder:on.defaultSortOrder}))}),Qt}function kr(rt,et,Yt,Qt,yn,on,Kn,zn){return(et||[]).map((Xn,Pi)=>{const Jn=fs(Pi,zn);let yi=Xn;if(yi.sorter){const or=yi.sortDirections||yn,Vi=yi.showSorterTooltip===void 0?Kn:yi.showSorterTooltip,Ui=ms(yi,Jn),Jr=Yt.find(ka=>{let{key:uo}=ka;return uo===Ui}),rr=Jr?Jr.sortOrder:null,_r=nn(or,rr);let zr;if(Xn.sortIcon)zr=Xn.sortIcon({sortOrder:rr});else{const ka=or.includes(en)&&Le.createElement(gl.Z,{className:ot()(`${rt}-column-sorter-up`,{active:rr===en})}),uo=or.includes(Xt)&&Le.createElement(La.Z,{className:ot()(`${rt}-column-sorter-down`,{active:rr===Xt})});zr=Le.createElement("span",{className:ot()(`${rt}-column-sorter`,{[`${rt}-column-sorter-full`]:!!(ka&&uo)})},Le.createElement("span",{className:`${rt}-column-sorter-inner`,"aria-hidden":"true"},ka,uo))}const{cancelSort:mo,triggerAsc:Xo,triggerDesc:sa}=on||{};let ro=mo;_r===Xt?ro=sa:_r===en&&(ro=Xo);const $o=typeof Vi=="object"?Vi:{title:ro};yi=Object.assign(Object.assign({},yi),{className:ot()(yi.className,{[`${rt}-column-sort`]:rr}),title:ka=>{const uo=Le.createElement("div",{className:`${rt}-column-sorters`},Le.createElement("span",{className:`${rt}-column-title`},Rs(Xn.title,ka)),zr);return Vi?Le.createElement(xu.Z,Object.assign({},$o),uo):uo},onHeaderCell:ka=>{const uo=Xn.onHeaderCell&&Xn.onHeaderCell(ka)||{},Oo=uo.onClick,co=uo.onKeyDown;uo.onClick=ta=>{Qt({column:Xn,key:Ui,sortOrder:_r,multiplePriority:On(Xn)}),Oo==null||Oo(ta)},uo.onKeyDown=ta=>{ta.keyCode===Qi.Z.ENTER&&(Qt({column:Xn,key:Ui,sortOrder:_r,multiplePriority:On(Xn)}),co==null||co(ta))};const Ir=Zs(Xn.title,{}),Fo=Ir==null?void 0:Ir.toString();return rr?uo["aria-sort"]=rr==="ascend"?"ascending":"descending":uo["aria-label"]=Fo||"",uo.className=ot()(uo.className,`${rt}-column-has-sorters`),uo.tabIndex=0,Xn.ellipsis&&(uo.title=(Ir!=null?Ir:"").toString()),uo}})}return"children"in yi&&(yi=Object.assign(Object.assign({},yi),{children:kr(rt,yi.children,Yt,Qt,yn,on,Kn,Jn)})),yi})}function yr(rt){const{column:et,sortOrder:Yt}=rt;return{column:et,order:Yt,field:et.dataIndex,columnKey:et.key}}function lr(rt){const et=rt.filter(Yt=>{let{sortOrder:Qt}=Yt;return Qt}).map(yr);return et.length===0&&rt.length?Object.assign(Object.assign({},yr(rt[rt.length-1])),{column:void 0}):et.length<=1?et[0]||{}:et}function Mi(rt,et,Yt){const Qt=et.slice().sort((Kn,zn)=>zn.multiplePriority-Kn.multiplePriority),yn=rt.slice(),on=Qt.filter(Kn=>{let{column:{sorter:zn},sortOrder:Xn}=Kn;return tt(zn)&&Xn});return on.length?yn.sort((Kn,zn)=>{for(let Xn=0;Xn<on.length;Xn+=1){const Pi=on[Xn],{column:{sorter:Jn},sortOrder:yi}=Pi,or=tt(Jn);if(or&&yi){const Vi=or(Kn,zn,yi);if(Vi!==0)return yi===en?Vi:-Vi}}return 0}).map(Kn=>{const zn=Kn[Yt];return zn?Object.assign(Object.assign({},Kn),{[Yt]:Mi(zn,et,Yt)}):Kn}):yn}function wr(rt){let{prefixCls:et,mergedColumns:Yt,onSorterChange:Qt,sortDirections:yn,tableLocale:on,showSorterTooltip:Kn}=rt;const[zn,Xn]=Le.useState(sr(Yt,!0)),Pi=Le.useMemo(()=>{let Ui=!0;const Jr=sr(Yt,!1);if(!Jr.length)return zn;const rr=[];function _r(mo){Ui?rr.push(mo):rr.push(Object.assign(Object.assign({},mo),{sortOrder:null}))}let zr=null;return Jr.forEach(mo=>{zr===null?(_r(mo),mo.sortOrder&&(mo.multiplePriority===!1?Ui=!1:zr=!0)):(zr&&mo.multiplePriority!==!1||(Ui=!1),_r(mo))}),rr},[Yt,zn]),Jn=Le.useMemo(()=>{const Ui=Pi.map(Jr=>{let{column:rr,sortOrder:_r}=Jr;return{column:rr,order:_r}});return{sortColumns:Ui,sortColumn:Ui[0]&&Ui[0].column,sortOrder:Ui[0]&&Ui[0].order}},[Pi]);function yi(Ui){let Jr;Ui.multiplePriority===!1||!Pi.length||Pi[0].multiplePriority===!1?Jr=[Ui]:Jr=[].concat((0,Ni.Z)(Pi.filter(rr=>{let{key:_r}=rr;return _r!==Ui.key})),[Ui]),Xn(Jr),Qt(lr(Jr),Jr)}return[Ui=>kr(et,Ui,Pi,yi,yn,on,Kn),Pi,Jn,()=>lr(Pi)]}function to(rt,et){return rt.map(Yt=>{const Qt=Object.assign({},Yt);return Qt.title=Rs(Yt.title,et),"children"in Qt&&(Qt.children=to(Qt.children,et)),Qt})}function yo(rt){return[Le.useCallback(Yt=>to(Yt,rt),[rt])]}var fr=lo((rt,et)=>{const{_renderTimes:Yt}=rt,{_renderTimes:Qt}=et;return Yt!==Qt}),vr=Ia((rt,et)=>{const{_renderTimes:Yt}=rt,{_renderTimes:Qt}=et;return Yt!==Qt}),xr=me(64993),_i=me(17313),Ii=me(83116),Gr=me(37613),Fr=rt=>{const{componentCls:et}=rt,Yt=`${rt.lineWidth}px ${rt.lineType} ${rt.tableBorderColor}`,Qt=(yn,on,Kn)=>({[`&${et}-${yn}`]:{[`> ${et}-container`]:{[`> ${et}-content, > ${et}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${et}-expanded-row-fixed`]:{margin:`-${on}px -${Kn+rt.lineWidth}px`}}}}}});return{[`${et}-wrapper`]:{[`${et}${et}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${et}-title`]:{border:Yt,borderBottom:0},[`> ${et}-container`]:{borderInlineStart:Yt,borderTop:Yt,[`
|
|
|
> ${et}-content,
|
|
|
> ${et}-header,
|
|
|
> ${et}-body,
|
|
|
> ${et}-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:Yt},"> thead":{"> tr:not(:last-child) > th":{borderBottom:Yt},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${et}-cell-fix-right-first::after`]:{borderInlineEnd:Yt}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${et}-expanded-row-fixed`]:{margin:`-${rt.tablePaddingVertical}px -${rt.tablePaddingHorizontal+rt.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:rt.lineWidth,bottom:0,borderInlineEnd:Yt,content:'""'}}}}}},[`&${et}-scroll-horizontal`]:{[`> ${et}-container > ${et}-body`]:{"> table > tbody":{[`
|
|
|
> tr${et}-expanded-row,
|
|
|
> tr${et}-placeholder
|
|
|
`]:{"> th, > td":{borderInlineEnd:0}}}}}},Qt("middle",rt.tablePaddingVerticalMiddle,rt.tablePaddingHorizontalMiddle)),Qt("small",rt.tablePaddingVerticalSmall,rt.tablePaddingHorizontalSmall)),{[`> ${et}-footer`]:{border:Yt,borderTop:0}}),[`${et}-cell`]:{[`${et}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${rt.lineWidth}px 0 ${rt.lineWidth}px ${rt.tableHeaderBg}`}},[`${et}-bordered ${et}-cell-scrollbar`]:{borderInlineEnd:Yt}}}},Tr=rt=>{const{componentCls:et}=rt;return{[`${et}-wrapper`]:{[`${et}-cell-ellipsis`]:Object.assign(Object.assign({},_i.vS),{wordBreak:"keep-all",[`
|
|
|
&${et}-cell-fix-left-last,
|
|
|
&${et}-cell-fix-right-first
|
|
|
`]:{overflow:"visible",[`${et}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${et}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},gr=rt=>{const{componentCls:et}=rt;return{[`${et}-wrapper`]:{[`${et}-tbody > tr${et}-placeholder`]:{textAlign:"center",color:rt.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:rt.colorBgContainer}}}}},Na=me(15969),Sa=rt=>{const{componentCls:et,antCls:Yt,controlInteractiveSize:Qt,motionDurationSlow:yn,lineWidth:on,paddingXS:Kn,lineType:zn,tableBorderColor:Xn,tableExpandIconBg:Pi,tableExpandColumnWidth:Jn,borderRadius:yi,fontSize:or,fontSizeSM:Vi,lineHeight:Ui,tablePaddingVertical:Jr,tablePaddingHorizontal:rr,tableExpandedRowBg:_r,paddingXXS:zr}=rt,mo=Qt/2-on,Xo=mo*2+on*3,sa=`${on}px ${zn} ${Xn}`,ro=zr-on;return{[`${et}-wrapper`]:{[`${et}-expand-icon-col`]:{width:Jn},[`${et}-row-expand-icon-cell`]:{textAlign:"center",[`${et}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${et}-row-indent`]:{height:1,float:"left"},[`${et}-row-expand-icon`]:Object.assign(Object.assign({},(0,Na.N)(rt)),{position:"relative",float:"left",boxSizing:"border-box",width:Xo,height:Xo,padding:0,color:"inherit",lineHeight:`${Xo}px`,background:Pi,border:sa,borderRadius:yi,transform:`scale(${Qt/Xo})`,transition:`all ${yn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${yn} ease-out`,content:'""'},"&::before":{top:mo,insetInlineEnd:ro,insetInlineStart:ro,height:on},"&::after":{top:ro,bottom:ro,insetInlineStart:mo,width:on,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"}}),[`${et}-row-indent + ${et}-row-expand-icon`]:{marginTop:(or*Ui-on*3)/2-Math.ceil((Vi*1.4-on*3)/2),marginInlineEnd:Kn},[`tr${et}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:_r}},[`${Yt}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${et}-expanded-row-fixed`]:{position:"relative",margin:`-${Jr}px -${rr}px`,padding:`${Jr}px ${rr}px`}}}},So=rt=>{const{componentCls:et,antCls:Yt,iconCls:Qt,tableFilterDropdownWidth:yn,tableFilterDropdownSearchWidth:on,paddingXXS:Kn,paddingXS:zn,colorText:Xn,lineWidth:Pi,lineType:Jn,tableBorderColor:yi,tableHeaderIconColor:or,fontSizeSM:Vi,tablePaddingHorizontal:Ui,borderRadius:Jr,motionDurationSlow:rr,colorTextDescription:_r,colorPrimary:zr,tableHeaderFilterActiveBg:mo,colorTextDisabled:Xo,tableFilterDropdownBg:sa,tableFilterDropdownHeight:ro,controlItemBgHover:$o,controlItemBgActive:ka,boxShadowSecondary:uo,filterDropdownMenuBg:Oo}=rt,co=`${Yt}-dropdown`,Ir=`${et}-filter-dropdown`,Fo=`${Yt}-tree`,ta=`${Pi}px ${Jn} ${yi}`;return[{[`${et}-wrapper`]:{[`${et}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${et}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Kn,marginInline:`${Kn}px ${-Ui/2}px`,padding:`0 ${Kn}px`,color:or,fontSize:Vi,borderRadius:Jr,cursor:"pointer",transition:`all ${rr}`,"&:hover":{color:_r,background:mo},"&.active":{color:zr}}}},{[`${Yt}-dropdown`]:{[Ir]:Object.assign(Object.assign({},(0,_i.Wf)(rt)),{minWidth:yn,backgroundColor:sa,borderRadius:Jr,boxShadow:uo,overflow:"hidden",[`${co}-menu`]:{maxHeight:ro,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:Oo,"&:empty::after":{display:"block",padding:`${zn}px 0`,color:Xo,fontSize:Vi,textAlign:"center",content:'"Not Found"'}},[`${Ir}-tree`]:{paddingBlock:`${zn}px 0`,paddingInline:zn,[Fo]:{padding:0},[`${Fo}-treenode ${Fo}-node-content-wrapper:hover`]:{backgroundColor:$o},[`${Fo}-treenode-checkbox-checked ${Fo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:ka}}},[`${Ir}-search`]:{padding:zn,borderBottom:ta,"&-input":{input:{minWidth:on},[Qt]:{color:Xo}}},[`${Ir}-checkall`]:{width:"100%",marginBottom:Kn,marginInlineStart:Kn},[`${Ir}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${zn-Pi}px ${zn}px`,overflow:"hidden",borderTop:ta}})}},{[`${Yt}-dropdown ${Ir}, ${Ir}-submenu`]:{[`${Yt}-checkbox-wrapper + span`]:{paddingInlineStart:zn,color:Xn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},bl=rt=>{const{componentCls:et,lineWidth:Yt,colorSplit:Qt,motionDurationSlow:yn,zIndexTableFixed:on,tableBg:Kn,zIndexTableSticky:zn}=rt,Xn=Qt;return{[`${et}-wrapper`]:{[`
|
|
|
${et}-cell-fix-left,
|
|
|
${et}-cell-fix-right
|
|
|
`]:{position:"sticky !important",zIndex:on,background:Kn},[`
|
|
|
${et}-cell-fix-left-first::after,
|
|
|
${et}-cell-fix-left-last::after
|
|
|
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-Yt,width:30,transform:"translateX(100%)",transition:`box-shadow ${yn}`,content:'""',pointerEvents:"none"},[`${et}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
|
${et}-cell-fix-right-first::after,
|
|
|
${et}-cell-fix-right-last::after
|
|
|
`]:{position:"absolute",top:0,bottom:-Yt,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${yn}`,content:'""',pointerEvents:"none"},[`${et}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:zn+1,width:30,transition:`box-shadow ${yn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${et}-ping-left`]:{[`&:not(${et}-has-fix-left) ${et}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Xn}`}},[`
|
|
|
${et}-cell-fix-left-first::after,
|
|
|
${et}-cell-fix-left-last::after
|
|
|
`]:{boxShadow:`inset 10px 0 8px -8px ${Xn}`},[`${et}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${et}-ping-right`]:{[`&:not(${et}-has-fix-right) ${et}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Xn}`}},[`
|
|
|
${et}-cell-fix-right-first::after,
|
|
|
${et}-cell-fix-right-last::after
|
|
|
`]:{boxShadow:`inset -10px 0 8px -8px ${Xn}`}}}}},Ts=rt=>{const{componentCls:et,antCls:Yt}=rt;return{[`${et}-wrapper`]:{[`${et}-pagination${Yt}-pagination`]:{margin:`${rt.margin}px 0`},[`${et}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:rt.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Hs=rt=>{const{componentCls:et,tableRadius:Yt}=rt;return{[`${et}-wrapper`]:{[et]:{[`${et}-title, ${et}-header`]:{borderRadius:`${Yt}px ${Yt}px 0 0`},[`${et}-title + ${et}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${et}-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:Yt,borderStartEndRadius:Yt,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:Yt},"> *:last-child":{borderStartEndRadius:Yt}}},"&-footer":{borderRadius:`0 0 ${Yt}px ${Yt}px`}}}}},rc=rt=>{const{componentCls:et}=rt;return{[`${et}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${et}-pagination-left`]:{justifyContent:"flex-end"},[`${et}-pagination-right`]:{justifyContent:"flex-start"},[`${et}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${et}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${et}-row-indent`]:{float:"right"}}}}},Tc=rt=>{const{componentCls:et,antCls:Yt,iconCls:Qt,fontSizeIcon:yn,padding:on,paddingXS:Kn,tableHeaderIconColor:zn,tableHeaderIconColorHover:Xn,tableSelectionColumnWidth:Pi}=rt;return{[`${et}-wrapper`]:{[`${et}-selection-col`]:{width:Pi,[`&${et}-selection-col-with-dropdown`]:{width:Pi+yn+on/4}},[`${et}-bordered ${et}-selection-col`]:{width:Pi+Kn*2,[`&${et}-selection-col-with-dropdown`]:{width:Pi+yn+on/4+Kn*2}},[`
|
|
|
table tr th${et}-selection-column,
|
|
|
table tr td${et}-selection-column
|
|
|
`]:{paddingInlineEnd:rt.paddingXS,paddingInlineStart:rt.paddingXS,textAlign:"center",[`${Yt}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${et}-selection-column${et}-cell-fix-left`]:{zIndex:rt.zIndexTableFixed+1},[`table tr th${et}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${et}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${et}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${rt.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${rt.tablePaddingHorizontal/4}px`,[Qt]:{color:zn,fontSize:yn,verticalAlign:"baseline","&:hover":{color:Xn}}}}}},vc=rt=>{const{componentCls:et}=rt,Yt=(Qt,yn,on,Kn)=>({[`${et}${et}-${Qt}`]:{fontSize:Kn,[`
|
|
|
${et}-title,
|
|
|
${et}-footer,
|
|
|
${et}-cell,
|
|
|
${et}-thead > tr > th,
|
|
|
${et}-tbody > tr > th,
|
|
|
${et}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{padding:`${yn}px ${on}px`},[`${et}-filter-trigger`]:{marginInlineEnd:`-${on/2}px`},[`${et}-expanded-row-fixed`]:{margin:`-${yn}px -${on}px`},[`${et}-tbody`]:{[`${et}-wrapper:only-child ${et}`]:{marginBlock:`-${yn}px`,marginInline:`${rt.tableExpandColumnWidth-on}px -${on}px`}},[`${et}-selection-column`]:{paddingInlineStart:`${on/4}px`}}});return{[`${et}-wrapper`]:Object.assign(Object.assign({},Yt("middle",rt.tablePaddingVerticalMiddle,rt.tablePaddingHorizontalMiddle,rt.tableFontSizeMiddle)),Yt("small",rt.tablePaddingVerticalSmall,rt.tablePaddingHorizontalSmall,rt.tableFontSizeSmall))}},du=rt=>{const{componentCls:et,marginXXS:Yt,fontSizeIcon:Qt,tableHeaderIconColor:yn,tableHeaderIconColorHover:on}=rt;return{[`${et}-wrapper`]:{[`${et}-thead th${et}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${rt.motionDurationSlow}`,"&:hover":{background:rt.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:rt.colorPrimary},[`
|
|
|
&${et}-cell-fix-left:hover,
|
|
|
&${et}-cell-fix-right:hover
|
|
|
`]:{background:rt.tableFixedHeaderSortActiveBg}},[`${et}-thead th${et}-column-sort`]:{background:rt.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${et}-column-sort`]:{background:rt.tableBodySortBg},[`${et}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${et}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${et}-column-sorter`]:{marginInlineStart:Yt,color:yn,fontSize:0,transition:`color ${rt.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Qt,"&.active":{color:rt.colorPrimary}},[`${et}-column-sorter-up + ${et}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${et}-column-sorters:hover ${et}-column-sorter`]:{color:on}}}},ac=rt=>{const{componentCls:et,opacityLoading:Yt,tableScrollThumbBg:Qt,tableScrollThumbBgHover:yn,tableScrollThumbSize:on,tableScrollBg:Kn,zIndexTableSticky:zn,stickyScrollBarBorderRadius:Xn}=rt,Pi=`${rt.lineWidth}px ${rt.lineType} ${rt.tableBorderColor}`;return{[`${et}-wrapper`]:{[`${et}-sticky`]:{"&-holder":{position:"sticky",zIndex:zn,background:rt.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${on}px !important`,zIndex:zn,display:"flex",alignItems:"center",background:Kn,borderTop:Pi,opacity:Yt,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:on,backgroundColor:Qt,borderRadius:Xn,transition:`all ${rt.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:yn}}}}}}},au=rt=>{const{componentCls:et,lineWidth:Yt,tableBorderColor:Qt}=rt,yn=`${Yt}px ${rt.lineType} ${Qt}`;return{[`${et}-wrapper`]:{[`${et}-summary`]:{position:"relative",zIndex:rt.zIndexTableFixed,background:rt.tableBg,"> tr":{"> th, > td":{borderBottom:yn}}},[`div${et}-summary`]:{boxShadow:`0 -${Yt}px 0 ${Qt}`}}}},Wu=rt=>{const{componentCls:et}=rt,Yt=`${rt.lineWidth}px ${rt.lineType} ${rt.tableBorderColor}`,Qt=`${et}-expanded-row-cell`;return{[`${et}-wrapper`]:{[`${et}-tbody-virtual`]:{[`${et}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${et}-cell`]:{borderBottom:Yt},[`${et}-expanded-row`]:{[`${Qt}${Qt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${rt.lineWidth}px)`,borderInlineEnd:"none"}}},[`${et}-bordered`]:{[`${et}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:Yt,position:"absolute"},[`${et}-cell`]:{borderInlineEnd:Yt,[`&${et}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-rt.lineWidth,borderInlineStart:Yt}}}}}}};const Au=rt=>{const{componentCls:et,fontWeightStrong:Yt,tablePaddingVertical:Qt,tablePaddingHorizontal:yn,lineWidth:on,lineType:Kn,tableBorderColor:zn,tableFontSize:Xn,tableBg:Pi,tableRadius:Jn,tableHeaderTextColor:yi,motionDurationMid:or,tableHeaderBg:Vi,tableHeaderCellSplitColor:Ui,tableRowHoverBg:Jr,tableSelectedRowBg:rr,tableSelectedRowHoverBg:_r,tableFooterTextColor:zr,tableFooterBg:mo,paddingContentVerticalLG:Xo}=rt,sa=`${on}px ${Kn} ${zn}`;return{[`${et}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,_i.dF)()),{[et]:Object.assign(Object.assign({},(0,_i.Wf)(rt)),{fontSize:Xn,background:Pi,borderRadius:`${Jn}px ${Jn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Jn}px ${Jn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
|
${et}-cell,
|
|
|
${et}-thead > tr > th,
|
|
|
${et}-tbody > tr > th,
|
|
|
${et}-tbody > tr > td,
|
|
|
tfoot > tr > th,
|
|
|
tfoot > tr > td
|
|
|
`]:{position:"relative",padding:`${Xo}px ${yn}px`,overflowWrap:"break-word"},[`${et}-title`]:{padding:`${Qt}px ${yn}px`},[`${et}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:yi,fontWeight:Yt,textAlign:"start",background:Vi,borderBottom:sa,transition:`background ${or} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${et}-selection-column):not(${et}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Ui,transform:"translateY(-50%)",transition:`background-color ${or}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${et}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${or}, border-color ${or}`,borderBottom:sa,[`
|
|
|
> ${et}-wrapper:only-child,
|
|
|
> ${et}-expanded-row-fixed > ${et}-wrapper:only-child
|
|
|
`]:{[et]:{marginBlock:`-${Qt}px`,marginInline:`${rt.tableExpandColumnWidth-yn}px -${yn}px`,[`${et}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:yi,fontWeight:Yt,textAlign:"start",background:Vi,borderBottom:sa,transition:`background ${or} ease`},[`
|
|
|
&${et}-row:hover > th,
|
|
|
&${et}-row:hover > td,
|
|
|
> th${et}-cell-row-hover,
|
|
|
> td${et}-cell-row-hover
|
|
|
`]:{background:Jr},[`&${et}-row-selected`]:{"> th, > td":{background:rr},"&:hover > th, &:hover > td":{background:_r}}}},[`${et}-footer`]:{padding:`${Qt}px ${yn}px`,color:zr,background:mo}})}};var yc=(0,Ii.Z)("Table",rt=>{const{colorTextHeading:et,colorSplit:Yt,colorIcon:Qt,colorIconHover:yn,opacityLoading:on,colorBgContainer:Kn,controlInteractiveSize:zn,headerBg:Xn,headerColor:Pi,headerSortActiveBg:Jn,headerSortHoverBg:yi,bodySortBg:or,rowHoverBg:Vi,rowSelectedBg:Ui,rowSelectedHoverBg:Jr,rowExpandedBg:rr,cellPaddingBlock:_r,cellPaddingInline:zr,cellPaddingBlockMD:mo,cellPaddingInlineMD:Xo,cellPaddingBlockSM:sa,cellPaddingInlineSM:ro,borderColor:$o,footerBg:ka,footerColor:uo,headerBorderRadius:Oo,cellFontSize:co,cellFontSizeMD:Ir,cellFontSizeSM:Fo,headerSplitColor:ta,fixedHeaderSortActiveBg:Pa,headerFilterHoverBg:wa,filterDropdownBg:oo,expandIconBg:Ta,selectionColumnWidth:Va,stickyScrollBarBg:ws}=rt,as=new xr.C(Qt),qs=new xr.C(yn),Bs=2,Za=(0,Gr.TS)(rt,{tableFontSize:co,tableBg:Kn,tableRadius:Oo,tablePaddingVertical:_r,tablePaddingHorizontal:zr,tablePaddingVerticalMiddle:mo,tablePaddingHorizontalMiddle:Xo,tablePaddingVerticalSmall:sa,tablePaddingHorizontalSmall:ro,tableBorderColor:$o,tableHeaderTextColor:Pi,tableHeaderBg:Xn,tableFooterTextColor:uo,tableFooterBg:ka,tableHeaderCellSplitColor:ta,tableHeaderSortBg:Jn,tableHeaderSortHoverBg:yi,tableHeaderIconColor:as.clone().setAlpha(as.getAlpha()*on).toRgbString(),tableHeaderIconColorHover:qs.clone().setAlpha(qs.getAlpha()*on).toRgbString(),tableBodySortBg:or,tableFixedHeaderSortActiveBg:Pa,tableHeaderFilterActiveBg:wa,tableFilterDropdownBg:oo,tableRowHoverBg:Vi,tableSelectedRowBg:Ui,tableSelectedRowHoverBg:Jr,zIndexTableFixed:Bs,zIndexTableSticky:Bs+1,tableFontSizeMiddle:Ir,tableFontSizeSmall:Fo,tableSelectionColumnWidth:Va,tableExpandIconBg:Ta,tableExpandColumnWidth:zn+2*rt.padding,tableExpandedRowBg:rr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:ws,tableScrollThumbBgHover:et,tableScrollBg:Yt});return[Au(Za),Ts(Za),au(Za),du(Za),So(Za),Fr(Za),Hs(Za),Sa(Za),au(Za),gr(Za),Tc(Za),bl(Za),ac(Za),Tr(Za),vc(Za),rc(Za),Wu(Za)]},rt=>{const{colorFillAlter:et,colorBgContainer:Yt,colorTextHeading:Qt,colorFillSecondary:yn,colorFillContent:on,controlItemBgActive:Kn,controlItemBgActiveHover:zn,padding:Xn,paddingSM:Pi,paddingXS:Jn,colorBorderSecondary:yi,borderRadiusLG:or,fontSize:Vi,controlHeight:Ui,colorTextPlaceholder:Jr}=rt,rr=new xr.C(yn).onBackground(Yt).toHexShortString(),_r=new xr.C(on).onBackground(Yt).toHexShortString(),zr=new xr.C(et).onBackground(Yt).toHexShortString();return{headerBg:zr,headerColor:Qt,headerSortActiveBg:rr,headerSortHoverBg:_r,bodySortBg:zr,rowHoverBg:zr,rowSelectedBg:Kn,rowSelectedHoverBg:zn,rowExpandedBg:et,cellPaddingBlock:Xn,cellPaddingInline:Xn,cellPaddingBlockMD:Pi,cellPaddingInlineMD:Jn,cellPaddingBlockSM:Jn,cellPaddingInlineSM:Jn,borderColor:yi,headerBorderRadius:or,footerBg:zr,footerColor:Qt,cellFontSize:Vi,cellFontSizeMD:Vi,cellFontSizeSM:Vi,headerSplitColor:yi,fixedHeaderSortActiveBg:rr,headerFilterHoverBg:on,filterDropdownMenuBg:Yt,filterDropdownBg:Yt,expandIconBg:Yt,selectionColumnWidth:Ui,stickyScrollBarBg:Jr,stickyScrollBarBorderRadius:100}});const bd=[],_d=(rt,et)=>{const{prefixCls:Yt,className:Qt,rootClassName:yn,style:on,size:Kn,bordered:zn,dropdownPrefixCls:Xn,dataSource:Pi,pagination:Jn,rowSelection:yi,rowKey:or="key",rowClassName:Vi,columns:Ui,children:Jr,childrenColumnName:rr,onChange:_r,getPopupContainer:zr,loading:mo,expandIcon:Xo,expandable:sa,expandedRowRender:ro,expandIconColumnIndex:$o,indentSize:ka,scroll:uo,sortDirections:Oo,locale:co,showSorterTooltip:Ir=!0,virtual:Fo}=rt,ta=Le.useMemo(()=>Ui||vn(Jr),[Ui,Jr]),Pa=Le.useMemo(()=>ta.some(ys=>ys.responsive),[ta]),wa=(0,fi.Z)(Pa),oo=Le.useMemo(()=>{const ys=new Set(Object.keys(wa).filter(Ys=>wa[Ys]));return ta.filter(Ys=>!Ys.responsive||Ys.responsive.some(yl=>ys.has(yl)))},[ta,wa]),Ta=(0,Xr.Z)(rt,["className","style","columns"]),{locale:Va=Ba.Z,direction:ws,table:as,renderEmpty:qs,getPrefixCls:Bs,getPopupContainer:Za}=Le.useContext(br.E_),oa=(0,wo.Z)(Kn),us=Object.assign(Object.assign({},Va.Table),co),el=Pi||bd,Ws=Bs("table",Yt),hl=Bs("dropdown",Xn),ba=Object.assign({childrenColumnName:rr,expandIconColumnIndex:$o},sa),{childrenColumnName:ca="children"}=ba,Ca=Le.useMemo(()=>el.some(ys=>ys==null?void 0:ys[ca])?"nest":ro||sa&&sa.expandedRowRender?"row":null,[el]),Qo={body:Le.useRef()},vs=Le.useMemo(()=>typeof or=="function"?or:ys=>ys==null?void 0:ys[or],[or]),[Jo]=Li(el,ca,vs),Ra={},rs=function(ys,Ys){let yl=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Xs,ds,xl;const Su=Object.assign(Object.assign({},Ra),ys);yl&&((Xs=Ra.resetPagination)===null||Xs===void 0||Xs.call(Ra),!((ds=Su.pagination)===null||ds===void 0)&&ds.current&&(Su.pagination.current=1),Jn&&Jn.onChange&&Jn.onChange(1,(xl=Su.pagination)===null||xl===void 0?void 0:xl.pageSize)),uo&&uo.scrollToFirstRowOnChange!==!1&&Qo.body.current&&(0,ha.Z)(0,{getContainer:()=>Qo.body.current}),_r==null||_r(Su.pagination,Su.filters,Su.sorter,{currentDataSource:$i(Mi(el,Su.sorterStates,ca),Su.filterStates),action:Ys})},ss=(ys,Ys)=>{rs({sorter:ys,sorterStates:Ys},"sort",!1)},[Dl,Fl,Yl,Cs]=wr({prefixCls:Ws,mergedColumns:oo,onSorterChange:ss,sortDirections:Oo||["ascend","descend"],tableLocale:us,showSorterTooltip:Ir}),Hl=Le.useMemo(()=>Mi(el,Fl,ca),[el,Fl]);Ra.sorter=Cs(),Ra.sorterStates=Fl;const fl=(ys,Ys)=>{rs({filters:ys,filterStates:Ys},"filter",!0)},[Bl,_c,Es]=ii({prefixCls:Ws,locale:us,dropdownPrefixCls:hl,mergedColumns:oo,onFilterChange:fl,getPopupContainer:zr||Za}),Is=$i(Hl,_c);Ra.filters=Es,Ra.filterStates=_c;const bs=Le.useMemo(()=>{const ys={};return Object.keys(Es).forEach(Ys=>{Es[Ys]!==null&&(ys[Ys]=Es[Ys])}),Object.assign(Object.assign({},Yl),{filters:ys})},[Yl,Es]),[Gs]=yo(bs),ml=(ys,Ys)=>{rs({pagination:Object.assign(Object.assign({},Ra.pagination),{current:ys,pageSize:Ys})},"paginate")},[ts,js]=Ka(Is.length,ml,Jn);Ra.pagination=Jn===!1?{}:Uo(ts,Jn),Ra.resetPagination=js;const Il=Le.useMemo(()=>{if(Jn===!1||!ts.pageSize)return Is;const{current:ys=1,total:Ys,pageSize:yl=ga}=ts;return Is.length<Ys?Is.length>yl?Is.slice((ys-1)*yl,ys*yl):Is:Is.slice((ys-1)*yl,ys*yl)},[!!Jn,Is,ts&&ts.current,ts&&ts.pageSize,ts&&ts.total]),[Xl,Gu]=Ha({prefixCls:Ws,data:Is,pageData:Il,getRowKey:vs,getRecordByKey:Jo,expandType:Ca,childrenColumnName:ca,locale:us,getPopupContainer:zr||Za},yi),Du=(ys,Ys,yl)=>{let Xs;return typeof Vi=="function"?Xs=ot()(Vi(ys,Ys,yl)):Xs=ot()(Vi),ot()({[`${Ws}-row-selected`]:Gu.has(vs(ys,Ys))},Xs)};ba.__PARENT_RENDER_ICON__=ba.expandIcon,ba.expandIcon=ba.expandIcon||Xo||$a(us),Ca==="nest"&&ba.expandIconColumnIndex===void 0?ba.expandIconColumnIndex=yi?1:0:ba.expandIconColumnIndex>0&&yi&&(ba.expandIconColumnIndex-=1),typeof ba.indentSize!="number"&&(ba.indentSize=typeof ka=="number"?ka:15);const vl=Le.useCallback(ys=>Gs(Xl(Bl(Dl(ys)))),[Dl,Bl,Xl]);let Iu,Ou;if(Jn!==!1&&(ts!=null&&ts.total)){let ys;ts.size?ys=ts.size:ys=oa==="small"||oa==="middle"?"small":void 0;const Ys=ds=>Le.createElement(Eo.Z,Object.assign({},ts,{className:ot()(`${Ws}-pagination ${Ws}-pagination-${ds}`,ts.className),size:ys})),yl=ws==="rtl"?"left":"right",{position:Xs}=ts;if(Xs!==null&&Array.isArray(Xs)){const ds=Xs.find(xc=>xc.includes("top")),xl=Xs.find(xc=>xc.includes("bottom")),Su=Xs.every(xc=>`${xc}`=="none");!ds&&!xl&&!Su&&(Ou=Ys(yl)),ds&&(Iu=Ys(ds.toLowerCase().replace("top",""))),xl&&(Ou=Ys(xl.toLowerCase().replace("bottom","")))}else Ou=Ys(yl)}let Ms;typeof mo=="boolean"?Ms={spinning:mo}:typeof mo=="object"&&(Ms=Object.assign({spinning:!0},mo));const[Wl,$s]=yc(Ws),[,zs]=(0,fa.Z)(),$u=ot()(`${Ws}-wrapper`,as==null?void 0:as.className,{[`${Ws}-wrapper-rtl`]:ws==="rtl"},Qt,yn,$s),Vc=Object.assign(Object.assign({},as==null?void 0:as.style),on),sc=co&&co.emptyText||(qs==null?void 0:qs("Table"))||Le.createElement(Ur.Z,{componentName:"Table"}),lc=Fo?vr:fr,Ku={},ku=Le.useMemo(()=>{const{fontSize:ys,lineHeight:Ys,padding:yl,paddingXS:Xs,paddingSM:ds}=zs,xl=Math.floor(ys*Ys);switch(oa){case"large":return yl*2+xl;case"small":return Xs*2+xl;default:return ds*2+xl}},[zs,oa]);return Fo&&(Ku.listItemHeight=ku),Wl(Le.createElement("div",{ref:et,className:$u,style:Vc},Le.createElement(es.Z,Object.assign({spinning:!1},Ms),Iu,Le.createElement(lc,Object.assign({},Ku,Ta,{columns:oo,direction:ws,expandable:ba,prefixCls:Ws,className:ot()({[`${Ws}-middle`]:oa==="middle",[`${Ws}-small`]:oa==="small",[`${Ws}-bordered`]:zn,[`${Ws}-empty`]:el.length===0}),data:Il,rowKey:vs,rowClassName:Du,emptyText:sc,internalHooks:Te,internalRefs:Qo,transformColumns:vl})),Ou)))};var Fd=Le.forwardRef(_d);const ch=(rt,et)=>{const Yt=Le.useRef(0);return Yt.current+=1,Le.createElement(Fd,Object.assign({},rt,{ref:et,_renderTimes:Yt.current}))},ai=Le.forwardRef(ch);ai.SELECTION_COLUMN=ma,ai.EXPAND_COLUMN=le,ai.SELECTION_ALL=xa,ai.SELECTION_INVERT=bo,ai.SELECTION_NONE=ra,ai.Column=Ps,ai.ColumnGroup=Po,ai.Summary=Qe;var po=ai,Xa=po},12563:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return ht}});var le=me(59301),Te=me(99267),He=me(92310),lt=me.n(He),We=me(36785),Ve=me(47729),Le=me(14088),Ct=me(36355),xt=me(17313),Ue=me(37613),bt=me(83116);const at=Ze=>{const{paddingXXS:Mt,lineWidth:ot,tagPaddingHorizontal:Ot,componentCls:Pt}=Ze,Dt=Ot-ot,Wt=Mt-ot;return{[Pt]:Object.assign(Object.assign({},(0,xt.Wf)(Ze)),{display:"inline-block",height:"auto",marginInlineEnd:Ze.marginXS,paddingInline:Dt,fontSize:Ze.tagFontSize,lineHeight:Ze.tagLineHeight,whiteSpace:"nowrap",background:Ze.defaultBg,border:`${Ze.lineWidth}px ${Ze.lineType} ${Ze.colorBorder}`,borderRadius:Ze.borderRadiusSM,opacity:1,transition:`all ${Ze.motionDurationMid}`,textAlign:"start",position:"relative",[`&${Pt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ze.defaultColor},[`${Pt}-close-icon`]:{marginInlineStart:Wt,color:Ze.colorTextDescription,fontSize:Ze.tagIconSize,cursor:"pointer",transition:`all ${Ze.motionDurationMid}`,"&:hover":{color:Ze.colorTextHeading}},[`&${Pt}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${Ze.iconCls}-close, ${Ze.iconCls}-close:hover`]:{color:Ze.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${Pt}-checkable-checked):hover`]:{color:Ze.colorPrimary,backgroundColor:Ze.colorFillSecondary},"&:active, &-checked":{color:Ze.colorTextLightSolid},"&-checked":{backgroundColor:Ze.colorPrimary,"&:hover":{backgroundColor:Ze.colorPrimaryHover}},"&:active":{backgroundColor:Ze.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${Ze.iconCls} + span, > span + ${Ze.iconCls}`]:{marginInlineStart:Dt}}),[`${Pt}-borderless`]:{borderColor:"transparent",background:Ze.tagBorderlessBg}}},mt=Ze=>{const{lineWidth:Mt,fontSizeIcon:ot}=Ze,Ot=Ze.fontSizeSM,Pt=`${Ze.lineHeightSM*Ot}px`;return(0,Ue.TS)(Ze,{tagFontSize:Ot,tagLineHeight:Pt,tagIconSize:ot-2*Mt,tagPaddingHorizontal:8,tagBorderlessBg:Ze.colorFillTertiary})},Oe=Ze=>({defaultBg:Ze.colorFillQuaternary,defaultColor:Ze.colorText});var te=(0,bt.Z)("Tag",Ze=>{const Mt=mt(Ze);return at(Mt)},Oe),ee=function(Ze,Mt){var ot={};for(var Ot in Ze)Object.prototype.hasOwnProperty.call(Ze,Ot)&&Mt.indexOf(Ot)<0&&(ot[Ot]=Ze[Ot]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pt=0,Ot=Object.getOwnPropertySymbols(Ze);Pt<Ot.length;Pt++)Mt.indexOf(Ot[Pt])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Ot[Pt])&&(ot[Ot[Pt]]=Ze[Ot[Pt]]);return ot},se=Ze=>{const{prefixCls:Mt,style:ot,className:Ot,checked:Pt,onChange:Dt,onClick:Wt}=Ze,Lt=ee(Ze,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:qe,tag:Ke}=le.useContext(Ct.E_),Rt=ln=>{Dt==null||Dt(!Pt),Wt==null||Wt(ln)},Sn=qe("tag",Mt),[Pn,_t]=te(Sn),rn=lt()(Sn,`${Sn}-checkable`,{[`${Sn}-checkable-checked`]:Pt},Ke==null?void 0:Ke.className,Ot,_t);return Pn(le.createElement("span",Object.assign({},Lt,{style:Object.assign(Object.assign({},ot),Ke==null?void 0:Ke.style),className:rn,onClick:Rt})))},he=me(45157);const ve=Ze=>(0,he.Z)(Ze,(Mt,ot)=>{let{textColor:Ot,lightBorderColor:Pt,lightColor:Dt,darkColor:Wt}=ot;return{[`${Ze.componentCls}-${Mt}`]:{color:Ot,background:Dt,borderColor:Pt,"&-inverse":{color:Ze.colorTextLightSolid,background:Wt,borderColor:Wt},[`&${Ze.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Ee=(0,bt.b)(["Tag","preset"],Ze=>{const Mt=mt(Ze);return ve(Mt)},Oe);function Me(Ze){return typeof Ze!="string"?Ze:Ze.charAt(0).toUpperCase()+Ze.slice(1)}const Be=(Ze,Mt,ot)=>{const Ot=Me(ot);return{[`${Ze.componentCls}-${Mt}`]:{color:Ze[`color${ot}`],background:Ze[`color${Ot}Bg`],borderColor:Ze[`color${Ot}Border`],[`&${Ze.componentCls}-borderless`]:{borderColor:"transparent"}}}};var je=(0,bt.b)(["Tag","status"],Ze=>{const Mt=mt(Ze);return[Be(Mt,"success","Success"),Be(Mt,"processing","Info"),Be(Mt,"error","Error"),Be(Mt,"warning","Warning")]},Oe),_e=function(Ze,Mt){var ot={};for(var Ot in Ze)Object.prototype.hasOwnProperty.call(Ze,Ot)&&Mt.indexOf(Ot)<0&&(ot[Ot]=Ze[Ot]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Pt=0,Ot=Object.getOwnPropertySymbols(Ze);Pt<Ot.length;Pt++)Mt.indexOf(Ot[Pt])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Ot[Pt])&&(ot[Ot[Pt]]=Ze[Ot[Pt]]);return ot};const Je=(Ze,Mt)=>{const{prefixCls:ot,className:Ot,rootClassName:Pt,style:Dt,children:Wt,icon:Lt,color:qe,onClose:Ke,closeIcon:Rt,closable:Sn,bordered:Pn=!0}=Ze,_t=_e(Ze,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:rn,direction:ln,tag:Wn}=le.useContext(Ct.E_),[un,_n]=le.useState(!0);le.useEffect(()=>{"visible"in _t&&_n(_t.visible)},[_t.visible]);const St=(0,We.o2)(qe),Zn=(0,We.yT)(qe),li=St||Zn,Ge=Object.assign(Object.assign({backgroundColor:qe&&!li?qe:void 0},Wn==null?void 0:Wn.style),Dt),be=rn("tag",ot),[Pe,Ae]=te(be),Ne=lt()(be,Wn==null?void 0:Wn.className,{[`${be}-${qe}`]:li,[`${be}-has-color`]:qe&&!li,[`${be}-hidden`]:!un,[`${be}-rtl`]:ln==="rtl",[`${be}-borderless`]:!Pn},Ot,Pt,Ae),xe=Nt=>{Nt.stopPropagation(),Ke==null||Ke(Nt),!Nt.defaultPrevented&&_n(!1)},[,ut]=(0,Ve.Z)(Sn,Rt,Nt=>Nt===null?le.createElement(Te.Z,{className:`${be}-close-icon`,onClick:xe}):le.createElement("span",{className:`${be}-close-icon`,onClick:xe},Nt),null,!1),Bt=typeof _t.onClick=="function"||Wt&&Wt.type==="a",Qe=Lt||null,it=Qe?le.createElement(le.Fragment,null,Qe,Wt&&le.createElement("span",null,Wt)):Wt,Ft=le.createElement("span",Object.assign({},_t,{ref:Mt,className:Ne,style:Ge}),it,ut,St&&le.createElement(Ee,{key:"preset",prefixCls:be}),Zn&&le.createElement(je,{key:"status",prefixCls:be}));return Pe(Bt?le.createElement(Le.Z,{component:"Tag"},Ft):Ft)},Xe=le.forwardRef(Je);Xe.CheckableTag=se;var ht=Xe},10777:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return je}});var le=me(92310),Te=me.n(le),He=me(59301),lt=me(36355),We=function(_e,Je){var Xe={};for(var ht in _e)Object.prototype.hasOwnProperty.call(_e,ht)&&Je.indexOf(ht)<0&&(Xe[ht]=_e[ht]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,ht=Object.getOwnPropertySymbols(_e);Ze<ht.length;Ze++)Je.indexOf(ht[Ze])<0&&Object.prototype.propertyIsEnumerable.call(_e,ht[Ze])&&(Xe[ht[Ze]]=_e[ht[Ze]]);return Xe},Le=_e=>{var{prefixCls:Je,className:Xe,color:ht="blue",dot:Ze,pending:Mt=!1,position:ot,label:Ot,children:Pt}=_e,Dt=We(_e,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:Wt}=He.useContext(lt.E_),Lt=Wt("timeline",Je),qe=Te()(`${Lt}-item`,{[`${Lt}-item-pending`]:Mt},Xe),Ke=/blue|red|green|gray/.test(ht||"")?void 0:ht,Rt=Te()(`${Lt}-item-head`,{[`${Lt}-item-head-custom`]:!!Ze,[`${Lt}-item-head-${ht}`]:!Ke});return He.createElement("li",Object.assign({},Dt,{className:qe}),Ot&&He.createElement("div",{className:`${Lt}-item-label`},Ot),He.createElement("div",{className:`${Lt}-item-tail`}),He.createElement("div",{className:Rt,style:{borderColor:Ke,color:Ke}},Ze),He.createElement("div",{className:`${Lt}-item-content`},Pt))},Ct=me(26407),xt=me(58617),Ue=function(_e,Je){var Xe={};for(var ht in _e)Object.prototype.hasOwnProperty.call(_e,ht)&&Je.indexOf(ht)<0&&(Xe[ht]=_e[ht]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,ht=Object.getOwnPropertySymbols(_e);Ze<ht.length;Ze++)Je.indexOf(ht[Ze])<0&&Object.prototype.propertyIsEnumerable.call(_e,ht[Ze])&&(Xe[ht[Ze]]=_e[ht[Ze]]);return Xe},at=_e=>{var{prefixCls:Je,className:Xe,pending:ht=!1,children:Ze,items:Mt,rootClassName:ot,reverse:Ot=!1,direction:Pt,hashId:Dt,pendingDot:Wt,mode:Lt=""}=_e,qe=Ue(_e,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const Ke=(un,_n)=>Lt==="alternate"?un==="right"?`${Je}-item-right`:un==="left"?`${Je}-item-left`:_n%2===0?`${Je}-item-left`:`${Je}-item-right`:Lt==="left"?`${Je}-item-left`:Lt==="right"?`${Je}-item-right`:un==="right"?`${Je}-item-right`:"",Rt=(0,Ct.Z)(Mt||[]),Sn=typeof ht=="boolean"?null:ht;ht&&Rt.push({pending:!!ht,dot:Wt||He.createElement(xt.Z,null),children:Sn}),Ot&&Rt.reverse();const Pn=Rt.length,_t=`${Je}-item-last`,rn=Rt.filter(un=>!!un).map((un,_n)=>{var St;const Zn=_n===Pn-2?_t:"",li=_n===Pn-1?_t:"",{className:Ge}=un,be=Ue(un,["className"]);return He.createElement(Le,Object.assign({},be,{className:Te()([Ge,!Ot&&ht?Zn:li,Ke((St=un==null?void 0:un.position)!==null&&St!==void 0?St:"",_n)]),key:(un==null?void 0:un.key)||_n}))}),ln=Rt.some(un=>!!(un!=null&&un.label)),Wn=Te()(Je,{[`${Je}-pending`]:!!ht,[`${Je}-reverse`]:!!Ot,[`${Je}-${Lt}`]:!!Lt&&!ln,[`${Je}-label`]:ln,[`${Je}-rtl`]:Pt==="rtl"},Xe,ot,Dt);return He.createElement("ul",Object.assign({},qe,{className:Wn}),rn)},mt=me(11592);function Oe(_e,Je){return _e&&Array.isArray(_e)?_e:(0,mt.Z)(Je).map(Xe=>{var ht,Ze;return Object.assign({children:(Ze=(ht=Xe==null?void 0:Xe.props)===null||ht===void 0?void 0:ht.children)!==null&&Ze!==void 0?Ze:""},Xe.props)})}var te=Oe,ee=me(17313),de=me(83116),se=me(37613);const he=_e=>{const{componentCls:Je}=_e;return{[Je]:Object.assign(Object.assign({},(0,ee.Wf)(_e)),{margin:0,padding:0,listStyle:"none",[`${Je}-item`]:{position:"relative",margin:0,paddingBottom:_e.itemPaddingBottom,fontSize:_e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:_e.itemHeadSize,insetInlineStart:(_e.itemHeadSize-_e.tailWidth)/2,height:`calc(100% - ${_e.itemHeadSize}px)`,borderInlineStart:`${_e.tailWidth}px ${_e.lineType} ${_e.tailColor}`},"&-pending":{[`${Je}-item-head`]:{fontSize:_e.fontSizeSM,backgroundColor:"transparent"},[`${Je}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:_e.itemHeadSize,height:_e.itemHeadSize,backgroundColor:_e.dotBg,border:`${_e.dotBorderWidth}px ${_e.lineType} transparent`,borderRadius:"50%","&-blue":{color:_e.colorPrimary,borderColor:_e.colorPrimary},"&-red":{color:_e.colorError,borderColor:_e.colorError},"&-green":{color:_e.colorSuccess,borderColor:_e.colorSuccess},"&-gray":{color:_e.colorTextDisabled,borderColor:_e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:_e.itemHeadSize/2,insetInlineStart:_e.itemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:_e.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(_e.fontSize*_e.lineHeight-_e.fontSize)+_e.lineWidth,marginInlineStart:_e.margin+_e.itemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${Je}-item-tail`]:{display:"none"},[`> ${Je}-item-content`]:{minHeight:_e.controlHeightLG*1.2}}},[`&${Je}-alternate,
|
|
|
&${Je}-right,
|
|
|
&${Je}-label`]:{[`${Je}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${_e.marginXXS}px`,"&-custom":{marginInlineStart:_e.tailWidth/2}},"&-left":{[`${Je}-item-content`]:{insetInlineStart:`calc(50% - ${_e.marginXXS}px)`,width:`calc(50% - ${_e.marginSM}px)`,textAlign:"start"}},"&-right":{[`${Je}-item-content`]:{width:`calc(50% - ${_e.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${Je}-right`]:{[`${Je}-item-right`]:{[`${Je}-item-tail,
|
|
|
${Je}-item-head,
|
|
|
${Je}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(_e.itemHeadSize+_e.tailWidth)/2}px)`},[`${Je}-item-content`]:{width:`calc(100% - ${_e.itemHeadSize+_e.marginXS}px)`}}},[`&${Je}-pending
|
|
|
${Je}-item-last
|
|
|
${Je}-item-tail`]:{display:"block",height:`calc(100% - ${_e.margin}px)`,borderInlineStart:`${_e.tailWidth}px dotted ${_e.tailColor}`},[`&${Je}-reverse
|
|
|
${Je}-item-last
|
|
|
${Je}-item-tail`]:{display:"none"},[`&${Je}-reverse ${Je}-item-pending`]:{[`${Je}-item-tail`]:{insetBlockStart:_e.margin,display:"block",height:`calc(100% - ${_e.margin}px)`,borderInlineStart:`${_e.tailWidth}px dotted ${_e.tailColor}`},[`${Je}-item-content`]:{minHeight:_e.controlHeightLG*1.2}},[`&${Je}-label`]:{[`${Je}-item-label`]:{position:"absolute",insetBlockStart:-(_e.fontSize*_e.lineHeight-_e.fontSize)+_e.tailWidth,width:`calc(50% - ${_e.marginSM}px)`,textAlign:"end"},[`${Je}-item-right`]:{[`${Je}-item-label`]:{insetInlineStart:`calc(50% + ${_e.marginSM}px)`,width:`calc(50% - ${_e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${Je}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var ve=(0,de.Z)("Timeline",_e=>{const Je=(0,se.TS)(_e,{itemHeadSize:10,customHeadPaddingVertical:_e.paddingXXS,paddingInlineEnd:2});return[he(Je)]},_e=>({tailColor:_e.colorSplit,tailWidth:_e.lineWidthBold,dotBorderWidth:_e.wireframe?_e.lineWidthBold:_e.lineWidth*3,dotBg:_e.colorBgContainer,itemPaddingBottom:_e.padding*1.25})),Ee=function(_e,Je){var Xe={};for(var ht in _e)Object.prototype.hasOwnProperty.call(_e,ht)&&Je.indexOf(ht)<0&&(Xe[ht]=_e[ht]);if(_e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,ht=Object.getOwnPropertySymbols(_e);Ze<ht.length;Ze++)Je.indexOf(ht[Ze])<0&&Object.prototype.propertyIsEnumerable.call(_e,ht[Ze])&&(Xe[ht[Ze]]=_e[ht[Ze]]);return Xe};const Me=_e=>{const{getPrefixCls:Je,direction:Xe,timeline:ht}=He.useContext(lt.E_),{prefixCls:Ze,children:Mt,items:ot,className:Ot,style:Pt}=_e,Dt=Ee(_e,["prefixCls","children","items","className","style"]),Wt=Je("timeline",Ze),[Lt,qe]=ve(Wt),Ke=te(ot,Mt);return Lt(He.createElement(at,Object.assign({},Dt,{className:Te()(ht==null?void 0:ht.className,Ot),style:Object.assign(Object.assign({},ht==null?void 0:ht.style),Pt),prefixCls:Wt,direction:Xe,items:Ke,hashId:qe})))};Me.Item=Le;var Be=Me,je=Be},17574:function(Tn,xn,me){"use strict";me.d(xn,{default:function(){return qe}});var le=me(23130),Te=me(26407),He=me(52671),lt=me(8657),We=me(92413),Ve=me(59301),Le={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"},Ct=Le,xt=me(7657),Ue=function(Rt,Sn){return Ve.createElement(xt.Z,(0,We.Z)({},Rt,{ref:Sn,icon:Ct}))},bt=Ve.forwardRef(Ue),at=bt,mt=me(92310),Oe=me.n(mt),te=me(35654),ee=me(71430),de=me(36355),se=me(56082),he=me(62892),ve=me(20648);const Ee=4;function Me(Ke){const{dropPosition:Rt,dropLevelOffset:Sn,prefixCls:Pn,indent:_t,direction:rn="ltr"}=Ke,ln=rn==="ltr"?"left":"right",Wn=rn==="ltr"?"right":"left",un={[ln]:-Sn*_t+Ee,[Wn]:0};switch(Rt){case-1:un.top=-3;break;case 1:un.bottom=-3;break;default:un.bottom=-3,un[ln]=_t+Ee;break}return Ve.createElement("div",{style:un,className:`${Pn}-drop-indicator`})}var Be=me(71997),_e=Ve.forwardRef((Ke,Rt)=>{const{getPrefixCls:Sn,direction:Pn,virtual:_t,tree:rn}=Ve.useContext(de.E_),{prefixCls:ln,className:Wn,showIcon:un=!1,showLine:_n,switcherIcon:St,blockNode:Zn=!1,children:li,checkable:Ge=!1,selectable:be=!0,draggable:Pe,motion:Ae,style:Ne}=Ke,xe=Sn("tree",ln),ut=Sn(),Bt=Ae!=null?Ae:Object.assign(Object.assign({},(0,he.Z)(ut)),{motionAppear:!1}),Qe=Object.assign(Object.assign({},Ke),{checkable:Ge,selectable:be,showIcon:un,motion:Bt,blockNode:Zn,showLine:!!_n,dropIndicatorRender:Me}),[it,Ft]=(0,ve.ZP)(xe),Nt=Ve.useMemo(()=>{if(!Pe)return!1;let Kt={};switch(typeof Pe){case"function":Kt.nodeDraggable=Pe;break;case"object":Kt=Object.assign({},Pe);break;default:break}return Kt.icon!==!1&&(Kt.icon=Kt.icon||Ve.createElement(se.Z,null)),Kt},[Pe]),dt=Kt=>Ve.createElement(Be.Z,{prefixCls:xe,switcherIcon:St,treeNodeProps:Kt,showLine:_n});return it(Ve.createElement(le.Z,Object.assign({itemHeight:20,ref:Rt,virtual:_t},Qe,{style:Object.assign(Object.assign({},rn==null?void 0:rn.style),Ne),prefixCls:xe,className:Oe()({[`${xe}-icon-hide`]:!un,[`${xe}-block-node`]:Zn,[`${xe}-unselectable`]:!be,[`${xe}-rtl`]:Pn==="rtl"},rn==null?void 0:rn.className,Wn,Ft),direction:Pn,checkable:Ge&&Ve.createElement("span",{className:`${xe}-checkbox-inner`}),selectable:be,switcherIcon:dt,draggable:Nt}),li))}),Je;(function(Ke){Ke[Ke.None=0]="None",Ke[Ke.Start=1]="Start",Ke[Ke.End=2]="End"})(Je||(Je={}));function Xe(Ke,Rt){function Sn(Pn){const{key:_t,children:rn}=Pn;Rt(_t,Pn)!==!1&&Xe(rn||[],Rt)}Ke.forEach(Sn)}function ht(Ke){let{treeData:Rt,expandedKeys:Sn,startKey:Pn,endKey:_t}=Ke;const rn=[];let ln=Je.None;if(Pn&&Pn===_t)return[Pn];if(!Pn||!_t)return[];function Wn(un){return un===Pn||un===_t}return Xe(Rt,un=>{if(ln===Je.End)return!1;if(Wn(un)){if(rn.push(un),ln===Je.None)ln=Je.Start;else if(ln===Je.Start)return ln=Je.End,!1}else ln===Je.Start&&rn.push(un);return Sn.includes(un)}),rn}function Ze(Ke,Rt){const Sn=(0,Te.Z)(Rt),Pn=[];return Xe(Ke,(_t,rn)=>{const ln=Sn.indexOf(_t);return ln!==-1&&(Pn.push(rn),Sn.splice(ln,1)),!!Sn.length}),Pn}var Mt=function(Ke,Rt){var Sn={};for(var Pn in Ke)Object.prototype.hasOwnProperty.call(Ke,Pn)&&Rt.indexOf(Pn)<0&&(Sn[Pn]=Ke[Pn]);if(Ke!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,Pn=Object.getOwnPropertySymbols(Ke);_t<Pn.length;_t++)Rt.indexOf(Pn[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ke,Pn[_t])&&(Sn[Pn[_t]]=Ke[Pn[_t]]);return Sn};function ot(Ke){const{isLeaf:Rt,expanded:Sn}=Ke;return Rt?Ve.createElement(He.Z,null):Sn?Ve.createElement(lt.Z,null):Ve.createElement(at,null)}function Ot(Ke){let{treeData:Rt,children:Sn}=Ke;return Rt||(0,ee.zn)(Sn)}const Pt=(Ke,Rt)=>{var{defaultExpandAll:Sn,defaultExpandParent:Pn,defaultExpandedKeys:_t}=Ke,rn=Mt(Ke,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const ln=Ve.useRef(),Wn=Ve.useRef(),un=()=>{const{keyEntities:Nt}=(0,ee.I8)(Ot(rn));let dt;return Sn?dt=Object.keys(Nt):Pn?dt=(0,te.r7)(rn.expandedKeys||_t||[],Nt):dt=rn.expandedKeys||_t,dt},[_n,St]=Ve.useState(rn.selectedKeys||rn.defaultSelectedKeys||[]),[Zn,li]=Ve.useState(()=>un());Ve.useEffect(()=>{"selectedKeys"in rn&&St(rn.selectedKeys)},[rn.selectedKeys]),Ve.useEffect(()=>{"expandedKeys"in rn&&li(rn.expandedKeys)},[rn.expandedKeys]);const Ge=(Nt,dt)=>{var Kt;return"expandedKeys"in rn||li(Nt),(Kt=rn.onExpand)===null||Kt===void 0?void 0:Kt.call(rn,Nt,dt)},be=(Nt,dt)=>{var Kt;const{multiple:wn}=rn,{node:sn,nativeEvent:qt}=dt,{key:Rn=""}=sn,Vn=Ot(rn),hn=Object.assign(Object.assign({},dt),{selected:!0}),Yn=(qt==null?void 0:qt.ctrlKey)||(qt==null?void 0:qt.metaKey),mi=qt==null?void 0:qt.shiftKey;let jn;wn&&Yn?(jn=Nt,ln.current=Rn,Wn.current=jn,hn.selectedNodes=Ze(Vn,jn)):wn&&mi?(jn=Array.from(new Set([].concat((0,Te.Z)(Wn.current||[]),(0,Te.Z)(ht({treeData:Vn,expandedKeys:Zn,startKey:Rn,endKey:ln.current}))))),hn.selectedNodes=Ze(Vn,jn)):(jn=[Rn],ln.current=Rn,Wn.current=jn,hn.selectedNodes=Ze(Vn,jn)),(Kt=rn.onSelect)===null||Kt===void 0||Kt.call(rn,jn,hn),"selectedKeys"in rn||St(jn)},{getPrefixCls:Pe,direction:Ae}=Ve.useContext(de.E_),{prefixCls:Ne,className:xe,showIcon:ut=!0,expandAction:Bt="click"}=rn,Qe=Mt(rn,["prefixCls","className","showIcon","expandAction"]),it=Pe("tree",Ne),Ft=Oe()(`${it}-directory`,{[`${it}-directory-rtl`]:Ae==="rtl"},xe);return Ve.createElement(_e,Object.assign({icon:ot,ref:Rt,blockNode:!0},Qe,{showIcon:ut,expandAction:Bt,prefixCls:it,className:Ft,expandedKeys:Zn,selectedKeys:_n,onSelect:be,onExpand:Ge}))};var Wt=Ve.forwardRef(Pt);const Lt=_e;Lt.DirectoryTree=Wt,Lt.TreeNode=le.O;var qe=Lt},20648:function(Tn,xn,me){"use strict";me.d(xn,{TM:function(){return mt},Yk:function(){return at}});var le=me(93083),Te=me(98447),He=me(17313),lt=me(8378),We=me(37613),Ve=me(83116);const Le=new le.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Ct=(Oe,te)=>({[`.${Oe}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${te.motionDurationSlow}`}}}),xt=(Oe,te)=>({[`.${Oe}-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:'""'}}}),Ue=(Oe,te)=>{const{treeCls:ee,treeNodeCls:de,treeNodePadding:se,titleHeight:he,nodeSelectedBg:ve,nodeHoverBg:Ee}=te,Me=te.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,He.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,He.oN)(te)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${de}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${te.colorPrimary}`,opacity:0,animationName:Le,animationDuration:te.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${de}`]:{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,He.oN)(te)),[`&:not(${de}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:he,lineHeight:`${he}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${te.motionDurationSlow}`,[`${de}:hover &`]:{opacity:.45}},[`&${de}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:he}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},Ct(Oe,te)),{position:"relative",flex:"none",alignSelf:"stretch",width:he,margin:0,lineHeight:`${he}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:te.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:he/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:he/2*.8,height:he/2,borderBottom:`1px solid ${te.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:Me},[`${ee}-node-content-wrapper, ${ee}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:he,margin:0,padding:`0 ${te.paddingXS/2}px`,color:"inherit",lineHeight:`${he}px`,background:"transparent",borderRadius:te.borderRadius,cursor:"pointer",transition:`all ${te.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:Ee},[`&${ee}-node-selected`]:{backgroundColor:ve},[`${ee}-iconEle`]:{display:"inline-block",width:he,height:he,lineHeight:`${he}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${ee}-unselectable ${ee}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${ee}-node-content-wrapper`]:Object.assign({lineHeight:`${he}px`,userSelect:"none"},xt(Oe,te)),[`${de}.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:he/2,bottom:-se,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${de}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${he/2}px !important`}}}}})}},bt=Oe=>{const{treeCls:te,treeNodeCls:ee,treeNodePadding:de,directoryNodeSelectedBg:se,directoryNodeSelectedColor:he}=Oe;return{[`${te}${te}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:de,insetInlineStart:0,transition:`background-color ${Oe.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Oe.controlItemBgHover}},"> *":{zIndex:1},[`${te}-switcher`]:{transition:`color ${Oe.motionDurationMid}`},[`${te}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${te}-node-selected`]:{color:he,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${te}-switcher`]:{color:he},[`${te}-node-content-wrapper`]:{color:he,background:"transparent"}}}}}},at=(Oe,te)=>{const ee=`.${Oe}`,de=`${ee}-treenode`,se=te.paddingXS/2,he=(0,We.TS)(te,{treeCls:ee,treeNodeCls:de,treeNodePadding:se});return[Ue(Oe,he),bt(he)]},mt=Oe=>{const{controlHeightSM:te}=Oe;return{titleHeight:te,nodeHoverBg:Oe.controlItemBgHover,nodeSelectedBg:Oe.controlItemBgActive}};xn.ZP=(0,Ve.Z)("Tree",(Oe,te)=>{let{prefixCls:ee}=te;return[{[Oe.componentCls]:(0,Te.C2)(`${ee}-checkbox`,Oe)},at(ee,Oe),(0,lt.Z)(Oe)]},Oe=>{const{colorTextLightSolid:te,colorPrimary:ee}=Oe;return Object.assign(Object.assign({},mt(Oe)),{directoryNodeSelectedColor:te,directoryNodeSelectedBg:ee})})},71997:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return de}});var le=me(92413),Te=me(59301),He={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"},lt=He,We=me(7657),Ve=function(he,ve){return Te.createElement(We.Z,(0,le.Z)({},he,{ref:ve,icon:lt}))},Le=Te.forwardRef(Ve),Ct=Le,xt=me(52671),Ue=me(58617),bt=me(15075),at=me(43531),mt=me(92310),Oe=me.n(mt),te=me(92343),de=se=>{const{prefixCls:he,switcherIcon:ve,treeNodeProps:Ee,showLine:Me}=se,{isLeaf:Be,expanded:je,loading:_e}=Ee;if(_e)return Te.createElement(Ue.Z,{className:`${he}-switcher-loading-icon`});let Je;if(Me&&typeof Me=="object"&&(Je=Me.showLeafIcon),Be){if(!Me)return null;if(typeof Je!="boolean"&&Je){const Ze=typeof Je=="function"?Je(Ee):Je,Mt=`${he}-switcher-line-custom-icon`;return(0,te.l$)(Ze)?(0,te.Tm)(Ze,{className:Oe()(Ze.props.className||"",Mt)}):Ze}return Je?Te.createElement(xt.Z,{className:`${he}-switcher-line-icon`}):Te.createElement("span",{className:`${he}-switcher-leaf-line`})}const Xe=`${he}-switcher-icon`,ht=typeof ve=="function"?ve(Ee):ve;return(0,te.l$)(ht)?(0,te.Tm)(ht,{className:Oe()(ht.props.className||"",Xe)}):ht!==void 0?ht:Me?je?Te.createElement(bt.Z,{className:`${he}-switcher-line-icon`}):Te.createElement(at.Z,{className:`${he}-switcher-line-icon`}):Te.createElement(Ct,{className:Xe})}},99498:function(Tn,xn,me){(function(le){le(me(89780))})(function(le){le.defineOption("placeholder","",function(Ct,xt,Ue){var bt=Ue&&Ue!=le.Init;if(xt&&!bt)Ct.on("blur",We),Ct.on("change",Ve),Ct.on("swapDoc",Ve),le.on(Ct.getInputField(),"compositionupdate",Ct.state.placeholderCompose=function(){lt(Ct)}),Ve(Ct);else if(!xt&&bt){Ct.off("blur",We),Ct.off("change",Ve),Ct.off("swapDoc",Ve),le.off(Ct.getInputField(),"compositionupdate",Ct.state.placeholderCompose),Te(Ct);var at=Ct.getWrapperElement();at.className=at.className.replace(" CodeMirror-empty","")}xt&&!Ct.hasFocus()&&We(Ct)});function Te(Ct){Ct.state.placeholder&&(Ct.state.placeholder.parentNode.removeChild(Ct.state.placeholder),Ct.state.placeholder=null)}function He(Ct){Te(Ct);var xt=Ct.state.placeholder=document.createElement("pre");xt.style.cssText="height: 0; overflow: visible",xt.style.direction=Ct.getOption("direction"),xt.className="CodeMirror-placeholder CodeMirror-line-like";var Ue=Ct.getOption("placeholder");typeof Ue=="string"&&(Ue=document.createTextNode(Ue)),xt.appendChild(Ue),Ct.display.lineSpace.insertBefore(xt,Ct.display.lineSpace.firstChild)}function lt(Ct){setTimeout(function(){var xt=!1,Ue=Ct.getInputField();Ue.nodeName=="TEXTAREA"?xt=!Ue.value:Ct.lineCount()==1&&(xt=!/[^\u200b]/.test(Ue.querySelector(".CodeMirror-line").textContent)),xt?He(Ct):Te(Ct)},20)}function We(Ct){Le(Ct)&&He(Ct)}function Ve(Ct){var xt=Ct.getWrapperElement(),Ue=Le(Ct);xt.className=xt.className.replace(" CodeMirror-empty","")+(Ue?" CodeMirror-empty":""),Ue?He(Ct):Te(Ct)}function Le(Ct){return Ct.lineCount()===1&&Ct.getLine(0)===""}})},25717:function(Tn,xn,me){(function(le){le(me(89780))})(function(le){var Te={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},He=le.Pos;le.defineOption("autoCloseBrackets",!1,function(te,ee,de){de&&de!=le.Init&&(te.removeKeyMap(We),te.state.closeBrackets=null),ee&&(Ve(lt(ee,"pairs")),te.state.closeBrackets=ee,te.addKeyMap(We))});function lt(te,ee){return ee=="pairs"&&typeof te=="string"?te:typeof te=="object"&&te[ee]!=null?te[ee]:Te[ee]}var We={Backspace:xt,Enter:Ue};function Ve(te){for(var ee=0;ee<te.length;ee++){var de=te.charAt(ee),se="'"+de+"'";We[se]||(We[se]=Le(de))}}Ve(Te.pairs+"`");function Le(te){return function(ee){return at(ee,te)}}function Ct(te){var ee=te.state.closeBrackets;if(!ee||ee.override)return ee;var de=te.getModeAt(te.getCursor());return de.closeBrackets||ee}function xt(te){var ee=Ct(te);if(!ee||te.getOption("disableInput"))return le.Pass;for(var de=lt(ee,"pairs"),se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return le.Pass;var ve=mt(te,se[he].head);if(!ve||de.indexOf(ve)%2!=0)return le.Pass}for(var he=se.length-1;he>=0;he--){var Ee=se[he].head;te.replaceRange("",He(Ee.line,Ee.ch-1),He(Ee.line,Ee.ch+1),"+delete")}}function Ue(te){var ee=Ct(te),de=ee&<(ee,"explode");if(!de||te.getOption("disableInput"))return le.Pass;for(var se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return le.Pass;var ve=mt(te,se[he].head);if(!ve||de.indexOf(ve)%2!=0)return le.Pass}te.operation(function(){var Ee=te.lineSeparator()||`
|
|
|
`;te.replaceSelection(Ee+Ee,null),te.execCommand("goCharLeft"),se=te.listSelections();for(var Me=0;Me<se.length;Me++){var Be=se[Me].head.line;te.indentLine(Be,null,!0),te.indentLine(Be+1,null,!0)}})}function bt(te){var ee=le.cmpPos(te.anchor,te.head)>0;return{anchor:new He(te.anchor.line,te.anchor.ch+(ee?-1:1)),head:new He(te.head.line,te.head.ch+(ee?1:-1))}}function at(te,ee){var de=Ct(te);if(!de||te.getOption("disableInput"))return le.Pass;var se=lt(de,"pairs"),he=se.indexOf(ee);if(he==-1)return le.Pass;for(var ve=lt(de,"closeBefore"),Ee=lt(de,"triples"),Me=se.charAt(he+1)==ee,Be=te.listSelections(),je=he%2==0,_e,Je=0;Je<Be.length;Je++){var Xe=Be[Je],ht=Xe.head,Ze,Mt=te.getRange(ht,He(ht.line,ht.ch+1));if(je&&!Xe.empty())Ze="surround";else if((Me||!je)&&Mt==ee)Me&&Oe(te,ht)?Ze="both":Ee.indexOf(ee)>=0&&te.getRange(ht,He(ht.line,ht.ch+3))==ee+ee+ee?Ze="skipThree":Ze="skip";else if(Me&&ht.ch>1&&Ee.indexOf(ee)>=0&&te.getRange(He(ht.line,ht.ch-2),ht)==ee+ee){if(ht.ch>2&&/\bstring/.test(te.getTokenTypeAt(He(ht.line,ht.ch-2))))return le.Pass;Ze="addFour"}else if(Me){var ot=ht.ch==0?" ":te.getRange(He(ht.line,ht.ch-1),ht);if(!le.isWordChar(Mt)&&ot!=ee&&!le.isWordChar(ot))Ze="both";else return le.Pass}else if(je&&(Mt.length===0||/\s/.test(Mt)||ve.indexOf(Mt)>-1))Ze="both";else return le.Pass;if(!_e)_e=Ze;else if(_e!=Ze)return le.Pass}var Ot=he%2?se.charAt(he-1):ee,Pt=he%2?ee:se.charAt(he+1);te.operation(function(){if(_e=="skip")te.execCommand("goCharRight");else if(_e=="skipThree")for(var Dt=0;Dt<3;Dt++)te.execCommand("goCharRight");else if(_e=="surround"){for(var Wt=te.getSelections(),Dt=0;Dt<Wt.length;Dt++)Wt[Dt]=Ot+Wt[Dt]+Pt;te.replaceSelections(Wt,"around"),Wt=te.listSelections().slice();for(var Dt=0;Dt<Wt.length;Dt++)Wt[Dt]=bt(Wt[Dt]);te.setSelections(Wt)}else _e=="both"?(te.replaceSelection(Ot+Pt,null),te.triggerElectric(Ot+Pt),te.execCommand("goCharLeft")):_e=="addFour"&&(te.replaceSelection(Ot+Ot+Ot+Ot,"before"),te.execCommand("goCharRight"))})}function mt(te,ee){var de=te.getRange(He(ee.line,ee.ch-1),He(ee.line,ee.ch+1));return de.length==2?de:null}function Oe(te,ee){var de=te.getTokenAt(He(ee.line,ee.ch+1));return/\bstring/.test(de.type)&&de.start==ee.ch&&(ee.ch==0||!/\bstring/.test(te.getTokenTypeAt(ee)))}})},6313:function(Tn,xn,me){(function(le){le(me(89780),me(32855))})(function(le){le.defineOption("autoCloseTags",!1,function(xt,Ue,bt){if(bt!=le.Init&&bt&&xt.removeKeyMap("autoCloseTags"),!!Ue){var at={name:"autoCloseTags"};(typeof Ue!="object"||Ue.whenClosing!==!1)&&(at["'/'"]=function(mt){return Ve(mt)}),(typeof Ue!="object"||Ue.whenOpening!==!1)&&(at["'>'"]=function(mt){return lt(mt)}),xt.addKeyMap(at)}});var Te=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],He=["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 lt(xt){if(xt.getOption("disableInput"))return le.Pass;for(var Ue=xt.listSelections(),bt=[],at=xt.getOption("autoCloseTags"),mt=0;mt<Ue.length;mt++){if(!Ue[mt].empty())return le.Pass;var Oe=Ue[mt].head,te=xt.getTokenAt(Oe),ee=le.innerMode(xt.getMode(),te.state),de=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(de),he=se&&se.name;if(!he)return le.Pass;var ve=ee.mode.configuration=="html",Ee=typeof at=="object"&&at.dontCloseTags||ve&&Te,Me=typeof at=="object"&&at.indentTags||ve&&He;te.end>Oe.ch&&(he=he.slice(0,he.length-te.end+Oe.ch));var Be=he.toLowerCase();if(!he||te.type=="string"&&(te.end!=Oe.ch||!/[\"\']/.test(te.string.charAt(te.string.length-1))||te.string.length==1)||te.type=="tag"&&se.close||te.string.indexOf("/")==Oe.ch-te.start-1||Ee&&Le(Ee,Be)>-1||Ct(xt,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(de)||[],he,Oe,!0))return le.Pass;var je=typeof at=="object"&&at.emptyTags;if(je&&Le(je,he)>-1){bt[mt]={text:"/>",newPos:le.Pos(Oe.line,Oe.ch+2)};continue}var _e=Me&&Le(Me,Be)>-1;bt[mt]={indent:_e,text:">"+(_e?`
|
|
|
|
|
|
`:"")+"</"+he+">",newPos:_e?le.Pos(Oe.line+1,0):le.Pos(Oe.line,Oe.ch+1)}}for(var Je=typeof at=="object"&&at.dontIndentOnAutoClose,mt=Ue.length-1;mt>=0;mt--){var Xe=bt[mt];xt.replaceRange(Xe.text,Ue[mt].head,Ue[mt].anchor,"+insert");var ht=xt.listSelections().slice(0);ht[mt]={head:Xe.newPos,anchor:Xe.newPos},xt.setSelections(ht),!Je&&Xe.indent&&(xt.indentLine(Xe.newPos.line,null,!0),xt.indentLine(Xe.newPos.line+1,null,!0))}}function We(xt,Ue){for(var bt=xt.listSelections(),at=[],mt=Ue?"/":"</",Oe=xt.getOption("autoCloseTags"),te=typeof Oe=="object"&&Oe.dontIndentOnSlash,ee=0;ee<bt.length;ee++){if(!bt[ee].empty())return le.Pass;var de=bt[ee].head,se=xt.getTokenAt(de),he=le.innerMode(xt.getMode(),se.state),ve=he.state;if(Ue&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=de.ch-1))return le.Pass;var Ee,Me=he.mode.name!="xml"&&xt.getMode().name=="htmlmixed";if(Me&&he.mode.name=="javascript")Ee=mt+"script";else if(Me&&he.mode.name=="css")Ee=mt+"style";else{var Be=he.mode.xmlCurrentContext&&he.mode.xmlCurrentContext(ve);if(!Be||Be.length&&Ct(xt,Be,Be[Be.length-1],de))return le.Pass;Ee=mt+Be[Be.length-1]}xt.getLine(de.line).charAt(se.end)!=">"&&(Ee+=">"),at[ee]=Ee}if(xt.replaceSelections(at),bt=xt.listSelections(),!te)for(var ee=0;ee<bt.length;ee++)(ee==bt.length-1||bt[ee].head.line<bt[ee+1].head.line)&&xt.indentLine(bt[ee].head.line)}function Ve(xt){return xt.getOption("disableInput")?le.Pass:We(xt,!0)}le.commands.closeTag=function(xt){return We(xt)};function Le(xt,Ue){if(xt.indexOf)return xt.indexOf(Ue);for(var bt=0,at=xt.length;bt<at;++bt)if(xt[bt]==Ue)return bt;return-1}function Ct(xt,Ue,bt,at,mt){if(!le.scanForClosingTag)return!1;var Oe=Math.min(xt.lastLine()+1,at.line+500),te=le.scanForClosingTag(xt,at,null,Oe);if(!te||te.tag!=bt)return!1;for(var ee=mt?1:0,de=Ue.length-1;de>=0&&Ue[de]==bt;de--)++ee;at=te.to;for(var de=1;de<ee;de++){var se=le.scanForClosingTag(xt,at,null,Oe);if(!se||se.tag!=bt)return!1;at=se.to}return!0}})},32855:function(Tn,xn,me){(function(le){le(me(89780))})(function(le){"use strict";var Te=le.Pos;function He(de,se){return de.line-se.line||de.ch-se.ch}var lt="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",We=lt+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ve=new RegExp("<(/?)(["+lt+"]["+We+"]*)","g");function Le(de,se,he,ve){this.line=se,this.ch=he,this.cm=de,this.text=de.getLine(se),this.min=ve?Math.max(ve.from,de.firstLine()):de.firstLine(),this.max=ve?Math.min(ve.to-1,de.lastLine()):de.lastLine()}function Ct(de,se){var he=de.cm.getTokenTypeAt(Te(de.line,se));return he&&/\btag\b/.test(he)}function xt(de){if(!(de.line>=de.max))return de.ch=0,de.text=de.cm.getLine(++de.line),!0}function Ue(de){if(!(de.line<=de.min))return de.text=de.cm.getLine(--de.line),de.ch=de.text.length,!0}function bt(de){for(;;){var se=de.text.indexOf(">",de.ch);if(se==-1){if(xt(de))continue;return}if(!Ct(de,se+1)){de.ch=se+1;continue}var he=de.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(de.text.slice(he+1,se));return de.ch=se+1,ve?"selfClose":"regular"}}function at(de){for(;;){var se=de.ch?de.text.lastIndexOf("<",de.ch-1):-1;if(se==-1){if(Ue(de))continue;return}if(!Ct(de,se+1)){de.ch=se;continue}Ve.lastIndex=se,de.ch=se;var he=Ve.exec(de.text);if(he&&he.index==se)return he}}function mt(de){for(;;){Ve.lastIndex=de.ch;var se=Ve.exec(de.text);if(!se){if(xt(de))continue;return}if(!Ct(de,se.index+1)){de.ch=se.index+1;continue}return de.ch=se.index+se[0].length,se}}function Oe(de){for(;;){var se=de.ch?de.text.lastIndexOf(">",de.ch-1):-1;if(se==-1){if(Ue(de))continue;return}if(!Ct(de,se+1)){de.ch=se;continue}var he=de.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(de.text.slice(he+1,se));return de.ch=se+1,ve?"selfClose":"regular"}}function te(de,se){for(var he=[];;){var ve=mt(de),Ee,Me=de.line,Be=de.ch-(ve?ve[0].length:0);if(!ve||!(Ee=bt(de)))return;if(Ee!="selfClose")if(ve[1]){for(var je=he.length-1;je>=0;--je)if(he[je]==ve[2]){he.length=je;break}if(je<0&&(!se||se==ve[2]))return{tag:ve[2],from:Te(Me,Be),to:Te(de.line,de.ch)}}else he.push(ve[2])}}function ee(de,se){for(var he=[];;){var ve=Oe(de);if(!ve)return;if(ve=="selfClose"){at(de);continue}var Ee=de.line,Me=de.ch,Be=at(de);if(!Be)return;if(Be[1])he.push(Be[2]);else{for(var je=he.length-1;je>=0;--je)if(he[je]==Be[2]){he.length=je;break}if(je<0&&(!se||se==Be[2]))return{tag:Be[2],from:Te(de.line,de.ch),to:Te(Ee,Me)}}}}le.registerHelper("fold","xml",function(de,se){for(var he=new Le(de,se.line,0);;){var ve=mt(he);if(!ve||he.line!=se.line)return;var Ee=bt(he);if(!Ee)return;if(!ve[1]&&Ee!="selfClose"){var Me=Te(he.line,he.ch),Be=te(he,ve[2]);return Be&&He(Be.from,Me)>0?{from:Me,to:Be.from}:null}}}),le.findMatchingTag=function(de,se,he){var ve=new Le(de,se.line,se.ch,he);if(!(ve.text.indexOf(">")==-1&&ve.text.indexOf("<")==-1)){var Ee=bt(ve),Me=Ee&&Te(ve.line,ve.ch),Be=Ee&&at(ve);if(!(!Ee||!Be||He(ve,se)>0)){var je={from:Te(ve.line,ve.ch),to:Me,tag:Be[2]};return Ee=="selfClose"?{open:je,close:null,at:"open"}:Be[1]?{open:ee(ve,Be[2]),close:je,at:"close"}:(ve=new Le(de,Me.line,Me.ch,he),{open:je,close:te(ve,Be[2]),at:"open"})}}},le.findEnclosingTag=function(de,se,he,ve){for(var Ee=new Le(de,se.line,se.ch,he);;){var Me=ee(Ee,ve);if(!Me)break;var Be=new Le(de,se.line,se.ch,he),je=te(Be,Me.tag);if(je)return{open:Me,close:je}}},le.scanForClosingTag=function(de,se,he,ve){var Ee=new Le(de,se.line,se.ch,ve?{from:0,to:ve}:null);return te(Ee,he)}})},89780:function(Tn){(function(xn,me){Tn.exports=me()})(this,function(){"use strict";var xn=navigator.userAgent,me=navigator.platform,le=/gecko\/\d/i.test(xn),Te=/MSIE \d/.test(xn),He=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xn),lt=/Edge\/(\d+)/.exec(xn),We=Te||He||lt,Ve=We&&(Te?document.documentMode||6:+(lt||He)[1]),Le=!lt&&/WebKit\//.test(xn),Ct=Le&&/Qt\/\d+\.\d+/.test(xn),xt=!lt&&/Chrome\//.test(xn),Ue=/Opera\//.test(xn),bt=/Apple Computer/.test(navigator.vendor),at=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(xn),mt=/PhantomJS/.test(xn),Oe=!lt&&/AppleWebKit/.test(xn)&&/Mobile\/\w+/.test(xn),te=/Android/.test(xn),ee=Oe||te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(xn),de=Oe||/Mac/.test(me),se=/\bCrOS\b/.test(xn),he=/win/i.test(me),ve=Ue&&xn.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&(Ue=!1,Le=!0);var Ee=de&&(Ct||Ue&&(ve==null||ve<12.11)),Me=le||We&&Ve>=9;function Be(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var je=function(ie,ae){var ge=ie.className,fe=Be(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 _e(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function Je(ie,ae){return _e(ie).appendChild(ae)}function Xe(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 Re=0;Re<ae.length;++Re)ye.appendChild(ae[Re]);return ye}function ht(ie,ae,ge,fe){var ye=Xe(ie,ae,ge,fe);return ye.setAttribute("role","presentation"),ye}var Ze;document.createRange?Ze=function(ie,ae,ge,fe){var ye=document.createRange();return ye.setEnd(fe||ie,ge),ye.setStart(ie,ae),ye}:Ze=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 Mt(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 ot(){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 Ot(ie,ae){var ge=ie.className;Be(ae).test(ge)||(ie.className+=(ge?" ":"")+ae)}function Pt(ie,ae){for(var ge=ie.split(" "),fe=0;fe<ge.length;fe++)ge[fe]&&!Be(ge[fe]).test(ae)&&(ae+=" "+ge[fe]);return ae}var Dt=function(ie){ie.select()};Oe?Dt=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:We&&(Dt=function(ie){try{ie.select()}catch(ae){}});function Wt(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Lt(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 qe(ie,ae,ge,fe,ye){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Re=fe||0,Ye=ye||0;;){var pt=ie.indexOf(" ",Re);if(pt<0||pt>=ae)return Ye+(ae-Re);Ye+=pt-Re,Ye+=ge-Ye%ge,Re=pt+1}}var Ke=function(){this.id=null,this.f=null,this.time=0,this.handler=Wt(this.onTimeout,this)};Ke.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ke.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 Rt(ie,ae){for(var ge=0;ge<ie.length;++ge)if(ie[ge]==ae)return ge;return-1}var Sn=50,Pn={toString:function(){return"CodeMirror.Pass"}},_t={scroll:!1},rn={origin:"*mouse"},ln={origin:"+move"};function Wn(ie,ae,ge){for(var fe=0,ye=0;;){var Re=ie.indexOf(" ",fe);Re==-1&&(Re=ie.length);var Ye=Re-fe;if(Re==ie.length||ye+Ye>=ae)return fe+Math.min(Ye,ae-ye);if(ye+=Re-fe,ye+=ge-ye%ge,fe=Re+1,ye>=ae)return fe}}var un=[""];function _n(ie){for(;un.length<=ie;)un.push(St(un)+" ");return un[ie]}function St(ie){return ie[ie.length-1]}function Zn(ie,ae){for(var ge=[],fe=0;fe<ie.length;fe++)ge[fe]=ae(ie[fe],fe);return ge}function li(ie,ae,ge){for(var fe=0,ye=ge(ae);fe<ie.length&&ge(ie[fe])<=ye;)fe++;ie.splice(fe,0,ae)}function Ge(){}function be(ie,ae){var ge;return Object.create?ge=Object.create(ie):(Ge.prototype=ie,ge=new Ge),ae&&Lt(ae,ge),ge}var Pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ae(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Pe.test(ie))}function Ne(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Ae(ie)?!0:ae.test(ie):Ae(ie)}function xe(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var ut=/[\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 Bt(ie){return ie.charCodeAt(0)>=768&&ut.test(ie)}function Qe(ie,ae,ge){for(;(ge<0?ae>0:ae<ie.length)&&Bt(ie.charAt(ae));)ae+=ge;return ae}function it(ie,ae,ge){for(var fe=ae>ge?-1:1;;){if(ae==ge)return ae;var ye=(ae+ge)/2,Re=fe<0?Math.ceil(ye):Math.floor(ye);if(Re==ae)return ie(Re)?ae:ge;ie(Re)?ge=Re:ae=Re+fe}}function Ft(ie,ae,ge,fe){if(!ie)return fe(ae,ge,"ltr",0);for(var ye=!1,Re=0;Re<ie.length;++Re){var Ye=ie[Re];(Ye.from<ge&&Ye.to>ae||ae==ge&&Ye.to==ae)&&(fe(Math.max(Ye.from,ae),Math.min(Ye.to,ge),Ye.level==1?"rtl":"ltr",Re),ye=!0)}ye||fe(ae,ge,"ltr")}var Nt=null;function dt(ie,ae,ge){var fe;Nt=null;for(var ye=0;ye<ie.length;++ye){var Re=ie[ye];if(Re.from<ae&&Re.to>ae)return ye;Re.to==ae&&(Re.from!=Re.to&&ge=="before"?fe=ye:Nt=ye),Re.from==ae&&(Re.from!=Re.to&&ge!="before"?fe=ye:Nt=ye)}return fe!=null?fe:Nt}var Kt=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ge(jt){return jt<=247?ie.charAt(jt):1424<=jt&&jt<=1524?"R":1536<=jt&&jt<=1785?ae.charAt(jt-1536):1774<=jt&&jt<=2220?"r":8192<=jt&&jt<=8203?"w":jt==8204?"b":"L"}var fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ye=/[stwN]/,Re=/[LRr]/,Ye=/[Lb1n]/,pt=/[1n]/;function ft(jt,Mn,Ut){this.level=jt,this.from=Mn,this.to=Ut}return function(jt,Mn){var Ut=Mn=="ltr"?"L":"R";if(jt.length==0||Mn=="ltr"&&!fe.test(jt))return!1;for(var oi=jt.length,ni=[],ir=0;ir<oi;++ir)ni.push(ge(jt.charCodeAt(ir)));for(var cr=0,Br=Ut;cr<oi;++cr){var ao=ni[cr];ao=="m"?ni[cr]=Br:Br=ao}for(var Ho=0,Bo=Ut;Ho<oi;++Ho){var ea=ni[Ho];ea=="1"&&Bo=="r"?ni[Ho]="n":Re.test(ea)&&(Bo=ea,ea=="r"&&(ni[Ho]="R"))}for(var _a=1,Mo=ni[0];_a<oi-1;++_a){var ns=ni[_a];ns=="+"&&Mo=="1"&&ni[_a+1]=="1"?ni[_a]="1":ns==","&&Mo==ni[_a+1]&&(Mo=="1"||Mo=="n")&&(ni[_a]=Mo),Mo=ns}for(var rl=0;rl<oi;++rl){var ru=ni[rl];if(ru==",")ni[rl]="N";else if(ru=="%"){var Sl=void 0;for(Sl=rl+1;Sl<oi&&ni[Sl]=="%";++Sl);for(var Uu=rl&&ni[rl-1]=="!"||Sl<oi&&ni[Sl]=="1"?"1":"N",wu=rl;wu<Sl;++wu)ni[wu]=Uu;rl=Sl-1}}for(var Ql=0,Yu=Ut;Ql<oi;++Ql){var hu=ni[Ql];Yu=="L"&&hu=="1"?ni[Ql]="L":Re.test(hu)&&(Yu=hu)}for(var ql=0;ql<oi;++ql)if(ye.test(ni[ql])){var Ns=void 0;for(Ns=ql+1;Ns<oi&&ye.test(ni[Ns]);++Ns);for(var Pl=(ql?ni[ql-1]:Ut)=="L",uu=(Ns<oi?ni[Ns]:Ut)=="L",fu=Pl==uu?Pl?"L":"R":Ut,jc=ql;jc<Ns;++jc)ni[jc]=fu;ql=Ns-1}for(var wl=[],Pc,Se=0;Se<oi;)if(Ye.test(ni[Se])){var Ce=Se;for(++Se;Se<oi&&Ye.test(ni[Se]);++Se);wl.push(new ft(0,Ce,Se))}else{var ke=Se,$e=wl.length,yt=Mn=="rtl"?1:0;for(++Se;Se<oi&&ni[Se]!="L";++Se);for(var vt=ke;vt<Se;)if(pt.test(ni[vt])){ke<vt&&(wl.splice($e,0,new ft(1,ke,vt)),$e+=yt);var kt=vt;for(++vt;vt<Se&&pt.test(ni[vt]);++vt);wl.splice($e,0,new ft(2,kt,vt)),$e+=yt,ke=vt}else++vt;ke<Se&&wl.splice($e,0,new ft(1,ke,Se))}return Mn=="ltr"&&(wl[0].level==1&&(Pc=jt.match(/^\s+/))&&(wl[0].from=Pc[0].length,wl.unshift(new ft(0,0,Pc[0].length))),St(wl).level==1&&(Pc=jt.match(/\s+$/))&&(St(wl).to-=Pc[0].length,wl.push(new ft(0,oi-Pc[0].length,oi)))),Mn=="rtl"?wl.reverse():wl}}();function wn(ie,ae){var ge=ie.order;return ge==null&&(ge=ie.order=Kt(ie.text,ae)),ge}var sn=[],qt=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]||sn).concat(ge)}};function Rn(ie,ae){return ie._handlers&&ie._handlers[ae]||sn}function Vn(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 Re=Rt(ye,ge);Re>-1&&(fe[ae]=ye.slice(0,Re).concat(ye.slice(Re+1)))}}}function hn(ie,ae){var ge=Rn(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}}),hn(ie,ge||ae.type,ie,ae),Wi(ae)||ae.codemirrorIgnore}function mi(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)Rt(ge,ae[fe])==-1&&ge.push(ae[fe])}function jn(ie,ae){return Rn(ie,ae).length>0}function An(ie){ie.prototype.on=function(ae,ge){qt(this,ae,ge)},ie.prototype.off=function(ae,ge){Vn(this,ae,ge)}}function wi(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function ji(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function Wi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function dr(ie){wi(ie),ji(ie)}function Mr(ie){return ie.target||ie.srcElement}function pi(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),de&&ie.ctrlKey&&ae==1&&(ae=3),ae}var ui=function(){if(We&&Ve<9)return!1;var ie=Xe("div");return"draggable"in ie||"dragDrop"in ie}(),Ci;function Xi(ie){if(Ci==null){var ae=Xe("span","\u200B");Je(ie,Xe("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(Ci=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(We&&Ve<8))}var ge=Ci?Xe("span","\u200B"):Xe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ge.setAttribute("cm-text",""),ge}var Ni;function io(ie){if(Ni!=null)return Ni;var ae=Je(ie,document.createTextNode("A\u062EA")),ge=Ze(ae,0,1).getBoundingClientRect(),fe=Ze(ae,1,2).getBoundingClientRect();return _e(ie),!ge||ge.left==ge.right?!1:Ni=fe.right-ge.right<3}var hr=`
|
|
|
|
|
|
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 Re=ie.slice(ae,ie.charAt(ye-1)=="\r"?ye-1:ye),Ye=Re.indexOf("\r");Ye!=-1?(ge.push(Re.slice(0,Ye)),ae+=Ye+1):(ge.push(Re),ae=ye+1)}return ge}:function(ie){return ie.split(/\r\n?|\n/)},De=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},Ei=function(){var ie=Xe("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),Pr=null;function Ln(ie){if(Pr!=null)return Pr;var ae=Je(ie,Xe("span","x")),ge=ae.getBoundingClientRect(),fe=Ze(ae,0,1).getBoundingClientRect();return Pr=Math.abs(ge.left-fe.left)>1}var vi={},Zi={};function er(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),vi[ie]=ae}function Gn(ie,ae){Zi[ie]=ae}function $t(ie){if(typeof ie=="string"&&Zi.hasOwnProperty(ie))ie=Zi[ie];else if(ie&&typeof ie.name=="string"&&Zi.hasOwnProperty(ie.name)){var ae=Zi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=be(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return $t("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return $t("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Gt(ie,ae){ae=$t(ae);var ge=vi[ae.name];if(!ge)return Gt(ie,"text/plain");var fe=ge(ie,ae);if(Zt.hasOwnProperty(ae.name)){var ye=Zt[ae.name];for(var Re in ye)ye.hasOwnProperty(Re)&&(fe.hasOwnProperty(Re)&&(fe["_"+Re]=fe[Re]),fe[Re]=ye[Re])}if(fe.name=ae.name,ae.helperType&&(fe.helperType=ae.helperType),ae.modeProps)for(var Ye in ae.modeProps)fe[Ye]=ae.modeProps[Ye];return fe}var Zt={};function wt(ie,ae){var ge=Zt.hasOwnProperty(ie)?Zt[ie]:Zt[ie]={};Lt(ae,ge)}function vn(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 cn(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 It(ie,ae,ge){return ie.startState?ie.startState(ae,ge):!0}var ct=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};ct.prototype.eol=function(){return this.pos>=this.string.length},ct.prototype.sol=function(){return this.pos==this.lineStart},ct.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ct.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ct.prototype.eat=function(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},ct.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},ct.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},ct.prototype.skipToEnd=function(){this.pos=this.string.length},ct.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},ct.prototype.backUp=function(ie){this.pos-=ie},ct.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},ct.prototype.indentation=function(){return qe(this.string,null,this.tabSize)-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},ct.prototype.match=function(ie,ae,ge){if(typeof ie=="string"){var fe=function(Ye){return ge?Ye.toLowerCase():Ye},ye=this.string.substr(this.pos,ie.length);if(fe(ye)==fe(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Re=this.string.slice(this.pos).match(ie);return Re&&Re.index>0?null:(Re&&ae!==!1&&(this.pos+=Re[0].length),Re)}},ct.prototype.current=function(){return this.string.slice(this.start,this.pos)},ct.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},ct.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},ct.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function an(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],Re=ye.chunkSize();if(ae<Re){ge=ye;break}ae-=Re}return ge.lines[ae]}function dn(ie,ae,ge){var fe=[],ye=ae.line;return ie.iter(ae.line,ge.line+1,function(Re){var Ye=Re.text;ye==ge.line&&(Ye=Ye.slice(0,ge.ch)),ye==ae.line&&(Ye=Ye.slice(ae.ch)),fe.push(Ye),++ye}),fe}function ei(ie,ae,ge){var fe=[];return ie.iter(ae,ge,function(ye){fe.push(ye.text)}),fe}function pn(ie,ae){var ge=ae-ie.height;if(ge)for(var fe=ie;fe;fe=fe.parent)fe.height+=ge}function zt(ie){if(ie.parent==null)return null;for(var ae=ie.parent,ge=Rt(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 In(ie,ae){var ge=ie.first;e:do{for(var fe=0;fe<ie.children.length;++fe){var ye=ie.children[fe],Re=ye.height;if(ae<Re){ie=ye;continue e}ae-=Re,ge+=ye.chunkSize()}return ge}while(!ie.lines);for(var Ye=0;Ye<ie.lines.length;++Ye){var pt=ie.lines[Ye],ft=pt.height;if(ae<ft)break;ae-=ft}return ge+Ye}function Qn(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function xi(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function tn(ie,ae,ge){if(ge===void 0&&(ge=null),!(this instanceof tn))return new tn(ie,ae,ge);this.line=ie,this.ch=ae,this.sticky=ge}function fn(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function kn(ie,ae){return ie.sticky==ae.sticky&&fn(ie,ae)==0}function zi(ie){return tn(ie.line,ie.ch)}function Di(ie,ae){return fn(ie,ae)<0?ae:ie}function Si(ie,ae){return fn(ie,ae)<0?ie:ae}function Fi(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function Ti(ie,ae){if(ae.line<ie.first)return tn(ie.first,0);var ge=ie.first+ie.size-1;return ae.line>ge?tn(ge,an(ie,ge).text.length):nr(ae,an(ie,ae.line).text.length)}function nr(ie,ae){var ge=ie.ch;return ge==null||ge>ae?tn(ie.line,ae):ge<0?tn(ie.line,0):ie}function $r(ie,ae){for(var ge=[],fe=0;fe<ae.length;fe++)ge[fe]=Ti(ie,ae[fe]);return ge}var ci=function(ie,ae){this.state=ie,this.lookAhead=ae},Ki=function(ie,ae,ge,fe){this.state=ae,this.doc=ie,this.line=ge,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};Ki.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},Ki.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}},Ki.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ki.fromSaved=function(ie,ae,ge){return ae instanceof ci?new Ki(ie,vn(ie.mode,ae.state),ge,ae.lookAhead):new Ki(ie,vn(ie.mode,ae),ge)},Ki.prototype.save=function(ie){var ae=ie!==!1?vn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ci(ae,this.maxLookAhead):ae};function Yr(ie,ae,ge,fe){var ye=[ie.state.modeGen],Re={};lo(ie,ae.text,ie.doc.mode,ge,function(jt,Mn){return ye.push(jt,Mn)},Re,fe);for(var Ye=ge.state,pt=function(jt){ge.baseTokens=ye;var Mn=ie.state.overlays[jt],Ut=1,oi=0;ge.state=!0,lo(ie,ae.text,Mn.mode,ge,function(ni,ir){for(var cr=Ut;oi<ni;){var Br=ye[Ut];Br>ni&&ye.splice(Ut,1,ni,ye[Ut+1],Br),Ut+=2,oi=Math.min(ni,Br)}if(ir)if(Mn.opaque)ye.splice(cr,Ut-cr,ni,"overlay "+ir),Ut=cr+2;else for(;cr<Ut;cr+=2){var ao=ye[cr+1];ye[cr+1]=(ao?ao+" ":"")+"overlay "+ir}},Re),ge.state=Ye,ge.baseTokens=null,ge.baseTokenPos=1},ft=0;ft<ie.state.overlays.length;++ft)pt(ft);return{styles:ye,classes:Re.bgClass||Re.textClass?Re:null}}function Qr(ie,ae,ge){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var fe=Cr(ie,zt(ae)),ye=ae.text.length>ie.options.maxHighlightLength&&vn(ie.doc.mode,fe.state),Re=Yr(ie,ae,fe);ye&&(fe.state=ye),ae.stateAfter=fe.save(!ye),ae.styles=Re.styles,Re.classes?ae.styleClasses=Re.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 Cr(ie,ae,ge){var fe=ie.doc,ye=ie.display;if(!fe.mode.startState)return new Ki(fe,!0,ae);var Re=Wr(ie,ae,ge),Ye=Re>fe.first&&an(fe,Re-1).stateAfter,pt=Ye?Ki.fromSaved(fe,Ye,Re):new Ki(fe,It(fe.mode),Re);return fe.iter(Re,ae,function(ft){Jt(ie,ft.text,pt);var jt=pt.line;ft.stateAfter=jt==ae-1||jt%5==0||jt>=ye.viewFrom&&jt<ye.viewTo?pt.save():null,pt.nextLine()}),ge&&(fe.modeFrontier=pt.line),pt}function Jt(ie,ae,ge,fe){var ye=ie.doc.mode,Re=new ct(ae,ie.options.tabSize,ge);for(Re.start=Re.pos=fe||0,ae==""&&gi(ye,ge.state);!Re.eol();)mr(ye,Re,ge.state),Re.start=Re.pos}function gi(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var ge=cn(ie,ae);if(ge.mode.blankLine)return ge.mode.blankLine(ge.state)}}function mr(ie,ae,ge,fe){for(var ye=0;ye<10;ye++){fe&&(fe[0]=cn(ie,ge).mode);var Re=ie.token(ae,ge);if(ae.pos>ae.start)return Re}throw new Error("Mode "+ie.name+" failed to advance stream.")}var tr=function(ie,ae,ge){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=ge};function Hr(ie,ae,ge,fe){var ye=ie.doc,Re=ye.mode,Ye;ae=Ti(ye,ae);var pt=an(ye,ae.line),ft=Cr(ie,ae.line,ge),jt=new ct(pt.text,ie.options.tabSize,ft),Mn;for(fe&&(Mn=[]);(fe||jt.pos<ae.ch)&&!jt.eol();)jt.start=jt.pos,Ye=mr(Re,jt,ft.state),fe&&Mn.push(new tr(jt,Ye,vn(ye.mode,ft.state)));return fe?Mn:new tr(jt,Ye,ft.state)}function Lr(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 lo(ie,ae,ge,fe,ye,Re,Ye){var pt=ge.flattenSpans;pt==null&&(pt=ie.options.flattenSpans);var ft=0,jt=null,Mn=new ct(ae,ie.options.tabSize,fe),Ut,oi=ie.options.addModeClass&&[null];for(ae==""&&Lr(gi(ge,fe.state),Re);!Mn.eol();){if(Mn.pos>ie.options.maxHighlightLength?(pt=!1,Ye&&Jt(ie,ae,fe,Mn.pos),Mn.pos=ae.length,Ut=null):Ut=Lr(mr(ge,Mn,fe.state,oi),Re),oi){var ni=oi[0].name;ni&&(Ut="m-"+(Ut?ni+" "+Ut:ni))}if(!pt||jt!=Ut){for(;ft<Mn.start;)ft=Math.min(Mn.start,ft+5e3),ye(ft,jt);jt=Ut}Mn.start=Mn.pos}for(;ft<Mn.pos;){var ir=Math.min(Mn.pos,ft+5e3);ye(ir,jt),ft=ir}}function Wr(ie,ae,ge){for(var fe,ye,Re=ie.doc,Ye=ge?-1:ae-(ie.doc.mode.innerMode?1e3:100),pt=ae;pt>Ye;--pt){if(pt<=Re.first)return Re.first;var ft=an(Re,pt-1),jt=ft.stateAfter;if(jt&&(!ge||pt+(jt instanceof ci?jt.lookAhead:0)<=Re.modeFrontier))return pt;var Mn=qe(ft.text,null,ie.options.tabSize);(ye==null||fe>Mn)&&(ye=pt-1,fe=Mn)}return ye}function jr(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=an(ie,fe).stateAfter;if(ye&&(!(ye instanceof ci)||fe+ye.lookAhead<ae)){ge=fe+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,ge)}}var fo=!1,$n=!1;function aa(){fo=!0}function Un(){$n=!0}function Do(ie,ae,ge){this.marker=ie,this.from=ae,this.to=ge}function Ko(ie,ae){if(ie)for(var ge=0;ge<ie.length;++ge){var fe=ie[ge];if(fe.marker==ae)return fe}}function Ji(ie,ae){for(var ge,fe=0;fe<ie.length;++fe)ie[fe]!=ae&&(ge||(ge=[])).push(ie[fe]);return ge}function la(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function Ro(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Ye=Re.marker,pt=Re.from==null||(Ye.inclusiveLeft?Re.from<=ae:Re.from<ae);if(pt||Re.from==ae&&Ye.type=="bookmark"&&(!ge||!Re.marker.insertLeft)){var ft=Re.to==null||(Ye.inclusiveRight?Re.to>=ae:Re.to>ae);(fe||(fe=[])).push(new Do(Ye,Re.from,ft?null:Re.to))}}return fe}function Nr(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Ye=Re.marker,pt=Re.to==null||(Ye.inclusiveRight?Re.to>=ae:Re.to>ae);if(pt||Re.from==ae&&Ye.type=="bookmark"&&(!ge||Re.marker.insertLeft)){var ft=Re.from==null||(Ye.inclusiveLeft?Re.from<=ae:Re.from<ae);(fe||(fe=[])).push(new Do(Ye,ft?null:Re.from-ae,Re.to==null?null:Re.to-ae))}}return fe}function Ar(ie,ae){if(ae.full)return null;var ge=Qn(ie,ae.from.line)&&an(ie,ae.from.line).markedSpans,fe=Qn(ie,ae.to.line)&&an(ie,ae.to.line).markedSpans;if(!ge&&!fe)return null;var ye=ae.from.ch,Re=ae.to.ch,Ye=fn(ae.from,ae.to)==0,pt=Ro(ge,ye,Ye),ft=Nr(fe,Re,Ye),jt=ae.text.length==1,Mn=St(ae.text).length+(jt?ye:0);if(pt)for(var Ut=0;Ut<pt.length;++Ut){var oi=pt[Ut];if(oi.to==null){var ni=Ko(ft,oi.marker);ni?jt&&(oi.to=ni.to==null?null:ni.to+Mn):oi.to=ye}}if(ft)for(var ir=0;ir<ft.length;++ir){var cr=ft[ir];if(cr.to!=null&&(cr.to+=Mn),cr.from==null){var Br=Ko(pt,cr.marker);Br||(cr.from=Mn,jt&&(pt||(pt=[])).push(cr))}else cr.from+=Mn,jt&&(pt||(pt=[])).push(cr)}pt&&(pt=xo(pt)),ft&&ft!=pt&&(ft=xo(ft));var ao=[pt];if(!jt){var Ho=ae.text.length-2,Bo;if(Ho>0&&pt)for(var ea=0;ea<pt.length;++ea)pt[ea].to==null&&(Bo||(Bo=[])).push(new Do(pt[ea].marker,null,null));for(var _a=0;_a<Ho;++_a)ao.push(Bo);ao.push(ft)}return ao}function xo(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 Wo(ie,ae,ge){var fe=null;if(ie.iter(ae.line,ge.line+1,function(ni){if(ni.markedSpans)for(var ir=0;ir<ni.markedSpans.length;++ir){var cr=ni.markedSpans[ir].marker;cr.readOnly&&(!fe||Rt(fe,cr)==-1)&&(fe||(fe=[])).push(cr)}}),!fe)return null;for(var ye=[{from:ae,to:ge}],Re=0;Re<fe.length;++Re)for(var Ye=fe[Re],pt=Ye.find(0),ft=0;ft<ye.length;++ft){var jt=ye[ft];if(!(fn(jt.to,pt.from)<0||fn(jt.from,pt.to)>0)){var Mn=[ft,1],Ut=fn(jt.from,pt.from),oi=fn(jt.to,pt.to);(Ut<0||!Ye.inclusiveLeft&&!Ut)&&Mn.push({from:jt.from,to:pt.from}),(oi>0||!Ye.inclusiveRight&&!oi)&&Mn.push({from:pt.to,to:jt.to}),ye.splice.apply(ye,Mn),ft+=Mn.length-3}}return ye}function Hi(ie){var ae=ie.markedSpans;if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.detachLine(ie);ie.markedSpans=null}}function st(ie,ae){if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.attachLine(ie);ie.markedSpans=ae}}function _o(ie){return ie.inclusiveLeft?-1:0}function Ia(ie){return ie.inclusiveRight?1:0}function Ma(ie,ae){var ge=ie.lines.length-ae.lines.length;if(ge!=0)return ge;var fe=ie.find(),ye=ae.find(),Re=fn(fe.from,ye.from)||_o(ie)-_o(ae);if(Re)return-Re;var Ye=fn(fe.to,ye.to)||Ia(ie)-Ia(ae);return Ye||ae.id-ie.id}function xs(ie,ae){var ge=$n&&ie.markedSpans,fe;if(ge)for(var ye=void 0,Re=0;Re<ge.length;++Re)ye=ge[Re],ye.marker.collapsed&&(ae?ye.from:ye.to)==null&&(!fe||Ma(fe,ye.marker)<0)&&(fe=ye.marker);return fe}function Wa(ie){return xs(ie,!0)}function Ps(ie){return xs(ie,!1)}function Lo(ie,ae){var ge=$n&&ie.markedSpans,fe;if(ge)for(var ye=0;ye<ge.length;++ye){var Re=ge[ye];Re.marker.collapsed&&(Re.from==null||Re.from<ae)&&(Re.to==null||Re.to>ae)&&(!fe||Ma(fe,Re.marker)<0)&&(fe=Re.marker)}return fe}function Po(ie,ae,ge,fe,ye){var Re=an(ie,ae),Ye=$n&&Re.markedSpans;if(Ye)for(var pt=0;pt<Ye.length;++pt){var ft=Ye[pt];if(ft.marker.collapsed){var jt=ft.marker.find(0),Mn=fn(jt.from,ge)||_o(ft.marker)-_o(ye),Ut=fn(jt.to,fe)||Ia(ft.marker)-Ia(ye);if(!(Mn>=0&&Ut<=0||Mn<=0&&Ut>=0)&&(Mn<=0&&(ft.marker.inclusiveRight&&ye.inclusiveLeft?fn(jt.to,ge)>=0:fn(jt.to,ge)>0)||Mn>=0&&(ft.marker.inclusiveRight&&ye.inclusiveLeft?fn(jt.from,fe)<=0:fn(jt.from,fe)<0)))return!0}}}function Xr(ie){for(var ae;ae=Wa(ie);)ie=ae.find(-1,!0).line;return ie}function ha(ie){for(var ae;ae=Ps(ie);)ie=ae.find(1,!0).line;return ie}function br(ie){for(var ae,ge;ae=Ps(ie);)ie=ae.find(1,!0).line,(ge||(ge=[])).push(ie);return ge}function Ur(ie,ae){var ge=an(ie,ae),fe=Xr(ge);return ge==fe?ae:zt(fe)}function wo(ie,ae){if(ae>ie.lastLine())return ae;var ge=an(ie,ae),fe;if(!fi(ie,ge))return ae;for(;fe=Ps(ge);)ge=fe.find(1,!0).line;return zt(ge)+1}function fi(ie,ae){var ge=$n&&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&&Ba(ie,ae,fe))return!0}}}function Ba(ie,ae,ge){if(ge.to==null){var fe=ge.marker.find(1,!0);return Ba(ie,fe.line,Ko(fe.line.markedSpans,ge.marker))}if(ge.marker.inclusiveRight&&ge.to==ae.text.length)return!0;for(var ye=void 0,Re=0;Re<ae.markedSpans.length;++Re)if(ye=ae.markedSpans[Re],ye.marker.collapsed&&!ye.marker.widgetNode&&ye.from==ge.to&&(ye.to==null||ye.to!=ge.from)&&(ye.marker.inclusiveLeft||ge.marker.inclusiveRight)&&Ba(ie,ae,ye))return!0}function Eo(ie){ie=Xr(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 Re=ge.parent;Re;ge=Re,Re=ge.parent)for(var Ye=0;Ye<Re.children.length;++Ye){var pt=Re.children[Ye];if(pt==ge)break;ae+=pt.height}return ae}function es(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,ge,fe=ie;ge=Wa(fe);){var ye=ge.find(0,!0);fe=ye.from.line,ae+=ye.from.ch-ye.to.ch}for(fe=ie;ge=Ps(fe);){var Re=ge.find(0,!0);ae-=fe.text.length-Re.from.ch,fe=Re.to.line,ae+=fe.text.length-Re.to.ch}return ae}function fa(ie){var ae=ie.display,ge=ie.doc;ae.maxLine=an(ge,ge.first),ae.maxLineLength=es(ae.maxLine),ae.maxLineChanged=!0,ge.iter(function(fe){var ye=es(fe);ye>ae.maxLineLength&&(ae.maxLineLength=ye,ae.maxLine=fe)})}var va=function(ie,ae,ge){this.text=ie,st(this,ae),this.height=ge?ge(this):1};va.prototype.lineNo=function(){return zt(this)},An(va);function $a(ie,ae,ge,fe){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),Hi(ie),st(ie,ge);var ye=fe?fe(ie):1;ye!=ie.height&&pn(ie,ye)}function ms(ie){ie.parent=null,Hi(ie)}var fs={},Rs={};function Zs(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var ge=ae.addModeClass?Rs:fs;return ge[ie]||(ge[ie]=ie.replace(/\S+/g,"cm-$&"))}function Bn(ie,ae){var ge=ht("span",null,null,Le?"padding-right: .1px":null),fe={pre:ht("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 Re=ye?ae.rest[ye-1]:ae.line,Ye=void 0;fe.pos=0,fe.addToken=Go,io(ie.display.measure)&&(Ye=wn(Re,ie.doc.direction))&&(fe.addToken=_s(fe.addToken,Ye)),fe.map=[];var pt=ae!=ie.display.externalMeasured&&zt(Re);yu(Re,fe,Qr(ie,Re,pt)),Re.styleClasses&&(Re.styleClasses.bgClass&&(fe.bgClass=Pt(Re.styleClasses.bgClass,fe.bgClass||"")),Re.styleClasses.textClass&&(fe.textClass=Pt(Re.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild(Xi(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(Le){var ft=fe.content.lastChild;(/\bcm-tab\b/.test(ft.className)||ft.querySelector&&ft.querySelector(".cm-tab"))&&(fe.content.className="cm-tab-wrap-hack")}return hn(ie,"renderLine",ie,ae.line,fe.pre),fe.pre.className&&(fe.textClass=Pt(fe.pre.className,fe.textClass||"")),fe}function Fs(ie){var ae=Xe("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function Go(ie,ae,ge,fe,ye,Re,Ye){if(ae){var pt=ie.splitSpaces?kl(ae,ie.trailingSpace):ae,ft=ie.cm.state.specialChars,jt=!1,Mn;if(!ft.test(ae))ie.col+=ae.length,Mn=document.createTextNode(pt),ie.map.push(ie.pos,ie.pos+ae.length,Mn),We&&Ve<9&&(jt=!0),ie.pos+=ae.length;else{Mn=document.createDocumentFragment();for(var Ut=0;;){ft.lastIndex=Ut;var oi=ft.exec(ae),ni=oi?oi.index-Ut:ae.length-Ut;if(ni){var ir=document.createTextNode(pt.slice(Ut,Ut+ni));We&&Ve<9?Mn.appendChild(Xe("span",[ir])):Mn.appendChild(ir),ie.map.push(ie.pos,ie.pos+ni,ir),ie.col+=ni,ie.pos+=ni}if(!oi)break;Ut+=ni+1;var cr=void 0;if(oi[0]==" "){var Br=ie.cm.options.tabSize,ao=Br-ie.col%Br;cr=Mn.appendChild(Xe("span",_n(ao),"cm-tab")),cr.setAttribute("role","presentation"),cr.setAttribute("cm-text"," "),ie.col+=ao}else oi[0]=="\r"||oi[0]==`
|
|
|
`?(cr=Mn.appendChild(Xe("span",oi[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),cr.setAttribute("cm-text",oi[0]),ie.col+=1):(cr=ie.cm.options.specialCharPlaceholder(oi[0]),cr.setAttribute("cm-text",oi[0]),We&&Ve<9?Mn.appendChild(Xe("span",[cr])):Mn.appendChild(cr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,cr),ie.pos++}}if(ie.trailingSpace=pt.charCodeAt(ae.length-1)==32,ge||fe||ye||jt||Re||Ye){var Ho=ge||"";fe&&(Ho+=fe),ye&&(Ho+=ye);var Bo=Xe("span",[Mn],Ho,Re);if(Ye)for(var ea in Ye)Ye.hasOwnProperty(ea)&&ea!="style"&&ea!="class"&&Bo.setAttribute(ea,Ye[ea]);return ie.content.appendChild(Bo)}ie.content.appendChild(Mn)}}function kl(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var ge=ae,fe="",ye=0;ye<ie.length;ye++){var Re=ie.charAt(ye);Re==" "&&ge&&(ye==ie.length-1||ie.charCodeAt(ye+1)==32)&&(Re="\xA0"),fe+=Re,ge=Re==" "}return fe}function _s(ie,ae){return function(ge,fe,ye,Re,Ye,pt,ft){ye=ye?ye+" cm-force-border":"cm-force-border";for(var jt=ge.pos,Mn=jt+fe.length;;){for(var Ut=void 0,oi=0;oi<ae.length&&(Ut=ae[oi],!(Ut.to>jt&&Ut.from<=jt));oi++);if(Ut.to>=Mn)return ie(ge,fe,ye,Re,Ye,pt,ft);ie(ge,fe.slice(0,Ut.to-jt),ye,Re,null,pt,ft),Re=null,fe=fe.slice(Ut.to-jt),jt=Ut.to}}}function sl(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,Re=0;if(!fe){for(var Ye=1;Ye<ge.length;Ye+=2)ae.addToken(ae,ye.slice(Re,Re=ge[Ye]),Zs(ge[Ye+1],ae.cm.options));return}for(var pt=ye.length,ft=0,jt=1,Mn="",Ut,oi,ni=0,ir,cr,Br,ao,Ho;;){if(ni==ft){ir=cr=Br=oi="",Ho=null,ao=null,ni=1/0;for(var Bo=[],ea=void 0,_a=0;_a<fe.length;++_a){var Mo=fe[_a],ns=Mo.marker;if(ns.type=="bookmark"&&Mo.from==ft&&ns.widgetNode)Bo.push(ns);else if(Mo.from<=ft&&(Mo.to==null||Mo.to>ft||ns.collapsed&&Mo.to==ft&&Mo.from==ft)){if(Mo.to!=null&&Mo.to!=ft&&ni>Mo.to&&(ni=Mo.to,cr=""),ns.className&&(ir+=" "+ns.className),ns.css&&(oi=(oi?oi+";":"")+ns.css),ns.startStyle&&Mo.from==ft&&(Br+=" "+ns.startStyle),ns.endStyle&&Mo.to==ni&&(ea||(ea=[])).push(ns.endStyle,Mo.to),ns.title&&((Ho||(Ho={})).title=ns.title),ns.attributes)for(var rl in ns.attributes)(Ho||(Ho={}))[rl]=ns.attributes[rl];ns.collapsed&&(!ao||Ma(ao.marker,ns)<0)&&(ao=Mo)}else Mo.from>ft&&ni>Mo.from&&(ni=Mo.from)}if(ea)for(var ru=0;ru<ea.length;ru+=2)ea[ru+1]==ni&&(cr+=" "+ea[ru]);if(!ao||ao.from==ft)for(var Sl=0;Sl<Bo.length;++Sl)sl(ae,0,Bo[Sl]);if(ao&&(ao.from||0)==ft){if(sl(ae,(ao.to==null?pt+1:ao.to)-ft,ao.marker,ao.from==null),ao.to==null)return;ao.to==ft&&(ao=!1)}}if(ft>=pt)break;for(var Uu=Math.min(pt,ni);;){if(Mn){var wu=ft+Mn.length;if(!ao){var Ql=wu>Uu?Mn.slice(0,Uu-ft):Mn;ae.addToken(ae,Ql,Ut?Ut+ir:ir,Br,ft+Ql.length==ni?cr:"",oi,Ho)}if(wu>=Uu){Mn=Mn.slice(Uu-ft),ft=Uu;break}ft=wu,Br=""}Mn=ye.slice(Re,Re=ge[jt++]),Ut=Zs(ge[jt++],ae.cm.options)}}}function Kl(ie,ae,ge){this.line=ae,this.rest=br(ae),this.size=this.rest?zt(St(this.rest))-ge+1:1,this.node=this.text=null,this.hidden=fi(ie,ae)}function gs(ie,ae,ge){for(var fe=[],ye,Re=ae;Re<ge;Re=ye){var Ye=new Kl(ie.doc,an(ie.doc,Re),Re);ye=Re+Ye.size,fe.push(Ye)}return fe}var ya=null;function dl(ie){ya?ya.ops.push(ie):ie.ownsGroup=ya={ops:[ie],delayedCallbacks:[]}}function Vo(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 Ea(ie,ae){var ge=ie.ownsGroup;if(ge)try{Vo(ge)}finally{ya=null,ae(ge)}}var ua=null;function pr(ie,ae){var ge=Rn(ie,ae);if(ge.length){var fe=Array.prototype.slice.call(arguments,2),ye;ya?ye=ya.delayedCallbacks:ua?ye=ua:(ye=ua=[],setTimeout(ks,0));for(var Re=function(pt){ye.push(function(){return ge[pt].apply(null,fe)})},Ye=0;Ye<ge.length;++Ye)Re(Ye)}}function ks(){var ie=ua;ua=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function os(ie,ae,ge,fe){for(var ye=0;ye<ae.changes.length;ye++){var Re=ae.changes[ye];Re=="text"?Qi(ie,ae):Re=="gutter"?Us(ie,ae,ge,fe):Re=="class"?Ss(ie,ae):Re=="widget"&&Vl(ie,ae,fe)}ae.changes=null}function ll(ie){return ie.node==ie.text&&(ie.node=Xe("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),We&&Ve<8&&(ie.node.style.zIndex=2)),ie.node}function zl(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=ll(ae);ae.background=fe.insertBefore(Xe("div",null,ge),fe.firstChild),ie.display.input.setUneditable(ae.background)}}function ou(ie,ae){var ge=ie.display.externalMeasured;return ge&&ge.line==ae.line?(ie.display.externalMeasured=null,ae.measure=ge.measure,ge.built):Bn(ie,ae)}function Qi(ie,ae){var ge=ae.text.className,fe=ou(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,Ss(ie,ae)):ge&&(ae.text.className=ge)}function Ss(ie,ae){zl(ie,ae),ae.line.wrapClass?ll(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 Us(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=ll(ae);ae.gutterBackground=Xe("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 Re=ae.line.gutterMarkers;if(ie.options.lineNumbers||Re){var Ye=ll(ae),pt=ae.gutter=Xe("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(pt),Ye.insertBefore(pt,ae.text),ae.line.gutterClass&&(pt.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Re||!Re["CodeMirror-linenumbers"])&&(ae.lineNumber=pt.appendChild(Xe("div",xi(ie.options,ge),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Re)for(var ft=0;ft<ie.display.gutterSpecs.length;++ft){var jt=ie.display.gutterSpecs[ft].className,Mn=Re.hasOwnProperty(jt)&&Re[jt];Mn&&pt.appendChild(Xe("div",[Mn],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[jt]+"px; width: "+fe.gutterWidth[jt]+"px"))}}}function Vl(ie,ae,ge){ae.alignable&&(ae.alignable=null);for(var fe=Be("CodeMirror-linewidget"),ye=ae.node.firstChild,Re=void 0;ye;ye=Re)Re=ye.nextSibling,fe.test(ye.className)&&ae.node.removeChild(ye);Ul(ie,ae,ge)}function Tl(ie,ae,ge,fe){var ye=ou(ie,ae);return ae.text=ae.node=ye.pre,ye.bgClass&&(ae.bgClass=ye.bgClass),ye.textClass&&(ae.textClass=ye.textClass),Ss(ie,ae),Us(ie,ae,ge,fe),Ul(ie,ae,fe),ae.node}function Ul(ie,ae,ge){if(Io(ie,ae.line,ae,ge,!0),ae.rest)for(var fe=0;fe<ae.rest.length;fe++)Io(ie,ae.rest[fe],ae,ge,!1)}function Io(ie,ae,ge,fe,ye){if(ae.widgets)for(var Re=ll(ge),Ye=0,pt=ae.widgets;Ye<pt.length;++Ye){var ft=pt[Ye],jt=Xe("div",[ft.node],"CodeMirror-linewidget"+(ft.className?" "+ft.className:""));ft.handleMouseEvents||jt.setAttribute("cm-ignore-events","true"),ic(ft,jt,ge,fe),ie.display.input.setUneditable(jt),ye&&ft.above?Re.insertBefore(jt,ge.gutter||ge.text):Re.appendChild(jt),pr(ft,"redraw")}}function ic(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 Zl(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Mt(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;"),Je(ae.display.measure,Xe("div",[ie.node],null,ge))}return ie.height=ie.node.parentNode.offsetHeight}function En(ie,ae){for(var ge=Mr(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 Nn(ie){return ie.lineSpace.offsetTop}function ri(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function qi(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=Je(ie.measure,Xe("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 $i(ie){return Sn-ie.display.nativeBarWidth}function ki(ie){return ie.display.scroller.clientWidth-$i(ie)-ie.display.barWidth}function Ri(ie){return ie.display.scroller.clientHeight-$i(ie)-ie.display.barHeight}function ii(ie,ae,ge){var fe=ie.options.lineWrapping,ye=fe&&ki(ie);if(!ae.measure.heights||fe&&ae.measure.width!=ye){var Re=ae.measure.heights=[];if(fe){ae.measure.width=ye;for(var Ye=ae.text.firstChild.getClientRects(),pt=0;pt<Ye.length-1;pt++){var ft=Ye[pt],jt=Ye[pt+1];Math.abs(ft.bottom-jt.bottom)>2&&Re.push((ft.bottom+jt.top)/2-ge.top)}}Re.push(ge.bottom-ge.top)}}function Li(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(zt(ie.rest[ye])>ge)return{map:ie.measure.maps[ye],cache:ie.measure.caches[ye],before:!0}}function ur(ie,ae){ae=Xr(ae);var ge=zt(ae),fe=ie.display.externalMeasured=new Kl(ie.doc,ae,ge);fe.lineN=ge;var ye=fe.built=Bn(ie,fe);return fe.text=ye.pre,Je(ie.display.lineMeasure,ye.pre),fe}function Zr(ie,ae,ge,fe){return Ua(ie,Uo(ie,ae),ge,fe)}function ga(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[xr(ie,ae)];var ge=ie.display.externalMeasured;if(ge&&ae>=ge.lineN&&ae<ge.lineN+ge.size)return ge}function Uo(ie,ae){var ge=zt(ae),fe=ga(ie,ge);fe&&!fe.text?fe=null:fe&&fe.changes&&(os(ie,fe,ge,wr(ie)),ie.curOp.forceUpdate=!0),fe||(fe=ur(ie,ae));var ye=Li(fe,ae,ge);return{line:ae,view:fe,rect:null,map:ye.map,cache:ye.cache,before:ye.before,hasHeights:!1}}function Ua(ie,ae,ge,fe,ye){ae.before&&(ge=-1);var Re=ge+(fe||""),Ye;return ae.cache.hasOwnProperty(Re)?Ye=ae.cache[Re]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(ii(ie,ae.view,ae.rect),ae.hasHeights=!0),Ye=Bi(ie,ae,ge,fe),Ye.bogus||(ae.cache[Re]=Ye)),{left:Ye.left,right:Ye.right,top:ye?Ye.rtop:Ye.top,bottom:ye?Ye.rbottom:Ye.bottom}}var Ka={left:0,right:0,top:0,bottom:0};function No(ie,ae,ge){for(var fe,ye,Re,Ye,pt,ft,jt=0;jt<ie.length;jt+=3)if(pt=ie[jt],ft=ie[jt+1],ae<pt?(ye=0,Re=1,Ye="left"):ae<ft?(ye=ae-pt,Re=ye+1):(jt==ie.length-3||ae==ft&&ie[jt+3]>ae)&&(Re=ft-pt,ye=Re-1,ae>=ft&&(Ye="right")),ye!=null){if(fe=ie[jt+2],pt==ft&&ge==(fe.insertLeft?"left":"right")&&(Ye=ge),ge=="left"&&ye==0)for(;jt&&ie[jt-2]==ie[jt-3]&&ie[jt-1].insertLeft;)fe=ie[(jt-=3)+2],Ye="left";if(ge=="right"&&ye==ft-pt)for(;jt<ie.length-3&&ie[jt+3]==ie[jt+4]&&!ie[jt+5].insertLeft;)fe=ie[(jt+=3)+2],Ye="right";break}return{node:fe,start:ye,end:Re,collapse:Ye,coverStart:pt,coverEnd:ft}}function qr(ie,ae){var ge=Ka;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 Bi(ie,ae,ge,fe){var ye=No(ae.map,ge,fe),Re=ye.node,Ye=ye.start,pt=ye.end,ft=ye.collapse,jt;if(Re.nodeType==3){for(var Mn=0;Mn<4;Mn++){for(;Ye&&Bt(ae.line.text.charAt(ye.coverStart+Ye));)--Ye;for(;ye.coverStart+pt<ye.coverEnd&&Bt(ae.line.text.charAt(ye.coverStart+pt));)++pt;if(We&&Ve<9&&Ye==0&&pt==ye.coverEnd-ye.coverStart?jt=Re.parentNode.getBoundingClientRect():jt=qr(Ze(Re,Ye,pt).getClientRects(),fe),jt.left||jt.right||Ye==0)break;pt=Ye,Ye=Ye-1,ft="right"}We&&Ve<11&&(jt=eo(ie.display.measure,jt))}else{Ye>0&&(ft=fe="right");var Ut;ie.options.lineWrapping&&(Ut=Re.getClientRects()).length>1?jt=Ut[fe=="right"?Ut.length-1:0]:jt=Re.getBoundingClientRect()}if(We&&Ve<9&&!Ye&&(!jt||!jt.left&&!jt.right)){var oi=Re.parentNode.getClientRects()[0];oi?jt={left:oi.left,right:oi.left+Mi(ie.display),top:oi.top,bottom:oi.bottom}:jt=Ka}for(var ni=jt.top-ae.rect.top,ir=jt.bottom-ae.rect.top,cr=(ni+ir)/2,Br=ae.view.measure.heights,ao=0;ao<Br.length-1&&!(cr<Br[ao]);ao++);var Ho=ao?Br[ao-1]:0,Bo=Br[ao],ea={left:(ft=="right"?jt.right:jt.left)-ae.rect.left,right:(ft=="left"?jt.left:jt.right)-ae.rect.left,top:Ho,bottom:Bo};return!jt.left&&!jt.right&&(ea.bogus=!0),ie.options.singleCursorHeightPerLine||(ea.rtop=ni,ea.rbottom=ir),ea}function eo(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ln(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 Yo(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 ma(ie){ie.display.externalMeasure=null,_e(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)Yo(ie.display.view[ae])}function xa(ie){ma(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function bo(){return xt&&te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ra(){return xt&&te?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ao(ie){var ae=0;if(ie.widgets)for(var ge=0;ge<ie.widgets.length;++ge)ie.widgets[ge].above&&(ae+=Zl(ie.widgets[ge]));return ae}function Or(ie,ae,ge,fe,ye){if(!ye){var Re=Ao(ae);ge.top+=Re,ge.bottom+=Re}if(fe=="line")return ge;fe||(fe="local");var Ye=Eo(ae);if(fe=="local"?Ye+=Nn(ie.display):Ye-=ie.display.viewOffset,fe=="page"||fe=="window"){var pt=ie.display.lineSpace.getBoundingClientRect();Ye+=pt.top+(fe=="window"?0:ra());var ft=pt.left+(fe=="window"?0:bo());ge.left+=ft,ge.right+=ft}return ge.top+=Ye,ge.bottom+=Ye,ge}function Aa(ie,ae,ge){if(ge=="div")return ae;var fe=ae.left,ye=ae.top;if(ge=="page")fe-=bo(),ye-=ra();else if(ge=="local"||!ge){var Re=ie.display.sizer.getBoundingClientRect();fe+=Re.left,ye+=Re.top}var Ye=ie.display.lineSpace.getBoundingClientRect();return{left:fe-Ye.left,top:ye-Ye.top}}function Ha(ie,ae,ge,fe,ye){return fe||(fe=an(ie.doc,ae.line)),Or(ie,fe,Zr(ie,fe,ae.ch,ye),ge)}function La(ie,ae,ge,fe,ye,Re){fe=fe||an(ie.doc,ae.line),ye||(ye=Uo(ie,fe));function Ye(ir,cr){var Br=Ua(ie,ye,ir,cr?"right":"left",Re);return cr?Br.left=Br.right:Br.right=Br.left,Or(ie,fe,Br,ge)}var pt=wn(fe,ie.doc.direction),ft=ae.ch,jt=ae.sticky;if(ft>=fe.text.length?(ft=fe.text.length,jt="before"):ft<=0&&(ft=0,jt="after"),!pt)return Ye(jt=="before"?ft-1:ft,jt=="before");function Mn(ir,cr,Br){var ao=pt[cr],Ho=ao.level==1;return Ye(Br?ir-1:ir,Ho!=Br)}var Ut=dt(pt,ft,jt),oi=Nt,ni=Mn(ft,Ut,jt=="before");return oi!=null&&(ni.other=Mn(ft,oi,jt!="before")),ni}function gl(ie,ae){var ge=0;ae=Ti(ie.doc,ae),ie.options.lineWrapping||(ge=Mi(ie.display)*ae.ch);var fe=an(ie.doc,ae.line),ye=Eo(fe)+Nn(ie.display);return{left:ge,right:ge,top:ye,bottom:ye+fe.height}}function xu(ie,ae,ge,fe,ye){var Re=tn(ie,ae,ge);return Re.xRel=ye,fe&&(Re.outside=fe),Re}function en(ie,ae,ge){var fe=ie.doc;if(ge+=ie.display.viewOffset,ge<0)return xu(fe.first,0,null,-1,-1);var ye=In(fe,ge),Re=fe.first+fe.size-1;if(ye>Re)return xu(fe.first+fe.size-1,an(fe,Re).text.length,null,1,1);ae<0&&(ae=0);for(var Ye=an(fe,ye);;){var pt=nn(ie,Ye,ye,ae,ge),ft=Lo(Ye,pt.ch+(pt.xRel>0||pt.outside>0?1:0));if(!ft)return pt;var jt=ft.find(1);if(jt.line==ye)return jt;Ye=an(fe,ye=jt.line)}}function Xt(ie,ae,ge,fe){fe-=Ao(ae);var ye=ae.text.length,Re=it(function(Ye){return Ua(ie,ge,Ye-1).bottom<=fe},ye,0);return ye=it(function(Ye){return Ua(ie,ge,Ye).top>fe},Re,ye),{begin:Re,end:ye}}function On(ie,ae,ge,fe){ge||(ge=Uo(ie,ae));var ye=Or(ie,ae,Ua(ie,ge,fe),"line").top;return Xt(ie,ae,ge,ye)}function tt(ie,ae,ge,fe){return ie.bottom<=ge?!1:ie.top>ge?!0:(fe?ie.left:ie.right)>ae}function nn(ie,ae,ge,fe,ye){ye-=Eo(ae);var Re=Uo(ie,ae),Ye=Ao(ae),pt=0,ft=ae.text.length,jt=!0,Mn=wn(ae,ie.doc.direction);if(Mn){var Ut=(ie.options.lineWrapping?kr:sr)(ie,ae,ge,Re,Mn,fe,ye);jt=Ut.level!=1,pt=jt?Ut.from:Ut.to-1,ft=jt?Ut.to:Ut.from-1}var oi=null,ni=null,ir=it(function(_a){var Mo=Ua(ie,Re,_a);return Mo.top+=Ye,Mo.bottom+=Ye,tt(Mo,fe,ye,!1)?(Mo.top<=ye&&Mo.left<=fe&&(oi=_a,ni=Mo),!0):!1},pt,ft),cr,Br,ao=!1;if(ni){var Ho=fe-ni.left<ni.right-fe,Bo=Ho==jt;ir=oi+(Bo?0:1),Br=Bo?"after":"before",cr=Ho?ni.left:ni.right}else{!jt&&(ir==ft||ir==pt)&&ir++,Br=ir==0?"after":ir==ae.text.length?"before":Ua(ie,Re,ir-(jt?1:0)).bottom+Ye<=ye==jt?"after":"before";var ea=La(ie,tn(ge,ir,Br),"line",ae,Re);cr=ea.left,ao=ye<ea.top?-1:ye>=ea.bottom?1:0}return ir=Qe(ae.text,ir,1),xu(ge,ir,Br,ao,fe-cr)}function sr(ie,ae,ge,fe,ye,Re,Ye){var pt=it(function(Ut){var oi=ye[Ut],ni=oi.level!=1;return tt(La(ie,tn(ge,ni?oi.to:oi.from,ni?"before":"after"),"line",ae,fe),Re,Ye,!0)},0,ye.length-1),ft=ye[pt];if(pt>0){var jt=ft.level!=1,Mn=La(ie,tn(ge,jt?ft.from:ft.to,jt?"after":"before"),"line",ae,fe);tt(Mn,Re,Ye,!0)&&Mn.top>Ye&&(ft=ye[pt-1])}return ft}function kr(ie,ae,ge,fe,ye,Re,Ye){var pt=Xt(ie,ae,fe,Ye),ft=pt.begin,jt=pt.end;/\s/.test(ae.text.charAt(jt-1))&&jt--;for(var Mn=null,Ut=null,oi=0;oi<ye.length;oi++){var ni=ye[oi];if(!(ni.from>=jt||ni.to<=ft)){var ir=ni.level!=1,cr=Ua(ie,fe,ir?Math.min(jt,ni.to)-1:Math.max(ft,ni.from)).right,Br=cr<Re?Re-cr+1e9:cr-Re;(!Mn||Ut>Br)&&(Mn=ni,Ut=Br)}}return Mn||(Mn=ye[ye.length-1]),Mn.from<ft&&(Mn={from:ft,to:Mn.to,level:Mn.level}),Mn.to>jt&&(Mn={from:Mn.from,to:jt,level:Mn.level}),Mn}var yr;function lr(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(yr==null){yr=Xe("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)yr.appendChild(document.createTextNode("x")),yr.appendChild(Xe("br"));yr.appendChild(document.createTextNode("x"))}Je(ie.measure,yr);var ge=yr.offsetHeight/50;return ge>3&&(ie.cachedTextHeight=ge),_e(ie.measure),ge||1}function Mi(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=Xe("span","xxxxxxxxxx"),ge=Xe("pre",[ae],"CodeMirror-line-like");Je(ie.measure,ge);var fe=ae.getBoundingClientRect(),ye=(fe.right-fe.left)/10;return ye>2&&(ie.cachedCharWidth=ye),ye||10}function wr(ie){for(var ae=ie.display,ge={},fe={},ye=ae.gutters.clientLeft,Re=ae.gutters.firstChild,Ye=0;Re;Re=Re.nextSibling,++Ye){var pt=ie.display.gutterSpecs[Ye].className;ge[pt]=Re.offsetLeft+Re.clientLeft+ye,fe[pt]=Re.clientWidth}return{fixedPos:to(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:ge,gutterWidth:fe,wrapperWidth:ae.wrapper.clientWidth}}function to(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function yo(ie){var ae=lr(ie.display),ge=ie.options.lineWrapping,fe=ge&&Math.max(5,ie.display.scroller.clientWidth/Mi(ie.display)-3);return function(ye){if(fi(ie.doc,ye))return 0;var Re=0;if(ye.widgets)for(var Ye=0;Ye<ye.widgets.length;Ye++)ye.widgets[Ye].height&&(Re+=ye.widgets[Ye].height);return ge?Re+(Math.ceil(ye.text.length/fe)||1)*ae:Re+ae}}function fr(ie){var ae=ie.doc,ge=yo(ie);ae.iter(function(fe){var ye=ge(fe);ye!=fe.height&&pn(fe,ye)})}function vr(ie,ae,ge,fe){var ye=ie.display;if(!ge&&Mr(ae).getAttribute("cm-not-content")=="true")return null;var Re,Ye,pt=ye.lineSpace.getBoundingClientRect();try{Re=ae.clientX-pt.left,Ye=ae.clientY-pt.top}catch(Ut){return null}var ft=en(ie,Re,Ye),jt;if(fe&&ft.xRel>0&&(jt=an(ie.doc,ft.line).text).length==ft.ch){var Mn=qe(jt,jt.length,ie.options.tabSize)-jt.length;ft=tn(ft.line,Math.max(0,Math.round((Re-qi(ie.display).left)/Mi(ie.display))-Mn))}return ft}function xr(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 _i(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)$n&&Ur(ie.doc,ae)<ye.viewTo&&Gr(ie);else if(ge<=ye.viewFrom)$n&&wo(ie.doc,ge+fe)>ye.viewFrom?Gr(ie):(ye.viewFrom+=fe,ye.viewTo+=fe);else if(ae<=ye.viewFrom&&ge>=ye.viewTo)Gr(ie);else if(ae<=ye.viewFrom){var Re=Zo(ie,ge,ge+fe,1);Re?(ye.view=ye.view.slice(Re.index),ye.viewFrom=Re.lineN,ye.viewTo+=fe):Gr(ie)}else if(ge>=ye.viewTo){var Ye=Zo(ie,ae,ae,-1);Ye?(ye.view=ye.view.slice(0,Ye.index),ye.viewTo=Ye.lineN):Gr(ie)}else{var pt=Zo(ie,ae,ae,-1),ft=Zo(ie,ge,ge+fe,1);pt&&ft?(ye.view=ye.view.slice(0,pt.index).concat(gs(ie,pt.lineN,ft.lineN)).concat(ye.view.slice(ft.index)),ye.viewTo+=fe):Gr(ie)}var jt=ye.externalMeasured;jt&&(ge<jt.lineN?jt.lineN+=fe:ae<jt.lineN+jt.size&&(ye.externalMeasured=null))}function Ii(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 Re=fe.view[xr(ie,ae)];if(Re.node!=null){var Ye=Re.changes||(Re.changes=[]);Rt(Ye,ge)==-1&&Ye.push(ge)}}}function Gr(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Zo(ie,ae,ge,fe){var ye=xr(ie,ae),Re,Ye=ie.display.view;if(!$n||ge==ie.doc.first+ie.doc.size)return{index:ye,lineN:ge};for(var pt=ie.display.viewFrom,ft=0;ft<ye;ft++)pt+=Ye[ft].size;if(pt!=ae){if(fe>0){if(ye==Ye.length-1)return null;Re=pt+Ye[ye].size-ae,ye++}else Re=pt-ae;ae+=Re,ge+=Re}for(;Ur(ie.doc,ge)!=ge;){if(ye==(fe<0?0:Ye.length-1))return null;ge+=fe*Ye[ye-(fe<0?1:0)].size,ye+=fe}return{index:ye,lineN:ge}}function Fr(ie,ae,ge){var fe=ie.display,ye=fe.view;ye.length==0||ae>=fe.viewTo||ge<=fe.viewFrom?(fe.view=gs(ie,ae,ge),fe.viewFrom=ae):(fe.viewFrom>ae?fe.view=gs(ie,ae,fe.viewFrom).concat(fe.view):fe.viewFrom<ae&&(fe.view=fe.view.slice(xr(ie,ae))),fe.viewFrom=ae,fe.viewTo<ge?fe.view=fe.view.concat(gs(ie,fe.viewTo,ge)):fe.viewTo>ge&&(fe.view=fe.view.slice(0,xr(ie,ge)))),fe.viewTo=ge}function Er(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 Tr(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function Rr(ie,ae){ae===void 0&&(ae=!0);for(var ge=ie.doc,fe={},ye=fe.cursors=document.createDocumentFragment(),Re=fe.selection=document.createDocumentFragment(),Ye=0;Ye<ge.sel.ranges.length;Ye++)if(!(!ae&&Ye==ge.sel.primIndex)){var pt=ge.sel.ranges[Ye];if(!(pt.from().line>=ie.display.viewTo||pt.to().line<ie.display.viewFrom)){var ft=pt.empty();(ft||ie.options.showCursorWhenSelecting)&&gr(ie,pt.head,ye),ft||jo(ie,pt,Re)}}return fe}function gr(ie,ae,ge){var fe=La(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),ye=ge.appendChild(Xe("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 Re=ge.appendChild(Xe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Re.style.display="",Re.style.left=fe.other.left+"px",Re.style.top=fe.other.top+"px",Re.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function Na(ie,ae){return ie.top-ae.top||ie.left-ae.left}function jo(ie,ae,ge){var fe=ie.display,ye=ie.doc,Re=document.createDocumentFragment(),Ye=qi(ie.display),pt=Ye.left,ft=Math.max(fe.sizerWidth,ki(ie)-fe.sizer.offsetLeft)-Ye.right,jt=ye.direction=="ltr";function Mn(Bo,ea,_a,Mo){ea<0&&(ea=0),ea=Math.round(ea),Mo=Math.round(Mo),Re.appendChild(Xe("div",null,"CodeMirror-selected","position: absolute; left: "+Bo+`px;
|
|
|
top: `+ea+"px; width: "+(_a==null?ft-Bo:_a)+`px;
|
|
|
height: `+(Mo-ea)+"px"))}function Ut(Bo,ea,_a){var Mo=an(ye,Bo),ns=Mo.text.length,rl,ru;function Sl(Ql,Yu){return Ha(ie,tn(Bo,Ql),"div",Mo,Yu)}function Uu(Ql,Yu,hu){var ql=On(ie,Mo,null,Ql),Ns=Yu=="ltr"==(hu=="after")?"left":"right",Pl=hu=="after"?ql.begin:ql.end-(/\s/.test(Mo.text.charAt(ql.end-1))?2:1);return Sl(Pl,Ns)[Ns]}var wu=wn(Mo,ye.direction);return Ft(wu,ea||0,_a==null?ns:_a,function(Ql,Yu,hu,ql){var Ns=hu=="ltr",Pl=Sl(Ql,Ns?"left":"right"),uu=Sl(Yu-1,Ns?"right":"left"),fu=ea==null&&Ql==0,jc=_a==null&&Yu==ns,wl=ql==0,Pc=!wu||ql==wu.length-1;if(uu.top-Pl.top<=3){var Se=(jt?fu:jc)&&wl,Ce=(jt?jc:fu)&&Pc,ke=Se?pt:(Ns?Pl:uu).left,$e=Ce?ft:(Ns?uu:Pl).right;Mn(ke,Pl.top,$e-ke,Pl.bottom)}else{var yt,vt,kt,Ht;Ns?(yt=jt&&fu&&wl?pt:Pl.left,vt=jt?ft:Uu(Ql,hu,"before"),kt=jt?pt:Uu(Yu,hu,"after"),Ht=jt&&jc&&Pc?ft:uu.right):(yt=jt?Uu(Ql,hu,"before"):pt,vt=!jt&&fu&&wl?ft:Pl.right,kt=!jt&&jc&&Pc?pt:uu.left,Ht=jt?Uu(Yu,hu,"after"):ft),Mn(yt,Pl.top,vt-yt,Pl.bottom),Pl.bottom<uu.top&&Mn(pt,Pl.bottom,null,uu.top),Mn(kt,uu.top,Ht-kt,uu.bottom)}(!rl||Na(Pl,rl)<0)&&(rl=Pl),Na(uu,rl)<0&&(rl=uu),(!ru||Na(Pl,ru)<0)&&(ru=Pl),Na(uu,ru)<0&&(ru=uu)}),{start:rl,end:ru}}var oi=ae.from(),ni=ae.to();if(oi.line==ni.line)Ut(oi.line,oi.ch,ni.ch);else{var ir=an(ye,oi.line),cr=an(ye,ni.line),Br=Xr(ir)==Xr(cr),ao=Ut(oi.line,oi.ch,Br?ir.text.length+1:null).end,Ho=Ut(ni.line,Br?0:null,ni.ch).start;Br&&(ao.top<Ho.top-2?(Mn(ao.right,ao.top,null,ao.bottom),Mn(pt,Ho.top,Ho.left,Ho.bottom)):Mn(ao.right,ao.top,Ho.left-ao.right,ao.bottom)),ao.bottom<Ho.top&&Mn(pt,ao.bottom,null,Ho.top)}ge.appendChild(Re)}function Sa(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()||bl(ie),ae.cursorDiv.style.visibility=(ge=!ge)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function Ga(ie){ie.state.focused||(ie.display.input.focus(),Oa(ie))}function So(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,bl(ie))},100)}function Oa(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(hn(ie,"focus",ie,ae),ie.state.focused=!0,Ot(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Le&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),Sa(ie))}function bl(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(hn(ie,"blur",ie,ae),ie.state.focused=!1,je(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Dr(ie){for(var ae=ie.display,ge=ae.lineDiv.offsetTop,fe=0;fe<ae.view.length;fe++){var ye=ae.view[fe],Re=ie.options.lineWrapping,Ye=void 0,pt=0;if(!ye.hidden){if(We&&Ve<8){var ft=ye.node.offsetTop+ye.node.offsetHeight;Ye=ft-ge,ge=ft}else{var jt=ye.node.getBoundingClientRect();Ye=jt.bottom-jt.top,!Re&&ye.text.firstChild&&(pt=ye.text.firstChild.getBoundingClientRect().right-jt.left-1)}var Mn=ye.line.height-Ye;if((Mn>.005||Mn<-.005)&&(pn(ye.line,Ye),Ts(ye.line),ye.rest))for(var Ut=0;Ut<ye.rest.length;Ut++)Ts(ye.rest[Ut]);if(pt>ie.display.sizerWidth){var oi=Math.ceil(pt/Mi(ie.display));oi>ie.display.maxLineLength&&(ie.display.maxLineLength=oi,ie.display.maxLine=ye.line,ie.display.maxLineChanged=!0)}}}}function Ts(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 zo(ie,ae,ge){var fe=ge&&ge.top!=null?Math.max(0,ge.top):ie.scroller.scrollTop;fe=Math.floor(fe-Nn(ie));var ye=ge&&ge.bottom!=null?ge.bottom:fe+ie.wrapper.clientHeight,Re=In(ae,fe),Ye=In(ae,ye);if(ge&&ge.ensure){var pt=ge.ensure.from.line,ft=ge.ensure.to.line;pt<Re?(Re=pt,Ye=In(ae,Eo(an(ae,pt))+ie.wrapper.clientHeight)):Math.min(ft,ae.lastLine())>=Ye&&(Re=In(ae,Eo(an(ae,ft))-ie.wrapper.clientHeight),Ye=ft)}return{from:Re,to:Math.max(Ye,Re+1)}}function Hs(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&&!mt){var Re=Xe("div","\u200B",null,`position: absolute;
|
|
|
top: `+(ae.top-ge.viewOffset-Nn(ie.display))+`px;
|
|
|
height: `+(ae.bottom-ae.top+$i(ie)+ge.barHeight)+`px;
|
|
|
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Re),Re.scrollIntoView(ye),ie.display.lineSpace.removeChild(Re)}}}function pl(ie,ae,ge,fe){fe==null&&(fe=0);var ye;!ie.options.lineWrapping&&ae==ge&&(ae=ae.ch?tn(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,ge=ae.sticky=="before"?tn(ae.line,ae.ch+1,"before"):ae);for(var Re=0;Re<5;Re++){var Ye=!1,pt=La(ie,ae),ft=!ge||ge==ae?pt:La(ie,ge);ye={left:Math.min(pt.left,ft.left),top:Math.min(pt.top,ft.top)-fe,right:Math.max(pt.left,ft.left),bottom:Math.max(pt.bottom,ft.bottom)+fe};var jt=ad(ie,ye),Mn=ie.doc.scrollTop,Ut=ie.doc.scrollLeft;if(jt.scrollTop!=null&&(ac(ie,jt.scrollTop),Math.abs(ie.doc.scrollTop-Mn)>1&&(Ye=!0)),jt.scrollLeft!=null&&(au(ie,jt.scrollLeft),Math.abs(ie.doc.scrollLeft-Ut)>1&&(Ye=!0)),!Ye)break}return ye}function rc(ie,ae){var ge=ad(ie,ae);ge.scrollTop!=null&&ac(ie,ge.scrollTop),ge.scrollLeft!=null&&au(ie,ge.scrollLeft)}function ad(ie,ae){var ge=ie.display,fe=lr(ie.display);ae.top<0&&(ae.top=0);var ye=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:ge.scroller.scrollTop,Re=Ri(ie),Ye={};ae.bottom-ae.top>Re&&(ae.bottom=ae.top+Re);var pt=ie.doc.height+ri(ge),ft=ae.top<fe,jt=ae.bottom>pt-fe;if(ae.top<ye)Ye.scrollTop=ft?0:ae.top;else if(ae.bottom>ye+Re){var Mn=Math.min(ae.top,(jt?pt:ae.bottom)-Re);Mn!=ye&&(Ye.scrollTop=Mn)}var Ut=ie.options.fixedGutter?0:ge.gutters.offsetWidth,oi=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:ge.scroller.scrollLeft-Ut,ni=ki(ie)-ge.gutters.offsetWidth,ir=ae.right-ae.left>ni;return ir&&(ae.right=ae.left+ni),ae.left<10?Ye.scrollLeft=0:ae.left<oi?Ye.scrollLeft=Math.max(0,ae.left+Ut-(ir?0:10)):ae.right>ni+oi-3&&(Ye.scrollLeft=ae.right+(ir?0:10)-ni),Ye}function Tc(ie,ae){ae!=null&&(du(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function oc(ie){du(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function vc(ie,ae,ge){(ae!=null||ge!=null)&&du(ie),ae!=null&&(ie.curOp.scrollLeft=ae),ge!=null&&(ie.curOp.scrollTop=ge)}function is(ie,ae){du(ie),ie.curOp.scrollToPos=ae}function du(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var ge=gl(ie,ae.from),fe=gl(ie,ae.to);Rc(ie,ge,fe,ae.margin)}}function Rc(ie,ae,ge,fe){var ye=ad(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});vc(ie,ye.scrollLeft,ye.scrollTop)}function ac(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(le||_r(ie,{top:ae}),Rd(ie,ae,!0),le&&_r(ie),Pi(ie,100))}function Rd(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 au(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,sa(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function su(ie){var ae=ie.display,ge=ae.gutters.offsetWidth,fe=Math.round(ie.doc.height+ri(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+$i(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:ge}}var Wu=function(ie,ae,ge){this.cm=ge;var fe=this.vert=Xe("div",[Xe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ye=this.horiz=Xe("div",[Xe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=ye.tabIndex=-1,ie(fe),ie(ye),qt(fe,"scroll",function(){fe.clientHeight&&ae(fe.scrollTop,"vertical")}),qt(ye,"scroll",function(){ye.clientWidth&&ae(ye.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,We&&Ve<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Wu.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 Re=ie.viewWidth-ie.barLeft-(ge?fe:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Re)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(fe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ge?fe:0,bottom:ae?fe:0}},Wu.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Wu.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Wu.prototype.zeroWidthHack=function(){var ie=de&&!at?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ke,this.disableVert=new Ke},Wu.prototype.enableZeroWidthBar=function(ie,ae,ge){ie.style.pointerEvents="auto";function fe(){var ye=ie.getBoundingClientRect(),Re=ge=="vert"?document.elementFromPoint(ye.right-1,(ye.top+ye.bottom)/2):document.elementFromPoint((ye.right+ye.left)/2,ye.bottom-1);Re!=ie?ie.style.pointerEvents="none":ae.set(1e3,fe)}ae.set(1e3,fe)},Wu.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Au=function(){};Au.prototype.update=function(){return{bottom:0,right:0}},Au.prototype.setScrollLeft=function(){},Au.prototype.setScrollTop=function(){},Au.prototype.clear=function(){};function yc(ie,ae){ae||(ae=su(ie));var ge=ie.display.barWidth,fe=ie.display.barHeight;bd(ie,ae);for(var ye=0;ye<4&&ge!=ie.display.barWidth||fe!=ie.display.barHeight;ye++)ge!=ie.display.barWidth&&ie.options.lineWrapping&&Dr(ie),bd(ie,su(ie)),ge=ie.display.barWidth,fe=ie.display.barHeight}function bd(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 _d={native:Wu,null:Au};function Fd(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&je(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new _d[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),qt(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,ge){ge=="horizontal"?au(ie,ae):ac(ie,ae)},ie),ie.display.scrollbars.addClass&&Ot(ie.display.wrapper,ie.display.scrollbars.addClass)}var ch=0;function ai(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:++ch},dl(ie.curOp)}function po(ie){var ae=ie.curOp;ae&&Ea(ae,function(ge){for(var fe=0;fe<ge.ops.length;fe++)ge.ops[fe].cm.curOp=null;Xa(ge)})}function Xa(ie){for(var ae=ie.ops,ge=0;ge<ae.length;ge++)rt(ae[ge]);for(var fe=0;fe<ae.length;fe++)et(ae[fe]);for(var ye=0;ye<ae.length;ye++)Yt(ae[ye]);for(var Re=0;Re<ae.length;Re++)Qt(ae[Re]);for(var Ye=0;Ye<ae.length;Ye++)yn(ae[Ye])}function rt(ie){var ae=ie.cm,ge=ae.display;or(ae),ie.updateMaxLine&&fa(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 yi(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function et(ie){ie.updatedDisplay=ie.mustUpdate&&Jr(ie.cm,ie.update)}function Yt(ie){var ae=ie.cm,ge=ae.display;ie.updatedDisplay&&Dr(ae),ie.barMeasure=su(ae),ge.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=Zr(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+$i(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,ge.sizer.offsetLeft+ie.adjustWidthTo-ki(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=ge.input.prepareSelection())}function Qt(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&au(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var ge=ie.focus&&ie.focus==ot();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,ge),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&yc(ae,ie.barMeasure),ie.updatedDisplay&&Xo(ae,ie.barMeasure),ie.selectionChanged&&Sa(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),ge&&Ga(ie.cm)}function yn(ie){var ae=ie.cm,ge=ae.display,fe=ae.doc;if(ie.updatedDisplay&&rr(ae,ie.update),ge.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(ge.wheelStartX=ge.wheelStartY=null),ie.scrollTop!=null&&Rd(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&au(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var ye=pl(ae,Ti(fe,ie.scrollToPos.from),Ti(fe,ie.scrollToPos.to),ie.scrollToPos.margin);Hs(ae,ye)}var Re=ie.maybeHiddenMarkers,Ye=ie.maybeUnhiddenMarkers;if(Re)for(var pt=0;pt<Re.length;++pt)Re[pt].lines.length||hn(Re[pt],"hide");if(Ye)for(var ft=0;ft<Ye.length;++ft)Ye[ft].lines.length&&hn(Ye[ft],"unhide");ge.wrapper.offsetHeight&&(fe.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&hn(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function on(ie,ae){if(ie.curOp)return ae();ai(ie);try{return ae()}finally{po(ie)}}function Kn(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);ai(ie);try{return ae.apply(ie,arguments)}finally{po(ie)}}}function zn(ie){return function(){if(this.curOp)return ie.apply(this,arguments);ai(this);try{return ie.apply(this,arguments)}finally{po(this)}}}function Xn(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);ai(ae);try{return ie.apply(this,arguments)}finally{po(ae)}}}function Pi(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Wt(Jn,ie))}function Jn(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var ge=+new Date+ie.options.workTime,fe=Cr(ie,ae.highlightFrontier),ye=[];ae.iter(fe.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Re){if(fe.line>=ie.display.viewFrom){var Ye=Re.styles,pt=Re.text.length>ie.options.maxHighlightLength?vn(ae.mode,fe.state):null,ft=Yr(ie,Re,fe,!0);pt&&(fe.state=pt),Re.styles=ft.styles;var jt=Re.styleClasses,Mn=ft.classes;Mn?Re.styleClasses=Mn:jt&&(Re.styleClasses=null);for(var Ut=!Ye||Ye.length!=Re.styles.length||jt!=Mn&&(!jt||!Mn||jt.bgClass!=Mn.bgClass||jt.textClass!=Mn.textClass),oi=0;!Ut&&oi<Ye.length;++oi)Ut=Ye[oi]!=Re.styles[oi];Ut&&ye.push(fe.line),Re.stateAfter=fe.save(),fe.nextLine()}else Re.text.length<=ie.options.maxHighlightLength&&Jt(ie,Re.text,fe),Re.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>ge)return Pi(ie,ie.options.workDelay),!0}),ae.highlightFrontier=fe.line,ae.modeFrontier=Math.max(ae.modeFrontier,fe.line),ye.length&&on(ie,function(){for(var Re=0;Re<ye.length;Re++)Ii(ie,ye[Re],"text")})}}var yi=function(ie,ae,ge){var fe=ie.display;this.viewport=ae,this.visible=zo(fe,ie.doc,ae),this.editorIsHidden=!fe.wrapper.offsetWidth,this.wrapperHeight=fe.wrapper.clientHeight,this.wrapperWidth=fe.wrapper.clientWidth,this.oldDisplayWidth=ki(ie),this.force=ge,this.dims=wr(ie),this.events=[]};yi.prototype.signal=function(ie,ae){jn(ie,ae)&&this.events.push(arguments)},yi.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)hn.apply(null,this.events[ie])};function or(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=$i(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=$i(ie)+"px",ae.scrollbarsClipped=!0)}function Vi(ie){if(ie.hasFocus())return null;var ae=ot();if(!ae||!Mt(ie.display.lineDiv,ae))return null;var ge={activeElt:ae};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&Mt(ie.display.lineDiv,fe.anchorNode)&&(ge.anchorNode=fe.anchorNode,ge.anchorOffset=fe.anchorOffset,ge.focusNode=fe.focusNode,ge.focusOffset=fe.focusOffset)}return ge}function Ui(ie){if(!(!ie||!ie.activeElt||ie.activeElt==ot())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Mt(document.body,ie.anchorNode)&&Mt(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 Jr(ie,ae){var ge=ie.display,fe=ie.doc;if(ae.editorIsHidden)return Gr(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&&Er(ie)==0)return!1;ro(ie)&&(Gr(ie),ae.dims=wr(ie));var ye=fe.first+fe.size,Re=Math.max(ae.visible.from-ie.options.viewportMargin,fe.first),Ye=Math.min(ye,ae.visible.to+ie.options.viewportMargin);ge.viewFrom<Re&&Re-ge.viewFrom<20&&(Re=Math.max(fe.first,ge.viewFrom)),ge.viewTo>Ye&&ge.viewTo-Ye<20&&(Ye=Math.min(ye,ge.viewTo)),$n&&(Re=Ur(ie.doc,Re),Ye=wo(ie.doc,Ye));var pt=Re!=ge.viewFrom||Ye!=ge.viewTo||ge.lastWrapHeight!=ae.wrapperHeight||ge.lastWrapWidth!=ae.wrapperWidth;Fr(ie,Re,Ye),ge.viewOffset=Eo(an(ie.doc,ge.viewFrom)),ie.display.mover.style.top=ge.viewOffset+"px";var ft=Er(ie);if(!pt&&ft==0&&!ae.force&&ge.renderedView==ge.view&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo))return!1;var jt=Vi(ie);return ft>4&&(ge.lineDiv.style.display="none"),zr(ie,ge.updateLineNumbers,ae.dims),ft>4&&(ge.lineDiv.style.display=""),ge.renderedView=ge.view,Ui(jt),_e(ge.cursorDiv),_e(ge.selectionDiv),ge.gutters.style.height=ge.sizer.style.minHeight=0,pt&&(ge.lastWrapHeight=ae.wrapperHeight,ge.lastWrapWidth=ae.wrapperWidth,Pi(ie,400)),ge.updateLineNumbers=null,!0}function rr(ie,ae){for(var ge=ae.viewport,fe=!0;;fe=!1){if(!fe||!ie.options.lineWrapping||ae.oldDisplayWidth==ki(ie)){if(ge&&ge.top!=null&&(ge={top:Math.min(ie.doc.height+ri(ie.display)-Ri(ie),ge.top)}),ae.visible=zo(ie.display,ie.doc,ge),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else fe&&(ae.visible=zo(ie.display,ie.doc,ge));if(!Jr(ie,ae))break;Dr(ie);var ye=su(ie);Tr(ie),yc(ie,ye),Xo(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 _r(ie,ae){var ge=new yi(ie,ae);if(Jr(ie,ge)){Dr(ie),rr(ie,ge);var fe=su(ie);Tr(ie),yc(ie,fe),Xo(ie,fe),ge.finish()}}function zr(ie,ae,ge){var fe=ie.display,ye=ie.options.lineNumbers,Re=fe.lineDiv,Ye=Re.firstChild;function pt(ir){var cr=ir.nextSibling;return Le&&de&&ie.display.currentWheelTarget==ir?ir.style.display="none":ir.parentNode.removeChild(ir),cr}for(var ft=fe.view,jt=fe.viewFrom,Mn=0;Mn<ft.length;Mn++){var Ut=ft[Mn];if(!Ut.hidden)if(!Ut.node||Ut.node.parentNode!=Re){var oi=Tl(ie,Ut,jt,ge);Re.insertBefore(oi,Ye)}else{for(;Ye!=Ut.node;)Ye=pt(Ye);var ni=ye&&ae!=null&&ae<=jt&&Ut.lineNumber;Ut.changes&&(Rt(Ut.changes,"gutter")>-1&&(ni=!1),os(ie,Ut,jt,ge)),ni&&(_e(Ut.lineNumber),Ut.lineNumber.appendChild(document.createTextNode(xi(ie.options,jt)))),Ye=Ut.node.nextSibling}jt+=Ut.size}for(;Ye;)Ye=pt(Ye)}function mo(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Xo(ie,ae){ie.display.sizer.style.minHeight=ae.docHeight+"px",ie.display.heightForcer.style.top=ae.docHeight+"px",ie.display.gutters.style.height=ae.docHeight+ie.display.barHeight+$i(ie)+"px"}function sa(ie){var ae=ie.display,ge=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var fe=to(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,ye=ae.gutters.offsetWidth,Re=fe+"px",Ye=0;Ye<ge.length;Ye++)if(!ge[Ye].hidden){ie.options.fixedGutter&&(ge[Ye].gutter&&(ge[Ye].gutter.style.left=Re),ge[Ye].gutterBackground&&(ge[Ye].gutterBackground.style.left=Re));var pt=ge[Ye].alignable;if(pt)for(var ft=0;ft<pt.length;ft++)pt[ft].style.left=Re}ie.options.fixedGutter&&(ae.gutters.style.left=fe+ye+"px")}}function ro(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,ge=xi(ie.options,ae.first+ae.size-1),fe=ie.display;if(ge.length!=fe.lineNumChars){var ye=fe.measure.appendChild(Xe("div",[Xe("div",ge)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Re=ye.firstChild.offsetWidth,Ye=ye.offsetWidth-Re;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(Re,fe.lineGutter.offsetWidth-Ye)+1,fe.lineNumWidth=fe.lineNumInnerWidth+Ye,fe.lineNumChars=fe.lineNumInnerWidth?ge.length:-1,fe.lineGutter.style.width=fe.lineNumWidth+"px",mo(ie.display),!0}return!1}function $o(ie,ae){for(var ge=[],fe=!1,ye=0;ye<ie.length;ye++){var Re=ie[ye],Ye=null;if(typeof Re!="string"&&(Ye=Re.style,Re=Re.className),Re=="CodeMirror-linenumbers")if(ae)fe=!0;else continue;ge.push({className:Re,style:Ye})}return ae&&!fe&&ge.push({className:"CodeMirror-linenumbers",style:null}),ge}function ka(ie){var ae=ie.gutters,ge=ie.gutterSpecs;_e(ae),ie.lineGutter=null;for(var fe=0;fe<ge.length;++fe){var ye=ge[fe],Re=ye.className,Ye=ye.style,pt=ae.appendChild(Xe("div",null,"CodeMirror-gutter "+Re));Ye&&(pt.style.cssText=Ye),Re=="CodeMirror-linenumbers"&&(ie.lineGutter=pt,pt.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=ge.length?"":"none",mo(ie)}function uo(ie){ka(ie.display),_i(ie),sa(ie)}function Oo(ie,ae,ge,fe){var ye=this;this.input=ge,ye.scrollbarFiller=Xe("div",null,"CodeMirror-scrollbar-filler"),ye.scrollbarFiller.setAttribute("cm-not-content","true"),ye.gutterFiller=Xe("div",null,"CodeMirror-gutter-filler"),ye.gutterFiller.setAttribute("cm-not-content","true"),ye.lineDiv=ht("div",null,"CodeMirror-code"),ye.selectionDiv=Xe("div",null,null,"position: relative; z-index: 1"),ye.cursorDiv=Xe("div",null,"CodeMirror-cursors"),ye.measure=Xe("div",null,"CodeMirror-measure"),ye.lineMeasure=Xe("div",null,"CodeMirror-measure"),ye.lineSpace=ht("div",[ye.measure,ye.lineMeasure,ye.selectionDiv,ye.cursorDiv,ye.lineDiv],null,"position: relative; outline: none");var Re=ht("div",[ye.lineSpace],"CodeMirror-lines");ye.mover=Xe("div",[Re],null,"position: relative"),ye.sizer=Xe("div",[ye.mover],"CodeMirror-sizer"),ye.sizerWidth=null,ye.heightForcer=Xe("div",null,null,"position: absolute; height: "+Sn+"px; width: 1px;"),ye.gutters=Xe("div",null,"CodeMirror-gutters"),ye.lineGutter=null,ye.scroller=Xe("div",[ye.sizer,ye.heightForcer,ye.gutters],"CodeMirror-scroll"),ye.scroller.setAttribute("tabIndex","-1"),ye.wrapper=Xe("div",[ye.scrollbarFiller,ye.gutterFiller,ye.scroller],"CodeMirror"),We&&Ve<8&&(ye.gutters.style.zIndex=-1,ye.scroller.style.paddingRight=0),!Le&&!(le&&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=$o(fe.gutters,fe.lineNumbers),ka(ye),ge.init(ye)}var co=0,Ir=null;We?Ir=-.53:le?Ir=15:xt?Ir=-.7:bt&&(Ir=-1/3);function Fo(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 ta(ie){var ae=Fo(ie);return ae.x*=Ir,ae.y*=Ir,ae}function Pa(ie,ae){var ge=Fo(ae),fe=ge.x,ye=ge.y,Re=ie.display,Ye=Re.scroller,pt=Ye.scrollWidth>Ye.clientWidth,ft=Ye.scrollHeight>Ye.clientHeight;if(fe&&pt||ye&&ft){if(ye&&de&&Le){e:for(var jt=ae.target,Mn=Re.view;jt!=Ye;jt=jt.parentNode)for(var Ut=0;Ut<Mn.length;Ut++)if(Mn[Ut].node==jt){ie.display.currentWheelTarget=jt;break e}}if(fe&&!le&&!Ue&&Ir!=null){ye&&ft&&ac(ie,Math.max(0,Ye.scrollTop+ye*Ir)),au(ie,Math.max(0,Ye.scrollLeft+fe*Ir)),(!ye||ye&&ft)&&wi(ae),Re.wheelStartX=null;return}if(ye&&Ir!=null){var oi=ye*Ir,ni=ie.doc.scrollTop,ir=ni+Re.wrapper.clientHeight;oi<0?ni=Math.max(0,ni+oi-50):ir=Math.min(ie.doc.height,ir+oi+50),_r(ie,{top:ni,bottom:ir})}co<20&&(Re.wheelStartX==null?(Re.wheelStartX=Ye.scrollLeft,Re.wheelStartY=Ye.scrollTop,Re.wheelDX=fe,Re.wheelDY=ye,setTimeout(function(){if(Re.wheelStartX!=null){var cr=Ye.scrollLeft-Re.wheelStartX,Br=Ye.scrollTop-Re.wheelStartY,ao=Br&&Re.wheelDY&&Br/Re.wheelDY||cr&&Re.wheelDX&&cr/Re.wheelDX;Re.wheelStartX=Re.wheelStartY=null,ao&&(Ir=(Ir*co+ao)/(co+1),++co)}},200)):(Re.wheelDX+=fe,Re.wheelDY+=ye))}}var wa=function(ie,ae){this.ranges=ie,this.primIndex=ae};wa.prototype.primary=function(){return this.ranges[this.primIndex]},wa.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(!kn(ge.anchor,fe.anchor)||!kn(ge.head,fe.head))return!1}return!0},wa.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new oo(zi(this.ranges[ae].anchor),zi(this.ranges[ae].head));return new wa(ie,this.primIndex)},wa.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},wa.prototype.contains=function(ie,ae){ae||(ae=ie);for(var ge=0;ge<this.ranges.length;ge++){var fe=this.ranges[ge];if(fn(ae,fe.from())>=0&&fn(ie,fe.to())<=0)return ge}return-1};var oo=function(ie,ae){this.anchor=ie,this.head=ae};oo.prototype.from=function(){return Si(this.anchor,this.head)},oo.prototype.to=function(){return Di(this.anchor,this.head)},oo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ta(ie,ae,ge){var fe=ie&&ie.options.selectionsMayTouch,ye=ae[ge];ae.sort(function(oi,ni){return fn(oi.from(),ni.from())}),ge=Rt(ae,ye);for(var Re=1;Re<ae.length;Re++){var Ye=ae[Re],pt=ae[Re-1],ft=fn(pt.to(),Ye.from());if(fe&&!Ye.empty()?ft>0:ft>=0){var jt=Si(pt.from(),Ye.from()),Mn=Di(pt.to(),Ye.to()),Ut=pt.empty()?Ye.from()==Ye.head:pt.from()==pt.head;Re<=ge&&--ge,ae.splice(--Re,2,new oo(Ut?Mn:jt,Ut?jt:Mn))}}return new wa(ae,ge)}function Va(ie,ae){return new wa([new oo(ie,ae||ie)],0)}function ws(ie){return ie.text?tn(ie.from.line+ie.text.length-1,St(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function as(ie,ae){if(fn(ie,ae.from)<0)return ie;if(fn(ie,ae.to)<=0)return ws(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+=ws(ae).ch-ae.to.ch),tn(ge,fe)}function qs(ie,ae){for(var ge=[],fe=0;fe<ie.sel.ranges.length;fe++){var ye=ie.sel.ranges[fe];ge.push(new oo(as(ye.anchor,ae),as(ye.head,ae)))}return Ta(ie.cm,ge,ie.sel.primIndex)}function Bs(ie,ae,ge){return ie.line==ae.line?tn(ge.line,ie.ch-ae.ch+ge.ch):tn(ge.line+(ie.line-ae.line),ie.ch)}function Za(ie,ae,ge){for(var fe=[],ye=tn(ie.first,0),Re=ye,Ye=0;Ye<ae.length;Ye++){var pt=ae[Ye],ft=Bs(pt.from,ye,Re),jt=Bs(ws(pt),ye,Re);if(ye=pt.to,Re=jt,ge=="around"){var Mn=ie.sel.ranges[Ye],Ut=fn(Mn.head,Mn.anchor)<0;fe[Ye]=new oo(Ut?jt:ft,Ut?ft:jt)}else fe[Ye]=new oo(ft,ft)}return new wa(fe,ie.sel.primIndex)}function oa(ie){ie.doc.mode=Gt(ie.options,ie.doc.modeOption),us(ie)}function us(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,Pi(ie,100),ie.state.modeGen++,ie.curOp&&_i(ie)}function el(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&St(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Ws(ie,ae,ge,fe){function ye(Ho){return ge?ge[Ho]:null}function Re(Ho,Bo,ea){$a(Ho,Bo,ea,fe),pr(Ho,"change",Ho,ae)}function Ye(Ho,Bo){for(var ea=[],_a=Ho;_a<Bo;++_a)ea.push(new va(jt[_a],ye(_a),fe));return ea}var pt=ae.from,ft=ae.to,jt=ae.text,Mn=an(ie,pt.line),Ut=an(ie,ft.line),oi=St(jt),ni=ye(jt.length-1),ir=ft.line-pt.line;if(ae.full)ie.insert(0,Ye(0,jt.length)),ie.remove(jt.length,ie.size-jt.length);else if(el(ie,ae)){var cr=Ye(0,jt.length-1);Re(Ut,Ut.text,ni),ir&&ie.remove(pt.line,ir),cr.length&&ie.insert(pt.line,cr)}else if(Mn==Ut)if(jt.length==1)Re(Mn,Mn.text.slice(0,pt.ch)+oi+Mn.text.slice(ft.ch),ni);else{var Br=Ye(1,jt.length-1);Br.push(new va(oi+Mn.text.slice(ft.ch),ni,fe)),Re(Mn,Mn.text.slice(0,pt.ch)+jt[0],ye(0)),ie.insert(pt.line+1,Br)}else if(jt.length==1)Re(Mn,Mn.text.slice(0,pt.ch)+jt[0]+Ut.text.slice(ft.ch),ye(0)),ie.remove(pt.line+1,ir);else{Re(Mn,Mn.text.slice(0,pt.ch)+jt[0],ye(0)),Re(Ut,oi+Ut.text.slice(ft.ch),ni);var ao=Ye(1,jt.length-1);ir>1&&ie.remove(pt.line+1,ir-1),ie.insert(pt.line+1,ao)}pr(ie,"change",ie,ae)}function hl(ie,ae,ge){function fe(ye,Re,Ye){if(ye.linked)for(var pt=0;pt<ye.linked.length;++pt){var ft=ye.linked[pt];if(ft.doc!=Re){var jt=Ye&&ft.sharedHist;ge&&!jt||(ae(ft.doc,jt),fe(ft.doc,ye,jt))}}}fe(ie,null,!0)}function ba(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,fr(ie),oa(ie),ca(ie),ie.options.lineWrapping||fa(ie),ie.options.mode=ae.modeOption,_i(ie)}function ca(ie){(ie.doc.direction=="rtl"?Ot:je)(ie.display.lineDiv,"CodeMirror-rtl")}function Ca(ie){on(ie,function(){ca(ie),_i(ie)})}function Qo(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 vs(ie,ae){var ge={from:zi(ae.from),to:ws(ae),text:dn(ie,ae.from,ae.to)};return Yl(ie,ge,ae.from.line,ae.to.line+1),hl(ie,function(fe){return Yl(fe,ge,ae.from.line,ae.to.line+1)},!0),ge}function Jo(ie){for(;ie.length;){var ae=St(ie);if(ae.ranges)ie.pop();else break}}function Ra(ie,ae){if(ae)return Jo(ie.done),St(ie.done);if(ie.done.length&&!St(ie.done).ranges)return St(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),St(ie.done)}function rs(ie,ae,ge,fe){var ye=ie.history;ye.undone.length=0;var Re=+new Date,Ye,pt;if((ye.lastOp==fe||ye.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&ye.lastModTime>Re-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(Ye=Ra(ye,ye.lastOp==fe)))pt=St(Ye.changes),fn(ae.from,ae.to)==0&&fn(ae.from,pt.to)==0?pt.to=ws(ae):Ye.changes.push(vs(ie,ae));else{var ft=St(ye.done);for((!ft||!ft.ranges)&&Fl(ie.sel,ye.done),Ye={changes:[vs(ie,ae)],generation:ye.generation},ye.done.push(Ye);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=Re,ye.lastOp=ye.lastSelOp=fe,ye.lastOrigin=ye.lastSelOrigin=ae.origin,pt||hn(ie,"historyAdded")}function ss(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 Dl(ie,ae,ge,fe){var ye=ie.history,Re=fe&&fe.origin;ge==ye.lastSelOp||Re&&ye.lastSelOrigin==Re&&(ye.lastModTime==ye.lastSelTime&&ye.lastOrigin==Re||ss(ie,Re,St(ye.done),ae))?ye.done[ye.done.length-1]=ae:Fl(ae,ye.done),ye.lastSelTime=+new Date,ye.lastSelOrigin=Re,ye.lastSelOp=ge,fe&&fe.clearRedo!==!1&&Jo(ye.undone)}function Fl(ie,ae){var ge=St(ae);ge&&ge.ranges&&ge.equals(ie)||ae.push(ie)}function Yl(ie,ae,ge,fe){var ye=ae["spans_"+ie.id],Re=0;ie.iter(Math.max(ie.first,ge),Math.min(ie.first+ie.size,fe),function(Ye){Ye.markedSpans&&((ye||(ye=ae["spans_"+ie.id]={}))[Re]=Ye.markedSpans),++Re})}function Cs(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 Hl(ie,ae){var ge=ae["spans_"+ie.id];if(!ge)return null;for(var fe=[],ye=0;ye<ae.text.length;++ye)fe.push(Cs(ge[ye]));return fe}function fl(ie,ae){var ge=Hl(ie,ae),fe=Ar(ie,ae);if(!ge)return fe;if(!fe)return ge;for(var ye=0;ye<ge.length;++ye){var Re=ge[ye],Ye=fe[ye];if(Re&&Ye)e:for(var pt=0;pt<Ye.length;++pt){for(var ft=Ye[pt],jt=0;jt<Re.length;++jt)if(Re[jt].marker==ft.marker)continue e;Re.push(ft)}else Ye&&(ge[ye]=Ye)}return ge}function Bl(ie,ae,ge){for(var fe=[],ye=0;ye<ie.length;++ye){var Re=ie[ye];if(Re.ranges){fe.push(ge?wa.prototype.deepCopy.call(Re):Re);continue}var Ye=Re.changes,pt=[];fe.push({changes:pt});for(var ft=0;ft<Ye.length;++ft){var jt=Ye[ft],Mn=void 0;if(pt.push({from:jt.from,to:jt.to,text:jt.text}),ae)for(var Ut in jt)(Mn=Ut.match(/^spans_(\d+)$/))&&Rt(ae,Number(Mn[1]))>-1&&(St(pt)[Ut]=jt[Ut],delete jt[Ut])}}return fe}function _c(ie,ae,ge,fe){if(fe){var ye=ie.anchor;if(ge){var Re=fn(ae,ye)<0;Re!=fn(ge,ye)<0?(ye=ae,ae=ge):Re!=fn(ae,ge)<0&&(ae=ge)}return new oo(ye,ae)}else return new oo(ge||ae,ae)}function Es(ie,ae,ge,fe,ye){ye==null&&(ye=ie.cm&&(ie.cm.display.shift||ie.extend)),js(ie,new wa([_c(ie.sel.primary(),ae,ge,ye)],0),fe)}function Is(ie,ae,ge){for(var fe=[],ye=ie.cm&&(ie.cm.display.shift||ie.extend),Re=0;Re<ie.sel.ranges.length;Re++)fe[Re]=_c(ie.sel.ranges[Re],ae[Re],null,ye);var Ye=Ta(ie.cm,fe,ie.sel.primIndex);js(ie,Ye,ge)}function bs(ie,ae,ge,fe){var ye=ie.sel.ranges.slice(0);ye[ae]=ge,js(ie,Ta(ie.cm,ye,ie.sel.primIndex),fe)}function Gs(ie,ae,ge,fe){js(ie,Va(ae,ge),fe)}function ml(ie,ae,ge){var fe={ranges:ae.ranges,update:function(ye){this.ranges=[];for(var Re=0;Re<ye.length;Re++)this.ranges[Re]=new oo(Ti(ie,ye[Re].anchor),Ti(ie,ye[Re].head))},origin:ge&&ge.origin};return hn(ie,"beforeSelectionChange",ie,fe),ie.cm&&hn(ie.cm,"beforeSelectionChange",ie.cm,fe),fe.ranges!=ae.ranges?Ta(ie.cm,fe.ranges,fe.ranges.length-1):ae}function ts(ie,ae,ge){var fe=ie.history.done,ye=St(fe);ye&&ye.ranges?(fe[fe.length-1]=ae,Il(ie,ae,ge)):js(ie,ae,ge)}function js(ie,ae,ge){Il(ie,ae,ge),Dl(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,ge)}function Il(ie,ae,ge){(jn(ie,"beforeSelectionChange")||ie.cm&&jn(ie.cm,"beforeSelectionChange"))&&(ae=ml(ie,ae,ge));var fe=ge&&ge.bias||(fn(ae.primary().head,ie.sel.primary().head)<0?-1:1);Xl(ie,Du(ie,ae,fe,!0)),!(ge&&ge.scroll===!1)&&ie.cm&&oc(ie.cm)}function Xl(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,mi(ie.cm)),pr(ie,"cursorActivity",ie))}function Gu(ie){Xl(ie,Du(ie,ie.sel,null,!1))}function Du(ie,ae,ge,fe){for(var ye,Re=0;Re<ae.ranges.length;Re++){var Ye=ae.ranges[Re],pt=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Re],ft=Iu(ie,Ye.anchor,pt&&pt.anchor,ge,fe),jt=Iu(ie,Ye.head,pt&&pt.head,ge,fe);(ye||ft!=Ye.anchor||jt!=Ye.head)&&(ye||(ye=ae.ranges.slice(0,Re)),ye[Re]=new oo(ft,jt))}return ye?Ta(ie.cm,ye,ae.primIndex):ae}function vl(ie,ae,ge,fe,ye){var Re=an(ie,ae.line);if(Re.markedSpans)for(var Ye=0;Ye<Re.markedSpans.length;++Ye){var pt=Re.markedSpans[Ye],ft=pt.marker,jt="selectLeft"in ft?!ft.selectLeft:ft.inclusiveLeft,Mn="selectRight"in ft?!ft.selectRight:ft.inclusiveRight;if((pt.from==null||(jt?pt.from<=ae.ch:pt.from<ae.ch))&&(pt.to==null||(Mn?pt.to>=ae.ch:pt.to>ae.ch))){if(ye&&(hn(ft,"beforeCursorEnter"),ft.explicitlyCleared))if(Re.markedSpans){--Ye;continue}else break;if(!ft.atomic)continue;if(ge){var Ut=ft.find(fe<0?1:-1),oi=void 0;if((fe<0?Mn:jt)&&(Ut=Ou(ie,Ut,-fe,Ut&&Ut.line==ae.line?Re:null)),Ut&&Ut.line==ae.line&&(oi=fn(Ut,ge))&&(fe<0?oi<0:oi>0))return vl(ie,Ut,ae,fe,ye)}var ni=ft.find(fe<0?-1:1);return(fe<0?jt:Mn)&&(ni=Ou(ie,ni,fe,ni.line==ae.line?Re:null)),ni?vl(ie,ni,ae,fe,ye):null}}return ae}function Iu(ie,ae,ge,fe,ye){var Re=fe||1,Ye=vl(ie,ae,ge,Re,ye)||!ye&&vl(ie,ae,ge,Re,!0)||vl(ie,ae,ge,-Re,ye)||!ye&&vl(ie,ae,ge,-Re,!0);return Ye||(ie.cantEdit=!0,tn(ie.first,0))}function Ou(ie,ae,ge,fe){return ge<0&&ae.ch==0?ae.line>ie.first?Ti(ie,tn(ae.line-1)):null:ge>0&&ae.ch==(fe||an(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?tn(ae.line+1,0):null:new tn(ae.line,ae.ch+ge)}function Ms(ie){ie.setSelection(tn(ie.firstLine(),0),tn(ie.lastLine()),_t)}function Wl(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,Re,Ye,pt){ye&&(fe.from=Ti(ie,ye)),Re&&(fe.to=Ti(ie,Re)),Ye&&(fe.text=Ye),pt!==void 0&&(fe.origin=pt)}),hn(ie,"beforeChange",ie,fe),ie.cm&&hn(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 $s(ie,ae,ge){if(ie.cm){if(!ie.cm.curOp)return Kn(ie.cm,$s)(ie,ae,ge);if(ie.cm.state.suppressEdits)return}if(!((jn(ie,"beforeChange")||ie.cm&&jn(ie.cm,"beforeChange"))&&(ae=Wl(ie,ae,!0),!ae))){var fe=fo&&!ge&&Wo(ie,ae.from,ae.to);if(fe)for(var ye=fe.length-1;ye>=0;--ye)zs(ie,{from:fe[ye].from,to:fe[ye].to,text:ye?[""]:ae.text,origin:ae.origin});else zs(ie,ae)}}function zs(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&fn(ae.from,ae.to)==0)){var ge=qs(ie,ae);rs(ie,ae,ge,ie.cm?ie.cm.curOp.id:NaN),sc(ie,ae,ge,Ar(ie,ae));var fe=[];hl(ie,function(ye,Re){!Re&&Rt(fe,ye.history)==-1&&(Ys(ye.history,ae),fe.push(ye.history)),sc(ye,ae,null,Ar(ye,ae))})}}function $u(ie,ae,ge){var fe=ie.cm&&ie.cm.state.suppressEdits;if(!(fe&&!ge)){for(var ye=ie.history,Re,Ye=ie.sel,pt=ae=="undo"?ye.done:ye.undone,ft=ae=="undo"?ye.undone:ye.done,jt=0;jt<pt.length&&(Re=pt[jt],!(ge?Re.ranges&&!Re.equals(ie.sel):!Re.ranges));jt++);if(jt!=pt.length){for(ye.lastOrigin=ye.lastSelOrigin=null;;)if(Re=pt.pop(),Re.ranges){if(Fl(Re,ft),ge&&!Re.equals(ie.sel)){js(ie,Re,{clearRedo:!1});return}Ye=Re}else if(fe){pt.push(Re);return}else break;var Mn=[];Fl(Ye,ft),ft.push({changes:Mn,generation:ye.generation}),ye.generation=Re.generation||++ye.maxGeneration;for(var Ut=jn(ie,"beforeChange")||ie.cm&&jn(ie.cm,"beforeChange"),oi=function(cr){var Br=Re.changes[cr];if(Br.origin=ae,Ut&&!Wl(ie,Br,!1))return pt.length=0,{};Mn.push(vs(ie,Br));var ao=cr?qs(ie,Br):St(pt);sc(ie,Br,ao,fl(ie,Br)),!cr&&ie.cm&&ie.cm.scrollIntoView({from:Br.from,to:ws(Br)});var Ho=[];hl(ie,function(Bo,ea){!ea&&Rt(Ho,Bo.history)==-1&&(Ys(Bo.history,Br),Ho.push(Bo.history)),sc(Bo,Br,null,fl(Bo,Br))})},ni=Re.changes.length-1;ni>=0;--ni){var ir=oi(ni);if(ir)return ir.v}}}}function Vc(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new wa(Zn(ie.sel.ranges,function(ye){return new oo(tn(ye.anchor.line+ae,ye.anchor.ch),tn(ye.head.line+ae,ye.head.ch))}),ie.sel.primIndex),ie.cm)){_i(ie.cm,ie.first,ie.first-ae,ae);for(var ge=ie.cm.display,fe=ge.viewFrom;fe<ge.viewTo;fe++)Ii(ie.cm,fe,"gutter")}}function sc(ie,ae,ge,fe){if(ie.cm&&!ie.cm.curOp)return Kn(ie.cm,sc)(ie,ae,ge,fe);if(ae.to.line<ie.first){Vc(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);Vc(ie,ye),ae={from:tn(ie.first,0),to:tn(ae.to.line+ye,ae.to.ch),text:[St(ae.text)],origin:ae.origin}}var Re=ie.lastLine();ae.to.line>Re&&(ae={from:ae.from,to:tn(Re,an(ie,Re).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=dn(ie,ae.from,ae.to),ge||(ge=qs(ie,ae)),ie.cm?lc(ie.cm,ae,fe):Ws(ie,ae,fe),Il(ie,ge,_t),ie.cantEdit&&Iu(ie,tn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function lc(ie,ae,ge){var fe=ie.doc,ye=ie.display,Re=ae.from,Ye=ae.to,pt=!1,ft=Re.line;ie.options.lineWrapping||(ft=zt(Xr(an(fe,Re.line))),fe.iter(ft,Ye.line+1,function(ni){if(ni==ye.maxLine)return pt=!0,!0})),fe.sel.contains(ae.from,ae.to)>-1&&mi(ie),Ws(fe,ae,ge,yo(ie)),ie.options.lineWrapping||(fe.iter(ft,Re.line+ae.text.length,function(ni){var ir=es(ni);ir>ye.maxLineLength&&(ye.maxLine=ni,ye.maxLineLength=ir,ye.maxLineChanged=!0,pt=!1)}),pt&&(ie.curOp.updateMaxLine=!0)),jr(fe,Re.line),Pi(ie,400);var jt=ae.text.length-(Ye.line-Re.line)-1;ae.full?_i(ie):Re.line==Ye.line&&ae.text.length==1&&!el(ie.doc,ae)?Ii(ie,Re.line,"text"):_i(ie,Re.line,Ye.line+1,jt);var Mn=jn(ie,"changes"),Ut=jn(ie,"change");if(Ut||Mn){var oi={from:Re,to:Ye,text:ae.text,removed:ae.removed,origin:ae.origin};Ut&&pr(ie,"change",ie,oi),Mn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(oi)}ie.display.selForContextMenu=null}function Ku(ie,ae,ge,fe,ye){var Re;fe||(fe=ge),fn(fe,ge)<0&&(Re=[fe,ge],ge=Re[0],fe=Re[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),$s(ie,{from:ge,to:fe,text:ae,origin:ye})}function ku(ie,ae,ge,fe){ge<ie.line?ie.line+=fe:ae<ie.line&&(ie.line=ae,ie.ch=0)}function ys(ie,ae,ge,fe){for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Ye=!0;if(Re.ranges){Re.copied||(Re=ie[ye]=Re.deepCopy(),Re.copied=!0);for(var pt=0;pt<Re.ranges.length;pt++)ku(Re.ranges[pt].anchor,ae,ge,fe),ku(Re.ranges[pt].head,ae,ge,fe);continue}for(var ft=0;ft<Re.changes.length;++ft){var jt=Re.changes[ft];if(ge<jt.from.line)jt.from=tn(jt.from.line+fe,jt.from.ch),jt.to=tn(jt.to.line+fe,jt.to.ch);else if(ae<=jt.to.line){Ye=!1;break}}Ye||(ie.splice(0,ye+1),ye=0)}}function Ys(ie,ae){var ge=ae.from.line,fe=ae.to.line,ye=ae.text.length-(fe-ge)-1;ys(ie.done,ge,fe,ye),ys(ie.undone,ge,fe,ye)}function yl(ie,ae,ge,fe){var ye=ae,Re=ae;return typeof ae=="number"?Re=an(ie,Fi(ie,ae)):ye=zt(ae),ye==null?null:(fe(Re,ye)&&ie.cm&&Ii(ie.cm,ye,ge),Re)}function Xs(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}Xs.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,ms(ye),pr(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 ds(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}ds.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 Re=Math.min(ae,ye-ie),Ye=fe.height;if(fe.removeInner(ie,Re),this.height-=Ye-fe.height,ye==Re&&(this.children.splice(ge--,1),fe.parent=null),(ae-=Re)==0)break;ie=0}else ie-=ye}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof Xs))){var pt=[];this.collapse(pt),this.children=[new Xs(pt)],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],Re=ye.chunkSize();if(ie<=Re){if(ye.insertInner(ie,ae,ge),ye.lines&&ye.lines.length>50){for(var Ye=ye.lines.length%25+25,pt=Ye;pt<ye.lines.length;){var ft=new Xs(ye.lines.slice(pt,pt+=25));ye.height-=ft.height,this.children.splice(++fe,0,ft),ft.parent=this}ye.lines=ye.lines.slice(0,Ye),this.maybeSpill()}break}ie-=Re}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),ge=new ds(ae);if(ie.parent){ie.size-=ge.size,ie.height-=ge.height;var ye=Rt(ie.parent.children,ie);ie.parent.children.splice(ye+1,0,ge)}else{var fe=new ds(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],Re=ye.chunkSize();if(ie<Re){var Ye=Math.min(ae,Re-ie);if(ye.iterN(ie,Ye,ge))return!0;if((ae-=Ye)==0)break;ie=0}else ie-=Re}}};var xl=function(ie,ae,ge){if(ge)for(var fe in ge)ge.hasOwnProperty(fe)&&(this[fe]=ge[fe]);this.doc=ie,this.node=ae};xl.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,ge=this.line,fe=zt(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 Re=Zl(this);pn(ge,Math.max(0,ge.height-Re)),ie&&(on(ie,function(){Su(ie,ge,-Re),Ii(ie,fe,"widget")}),pr(ie,"lineWidgetCleared",ie,this,fe))}},xl.prototype.changed=function(){var ie=this,ae=this.height,ge=this.doc.cm,fe=this.line;this.height=null;var ye=Zl(this)-ae;ye&&(fi(this.doc,fe)||pn(fe,fe.height+ye),ge&&on(ge,function(){ge.curOp.forceUpdate=!0,Su(ge,fe,ye),pr(ge,"lineWidgetChanged",ge,ie,zt(fe))}))},An(xl);function Su(ie,ae,ge){Eo(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Tc(ie,ge)}function xc(ie,ae,ge,fe){var ye=new xl(ie,ge,fe),Re=ie.cm;return Re&&ye.noHScroll&&(Re.display.alignWidgets=!0),yl(ie,ae,"widget",function(Ye){var pt=Ye.widgets||(Ye.widgets=[]);if(ye.insertAt==null?pt.push(ye):pt.splice(Math.min(pt.length-1,Math.max(0,ye.insertAt)),0,ye),ye.line=Ye,Re&&!fi(ie,Ye)){var ft=Eo(Ye)<ie.scrollTop;pn(Ye,Ye.height+Zl(ye)),ft&&Tc(Re,ye.height),Re.curOp.forceUpdate=!0}return!0}),Re&&pr(Re,"lineWidgetAdded",Re,ye,typeof ae=="number"?ae:zt(ae)),ye}var jd=0,gn=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++jd};gn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&ai(ie),jn(this,"clear")){var ge=this.find();ge&&pr(this,"clear",ge.from,ge.to)}for(var fe=null,ye=null,Re=0;Re<this.lines.length;++Re){var Ye=this.lines[Re],pt=Ko(Ye.markedSpans,this);ie&&!this.collapsed?Ii(ie,zt(Ye),"text"):ie&&(pt.to!=null&&(ye=zt(Ye)),pt.from!=null&&(fe=zt(Ye))),Ye.markedSpans=Ji(Ye.markedSpans,pt),pt.from==null&&this.collapsed&&!fi(this.doc,Ye)&&ie&&pn(Ye,lr(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var ft=0;ft<this.lines.length;++ft){var jt=Xr(this.lines[ft]),Mn=es(jt);Mn>ie.display.maxLineLength&&(ie.display.maxLine=jt,ie.display.maxLineLength=Mn,ie.display.maxLineChanged=!0)}fe!=null&&ie&&this.collapsed&&_i(ie,fe,ye+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Gu(ie.doc)),ie&&pr(ie,"markerCleared",ie,this,fe,ye),ae&&po(ie),this.parent&&this.parent.clear()}},gn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var ge,fe,ye=0;ye<this.lines.length;++ye){var Re=this.lines[ye],Ye=Ko(Re.markedSpans,this);if(Ye.from!=null&&(ge=tn(ae?Re:zt(Re),Ye.from),ie==-1))return ge;if(Ye.to!=null&&(fe=tn(ae?Re:zt(Re),Ye.to),ie==1))return fe}return ge&&{from:ge,to:fe}},gn.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),ge=this,fe=this.doc.cm;!ae||!fe||on(fe,function(){var ye=ae.line,Re=zt(ae.line),Ye=ga(fe,Re);if(Ye&&(Yo(Ye),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!fi(ge.doc,ye)&&ge.height!=null){var pt=ge.height;ge.height=null;var ft=Zl(ge)-pt;ft&&pn(ye,ye.height+ft)}pr(fe,"markerChanged",fe,ie)})},gn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||Rt(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},gn.prototype.detachLine=function(ie){if(this.lines.splice(Rt(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},An(gn);function sd(ie,ae,ge,fe,ye){if(fe&&fe.shared)return df(ie,ae,ge,fe,ye);if(ie.cm&&!ie.cm.curOp)return Kn(ie.cm,sd)(ie,ae,ge,fe,ye);var Re=new gn(ie,ye),Ye=fn(ae,ge);if(fe&&Lt(fe,Re,!1),Ye>0||Ye==0&&Re.clearWhenEmpty!==!1)return Re;if(Re.replacedWith&&(Re.collapsed=!0,Re.widgetNode=ht("span",[Re.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||Re.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(Re.widgetNode.insertLeft=!0)),Re.collapsed){if(Po(ie,ae.line,ae,ge,Re)||ae.line!=ge.line&&Po(ie,ge.line,ae,ge,Re))throw new Error("Inserting collapsed marker partially overlapping an existing one");Un()}Re.addToHistory&&rs(ie,{from:ae,to:ge,origin:"markText"},ie.sel,NaN);var pt=ae.line,ft=ie.cm,jt;if(ie.iter(pt,ge.line+1,function(Ut){ft&&Re.collapsed&&!ft.options.lineWrapping&&Xr(Ut)==ft.display.maxLine&&(jt=!0),Re.collapsed&&pt!=ae.line&&pn(Ut,0),la(Ut,new Do(Re,pt==ae.line?ae.ch:null,pt==ge.line?ge.ch:null)),++pt}),Re.collapsed&&ie.iter(ae.line,ge.line+1,function(Ut){fi(ie,Ut)&&pn(Ut,0)}),Re.clearOnEnter&&qt(Re,"beforeCursorEnter",function(){return Re.clear()}),Re.readOnly&&(aa(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Re.collapsed&&(Re.id=++jd,Re.atomic=!0),ft){if(jt&&(ft.curOp.updateMaxLine=!0),Re.collapsed)_i(ft,ae.line,ge.line+1);else if(Re.className||Re.startStyle||Re.endStyle||Re.css||Re.attributes||Re.title)for(var Mn=ae.line;Mn<=ge.line;Mn++)Ii(ft,Mn,"text");Re.atomic&&Gu(ft.doc),pr(ft,"markerAdded",ft,Re)}return Re}var Bc=function(ie,ae){this.markers=ie,this.primary=ae;for(var ge=0;ge<ie.length;++ge)ie[ge].parent=this};Bc.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();pr(this,"clear")}},Bc.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},An(Bc);function df(ie,ae,ge,fe,ye){fe=Lt(fe),fe.shared=!1;var Re=[sd(ie,ae,ge,fe,ye)],Ye=Re[0],pt=fe.widgetNode;return hl(ie,function(ft){pt&&(fe.widgetNode=pt.cloneNode(!0)),Re.push(sd(ft,Ti(ft,ae),Ti(ft,ge),fe,ye));for(var jt=0;jt<ft.linked.length;++jt)if(ft.linked[jt].isParent)return;Ye=St(Re)}),new Bc(Re,Ye)}function zd(ie){return ie.findMarks(tn(ie.first,0),ie.clipPos(tn(ie.lastLine())),function(ae){return ae.parent})}function Zd(ie,ae){for(var ge=0;ge<ae.length;ge++){var fe=ae[ge],ye=fe.find(),Re=ie.clipPos(ye.from),Ye=ie.clipPos(ye.to);if(fn(Re,Ye)){var pt=sd(ie,Re,Ye,fe.primary,fe.primary.type);fe.markers.push(pt),pt.parent=fe}}}function Rh(ie){for(var ae=function(fe){var ye=ie[fe],Re=[ye.primary.doc];hl(ye.primary.doc,function(ft){return Re.push(ft)});for(var Ye=0;Ye<ye.markers.length;Ye++){var pt=ye.markers[Ye];Rt(Re,pt.doc)==-1&&(pt.parent=null,ye.markers.splice(Ye--,1))}},ge=0;ge<ie.length;ge++)ae(ge)}var Qg=0,Ml=function(ie,ae,ge,fe,ye){if(!(this instanceof Ml))return new Ml(ie,ae,ge,fe,ye);ge==null&&(ge=0),ds.call(this,[new Xs([new va("",null)])]),this.first=ge,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ge;var Re=tn(ge,0);this.sel=Va(Re),this.history=new Qo(null),this.id=++Qg,this.modeOption=ae,this.lineSep=fe,this.direction=ye=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Ws(this,{from:Re,to:Re,text:ie}),js(this,Va(Re),_t)};Ml.prototype=be(ds.prototype,{constructor:Ml,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=ei(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Xn(function(ie){var ae=tn(this.first,0),ge=this.first+this.size-1;$s(this,{from:ae,to:tn(ge,an(this,ge).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&vc(this.cm,0,0),js(this,Va(ae),_t)}),replaceRange:function(ie,ae,ge,fe){ae=Ti(this,ae),ge=ge?Ti(this,ge):ae,Ku(this,ie,ae,ge,fe)},getRange:function(ie,ae,ge){var fe=dn(this,Ti(this,ie),Ti(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(Qn(this,ie))return an(this,ie)},getLineNumber:function(ie){return zt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=an(this,ie)),Xr(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Ti(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:Xn(function(ie,ae,ge){Gs(this,Ti(this,typeof ie=="number"?tn(ie,ae||0):ie),null,ge)}),setSelection:Xn(function(ie,ae,ge){Gs(this,Ti(this,ie),Ti(this,ae||ie),ge)}),extendSelection:Xn(function(ie,ae,ge){Es(this,Ti(this,ie),ae&&Ti(this,ae),ge)}),extendSelections:Xn(function(ie,ae){Is(this,$r(this,ie),ae)}),extendSelectionsBy:Xn(function(ie,ae){var ge=Zn(this.sel.ranges,ie);Is(this,$r(this,ge),ae)}),setSelections:Xn(function(ie,ae,ge){if(ie.length){for(var fe=[],ye=0;ye<ie.length;ye++)fe[ye]=new oo(Ti(this,ie[ye].anchor),Ti(this,ie[ye].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),js(this,Ta(this.cm,fe,ae),ge)}}),addSelection:Xn(function(ie,ae,ge){var fe=this.sel.ranges.slice(0);fe.push(new oo(Ti(this,ie),Ti(this,ae||ie))),js(this,Ta(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=dn(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=dn(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:Xn(function(ie,ae,ge){for(var fe=[],ye=this.sel,Re=0;Re<ye.ranges.length;Re++){var Ye=ye.ranges[Re];fe[Re]={from:Ye.from(),to:Ye.to(),text:this.splitLines(ie[Re]),origin:ge}}for(var pt=ae&&ae!="end"&&Za(this,fe,ae),ft=fe.length-1;ft>=0;ft--)$s(this,fe[ft]);pt?ts(this,pt):this.cm&&oc(this.cm)}),undo:Xn(function(){$u(this,"undo")}),redo:Xn(function(){$u(this,"redo")}),undoSelection:Xn(function(){$u(this,"undo",!0)}),redoSelection:Xn(function(){$u(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 Qo(this.history.maxGeneration),hl(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:Bl(this.history.done),undone:Bl(this.history.undone)}},setHistory:function(ie){var ae=this.history=new Qo(this.history.maxGeneration);ae.done=Bl(ie.done.slice(0),null,!0),ae.undone=Bl(ie.undone.slice(0),null,!0)},setGutterMarker:Xn(function(ie,ae,ge){return yl(this,ie,"gutter",function(fe){var ye=fe.gutterMarkers||(fe.gutterMarkers={});return ye[ae]=ge,!ge&&xe(ye)&&(fe.gutterMarkers=null),!0})}),clearGutter:Xn(function(ie){var ae=this;this.iter(function(ge){ge.gutterMarkers&&ge.gutterMarkers[ie]&&yl(ae,ge,"gutter",function(){return ge.gutterMarkers[ie]=null,xe(ge.gutterMarkers)&&(ge.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!Qn(this,ie)||(ae=ie,ie=an(this,ie),!ie))return null}else if(ae=zt(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:Xn(function(ie,ae,ge){return yl(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(Be(ge).test(fe[ye]))return!1;fe[ye]+=" "+ge}return!0})}),removeLineClass:Xn(function(ie,ae,ge){return yl(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Re=fe[ye];if(Re)if(ge==null)fe[ye]=null;else{var Ye=Re.match(Be(ge));if(!Ye)return!1;var pt=Ye.index+Ye[0].length;fe[ye]=Re.slice(0,Ye.index)+(!Ye.index||pt==Re.length?"":" ")+Re.slice(pt)||null}else return!1;return!0})}),addLineWidget:Xn(function(ie,ae,ge){return xc(this,ie,ae,ge)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,ge){return sd(this,Ti(this,ie),Ti(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=Ti(this,ie),sd(this,ie,ie,ge,"bookmark")},findMarksAt:function(ie){ie=Ti(this,ie);var ae=[],ge=an(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=Ti(this,ie),ae=Ti(this,ae);var fe=[],ye=ie.line;return this.iter(ie.line,ae.line+1,function(Re){var Ye=Re.markedSpans;if(Ye)for(var pt=0;pt<Ye.length;pt++){var ft=Ye[pt];!(ft.to!=null&&ye==ie.line&&ie.ch>=ft.to||ft.from==null&&ye!=ie.line||ft.from!=null&&ye==ae.line&&ft.from>=ae.ch)&&(!ge||ge(ft.marker))&&fe.push(ft.marker.parent||ft.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 Re=ye.text.length+fe;if(Re>ie)return ae=ie,!0;ie-=Re,++ge}),Ti(this,tn(ge,ae))},indexFromPos:function(ie){ie=Ti(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 Ml(ei(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 Ml(ei(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}],Zd(fe,zd(this)),fe},unlinkDoc:function(ie){if(ie instanceof Ls&&(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),Rh(zd(this));break}}if(ie.history==this.history){var fe=[ie.id];hl(ie,function(ye){return fe.push(ye.id)},!0),ie.history=new Qo(null),ie.history.done=Bl(this.history.done,fe),ie.history.undone=Bl(this.history.undone,fe)}},iterLinkedDocs:function(ie){hl(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):hr(ie)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:Xn(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&Ca(this.cm))})}),Ml.prototype.eachLine=Ml.prototype.iter;var dh=0;function Hd(ie){var ae=this;if(Hf(ae),!(Yn(ae,ie)||En(ae.display,ie))){wi(ie),We&&(dh=+new Date);var ge=vr(ae,ie,!0),fe=ie.dataTransfer.files;if(!(!ge||ae.isReadOnly()))if(fe&&fe.length&&window.FileReader&&window.File)for(var ye=fe.length,Re=Array(ye),Ye=0,pt=function(){++Ye==ye&&Kn(ae,function(){ge=Ti(ae.doc,ge);var ni={from:ge,to:ge,text:ae.doc.splitLines(Re.filter(function(ir){return ir!=null}).join(ae.doc.lineSeparator())),origin:"paste"};$s(ae.doc,ni),ts(ae.doc,Va(Ti(ae.doc,ge),Ti(ae.doc,ws(ni))))})()},ft=function(ni,ir){if(ae.options.allowDropFileTypes&&Rt(ae.options.allowDropFileTypes,ni.type)==-1){pt();return}var cr=new FileReader;cr.onerror=function(){return pt()},cr.onload=function(){var Br=cr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Br)){pt();return}Re[ir]=Br,pt()},cr.readAsText(ni)},jt=0;jt<fe.length;jt++)ft(fe[jt],jt);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 Mn=ie.dataTransfer.getData("Text");if(Mn){var Ut;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Ut=ae.listSelections()),Il(ae.doc,Va(ge,ge)),Ut)for(var oi=0;oi<Ut.length;++oi)Ku(ae.doc,"",Ut[oi].anchor,Ut[oi].head,"drag");ae.replaceSelection(Mn,"around","paste"),ae.display.input.focus()}}catch(ni){}}}}function hh(ie,ae){if(We&&(!ie.state.draggingText||+new Date-dh<100)){dr(ae);return}if(!(Yn(ie,ae)||En(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!bt)){var ge=Xe("img",null,null,"position: fixed; left: 0; top: 0;");ge.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ue&&(ge.width=ge.height=1,ie.display.wrapper.appendChild(ge),ge._top=ge.offsetTop),ae.dataTransfer.setDragImage(ge,0,0),Ue&&ge.parentNode.removeChild(ge)}}function hf(ie,ae){var ge=vr(ie,ae);if(ge){var fe=document.createDocumentFragment();gr(ie,ge,fe),ie.display.dragCursor||(ie.display.dragCursor=Xe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),Je(ie.display.dragCursor,fe)}}function Hf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function fh(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 Re=0;Re<ge.length;Re++)ie(ge[Re])})}}var gh=!1;function Vu(){gh||(Wd(),gh=!0)}function Wd(){var ie;qt(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,fh(ff)},100))}),qt(window,"blur",function(){return fh(bl)})}function ff(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var Mc={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"},ld=0;ld<10;ld++)Mc[ld+48]=Mc[ld+96]=String(ld);for(var Gd=65;Gd<=90;Gd++)Mc[Gd]=String.fromCharCode(Gd);for(var Bd=1;Bd<=12;Bd++)Mc[Bd+111]=Mc[Bd+63235]="F"+Bd;var Pu={};Pu.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"},Pu.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"},Pu.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"},Pu.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"]},Pu.default=de?Pu.macDefault:Pu.pcDefault;function Md(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var ge,fe,ye,Re,Ye=0;Ye<ae.length-1;Ye++){var pt=ae[Ye];if(/^(cmd|meta|m)$/i.test(pt))Re=!0;else if(/^a(lt)?$/i.test(pt))ge=!0;else if(/^(c|ctrl|control)$/i.test(pt))fe=!0;else if(/^s(hift)?$/i.test(pt))ye=!0;else throw new Error("Unrecognized modifier name: "+pt)}return ge&&(ie="Alt-"+ie),fe&&(ie="Ctrl-"+ie),Re&&(ie="Cmd-"+ie),ye&&(ie="Shift-"+ie),ie}function _h(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=Zn(ge.split(" "),Md),Re=0;Re<ye.length;Re++){var Ye=void 0,pt=void 0;Re==ye.length-1?(pt=ye.join(" "),Ye=fe):(pt=ye.slice(0,Re+1).join(" "),Ye="...");var ft=ae[pt];if(!ft)ae[pt]=Ye;else if(ft!=Ye)throw new Error("Inconsistent bindings for "+pt)}delete ie[ge]}for(var jt in ae)ie[jt]=ae[jt];return ie}function Tu(ie,ae,ge,fe){ae=ud(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 Tu(ie,ae.fallthrough,ge,fe);for(var Re=0;Re<ae.fallthrough.length;Re++){var Ye=Tu(ie,ae.fallthrough[Re],ge,fe);if(Ye)return Ye}}}function Uc(ie){var ae=typeof ie=="string"?ie:Mc[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function ph(ie,ae,ge){var fe=ie;return ae.altKey&&fe!="Alt"&&(ie="Alt-"+ie),(Ee?ae.metaKey:ae.ctrlKey)&&fe!="Ctrl"&&(ie="Ctrl-"+ie),(Ee?ae.ctrlKey:ae.metaKey)&&fe!="Mod"&&(ie="Cmd-"+ie),!ge&&ae.shiftKey&&fe!="Shift"&&(ie="Shift-"+ie),ie}function mh(ie,ae){if(Ue&&ie.keyCode==34&&ie.char)return!1;var ge=Mc[ie.keyCode];return ge==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(ge=ie.code),ph(ge,ie,ae))}function ud(ie){return typeof ie=="string"?Pu[ie]:ie}function lu(ie,ae){for(var ge=ie.doc.sel.ranges,fe=[],ye=0;ye<ge.length;ye++){for(var Re=ae(ge[ye]);fe.length&&fn(Re.from,St(fe).to)<=0;){var Ye=fe.pop();if(fn(Ye.from,Re.from)<0){Re.from=Ye.from;break}}fe.push(Re)}on(ie,function(){for(var pt=fe.length-1;pt>=0;pt--)Ku(ie.doc,"",fe[pt].from,fe[pt].to,"+delete");oc(ie)})}function jh(ie,ae,ge){var fe=Qe(ie.text,ae+ge,ge);return fe<0||fe>ie.text.length?null:fe}function Ll(ie,ae,ge){var fe=jh(ie,ae.ch,ge);return fe==null?null:new tn(ae.line,fe,ge<0?"after":"before")}function cs(ie,ae,ge,fe,ye){if(ie){ae.doc.direction=="rtl"&&(ye=-ye);var Re=wn(ge,ae.doc.direction);if(Re){var Ye=ye<0?St(Re):Re[0],pt=ye<0==(Ye.level==1),ft=pt?"after":"before",jt;if(Ye.level>0||ae.doc.direction=="rtl"){var Mn=Uo(ae,ge);jt=ye<0?ge.text.length-1:0;var Ut=Ua(ae,Mn,jt).top;jt=it(function(oi){return Ua(ae,Mn,oi).top==Ut},ye<0==(Ye.level==1)?Ye.from:Ye.to-1,jt),ft=="before"&&(jt=jh(ge,jt,1))}else jt=ye<0?Ye.to:Ye.from;return new tn(fe,jt,ft)}}return new tn(fe,ye<0?ge.text.length:0,ye<0?"before":"after")}function Js(ie,ae,ge,fe){var ye=wn(ae,ie.doc.direction);if(!ye)return Ll(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 Re=dt(ye,ge.ch,ge.sticky),Ye=ye[Re];if(ie.doc.direction=="ltr"&&Ye.level%2==0&&(fe>0?Ye.to>ge.ch:Ye.from<ge.ch))return Ll(ae,ge,fe);var pt=function(ao,Ho){return jh(ae,ao instanceof tn?ao.ch:ao,Ho)},ft,jt=function(ao){return ie.options.lineWrapping?(ft=ft||Uo(ie,ae),On(ie,ae,ft,ao)):{begin:0,end:ae.text.length}},Mn=jt(ge.sticky=="before"?pt(ge,-1):ge.ch);if(ie.doc.direction=="rtl"||Ye.level==1){var Ut=Ye.level==1==fe<0,oi=pt(ge,Ut?1:-1);if(oi!=null&&(Ut?oi<=Ye.to&&oi<=Mn.end:oi>=Ye.from&&oi>=Mn.begin)){var ni=Ut?"before":"after";return new tn(ge.line,oi,ni)}}var ir=function(ao,Ho,Bo){for(var ea=function(rl,ru){return ru?new tn(ge.line,pt(rl,1),"before"):new tn(ge.line,rl,"after")};ao>=0&&ao<ye.length;ao+=Ho){var _a=ye[ao],Mo=Ho>0==(_a.level!=1),ns=Mo?Bo.begin:pt(Bo.end,-1);if(_a.from<=ns&&ns<_a.to||(ns=Mo?_a.from:pt(_a.to,-1),Bo.begin<=ns&&ns<Bo.end))return ea(ns,Mo)}},cr=ir(Re+fe,fe,Mn);if(cr)return cr;var Br=fe>0?Mn.end:pt(Mn.begin,-1);return Br!=null&&!(fe>0&&Br==ae.text.length)&&(cr=ir(fe>0?0:ye.length-1,fe,jt(Br)),cr)?cr:null}var nu={selectAll:Ms,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),_t)},killLine:function(ie){return lu(ie,function(ae){if(ae.empty()){var ge=an(ie.doc,ae.head.line).text.length;return ae.head.ch==ge&&ae.head.line<ie.lastLine()?{from:ae.head,to:tn(ae.head.line+1,0)}:{from:ae.head,to:tn(ae.head.line,ge)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return lu(ie,function(ae){return{from:tn(ae.from().line,0),to:Ti(ie.doc,tn(ae.to().line+1,0))}})},delLineLeft:function(ie){return lu(ie,function(ae){return{from:tn(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return lu(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 lu(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(tn(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(tn(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return uc(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return $d(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return cc(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")},ln)},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")},ln)},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/)?$d(ie,ae.head):fe},ln)},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 Re=ge[ye].from(),Ye=qe(ie.getLine(Re.line),Re.ch,fe);ae.push(_n(fe-Ye%fe))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return on(ie,function(){for(var ae=ie.listSelections(),ge=[],fe=0;fe<ae.length;fe++)if(ae[fe].empty()){var ye=ae[fe].head,Re=an(ie.doc,ye.line).text;if(Re){if(ye.ch==Re.length&&(ye=new tn(ye.line,ye.ch-1)),ye.ch>0)ye=new tn(ye.line,ye.ch+1),ie.replaceRange(Re.charAt(ye.ch-1)+Re.charAt(ye.ch-2),tn(ye.line,ye.ch-2),ye,"+transpose");else if(ye.line>ie.doc.first){var Ye=an(ie.doc,ye.line-1).text;Ye&&(ye=new tn(ye.line,1),ie.replaceRange(Re.charAt(0)+ie.doc.lineSeparator()+Ye.charAt(Ye.length-1),tn(ye.line-1,Ye.length-1),ye,"+transpose"))}}ge.push(new oo(ye,ye))}ie.setSelections(ge)})},newlineAndIndent:function(ie){return on(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);oc(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function uc(ie,ae){var ge=an(ie.doc,ae),fe=Xr(ge);return fe!=ge&&(ae=zt(fe)),cs(!0,ie,fe,ae,1)}function cc(ie,ae){var ge=an(ie.doc,ae),fe=ha(ge);return fe!=ge&&(ae=zt(fe)),cs(!0,ie,ge,ae,-1)}function $d(ie,ae){var ge=uc(ie,ae.line),fe=an(ie.doc,ge.line),ye=wn(fe,ie.doc.direction);if(!ye||ye[0].level==0){var Re=Math.max(ge.ch,fe.text.search(/\S/)),Ye=ae.line==ge.line&&ae.ch<=Re&&ae.ch;return tn(ge.line,Ye?0:Re,ge.sticky)}return ge}function cd(ie,ae,ge){if(typeof ae=="string"&&(ae=nu[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)!=Pn}finally{ie.display.shift=fe,ie.state.suppressEdits=!1}return ye}function vh(ie,ae,ge){for(var fe=0;fe<ie.state.keyMaps.length;fe++){var ye=Tu(ae,ie.state.keyMaps[fe],ge,ie);if(ye)return ye}return ie.options.extraKeys&&Tu(ae,ie.options.extraKeys,ge,ie)||Tu(ae,ie.options.keyMap,ge,ie)}var Sc=new Ke;function Yc(ie,ae,ge,fe){var ye=ie.state.keySeq;if(ye){if(Uc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Sc.set(50,function(){ie.state.keySeq==ye&&(ie.state.keySeq=null,ie.display.input.reset())}),Wf(ie,ye+" "+ae,ge,fe))return!0}return Wf(ie,ae,ge,fe)}function Wf(ie,ae,ge,fe){var ye=vh(ie,ae,fe);return ye=="multi"&&(ie.state.keySeq=ae),ye=="handled"&&pr(ie,"keyHandled",ie,ae,ge),(ye=="handled"||ye=="multi")&&(wi(ge),Sa(ie)),!!ye}function Gf(ie,ae){var ge=mh(ae,!0);return ge?ae.shiftKey&&!ie.state.keySeq?Yc(ie,"Shift-"+ge,ae,function(fe){return cd(ie,fe,!0)})||Yc(ie,ge,ae,function(fe){if(typeof fe=="string"?/^go[A-Z]/.test(fe):fe.motion)return cd(ie,fe)}):Yc(ie,ge,ae,function(fe){return cd(ie,fe)}):!1}function $f(ie,ae,ge){return Yc(ie,"'"+ge+"'",ae,function(fe){return cd(ie,fe,!0)})}var Kd=null;function hg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=ot(),!Yn(ae,ie))){We&&Ve<11&&ie.keyCode==27&&(ie.returnValue=!1);var ge=ie.keyCode;ae.display.shift=ge==16||ie.shiftKey;var fe=Gf(ae,ie);Ue&&(Kd=fe?ge:null,!fe&&ge==88&&!Ei&&(de?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),le&&!de&&!fe&&ge==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),ge==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&fg(ae)}}function fg(ie){var ae=ie.display.lineDiv;Ot(ae,"CodeMirror-crosshair");function ge(fe){(fe.keyCode==18||!fe.altKey)&&(je(ae,"CodeMirror-crosshair"),Vn(document,"keyup",ge),Vn(document,"mouseover",ge))}qt(document,"keyup",ge),qt(document,"mouseover",ge)}function gg(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),Yn(this,ie)}function Xc(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(En(ae.display,ie)||Yn(ae,ie)||ie.ctrlKey&&!ie.altKey||de&&ie.metaKey)){var ge=ie.keyCode,fe=ie.charCode;if(Ue&&ge==Kd){Kd=null,wi(ie);return}if(!(Ue&&(!ie.which||ie.which<10)&&Gf(ae,ie))){var ye=String.fromCharCode(fe==null?ge:fe);ye!="\b"&&($f(ae,ie,ye)||ae.display.input.onKeyPress(ie))}}}var pg=400,mg=function(ie,ae,ge){this.time=ie,this.pos=ae,this.button=ge};mg.prototype.compare=function(ie,ae,ge){return this.time+pg>ie&&fn(ae,this.pos)==0&&ge==this.button};var zh,yh;function vg(ie,ae){var ge=+new Date;return yh&&yh.compare(ge,ie,ae)?(zh=yh=null,"triple"):zh&&zh.compare(ge,ie,ae)?(yh=new mg(ge,ie,ae),zh=null,"double"):(zh=new mg(ge,ie,ae),yh=null,"single")}function Jc(ie){var ae=this,ge=ae.display;if(!(Yn(ae,ie)||ge.activeTouch&&ge.input.supportsTouch())){if(ge.input.ensurePolled(),ge.shift=ie.shiftKey,En(ge,ie)){Le||(ge.scroller.draggable=!1,setTimeout(function(){return ge.scroller.draggable=!0},100));return}if(!Kf(ae,ie)){var fe=vr(ae,ie),ye=pi(ie),Re=fe?vg(fe,ye):"single";window.focus(),ye==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(fe&&yg(ae,ye,fe,Re,ie))&&(ye==1?fe?xg(ae,fe,Re,ie):Mr(ie)==ge.scroller&&wi(ie):ye==2?(fe&&Es(ae.doc,fe),setTimeout(function(){return ge.input.focus()},20)):ye==3&&(Me?ae.display.input.onContextMenu(ie):So(ae)))}}}function yg(ie,ae,ge,fe,ye){var Re="Click";return fe=="double"?Re="Double"+Re:fe=="triple"&&(Re="Triple"+Re),Re=(ae==1?"Left":ae==2?"Middle":"Right")+Re,Yc(ie,ph(Re,ye),ye,function(Ye){if(typeof Ye=="string"&&(Ye=nu[Ye]),!Ye)return!1;var pt=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),pt=Ye(ie,ge)!=Pn}finally{ie.state.suppressEdits=!1}return pt})}function xh(ie,ae,ge){var fe=ie.getOption("configureMouse"),ye=fe?fe(ie,ae,ge):{};if(ye.unit==null){var Re=se?ge.shiftKey&&ge.metaKey:ge.altKey;ye.unit=Re?"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=de?ge.metaKey:ge.ctrlKey),ye.moveOnDrag==null&&(ye.moveOnDrag=!(de?ge.altKey:ge.ctrlKey)),ye}function xg(ie,ae,ge,fe){We?setTimeout(Wt(Ga,ie),0):ie.curOp.focus=ot();var ye=xh(ie,ge,fe),Re=ie.doc.sel,Ye;ie.options.dragDrop&&ui&&!ie.isReadOnly()&&ge=="single"&&(Ye=Re.contains(ae))>-1&&(fn((Ye=Re.ranges[Ye]).from(),ae)<0||ae.xRel>0)&&(fn(Ye.to(),ae)>0||ae.xRel<0)?Sg(ie,fe,ae,ye):Hp(ie,fe,ae,ye)}function Sg(ie,ae,ge,fe){var ye=ie.display,Re=!1,Ye=Kn(ie,function(jt){Le&&(ye.scroller.draggable=!1),ie.state.draggingText=!1,Vn(ye.wrapper.ownerDocument,"mouseup",Ye),Vn(ye.wrapper.ownerDocument,"mousemove",pt),Vn(ye.scroller,"dragstart",ft),Vn(ye.scroller,"drop",Ye),Re||(wi(jt),fe.addNew||Es(ie.doc,ge,null,null,fe.extend),Le&&!bt||We&&Ve==9?setTimeout(function(){ye.wrapper.ownerDocument.body.focus({preventScroll:!0}),ye.input.focus()},20):ye.input.focus())}),pt=function(jt){Re=Re||Math.abs(ae.clientX-jt.clientX)+Math.abs(ae.clientY-jt.clientY)>=10},ft=function(){return Re=!0};Le&&(ye.scroller.draggable=!0),ie.state.draggingText=Ye,Ye.copy=!fe.moveOnDrag,ye.scroller.dragDrop&&ye.scroller.dragDrop(),qt(ye.wrapper.ownerDocument,"mouseup",Ye),qt(ye.wrapper.ownerDocument,"mousemove",pt),qt(ye.scroller,"dragstart",ft),qt(ye.scroller,"drop",Ye),So(ie),setTimeout(function(){return ye.input.focus()},20)}function Pg(ie,ae,ge){if(ge=="char")return new oo(ae,ae);if(ge=="word")return ie.findWordAt(ae);if(ge=="line")return new oo(tn(ae.line,0),Ti(ie.doc,tn(ae.line+1,0)));var fe=ge(ie,ae);return new oo(fe.from,fe.to)}function Hp(ie,ae,ge,fe){var ye=ie.display,Re=ie.doc;wi(ae);var Ye,pt,ft=Re.sel,jt=ft.ranges;if(fe.addNew&&!fe.extend?(pt=Re.sel.contains(ge),pt>-1?Ye=jt[pt]:Ye=new oo(ge,ge)):(Ye=Re.sel.primary(),pt=Re.sel.primIndex),fe.unit=="rectangle")fe.addNew||(Ye=new oo(ge,ge)),ge=vr(ie,ae,!0,!0),pt=-1;else{var Mn=Pg(ie,ge,fe.unit);fe.extend?Ye=_c(Ye,Mn.anchor,Mn.head,fe.extend):Ye=Mn}fe.addNew?pt==-1?(pt=jt.length,js(Re,Ta(ie,jt.concat([Ye]),pt),{scroll:!1,origin:"*mouse"})):jt.length>1&&jt[pt].empty()&&fe.unit=="char"&&!fe.extend?(js(Re,Ta(ie,jt.slice(0,pt).concat(jt.slice(pt+1)),0),{scroll:!1,origin:"*mouse"}),ft=Re.sel):bs(Re,pt,Ye,rn):(pt=0,js(Re,new wa([Ye],0),rn),ft=Re.sel);var Ut=ge;function oi(Bo){if(fn(Ut,Bo)!=0)if(Ut=Bo,fe.unit=="rectangle"){for(var ea=[],_a=ie.options.tabSize,Mo=qe(an(Re,ge.line).text,ge.ch,_a),ns=qe(an(Re,Bo.line).text,Bo.ch,_a),rl=Math.min(Mo,ns),ru=Math.max(Mo,ns),Sl=Math.min(ge.line,Bo.line),Uu=Math.min(ie.lastLine(),Math.max(ge.line,Bo.line));Sl<=Uu;Sl++){var wu=an(Re,Sl).text,Ql=Wn(wu,rl,_a);rl==ru?ea.push(new oo(tn(Sl,Ql),tn(Sl,Ql))):wu.length>Ql&&ea.push(new oo(tn(Sl,Ql),tn(Sl,Wn(wu,ru,_a))))}ea.length||ea.push(new oo(ge,ge)),js(Re,Ta(ie,ft.ranges.slice(0,pt).concat(ea),pt),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(Bo)}else{var Yu=Ye,hu=Pg(ie,Bo,fe.unit),ql=Yu.anchor,Ns;fn(hu.anchor,ql)>0?(Ns=hu.head,ql=Si(Yu.from(),hu.anchor)):(Ns=hu.anchor,ql=Di(Yu.to(),hu.head));var Pl=ft.ranges.slice(0);Pl[pt]=qg(ie,new oo(Ti(Re,ql),Ns)),js(Re,Ta(ie,Pl,pt),rn)}}var ni=ye.wrapper.getBoundingClientRect(),ir=0;function cr(Bo){var ea=++ir,_a=vr(ie,Bo,!0,fe.unit=="rectangle");if(_a)if(fn(_a,Ut)!=0){ie.curOp.focus=ot(),oi(_a);var Mo=zo(ye,Re);(_a.line>=Mo.to||_a.line<Mo.from)&&setTimeout(Kn(ie,function(){ir==ea&&cr(Bo)}),150)}else{var ns=Bo.clientY<ni.top?-20:Bo.clientY>ni.bottom?20:0;ns&&setTimeout(Kn(ie,function(){ir==ea&&(ye.scroller.scrollTop+=ns,cr(Bo))}),50)}}function Br(Bo){ie.state.selectingText=!1,ir=1/0,Bo&&(wi(Bo),ye.input.focus()),Vn(ye.wrapper.ownerDocument,"mousemove",ao),Vn(ye.wrapper.ownerDocument,"mouseup",Ho),Re.history.lastSelOrigin=null}var ao=Kn(ie,function(Bo){Bo.buttons===0||!pi(Bo)?Br(Bo):cr(Bo)}),Ho=Kn(ie,Br);ie.state.selectingText=Ho,qt(ye.wrapper.ownerDocument,"mousemove",ao),qt(ye.wrapper.ownerDocument,"mouseup",Ho)}function qg(ie,ae){var ge=ae.anchor,fe=ae.head,ye=an(ie.doc,ge.line);if(fn(ge,fe)==0&&ge.sticky==fe.sticky)return ae;var Re=wn(ye);if(!Re)return ae;var Ye=dt(Re,ge.ch,ge.sticky),pt=Re[Ye];if(pt.from!=ge.ch&&pt.to!=ge.ch)return ae;var ft=Ye+(pt.from==ge.ch==(pt.level!=1)?0:1);if(ft==0||ft==Re.length)return ae;var jt;if(fe.line!=ge.line)jt=(fe.line-ge.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var Mn=dt(Re,fe.ch,fe.sticky),Ut=Mn-Ye||(fe.ch-ge.ch)*(pt.level==1?-1:1);Mn==ft-1||Mn==ft?jt=Ut<0:jt=Ut>0}var oi=Re[ft+(jt?-1:0)],ni=jt==(oi.level==1),ir=ni?oi.from:oi.to,cr=ni?"after":"before";return ge.ch==ir&&ge.sticky==cr?ae:new oo(new tn(ge.line,ir,cr),fe)}function Vd(ie,ae,ge,fe){var ye,Re;if(ae.touches)ye=ae.touches[0].clientX,Re=ae.touches[0].clientY;else try{ye=ae.clientX,Re=ae.clientY}catch(oi){return!1}if(ye>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;fe&&wi(ae);var Ye=ie.display,pt=Ye.lineDiv.getBoundingClientRect();if(Re>pt.bottom||!jn(ie,ge))return Wi(ae);Re-=pt.top-Ye.viewOffset;for(var ft=0;ft<ie.display.gutterSpecs.length;++ft){var jt=Ye.gutters.childNodes[ft];if(jt&&jt.getBoundingClientRect().right>=ye){var Mn=In(ie.doc,Re),Ut=ie.display.gutterSpecs[ft];return hn(ie,ge,ie,Mn,Ut.className,ae),Wi(ae)}}}function Kf(ie,ae){return Vd(ie,ae,"gutterClick",!0)}function gf(ie,ae){En(ie.display,ae)||ep(ie,ae)||Yn(ie,ae,"contextmenu")||Me||ie.display.input.onContextMenu(ae)}function ep(ie,ae){return jn(ie,"gutterContextMenu")?Vd(ie,ae,"gutterContextMenu",!1):!1}function Vf(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),xa(ie)}var Sh={toString:function(){return"CodeMirror.Init"}},wg={},Ph={};function tp(ie){var ae=ie.optionHandlers;function ge(fe,ye,Re,Ye){ie.defaults[fe]=ye,Re&&(ae[fe]=Ye?function(pt,ft,jt){jt!=Sh&&Re(pt,ft,jt)}:Re)}ie.defineOption=ge,ie.Init=Sh,ge("value","",function(fe,ye){return fe.setValue(ye)},!0),ge("mode",null,function(fe,ye){fe.doc.modeOption=ye,oa(fe)},!0),ge("indentUnit",2,oa,!0),ge("indentWithTabs",!1),ge("smartIndent",!0),ge("tabSize",4,function(fe){us(fe),xa(fe),_i(fe)},!0),ge("lineSeparator",null,function(fe,ye){if(fe.doc.lineSep=ye,!!ye){var Re=[],Ye=fe.doc.first;fe.doc.iter(function(ft){for(var jt=0;;){var Mn=ft.text.indexOf(ye,jt);if(Mn==-1)break;jt=Mn+ye.length,Re.push(tn(Ye,Mn))}Ye++});for(var pt=Re.length-1;pt>=0;pt--)Ku(fe.doc,ye,Re[pt],tn(Re[pt].line,Re[pt].ch+ye.length))}}),ge("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,ye,Re){fe.state.specialChars=new RegExp(ye.source+(ye.test(" ")?"":"| "),"g"),Re!=Sh&&fe.refresh()}),ge("specialCharPlaceholder",Fs,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",!he),ge("wholeLineUpdateBefore",!0),ge("theme","default",function(fe){Vf(fe),uo(fe)},!0),ge("keyMap","default",function(fe,ye,Re){var Ye=ud(ye),pt=Re!=Sh&&ud(Re);pt&&pt.detach&&pt.detach(fe,Ye),Ye.attach&&Ye.attach(fe,pt||null)}),ge("extraKeys",null),ge("configureMouse",null),ge("lineWrapping",!1,np,!0),ge("gutters",[],function(fe,ye){fe.display.gutterSpecs=$o(ye,fe.options.lineNumbers),uo(fe)},!0),ge("fixedGutter",!0,function(fe,ye){fe.display.gutters.style.left=ye?to(fe.display)+"px":"0",fe.refresh()},!0),ge("coverGutterNextToScrollbar",!1,function(fe){return yc(fe)},!0),ge("scrollbarStyle","native",function(fe){Fd(fe),yc(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=$o(fe.options.gutters,ye),uo(fe)},!0),ge("firstLineNumber",1,uo,!0),ge("lineNumberFormatter",function(fe){return fe},uo,!0),ge("showCursorWhenSelecting",!1,Tr,!0),ge("resetSelectionOnContextMenu",!0),ge("lineWiseCopyCut",!0),ge("pasteLinesPerSelection",!0),ge("selectionsMayTouch",!1),ge("readOnly",!1,function(fe,ye){ye=="nocursor"&&(bl(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,Uf),ge("allowDropFileTypes",null),ge("cursorBlinkRate",530),ge("cursorScrollMargin",0),ge("cursorHeight",1,Tr,!0),ge("singleCursorHeightPerLine",!0,Tr,!0),ge("workTime",100),ge("workDelay",100),ge("flattenSpans",!0,us,!0),ge("addModeClass",!1,us,!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,us,!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 Uf(ie,ae,ge){var fe=ge&&ge!=Sh;if(!ae!=!fe){var ye=ie.display.dragFunctions,Re=ae?qt:Vn;Re(ie.display.scroller,"dragstart",ye.start),Re(ie.display.scroller,"dragenter",ye.enter),Re(ie.display.scroller,"dragover",ye.over),Re(ie.display.scroller,"dragleave",ye.leave),Re(ie.display.scroller,"drop",ye.drop)}}function np(ie){ie.options.lineWrapping?(Ot(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(je(ie.display.wrapper,"CodeMirror-wrap"),fa(ie)),fr(ie),_i(ie),xa(ie),setTimeout(function(){return yc(ie)},100)}function Ls(ie,ae){var ge=this;if(!(this instanceof Ls))return new Ls(ie,ae);this.options=ae=ae?Lt(ae):{},Lt(wg,ae,!1);var fe=ae.value;typeof fe=="string"?fe=new Ml(fe,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(fe.modeOption=ae.mode),this.doc=fe;var ye=new Ls.inputStyles[ae.inputStyle](this),Re=this.display=new Oo(ie,fe,ye,ae);Re.wrapper.CodeMirror=this,Vf(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fd(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 Ke,keySeq:null,specialChars:null},ae.autofocus&&!ee&&Re.input.focus(),We&&Ve<11&&setTimeout(function(){return ge.display.input.reset(!0)},20),Zh(this),Vu(),ai(this),this.curOp.forceUpdate=!0,ba(this,fe),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){ge.hasFocus()&&!ge.state.focused&&Oa(ge)},20):bl(this);for(var Ye in Ph)Ph.hasOwnProperty(Ye)&&Ph[Ye](this,ae[Ye],Sh);ro(this),ae.finishInit&&ae.finishInit(this);for(var pt=0;pt<Ud.length;++pt)Ud[pt](this);po(this),Le&&ae.lineWrapping&&getComputedStyle(Re.lineDiv).textRendering=="optimizelegibility"&&(Re.lineDiv.style.textRendering="auto")}Ls.defaults=wg,Ls.optionHandlers=Ph;function Zh(ie){var ae=ie.display;qt(ae.scroller,"mousedown",Kn(ie,Jc)),We&&Ve<11?qt(ae.scroller,"dblclick",Kn(ie,function(ft){if(!Yn(ie,ft)){var jt=vr(ie,ft);if(!(!jt||Kf(ie,ft)||En(ie.display,ft))){wi(ft);var Mn=ie.findWordAt(jt);Es(ie.doc,Mn.anchor,Mn.head)}}})):qt(ae.scroller,"dblclick",function(ft){return Yn(ie,ft)||wi(ft)}),qt(ae.scroller,"contextmenu",function(ft){return gf(ie,ft)}),qt(ae.input.getField(),"contextmenu",function(ft){ae.scroller.contains(ft.target)||gf(ie,ft)});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 Re(ft){if(ft.touches.length!=1)return!1;var jt=ft.touches[0];return jt.radiusX<=1&&jt.radiusY<=1}function Ye(ft,jt){if(jt.left==null)return!0;var Mn=jt.left-ft.left,Ut=jt.top-ft.top;return Mn*Mn+Ut*Ut>20*20}qt(ae.scroller,"touchstart",function(ft){if(!Yn(ie,ft)&&!Re(ft)&&!Kf(ie,ft)){ae.input.ensurePolled(),clearTimeout(ge);var jt=+new Date;ae.activeTouch={start:jt,moved:!1,prev:jt-fe.end<=300?fe:null},ft.touches.length==1&&(ae.activeTouch.left=ft.touches[0].pageX,ae.activeTouch.top=ft.touches[0].pageY)}}),qt(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),qt(ae.scroller,"touchend",function(ft){var jt=ae.activeTouch;if(jt&&!En(ae,ft)&&jt.left!=null&&!jt.moved&&new Date-jt.start<300){var Mn=ie.coordsChar(ae.activeTouch,"page"),Ut;!jt.prev||Ye(jt,jt.prev)?Ut=new oo(Mn,Mn):!jt.prev.prev||Ye(jt,jt.prev.prev)?Ut=ie.findWordAt(Mn):Ut=new oo(tn(Mn.line,0),Ti(ie.doc,tn(Mn.line+1,0))),ie.setSelection(Ut.anchor,Ut.head),ie.focus(),wi(ft)}ye()}),qt(ae.scroller,"touchcancel",ye),qt(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(ac(ie,ae.scroller.scrollTop),au(ie,ae.scroller.scrollLeft,!0),hn(ie,"scroll",ie))}),qt(ae.scroller,"mousewheel",function(ft){return Pa(ie,ft)}),qt(ae.scroller,"DOMMouseScroll",function(ft){return Pa(ie,ft)}),qt(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(ft){Yn(ie,ft)||dr(ft)},over:function(ft){Yn(ie,ft)||(hf(ie,ft),dr(ft))},start:function(ft){return hh(ie,ft)},drop:Kn(ie,Hd),leave:function(ft){Yn(ie,ft)||Hf(ie)}};var pt=ae.input.getField();qt(pt,"keyup",function(ft){return gg.call(ie,ft)}),qt(pt,"keydown",Kn(ie,hg)),qt(pt,"keypress",Kn(ie,Xc)),qt(pt,"focus",function(ft){return Oa(ie,ft)}),qt(pt,"blur",function(ft){return bl(ie,ft)})}var Ud=[];Ls.defineInitHook=function(ie){return Ud.push(ie)};function iu(ie,ae,ge,fe){var ye=ie.doc,Re;ge==null&&(ge="add"),ge=="smart"&&(ye.mode.indent?Re=Cr(ie,ae).state:ge="prev");var Ye=ie.options.tabSize,pt=an(ye,ae),ft=qe(pt.text,null,Ye);pt.stateAfter&&(pt.stateAfter=null);var jt=pt.text.match(/^\s*/)[0],Mn;if(!fe&&!/\S/.test(pt.text))Mn=0,ge="not";else if(ge=="smart"&&(Mn=ye.mode.indent(Re,pt.text.slice(jt.length),pt.text),Mn==Pn||Mn>150)){if(!fe)return;ge="prev"}ge=="prev"?ae>ye.first?Mn=qe(an(ye,ae-1).text,null,Ye):Mn=0:ge=="add"?Mn=ft+ie.options.indentUnit:ge=="subtract"?Mn=ft-ie.options.indentUnit:typeof ge=="number"&&(Mn=ft+ge),Mn=Math.max(0,Mn);var Ut="",oi=0;if(ie.options.indentWithTabs)for(var ni=Math.floor(Mn/Ye);ni;--ni)oi+=Ye,Ut+=" ";if(oi<Mn&&(Ut+=_n(Mn-oi)),Ut!=jt)return Ku(ye,Ut,tn(ae,0),tn(ae,jt.length),"+input"),pt.stateAfter=null,!0;for(var ir=0;ir<ye.sel.ranges.length;ir++){var cr=ye.sel.ranges[ir];if(cr.head.line==ae&&cr.head.ch<jt.length){var Br=tn(ae,jt.length);bs(ye,ir,new oo(Br,Br));break}}}var Ru=null;function Hh(ie){Ru=ie}function wh(ie,ae,ge,fe,ye){var Re=ie.doc;ie.display.shift=!1,fe||(fe=Re.sel);var Ye=+new Date-200,pt=ye=="paste"||ie.state.pasteIncoming>Ye,ft=hr(ae),jt=null;if(pt&&fe.ranges.length>1)if(Ru&&Ru.text.join(`
|
|
|
`)==ae){if(fe.ranges.length%Ru.text.length==0){jt=[];for(var Mn=0;Mn<Ru.text.length;Mn++)jt.push(Re.splitLines(Ru.text[Mn]))}}else ft.length==fe.ranges.length&&ie.options.pasteLinesPerSelection&&(jt=Zn(ft,function(ao){return[ao]}));for(var Ut=ie.curOp.updateInput,oi=fe.ranges.length-1;oi>=0;oi--){var ni=fe.ranges[oi],ir=ni.from(),cr=ni.to();ni.empty()&&(ge&&ge>0?ir=tn(ir.line,ir.ch-ge):ie.state.overwrite&&!pt?cr=tn(cr.line,Math.min(an(Re,cr.line).text.length,cr.ch+St(ft).length)):pt&&Ru&&Ru.lineWise&&Ru.text.join(`
|
|
|
`)==ft.join(`
|
|
|
`)&&(ir=cr=tn(ir.line,0)));var Br={from:ir,to:cr,text:jt?jt[oi%jt.length]:ft,origin:ye||(pt?"paste":ie.state.cutIncoming>Ye?"cut":"+input")};$s(ie.doc,Br),pr(ie,"inputRead",ie,Br)}ae&&!pt&&Eg(ie,ae),oc(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Ut),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Cg(ie,ae){var ge=ie.clipboardData&&ie.clipboardData.getData("Text");if(ge)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&on(ae,function(){return wh(ae,ge,0,null,"paste")}),!0}function Eg(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 Re=ie.getModeAt(ye.head),Ye=!1;if(Re.electricChars){for(var pt=0;pt<Re.electricChars.length;pt++)if(ae.indexOf(Re.electricChars.charAt(pt))>-1){Ye=iu(ie,ye.head.line,"smart");break}}else Re.electricInput&&Re.electricInput.test(an(ie.doc,ye.head.line).text.slice(0,ye.head.ch))&&(Ye=iu(ie,ye.head.line,"smart"));Ye&&pr(ie,"electricInput",ie,ye.head.line)}}}function bg(ie){for(var ae=[],ge=[],fe=0;fe<ie.doc.sel.ranges.length;fe++){var ye=ie.doc.sel.ranges[fe].head.line,Re={anchor:tn(ye,0),head:tn(ye+1,0)};ge.push(Re),ae.push(ie.getRange(Re.anchor,Re.head))}return{text:ae,ranges:ge}}function Fg(ie,ae,ge,fe){ie.setAttribute("autocorrect",ge?"":"off"),ie.setAttribute("autocapitalize",fe?"":"off"),ie.setAttribute("spellcheck",!!ae)}function Bg(){var ie=Xe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=Xe("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Le?ie.style.width="1000px":ie.setAttribute("wrap","off"),Oe&&(ie.style.border="1px solid black"),Fg(ie),ae}function Yd(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 Re=this.options,Ye=Re[fe];Re[fe]==ye&&fe!="mode"||(Re[fe]=ye,ae.hasOwnProperty(fe)&&Kn(this,ae[fe])(this,ye,Ye),hn(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"](ud(fe))},removeKeyMap:function(fe){for(var ye=this.state.keyMaps,Re=0;Re<ye.length;++Re)if(ye[Re]==fe||ye[Re].name==fe)return ye.splice(Re,1),!0},addOverlay:zn(function(fe,ye){var Re=fe.token?fe:ie.getMode(this.options,fe);if(Re.startState)throw new Error("Overlays may not be stateful.");li(this.state.overlays,{mode:Re,modeSpec:fe,opaque:ye&&ye.opaque,priority:ye&&ye.priority||0},function(Ye){return Ye.priority}),this.state.modeGen++,_i(this)}),removeOverlay:zn(function(fe){for(var ye=this.state.overlays,Re=0;Re<ye.length;++Re){var Ye=ye[Re].modeSpec;if(Ye==fe||typeof fe=="string"&&Ye.name==fe){ye.splice(Re,1),this.state.modeGen++,_i(this);return}}}),indentLine:zn(function(fe,ye,Re){typeof ye!="string"&&typeof ye!="number"&&(ye==null?ye=this.options.smartIndent?"smart":"prev":ye=ye?"add":"subtract"),Qn(this.doc,fe)&&iu(this,fe,ye,Re)}),indentSelection:zn(function(fe){for(var ye=this.doc.sel.ranges,Re=-1,Ye=0;Ye<ye.length;Ye++){var pt=ye[Ye];if(pt.empty())pt.head.line>Re&&(iu(this,pt.head.line,fe,!0),Re=pt.head.line,Ye==this.doc.sel.primIndex&&oc(this));else{var ft=pt.from(),jt=pt.to(),Mn=Math.max(Re,ft.line);Re=Math.min(this.lastLine(),jt.line-(jt.ch?0:1))+1;for(var Ut=Mn;Ut<Re;++Ut)iu(this,Ut,fe);var oi=this.doc.sel.ranges;ft.ch==0&&ye.length==oi.length&&oi[Ye].from().ch>0&&bs(this.doc,Ye,new oo(ft,oi[Ye].to()),_t)}}}),getTokenAt:function(fe,ye){return Hr(this,fe,ye)},getLineTokens:function(fe,ye){return Hr(this,tn(fe),ye,!0)},getTokenTypeAt:function(fe){fe=Ti(this.doc,fe);var ye=Qr(this,an(this.doc,fe.line)),Re=0,Ye=(ye.length-1)/2,pt=fe.ch,ft;if(pt==0)ft=ye[2];else for(;;){var jt=Re+Ye>>1;if((jt?ye[jt*2-1]:0)>=pt)Ye=jt;else if(ye[jt*2+1]<pt)Re=jt+1;else{ft=ye[jt*2+2];break}}var Mn=ft?ft.indexOf("overlay "):-1;return Mn<0?ft:Mn==0?null:ft.slice(0,Mn-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 Re=[];if(!ge.hasOwnProperty(ye))return Re;var Ye=ge[ye],pt=this.getModeAt(fe);if(typeof pt[ye]=="string")Ye[pt[ye]]&&Re.push(Ye[pt[ye]]);else if(pt[ye])for(var ft=0;ft<pt[ye].length;ft++){var jt=Ye[pt[ye][ft]];jt&&Re.push(jt)}else pt.helperType&&Ye[pt.helperType]?Re.push(Ye[pt.helperType]):Ye[pt.name]&&Re.push(Ye[pt.name]);for(var Mn=0;Mn<Ye._global.length;Mn++){var Ut=Ye._global[Mn];Ut.pred(pt,this)&&Rt(Re,Ut.val)==-1&&Re.push(Ut.val)}return Re},getStateAfter:function(fe,ye){var Re=this.doc;return fe=Fi(Re,fe==null?Re.first+Re.size-1:fe),Cr(this,fe+1,ye).state},cursorCoords:function(fe,ye){var Re,Ye=this.doc.sel.primary();return fe==null?Re=Ye.head:typeof fe=="object"?Re=Ti(this.doc,fe):Re=fe?Ye.from():Ye.to(),La(this,Re,ye||"page")},charCoords:function(fe,ye){return Ha(this,Ti(this.doc,fe),ye||"page")},coordsChar:function(fe,ye){return fe=Aa(this,fe,ye||"page"),en(this,fe.left,fe.top)},lineAtHeight:function(fe,ye){return fe=Aa(this,{top:fe,left:0},ye||"page").top,In(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,ye,Re){var Ye=!1,pt;if(typeof fe=="number"){var ft=this.doc.first+this.doc.size-1;fe<this.doc.first?fe=this.doc.first:fe>ft&&(fe=ft,Ye=!0),pt=an(this.doc,fe)}else pt=fe;return Or(this,pt,{top:0,left:0},ye||"page",Re||Ye).top+(Ye?this.doc.height-Eo(pt):0)},defaultTextHeight:function(){return lr(this.display)},defaultCharWidth:function(){return Mi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fe,ye,Re,Ye,pt){var ft=this.display;fe=La(this,Ti(this.doc,fe));var jt=fe.bottom,Mn=fe.left;if(ye.style.position="absolute",ye.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ye),ft.sizer.appendChild(ye),Ye=="over")jt=fe.top;else if(Ye=="above"||Ye=="near"){var Ut=Math.max(ft.wrapper.clientHeight,this.doc.height),oi=Math.max(ft.sizer.clientWidth,ft.lineSpace.clientWidth);(Ye=="above"||fe.bottom+ye.offsetHeight>Ut)&&fe.top>ye.offsetHeight?jt=fe.top-ye.offsetHeight:fe.bottom+ye.offsetHeight<=Ut&&(jt=fe.bottom),Mn+ye.offsetWidth>oi&&(Mn=oi-ye.offsetWidth)}ye.style.top=jt+"px",ye.style.left=ye.style.right="",pt=="right"?(Mn=ft.sizer.clientWidth-ye.offsetWidth,ye.style.right="0px"):(pt=="left"?Mn=0:pt=="middle"&&(Mn=(ft.sizer.clientWidth-ye.offsetWidth)/2),ye.style.left=Mn+"px"),Re&&rc(this,{left:Mn,top:jt,right:Mn+ye.offsetWidth,bottom:jt+ye.offsetHeight})},triggerOnKeyDown:zn(hg),triggerOnKeyPress:zn(Xc),triggerOnKeyUp:gg,triggerOnMouseDown:zn(Jc),execCommand:function(fe){if(nu.hasOwnProperty(fe))return nu[fe].call(null,this)},triggerElectric:zn(function(fe){Eg(this,fe)}),findPosH:function(fe,ye,Re,Ye){var pt=1;ye<0&&(pt=-1,ye=-ye);for(var ft=Ti(this.doc,fe),jt=0;jt<ye&&(ft=pf(this.doc,ft,pt,Re,Ye),!ft.hitSide);++jt);return ft},moveH:zn(function(fe,ye){var Re=this;this.extendSelectionsBy(function(Ye){return Re.display.shift||Re.doc.extend||Ye.empty()?pf(Re.doc,Ye.head,fe,ye,Re.options.rtlMoveVisually):fe<0?Ye.from():Ye.to()},ln)}),deleteH:zn(function(fe,ye){var Re=this.doc.sel,Ye=this.doc;Re.somethingSelected()?Ye.replaceSelection("",null,"+delete"):lu(this,function(pt){var ft=pf(Ye,pt.head,fe,ye,!1);return fe<0?{from:ft,to:pt.head}:{from:pt.head,to:ft}})}),findPosV:function(fe,ye,Re,Ye){var pt=1,ft=Ye;ye<0&&(pt=-1,ye=-ye);for(var jt=Ti(this.doc,fe),Mn=0;Mn<ye;++Mn){var Ut=La(this,jt,"div");if(ft==null?ft=Ut.left:Ut.left=ft,jt=Ld(this,Ut,pt,Re),jt.hitSide)break}return jt},moveV:zn(function(fe,ye){var Re=this,Ye=this.doc,pt=[],ft=!this.display.shift&&!Ye.extend&&Ye.sel.somethingSelected();if(Ye.extendSelectionsBy(function(Mn){if(ft)return fe<0?Mn.from():Mn.to();var Ut=La(Re,Mn.head,"div");Mn.goalColumn!=null&&(Ut.left=Mn.goalColumn),pt.push(Ut.left);var oi=Ld(Re,Ut,fe,ye);return ye=="page"&&Mn==Ye.sel.primary()&&Tc(Re,Ha(Re,oi,"div").top-Ut.top),oi},ln),pt.length)for(var jt=0;jt<Ye.sel.ranges.length;jt++)Ye.sel.ranges[jt].goalColumn=pt[jt]}),findWordAt:function(fe){var ye=this.doc,Re=an(ye,fe.line).text,Ye=fe.ch,pt=fe.ch;if(Re){var ft=this.getHelper(fe,"wordChars");(fe.sticky=="before"||pt==Re.length)&&Ye?--Ye:++pt;for(var jt=Re.charAt(Ye),Mn=Ne(jt,ft)?function(Ut){return Ne(Ut,ft)}:/\s/.test(jt)?function(Ut){return/\s/.test(Ut)}:function(Ut){return!/\s/.test(Ut)&&!Ne(Ut)};Ye>0&&Mn(Re.charAt(Ye-1));)--Ye;for(;pt<Re.length&&Mn(Re.charAt(pt));)++pt}return new oo(tn(fe.line,Ye),tn(fe.line,pt))},toggleOverwrite:function(fe){fe!=null&&fe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ot(this.display.cursorDiv,"CodeMirror-overwrite"):je(this.display.cursorDiv,"CodeMirror-overwrite"),hn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==ot()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:zn(function(fe,ye){vc(this,fe,ye)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-$i(this)-this.display.barHeight,width:fe.scrollWidth-$i(this)-this.display.barWidth,clientHeight:Ri(this),clientWidth:ki(this)}},scrollIntoView:zn(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:tn(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?is(this,fe):Rc(this,fe.from,fe.to,fe.margin)}),setSize:zn(function(fe,ye){var Re=this,Ye=function(ft){return typeof ft=="number"||/^\d+$/.test(String(ft))?ft+"px":ft};fe!=null&&(this.display.wrapper.style.width=Ye(fe)),ye!=null&&(this.display.wrapper.style.height=Ye(ye)),this.options.lineWrapping&&ma(this);var pt=this.display.viewFrom;this.doc.iter(pt,this.display.viewTo,function(ft){if(ft.widgets){for(var jt=0;jt<ft.widgets.length;jt++)if(ft.widgets[jt].noHScroll){Ii(Re,pt,"widget");break}}++pt}),this.curOp.forceUpdate=!0,hn(this,"refresh",this)}),operation:function(fe){return on(this,fe)},startOperation:function(){return ai(this)},endOperation:function(){return po(this)},refresh:zn(function(){var fe=this.display.cachedTextHeight;_i(this),this.curOp.forceUpdate=!0,xa(this),vc(this,this.doc.scrollLeft,this.doc.scrollTop),mo(this.display),(fe==null||Math.abs(fe-lr(this.display))>.5||this.options.lineWrapping)&&fr(this),hn(this,"refresh",this)}),swapDoc:zn(function(fe){var ye=this.doc;return ye.cm=null,this.state.selectingText&&this.state.selectingText(),ba(this,fe),xa(this),this.display.input.reset(),vc(this,fe.scrollLeft,fe.scrollTop),this.curOp.forceScroll=!0,pr(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}},An(ie),ie.registerHelper=function(fe,ye,Re){ge.hasOwnProperty(fe)||(ge[fe]=ie[fe]={_global:[]}),ge[fe][ye]=Re},ie.registerGlobalHelper=function(fe,ye,Re,Ye){ie.registerHelper(fe,ye,Ye),ge[fe]._global.push({pred:Re,val:Ye})}}function pf(ie,ae,ge,fe,ye){var Re=ae,Ye=ge,pt=an(ie,ae.line),ft=ye&&ie.direction=="rtl"?-ge:ge;function jt(){var Ho=ae.line+ft;return Ho<ie.first||Ho>=ie.first+ie.size?!1:(ae=new tn(Ho,ae.ch,ae.sticky),pt=an(ie,Ho))}function Mn(Ho){var Bo;if(fe=="codepoint"){var ea=pt.text.charCodeAt(ae.ch+(fe>0?0:-1));isNaN(ea)?Bo=null:Bo=new tn(ae.line,Math.max(0,Math.min(pt.text.length,ae.ch+ge*(ea>=55296&&ea<56320?2:1))),-ge)}else ye?Bo=Js(ie.cm,pt,ae,ge):Bo=Ll(pt,ae,ge);if(Bo==null)if(!Ho&&jt())ae=cs(ye,ie.cm,pt,ae.line,ft);else return!1;else ae=Bo;return!0}if(fe=="char"||fe=="codepoint")Mn();else if(fe=="column")Mn(!0);else if(fe=="word"||fe=="group")for(var Ut=null,oi=fe=="group",ni=ie.cm&&ie.cm.getHelper(ae,"wordChars"),ir=!0;!(ge<0&&!Mn(!ir));ir=!1){var cr=pt.text.charAt(ae.ch)||`
|
|
|
`,Br=Ne(cr,ni)?"w":oi&&cr==`
|
|
|
`?"n":!oi||/\s/.test(cr)?null:"p";if(oi&&!ir&&!Br&&(Br="s"),Ut&&Ut!=Br){ge<0&&(ge=1,Mn(),ae.sticky="after");break}if(Br&&(Ut=Br),ge>0&&!Mn(!ir))break}var ao=Iu(ie,ae,Re,Ye,!0);return kn(Re,ao)&&(ao.hitSide=!0),ao}function Ld(ie,ae,ge,fe){var ye=ie.doc,Re=ae.left,Ye;if(fe=="page"){var pt=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ft=Math.max(pt-.5*lr(ie.display),3);Ye=(ge>0?ae.bottom:ae.top)+ge*ft}else fe=="line"&&(Ye=ge>0?ae.bottom+3:ae.top-3);for(var jt;jt=en(ie,Re,Ye),!!jt.outside;){if(ge<0?Ye<=0:Ye>=ye.height){jt.hitSide=!0;break}Ye+=ge*5}return jt}var Ks=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ke,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ks.prototype.init=function(ie){var ae=this,ge=this,fe=ge.cm,ye=ge.div=ie.lineDiv;Fg(ye,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function Re(pt){for(var ft=pt.target;ft;ft=ft.parentNode){if(ft==ye)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ft.className))break}return!1}qt(ye,"paste",function(pt){!Re(pt)||Yn(fe,pt)||Cg(pt,fe)||Ve<=11&&setTimeout(Kn(fe,function(){return ae.updateFromDOM()}),20)}),qt(ye,"compositionstart",function(pt){ae.composing={data:pt.data,done:!1}}),qt(ye,"compositionupdate",function(pt){ae.composing||(ae.composing={data:pt.data,done:!1})}),qt(ye,"compositionend",function(pt){ae.composing&&(pt.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),qt(ye,"touchstart",function(){return ge.forceCompositionEnd()}),qt(ye,"input",function(){ae.composing||ae.readFromDOMSoon()});function Ye(pt){if(!(!Re(pt)||Yn(fe,pt))){if(fe.somethingSelected())Hh({lineWise:!1,text:fe.getSelections()}),pt.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var ft=bg(fe);Hh({lineWise:!0,text:ft.text}),pt.type=="cut"&&fe.operation(function(){fe.setSelections(ft.ranges,0,_t),fe.replaceSelection("",null,"cut")})}else return;if(pt.clipboardData){pt.clipboardData.clearData();var jt=Ru.text.join(`
|
|
|
`);if(pt.clipboardData.setData("Text",jt),pt.clipboardData.getData("Text")==jt){pt.preventDefault();return}}var Mn=Bg(),Ut=Mn.firstChild;fe.display.lineSpace.insertBefore(Mn,fe.display.lineSpace.firstChild),Ut.value=Ru.text.join(`
|
|
|
`);var oi=document.activeElement;Dt(Ut),setTimeout(function(){fe.display.lineSpace.removeChild(Mn),oi.focus(),oi==ye&&ge.showPrimarySelection()},50)}}qt(ye,"copy",Ye),qt(ye,"cut",Ye)},Ks.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Ks.prototype.prepareSelection=function(){var ie=Rr(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Ks.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Ks.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ks.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 Re=mf(ae,ie.anchorNode,ie.anchorOffset),Ye=mf(ae,ie.focusNode,ie.focusOffset);if(!(Re&&!Re.bad&&Ye&&!Ye.bad&&fn(Si(Re,Ye),fe)==0&&fn(Di(Re,Ye),ye)==0)){var pt=ae.display.view,ft=fe.line>=ae.display.viewFrom&&Ch(ae,fe)||{node:pt[0].measure.map[2],offset:0},jt=ye.line<ae.display.viewTo&&Ch(ae,ye);if(!jt){var Mn=pt[pt.length-1].measure,Ut=Mn.maps?Mn.maps[Mn.maps.length-1]:Mn.map;jt={node:Ut[Ut.length-1],offset:Ut[Ut.length-2]-Ut[Ut.length-3]}}if(!ft||!jt){ie.removeAllRanges();return}var oi=ie.rangeCount&&ie.getRangeAt(0),ni;try{ni=Ze(ft.node,ft.offset,jt.offset,jt.node)}catch(ir){}ni&&(!le&&ae.state.focused?(ie.collapse(ft.node,ft.offset),ni.collapsed||(ie.removeAllRanges(),ie.addRange(ni))):(ie.removeAllRanges(),ie.addRange(ni)),oi&&ie.anchorNode==null?ie.addRange(oi):le&&this.startGracePeriod()),this.rememberSelection()}},Ks.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)},Ks.prototype.showMultipleSelections=function(ie){Je(this.cm.display.cursorDiv,ie.cursors),Je(this.cm.display.selectionDiv,ie.selection)},Ks.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},Ks.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Mt(this.div,ae)},Ks.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ks.prototype.blur=function(){this.div.blur()},Ks.prototype.getField=function(){return this.div},Ks.prototype.supportsTouch=function(){return!0},Ks.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():on(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)},Ks.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},Ks.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(te&&xt&&this.cm.display.gutterSpecs.length&&Mg(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ge=mf(ae,ie.anchorNode,ie.anchorOffset),fe=mf(ae,ie.focusNode,ie.focusOffset);ge&&fe&&on(ae,function(){js(ae.doc,Va(ge,fe),_t),(ge.bad||fe.bad)&&(ae.curOp.selectionChanged=!0)})}}},Ks.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=tn(fe.line-1,an(ie.doc,fe.line-1).length)),ye.ch==an(ie.doc,ye.line).text.length&&ye.line<ie.lastLine()&&(ye=tn(ye.line+1,0)),fe.line<ae.viewFrom||ye.line>ae.viewTo-1)return!1;var Re,Ye,pt;fe.line==ae.viewFrom||(Re=xr(ie,fe.line))==0?(Ye=zt(ae.view[0].line),pt=ae.view[0].node):(Ye=zt(ae.view[Re].line),pt=ae.view[Re-1].node.nextSibling);var ft=xr(ie,ye.line),jt,Mn;if(ft==ae.view.length-1?(jt=ae.viewTo-1,Mn=ae.lineDiv.lastChild):(jt=zt(ae.view[ft+1].line)-1,Mn=ae.view[ft+1].node.previousSibling),!pt)return!1;for(var Ut=ie.doc.splitLines(Eh(ie,pt,Mn,Ye,jt)),oi=dn(ie.doc,tn(Ye,0),tn(jt,an(ie.doc,jt).text.length));Ut.length>1&&oi.length>1;)if(St(Ut)==St(oi))Ut.pop(),oi.pop(),jt--;else if(Ut[0]==oi[0])Ut.shift(),oi.shift(),Ye++;else break;for(var ni=0,ir=0,cr=Ut[0],Br=oi[0],ao=Math.min(cr.length,Br.length);ni<ao&&cr.charCodeAt(ni)==Br.charCodeAt(ni);)++ni;for(var Ho=St(Ut),Bo=St(oi),ea=Math.min(Ho.length-(Ut.length==1?ni:0),Bo.length-(oi.length==1?ni:0));ir<ea&&Ho.charCodeAt(Ho.length-ir-1)==Bo.charCodeAt(Bo.length-ir-1);)++ir;if(Ut.length==1&&oi.length==1&&Ye==fe.line)for(;ni&&ni>fe.ch&&Ho.charCodeAt(Ho.length-ir-1)==Bo.charCodeAt(Bo.length-ir-1);)ni--,ir++;Ut[Ut.length-1]=Ho.slice(0,Ho.length-ir).replace(/^\u200b+/,""),Ut[0]=Ut[0].slice(ni).replace(/\u200b+$/,"");var _a=tn(Ye,ni),Mo=tn(jt,oi.length?St(oi).length-ir:0);if(Ut.length>1||Ut[0]||fn(_a,Mo))return Ku(ie.doc,Ut,_a,Mo,"+input"),!0},Ks.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ks.prototype.reset=function(){this.forceCompositionEnd()},Ks.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ks.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))},Ks.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&on(this.cm,function(){return _i(ie.cm)})},Ks.prototype.setUneditable=function(ie){ie.contentEditable="false"},Ks.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Kn(this.cm,wh)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Ks.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Ks.prototype.onContextMenu=function(){},Ks.prototype.resetPosition=function(){},Ks.prototype.needsContentAttribute=!0;function Ch(ie,ae){var ge=ga(ie,ae.line);if(!ge||ge.hidden)return null;var fe=an(ie.doc,ae.line),ye=Li(ge,fe,ae.line),Re=wn(fe,ie.doc.direction),Ye="left";if(Re){var pt=dt(Re,ae.ch);Ye=pt%2?"right":"left"}var ft=No(ye.map,ae.ch,Ye);return ft.offset=ft.collapse=="right"?ft.end:ft.start,ft}function Mg(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function Xd(ie,ae){return ae&&(ie.bad=!0),ie}function Eh(ie,ae,ge,fe,ye){var Re="",Ye=!1,pt=ie.doc.lineSeparator(),ft=!1;function jt(ni){return function(ir){return ir.id==ni}}function Mn(){Ye&&(Re+=pt,ft&&(Re+=pt),Ye=ft=!1)}function Ut(ni){ni&&(Mn(),Re+=ni)}function oi(ni){if(ni.nodeType==1){var ir=ni.getAttribute("cm-text");if(ir){Ut(ir);return}var cr=ni.getAttribute("cm-marker"),Br;if(cr){var ao=ie.findMarks(tn(fe,0),tn(ye+1,0),jt(+cr));ao.length&&(Br=ao[0].find(0))&&Ut(dn(ie.doc,Br.from,Br.to).join(pt));return}if(ni.getAttribute("contenteditable")=="false")return;var Ho=/^(pre|div|p|li|table|br)$/i.test(ni.nodeName);if(!/^br$/i.test(ni.nodeName)&&ni.textContent.length==0)return;Ho&&Mn();for(var Bo=0;Bo<ni.childNodes.length;Bo++)oi(ni.childNodes[Bo]);/^(pre|p)$/i.test(ni.nodeName)&&(ft=!0),Ho&&(Ye=!0)}else ni.nodeType==3&&Ut(ni.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;oi(ae),ae!=ge;)ae=ae.nextSibling,ft=!1;return Re}function mf(ie,ae,ge){var fe;if(ae==ie.display.lineDiv){if(fe=ie.display.lineDiv.childNodes[ge],!fe)return Xd(ie.clipPos(tn(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 Re=ie.display.view[ye];if(Re.node==fe)return ip(Re,ae,ge)}}function ip(ie,ae,ge){var fe=ie.text.firstChild,ye=!1;if(!ae||!Mt(fe,ae))return Xd(tn(zt(ie.line),0),!0);if(ae==fe&&(ye=!0,ae=fe.childNodes[ge],ge=0,!ae)){var Re=ie.rest?St(ie.rest):ie.line;return Xd(tn(zt(Re),Re.text.length),ye)}var Ye=ae.nodeType==3?ae:null,pt=ae;for(!Ye&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(Ye=ae.firstChild,ge&&(ge=Ye.nodeValue.length));pt.parentNode!=fe;)pt=pt.parentNode;var ft=ie.measure,jt=ft.maps;function Mn(Br,ao,Ho){for(var Bo=-1;Bo<(jt?jt.length:0);Bo++)for(var ea=Bo<0?ft.map:jt[Bo],_a=0;_a<ea.length;_a+=3){var Mo=ea[_a+2];if(Mo==Br||Mo==ao){var ns=zt(Bo<0?ie.line:ie.rest[Bo]),rl=ea[_a]+Ho;return(Ho<0||Mo!=Br)&&(rl=ea[_a+(Ho?1:0)]),tn(ns,rl)}}}var Ut=Mn(Ye,pt,ge);if(Ut)return Xd(Ut,ye);for(var oi=pt.nextSibling,ni=Ye?Ye.nodeValue.length-ge:0;oi;oi=oi.nextSibling){if(Ut=Mn(oi,oi.firstChild,0),Ut)return Xd(tn(Ut.line,Ut.ch-ni),ye);ni+=oi.textContent.length}for(var ir=pt.previousSibling,cr=ge;ir;ir=ir.previousSibling){if(Ut=Mn(ir,ir.firstChild,-1),Ut)return Xd(tn(Ut.line,Ut.ch+cr),ye);cr+=ir.textContent.length}}var Jl=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ke,this.hasSelection=!1,this.composing=null};Jl.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),Oe&&(ye.style.width="0px"),qt(ye,"input",function(){We&&Ve>=9&&ae.hasSelection&&(ae.hasSelection=null),ge.poll()}),qt(ye,"paste",function(Ye){Yn(fe,Ye)||Cg(Ye,fe)||(fe.state.pasteIncoming=+new Date,ge.fastPoll())});function Re(Ye){if(!Yn(fe,Ye)){if(fe.somethingSelected())Hh({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var pt=bg(fe);Hh({lineWise:!0,text:pt.text}),Ye.type=="cut"?fe.setSelections(pt.ranges,null,_t):(ge.prevInput="",ye.value=pt.text.join(`
|
|
|
`),Dt(ye))}else return;Ye.type=="cut"&&(fe.state.cutIncoming=+new Date)}}qt(ye,"cut",Re),qt(ye,"copy",Re),qt(ie.scroller,"paste",function(Ye){if(!(En(ie,Ye)||Yn(fe,Ye))){if(!ye.dispatchEvent){fe.state.pasteIncoming=+new Date,ge.focus();return}var pt=new Event("paste");pt.clipboardData=Ye.clipboardData,ye.dispatchEvent(pt)}}),qt(ie.lineSpace,"selectstart",function(Ye){En(ie,Ye)||wi(Ye)}),qt(ye,"compositionstart",function(){var Ye=fe.getCursor("from");ge.composing&&ge.composing.range.clear(),ge.composing={start:Ye,range:fe.markText(Ye,fe.getCursor("to"),{className:"CodeMirror-composing"})}}),qt(ye,"compositionend",function(){ge.composing&&(ge.poll(),ge.composing.range.clear(),ge.composing=null)})},Jl.prototype.createField=function(ie){this.wrapper=Bg(),this.textarea=this.wrapper.firstChild},Jl.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},Jl.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,ge=ie.doc,fe=Rr(ie);if(ie.options.moveInputWithCursor){var ye=La(ie,ge.sel.primary().head,"div"),Re=ae.wrapper.getBoundingClientRect(),Ye=ae.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,ye.top+Ye.top-Re.top)),fe.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,ye.left+Ye.left-Re.left))}return fe},Jl.prototype.showSelection=function(ie){var ae=this.cm,ge=ae.display;Je(ge.cursorDiv,ie.cursors),Je(ge.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},Jl.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&&Dt(this.textarea),We&&Ve>=9&&(this.hasSelection=ge)}else ie||(this.prevInput=this.textarea.value="",We&&Ve>=9&&(this.hasSelection=null))}},Jl.prototype.getField=function(){return this.textarea},Jl.prototype.supportsTouch=function(){return!1},Jl.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||ot()!=this.textarea))try{this.textarea.focus()}catch(ie){}},Jl.prototype.blur=function(){this.textarea.blur()},Jl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Jl.prototype.receivedFocus=function(){this.slowPoll()},Jl.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},Jl.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)},Jl.prototype.poll=function(){var ie=this,ae=this.cm,ge=this.textarea,fe=this.prevInput;if(this.contextMenuPending||!ae.state.focused||De(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(We&&Ve>=9&&this.hasSelection===ye||de&&/[\uf700-\uf7ff]/.test(ye))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Re=ye.charCodeAt(0);if(Re==8203&&!fe&&(fe="\u200B"),Re==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ye=0,pt=Math.min(fe.length,ye.length);Ye<pt&&fe.charCodeAt(Ye)==ye.charCodeAt(Ye);)++Ye;return on(ae,function(){wh(ae,ye.slice(Ye),fe.length-Ye,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},Jl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Jl.prototype.onKeyPress=function(){We&&Ve>=9&&(this.hasSelection=null),this.fastPoll()},Jl.prototype.onContextMenu=function(ie){var ae=this,ge=ae.cm,fe=ge.display,ye=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Re=vr(ge,ie),Ye=fe.scroller.scrollTop;if(!Re||Ue)return;var pt=ge.options.resetSelectionOnContextMenu;pt&&ge.doc.sel.contains(Re)==-1&&Kn(ge,js)(ge.doc,Va(Re),_t);var ft=ye.style.cssText,jt=ae.wrapper.style.cssText,Mn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",ye.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(ie.clientY-Mn.top-5)+"px; left: "+(ie.clientX-Mn.left-5)+`px;
|
|
|
z-index: 1000; background: `+(We?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ut;Le&&(Ut=window.scrollY),fe.input.focus(),Le&&window.scrollTo(null,Ut),fe.input.reset(),ge.somethingSelected()||(ye.value=ae.prevInput=" "),ae.contextMenuPending=ni,fe.selForContextMenu=ge.doc.sel,clearTimeout(fe.detectingSelectAll);function oi(){if(ye.selectionStart!=null){var cr=ge.somethingSelected(),Br="\u200B"+(cr?ye.value:"");ye.value="\u21DA",ye.value=Br,ae.prevInput=cr?"":"\u200B",ye.selectionStart=1,ye.selectionEnd=Br.length,fe.selForContextMenu=ge.doc.sel}}function ni(){if(ae.contextMenuPending==ni&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=jt,ye.style.cssText=ft,We&&Ve<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=Ye),ye.selectionStart!=null)){(!We||We&&Ve<9)&&oi();var cr=0,Br=function(){fe.selForContextMenu==ge.doc.sel&&ye.selectionStart==0&&ye.selectionEnd>0&&ae.prevInput=="\u200B"?Kn(ge,Ms)(ge):cr++<10?fe.detectingSelectAll=setTimeout(Br,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(Br,200)}}if(We&&Ve>=9&&oi(),Me){dr(ie);var ir=function(){Vn(window,"mouseup",ir),setTimeout(ni,20)};qt(window,"mouseup",ir)}else setTimeout(ni,50)},Jl.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},Jl.prototype.setUneditable=function(){},Jl.prototype.needsContentAttribute=!1;function rp(ie,ae){if(ae=ae?Lt(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=ot();ae.autofocus=ge==ie||ie.getAttribute("autofocus")!=null&&ge==document.body}function fe(){ie.value=pt.getValue()}var ye;if(ie.form&&(qt(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone)){var Re=ie.form;ye=Re.submit;try{var Ye=Re.submit=function(){fe(),Re.submit=ye,Re.submit(),Re.submit=Ye}}catch(ft){}}ae.finishInit=function(ft){ft.save=fe,ft.getTextArea=function(){return ie},ft.toTextArea=function(){ft.toTextArea=isNaN,fe(),ie.parentNode.removeChild(ft.getWrapperElement()),ie.style.display="",ie.form&&(Vn(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=ye))}},ie.style.display="none";var pt=Ls(function(ft){return ie.parentNode.insertBefore(ft,ie.nextSibling)},ae);return pt}function Jd(ie){ie.off=Vn,ie.on=qt,ie.wheelEventPixels=ta,ie.Doc=Ml,ie.splitLines=hr,ie.countColumn=qe,ie.findColumn=Wn,ie.isWordChar=Ae,ie.Pass=Pn,ie.signal=hn,ie.Line=va,ie.changeEnd=ws,ie.scrollbarModel=_d,ie.Pos=tn,ie.cmpPos=fn,ie.modes=vi,ie.mimeModes=Zi,ie.resolveMode=$t,ie.getMode=Gt,ie.modeExtensions=Zt,ie.extendMode=wt,ie.copyState=vn,ie.startState=It,ie.innerMode=cn,ie.commands=nu,ie.keyMap=Pu,ie.keyName=mh,ie.isModifierKey=Uc,ie.lookupKey=Tu,ie.normalizeKeyMap=_h,ie.StringStream=ct,ie.SharedTextMarker=Bc,ie.TextMarker=gn,ie.LineWidget=xl,ie.e_preventDefault=wi,ie.e_stopPropagation=ji,ie.e_stop=dr,ie.addClass=Ot,ie.contains=Mt,ie.rmClass=je,ie.keyNames=Mc}tp(Ls),Yd(Ls);var dd="iter insert remove copy getEditor constructor".split(" ");for(var bh in Ml.prototype)Ml.prototype.hasOwnProperty(bh)&&Rt(dd,bh)<0&&(Ls.prototype[bh]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Ml.prototype[bh]));return An(Ml),Ls.inputStyles={textarea:Jl,contenteditable:Ks},Ls.defineMode=function(ie){!Ls.defaults.mode&&ie!="null"&&(Ls.defaults.mode=ie),er.apply(this,arguments)},Ls.defineMIME=Gn,Ls.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),Ls.defineMIME("text/plain","null"),Ls.defineExtension=function(ie,ae){Ls.prototype[ie]=ae},Ls.defineDocExtension=function(ie,ae){Ml.prototype[ie]=ae},Ls.fromTextArea=rp,Jd(Ls),Ls.version="5.58.2",Ls})},25419:function(Tn,xn,me){(function(le){le(me(89780),me(15525),me(98101))})(function(le){"use strict";le.defineMode("markdown",function(Te,He){var lt=le.getMode(Te,"text/html"),We=lt.name=="null";function Ve(qe){if(le.findModeByName){var Ke=le.findModeByName(qe);Ke&&(qe=Ke.mime||Ke.mimes[0])}var Rt=le.getMode(Te,qe);return Rt.name=="null"?null:Rt}He.highlightFormatting===void 0&&(He.highlightFormatting=!1),He.maxBlockquoteDepth===void 0&&(He.maxBlockquoteDepth=0),He.taskLists===void 0&&(He.taskLists=!1),He.strikethrough===void 0&&(He.strikethrough=!1),He.emoji===void 0&&(He.emoji=!1),He.fencedCodeBlockHighlighting===void 0&&(He.fencedCodeBlockHighlighting=!0),He.fencedCodeBlockDefaultMode===void 0&&(He.fencedCodeBlockDefaultMode="text/plain"),He.xml===void 0&&(He.xml=!0),He.tokenTypeOverrides===void 0&&(He.tokenTypeOverrides={});var Le={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 Ct in Le)Le.hasOwnProperty(Ct)&&He.tokenTypeOverrides[Ct]&&(Le[Ct]=He.tokenTypeOverrides[Ct]);var xt=/^([*\-_])(?:\s*\1){2,}\s*$/,Ue=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,bt=/^\[(x| )\](?=\s)/i,at=He.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,mt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Oe=/^[^#!\[\]*_\\<>` "'(~:]+/,te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,de=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function he(qe,Ke,Rt){return Ke.f=Ke.inline=Rt,Rt(qe,Ke)}function ve(qe,Ke,Rt){return Ke.f=Ke.block=Rt,Rt(qe,Ke)}function Ee(qe){return!qe||!/\S/.test(qe.string)}function Me(qe){if(qe.linkTitle=!1,qe.linkHref=!1,qe.linkText=!1,qe.em=!1,qe.strong=!1,qe.strikethrough=!1,qe.quote=0,qe.indentedCode=!1,qe.f==je){var Ke=We;if(!Ke){var Rt=le.innerMode(lt,qe.htmlState);Ke=Rt.mode.name=="xml"&&Rt.state.tagStart===null&&!Rt.state.context&&Rt.state.tokenize.isInText}Ke&&(qe.f=ht,qe.block=Be,qe.htmlState=null)}return qe.trailingSpace=0,qe.trailingSpaceNewLine=!1,qe.prevLine=qe.thisLine,qe.thisLine={stream:null},null}function Be(qe,Ke){var Rt=qe.column()===Ke.indentation,Sn=Ee(Ke.prevLine.stream),Pn=Ke.indentedCode,_t=Ke.prevLine.hr,rn=Ke.list!==!1,ln=(Ke.listStack[Ke.listStack.length-1]||0)+3;Ke.indentedCode=!1;var Wn=Ke.indentation;if(Ke.indentationDiff===null&&(Ke.indentationDiff=Ke.indentation,rn)){for(Ke.list=null;Wn<Ke.listStack[Ke.listStack.length-1];)Ke.listStack.pop(),Ke.listStack.length?Ke.indentation=Ke.listStack[Ke.listStack.length-1]:Ke.list=!1;Ke.list!==!1&&(Ke.indentationDiff=Wn-Ke.listStack[Ke.listStack.length-1])}var un=!Sn&&!_t&&!Ke.prevLine.header&&(!rn||!Pn)&&!Ke.prevLine.fencedCodeEnd,_n=(Ke.list===!1||_t||Sn)&&Ke.indentation<=ln&&qe.match(xt),St=null;if(Ke.indentationDiff>=4&&(Pn||Ke.prevLine.fencedCodeEnd||Ke.prevLine.header||Sn))return qe.skipToEnd(),Ke.indentedCode=!0,Le.code;if(qe.eatSpace())return null;if(Rt&&Ke.indentation<=ln&&(St=qe.match(at))&&St[1].length<=6)return Ke.quote=0,Ke.header=St[1].length,Ke.thisLine.header=!0,He.highlightFormatting&&(Ke.formatting="header"),Ke.f=Ke.inline,Je(Ke);if(Ke.indentation<=ln&&qe.eat(">"))return Ke.quote=Rt?1:Ke.quote+1,He.highlightFormatting&&(Ke.formatting="quote"),qe.eatSpace(),Je(Ke);if(!_n&&!Ke.setext&&Rt&&Ke.indentation<=ln&&(St=qe.match(Ue))){var Zn=St[1]?"ol":"ul";return Ke.indentation=Wn+qe.current().length,Ke.list=!0,Ke.quote=0,Ke.listStack.push(Ke.indentation),Ke.em=!1,Ke.strong=!1,Ke.code=!1,Ke.strikethrough=!1,He.taskLists&&qe.match(bt,!1)&&(Ke.taskList=!0),Ke.f=Ke.inline,He.highlightFormatting&&(Ke.formatting=["list","list-"+Zn]),Je(Ke)}else{if(Rt&&Ke.indentation<=ln&&(St=qe.match(te,!0)))return Ke.quote=0,Ke.fencedEndRE=new RegExp(St[1]+"+ *$"),Ke.localMode=He.fencedCodeBlockHighlighting&&Ve(St[2]||He.fencedCodeBlockDefaultMode),Ke.localMode&&(Ke.localState=le.startState(Ke.localMode)),Ke.f=Ke.block=_e,He.highlightFormatting&&(Ke.formatting="code-block"),Ke.code=-1,Je(Ke);if(Ke.setext||(!un||!rn)&&!Ke.quote&&Ke.list===!1&&!Ke.code&&!_n&&!ee.test(qe.string)&&(St=qe.lookAhead(1))&&(St=St.match(mt)))return Ke.setext?(Ke.header=Ke.setext,Ke.setext=0,qe.skipToEnd(),He.highlightFormatting&&(Ke.formatting="header")):(Ke.header=St[0].charAt(0)=="="?1:2,Ke.setext=Ke.header),Ke.thisLine.header=!0,Ke.f=Ke.inline,Je(Ke);if(_n)return qe.skipToEnd(),Ke.hr=!0,Ke.thisLine.hr=!0,Le.hr;if(qe.peek()==="[")return he(qe,Ke,Pt)}return he(qe,Ke,Ke.inline)}function je(qe,Ke){var Rt=lt.token(qe,Ke.htmlState);if(!We){var Sn=le.innerMode(lt,Ke.htmlState);(Sn.mode.name=="xml"&&Sn.state.tagStart===null&&!Sn.state.context&&Sn.state.tokenize.isInText||Ke.md_inside&&qe.current().indexOf(">")>-1)&&(Ke.f=ht,Ke.block=Be,Ke.htmlState=null)}return Rt}function _e(qe,Ke){var Rt=Ke.listStack[Ke.listStack.length-1]||0,Sn=Ke.indentation<Rt,Pn=Rt+3;if(Ke.fencedEndRE&&Ke.indentation<=Pn&&(Sn||qe.match(Ke.fencedEndRE))){He.highlightFormatting&&(Ke.formatting="code-block");var _t;return Sn||(_t=Je(Ke)),Ke.localMode=Ke.localState=null,Ke.block=Be,Ke.f=ht,Ke.fencedEndRE=null,Ke.code=0,Ke.thisLine.fencedCodeEnd=!0,Sn?ve(qe,Ke,Ke.block):_t}else return Ke.localMode?Ke.localMode.token(qe,Ke.localState):(qe.skipToEnd(),Le.code)}function Je(qe){var Ke=[];if(qe.formatting){Ke.push(Le.formatting),typeof qe.formatting=="string"&&(qe.formatting=[qe.formatting]);for(var Rt=0;Rt<qe.formatting.length;Rt++)Ke.push(Le.formatting+"-"+qe.formatting[Rt]),qe.formatting[Rt]==="header"&&Ke.push(Le.formatting+"-"+qe.formatting[Rt]+"-"+qe.header),qe.formatting[Rt]==="quote"&&(!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=qe.quote?Ke.push(Le.formatting+"-"+qe.formatting[Rt]+"-"+qe.quote):Ke.push("error"))}if(qe.taskOpen)return Ke.push("meta"),Ke.length?Ke.join(" "):null;if(qe.taskClosed)return Ke.push("property"),Ke.length?Ke.join(" "):null;if(qe.linkHref?Ke.push(Le.linkHref,"url"):(qe.strong&&Ke.push(Le.strong),qe.em&&Ke.push(Le.em),qe.strikethrough&&Ke.push(Le.strikethrough),qe.emoji&&Ke.push(Le.emoji),qe.linkText&&Ke.push(Le.linkText),qe.code&&Ke.push(Le.code),qe.image&&Ke.push(Le.image),qe.imageAltText&&Ke.push(Le.imageAltText,"link"),qe.imageMarker&&Ke.push(Le.imageMarker)),qe.header&&Ke.push(Le.header,Le.header+"-"+qe.header),qe.quote&&(Ke.push(Le.quote),!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=qe.quote?Ke.push(Le.quote+"-"+qe.quote):Ke.push(Le.quote+"-"+He.maxBlockquoteDepth)),qe.list!==!1){var Sn=(qe.listStack.length-1)%3;Sn?Sn===1?Ke.push(Le.list2):Ke.push(Le.list3):Ke.push(Le.list1)}return qe.trailingSpaceNewLine?Ke.push("trailing-space-new-line"):qe.trailingSpace&&Ke.push("trailing-space-"+(qe.trailingSpace%2?"a":"b")),Ke.length?Ke.join(" "):null}function Xe(qe,Ke){if(qe.match(Oe,!0))return Je(Ke)}function ht(qe,Ke){var Rt=Ke.text(qe,Ke);if(typeof Rt!="undefined")return Rt;if(Ke.list)return Ke.list=null,Je(Ke);if(Ke.taskList){var Sn=qe.match(bt,!0)[1]===" ";return Sn?Ke.taskOpen=!0:Ke.taskClosed=!0,He.highlightFormatting&&(Ke.formatting="task"),Ke.taskList=!1,Je(Ke)}if(Ke.taskOpen=!1,Ke.taskClosed=!1,Ke.header&&qe.match(/^#+$/,!0))return He.highlightFormatting&&(Ke.formatting="header"),Je(Ke);var Pn=qe.next();if(Ke.linkTitle){Ke.linkTitle=!1;var _t=Pn;Pn==="("&&(_t=")"),_t=(_t+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var rn="^\\s*(?:[^"+_t+"\\\\]+|\\\\\\\\|\\\\.)"+_t;if(qe.match(new RegExp(rn),!0))return Le.linkHref}if(Pn==="`"){var ln=Ke.formatting;He.highlightFormatting&&(Ke.formatting="code"),qe.eatWhile("`");var Wn=qe.current().length;if(Ke.code==0&&(!Ke.quote||Wn==1))return Ke.code=Wn,Je(Ke);if(Wn==Ke.code){var un=Je(Ke);return Ke.code=0,un}else return Ke.formatting=ln,Je(Ke)}else if(Ke.code)return Je(Ke);if(Pn==="\\"&&(qe.next(),He.highlightFormatting)){var _n=Je(Ke),St=Le.formatting+"-escape";return _n?_n+" "+St:St}if(Pn==="!"&&qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ke.imageMarker=!0,Ke.image=!0,He.highlightFormatting&&(Ke.formatting="image"),Je(Ke);if(Pn==="["&&Ke.imageMarker&&qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ke.imageMarker=!1,Ke.imageAltText=!0,He.highlightFormatting&&(Ke.formatting="image"),Je(Ke);if(Pn==="]"&&Ke.imageAltText){He.highlightFormatting&&(Ke.formatting="image");var _n=Je(Ke);return Ke.imageAltText=!1,Ke.image=!1,Ke.inline=Ke.f=Mt,_n}if(Pn==="["&&!Ke.image)return Ke.linkText&&qe.match(/^.*?\]/)||(Ke.linkText=!0,He.highlightFormatting&&(Ke.formatting="link")),Je(Ke);if(Pn==="]"&&Ke.linkText){He.highlightFormatting&&(Ke.formatting="link");var _n=Je(Ke);return Ke.linkText=!1,Ke.inline=Ke.f=qe.match(/\(.*?\)| ?\[.*?\]/,!1)?Mt:ht,_n}if(Pn==="<"&&qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ke.f=Ke.inline=Ze,He.highlightFormatting&&(Ke.formatting="link");var _n=Je(Ke);return _n?_n+=" ":_n="",_n+Le.linkInline}if(Pn==="<"&&qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ke.f=Ke.inline=Ze,He.highlightFormatting&&(Ke.formatting="link");var _n=Je(Ke);return _n?_n+=" ":_n="",_n+Le.linkEmail}if(He.xml&&Pn==="<"&&qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Zn=qe.string.indexOf(">",qe.pos);if(Zn!=-1){var li=qe.string.substring(qe.start,Zn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(li)&&(Ke.md_inside=!0)}return qe.backUp(1),Ke.htmlState=le.startState(lt),ve(qe,Ke,je)}if(He.xml&&Pn==="<"&&qe.match(/^\/\w*?>/))return Ke.md_inside=!1,"tag";if(Pn==="*"||Pn==="_"){for(var Ge=1,be=qe.pos==1?" ":qe.string.charAt(qe.pos-2);Ge<3&&qe.eat(Pn);)Ge++;var Pe=qe.peek()||" ",Ae=!/\s/.test(Pe)&&(!de.test(Pe)||/\s/.test(be)||de.test(be)),Ne=!/\s/.test(be)&&(!de.test(be)||/\s/.test(Pe)||de.test(Pe)),xe=null,ut=null;if(Ge%2&&(!Ke.em&&Ae&&(Pn==="*"||!Ne||de.test(be))?xe=!0:Ke.em==Pn&&Ne&&(Pn==="*"||!Ae||de.test(Pe))&&(xe=!1)),Ge>1&&(!Ke.strong&&Ae&&(Pn==="*"||!Ne||de.test(be))?ut=!0:Ke.strong==Pn&&Ne&&(Pn==="*"||!Ae||de.test(Pe))&&(ut=!1)),ut!=null||xe!=null){He.highlightFormatting&&(Ke.formatting=xe==null?"strong":ut==null?"em":"strong em"),xe===!0&&(Ke.em=Pn),ut===!0&&(Ke.strong=Pn);var un=Je(Ke);return xe===!1&&(Ke.em=!1),ut===!1&&(Ke.strong=!1),un}}else if(Pn===" "&&(qe.eat("*")||qe.eat("_"))){if(qe.peek()===" ")return Je(Ke);qe.backUp(1)}if(He.strikethrough){if(Pn==="~"&&qe.eatWhile(Pn)){if(Ke.strikethrough){He.highlightFormatting&&(Ke.formatting="strikethrough");var un=Je(Ke);return Ke.strikethrough=!1,un}else if(qe.match(/^[^\s]/,!1))return Ke.strikethrough=!0,He.highlightFormatting&&(Ke.formatting="strikethrough"),Je(Ke)}else if(Pn===" "&&qe.match(/^~~/,!0)){if(qe.peek()===" ")return Je(Ke);qe.backUp(2)}}if(He.emoji&&Pn===":"&&qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ke.emoji=!0,He.highlightFormatting&&(Ke.formatting="emoji");var Bt=Je(Ke);return Ke.emoji=!1,Bt}return Pn===" "&&(qe.match(/^ +$/,!1)?Ke.trailingSpace++:Ke.trailingSpace&&(Ke.trailingSpaceNewLine=!0)),Je(Ke)}function Ze(qe,Ke){var Rt=qe.next();if(Rt===">"){Ke.f=Ke.inline=ht,He.highlightFormatting&&(Ke.formatting="link");var Sn=Je(Ke);return Sn?Sn+=" ":Sn="",Sn+Le.linkInline}return qe.match(/^[^>]+/,!0),Le.linkInline}function Mt(qe,Ke){if(qe.eatSpace())return null;var Rt=qe.next();return Rt==="("||Rt==="["?(Ke.f=Ke.inline=Ot(Rt==="("?")":"]"),He.highlightFormatting&&(Ke.formatting="link-string"),Ke.linkHref=!0,Je(Ke)):"error"}var ot={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ot(qe){return function(Ke,Rt){var Sn=Ke.next();if(Sn===qe){Rt.f=Rt.inline=ht,He.highlightFormatting&&(Rt.formatting="link-string");var Pn=Je(Rt);return Rt.linkHref=!1,Pn}return Ke.match(ot[qe]),Rt.linkHref=!0,Je(Rt)}}function Pt(qe,Ke){return qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ke.f=Dt,qe.next(),He.highlightFormatting&&(Ke.formatting="link"),Ke.linkText=!0,Je(Ke)):he(qe,Ke,ht)}function Dt(qe,Ke){if(qe.match(/^\]:/,!0)){Ke.f=Ke.inline=Wt,He.highlightFormatting&&(Ke.formatting="link");var Rt=Je(Ke);return Ke.linkText=!1,Rt}return qe.match(/^([^\]\\]|\\.)+/,!0),Le.linkText}function Wt(qe,Ke){return qe.eatSpace()?null:(qe.match(/^[^\s]+/,!0),qe.peek()===void 0?Ke.linkTitle=!0:qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ke.f=Ke.inline=ht,Le.linkHref+" url")}var Lt={startState:function(){return{f:Be,prevLine:{stream:null},thisLine:{stream:null},block:Be,htmlState:null,indentation:0,inline:ht,text:Xe,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(qe){return{f:qe.f,prevLine:qe.prevLine,thisLine:qe.thisLine,block:qe.block,htmlState:qe.htmlState&&le.copyState(lt,qe.htmlState),indentation:qe.indentation,localMode:qe.localMode,localState:qe.localMode?le.copyState(qe.localMode,qe.localState):null,inline:qe.inline,text:qe.text,formatting:!1,linkText:qe.linkText,linkTitle:qe.linkTitle,linkHref:qe.linkHref,code:qe.code,em:qe.em,strong:qe.strong,strikethrough:qe.strikethrough,emoji:qe.emoji,header:qe.header,setext:qe.setext,hr:qe.hr,taskList:qe.taskList,list:qe.list,listStack:qe.listStack.slice(0),quote:qe.quote,indentedCode:qe.indentedCode,trailingSpace:qe.trailingSpace,trailingSpaceNewLine:qe.trailingSpaceNewLine,md_inside:qe.md_inside,fencedEndRE:qe.fencedEndRE}},token:function(qe,Ke){if(Ke.formatting=!1,qe!=Ke.thisLine.stream){if(Ke.header=0,Ke.hr=!1,qe.match(/^\s*$/,!0))return Me(Ke),null;if(Ke.prevLine=Ke.thisLine,Ke.thisLine={stream:qe},Ke.taskList=!1,Ke.trailingSpace=0,Ke.trailingSpaceNewLine=!1,!Ke.localState&&(Ke.f=Ke.block,Ke.f!=je)){var Rt=qe.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ke.indentation=Rt,Ke.indentationDiff=null,Rt>0)return null}}return Ke.f(qe,Ke)},innerMode:function(qe){return qe.block==je?{state:qe.htmlState,mode:lt}:qe.localState?{state:qe.localState,mode:qe.localMode}:{state:qe,mode:Lt}},indent:function(qe,Ke,Rt){return qe.block==je&<.indent?lt.indent(qe.htmlState,Ke,Rt):qe.localState&&qe.localMode.indent?qe.localMode.indent(qe.localState,Ke,Rt):le.Pass},blankLine:Me,getType:Je,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Lt},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},98101:function(Tn,xn,me){(function(le){le(me(89780))})(function(le){"use strict";le.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Te=0;Te<le.modeInfo.length;Te++){var He=le.modeInfo[Te];He.mimes&&(He.mime=He.mimes[0])}le.findModeByMIME=function(lt){lt=lt.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var Ve=le.modeInfo[We];if(Ve.mime==lt)return Ve;if(Ve.mimes){for(var Le=0;Le<Ve.mimes.length;Le++)if(Ve.mimes[Le]==lt)return Ve}}if(/\+xml$/.test(lt))return le.findModeByMIME("application/xml");if(/\+json$/.test(lt))return le.findModeByMIME("application/json")},le.findModeByExtension=function(lt){lt=lt.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var Ve=le.modeInfo[We];if(Ve.ext){for(var Le=0;Le<Ve.ext.length;Le++)if(Ve.ext[Le]==lt)return Ve}}},le.findModeByFileName=function(lt){for(var We=0;We<le.modeInfo.length;We++){var Ve=le.modeInfo[We];if(Ve.file&&Ve.file.test(lt))return Ve}var Le=lt.lastIndexOf("."),Ct=Le>-1&<.substring(Le+1,lt.length);if(Ct)return le.findModeByExtension(Ct)},le.findModeByName=function(lt){lt=lt.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var Ve=le.modeInfo[We];if(Ve.name.toLowerCase()==lt)return Ve;if(Ve.alias){for(var Le=0;Le<Ve.alias.length;Le++)if(Ve.alias[Le].toLowerCase()==lt)return Ve}}}})},67549:function(Tn,xn,me){(function(le){le(me(89780))})(function(le){"use strict";le.defineMode("stex",function(Te,He){"use strict";function lt(Oe,te){Oe.cmdState.push(te)}function We(Oe){return Oe.cmdState.length>0?Oe.cmdState[Oe.cmdState.length-1]:null}function Ve(Oe){var te=Oe.cmdState.pop();te&&te.closeBracket()}function Le(Oe){for(var te=Oe.cmdState,ee=te.length-1;ee>=0;ee--){var de=te[ee];if(de.name!="DEFAULT")return de}return{styleIdentifier:function(){return null}}}function Ct(Oe,te,ee){return function(){this.name=Oe,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 xt={};xt.importmodule=Ct("importmodule","tag",["string","builtin"]),xt.documentclass=Ct("documentclass","tag",["","atom"]),xt.usepackage=Ct("usepackage","tag",["atom"]),xt.begin=Ct("begin","tag",["atom"]),xt.end=Ct("end","tag",["atom"]),xt.label=Ct("label","tag",["atom"]),xt.ref=Ct("ref","tag",["atom"]),xt.eqref=Ct("eqref","tag",["atom"]),xt.cite=Ct("cite","tag",["atom"]),xt.bibitem=Ct("bibitem","tag",["atom"]),xt.Bibitem=Ct("Bibitem","tag",["atom"]),xt.RBibitem=Ct("RBibitem","tag",["atom"]),xt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ue(Oe,te){Oe.f=te}function bt(Oe,te){var ee;if(Oe.match(/^\\[a-zA-Z@]+/)){var de=Oe.current().slice(1);return ee=xt.hasOwnProperty(de)?xt[de]:xt.DEFAULT,ee=new ee,lt(te,ee),Ue(te,mt),ee.style}if(Oe.match(/^\\[$&%#{}_]/)||Oe.match(/^\\[,;!\/\\]/))return"tag";if(Oe.match("\\["))return Ue(te,function(he,ve){return at(he,ve,"\\]")}),"keyword";if(Oe.match("\\("))return Ue(te,function(he,ve){return at(he,ve,"\\)")}),"keyword";if(Oe.match("$$"))return Ue(te,function(he,ve){return at(he,ve,"$$")}),"keyword";if(Oe.match("$"))return Ue(te,function(he,ve){return at(he,ve,"$")}),"keyword";var se=Oe.next();if(se=="%")return Oe.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=We(te),ee)ee.closeBracket(se),Ue(te,mt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=xt.DEFAULT,ee=new ee,lt(te,ee),"bracket"):/\d/.test(se)?(Oe.eatWhile(/[\w.%]/),"atom"):(Oe.eatWhile(/[\w\-_]/),ee=Le(te),ee.name=="begin"&&(ee.argument=Oe.current()),ee.styleIdentifier())}function at(Oe,te,ee){if(Oe.eatSpace())return null;if(ee&&Oe.match(ee))return Ue(te,bt),"keyword";if(Oe.match(/^\\[a-zA-Z@]+/))return"tag";if(Oe.match(/^[a-zA-Z]+/))return"variable-2";if(Oe.match(/^\\[$&%#{}_]/)||Oe.match(/^\\[,;!\/]/)||Oe.match(/^[\^_&]/))return"tag";if(Oe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Oe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var de=Oe.next();return de=="{"||de=="}"||de=="["||de=="]"||de=="("||de==")"?"bracket":de=="%"?(Oe.skipToEnd(),"comment"):"error"}function mt(Oe,te){var ee=Oe.peek(),de;return ee=="{"||ee=="["?(de=We(te),de.openBracket(ee),Oe.eat(ee),Ue(te,bt),"bracket"):/[ \t\r]/.test(ee)?(Oe.eat(ee),null):(Ue(te,bt),Ve(te),bt(Oe,te))}return{startState:function(){var Oe=He.inMathMode?function(te,ee){return at(te,ee)}:bt;return{cmdState:[],f:Oe}},copyState:function(Oe){return{cmdState:Oe.cmdState.slice(),f:Oe.f}},token:function(Oe,te){return te.f(Oe,te)},blankLine:function(Oe){Oe.f=bt,Oe.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},15525:function(Tn,xn,me){(function(le){le(me(89780))})(function(le){"use strict";var Te={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},He={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};le.defineMode("xml",function(lt,We){var Ve=lt.indentUnit,Le={},Ct=We.htmlMode?Te:He;for(var xt in Ct)Le[xt]=Ct[xt];for(var xt in We)Le[xt]=We[xt];var Ue,bt;function at(Ze,Mt){function ot(Dt){return Mt.tokenize=Dt,Dt(Ze,Mt)}var Ot=Ze.next();if(Ot=="<")return Ze.eat("!")?Ze.eat("[")?Ze.match("CDATA[")?ot(te("atom","]]>")):null:Ze.match("--")?ot(te("comment","-->")):Ze.match("DOCTYPE",!0,!0)?(Ze.eatWhile(/[\w\._\-]/),ot(ee(1))):null:Ze.eat("?")?(Ze.eatWhile(/[\w\._\-]/),Mt.tokenize=te("meta","?>"),"meta"):(Ue=Ze.eat("/")?"closeTag":"openTag",Mt.tokenize=mt,"tag bracket");if(Ot=="&"){var Pt;return Ze.eat("#")?Ze.eat("x")?Pt=Ze.eatWhile(/[a-fA-F\d]/)&&Ze.eat(";"):Pt=Ze.eatWhile(/[\d]/)&&Ze.eat(";"):Pt=Ze.eatWhile(/[\w\.\-:]/)&&Ze.eat(";"),Pt?"atom":"error"}else return Ze.eatWhile(/[^&<]/),null}at.isInText=!0;function mt(Ze,Mt){var ot=Ze.next();if(ot==">"||ot=="/"&&Ze.eat(">"))return Mt.tokenize=at,Ue=ot==">"?"endTag":"selfcloseTag","tag bracket";if(ot=="=")return Ue="equals",null;if(ot=="<"){Mt.tokenize=at,Mt.state=ve,Mt.tagName=Mt.tagStart=null;var Ot=Mt.tokenize(Ze,Mt);return Ot?Ot+" tag error":"tag error"}else return/[\'\"]/.test(ot)?(Mt.tokenize=Oe(ot),Mt.stringStartCol=Ze.column(),Mt.tokenize(Ze,Mt)):(Ze.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Oe(Ze){var Mt=function(ot,Ot){for(;!ot.eol();)if(ot.next()==Ze){Ot.tokenize=mt;break}return"string"};return Mt.isInAttribute=!0,Mt}function te(Ze,Mt){return function(ot,Ot){for(;!ot.eol();){if(ot.match(Mt)){Ot.tokenize=at;break}ot.next()}return Ze}}function ee(Ze){return function(Mt,ot){for(var Ot;(Ot=Mt.next())!=null;){if(Ot=="<")return ot.tokenize=ee(Ze+1),ot.tokenize(Mt,ot);if(Ot==">")if(Ze==1){ot.tokenize=at;break}else return ot.tokenize=ee(Ze-1),ot.tokenize(Mt,ot)}return"meta"}}function de(Ze,Mt,ot){this.prev=Ze.context,this.tagName=Mt,this.indent=Ze.indented,this.startOfLine=ot,(Le.doNotIndent.hasOwnProperty(Mt)||Ze.context&&Ze.context.noIndent)&&(this.noIndent=!0)}function se(Ze){Ze.context&&(Ze.context=Ze.context.prev)}function he(Ze,Mt){for(var ot;;){if(!Ze.context||(ot=Ze.context.tagName,!Le.contextGrabbers.hasOwnProperty(ot)||!Le.contextGrabbers[ot].hasOwnProperty(Mt)))return;se(Ze)}}function ve(Ze,Mt,ot){return Ze=="openTag"?(ot.tagStart=Mt.column(),Ee):Ze=="closeTag"?Me:ve}function Ee(Ze,Mt,ot){return Ze=="word"?(ot.tagName=Mt.current(),bt="tag",_e):Le.allowMissingTagName&&Ze=="endTag"?(bt="tag bracket",_e(Ze,Mt,ot)):(bt="error",Ee)}function Me(Ze,Mt,ot){if(Ze=="word"){var Ot=Mt.current();return ot.context&&ot.context.tagName!=Ot&&Le.implicitlyClosed.hasOwnProperty(ot.context.tagName)&&se(ot),ot.context&&ot.context.tagName==Ot||Le.matchClosing===!1?(bt="tag",Be):(bt="tag error",je)}else return Le.allowMissingTagName&&Ze=="endTag"?(bt="tag bracket",Be(Ze,Mt,ot)):(bt="error",je)}function Be(Ze,Mt,ot){return Ze!="endTag"?(bt="error",Be):(se(ot),ve)}function je(Ze,Mt,ot){return bt="error",Be(Ze,Mt,ot)}function _e(Ze,Mt,ot){if(Ze=="word")return bt="attribute",Je;if(Ze=="endTag"||Ze=="selfcloseTag"){var Ot=ot.tagName,Pt=ot.tagStart;return ot.tagName=ot.tagStart=null,Ze=="selfcloseTag"||Le.autoSelfClosers.hasOwnProperty(Ot)?he(ot,Ot):(he(ot,Ot),ot.context=new de(ot,Ot,Pt==ot.indented)),ve}return bt="error",_e}function Je(Ze,Mt,ot){return Ze=="equals"?Xe:(Le.allowMissing||(bt="error"),_e(Ze,Mt,ot))}function Xe(Ze,Mt,ot){return Ze=="string"?ht:Ze=="word"&&Le.allowUnquoted?(bt="string",_e):(bt="error",_e(Ze,Mt,ot))}function ht(Ze,Mt,ot){return Ze=="string"?ht:_e(Ze,Mt,ot)}return{startState:function(Ze){var Mt={tokenize:at,state:ve,indented:Ze||0,tagName:null,tagStart:null,context:null};return Ze!=null&&(Mt.baseIndent=Ze),Mt},token:function(Ze,Mt){if(!Mt.tagName&&Ze.sol()&&(Mt.indented=Ze.indentation()),Ze.eatSpace())return null;Ue=null;var ot=Mt.tokenize(Ze,Mt);return(ot||Ue)&&ot!="comment"&&(bt=null,Mt.state=Mt.state(Ue||ot,Ze,Mt),bt&&(ot=bt=="error"?ot+" error":bt)),ot},indent:function(Ze,Mt,ot){var Ot=Ze.context;if(Ze.tokenize.isInAttribute)return Ze.tagStart==Ze.indented?Ze.stringStartCol+1:Ze.indented+Ve;if(Ot&&Ot.noIndent)return le.Pass;if(Ze.tokenize!=mt&&Ze.tokenize!=at)return ot?ot.match(/^(\s*)/)[0].length:0;if(Ze.tagName)return Le.multilineTagIndentPastTag!==!1?Ze.tagStart+Ze.tagName.length+2:Ze.tagStart+Ve*(Le.multilineTagIndentFactor||1);if(Le.alignCDATA&&/<!\[CDATA\[/.test(Mt))return 0;var Pt=Mt&&/^<(\/)?([\w_:\.-]*)/.exec(Mt);if(Pt&&Pt[1])for(;Ot;)if(Ot.tagName==Pt[2]){Ot=Ot.prev;break}else if(Le.implicitlyClosed.hasOwnProperty(Ot.tagName))Ot=Ot.prev;else break;else if(Pt)for(;Ot;){var Dt=Le.contextGrabbers[Ot.tagName];if(Dt&&Dt.hasOwnProperty(Pt[2]))Ot=Ot.prev;else break}for(;Ot&&Ot.prev&&!Ot.startOfLine;)Ot=Ot.prev;return Ot?Ot.indent+Ve:Ze.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Le.htmlMode?"html":"xml",helperType:Le.htmlMode?"html":"xml",skipAttribute:function(Ze){Ze.state==Xe&&(Ze.state=_e)},xmlCurrentTag:function(Ze){return Ze.tagName?{name:Ze.tagName,close:Ze.type=="closeTag"}:null},xmlCurrentContext:function(Ze){for(var Mt=[],ot=Ze.context;ot;ot=ot.prev)ot.tagName&&Mt.push(ot.tagName);return Mt.reverse()}}}),le.defineMIME("text/xml","xml"),le.defineMIME("application/xml","xml"),le.mimeModes.hasOwnProperty("text/html")||le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},12378:function(Tn,xn,me){"use strict";me.d(xn,{$u:function(){return xt},BD:function(){return Ge},E9:function(){return Ct},FF:function(){return Ci},FJ:function(){return ve},Hn:function(){return he},KX:function(){return Me},NB:function(){return Ft},S0:function(){return St},UL:function(){return Ue},Vk:function(){return se},Vm:function(){return dt},YI:function(){return Zn},ZA:function(){return He},Zt:function(){return bt},al:function(){return xe},bn:function(){return Ne},bx:function(){return be},g2:function(){return li},h1:function(){return Xe},hD:function(){return An},l4:function(){return Ve},rU:function(){return Nt},s_:function(){return Pe},uz:function(){return it},z6:function(){return at}}),Tn=me.hmd(Tn),function(){var De;function Ei(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Pr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ei(a)}}function Ln(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var vi=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Zi;if(typeof Object.setPrototypeOf=="function")Zi=Object.setPrototypeOf;else{var er;e:{var Gn={a:!0},$t={};try{$t.__proto__=Gn,er=$t.a;break e}catch(a){}er=!1}Zi=er?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Gt=Zi;function Zt(a,y){if(a.prototype=vi(y.prototype),a.prototype.constructor=a,Gt)Gt(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 wt=typeof me.g!="undefined"&&me.g!=null?me.g:self,vn=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},cn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function It(a,y){if(y){var x=wt;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&&cn(x,a,{writable:!0,value:y})}}It("Object.assign",function(a){return a||vn}),It("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 ct=typeof globalThis=="object"&&globalThis||typeof me.g=="object"&&me.g.global===me.g&&me.g||typeof self=="object"&&self.self===self&&self||{};ct.requestAnimationFrame===void 0&&(ct.setImmediate===void 0?ct.requestAnimationFrame=function(a){ct.setTimeout(a,0)}:ct.requestAnimationFrame=ct.setImmediate);function an(){}function dn(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&ct.clearTimeout(x),x=ei(function(){x=-1,a.apply(E,b)},y)}}function ei(a,y){return ct.setTimeout(a,y)}function pn(a){return ct.document.createElement(a)}function zt(a){throw Error(a)}function In(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),zt(a)}function Qn(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),zt(x+" is not in the range "+y+": "+a)}function xi(a){ct.console&&ct.console.log(a)}function tn(a){return typeof a=="object"&&a!==null}function fn(a){return Array.isArray(a)||ct.NodeList&&a instanceof ct.NodeList||ct.HTMLCollection&&a instanceof ct.HTMLCollection}function kn(a){return Array.prototype.slice.call(a)}function zi(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):zt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Di(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):zt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Si(){var a=Cr.pop();return a===void 0?[]:a}function Fi(a){a.length=0,Cr.push(a)}function Ti(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(tn(a)&&a.constructor)return Ti(a.constructor);return typeof a}function nr(a){var y=a;return tn(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 $r(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 ci(a,y,x){Object.defineProperty(zo.prototype,a,{get:y,set:x})}function Ki(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 Yr=ct.navigator!==void 0&&0<ct.navigator.userAgent.indexOf("Trident/7"),Qr=ct.navigator!==void 0&&ct.navigator.platform!==void 0&&ct.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Cr=[];Object.freeze([]),an.className="Util",an.Dx="32ab5ff3b26f42dc0ed90f21472913b5",an.adym="gojs.net",an.vfo="28e645fdb266",an.className="Util";function Jt(a,y,x){Do(this),this.j=a,this.xa=y,this.o=x}Jt.prototype.toString=function(){return"EnumValue."+this.xa};function gi(a,y){return y==null||y===""?null:a[y]}wt.Object.defineProperties(Jt.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Jt.className="EnumValue";function mr(){this.ew=[]}mr.prototype.toString=function(){return this.ew.join("")},mr.prototype.add=function(a){a!==""&&this.ew.push(a)},mr.className="StringBuilder";function tr(){}tr.className="PropertyCollection";var Hr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ct.console&&ct.console.log(a)},HA:function(a,y,x,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 Lr(){}Lr.prototype.reset=function(){},Lr.prototype.next=function(){return!1},Lr.prototype.Ad=function(){return!1},Lr.prototype.first=function(){return null},Lr.prototype.any=function(){return!1},Lr.prototype.all=function(){return!0},Lr.prototype.each=function(){return this},Lr.prototype.map=function(){return this},Lr.prototype.filter=function(){return this},Lr.prototype.de=function(){},Lr.prototype.toString=function(){return"EmptyIterator"},wt.Object.defineProperties(Lr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Lr.prototype.first=Lr.prototype.first,Lr.prototype.hasNext=Lr.prototype.Ad,Lr.prototype.next=Lr.prototype.next,Lr.prototype.reset=Lr.prototype.reset;var lo=null;Lr.className="EmptyIterator",lo=new Lr;function Wr(a){this.key=-1,this.value=a}Wr.prototype.reset=function(){this.key=-1},Wr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Wr.prototype.Ad=function(){return this.next()},Wr.prototype.first=function(){return this.key=0,this.value},Wr.prototype.any=function(a){return this.key=-1,a(this.value)},Wr.prototype.all=function(a){return this.key=-1,a(this.value)},Wr.prototype.each=function(a){return this.key=-1,a(this.value),this},Wr.prototype.map=function(a){return new Wr(a(this.value))},Wr.prototype.filter=function(a){return a(this.value)?new Wr(this.value):lo},Wr.prototype.de=function(){this.value=null},Wr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},wt.Object.defineProperties(Wr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Wr.prototype.first=Wr.prototype.first,Wr.prototype.hasNext=Wr.prototype.Ad,Wr.prototype.next=Wr.prototype.next,Wr.prototype.reset=Wr.prototype.reset,Wr.className="SingletonIterator";function jr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}jr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},jr.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},jr.prototype.Ad=function(){return this.next()},jr.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},jr.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},jr.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},jr.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},jr.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 $n,a.s=x,a.xb(),a.iterator},jr.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 $n,a.s=x,a.xb(),a.iterator},jr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},jr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},wt.Object.defineProperties(jr.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}}}),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="ListIterator";function fo(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}fo.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},fo.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)},fo.prototype.Ad=function(){return this.next()},fo.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},fo.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},fo.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},fo.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},fo.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 $n,a.s=x,a.xb(),a.iterator},fo.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 $n,a.s=x,a.xb(),a.iterator},fo.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},fo.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},wt.Object.defineProperties(fo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),fo.prototype.first=fo.prototype.first,fo.prototype.hasNext=fo.prototype.Ad,fo.prototype.next=fo.prototype.next,fo.prototype.reset=fo.prototype.reset,fo.className="ListIteratorBackwards";function $n(a){Do(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}De=$n.prototype,De.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return this._isFrozen=!1,this},De.toString=function(){return"List()#"+Ji(this)},De.add=function(a){return a===null?this:(this._isFrozen&&In(this,a),this.s.push(a),this.xb(),this)},De.push=function(a){this.add(a)},De.addAll=function(a){if(a===null)return this;this._isFrozen&&In(this);var y=this.s;if(fn(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},De.clear=function(){this._isFrozen&&In(this),this.s.length=0,this.xb()},De.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},De.has=function(a){return this.contains(a)},De.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},De.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Qn(a,"0 <= i < length",$n,"elt:i"),y[a]},De.get=function(a){return this.M(a)},De.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Qn(a,"0 <= i < length",$n,"setElt:i"),this._isFrozen&&In(this,a),x[a]=y},De.set=function(a,y){this.cd(a,y)},De.first=function(){var a=this.s;return a.length===0?null:a[0]},De.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},De.pop=function(){this._isFrozen&&In(this);var a=this.s;return 0<a.length?a.pop():null},$n.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},$n.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},$n.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},$n.prototype.map=function(a){for(var y=new $n,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},$n.prototype.filter=function(a){for(var y=new $n,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},De=$n.prototype,De.Gb=function(a,y){0>a&&Qn(a,">= 0",$n,"insertAt:i"),this._isFrozen&&In(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},De.remove=function(a){if(a===null)return!1;this._isFrozen&&In(this,a);var y=this.s;return a=y.indexOf(a),a===-1?!1:(a===y.length-1?y.pop():y.splice(a,1),this.xb(),!0)},De.delete=function(a){return this.remove(a)},De.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Qn(a,"0 <= i < length",$n,"removeAt:i"),this._isFrozen&&In(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},De.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&&In(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},$n.prototype.copy=function(){var a=new $n,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},De=$n.prototype,De.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},De.Iv=function(){for(var a=new Un,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},De.sort=function(a){return this._isFrozen&&In(this),this.s.sort(a),this.xb(),this},De.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&In(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Qn(y,"0 <= from < length",$n,"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},De.reverse=function(){return this._isFrozen&&In(this),this.s.reverse(),this.xb(),this},wt.Object.defineProperties($n.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 lo;var a=this.Sa;return a!==null?(a.reset(),a):new jr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return lo;var a=this.Hg;return a!==null?(a.reset(),a):new fo(this)}}}),$n.prototype.reverse=$n.prototype.reverse,$n.prototype.sortRange=$n.prototype.zi,$n.prototype.sort=$n.prototype.sort,$n.prototype.toSet=$n.prototype.Iv,$n.prototype.toArray=$n.prototype.Fa,$n.prototype.removeRange=$n.prototype.removeRange,$n.prototype.removeAt=$n.prototype.mb,$n.prototype.delete=$n.prototype.delete,$n.prototype.remove=$n.prototype.remove,$n.prototype.insertAt=$n.prototype.Gb,$n.prototype.pop=$n.prototype.pop,$n.prototype.last=$n.prototype.jc,$n.prototype.first=$n.prototype.first,$n.prototype.set=$n.prototype.set,$n.prototype.setElt=$n.prototype.cd,$n.prototype.get=$n.prototype.get,$n.prototype.elt=$n.prototype.M,$n.prototype.indexOf=$n.prototype.indexOf,$n.prototype.has=$n.prototype.has,$n.prototype.contains=$n.prototype.contains,$n.prototype.clear=$n.prototype.clear,$n.prototype.addAll=$n.prototype.addAll,$n.prototype.push=$n.prototype.push,$n.prototype.add=$n.prototype.add,$n.prototype.thaw=$n.prototype.ka,$n.prototype.freeze=$n.prototype.freeze,$n.className="List";function aa(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}aa.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},aa.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)},aa.prototype.Ad=function(){return this.next()},aa.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},aa.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},aa.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},aa.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},aa.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new $n;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},aa.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new $n;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},aa.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},aa.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},wt.Object.defineProperties(aa.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),aa.prototype.first=aa.prototype.first,aa.prototype.hasNext=aa.prototype.Ad,aa.prototype.next=aa.prototype.next,aa.prototype.reset=aa.prototype.reset,aa.className="SetIterator";function Un(a){Do(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}De=Un.prototype,De.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return this._isFrozen=!1,this},De.toString=function(){return"Set()#"+Ji(this)},De.add=function(a){if(a===null)return this;this._isFrozen&&In(this,a);var y=a;return tn(a)&&(y=Ko(a)),this.Tb[y]===void 0&&(this.Sb++,a=new xo(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},De.addAll=function(a){if(a===null)return this;if(this._isFrozen&&In(this),fn(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},De.contains=function(a){if(a===null)return!1;var y=a;return tn(a)&&(y=Ji(a),y===void 0)?!1:this.Tb[y]!==void 0},De.has=function(a){return this.contains(a)},De.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},De.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},De.first=function(){var a=this.ea;return a===null?null:a.value},Un.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Un.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Un.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Un.prototype.map=function(a){for(var y=new Un,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Un.prototype.filter=function(a){for(var y=new Un,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},De=Un.prototype,De.remove=function(a){if(a===null)return!1;this._isFrozen&&In(this,a);var y=a;if(tn(a)&&(y=Ji(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},De.delete=function(a){return this.remove(a)},De.hp=function(a){if(a===null)return this;if(this._isFrozen&&In(this),fn(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},De.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&In(this);var y=new Un;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},De.clear=function(){this._isFrozen&&In(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Un.prototype.copy=function(){var a=new Un,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Un.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},Un.prototype.Hv=function(){var a=new $n,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Do(a){a.__gohashid=la++}function Ko(a){var y=a.__gohashid;return y===void 0&&(y=la++,a.__gohashid=y),y}function Ji(a){return a.__gohashid}wt.Object.defineProperties(Un.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return lo;var a=this.Sa;return a!==null?(a.reset(),a):new aa(this)}}}),Un.prototype.toList=Un.prototype.Hv,Un.prototype.toArray=Un.prototype.Fa,Un.prototype.clear=Un.prototype.clear,Un.prototype.retainAll=Un.prototype.pA,Un.prototype.removeAll=Un.prototype.hp,Un.prototype.delete=Un.prototype.delete,Un.prototype.remove=Un.prototype.remove,Un.prototype.first=Un.prototype.first,Un.prototype.containsAny=Un.prototype.Ty,Un.prototype.containsAll=Un.prototype.Sy,Un.prototype.has=Un.prototype.has,Un.prototype.contains=Un.prototype.contains,Un.prototype.addAll=Un.prototype.addAll,Un.prototype.add=Un.prototype.add,Un.prototype.thaw=Un.prototype.ka,Un.prototype.freeze=Un.prototype.freeze;var la=1;Un.className="Set",Un.uniqueHash=Do,Un.hashIdUnique=Ko,Un.hashId=Ji;function Ro(a){this.ma=a,this.qa=a.Ja,this.sa=null}Ro.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Ro.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=this.key=a=y.key,!0):(this.de(),!1)},Ro.prototype.Ad=function(){return this.next()},Ro.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.value=this.key=a=a.key):null},Ro.prototype.any=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Ro.prototype.all=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Ro.prototype.each=function(a){var y=this.ma;for(this.sa=null,y=y.ea;y!==null;)a(y.key),y=y.va;return this},Ro.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new $n;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Ro.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new $n;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Ro.prototype.de=function(){this.value=this.key=null,this.qa=-1},Ro.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},wt.Object.defineProperties(Ro.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ro.prototype.first=Ro.prototype.first,Ro.prototype.hasNext=Ro.prototype.Ad,Ro.prototype.next=Ro.prototype.next,Ro.prototype.reset=Ro.prototype.reset,Ro.className="MapKeySetIterator";function Nr(a){Un.call(this),Do(this),this._isFrozen=!0,this.ma=a}Zt(Nr,Un),De=Nr.prototype,De.freeze=function(){return this},De.ka=function(){return this},De.toString=function(){return"MapKeySet("+this.ma.toString()+")"},De.add=function(){zt("This Set is read-only: "+this.toString())},De.contains=function(a){return this.ma.contains(a)},De.has=function(a){return this.contains(a)},De.remove=function(){zt("This Set is read-only: "+this.toString())},De.delete=function(a){return this.remove(a)},De.clear=function(){zt("This Set is read-only: "+this.toString())},De.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Nr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Nr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Nr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Nr.prototype.map=function(a){for(var y=new Un,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Nr.prototype.filter=function(a){for(var y=new Un,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Nr.prototype.copy=function(){return new Nr(this.ma)},Nr.prototype.Iv=function(){var a=new Un,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Nr.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},Nr.prototype.Hv=function(){var a=new $n,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},wt.Object.defineProperties(Nr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?lo:new Ro(this.ma)}}}),Nr.prototype.toList=Nr.prototype.Hv,Nr.prototype.toArray=Nr.prototype.Fa,Nr.prototype.toSet=Nr.prototype.Iv,Nr.prototype.first=Nr.prototype.first,Nr.prototype.clear=Nr.prototype.clear,Nr.prototype.delete=Nr.prototype.delete,Nr.prototype.remove=Nr.prototype.remove,Nr.prototype.has=Nr.prototype.has,Nr.prototype.contains=Nr.prototype.contains,Nr.prototype.add=Nr.prototype.add,Nr.prototype.thaw=Nr.prototype.ka,Nr.prototype.freeze=Nr.prototype.freeze,Nr.className="MapKeySet";function Ar(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ar.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ar.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)},Ar.prototype.Ad=function(){return this.next()},Ar.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},Ar.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},Ar.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},Ar.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},Ar.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new $n;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ar.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new $n;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Ar.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ar.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},wt.Object.defineProperties(Ar.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ar.prototype.first=Ar.prototype.first,Ar.prototype.hasNext=Ar.prototype.Ad,Ar.prototype.next=Ar.prototype.next,Ar.prototype.reset=Ar.prototype.reset,Ar.className="MapValueSetIterator";function xo(a,y){this.key=a,this.value=y,this.ll=this.va=null}xo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},xo.className="KeyValuePair";function Wo(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Wo.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Wo.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)},Wo.prototype.Ad=function(){return this.next()},Wo.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},Wo.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},Wo.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},Wo.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},Wo.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new $n;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Wo.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new $n;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Wo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Wo.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},wt.Object.defineProperties(Wo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Wo.prototype.first=Wo.prototype.first,Wo.prototype.hasNext=Wo.prototype.Ad,Wo.prototype.next=Wo.prototype.next,Wo.prototype.reset=Wo.prototype.reset,Wo.className="MapIterator";function Hi(a){Do(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"&&zt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}De=Hi.prototype,De.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return this._isFrozen=!1,this},De.toString=function(){return"Map()#"+Ji(this)},De.add=function(a,y){this._isFrozen&&In(this,a);var x=a;tn(a)&&(x=Ko(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new xo(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},De.set=function(a,y){return this.add(a,y)},De.addAll=function(a){if(a===null)return this;if(fn(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 Hi)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)y=a.value,this.add(y.key,y.value);return this},De.first=function(){return this.ea},Hi.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Hi.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Hi.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Hi.prototype.map=function(a){for(var y=new Hi,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Hi.prototype.filter=function(a){for(var y=new Hi,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},De=Hi.prototype,De.contains=function(a){var y=a;return tn(a)&&(y=Ji(a),y===void 0)?!1:this.Tb[y]!==void 0},De.has=function(a){return this.contains(a)},De.I=function(a){var y=a;return tn(a)&&(y=Ji(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},De.get=function(a){return this.I(a)},De.remove=function(a){if(a===null)return!1;this._isFrozen&&In(this,a);var y=a;if(tn(a)&&(y=Ji(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},De.delete=function(a){return this.remove(a)},De.clear=function(){this._isFrozen&&In(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.jf!==null&&this.jf.reset(),this.kf=this.ea=null,this.xb()},Hi.prototype.copy=function(){var a=new Hi,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Hi.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 xo(b.key,b.value),x++}return y},Hi.prototype.Lf=function(){return new Nr(this)},wt.Object.defineProperties(Hi.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return lo;var a=this.Sa;return a!==null?(a.reset(),a):new Wo(this)}},iteratorKeys:{get:function(){return 0>=this.count?lo:new Ro(this)}},iteratorValues:{get:function(){if(0>=this.count)return lo;var a=this.jf;return a!==null?(a.reset(),a):new Ar(this)}}}),Hi.prototype.toKeySet=Hi.prototype.Lf,Hi.prototype.toArray=Hi.prototype.Fa,Hi.prototype.clear=Hi.prototype.clear,Hi.prototype.delete=Hi.prototype.delete,Hi.prototype.remove=Hi.prototype.remove,Hi.prototype.get=Hi.prototype.get,Hi.prototype.getValue=Hi.prototype.I,Hi.prototype.has=Hi.prototype.has,Hi.prototype.contains=Hi.prototype.contains,Hi.prototype.first=Hi.prototype.first,Hi.prototype.addAll=Hi.prototype.addAll,Hi.prototype.set=Hi.prototype.set,Hi.prototype.add=Hi.prototype.add,Hi.prototype.thaw=Hi.prototype.ka,Hi.prototype.freeze=Hi.prototype.freeze,Hi.className="Map";function st(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):zt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var _o,Ia,Ma,xs,Wa;st.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.h=function(a,y){return this.x=a,this.y=y,this},st.prototype.sg=function(a,y){return this.x=a,this.y=y,this},st.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.copy=function(){var a=new st;return a.x=this.x,a.y=this.y,a},De=st.prototype,De.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},De.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ps(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 st(x,b)}return new st}function Lo(a){return a.x.toString()+" "+a.y.toString()}De.toString=function(){return"Point("+this.x+","+this.y+")"},De.D=function(a){return a instanceof st?this.x===a.x&&this.y===a.y:!1},De.hi=function(a,y){return this.x===a&&this.y===y},De.Xa=function(a){return tt.B(this.x,a.x)&&tt.B(this.y,a.y)},De.add=function(a){return this.x+=a.x,this.y+=a.y,this},De.re=function(a){return this.x-=a.x,this.y-=a.y,this},De.offset=function(a,y){return this.x+=a,this.y+=y,this},st.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},De=st.prototype,De.scale=function(a,y){return this.x*=a,this.y*=y,this},De.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},De.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},De.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},De.ab=function(a){return Po(a.x-this.x,a.y-this.y)},De.direction=function(a,y){return Po(a-this.x,y-this.y)};function Po(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}De.Ry=function(a,y){return tt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},De.fA=function(a,y,x,E){return tt.qh(a,y,x,E,this.x,this.y,this),this},De.gA=function(a,y){return tt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},De.uA=function(a,y,x,E){return tt.No(this.x,this.y,a,y,x,E,this),this},De.vA=function(a,y){return tt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},De.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},De.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},De.transform=function(a){return a.Ga(this),this};function Xr(a,y){return y.Cd(a),a}function ha(a,y,x,E,b,z){var ne=b-x,re=z-E,oe=ne*ne+re*re;x-=a,E-=y;var ue=-x*ne-E*re;return 0>=ue||ue>=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 br(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Ur(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)}De.w=function(){return isFinite(this.x)&&isFinite(this.y)},st.alloc=function(){var a=wo.pop();return a===void 0?new st:a},st.allocAt=function(a,y){var x=wo.pop();return x===void 0?new st(a,y):(x.x=a,x.y=y,x)},st.free=function(a){wo.push(a)},st.prototype.isReal=st.prototype.w,st.prototype.setSpot=st.prototype.yi,st.prototype.setRectSpot=st.prototype.xi,st.prototype.snapToGridPoint=st.prototype.vA,st.prototype.snapToGrid=st.prototype.uA,st.prototype.projectOntoLineSegmentPoint=st.prototype.gA,st.prototype.projectOntoLineSegment=st.prototype.fA,st.intersectingLineSegments=function(a,y,x,E,b,z,ne,re){return tt.Rl(a,y,x,E,b,z,ne,re)},st.prototype.compareWithLineSegmentPoint=st.prototype.Ry,st.compareWithLineSegment=function(a,y,x,E,b,z){return tt.Fl(a,y,x,E,b,z)},st.prototype.direction=st.prototype.direction,st.prototype.directionPoint=st.prototype.ab,st.prototype.normalize=st.prototype.normalize,st.prototype.distanceSquared=st.prototype.zd,st.prototype.distanceSquaredPoint=st.prototype.Bf,st.prototype.scale=st.prototype.scale,st.prototype.rotate=st.prototype.rotate,st.prototype.offset=st.prototype.offset,st.prototype.subtract=st.prototype.re,st.prototype.add=st.prototype.add,st.prototype.equalsApprox=st.prototype.Xa,st.prototype.equalTo=st.prototype.hi,st.prototype.equals=st.prototype.D,st.prototype.set=st.prototype.set,st.prototype.setTo=st.prototype.sg;var wo=[];st.className="Point",st.parse=Ps,st.stringify=Lo,st.distanceLineSegmentSquared=ha,st.distanceSquared=br,st.direction=Ur,st.Origin=_o=new st(0,0).ja(),st.InfiniteTopLeft=Ia=new st(-1/0,-1/0).ja(),st.InfiniteBottomRight=Ma=new st(1/0,1/0).ja(),st.SixPoint=xs=new st(6,6).ja(),st.NoPoint=Wa=new st(NaN,NaN).ja(),st.parse=Ps,st.stringify=Lo,st.distanceLineSegmentSquared=ha,st.distanceSquared=br,st.direction=Ur;function fi(a,y){a===void 0?this.height=this.width=0:typeof a=="number"&&(0<=a||isNaN(a))&&typeof y=="number"&&(0<=y||isNaN(y))?(this.width=a,this.height=y):zt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Ba,Eo,es,fa,va,$a,ms;fi.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},fi.prototype.h=function(a,y){return this.width=a,this.height=y,this},fi.prototype.sg=function(a,y){return this.width=a,this.height=y,this},fi.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},fi.prototype.copy=function(){var a=new fi;return a.width=this.width,a.height=this.height,a},De=fi.prototype,De.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},De.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function fs(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 fi(x,b)}return new fi}function Rs(a){return a.width.toString()+" "+a.height.toString()}De.toString=function(){return"Size("+this.width+","+this.height+")"},De.D=function(a){return a instanceof fi?this.width===a.width&&this.height===a.height:!1},De.hi=function(a,y){return this.width===a&&this.height===y},De.Xa=function(a){return tt.B(this.width,a.width)&&tt.B(this.height,a.height)},De.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},De.w=function(){return isFinite(this.width)&&isFinite(this.height)},fi.alloc=function(){var a=Zs.pop();return a===void 0?new fi:a},fi.free=function(a){Zs.push(a)},fi.prototype.isReal=fi.prototype.w,fi.prototype.inflate=fi.prototype.Bc,fi.prototype.equalsApprox=fi.prototype.Xa,fi.prototype.equalTo=fi.prototype.hi,fi.prototype.equals=fi.prototype.D,fi.prototype.set=fi.prototype.set,fi.prototype.setTo=fi.prototype.sg;var Zs=[];fi.className="Size",fi.parse=fs,fi.stringify=Rs,fi.ZeroSize=Ba=new fi(0,0).ja(),fi.OneSize=Eo=new fi(1,1).ja(),fi.SixSize=es=new fi(6,6).ja(),fi.EightSize=fa=new fi(8,8).ja(),fi.TenSize=va=new fi(10,10).ja(),fi.InfiniteSize=$a=new fi(1/0,1/0).ja(),fi.NoSize=ms=new fi(NaN,NaN).ja(),fi.parse=fs,fi.stringify=Rs;function Bn(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 st?(x=a.x,a=a.y,y instanceof st?(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 fi?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):zt("Incorrect second argument supplied to Rect constructor "+y)):zt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}De=Bn.prototype,De.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},De.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Fs(a,y,x){a.width=y,a.height=x}De.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},De.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},De.dd=function(a){return this.x=a.x,this.y=a.y,this},De.tA=function(a){return this.width=a.width,this.height=a.height,this},Bn.prototype.copy=function(){var a=new Bn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},De=Bn.prototype,De.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},De.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Go(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 Bn(x,b,z,ne)}return new Bn}function kl(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}De.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},De.D=function(a){return a instanceof Bn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},De.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},De.Xa=function(a){return tt.B(this.x,a.x)&&tt.B(this.y,a.y)&&tt.B(this.width,a.width)&&tt.B(this.height,a.height)};function _s(a,y){return tt.$(a.x,y.x)&&tt.$(a.y,y.y)&&tt.$(a.width,y.width)&&tt.$(a.height,y.height)}De.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},De.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},De.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},De.offset=function(a,y){return this.x+=a,this.y+=y,this},De.Bc=function(a,y){return sl(this,y,a,y,a)},De.Co=function(a){return sl(this,a.top,a.right,a.bottom,a.left)},De.Fv=function(a){return sl(this,-a.top,-a.right,-a.bottom,-a.left)},De.Hz=function(a,y,x,E){return sl(this,a,y,x,E)};function sl(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}De.Ex=function(a){return yu(this,a.x,a.y,a.width,a.height)},De.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}De.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},De.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 Kl(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))}De.Ye=function(a){return gs(this,a.x,a.y,0,0)},De.ed=function(a){return gs(this,a.x,a.y,a.width,a.height)},De.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),gs(this,a,y,x,E)};function gs(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}De.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 ya(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 dl(a,y,x,E,b,z,ne,re){return a>ne+b||b>x+a?!1:!(y>re+z||z>E+y)}De.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},De.Mz=function(){return this.width===0&&this.height===0},Bn.alloc=function(){var a=ua.pop();return a===void 0?new Bn:a},Bn.allocAt=function(a,y,x,E){var b=ua.pop();return b===void 0?new Bn(a,y,x,E):b.h(a,y,x,E)},Bn.free=function(a){ua.push(a)},wt.Object.defineProperties(Bn.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new st(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new fi(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new st(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),Bn.prototype.isEmpty=Bn.prototype.Mz,Bn.prototype.isReal=Bn.prototype.w,Bn.intersectsLineSegment=function(a,y,x,E,b,z,ne,re){return tt.Fx(a,y,x,E,b,z,ne,re)},Bn.prototype.setSpot=Bn.prototype.yi,Bn.prototype.union=Bn.prototype.Kv,Bn.prototype.unionRect=Bn.prototype.ed,Bn.prototype.unionPoint=Bn.prototype.Ye,Bn.prototype.intersects=Bn.prototype.Vu,Bn.prototype.intersectsRect=Bn.prototype.Yc,Bn.prototype.intersect=Bn.prototype.Uu,Bn.prototype.intersectRect=Bn.prototype.Ex,Bn.prototype.grow=Bn.prototype.Hz,Bn.prototype.subtractMargin=Bn.prototype.Fv,Bn.prototype.addMargin=Bn.prototype.Co,Bn.prototype.inflate=Bn.prototype.Bc,Bn.prototype.offset=Bn.prototype.offset,Bn.prototype.contains=Bn.prototype.contains,Bn.prototype.containsRect=Bn.prototype.Re,Bn.prototype.containsPoint=Bn.prototype.ca,Bn.prototype.equalsApprox=Bn.prototype.Xa,Bn.prototype.equalTo=Bn.prototype.hi,Bn.prototype.equals=Bn.prototype.D,Bn.prototype.setSize=Bn.prototype.tA,Bn.prototype.setPoint=Bn.prototype.dd,Bn.prototype.set=Bn.prototype.set,Bn.prototype.setTo=Bn.prototype.sg;var Vo=null,Ea=null,ua=[];Bn.className="Rect",Bn.parse=Go,Bn.stringify=kl,Bn.contains=ya,Bn.intersects=dl,Bn.ZeroRect=Vo=new Bn(0,0,0,0).ja(),Bn.NoRect=Ea=new Bn(NaN,NaN,NaN,NaN).ja(),Bn.parse=Go,Bn.stringify=kl,Bn.contains=ya,Bn.intersects=dl;function pr(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):zt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}pr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},pr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},pr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},pr.prototype.copy=function(){var a=new pr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},De=pr.prototype,De.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},De.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function ks(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 pr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new pr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new pr(x,b);for(var ne=NaN;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),isNaN(ne)?new pr(x,b):new pr(x,b,z,ne)}return new pr}function os(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}De.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},De.D=function(a){return a instanceof pr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},De.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},De.Xa=function(a){return tt.B(this.top,a.top)&&tt.B(this.right,a.right)&&tt.B(this.bottom,a.bottom)&&tt.B(this.left,a.left)},De.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},pr.alloc=function(){var a=ou.pop();return a===void 0?new pr:a},pr.free=function(a){ou.push(a)},pr.prototype.isReal=pr.prototype.w,pr.prototype.equalsApprox=pr.prototype.Xa,pr.prototype.equalTo=pr.prototype.hi,pr.prototype.equals=pr.prototype.D,pr.prototype.set=pr.prototype.set,pr.prototype.setTo=pr.prototype.sg;var ll=null,zl=null,ou=[];pr.className="Margin",pr.parse=ks,pr.stringify=os,pr.ZeroMargin=ll=new pr(0,0,0,0).ja(),pr.TwoMargin=zl=new pr(2,2,2,2).ja(),pr.parse=ks,pr.stringify=os;function Qi(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 Ss,Us,Vl,Tl,Ul,Io,ic,Zl,En,Nn,ri,qi,$i,ki,Ri,ii,Li,ur,Zr,ga,Uo,Ua,Ka,No,qr,Bi,eo,Yo,ma,xa,bo,ra,Ao,Or,Aa,Ha;Qi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Qi.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Qi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Qi.prototype.copy=function(){var a=new Qi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},De=Qi.prototype,De.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},De.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this};function La(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function gl(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Ss;if(a==="TopLeft")return Us;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Vl;if(a==="TopRight")return Tl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Ul;if(a==="Center")return Io;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return ic;if(a==="BottomLeft")return Zl;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return En;if(a==="BottomRight")return Nn;if(a==="TopSide")return ri;if(a==="LeftSide")return qi;if(a==="RightSide")return $i;if(a==="BottomSide")return ki;if(a==="TopBottomSides")return Ri;if(a==="LeftRightSides")return ii;if(a==="TopLeftSides")return Li;if(a==="TopRightSides")return ur;if(a==="BottomLeftSides")return Zr;if(a==="BottomRightSides")return ga;if(a==="NotTopSide")return Uo;if(a==="NotLeftSide")return Ua;if(a==="NotRightSide")return Ka;if(a==="NotBottomSide")return No;if(a==="AllSides")return qr;if(a==="Default")return Bi;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 Qi(x,b,z,ne)}return new Qi}function xu(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}De.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(Ss)?"None":this.D(Us)?"TopLeft":this.D(Vl)?"Top":this.D(Tl)?"TopRight":this.D(Ul)?"Left":this.D(Io)?"Center":this.D(ic)?"Right":this.D(Zl)?"BottomLeft":this.D(En)?"Bottom":this.D(Nn)?"BottomRight":this.D(ri)?"TopSide":this.D(qi)?"LeftSide":this.D($i)?"RightSide":this.D(ki)?"BottomSide":this.D(Ri)?"TopBottomSides":this.D(ii)?"LeftRightSides":this.D(Li)?"TopLeftSides":this.D(ur)?"TopRightSides":this.D(Zr)?"BottomLeftSides":this.D(ga)?"BottomRightSides":this.D(Uo)?"NotTopSide":this.D(Ua)?"NotLeftSide":this.D(Ka)?"NotRightSide":this.D(No)?"NotBottomSide":this.D(qr)?"AllSides":this.D(Bi)?"Default":"None"},De.D=function(a){return a instanceof Qi?(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},De.gv=function(){return new Qi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},De.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(eo))a=qi;else if(a.D(Yo))a=$i;else if(a.D(ma))a=ri;else if(a.D(xa))a=ki;else return!1;return a=a.offsetY,(this.offsetY&a)===a},De.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},De.Mc=function(){return isNaN(this.x)||isNaN(this.y)},De.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},De.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},De.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Qi.alloc=function(){var a=en.pop();return a===void 0?new Qi:a},Qi.free=function(a){en.push(a)},Qi.prototype.isDefault=Qi.prototype.Xb,Qi.prototype.isNone=Qi.prototype.ys,Qi.prototype.isSide=Qi.prototype.$c,Qi.prototype.isNoSpot=Qi.prototype.Mc,Qi.prototype.isSpot=Qi.prototype.sb,Qi.prototype.includesSide=Qi.prototype.Hf,Qi.prototype.opposite=Qi.prototype.gv,Qi.prototype.equals=Qi.prototype.D,Qi.prototype.set=Qi.prototype.set,Qi.prototype.setTo=Qi.prototype.sg;var en=[];Qi.className="Spot",Qi.parse=gl,Qi.stringify=xu,Qi.None=Ss=La(new Qi(0,0,0,0),0).ja(),Qi.Default=Bi=La(new Qi(0,0,-1,0),-1).ja(),Qi.TopLeft=Us=new Qi(0,0,0,0).ja(),Qi.TopCenter=Vl=new Qi(.5,0,0,0).ja(),Qi.TopRight=Tl=new Qi(1,0,0,0).ja(),Qi.LeftCenter=Ul=new Qi(0,.5,0,0).ja(),Qi.Center=Io=new Qi(.5,.5,0,0).ja(),Qi.RightCenter=ic=new Qi(1,.5,0,0).ja(),Qi.BottomLeft=Zl=new Qi(0,1,0,0).ja(),Qi.BottomCenter=En=new Qi(.5,1,0,0).ja(),Qi.BottomRight=Nn=new Qi(1,1,0,0).ja(),Qi.MiddleTop=bo=Vl,Qi.MiddleLeft=ra=Ul,Qi.MiddleRight=Ao=ic,Qi.MiddleBottom=Or=En,Qi.Top=ma=Vl,Qi.Left=eo=Ul,Qi.Right=Yo=ic,Qi.Bottom=xa=En,Qi.TopSide=ri=La(new Qi(0,0,1,1),1).ja(),Qi.LeftSide=qi=La(new Qi(0,0,1,2),1).ja(),Qi.RightSide=$i=La(new Qi(0,0,1,4),1).ja(),Qi.BottomSide=ki=La(new Qi(0,0,1,8),1).ja(),Qi.TopBottomSides=Ri=La(new Qi(0,0,1,9),1).ja(),Qi.LeftRightSides=ii=La(new Qi(0,0,1,6),1).ja(),Qi.TopLeftSides=Li=La(new Qi(0,0,1,3),1).ja(),Qi.TopRightSides=ur=La(new Qi(0,0,1,5),1).ja(),Qi.BottomLeftSides=Zr=La(new Qi(0,0,1,10),1).ja(),Qi.BottomRightSides=ga=La(new Qi(0,0,1,12),1).ja(),Qi.NotTopSide=Uo=La(new Qi(0,0,1,14),1).ja(),Qi.NotLeftSide=Ua=La(new Qi(0,0,1,13),1).ja(),Qi.NotRightSide=Ka=La(new Qi(0,0,1,11),1).ja(),Qi.NotBottomSide=No=La(new Qi(0,0,1,7),1).ja(),Qi.AllSides=qr=La(new Qi(0,0,1,15),1).ja(),Aa=new Qi(.156,.156).ja(),Ha=new Qi(.844,.844).ja(),Qi.parse=gl,Qi.stringify=xu;function Xt(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Xt.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},Xt.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},Xt.prototype.copy=function(){var a=new Xt;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},Xt.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Xt.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},Xt.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Xt.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Xt.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},Xt.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},Xt.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},Xt.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},De=Xt.prototype,De.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},De.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},De.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)},De.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))},De.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))},De.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,ue=this.dx,ce=this.dy,pe=y*z+x*re+ue,we=y*ne+x*oe+ce,Fe=E*z+x*re+ue,Ie=E*ne+x*oe+ce;return x=y*z+b*re+ue,y=y*ne+b*oe+ce,z=E*z+b*re+ue,E=E*ne+b*oe+ce,b=Math.min(pe,Fe),pe=Math.max(pe,Fe),Fe=Math.min(we,Ie),we=Math.max(we,Ie),b=Math.min(b,x),pe=Math.max(pe,x),Fe=Math.min(Fe,y),we=Math.max(we,y),b=Math.min(b,z),pe=Math.max(pe,z),Fe=Math.min(Fe,E),we=Math.max(we,E),a.h(b,Fe,pe-b,we-Fe),a},Xt.alloc=function(){var a=On.pop();return a===void 0?new Xt:a},Xt.free=function(a){On.push(a)},Xt.prototype.transformRect=Xt.prototype.pp,Xt.prototype.transformPoint=Xt.prototype.Ga,Xt.prototype.scale=Xt.prototype.scale,Xt.prototype.translate=Xt.prototype.translate,Xt.prototype.rotate=Xt.prototype.rotate,Xt.prototype.invert=Xt.prototype.Vj,Xt.prototype.multiplyInverted=Xt.prototype.bv,Xt.prototype.multiply=Xt.prototype.multiply,Xt.prototype.reset=Xt.prototype.reset,Xt.prototype.isIdentity=Xt.prototype.ws,Xt.prototype.equals=Xt.prototype.D,Xt.prototype.setTransform=Xt.prototype.setTransform,Xt.prototype.set=Xt.prototype.set;var On=[];Xt.className="Transform",Xt.xF="54a702f3e53909c447824c6706603faf4c";var tt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=tt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);tt.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 ue=y,ce=E;else ue=E,ce=y;if(a===x)return ue<=ne&&ne<=ce&&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&&(ce+=b,ue-=b,ue<=ne&&ne<=ce))if(oe-re>ce-ue)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,ue,ce,pe){if(tt.Yb(a,y,ne,re,pe,x,E)&&tt.Yb(a,y,ne,re,pe,b,z))return tt.Yb(a,y,ne,re,pe,ue,ce);var we=(a+x)/2,Fe=(y+E)/2,Ie=(x+b)/2,ze=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(we+Ie)/2,x=(Fe+ze)/2,Ie=(Ie+b)/2,ze=(ze+z)/2;var gt=(E+Ie)/2,nt=(x+ze)/2;return tt.cs(a,y,we,Fe,E,x,gt,nt,oe,ue,ce,pe)||tt.cs(gt,nt,Ie,ze,b,z,ne,re,oe,ue,ce,pe)},ax:function(a,y,x,E,b,z,ne,re,oe){var ue=(x+b)/2,ce=(E+z)/2;return oe.h((((a+x)/2+ue)/2+(ue+(b+ne)/2)/2)/2,(((y+E)/2+ce)/2+(ce+(z+re)/2)/2)/2),oe},My:function(a,y,x,E,b,z,ne,re){var oe=(x+b)/2,ue=(E+z)/2;return Ur(((a+x)/2+oe)/2,((y+E)/2+ue)/2,(oe+(b+ne)/2)/2,(ue+(z+re)/2)/2)},Dl:function(a,y,x,E,b,z,ne,re,oe,ue){if(tt.Yb(a,y,ne,re,oe,x,E)&&tt.Yb(a,y,ne,re,oe,b,z))gs(ue,a,y,0,0),gs(ue,ne,re,0,0);else{var ce=(a+x)/2,pe=(y+E)/2,we=(x+b)/2,Fe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ce+we)/2,x=(pe+Fe)/2,we=(we+b)/2,Fe=(Fe+z)/2;var Ie=(E+we)/2,ze=(x+Fe)/2;tt.Dl(a,y,ce,pe,E,x,Ie,ze,oe,ue),tt.Dl(Ie,ze,we,Fe,b,z,ne,re,oe,ue)}return ue},Qe:function(a,y,x,E,b,z,ne,re,oe,ue){if(tt.Yb(a,y,ne,re,oe,x,E)&&tt.Yb(a,y,ne,re,oe,b,z))ue.length===0&&(ue.push(a),ue.push(y)),ue.push(ne),ue.push(re);else{var ce=(a+x)/2,pe=(y+E)/2,we=(x+b)/2,Fe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ce+we)/2,x=(pe+Fe)/2,we=(we+b)/2,Fe=(Fe+z)/2;var Ie=(E+we)/2,ze=(x+Fe)/2;tt.Qe(a,y,ce,pe,E,x,Ie,ze,oe,ue),tt.Qe(Ie,ze,we,Fe,b,z,ne,re,oe,ue)}return ue},jv:function(a,y,x,E,b,z,ne,re,oe,ue){if(tt.Yb(a,y,b,z,ue,x,E))return tt.Yb(a,y,b,z,ue,re,oe);var ce=(a+x)/2,pe=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var we=(ce+x)/2,Fe=(pe+E)/2;return tt.jv(a,y,ce,pe,we,Fe,ne,re,oe,ue)||tt.jv(we,Fe,x,E,b,z,ne,re,oe,ue)},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(tt.Yb(a,y,b,z,ne,x,E))gs(re,a,y,0,0),gs(re,b,z,0,0);else{var oe=(a+x)/2,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ce=(oe+x)/2,pe=(ue+E)/2;tt.iv(a,y,oe,ue,ce,pe,ne,re),tt.iv(ce,pe,x,E,b,z,ne,re)}return re},ep:function(a,y,x,E,b,z,ne,re){if(tt.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,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ce=(oe+x)/2,pe=(ue+E)/2;tt.ep(a,y,oe,ue,ce,pe,ne,re),tt.ep(ce,pe,x,E,b,z,ne,re)}return re},Eo:function(a,y,x,E,b,z,ne,re,oe,ue,ce,pe,we,Fe){if(tt.Yb(a,y,ne,re,we,x,E)&&tt.Yb(a,y,ne,re,we,b,z))return!tt.Rl(a,y,ne,re,oe,ue,ce,pe)||(we=(a-ne)*(ue-pe)-(y-re)*(oe-ce),we===0)?!1:(Fe.h(((a*re-y*ne)*(oe-ce)-(a-ne)*(oe*pe-ue*ce))/we,((a*re-y*ne)*(ue-pe)-(y-re)*(oe*pe-ue*ce))/we),!0);var Ie=(a+x)/2,ze=(y+E)/2,gt=(x+b)/2,nt=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Ie+gt)/2,x=(ze+nt)/2,gt=(gt+b)/2,nt=(nt+z)/2;var Et=(E+gt)/2,At=(x+nt)/2,Tt=1/0,Vt=!1,mn=0,bi=0;return tt.Eo(a,y,Ie,ze,E,x,Et,At,oe,ue,ce,pe,we,Fe)&&(a=(Fe.x-oe)*(Fe.x-oe)+(Fe.y-ue)*(Fe.y-ue),a<Tt&&(Tt=a,Vt=!0,mn=Fe.x,bi=Fe.y)),tt.Eo(Et,At,gt,nt,b,z,ne,re,oe,ue,ce,pe,we,Fe)&&(Fe.x-oe)*(Fe.x-oe)+(Fe.y-ue)*(Fe.y-ue)<Tt&&(Vt=!0,mn=Fe.x,bi=Fe.y),Vt&&(Fe.x=mn,Fe.y=bi),Vt},Fo:function(a,y,x,E,b,z,ne,re,oe,ue,ce,pe,we){var Fe=0;if(tt.Yb(a,y,ne,re,we,x,E)&&tt.Yb(a,y,ne,re,we,b,z)){if(we=(a-ne)*(ue-pe)-(y-re)*(oe-ce),we===0)return Fe;var Ie=((a*re-y*ne)*(oe-ce)-(a-ne)*(oe*pe-ue*ce))/we,ze=((a*re-y*ne)*(ue-pe)-(y-re)*(oe*pe-ue*ce))/we;if(Ie>=ce)return Fe;if((oe>ce?oe-ce:ce-oe)<(ue>pe?ue-pe:pe-ue)){if(y<re?(oe=y,a=re):(oe=re,a=y),ze<oe||ze>a)return Fe}else if(a<ne?(oe=a,a=ne):oe=ne,Ie<oe||Ie>a)return Fe;0<we?Fe++:0>we&&Fe--}else{Ie=(a+x)/2,ze=(y+E)/2;var gt=(x+b)/2,nt=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Ie+gt)/2,x=(ze+nt)/2,gt=(gt+b)/2,nt=(nt+z)/2;var Et=(E+gt)/2,At=(x+nt)/2;Fe+=tt.Fo(a,y,Ie,ze,E,x,Et,At,oe,ue,ce,pe,we),Fe+=tt.Fo(Et,At,gt,nt,b,z,ne,re,oe,ue,ce,pe,we)}return Fe},qh:function(a,y,x,E,b,z,ne){return tt.$(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)):tt.$(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 tt.B(a,x)&&tt.B(y,E)?(oe.h(a,y),!1):tt.$(b,ne)?tt.$(a,x)?(tt.qh(a,y,x,E,b,z,oe),!1):tt.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,oe):(re=(re-z)/(ne-b),tt.$(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),tt.$(re,ne)?(tt.qh(a,y,x,E,b,z,oe),!1):(b=(ne*a-re*b+z-y)/(ne-re),tt.$(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)):tt.qh(a,y,x,E,b,ne*(b-a)+y,oe))))},MA:function(a,y,x,E,b){return tt.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,ue){function ce(gt,nt){var Et=(gt-a)*(gt-a)+(nt-y)*(nt-y);Et<pe&&(pe=Et,oe.h(gt,nt))}var pe=1/0;ce(oe.x,oe.y);var we=0,Fe=0,Ie=0,ze=0;if(b<ne?(we=b,Fe=ne):(we=ne,Fe=b),z<re?(Ie=b,ze=ne):(Ie=ne,ze=b),we=(Fe-we)/2+ue,ue=(ze-Ie)/2+ue,b=(b+ne)/2,z=(z+re)/2,we===0||ue===0)return oe;if(.5>(x>a?x-a:a-x)){if(we=1-(x-b)*(x-b)/(we*we),0>we)return oe;we=Math.sqrt(we),E=-ue*we+z,ce(x,ue*we+z),ce(x,E)}else{if(x=(E-y)/(x-a),E=1/(we*we)+x*x/(ue*ue),re=2*x*(y-x*a)/(ue*ue)-2*x*z/(ue*ue)-2*b/(we*we),we=re*re-4*E*(2*x*a*z/(ue*ue)-2*y*z/(ue*ue)+z*z/(ue*ue)+b*b/(we*we)-1+(y-x*a)*(y-x*a)/(ue*ue)),0>we)return oe;we=Math.sqrt(we),ue=(-re+we)/(2*E),ce(ue,x*ue-x*a+y),we=(-re-we)/(2*E),ce(we,x*we-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ne,re,oe){var ue=1e21,ce=a,pe=y;if(tt.Ve(a,y,a,E,b,z,ne,re,oe)){var we=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z);we<ue&&(ue=we,ce=oe.x,pe=oe.y)}return tt.Ve(x,y,x,E,b,z,ne,re,oe)&&(we=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),we<ue&&(ue=we,ce=oe.x,pe=oe.y)),tt.Ve(a,y,x,y,b,z,ne,re,oe)&&(y=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),y<ue&&(ue=y,ce=oe.x,pe=oe.y)),tt.Ve(a,E,x,E,b,z,ne,re,oe)&&(a=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),a<ue&&(ue=a,ce=oe.x,pe=oe.y)),oe.h(ce,pe),1e21>ue},us:function(a,y,x){return tt.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,ue=y+E;return b===ne?(z<re?(ne=z,z=re):ne=re,a<=b&&b<=oe&&ne<=ue&&z>=y):z===re?(b<ne?(re=b,b=ne):re=ne,y<=z&&z<=ue&&re<=oe&&b>=a):!!(ya(a,y,x,E,b,z)||ya(a,y,x,E,ne,re)||tt.Rl(a,y,oe,y,b,z,ne,re)||tt.Rl(oe,y,oe,ue,b,z,ne,re)||tt.Rl(oe,ue,a,ue,b,z,ne,re)||tt.Rl(a,ue,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>=tt.Fl(a,y,x,E,b,z)*tt.Fl(a,y,x,E,ne,re)&&0>=tt.Fl(b,z,ne,re,a,y)*tt.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,ue=E;if(E=Math.min(2*ne,Math.abs(b-E)),1e-5>E)return oe=ue+re*Math.min(E,oe),re=a+x*Math.cos(ue),ue=y+x*Math.sin(ue),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(ue+y)/2,z.push([re,ue,x,oe,x,oe,a,y]),z;for(;1e-5<E;)b=ue+re*Math.min(E,oe),z.push(tt.Vy(x,ue,b,a,y)),E-=Math.abs(b-ue),ue=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,ue=ne*ne+oe*oe,ce=ue+ne*ne+oe*re;return ue=4/3*(Math.sqrt(2*ue*ce)-ce)/(ne*re-oe*ne),re=ne-ue*oe,ne=oe+ue*ne,oe=-ne,ue=z+y,z=Math.cos(ue),ue=Math.sin(ue),[E+a*Math.cos(y),b+a*Math.sin(y),E+re*z-ne*ue,b+re*ue+ne*z,E+re*z-oe*ue,b+re*ue+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,ue=ne===0?x:E;return(ne===0?b:z)&&(ue=-ue),ne=re,x=ne===0?x:E,(ne===0?b:z)&&(x=-x),tt.az(oe,ne===0?a:y,ue,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 ue=0;9999999999>ue&&(y=.5*(re+oe),!(y===re||y===oe));++ue){var ce=a/(y+b),pe=ne/(y+z);if(ce=ce*ce+pe*pe-1,0<ce)re=y;else if(0>ce)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 tr,um:new tr,Mf:new tr,Nf:0,vm:100};tt.za=tt.AA;function nn(a){Do(this),this.l=2,a===void 0&&(a=nn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===nn.o?this.ee=new $n:(nn.V===null&&(nn.V=new $n().freeze()),this.ee=nn.V),this.aq=this.ee.Ja,this.Ip=new Bn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Us,this.gg=Nn,this.Rk=this.Sk=NaN,this.Uf=oi}nn.prototype.copy=function(){var a=new nn;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===nn.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},nn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},nn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==nn.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},nn.prototype.ka=function(){if(Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==nn.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},nn.prototype.Xa=function(a){if(!(a instanceof nn))return!1;if(this.type!==a.type)return this.type===nn.j&&a.type===nn.o?sr(this,a):a.type===nn.j&&this.type===nn.o?sr(a,this):!1;if(this.type===nn.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 tt.B(this.startX,a.startX)&&tt.B(this.startY,a.startY)&&tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY)};function sr(a,y){return a.type!==nn.j||y.type!==nn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&tt.B(a.startX,y.startX)&&tt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ii&&tt.B(a.endX,y.endX)&&tt.B(a.endY,y.endY))))}nn.ia=function(a){return a.toString()},nn.prototype.qb=function(a){a.classType===nn&&(this.type=a)},nn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case nn.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 nn.u:var y=new Bn(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case nn.F:if(y=new Bn(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case nn.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()}},nn.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},nn.parse=function(a,y){function x(){return ze>=Tt-1?!0:ue[ze+1].match(Vt)!==null}function E(){return ze++,ue[ze]}function b(so){var Vr=parseFloat(E()),Fa=parseFloat(E());gt===gt.toLowerCase()&&(Vr=At.x+Vr,Fa=At.y+Fa),so.h(Vr,Fa)}function z(){return b(At),At}function ne(){return b(Et),Et}function re(){var so=nt.toLowerCase();return so!=="c"&&so!=="s"&&so!=="q"&&so!=="t"?At:new st(2*At.x-Et.x,2*At.y-Et.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 ue=a.split(" ");for(a=0;a<ue.length;a++){var ce=ue[a];if(ce.match(/(\.[0-9]*)(\.)/gm)!==null){oe=Si();for(var pe="",we=!1,Fe=0;Fe<ce.length;Fe++){var Ie=ce[Fe];Ie!=="."||we?Ie==="."?(oe.push(pe),pe="."):pe+=Ie:(we=!0,pe+=Ie)}for(oe.push(pe),ue.splice(a,1),ce=0;ce<oe.length;ce++)ue.splice(a+ce,0,oe[ce]);a+=oe.length-1,Fi(oe)}}var ze=-1,gt="",nt="";oe=new st(0,0);var Et=new st(0,0),At=new st(0,0),Tt=ue.length;a=A1(null),we=pe=ce=!1,Fe=!0,Ie=null;for(var Vt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(ze>=Tt-1);)if(nt=gt,gt=E(),gt!=="")switch(gt.toUpperCase()){case"X":Fe=!0,pe=ce=!1;break;case"M":for(Ie=z(),a.mc===null||Fe===!0?(pp(a,Ie.x,Ie.y,ce,!pe,we),Fe=!1):a.moveTo(Ie.x,Ie.y),oe.assign(At);!x();)Ie=z(),a.lineTo(Ie.x,Ie.y);break;case"L":for(;!x();)Ie=z(),a.lineTo(Ie.x,Ie.y);break;case"H":for(;!x();)At=new st((gt===gt.toLowerCase()?At.x:0)+parseFloat(E()),At.y),a.lineTo(At.x,At.y);break;case"V":for(;!x();)At=new st(At.x,(gt===gt.toLowerCase()?At.y:0)+parseFloat(E())),a.lineTo(At.x,At.y);break;case"C":for(;!x();){Ie=new st,b(Ie);var mn=ne(),bi=z();Kh(a,Ie.x,Ie.y,mn.x,mn.y,bi.x,bi.y)}break;case"S":for(;!x();)Ie=re(),mn=ne(),bi=z(),Kh(a,Ie.x,Ie.y,mn.x,mn.y,bi.x,bi.y);break;case"Q":for(;!x();)Ie=ne(),mn=z(),u0(a,Ie.x,Ie.y,mn.x,mn.y);break;case"T":for(;!x();)Et=Ie=re(),mn=z(),u0(a,Ie.x,Ie.y,mn.x,mn.y);break;case"B":for(;!x();){Ie=parseFloat(E()),mn=parseFloat(E()),bi=parseFloat(E());var Yi=parseFloat(E()),Gi=parseFloat(E()),di=Gi,qn=!1;x()||(di=parseFloat(E()),x()||(qn=parseFloat(E())!==0)),gt===gt.toLowerCase()&&(bi+=At.x,Yi+=At.y),a.arcTo(Ie,mn,bi,Yi,Gi,di,qn)}break;case"A":for(;!x();)Ie=Math.abs(parseFloat(E())),mn=Math.abs(parseFloat(E())),bi=parseFloat(E()),Gi=Yi=!1,qn=di=0,di=E(),di.length===1?(Yi=!!parseFloat(di),Gi=!!parseFloat(E()),di=parseFloat(E())):di.length===2?(Yi=!!parseFloat(di[0]),Gi=!!parseFloat(di[1]),di=parseFloat(E())):(Yi=!!parseFloat(di[0]),Gi=!!parseFloat(di[1]),di=parseFloat(di.slice(2))),qn=parseFloat(E()),gt===gt.toLowerCase()&&(di=At.x+di,qn=At.y+qn),At.h(di,qn),wS(a,Ie,mn,bi,Yi,Gi,di,qn);break;case"Z":PS(a),At.assign(oe);break;case"F":for(Ie="",mn=1;ue[ze+mn];)if(ue[ze+mn]==="0")we=!0,mn++;else if(ue[ze+mn].match(/[Uu]/)!==null)mn++;else if(ue[ze+mn].match(Vt)===null)mn++;else{Ie=ue[ze+mn];break}Ie.match(/[Mm]/)?ce=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Ie="",mn=1;ue[ze+mn];)if(ue[ze+mn].match(/[Ff]/)!==null)mn++;else if(ue[ze+mn].match(Vt)===null)mn++;else{Ie=ue[ze+mn];break}Ie.match(/[Mm]/)?pe=!0:a.mc.isShadowed=!1}if(oe=a.os,c0=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},nn.Ha=function(a,y){for(var x=a.length,E=st.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}st.free(E)},nn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===nn.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},nn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===nn.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),kr(this,a,!1),gs(a,0,0,0,0),a.freeze()},nn.prototype.ix=function(){var a=new Bn;return kr(this,a,!0),a};function kr(a,y,x){switch(a.type){case nn.j:case nn.u:case nn.F:x?y.h(a.od,a.pd,0,0):gs(y,a.od,a.pd,0,0),gs(y,a.Dc,a.Ec,0,0);break;case nn.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):gs(y,z.startX,z.startY,0,0);for(var ne=z.segments.s,re=ne.length,oe=z.startX,ue=z.startY,ce=0;ce<re;ce++){var pe=ne[ce];switch(pe.type){case Ii:case _i:oe=pe.endX,ue=pe.endY,gs(y,oe,ue,0,0);break;case Gr:tt.Dl(oe,ue,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.5,y),oe=pe.endX,ue=pe.endY;break;case Zo:tt.iv(oe,ue,pe.point1X,pe.point1Y,pe.endX,pe.endY,.5,y),oe=pe.endX,ue=pe.endY;break;case Fr:case Er:var we=pe.type===Fr?vr(pe,z):xr(pe,z,oe,ue),Fe=we.length;if(Fe===0){oe=pe.type===Fr?pe.centerX:pe.endX,ue=pe.type===Fr?pe.centerY:pe.endY,gs(y,oe,ue,0,0);break}pe=null;for(var Ie=0;Ie<Fe;Ie++)pe=we[Ie],tt.Dl(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.5,y);pe!==null&&(oe=pe[6],ue=pe[7]);break;default:zt("Unknown Segment type: "+pe.type)}}}break;default:zt("Unknown Geometry type: "+a.type)}}nn.prototype.normalize=function(){this._isFrozen&&In(this);var a=this.ix();return this.offset(-a.x,-a.y),new st(-a.x,-a.y)},nn.prototype.offset=function(a,y){return this._isFrozen&&In(this),this.transform(1,0,0,1,a,y),this},nn.prototype.scale=function(a,y){return this._isFrozen&&In(this),this.transform(a,0,0,y,0,0),this},nn.prototype.rotate=function(a,y,x){this._isFrozen&&In(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Xt.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Xt.free(E),this},De=nn.prototype,De.transform=function(a,y,x,E,b,z){switch(this.type){case nn.j:case nn.u:case nn.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 nn.o:for(var oe=this.figures.s,ue=oe.length,ce=0;ce<ue;ce++){var pe=oe[ce];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 we=pe.length,Fe=0;Fe<we;Fe++){var Ie=pe[Fe];switch(Ie.type){case Ii:case _i:ne=Ie.endX,re=Ie.endY,Ie.endX=ne*a+re*x+b,Ie.endY=ne*y+re*E+z;break;case Gr:ne=Ie.point1X,re=Ie.point1Y,Ie.point1X=ne*a+re*x+b,Ie.point1Y=ne*y+re*E+z,ne=Ie.point2X,re=Ie.point2Y,Ie.point2X=ne*a+re*x+b,Ie.point2Y=ne*y+re*E+z,ne=Ie.endX,re=Ie.endY,Ie.endX=ne*a+re*x+b,Ie.endY=ne*y+re*E+z;break;case Zo:ne=Ie.point1X,re=Ie.point1Y,Ie.point1X=ne*a+re*x+b,Ie.point1Y=ne*y+re*E+z,ne=Ie.endX,re=Ie.endY,Ie.endX=ne*a+re*x+b,Ie.endY=ne*y+re*E+z;break;case Fr:ne=Ie.centerX,re=Ie.centerY,Ie.centerX=ne*a+re*x+b,Ie.centerY=ne*y+re*E+z,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Ie.startAngle+=ne),0>a&&(Ie.startAngle=180-Ie.startAngle,Ie.sweepAngle=-Ie.sweepAngle),0>E&&(Ie.startAngle=-Ie.startAngle,Ie.sweepAngle=-Ie.sweepAngle),Ie.radiusX*=Math.sqrt(a*a+x*x),Ie.radiusY!==void 0&&(Ie.radiusY*=Math.sqrt(y*y+E*E));break;case Er:if(ne=Ie.endX,re=Ie.endY,Ie.endX=ne*a+re*x+b,Ie.endY=ne*y+re*E+z,Ie.radiusX===0||Ie.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Ie.xAxisRotation+=ne),0>a&&(Ie.xAxisRotation=180-Ie.xAxisRotation,Ie.isClockwiseArc=!Ie.isClockwiseArc),0>E&&(Ie.xAxisRotation=-Ie.xAxisRotation,Ie.isClockwiseArc=!Ie.isClockwiseArc),Ie.radiusX*=Math.sqrt(a*a+x*x),Ie.radiusY*=Math.sqrt(y*y+E*E);break;default:zt("Unknown Segment type: "+Ie.type)}}}}return this._isInvalidBounds=!0,this},De.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 nn.j:return tt.Yb(x,E,b,z,y,a.x,a.y);case nn.u:var ne=Bn.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),Bn.free(ne),a;case nn.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 nn.o:return yr(this,a,y,!0,!1);default:return!1}};function yr(a,y,x,E,b){var z=y.x;y=y.y;for(var ne=a.bounds.x-20,re=0,oe,ue,ce,pe,we=a.figures.s,Fe=we.length,Ie=0;Ie<Fe;Ie++){var ze=we[Ie],gt=!ze.isEvenOdd;if(ze.isFilled){if(E&&ze.ca(z,y,x))return!0;var nt=ze.segments;oe=ze.startX,ue=ze.startY;for(var Et=oe,At=ue,Tt=nt.s,Vt=0;Vt<=nt.length;Vt++){var mn=void 0;if(Vt!==nt.length){mn=Tt[Vt];var bi=mn.type;a=mn.endX,pe=mn.endY}else bi=Ii,a=Et,pe=At;switch(bi){case _i:if(Et=lr(z,y,ne,y,oe,ue,Et,At),isNaN(Et))return!0;re+=Et,Et=a,At=pe;break;case Ii:if(oe=lr(z,y,ne,y,oe,ue,a,pe),isNaN(oe))return!0;re+=oe;break;case Gr:ce=tt.Fo(oe,ue,mn.point1X,mn.point1Y,mn.point2X,mn.point2Y,a,pe,ne,y,z,y,.5),re+=ce;break;case Zo:ce=tt.Fo(oe,ue,(oe+2*mn.point1X)/3,(ue+2*mn.point1Y)/3,(2*mn.point1X+a)/3,(2*mn.point1Y+pe)/3,a,pe,ne,y,z,y,.5),re+=ce;break;case Fr:case Er:bi=mn.type===Fr?vr(mn,ze):xr(mn,ze,oe,ue);var Yi=bi.length;if(Yi===0){if(oe=lr(z,y,ne,y,oe,ue,mn.type===Fr?mn.centerX:mn.endX,mn.type===Fr?mn.centerY:mn.endY),isNaN(oe))return!0;re+=oe;break}mn=null;for(var Gi=0;Gi<Yi;Gi++){if(mn=bi[Gi],Gi===0){if(ce=lr(z,y,ne,y,oe,ue,mn[0],mn[1]),isNaN(ce))return!0;re+=ce}ce=tt.Fo(mn[0],mn[1],mn[2],mn[3],mn[4],mn[5],mn[6],mn[7],ne,y,z,y,.5),re+=ce}mn!==null&&(a=mn[6],pe=mn[7]);break;default:zt("Unknown Segment type: "+mn.type)}oe=a,ue=pe}if(gt){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(ze.ca(z,y,b?x:x+2))return!0}return!1}function lr(a,y,x,E,b,z,ne,re){if(tt.Yb(b,z,ne,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var ue=((a*E-y*x)*(b-ne)-(a-x)*(b*re-z*ne))/oe;if(y=(a*E-y*x)*(z-re)/oe,ue>=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(ue<b||ue>ne)return 0}else if(ue<ne||ue>b)return 0;return 0<oe?1:-1}function Mi(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}De.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new st),this.type===nn.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],ue=oe.length;for(a=0;a<ue;a++){var ce=oe[a];if(ne+ce>=z)return E=z-ne,E=ce===0?0:E/ce,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+=ce}}return y},De.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===nn.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 ue=re[a];if(z+ue>=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+=ue}}return NaN},De.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===nn.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],ue=oe.length;for(a=0;a<ue;a++){var ce=oe[a];if(ne+ce>=z)return E=z-ne,E=ce===0?0:E/ce,ce=x[re],x=ce[2*a],re=ce[2*a+1],b=ce[2*a+2],a=ce[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+=ce}}return y},De.xx=function(a){if(this.type===nn.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=st.alloc();return tt.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,st.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ne)}}else if(this.type===nn.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 ue=Math.min(ne,oe,re,b);if(ue===re)return E/z;if(ue===oe)return(y+a)/z;if(ue===b)return(2*y+x-E)/z;if(ue===ne)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=st.alloc(),b=1/0,re=ne=0,oe=y.length;for(var ce=ue=0,pe=0;pe<oe;pe++)for(var we=y[pe],Fe=x[pe],Ie=we.length,ze=0;ze<Ie;ze+=2){var gt=we[ze],nt=we[ze+1];if(ze!==0){tt.qh(ue,ce,gt,nt,a.x,a.y,E);var Et=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);Et<b&&(b=Et,ne=re,ne+=Math.sqrt((E.x-ue)*(E.x-ue)+(E.y-ce)*(E.y-ce))),re+=Fe[(ze-2)/2]}ue=gt,ce=nt}return st.free(E),a=ne/z,0>a?0:1<a?1:a}return 0};function wr(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===nn.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===nn.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===nn.F){var z=new yo;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ne=new fr(Fr);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=vr(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];tt.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(to(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 ue=b.segments.s,ce=ue.length,pe=0;pe<ce;pe++){var we=ue[pe];switch(we.type){case _i:4<=E.length&&(y.push(E),x.push(to(E))),E=[],E.push(we.endX),E.push(we.endY),ne=we.endX,z=we.endY,re=ne,oe=z;break;case Ii:E.push(we.endX),E.push(we.endY),ne=we.endX,z=we.endY;break;case Gr:tt.Qe(ne,z,we.point1X,we.point1Y,we.point2X,we.point2Y,we.endX,we.endY,.5,E),ne=we.endX,z=we.endY;break;case Zo:tt.ep(ne,z,we.point1X,we.point1Y,we.endX,we.endY,.5,E),ne=we.endX,z=we.endY;break;case Fr:var Fe=vr(we,b),Ie=Fe.length;if(Ie===0){E.push(we.centerX),E.push(we.centerY),ne=we.centerX,z=we.centerY;break}for(var ze=0;ze<Ie;ze++){var gt=Fe[ze];tt.Qe(ne,z,gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],.5,E),ne=gt[6],z=gt[7]}break;case Er:if(Fe=xr(we,b,ne,z),Ie=Fe.length,ze=we.endX,gt=we.endY,Ie===0){E.push(ze),E.push(gt),ne=ze,z=gt;break}for(ze=0;ze<Ie;ze++)gt=Fe[ze],tt.Qe(ne,z,gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],.5,E),ne=gt[6],z=gt[7];break;default:zt("Segment not of valid type: "+we.type)}we.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(to(E)))}}}function to(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(br(x,E,ne,re))),x=ne,E=re}return y}De.add=function(a){return this.ee.add(a),this},De.pm=function(a,y,x,E,b,z,ne,re){return this._isFrozen&&In(this),this.fg=new Qi(a,y,b,z).freeze(),this.gg=new Qi(x,E,ne,re).freeze(),this},wt.Object.defineProperties(nn.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 wr(this),this.tk}},flattenedLengths:{get:function(){return wr(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===nn.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===nn.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&&In(this,a),this.na=a,a===nn.o?this.ee=new $n:(nn.V===null&&(nn.V=new $n().freeze()),this.ee=nn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&In(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&In(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&In(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&In(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&In(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&In(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&In(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&In(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),nn.prototype.setSpots=nn.prototype.pm,nn.prototype.add=nn.prototype.add,nn.prototype.getFractionForPoint=nn.prototype.xx,nn.prototype.getPointAndAngleAlongPath=nn.prototype.Qu,nn.prototype.getAngleAlongPath=nn.prototype.wx,nn.prototype.getPointAlongPath=nn.prototype.Pu,nn.prototype.containsPoint=nn.prototype.ca,nn.prototype.transform=nn.prototype.transform,nn.prototype.rotate=nn.prototype.rotate,nn.prototype.scale=nn.prototype.scale,nn.prototype.offset=nn.prototype.offset,nn.prototype.normalize=nn.prototype.normalize,nn.prototype.computeBoundsWithoutOrigin=nn.prototype.ix,nn.prototype.equalsApprox=nn.prototype.Xa,nn.className="Geometry",nn.j=new Jt(nn,"Line",0),nn.u=new Jt(nn,"Rectangle",1),nn.F=new Jt(nn,"Ellipse",2),nn.o=new Jt(nn,"Path",3),nn.V=null,nn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",nn.className="Geometry",nn.stringify=nn.ia,nn.fillPath=nn.nb,nn.parse=nn.parse,nn.Line=nn.j,nn.Rectangle=nn.u,nn.Ellipse=nn.F,nn.Path=nn.o;function yo(a,y,x,E,b){Do(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 $n,this.sr=this.pl.Ja,this.fw=null}yo.prototype.copy=function(){var a=new yo;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},De=yo.prototype,De.Xa=function(a){if(!(a instanceof yo&&tt.B(this.startX,a.startX)&&tt.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},De.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},De.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},De.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},De.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},De.add=function(a){return this.pl.add(a),this},De.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,ne=b,re=this.segments.s,oe=re.length,ue=0;ue<oe;ue++){var ce=re[ue];switch(ce.type){case _i:z=ce.endX,ne=ce.endY,E=ce.endX,b=ce.endY;break;case Ii:if(tt.Yb(E,b,ce.endX,ce.endY,x,a,y))return!0;E=ce.endX,b=ce.endY;break;case Gr:if(tt.cs(E,b,ce.point1X,ce.point1Y,ce.point2X,ce.point2Y,ce.endX,ce.endY,.5,a,y,x))return!0;E=ce.endX,b=ce.endY;break;case Zo:if(tt.jv(E,b,ce.point1X,ce.point1Y,ce.endX,ce.endY,.5,a,y,x))return!0;E=ce.endX,b=ce.endY;break;case Fr:case Er:var pe=ce.type===Fr?vr(ce,this):xr(ce,this,E,b),we=pe.length,Fe=ce.type===Fr?ce.centerX:ce.endX,Ie=ce.type===Fr?ce.centerY:ce.endY;if(we===0){if(tt.Yb(E,b,Fe,Ie,x,a,y))return!0;E=Fe,b=Ie;break}for(Fe=null,Ie=0;Ie<we;Ie++)if(Fe=pe[Ie],Ie===0&&tt.Yb(E,b,Fe[0],Fe[1],x,a,y)||tt.cs(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6],Fe[7],.5,a,y,x))return!0;Fe!==null&&(E=Fe[6],b=Fe[7]);break;default:zt("Unknown Segment type: "+ce.type)}if(ce.isClosed&&(E!==z||b!==ne)&&tt.Yb(E,b,z,ne,x,a,y))return!0}return!1},wt.Object.defineProperties(yo.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isFilled:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&In(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&In(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&In(this,a),this.pl=a,this._isInvalidBounds=!0}}}),yo.prototype.add=yo.prototype.add,yo.prototype.equalsApprox=yo.prototype.Xa,yo.className="PathFigure";function fr(a,y,x,E,b,z,ne,re){Do(this),a===void 0&&(a=Ii),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===Er?(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===Fr&&(z=Math.max(z,0)),this.Wh=z,typeof ne=="number"?(a===Fr&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}fr.prototype.copy=function(){var a=new fr;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},De=fr.prototype,De.Xa=function(a){if(!(a instanceof fr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case _i:case Ii:return tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY);case Gr:return tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY)&&tt.B(this.point1X,a.point1X)&&tt.B(this.point1Y,a.point1Y)&&tt.B(this.point2X,a.point2X)&&tt.B(this.point2Y,a.point2Y);case Zo:return tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY)&&tt.B(this.point1X,a.point1X)&&tt.B(this.point1Y,a.point1Y);case Fr:return tt.B(this.startAngle,a.startAngle)&&tt.B(this.sweepAngle,a.sweepAngle)&&tt.B(this.centerX,a.centerX)&&tt.B(this.centerY,a.centerY)&&tt.B(this.radiusX,a.radiusX)&&tt.B(this.radiusY,a.radiusY);case Er:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&tt.B(this.xAxisRotation,a.xAxisRotation)&&tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY)&&tt.B(this.radiusX,a.radiusX)&&tt.B(this.radiusY,a.radiusY);default:return!1}},De.qb=function(a){a.classType===fr&&(this.type=a)},De.toString=function(a){switch(a===void 0&&(a=-1),this.type){case _i:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ii:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Gr: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 Zo: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 Fr: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 Er: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":"")},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return this._isFrozen=!1,this},De.close=function(){return this.isClosed=!0,this};function vr(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=tt.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var ne=Xt.alloc();ne.reset(),x<E?ne.scale(1,E/x):ne.scale(x/E,1),nn.Ha(z,ne),Xt.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 xr(a,y,x,E){function b(ze,gt,nt,Et){return(ze*Et<gt*nt?-1:1)*Math.acos((ze*nt+gt*Et)/(Math.sqrt(ze*ze+gt*gt)*Math.sqrt(nt*nt+Et*Et)))}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,ue=a.Dc,ce=a.Ec,pe=Math.cos(ne),we=Math.sin(ne),Fe=pe*(x-ue)/2+we*(E-ce)/2;ne=-we*(x-ue)/2+pe*(E-ce)/2;var Ie=Fe*Fe/(y*y)+ne*ne/(z*z);return 1<Ie&&(y*=Math.sqrt(Ie),z*=Math.sqrt(Ie)),Ie=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ne*ne-z*z*Fe*Fe)/(y*y*ne*ne+z*z*Fe*Fe)),isNaN(Ie)&&(Ie=0),re=Ie*y*ne/z,Ie=Ie*-z*Fe/y,isNaN(re)&&(re=0),isNaN(Ie)&&(Ie=0),x=(x+ue)/2+pe*re-we*Ie,E=(E+ce)/2+we*re+pe*Ie,ce=b(1,0,(Fe-re)/y,(ne-Ie)/z),pe=(Fe-re)/y,ue=(ne-Ie)/z,Fe=(-Fe-re)/y,re=(-ne-Ie)/z,ne=b(pe,ue,Fe,re),Fe=(pe*Fe+ue*re)/(Math.sqrt(pe*pe+ue*ue)*Math.sqrt(Fe*Fe+re*re)),-1>=Fe?ne=Math.PI:1<=Fe&&(ne=0),!oe&&0<ne&&(ne-=2*Math.PI),oe&&0>ne&&(ne+=2*Math.PI),oe=y>z?1:y/z,Fe=y>z?z/y:1,y=tt.jx(0,0,y>z?y:z,ce,ce+ne,!0),z=Xt.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,Fe),nn.Ha(y,z),Xt.free(z),a.ae=y,a.ae}wt.Object.defineProperties(fr.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},isClosed:{get:function(){return(this.l&8)!==0},set:function(a){this.isClosed!==a&&(this.l=a?this.l|8:this.l&-9,this._isInvalidBounds=!0)}},type:{get:function(){return this.na},set:function(a){this._isFrozen&&In(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&In(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&In(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&In(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&In(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&In(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&In(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&In(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&In(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Qn(a,">= zero",fr,"radiusX"),this._isFrozen&&In(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Qn(a,">= zero",fr,"radiusY"),this._isFrozen&&In(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&In(this,a),a%=360,0>a&&(a+=360),this.Dc=a,this._isInvalidBounds=!0}},sweepAngle:{get:function(){return this.Ec},set:function(a){this._isFrozen&&In(this,a),360<a&&(a=360),-360>a&&(a=-360),this.Ec=a,this._isInvalidBounds=!0}},isClockwiseArc:{get:function(){return(this.l&4)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|4:this.l&-5,this._isInvalidBounds=!0}},isLargeArc:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&In(this,a),this.l=a?this.l|16:this.l&-17,this._isInvalidBounds=!0}},xAxisRotation:{get:function(){return this.Ne},set:function(a){this._isFrozen&&In(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),fr.prototype.equalsApprox=fr.prototype.Xa;var _i=new Jt(fr,"Move",0),Ii=new Jt(fr,"Line",1),Gr=new Jt(fr,"Bezier",2),Zo=new Jt(fr,"QuadraticBezier",3),Fr=new Jt(fr,"Arc",4),Er=new Jt(fr,"SvgArc",4);fr.className="PathSegment",fr.Move=_i,fr.Line=Ii,fr.Bezier=Gr,fr.QuadraticBezier=Zo,fr.Arc=Fr,fr.SvgArc=Er;function Tr(){this.H=null,this.xu=new st(0,0).freeze(),this.mt=new st(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}Tr.prototype.copy=function(){var a=new Tr;return this.clone(a)},Tr.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},Tr.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},Tr.prototype.So=function(a,y){var x=this.diagram;return x===null||ph(x,a,y),y},Tr.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(ph(x,a,y),y.assign(x.Ps(y))),y},wt.Object.defineProperties(Tr.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}}}),Tr.prototype.getMultiTouchDocumentPoint=Tr.prototype.Bz,Tr.prototype.getMultiTouchViewPoint=Tr.prototype.So,Tr.className="InputEvent";function Rr(){this.H=null,this.xa="",this.ar=this.Lr=null}Rr.prototype.copy=function(){var a=new Rr;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Rr.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},wt.Object.defineProperties(Rr.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}}}),Rr.className="DiagramEvent";function gr(){this.Fm=jo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}gr.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},gr.prototype.copy=function(){var a=new gr;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=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=tn(y)&&typeof y.J=="function"?y.J():y,a},gr.prototype.qb=function(a){a.classType===gr&&(this.change=a)},gr.prototype.toString=function(){var a="";return a=this.change===Na?a+"* ":this.change===jo?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===Na?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=nr(this.object)),this.oldValue!==null&&(a+=" old: "+nr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+nr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},gr.prototype.I=function(a){return a?this.oldValue:this.newValue},gr.prototype.Dz=function(a){return a?this.oldParam:this.newParam},gr.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},gr.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},gr.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},gr.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},wt.Object.defineProperties(gr.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===Na&&(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}}}),gr.prototype.redo=gr.prototype.redo,gr.prototype.canRedo=gr.prototype.canRedo,gr.prototype.undo=gr.prototype.undo,gr.prototype.canUndo=gr.prototype.canUndo,gr.prototype.getParam=gr.prototype.Dz,gr.prototype.getValue=gr.prototype.I,gr.prototype.clear=gr.prototype.clear;var Na=new Jt(gr,"Transaction",-1),jo=new Jt(gr,"Property",0),Sa=new Jt(gr,"Insert",1),Ga=new Jt(gr,"Remove",2);gr.className="ChangedEvent",gr.Transaction=Na,gr.Property=jo,gr.Insert=Sa,gr.Remove=Ga;function So(){this.o=new $n().freeze(),this.xa="",this.j=!1}So.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},So.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()},So.prototype.canUndo=function(){return this.isComplete},So.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()}},So.prototype.canRedo=function(){return this.isComplete},So.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()}},So.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Hi,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===jo&&E.object){var b=y.get(E.object);b||(b=new Hi,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()}},wt.Object.defineProperties(So.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}}}),So.prototype.optimize=So.prototype.ak,So.prototype.redo=So.prototype.redo,So.prototype.canRedo=So.prototype.canRedo,So.prototype.undo=So.prototype.undo,So.prototype.canUndo=So.prototype.canUndo,So.prototype.clear=So.prototype.clear,So.className="Transaction";function Oa(){this.Pt=new Un,this.Jd=!1,this.u=new $n().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new $n().freeze(),this.hl=new $n,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Oa.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},Oa.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},Oa.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},De=Oa.prototype,De.Xw=function(a){this.Pt.add(a)},De.Rx=function(a){this.Pt.remove(a)},De.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},De.eb=function(a){return a===void 0&&(a=""),bl(this,!0,a)},De.Kf=function(){return bl(this,!1,"")};function bl(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&xi("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}De.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()}},Oa.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Oa.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){xi("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Oa.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Oa.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){xi("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Oa.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new gr;for(E.change=Na,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Oa.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new So);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||xi("Change not within a transaction: "+x.toString()))}},Oa.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},wt.Object.defineProperties(Oa.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}}}),Oa.prototype.handleChanged=Oa.prototype.Tu,Oa.prototype.redo=Oa.prototype.redo,Oa.prototype.undo=Oa.prototype.undo,Oa.prototype.canUndo=Oa.prototype.canUndo,Oa.prototype.discardHistoryAfterIndex=Oa.prototype.lx,Oa.prototype.rollbackTransaction=Oa.prototype.Kf,Oa.prototype.commitTransaction=Oa.prototype.eb,Oa.prototype.startTransaction=Oa.prototype.Ea,Oa.prototype.removeModel=Oa.prototype.Rx,Oa.prototype.addModel=Oa.prototype.Xw,Oa.prototype.clear=Oa.prototype.clear,Oa.className="UndoManager";function Dr(){Do(this),this.H=Bc,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Tr,this.Zr=-1}Dr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Ti(this.constructor)},Dr.prototype.updateAdornments=function(){},Dr.prototype.canStart=function(){return this.isEnabled},Dr.prototype.doStart=function(){},Dr.prototype.doActivate=function(){this.isActive=!0},Dr.prototype.doDeactivate=function(){this.isActive=!1},Dr.prototype.doStop=function(){},Dr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Dr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Dr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Dr.prototype.doMouseMove=function(){},Dr.prototype.doMouseUp=function(){this.stopTool()},Dr.prototype.doMouseWheel=function(){},Dr.prototype.canStartMultiTouch=function(){return!0},Dr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,st.allocAt(NaN,NaN)),E=y.So(1,st.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}st.free(x),st.free(E)},Dr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,st.allocAt(NaN,NaN)),E=y.So(1,st.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 st((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}st.free(x),st.free(E)},Dr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Dr.prototype.doKeyUp=function(){},Dr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Dr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Dr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Qr?y.meta:y.control){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!y.isSelected),a.R("ChangedSelection",a.selection)}else if(y.shift){if(!x.isSelected){for(a.R("ChangingSelection",a.selection),y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&(y.isSelected=!0),a.R("ChangedSelection",a.selection)}}else if(!x.isSelected){for(y=x;y!==null&&!y.canSelect();)y=y.containingGroup;y!==null&&a.select(y)}}else!y.left||(Qr?y.meta:y.control)||y.shift||a.clearSelection()}},Dr.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,Ts(a,E,x),E.handled};function Ts(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)}}}Dr.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}},Dr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Dr.prototype.doCurrentObjectChanged=function(){},Dr.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===rc&&!y.shift||b===pl&&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===rc&&y.shift||b===pl&&!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)}}},Dr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Dr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=ei(function(){x.doWaitAfter(E)},a)},Dr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ct.clearTimeout(this.Zr),this.Zr=-1},Dr.prototype.doWaitAfter=function(){},Dr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof pa);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Dr.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},wt.Object.defineProperties(Dr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof gn&&(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}}}),Dr.prototype.startTransaction=Dr.prototype.Ea,Dr.className="Tool";function zo(){Dr.call(this),this.name="ToolManager",this.hb=new $n,this.ob=new $n,this.Hb=new $n,this.F=this.V=850,this.o=new fi(2,2).ja(),this.Ha=5e3,this.ia=pl,this.u=Tc,this.Mp=this.j=null,this.zj=-1}Zt(zo,Dr),zo.prototype.initializeStandardTools=function(){},zo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof pa&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},zo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===oc&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===vc){y.bubbles=!0;return}if(this.gestureBehavior===oc)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===pl?this.mouseWheelBehavior=rc:this.mouseWheelBehavior===rc&&(this.mouseWheelBehavior=pl)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},zo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===vc){y.bubbles=!0;return}if(this.gestureBehavior===oc)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}}Hs(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Hs(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}zo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof pa&&(y===a||y.rg(a))||this.hideToolTip()},zo.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()))},zo.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)},zo.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 pa)||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()},zo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof pa){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 Fo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ct.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=ei(function(){b.hideToolTip()},a)}},zo.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}},zo.prototype.hideToolTip=function(){this.zj!==-1&&(ct.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof pa?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fo&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},zo.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()},zo.prototype.doMouseWheel=function(){this.standardMouseWheel()},zo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},zo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},zo.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},zo.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},zo.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)},wt.Object.defineProperties(zo.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 pa?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}}}),zo.prototype.replaceStandardTool=zo.prototype.gb;var pl=new Jt(zo,"WheelScroll",0),rc=new Jt(zo,"WheelZoom",1),ad=new Jt(zo,"WheelNone",2),Tc=new Jt(zo,"GestureZoom",3),oc=new Jt(zo,"GestureCancel",4),vc=new Jt(zo,"GestureNone",5);zo.className="ToolManager",zo.WheelScroll=pl,zo.WheelZoom=rc,zo.WheelNone=ad,zo.GestureZoom=Tc,zo.GestureCancel=oc,zo.GestureNone=vc;function is(){Dr.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 st(NaN,NaN),this.Fr=new st,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Un().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var du;Zt(is,Dr),is.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},is.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},is.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.Ol(a.firstInput.documentPoint,!1);if(y!==null){for(;y!==null&&!y.canSelect();)y=y.containingGroup;this.currentPart=y,this.currentPart===null||this.currentPart.isSelected||(a.R("ChangingSelection",a.selection),y=a.lastInput,(Qr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},is.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),Qt=null,this.isActive=!0,this.tl.set(a.position),Rc(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&&Ml(a),$f(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Qt=this,yn=this.diagram,this.doSimulatedDragOut()))};function Rc(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof hi?(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 Ui,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}is.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},is.prototype.Pd=function(a){return a===void 0?new dd(_o):this.isGridSnapEnabled?new dd(new st(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new dd(a.copy())},is.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),ac(this),Kd(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<du.count){for(var y=du,x=y.length,E=0;E<x;E++){var b=y.M(E);Wu(b),su(b),ac(b),b.diagram.ug()}y.clear()}Wu(this),this.tl.h(NaN,NaN),yn!==null&&(yn.currentCursor=""),Qt=yn=null,su(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),dh(a,!0)},is.prototype.stopTransaction=function(){var a=this.diagram,y=Dr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function ac(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,_d(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Rd(){var a=Qt;su(a),yc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}is.prototype.doCancel=function(){su(this),yc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},is.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},is.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function au(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")):yc(a),x.skipsUndoManager=!y,x.partManager.addsToTemporaryLayer=!y,a.startPoint=x.firstInput.documentPoint,y=a.copiesEffectiveCollection?a.draggedParts.Lf():x.selection,y=x.Kj(y,x,!0),x=new Hi,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 hi&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Rc(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Yh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function su(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 hi&&(x.value.point=new st(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Wu(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 Au(a,y,x){var E=a.diagram,b=a.startPoint,z=st.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),st.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Ml(E),E.hk())}is.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Yc(E,a,y,this.dragOptions,x)};function yc(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 hi&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Yh(E,-b.x,-b.y)}y.bd()}}function bd(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),ai(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=_d(a,b,E),!a.isActive&&Qt===null)return;var re=E!==null?E.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof ho)){var oe=x.mouseDragOver;oe!==null&&(oe(b),ne=!0)}if(!a.isActive&&Qt===null||(a.doDragOver(y,E),!a.isActive&&Qt===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)}is.prototype.findDragOverObject=function(a){var y=this;return Mc(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof pa||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},is.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 _d(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&&Qt===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Fd(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 Fd(a){var y=a.panel;return y!==null?y:a instanceof Sr&&!(a instanceof ho)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function ch(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(ue){return E.findValidLinkablePort(ue,x)});a=st.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(Io,a);oe=y.Bf(oe),oe<z&&(ne=re,z=oe)}}return st.free(a),ne}function ai(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=ch(a,x.i(0),!1),z!==null&&(ne=z.part));var re=null,oe=null;x.toNode===null&&(re=ch(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)):Jr(b,ne,z,oe,re):Jr(b,null,null,null,null)}}}}is.prototype.doDragOver=function(){};function po(a,y){var x=a.diagram;a.dragsLink&&ai(a,!0),ac(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;Xa(a,b,z),z=Fd(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Qt!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Ai&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Qt!==null){for(a=Bn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Ai&&rt(x,E,a);Bn.free(a)}}}function Xa(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof ho||(x=a.mouseDrop,x!==null&&x(y))}function rt(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 hi},!0,function(b){return b instanceof hi},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}is.prototype.doDropOnto=function(){},is.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()?(au(this,!1),$f(a,this.copiedParts),Au(this,this.copiedParts,!1),Kd(a,this.copiedParts)):this.mayMove()?(su(this),Au(this,this.draggedParts,!0)):this.mayDragOut()?(au(this,!1),Au(this,this.copiedParts,!1)):su(this),bd(this,a.lastInput.documentPoint))}},is.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?(su(this),au(this,!0),$f(a,this.copiedParts),Au(this,this.copiedParts,!1),Kd(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,su(this),this.mayMove()&&(Au(this,this.draggedParts,!0),bd(this,a.lastInput.documentPoint))),this.Ym=!0,po(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&et(this),a.Ya(),Kd(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},is.prototype.simulatedMouseMove=function(a,y,x){if(Qt===null)return!1;var E=Qt.diagram;x instanceof gn||(x=null);var b=yn;return x!==b&&(b!==null&&b!==E&&(b.ug(),Qt.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),yn=x,x!==null&&x!==E&&(Rd(),b=x.toolManager.findTool("Dragging"),b!==null&&(du.contains(b)||du.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)},is.prototype.simulatedMouseUp=function(a,y,x){if(Qt===null)return!1;var E=yn,b=Qt.diagram;if(x===null)return Qt.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Qt.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;yn=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Rd(),du.contains(E)||du.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 st),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=Qt,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function et(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Ai&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}is.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Qr?!a.lastInput.alt:!a.lastInput.control))return!1;for(a=a.selection.iterator;a.next();)if(a.value.canCopy())return!0;return!!(this.draggedLink!==null&&this.dragsLink&&this.draggedLink.canCopy())},is.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())},is.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())},is.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},is.prototype.Az=function(){return Qt},is.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Qt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},is.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),lu(a),a.animationManager.Cc(),a=Qt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},is.prototype.doSimulatedDragLeave=function(){var a=Qt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},is.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Qt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Yt(this,y.draggedParts.Lf(),!1,a.firstInput),Au(this,this.copiedParts,!1),bd(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},is.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Qt;if(y!==null){var x=y.diagram;if(y.Ym=!0,su(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Yt(this,y.draggedParts.Lf(),!0,a.lastInput),Au(this,this.copiedParts,!1);var E=new Un;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),po(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 Yt(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=Bn.alloc();b=E=1/0;for(var ne=-1/0,re=-1/0,oe=y.iterator;oe.next();){var ue=oe.value;if(ue.isVisible()){var ce=ue.location;ue=ce.x,ce=ce.y,isNaN(ue)||isNaN(ce)||(ue<E&&(E=ue),ce<b&&(b=ce),ue>ne&&(ne=ue),ce>re&&(re=ce))}}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,Bn.free(z),z=a.Fr,ne=new Hi,re=st.alloc(),oe=y.iterator;oe.next();)ue=oe.value,ue instanceof hi&&ue.canCopy()&&(ce=x.I(ue),ce!==null&&(ce.points=ue.points,Yh(ce,z.x-E,z.y-b),ce.suspendsRouting=!0,ne.add(ce,a.Pd())));for(y=y.iterator;y.next();)ue=y.value,ue.Zc()&&ue.canCopy()&&(oe=x.I(ue),oe!==null&&(ue=ue.location,re.h(z.x-(E-ue.x),z.y-(b-ue.y)),oe.location=re,oe.Va(),ne.add(oe,a.Pd(re))));st.free(re),a.copiedParts=ne,Rc(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Yh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}is.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},is.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new st},wt.Object.defineProperties(is.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}}}),is.prototype.getDraggingSource=is.prototype.Az;var Qt=null,yn=null;is.className="DraggingTool",du=new $n,ci("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),zo.prototype.doCancel=function(){Qt!==null&&Qt.doCancel(),Dr.prototype.doCancel.call(this)};function on(){Dr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new hi,y=new Co;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Co,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Ai,y=new Co,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Eo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Ai,y=new Co,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Eo,a.add(y),a.selectable=!1,a.layerName="Tool",this.Di=a,this.o=y,this.Pc=this.Oc=this.ob=this.hb=this.Hb=null,this.ia=!0,this.hy=new Hi,this.Of=this.gj=this.Pf=null}Zt(on,Dr),on.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},on.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ne=fi.alloc();ne.width=y.naturalBounds.width*z,ne.height=y.naturalBounds.height*z,E.desiredSize=ne,fi.free(ne),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Io,z=st.alloc(),x.location=y.ga(Io,z),st.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},on.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Eo,y.fromSpot=Ss,y.toSpot=Ss),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},on.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},on.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Ai){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)}},on.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Ai))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Ai)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},on.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 Ai){var oe=ne.ga(Io,st.alloc()),ue=x.x-oe.x,ce=x.y-oe.y;st.free(oe),oe=ue*ue+ce*ce,oe<E&&(ue=this.validPortsCache.I(ne),ue!==null?ue&&(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 Ai&&(x.layer===null||x.layer.allowLink))?y:null},on.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},on.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},on.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},on.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Ai))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Ai))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},on.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)},on.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 Un;return E.add(a),Kn(this,x,y,E)};function Kn(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Kn(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Kn(a,y.labeledLink,x,E))))}on.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!==wh){if(E===Fg){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!zn(this,a,y,x,!0)}if(E===Bg){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!zn(this,a,y,x,!0)}if(E===Cg)return a===y?a=!0:(E=new Un,E.add(y),a=Xn(this,E,a,y,x)),!a;if(E===Eg)return!zn(this,a,y,x,!1);if(E===bg)return a===y?a=!0:(E=new Un,E.add(y),a=Pi(this,E,a,y,x)),!a}return!0};function zn(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&&zn(a,ne,x,E,b)))return!0}return!1}function Xn(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&&Xn(a,y,ne,E,b)))return!0}return!1}function Pi(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&&Pi(a,y,re,E,b))return!0}}return!1}wt.Object.defineProperties(on.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}}}),on.className="LinkingBaseTool";function Jn(){on.call(this),this.name="Linking",this.V={},this.F=null,this.K=yi,this.Xd=null}Zt(Jn,on),Jn.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},Jn.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 Ai)))return null;var x=this.direction;if(x===yi||x===or){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===yi||x===Vi)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Jn.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 Ai&&(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 Ai&&(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)},Jn.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()},Jn.prototype.doStop=function(){on.prototype.doStop.call(this),this.startObject=null},Jn.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 Ai&&(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)}}},Jn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof hi)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)},Jn.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Jn.prototype.doNoLink=function(){},wt.Object.defineProperties(Jn.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 yi=new Jt(Jn,"Either",0),or=new Jt(Jn,"ForwardsOnly",0),Vi=new Jt(Jn,"BackwardsOnly",0);Jn.className="LinkingTool",Jn.Either=yi,Jn.ForwardsOnly=or,Jn.BackwardsOnly=Vi;function Ui(){on.call(this),this.name="Relinking";var a=new Co;a.figure="Diamond",a.desiredSize=fa,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Co,a.figure="Diamond",a.desiredSize=fa,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Bn}Zt(Ui,on),Ui.prototype.updateAdornments=function(a){if(a!==null&&a instanceof hi){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)}},Ui.prototype.makeAdornment=function(a,y){var x=new pa;return x.type=si.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Ui.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},Ui.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 pa&&x.adornedPart instanceof hi))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=Ba),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Ba),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},Ui.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===yp||x===Xh)&&(x=Eu),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}},Ui.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()},Ui.prototype.doStop=function(){on.prototype.doStop.call(this),this.handle=null},Ui.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 Ai&&(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()}}},Ui.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},Ui.prototype.doNoRelink=function(){};function Jr(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)}wt.Object.defineProperties(Ui.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 pa))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Ui.className="RelinkingTool",ci("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),ci("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function rr(){Dr.call(this),this.name="LinkReshaping";var a=new Co;a.figure="Rectangle",a.desiredSize=es,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Co,a.figure="Diamond",a.desiredSize=fa,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new st,this.Yq=new $n}Zt(rr,Dr),rr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:zr},rr.prototype.om=function(a,y){a.reshapingBehavior=y},rr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof hi){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)}},rr.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new pa,b.type=si.Link,x=y.firstPickIndex;var z=y.lastPickIndex,ne=E?1:0;if(y.resegmentable&&y.computeCurve()!==Ec)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 ue=y.i(x+1);tt.B(oe.x,ue.x)&&tt.B(oe.y,ue.y)&&(ue=y.i(x-1)),tt.B(oe.x,ue.x)?(this.om(re,Xo),re.cursor="n-resize"):tt.B(oe.y,ue.y)&&(this.om(re,mo),re.cursor="w-resize")}else ne===z-1&&E?(oe=y.i(z-1),ue=y.i(z),tt.B(oe.x,ue.x)&&tt.B(oe.y,ue.y)&&(oe=y.i(z+1)),tt.B(oe.x,ue.x)?(this.om(re,Xo),re.cursor="n-resize"):tt.B(oe.y,ue.y)&&(this.om(re,mo),re.cursor="w-resize")):ne!==z&&(this.om(re,sa),re.cursor="move");b.add(re)}b.adornedObject=a}return b},rr.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},rr.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},rr.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},rr.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 hi){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}}},rr.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},rr.prototype.stopTransaction=function(){var a=this.diagram,y=Dr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},rr.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},rr.prototype.getResegmentingPoint=function(){return this.handle.ga(Io)},rr.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},rr.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&&(_r(this,ne,E,b,z,!0)||_r(this,ne,E,b,z,!1))){var re=y.points.copy();_r(this,ne,E,b,z,!0)?(re.cd(x-2,new st(ne.x,(z.y+ne.y)/2)),re.cd(x+1,new st(z.x,(z.y+ne.y)/2))):(re.cd(x-2,new st((z.x+ne.x)/2,ne.y)),re.cd(x+1,new st((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&&(_r(this,E,b,z,ne,!0)||_r(this,E,b,z,ne,!1))&&(re=y.points.copy(),_r(this,E,b,z,ne,!0)?(re.cd(x-1,new st(E.x,(E.y+ne.y)/2)),re.cd(x+2,new st(ne.x,(E.y+ne.y)/2))):(re.cd(x-1,new st((E.x+ne.x)/2,E.y)),re.cd(x+2,new st((E.x+ne.x)/2,ne.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ne=st.alloc(),tt.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()),st.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function _r(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}rr.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===Xo?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===mo&&(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===Xo?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===mo&&(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);tt.B(z.x,b.x)&&tt.B(b.y,ne.y)?(tt.B(z.x,y.i(E-2).x)&&!tt.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),tt.B(ne.y,y.i(E+2).y)&&!tt.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)):tt.B(z.y,b.y)&&tt.B(b.x,ne.x)?(tt.B(z.y,y.i(E-2).y)&&!tt.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),tt.B(ne.x,y.i(E+2).x)&&!tt.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):tt.B(z.x,b.x)&&tt.B(b.x,ne.x)?(tt.B(z.x,y.i(E-2).x)&&!tt.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),tt.B(ne.x,y.i(E+2).x)&&!tt.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):tt.B(z.y,b.y)&&tt.B(b.y,ne.y)&&(tt.B(z.y,y.i(E-2).y)&&!tt.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),tt.B(ne.y,y.i(E+2).y)&&!tt.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(Io,st.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,st.alloc()),y.L(0,E.x,E.y),st.free(z),st.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(Io,st.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,st.alloc()),y.L(y.pointsCount-1,a.x,a.y),st.free(x),st.free(a));y.zf()},rr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case sa:return a;case Xo:return new st(y.i(x).x,a.y);case mo:return new st(a.x,y.i(x).y);default:case zr:return y.i(x)}},wt.Object.defineProperties(rr.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 pa))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}}}),rr.prototype.setReshapingBehavior=rr.prototype.om,rr.prototype.getReshapingBehavior=rr.prototype.Ru;var zr=new Jt(rr,"None",0),mo=new Jt(rr,"Horizontal",1),Xo=new Jt(rr,"Vertical",2),sa=new Jt(rr,"All",3);rr.className="LinkReshapingTool",rr.None=zr,rr.Horizontal=mo,rr.Vertical=Xo,rr.All=sa,ci("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function ro(){Dr.call(this),this.name="Resizing",this.o=new fi(1,1).freeze(),this.j=new fi(9999,9999).freeze(),this.yg=new fi(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Co;a.alignmentFocus=Io,a.figure="Rectangle",a.desiredSize=es,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new st,this.Dw=new fi,this.Tn=new st,this.rt=new fi(0,0),this.qt=new fi(1/0,1/0),this.pt=new fi(1,1)}Zt(ro,Dr),ro.prototype.updateAdornments=function(a){if(!(a===null||a instanceof hi)){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(),wf(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},ro.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new pa,y.type=si.Spot,y.locationSpot=Io;var x=new Cu;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Us)),y.add(this.makeHandle(a,Tl)),y.add(this.makeHandle(a,Nn)),y.add(this.makeHandle(a,Zl)),y.add(this.makeHandle(a,bo)),y.add(this.makeHandle(a,Ao)),y.add(this.makeHandle(a,Or)),y.add(this.makeHandle(a,ra))}else if(Zc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ro.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},ro.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=Io),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 si)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},ro.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},ro.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))},ro.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},ro.prototype.stopTransaction=function(){var a=this.diagram,y=Dr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ro.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},ro.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,st.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),st.free(b)}},ro.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,st.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),st.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},ro.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 ho){var E=new $n;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()}},ro.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Io);var ne=this.adornedObject.naturalBounds,re=ne.x,oe=ne.y,ue=ne.x+ne.width,ce=ne.y+ne.height,pe=1;if(!z){pe=ne.width;var we=ne.height;0>=pe&&(pe=1),0>=we&&(we=1),pe=we/pe}return we=st.alloc(),tt.No(a.x,a.y,re,oe,b.width,b.height,we),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(we.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=Math.max(ue-a.x,x.width),a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-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=ue-a.width,a.y=ce-a.height)):1<=y.y?(a.x=Math.max(we.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=Math.max(ue-a.x,x.width),a.height=Math.max(Math.min(we.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=ue-a.width)):(a.x=Math.max(we.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=ue-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*(ce-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(we.x-re,E.width),x.width),a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-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=ce-a.height)):1<=y.y?(a.width=Math.max(Math.min(we.x-re,E.width),x.width),a.height=Math.max(Math.min(we.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(we.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*(ce-oe-a.height))):0>=y.y?(a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=ce-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*(ue-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(we.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*(ue-re-a.width))),st.free(we),a},ro.prototype.computeReshape=function(){var a=ni;return this.adornedObject instanceof Co&&(a=Ov(this.adornedObject)),!(a===ir||this.diagram.lastInput.shift)},ro.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},ro.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},ro.prototype.computeCellSize=function(){var a=new fi(NaN,NaN),y=this.adornedObject.part;return y!==null&&(y=y.resizeCellSize,!isNaN(y.width)&&0<y.width&&(a.width=y.width),!isNaN(y.height)&&0<y.height&&(a.height=y.height)),y=this.cellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height),y=this.diagram,(isNaN(a.width)||isNaN(a.height))&&y&&(y=y.grid,y!==null&&y.visible&&this.isGridSnapEnabled&&(y=y.gridCellSize,isNaN(a.width)&&!isNaN(y.width)&&0<y.width&&(a.width=y.width),isNaN(a.height)&&!isNaN(y.height)&&0<y.height&&(a.height=y.height))),(isNaN(a.width)||a.width===0||a.width===1/0)&&(a.width=1),(isNaN(a.height)||a.height===0||a.height===1/0)&&(a.height=1),a},wt.Object.defineProperties(ro.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 pa))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 pa)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}}}),ro.className="ResizingTool",ci("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function $o(){Dr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new st,this.ue=null;var a=new Co;a.figure="Ellipse",a.desiredSize=fa,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new st(NaN,NaN),this.u=0,this.F=50}Zt($o,Dr),$o.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)}},$o.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new pa,y.type=si.Position,y.locationSpot=Io;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Zc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},$o.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},$o.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)},$o.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(Io)},$o.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)},$o.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new st(NaN,NaN),this.isActive=a.isMouseCaptured=!1},$o.prototype.stopTransaction=function(){var a=this.diagram,y=Dr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},$o.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},$o.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},$o.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()},$o.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()}},$o.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},wt.Object.defineProperties($o.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 pa))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 pa)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}}}),$o.className="RotatingTool",ci("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function ka(){Dr.call(this),this.name="ClickSelecting"}Zt(ka,Dr),ka.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},ka.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},ka.className="ClickSelectingTool";function uo(){Dr.call(this),this.name="Action",this.pk=null}Zt(uo,Dr),uo.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},uo.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()},uo.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))}},uo.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()},uo.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())},uo.prototype.doStop=function(){this.pk=null},uo.className="ActionTool";function Oo(){Dr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new st(0,0)}Zt(Oo,Dr),Oo.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)},Oo.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Oo.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 Sr)x.Zc()&&(Zc(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);tn(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=st.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),st.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},wt.Object.defineProperties(Oo.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}}}),Oo.className="ClickCreatingTool";function co(){Dr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Sr;a.layerName="Tool",a.selectable=!1;var y=new Co;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Zt(co,Dr),co.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))},co.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},co.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},co.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=fi.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),fi.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},co.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()},co.prototype.computeBoxBounds=function(){var a=this.diagram;return new Bn(a.firstInput.documentPoint,a.lastInput.documentPoint)},co.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Qr?x.meta:x.control)if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected&&(y.isSelected=!1);else for(a=a.iterator;a.next();)y=a.value,y.isSelected=!y.isSelected;else if(x.shift)for(a=a.iterator;a.next();)y=a.value,y.isSelected||(y.isSelected=!0);else{for(x=new $n,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)}},wt.Object.defineProperties(co.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}}}),co.className="DragSelectingTool";function Ir(){Dr.call(this),this.name="Panning",this.Xt=new st,this.xy=new st,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(ct.document,"scroll",a.Kw,!1),a.stopTool()}}Zt(Ir,Dr),Ir.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())},Ir.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ct.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Ir.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Ir.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Ir.prototype.doMouseMove=function(){this.move()},Ir.prototype.doMouseUp=function(){this.move(),this.stopTool()},Ir.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)}},wt.Object.defineProperties(Ir.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Ir.className="PanningTool",ci("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),ci("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),ci("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),ci("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),ci("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Fo(){this.F=this.u=this.j=this.o=null}wt.Object.defineProperties(Fo.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}}}),Fo.className="HTMLInfo";function ta(a,y,x){this.text=a,this.hx=y,this.visible=x}ta.className="ContextMenuButtonInfo";function Pa(){Dr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new st,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Zt(Pa,Dr);function wa(a){var y=new Fo;y.show=function(b,z,ne){ne.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},as=y,a.tu=function(){a.stopTool()},y=pn("div");var x=pn("div");y.style.cssText="top: 0px;z-index:10002;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px",x.style.cssText="z-index:10001;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;opacity: 0.8;";var E=pn("style");ct.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",oo,!1),E.addEventListener(y,"selectstart",oo,!1),E.addEventListener(x,"contextmenu",oo,!1)),y.className="goCXforeground",x.className="goCXbackground",ct.document.body&&(ct.document.body.appendChild(y),ct.document.body.appendChild(x)),Za=y,Bs=x,qs=!0}function oo(a){return a.preventDefault(),!1}Pa.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)},Pa.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Pa.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Pa.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof gn||(a instanceof Ut?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},Pa.prototype.doActivate=function(){},Pa.prototype.doMouseDown=function(){if(Dr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof pa){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Ta(this)},Pa.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof pa){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Ta(this)};function Ta(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Fo||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Va(a,!0),a.isActive||a.stopTool())}Pa.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Va(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=as,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Ut?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof pa&&!a.currentContextMenu.visible&&a.stopTool()}}Pa.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Pa.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof pa){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 Fo&&a.show(y,x,this);this.currentContextMenu=a},Pa.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}},Pa.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof pa?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Fo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function ws(a){var y=new $n;return y.add(new ta("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ta("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ta("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ta("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ta("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ta("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ta("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ta("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ta("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ta("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ta("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ta("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ta("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Pa.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=ws(this)),Za.innerHTML="",Bs.addEventListener("pointerdown",this.tu,!1);var y=this,x=pn("ul");x.className="goCXul",Za.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=pn("li"),z.className="goCXli";var ne=pn("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)}}Za.style.display="block",Bs.style.display="block"},Pa.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===as){Za.style.display="none",Bs.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Bs,"pointerdown",this.tu,!1),this.currentContextMenu=null}},wt.Object.defineProperties(Pa.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof pa?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return qs===!1&&as===null&&Ls&&wa(this),as},set:function(a){a===null&&(qs=!0),as=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var as=null,qs=!1,Bs=null,Za=null;Pa.className="ContextMenuTool",ci("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function oa(){Dr.call(this),this.name="TextEditing",this.Zh=new Qa,this.ia=null,this.V=Qo,this.vj=null,this.qa=Jo,this.u=1,this.F=!0,this.o=null,this.j=new Fo,this.kt=null,us(this,this.j)}Zt(oa,Dr);function us(a,y){if(Ls){var x=pn("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(ca)):b==="Tab"?(a.acceptText(ba),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Jo){var E=a.kt;a.qa===Ra&&(a.qa=rs),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Jo){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 Qa&&z instanceof oa)if(z.state===Dl)x.style.border="3px solid red",x.focus();else{var ne=E.ga(Io),re=b.position,oe=b.scale,ue=E.Df()*oe;ue<z.minimumEditorScale&&(ue=z.minimumEditorScale);var ce=E.naturalBounds.width*ue+6,pe=E.naturalBounds.height*ue+2,we=(ne.x-re.x)*oe;ne=(ne.y-re.y)*oe,re=E.verticalAlignment,oe=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*ue,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*ue+"%",x.style.lineHeight="normal",x.style.width=ce+"px",x.style.left=(we-ce/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=ue,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)}}}oa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Yl&&Yl!==this&&(Yl.acceptText(hl),Yl&&Yl!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Qa&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Qo&&!y.isSelected||this.starting===vs&&2>a.lastInput.clickCount)):!1},oa.prototype.doStart=function(){Yl=this,this.textBlock!==null&&this.doActivate()},oa.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 Qa&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=Ra;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Bn(this.textBlock.ga(Us),this.textBlock.ga(Nn));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},oa.prototype.doCancel=function(){this.stopTool()},oa.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},oa.prototype.doMouseDown=function(){this.isActive&&this.acceptText(hl)},oa.prototype.acceptText=function(a){switch(a){case hl:this.qa===Fl?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Ra||this.qa===Dl||this.qa===rs)&&(this.qa=ss,el(this));break;case Ws:case ca:case ba:(ca!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Ra||this.qa===Dl||this.qa===rs)&&(this.qa=ss,el(this))}};function el(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=Fl,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=Dl,a.doError(b,z))}}oa.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)},oa.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},oa.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Jo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},oa.prototype.doStop=function(){Yl=null},oa.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)))},oa.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},wt.Object.defineProperties(oa.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)}}}),oa.prototype.measureTemporaryTextBlock=oa.prototype.Lx;var Ws=new Jt(oa,"LostFocus",0),hl=new Jt(oa,"MouseDown",1),ba=new Jt(oa,"Tab",2),ca=new Jt(oa,"Enter",3),Ca=new Jt(oa,"SingleClick",0),Qo=new Jt(oa,"SingleClickSelected",1),vs=new Jt(oa,"DoubleClick",2),Jo=new Jt(oa,"StateNone",0),Ra=new Jt(oa,"StateActive",1),rs=new Jt(oa,"StateEditing",2),ss=new Jt(oa,"StateValidating",3),Dl=new Jt(oa,"StateInvalid",4),Fl=new Jt(oa,"StateValidated",5),Yl=null;oa.className="TextEditingTool",oa.LostFocus=Ws,oa.MouseDown=hl,oa.Tab=ba,oa.Enter=ca,oa.SingleClick=Ca,oa.SingleClickSelected=Qo,oa.DoubleClick=vs,oa.StateNone=Jo,oa.StateActive=Ra,oa.StateEditing=rs,oa.StateValidating=ss,oa.StateInvalid=Dl,oa.StateValidated=Fl,ci("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Cs(a){Du||(Xl(),Du=!0),this.H=Bc,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=vl,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Un,this.ce=new Ms,this.ce.Yd=this,this.Ei=new Un,this.pu=new Un,this.Sr=new Un,this.pr=new Un,a&&Object.assign(this,a)}Cs.prototype.Xe=function(a){this.H=a},Cs.prototype.canStart=function(){return!0};function Hl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ll(a.H),a.zb=!0)}function fl(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===vl?(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===Ou&&y.vc.clear(),a.Qw=!!(a.Pk===Iu&&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(),Wl(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==iu&&E!==null&&(delete E.start.scale,delete E.end.scale),ct.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ml(x),Hd(x),a.zb=!1,y.start(),y.bc&&(bs(a),x.Ya(),Vc(y,0),lu(x,!0),Gs(a),x.R("AnimationStarting",a)))}))}}function Bl(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function _c(a,y,x,E){a.isTicking||Bl(a)||y instanceof hi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}De=Cs.prototype,De.fv=function(a){return this.ce.fv(a)},De.Xu=function(a){return this.ce.Xu(a)};function Es(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 Ut&&oe.diagram!==null||oe instanceof gn){re=!0;break e}}re=!1}re?$u(ne,!1):ne.Xk=!0}}b.pu.clear(),b.bc!==!1&&(bs(b),lu(b.H),Gs(b)),ct.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),ct.requestAnimationFrame(function(){x()}))}function Is(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function bs(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 Gs(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}De.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(),Wl(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Wl(y,this.H)},De.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))},De.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),js(this,a))},De.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),$s(this.ce,y,"position",y.position,y.position),js(this,a))};function ml(a,y,x){!a.zb||y.D(x)||Bl(a)||(a.H.pi||(y=x.copy()),$s(a.ce,a.H,"position",y,x))}function ts(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function js(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function Il(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],ue=y[1],ce=y[2];return y=y[3],re===0||re===100?(z=oe,ne=ue):(ce===0||ce===100)&&(oe=z,ue=ne),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=b(x,z,oe-z,E)%360,ne=b(x,ne,ue-ne,E),re=b(x,re,ce-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ne+"%, "+re+"%, "+x+")"}function Xl(){function a(x,E,b,z,ne,re){x.position=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}var y=new Hi;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 st(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 st(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 st(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,ue=b.actualBounds;b=ue.x+ue.width/2-oe.width/2,oe=ue.y+ue.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 st(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 Bn(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=Il(E,b,ne,re,z)}),y.add("stroke",function(x,E,b,z,ne,re){x.stroke=Il(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=Il(E,b,ne,re,z)}),y.add("areaBackground",function(x,E,b,z,ne,re){x.areaBackground=Il(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)}),Gu=y}wt.Object.defineProperties(Cs.prototype,{animationReasons:{get:function(){return this.Zd}},isEnabled:{get:function(){return this.Jd},set:function(a){(this.Jd=a)&&this.Ei.each(function(y){y.isAnimating||y.runCount!==1/0||y.start()})}},duration:{get:function(){return this.Dg},set:function(a){1>a&&Qn(a,">= 1",Cs,"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}}}),Cs.prototype.stopAnimation=Cs.prototype.Cc;var Gu=null,Du=!1,vl=new Jt(Cs,"Default",1),Iu=new Jt(Cs,"AnimateLocations",2),Ou=new Jt(Cs,"None",3);Cs.className="AnimationManager",Cs.defineAnimationEffect=function(a,y){Du||(Xl(),Du=!0),Gu.add(a,y)},Cs.Default=vl,Cs.AnimateLocations=Iu,Cs.None=Ou;function Ms(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=sc,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=_o,this.vc=new Hi,this.Tt=new Hi,this.yl=new Un,this.Ut=new Un,this.dw=Yd,a&&Object.assign(this,a)}Ms.prototype.suspend=function(){this.Xk=!0},Ms.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,$u(this,!0),bs(this.Yd),lu(this.H),Gs(this.Yd),this.H.redraw()};function Wl(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}De=Ms.prototype,De.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 gn?a=x:x instanceof Ut&&(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===vl&&this===y.defaultAnimation&&(this.Lp=lc,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=pf),bs(y),this.yl.each(function(E){E.data=null,a.add(E)}),Gs(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Es(y,this),this)},De.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},De.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof gn?this.H=a:a instanceof Ut&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Sr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return $s(this,a,y,x,E,b),this};function $s(a,y,x,E,b,z){var ne=a.vc;if(y instanceof gn&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Cc(E),Yf(),E=[Ju.j,Ju.u,Ju.o,Ju.F],Cc(b),Yf(),b=[Ju.j,Ju.u,Ju.o,Ju.F]),ne.contains(y)){var re=ne.I(y),oe=re.start,ue=re.end;oe[x]===void 0&&(oe[x]=zs(E)),ue[x]=zs(b)}else oe={},ue={},oe[x]=zs(E),ue[x]=zs(b),re=oe.position,y instanceof Ut&&re instanceof st&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(ue.position),re=new Ku(oe,ue,z),ne.add(y,re);ne=oe[x],ne instanceof st&&!ne.w()&&ne.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Sr?re.Ku.location=zs(y.location):z&&(re.Ku[x]=zs(E))}function zs(a){return a instanceof st||a instanceof fi?a.copy():a}De.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},De.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function $u(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),bs(x),Vc(a,b),lu(a.H,!0),Gs(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 Vc(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Ut&&z.diagram===null)){var ne=E.value,re=b?ne.end:ne.start;ne=b?ne.start:ne.end;var oe=Gu,ue;for(ue in ne)ue==="position"&&(ne["position:placeholder"]||ne["position:nodeCollapse"])||oe.get(ue)===null||oe.get(ue)(z,re[ue],ne[ue],a.Lp,y,x,a)}}}De.stop=function(){return this.bc?(this.Ml(!0),this):this},De.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,bs(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=Gu;E.next();){var ne=E.key,re=E.value,oe=b?re.end:re.start,ue=b?re.start:re.end,ce=re.Ku,pe;for(pe in ue)if(z.get(pe)!==null){var we=pe;!re.Hu||we!=="position:nodeCollapse"&&we!=="position:placeholder"||(we="position"),z.get(we)(ne,oe[pe],ce[pe]!==void 0?ce[pe]:re.Hu?oe[pe]:ue[pe],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ce.location!==void 0&&ne instanceof Sr&&(ne.location=ce.location),re.nv&&ne instanceof Sr&&ne.Zb(!1)}if(y.As.clear(),dh(y,!1),y.Ya(),y.N(),lu(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()}lu(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),Gs(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Wl(this,null),x.Ml(this),y.$b())}},De.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof ho&&(E=y.placeholder),E!==null?(x=E.ga(Us),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new st(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof ho)for(a=a.memberParts;a.next();)E=a.value,E instanceof Ai&&this.Cj(E,y)},De.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof ho&&(x=y.placeholder),x!==null){var E=x.ga(Us);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 ho)for(a=a.memberParts;a.next();)E=a.value,E instanceof Ai&&this.Aj(E,y)}},De.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},wt.Object.defineProperties(Ms.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Qn(a,">= 1",Ms,"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:zt("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}}}),Ms.prototype.getTemporaryState=Ms.prototype.Ez,Ms.prototype.stop=Ms.prototype.stop,Ms.prototype.add=Ms.prototype.add,Ms.prototype.addTemporaryPart=Ms.prototype.Iy;function sc(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function lc(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Ms.className="Animation",Ms.EaseLinear=function(a,y,x,E){return x*a/E+y},Ms.EaseInOutQuad=sc,Ms.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Ms.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Ms.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Ms.EaseOutExpo=lc;function Ku(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ku.className="AnimationState";function ku(a,y,x){this.xd=null,this.rf=a,this.so=x||Ys,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=yl))}ku.prototype.copy=function(){var a=new ku(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 ys(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))}wt.Object.defineProperties(ku.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 Ys=new Jt(ku,"Default",1),yl=new Jt(ku,"Immediate",2),Xs=new Jt(ku,"Bundled",3);ku.className="AnimationTrigger",ku.Default=Ys,ku.Immediate=yl,ku.Bundled=Xs;function ds(a){Do(this),this.H=null,this.Pa=new $n,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)}De=ds.prototype,De.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ql(x)}a.clear(),this.Zq.length=0},De.Xe=function(a){this.H=a},De.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 ho?b++:oe instanceof Ai?E++:oe instanceof hi?z++:oe instanceof pa?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&&Ji(E)&&(re+=" #"+Ji(E)),x instanceof Ai?re+=" "+nr(E):x instanceof hi&&(re+=" "+nr(x.fromNode)+" "+nr(x.toNode));return y+" "+this.Pa.count+": "+re},De.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=st.alloc(),z=this.Pa.s,ne=z.length;ne--;){var re=z[ne];if((E!==!0||wf(re)!==!1)&&re.isVisible()&&(b.assign(a),Xr(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return st.free(b),re}return st.free(b),null},De.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof $n||E instanceof Un||(E=new Un),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=st.alloc(),ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((b!==!0||wf(oe)!==!1)&&oe.isVisible()){z.assign(a),Xr(z,oe.oe);var ue=oe;oe.ji(z,y,x,E)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||E.add(ue))}}return st.free(z),E},De.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 $n||b instanceof Un||(b=new Un),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||wf(oe)!==!1)&&oe.isVisible()){var ue=oe;oe.Cf(a,y,x,E,b)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||b.add(ue))}}return b},De.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 ue=re[oe];if((ne!==!0||wf(ue)!==!1)&&z(ue)&&ue.isVisible()){var ce=ue;ue.Cf(a,y,x,E,b)&&(y!==null&&(ce=y(ce)),ce===null||x!==null&&!x(ce)||b.add(ce))}}return b},De.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 $n||b instanceof Un)&&(z=b),b=!0),z instanceof $n||z instanceof Un||(z=new Un),this.Uh===!1)return z;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var re=st.alloc(),oe=st.alloc(),ue=this.Pa.s,ce=ue.length;ce--;){var pe=ue[ce];if((ne!==!0||wf(pe)!==!1)&&pe.isVisible()){re.assign(a),Xr(re,pe.oe),oe.h(a.x+y,a.y),Xr(oe,pe.oe);var we=pe;pe.og(re,oe,x,E,b,z)&&(x!==null&&(we=x(we)),we===null||E!==null&&!E(we)||z.add(we))}}return st.free(re),st.free(oe),z},De.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Si();for(var b=Si(),z=0;z<E;z++){var ne=x[z];if(ne.vw=z,ne instanceof hi){if(ne.fd===!1)continue}else if(ne instanceof pa&&ne.adornedPart!==null)continue;var re=ne.actualBounds;ne.isVisible()&&Kl(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],$v(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++)$v(b[y]);Fi(a),Fi(b)}}};function xl(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}De.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=xl(this,a);var z=this.Zq;z.length=0;for(var ne=y.scale,re=Bn.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ne,re,!0);if(Bn.free(re),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Su(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=xl(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,ue=Bn.alloc(),ce=0;ce<z;ce++){var pe=b[ce];E.contains(pe)&&a.Oj(y,pe,x,re,oe,ue,!1)}Bn.free(ue),y.globalAlpha=ne}}}De.Oj=function(a,y,x,E,b,z,ne){if(ne&&!wf(y))a.Hs(y);else{if(E!==null&&y instanceof hi&&(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 Da?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&&(Ns(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Ns(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),Ns(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))}},De.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(jo,a,this,y,x,E,b)},De.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&ql(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)),xc(this,a,y),a},De.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,ql(y),a};function xc(a,y,x){if(y=jd(a,y,x),x instanceof ho&&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&&xc(a,-1,y)}x.svg!==null&&x.svg.remove()}function jd(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}wt.Object.defineProperties(ds.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===""&&zt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&zt("Layer.name is already present in this diagram: "+a);for(this.xa=a,this.g("name",y,a),a=this.Pa.iterator;a.next();)a.value.layerName=this.xa}}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Qn(a,"0 <= value <= 1",ds,"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))}}}),ds.prototype.findObjectsNear=ds.prototype.og,ds.prototype.findObjectsIn=ds.prototype.Cf,ds.prototype.findObjectsAt=ds.prototype.ji,ds.prototype.findObjectAt=ds.prototype.ic,ds.className="Layer";function gn(a,y){if(ip||(Jl(),ip=!0),Do(this),Bc=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Ls){var x=this,E=function(){x.removeEventListener(ct.document,"DOMContentLoaded",E,!1),x.setRTL()};ct.document.body!==null?this.setRTL():x.addEventListener(ct.document,"DOMContentLoaded",E,!1)}this.ol=null,Uf.add("Model",ja);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===jo&&ne.updateDataBindings(z.object,z.propertyName)}finally{ne.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,df(this),this.model=Sy(),this.Wg=!0,hh(this),this.layout=new ps,this.Wg=!1,this.ck=this.ek=this.fk=this.dk=this.ui=this.aA=this.$j=this.Ov=null,this.hk=function(){},this.preventDefault=null,this.rn=!1,this.Yf=new rp,a!==void 0&&(typeof a=="string"||ct.Element&&a instanceof Element?Rh(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var sd,Bc;function df(a){a.Yd=new Cs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new $n,a.pj=new Hi,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new st(NaN,NaN).freeze(),a.du=new st(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new st(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Xt,a.zu=new st(NaN,NaN).freeze(),a.ut=new Bn(NaN,NaN,NaN,NaN).freeze(),a.rj=new pr(0,0,0,0).freeze(),a.sj=Yd,a.nu=!1,a.Zt=null,a.fu=null,a.yh=iu,a.zk=Bi,a.Fg=iu,a.pq=Bi,a.yt=Us,a.Bt=Us,a.Fc=!0,a.pn=!1,a.De=new Un,a.Eh=new Hi,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new pr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Tr,a.bq.diagram=a,a.Qg=new Tr,a.Qg.diagram=a,a.cj=new Tr,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Hp(a),a.ai=new Un,a.Ht=!0,a.uu=Ld,a.pw=!1,a.wu=wh,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new Hi,a.Xn=new $n,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 pr(5).freeze(),a.Hw=new Un().freeze(),a.Nt=999999999,a.nw=new Un().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 Un,a.ow=new Un,a.Xh=null,a.aw=new fi(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new st,bounds:new Bn,Py:new fi,bA:new fi,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Bn(NaN,NaN,NaN,NaN).freeze(),a.wo=new fi(NaN,NaN).freeze(),a.Sp=new Bn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Hi;var y=new Ai,x=new Qa;x.bind(new tl("text","",nr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Ai,x=new Qa,x.stroke="brown",x.bind(new tl("text","",nr)),y.add(x),a.Lg.add("Comment",y),y=new Ai,y.selectable=!1,y.avoidable=!1,x=new Co,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new fi(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Hi,y=new ho,y.selectionObjectName="GROUPPANEL",y.type=si.Vertical,x=new Qa,x.font="bold 12pt sans-serif",x.bind(new tl("text","",nr)),y.add(x),x=new si(si.Auto),x.name="GROUPPANEL";var E=new Co;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Cu,E.padding=new pr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Hi,y=new hi,x=new Co,x.isPanelMain=!0,y.add(x),x=new Co,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new hi,x=new Co,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new pa,y.type=si.Auto,x=new Co,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Cu,x.margin=new pr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new pa,y.type=si.Link,x=new Co,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 ja,a.toolManager=new zo,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=Zd(),a.eq=null,a.fq=Wa,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 st,a.zy=500,a.wp=new st,a.wq=!1}gn.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Zh=null,Ud="",zd(this,!1),this.Xn.clear(),fp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function zd(a,y){a.animationManager.Cc(!0),a.Hw=new Un().freeze(),a.nw=new Un().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(),fp(),a.Og.clear(),Cr=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Zd(){return null}gn.prototype.reset=function(){this.clear(),this.vb=!0,df(this),Jc(this),this.Wg=!0,hh(this),this.layout=new ps,this.Wg=!1,this.model=Sy(),this.model.undoManager=new Oa,this.vb=this.rn=!1,this.N()},gn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=ct.document.body);var y=pn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},gn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=ct.document.body);var y=0;if(Ls){var x=np;y=sd,x===null&&(x=np=pn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=sd=pn("div"),y.style.position="absolute",y.style.visibility="hidden",y.style.width="200px",y.style.height="150px",y.style.boxSizing="content-box",y.appendChild(x)),y.style.overflow="hidden",a.appendChild(y);var E=x.offsetWidth;y.style.overflow="scroll",x=x.offsetWidth,E===x&&(x=y.clientWidth),a.removeChild(y),y=E-x,y!==0||Qr||(y=11)}this.Db=y,this.Gw=!0},gn.prototype.qb=function(a){a.classType===gn&&(this.autoScale=a)},gn.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 Rh(a,y){if(Ls){if(y!=null||zt("Diagram setup requires an argument DIV."),a.Ka!==null&&zt("Diagram has already completed setup."),typeof y=="string"?a.Ka=ct.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:zt("No DIV or DIV id supplied: "+y),a.Ka===null&&zt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&zt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ct.ResizeObserver){var x=dn(function(){a.$b()},250);a.ol=new ct.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ct.getComputedStyle(a.Ka,null).position==="static"&&(a.Ka.style.position="relative"),y=5;var 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=ct.go;var b=new $l(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",ct.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),$d(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new $l(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Ls){b=pn("div");var z=pn("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=Hf,b.addEventListener("pointerdown",fh),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=dn(function(){a.Yh=null,a.N()},300),a.Ov=dn(function(){Hd(a)},250),a.preventDefault=function(ne){return ne.preventDefault(),!1},a.$j=function(ne){if(a.isEnabled){var re=Pu(a,ne,!0);re.bubbles=!0;var oe=0,ue=0;re.delta=0,ne.deltaX!==void 0?(ne.deltaX!==0&&(oe=0<ne.deltaX?1:-1),ne.deltaY!==0&&(ue=0<ne.deltaY?1:-1),re.delta=Math.abs(ne.deltaX)>Math.abs(ne.deltaY)?-oe:-ue):ne.wheelDeltaX!==void 0?(ne.wheelDeltaX!==0&&(oe=0<ne.wheelDeltaX?-1:1),ne.wheelDeltaY!==0&&(ue=0<ne.wheelDeltaY?-1:1),re.delta=Math.abs(ne.wheelDeltaX)>Math.abs(ne.wheelDeltaY)?-oe:-ue):ne.wheelDelta!==void 0&&ne.wheelDelta!==0&&(re.delta=0<ne.wheelDelta?1:-1),a.doMouseWheel(),Tu(re,ne)}},a.aA=function(ne){a.isEnabled&&(a.Vk=!1,Pu(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 ue=oe;oe=_h(a,ne,!0,!1,!0,ue),Uc(a,ne,oe),oe.targetDiagram=Md(ne,ne.target),oe.targetObject=null,ue||oe.clone(a.bq),ue=a.uw,re=re?25:10,ne.timeStamp-a.tw<a.zy&&!(Math.abs(ue.x-ne.screenX)>re||Math.abs(ue.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():Tu(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=_h(a,ne,!1,!1,!1,re[1]!==null);var oe=ct.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 ue=a,ce=ne;oe&&oe.H&&(ce=ne,ue=oe.H),re.targetDiagram=ue,Uc(a,ce,re),re.targetObject=null,a.doMouseMove(),Tu(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=_h(a,ne,!1,!0,!0,!1);var ue=ct.document.elementFromPoint(ne.clientX,ne.clientY)||null;ue!==null&&ue.shadowRoot!==void 0&&ue.shadowRoot!==null&&(ue=ue.shadowRoot.elementFromPoint(ne.clientX,ne.clientY)),ue!==null&&ue.H instanceof gn&&ue.H!==a&&Uc(ue.H,ne,oe),ue===null&&(ue=ne.target),Uc(a,ne,oe),oe.clickCount=a.yq,oe.targetDiagram=Md(ne,ue),oe.targetObject=null,a.doMouseUp(),Tu(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"+bh[1]+bh[2]+"wI"+Eh.slice(1,5)]["b"+DS.slice(1,y)](E.Z,mf,y,y),E.Vc(!0),Qg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}gn.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},gn.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function Qg(a){var y=a.ta.Oa;y instanceof HTMLCanvasElement||(y=a.div),a.addEventListener(y,"pointerdown",a.ui,!1),a.addEventListener(y,"pointermove",a.dk,!1),a.addEventListener(y,"pointerup",a.fk,!1),a.addEventListener(y,"pointerout",a.ek,!1),a.addEventListener(y,"pointercancel",a.ck,!1),a.addEventListener(y,"pointerenter",a.bz,!1),a.addEventListener(y,"pointerleave",a.cz,!1),a.addEventListener(y,"wheel",a.$j,!1),a.addEventListener(y,"keydown",a.Qz,!1),a.addEventListener(y,"keyup",a.Rz,!1),a.addEventListener(y,"blur",a.Ny,!1),a.addEventListener(y,"focus",a.Oy,!1),a.addEventListener(y,"selectstart",function(x){return x.preventDefault(),!1},!1),a.addEventListener(y,"contextmenu",function(x){return x.preventDefault(),!1},!1),a.addEventListener(ct,"resize",a.Ov,!1)}function Ml(a){30<a.Sq&&(a.Yh=1)}function dh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Hr&&Hr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}gn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ct.devicePixelRatio||1},gn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},gn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},gn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},gn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},gn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},gn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},gn.prototype.doFocus=function(){this.focus()},gn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=ct.scrollX||ct.pageXOffset,y=ct.scrollY||ct.pageYOffset;this.ta.focus(),ct.scrollTo(a,y)}},gn.prototype.Oy=function(){this.H.R("GainedFocus")},gn.prototype.Ny=function(){this.H.R("LostFocus")};function Hd(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===iu&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function hh(a){var y=new ds;y.name="Background",a.Al(y),y=new ds,y.name="",a.Al(y),y=new ds,y.name="Foreground",a.Al(y),y=new ds,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ds,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ds,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function hf(a){var y=new si(si.Grid);y.name="GRID";var x=new Co;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Co,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Co,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Co,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Co,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Co,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Sr,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 Hf(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):cd(this.H)}function fh(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):cd(this.H)}gn.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,ue=E.height+z.top+z.bottom,ce=E.right+z.right;z=E.bottom+z.bottom;var pe=b.x;E=b.y;var we=b.width,Fe=b.height,Ie=b.right,ze=b.bottom;b=this.scale;var gt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":gt=gt+a.scrollWidth-a.clientWidth;break;case"reverse":gt=a.scrollWidth-gt-a.clientWidth}var nt=gt;we<oe||Fe<ue?(gt=st.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==nt&&(gt.x=nt/b+ne,this.ju=nt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(gt.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=gt,st.free(gt),this.Ee=this.qr=!1):(gt=st.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<pe&&(this.position=gt.h(nt+ne,this.position.y)),ce>Ie&&(this.position=gt.h(-(y.scrollWidth-this.Aa)+nt-this.Aa/b+ce,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<E&&(this.position=gt.h(this.position.x,a.scrollTop+re)),z>ze&&(this.position=gt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),st.free(gt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ce=E.right,Ie=b.right,z=E.bottom,ze=b.bottom,ne=E.x,pe=b.x,re=E.y,E=b.y,we>=oe&&ne>=pe&&ce<=Ie&&(x.style.width="1px"),Fe>=ue&&re>=E&&z<=ze&&(x.style.height="1px"))}},gn.prototype.computeBounds=function(a){return a===void 0&&(a=new Bn),Ll(this),gh(this,a)};function gh(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 ue=ne[oe];ue.isInDocumentBounds&&ue.isVisible()&&(ue=ue.actualBounds,ue.w()&&(x?(x=!1,y.assign(ue)):y.ed(ue)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}gn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(fn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof hi||(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 hi||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Bn(NaN,NaN,0,0):x};function Vu(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=st.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Bn.allocAt(0,0,E.width,E.height);var b=st.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Bn.free(E),st.free(b),st.free(x)}x=a.yh,y&&a.Fg!==iu&&(x=a.Fg);var z=x!==iu?Wd(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()?Io:oe),ff(a,a.documentBounds,b,ne,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,tt.B(z.x,x)&&tt.B(z.y,E)&&tt.B(z.width,b)&&tt.B(z.height,ne)||a.onViewportBoundsChanged(new Bn(x,E,b,ne),z,y,!1)}}function Wd(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===Ru?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Hh?(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}gn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Yd,this.scale=Wd(this,Ru),a!==Yd&&(Vu(this,!1),ff(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},De=gn.prototype,De.BA=function(a,y){y===void 0&&(y=Ru);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Ru||y===Hh)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===Hh?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 st(a.x,a.y)}},De.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new st(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))},De.zz=function(a){if(a instanceof Ut){this.eq=a;var y=st.alloc();this.fq=this.op(a.ga(Us,y)),st.free(y)}else this.eq=null,this.fq=Wa};function ff(a,y,x,E,b,z){var ne=st.allocAt(a.pa.x,a.pa.y),re=ne.x,oe=ne.y;if(a.eq!==null){var ue=st.alloc();ue=a.eq.ga(Us,ue),re=ue.x-a.fq.x/a.scale,oe=ue.y-a.fq.y/a.scale,b=Ss,st.free(ue)}(z||a.scrollMode===Yd)&&(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),ml(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Jc(a),st.free(ne)}De.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Mc(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Sr)return a}else if(a=Mc(this,a,function(x){return x.part}),a instanceof Sr)return a;return null},De.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Ll(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 Mc(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),Ll(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}De.lz=function(a,y,x){return y===void 0&&(y=!0),ld(this,a,function(E){return E.part},y?function(E){return E instanceof Sr&&E.canSelect()}:null,x)};function ld(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof $n||b instanceof Un||(b=new Un),Ll(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}De.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof $n||E instanceof Un||(E=new Un),Ll(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},De.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Gd(this,a,function(b){return b instanceof Sr&&(!x||b.canSelect())},y,E)},De.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof $n||b instanceof Un||(b=new Un),Ll(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ne=z.value;ne.visible&&ne.Cf(a,y,x,E,b)}return b},De.Nu=function(a,y,x,E,b,z){var ne=new Un;Ll(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 Gd(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 $n||b instanceof Un||(b=new Un),Ll(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,z,x,E,b)}return b}De.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Bd(this,a,y,function(z){return z instanceof Sr&&(!E||z.canSelect())},x,b)},De.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 $n||b instanceof Un)&&(z=b),b=!0),z instanceof $n||z instanceof Un||(z=new Un),Ll(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 Bd(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 $n||b instanceof Un)&&(z=b),b=!0),z instanceof $n||z instanceof Un||(z=new Un),Ll(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}gn.prototype.acceptEvent=function(a){return Pu(this,a,a instanceof MouseEvent)};function Pu(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Uc(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),Qr&&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=Md(y,y.target),E.targetObject=null,E}function Md(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 _h(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,Qr&&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 Tu(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}gn.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Pu(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(),Tu(x,a)},gn.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Pu(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(),Tu(x,a)},gn.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Pu(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Tu(x,a)},gn.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Pu(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Tu(x,a)},gn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new st(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?Xr(new st(y,a),this.Ab):new st(y,a)};function Uc(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=st.allocAt(ne,re),a.Ab.Cd(y),x.documentPoint.assign(y),st.free(y)):x.documentPoint.h(ne,re)}function ph(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))}}gn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function mh(a){a.ld||Ll(a),a.Va()}gn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},De=gn.prototype,De.Pz=function(){return this.kg},De.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,lu(this),this.hf=!1,this.du=new st(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&ei(function(){E.ld=!1,Hl(y,"Model"),a(E)},1)},De.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;ct.requestAnimationFrame(function(){y.kg&&y.bd()})}},De.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),lu(this))};function ud(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||cd(a)||(y&&Ll(a),x&&Vu(a,!1))}function lu(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];vt(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||Hd(a),ud(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Xc(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Ll(a),z=!1,(!a.hf||a.xh)&&(a.hf?Sg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Sg(a,!1)),z=!0),a.Jk=!1,Ll(a),a.ou||mh(a),ud(a,!0,!1),ne=!1,z?(x=Bn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,jh(a)),a.R("LayoutCompleted"),ud(a,!0,!1),Bn.free(x)):x.Ok&&x.Qw&&(a.Fg!==iu?a.scale=Wd(a,a.Fg):a.yh!==iu?a.scale=Wd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Vu(a,!0)),z&&ne&&a.eb("Initial Layout"),Ll(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function jh(a){if(a.Fg!==iu)a.scale=Wd(a,a.Fg);else if(a.yh!==iu)a.scale=Wd(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}Vu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Xc(a)}function Ll(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 Un,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof ho&&E.U&65536&&(E.U=E.U^65536)})}}De.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof ho||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof ho&&x.isVisible()&&cs(this,x);for(a.reset();a.next();)x=a.value,x instanceof hi&&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 pa&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function cs(a,y){for(var x=Si(),E=Si(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof ho?(yt(z)||kt(z)||Pf(z))&&cs(a,z):z instanceof hi?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(Fi(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();Fi(E)}De.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},De.gc=function(a){if(this.Ka!==null){if(this.ta===null&&zt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){cc(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,ls(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),nu(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?Jd(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(Xt.prototype.Cd=Xt.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,cc(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,ue=Math.round(re.x*oe)/oe,ce=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-ue,-ce),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),nu(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?Jd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Xt.prototype.Cd=Xt.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Hr&&Hr.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 Js(a,y,x,E,b,z,ne,re,oe,ue){if(a.Ka!==null){a.ta===null&&zt("No canvas specified"),ne===void 0&&(ne=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),ue===void 0&&(ue=!1),cc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ce=a.Ca;a.Ca=b;var pe=a.Wa.s,we=pe.length;try{var Fe=new Bn(z.x,z.y,E.width/b,E.height/b),Ie=Fe.copy();Ie.Co(x),Xc(a,Ie),Ll(a),a.Fd(pe,we,a,Fe),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 ze=a.Mb;y.scale(ze,ze);var gt=Xt.alloc();gt.reset(),gt.translate(x.left,x.top),gt.scale(b),z.x===0&&z.y===0||gt.translate(-z.x,-z.y),y.setTransform(gt.m11,gt.m12,gt.m21,gt.m22,gt.dx,gt.dy),y.yc(),y instanceof Da&&ls(y,gt.m11,gt.m12,gt.m21,gt.m22,gt.dx,gt.dy),Xt.free(gt),nu(a,y),y.globalAlpha=a.pb;var nt=a.Qj("Grid");if(ne){var Et=new Un,At=ne.iterator;for(At.reset();At.next();){var Tt=At.value;Tt instanceof Sr&&(ue||Tt.layer!==nt)&&(Tt.Gj(),Et.add(Tt))}for(ue=0;ue<we;ue++)Su(pe[ue],y,a,Et,oe);Et.each(function(mn){return mn.Gj()})}else for(Et=0;Et<we;Et++){var Vt=pe[Et];Vt===nt?ue&&Vt.gc(y,a,!0):Vt.gc(y,a,oe)}a.$i=!1,a.Yf&&Jd(a.Yf,a)&&a.Vp()}finally{a.Ca=ce,a.ib.Vc(!0),a.vd=!0,a.Fd(pe,we,a,a.viewportBounds),Xc(a),a.ib instanceof Da&&(a.ib.Nj.PA(),a.redraw())}}}De.Gf=function(a){return this.Rg[a]},De.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},De.Tx=function(){this.Rg=new tr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Qr||Yr),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function nu(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}De.Ql=function(a){return this.on[a]},De.sA=function(a,y){this.on[a]=y},De.Sx=function(){this.on=new tr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},De.set=function(a){return Object.assign(this,a),this},De.Du=function(a){return this.nm(a)},De.nm=function(a){return uc(this,a),this};function uc(a,y){var x=a instanceof si,E=a instanceof gn,b;for(b in y){b===""&&zt("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])),tn(z)?ne=b.substr(re+1):zt("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ne[0]!=="_"&&!$r(z,ne))if(E&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(E&&ne==="Changed"){a.Pe(y[ne]);continue}else if(E&&$r(a.toolManager,ne))z=a.toolManager;else if(E&&qg(a,ne)){a.Bj(ne,y[ne]);continue}else if(a instanceof ar&&ne==="Changed"){a.Pe(y[ne]);continue}else zt('Trying to set undefined property "'+ne+'" on object: '+z.toString());z[ne]=y[b],ne[0]==="_"&&z instanceof Ut&&z.Vw(ne)}}De.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Hi,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},De.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")},gn.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!==pf&&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=Bn.alloc(),yg(this,this.computeBounds(E)),Bn.free(E)),E=this.ta,E===null||E instanceof qo)))){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 ue=70*ne,ce=Math.max(z,0),pe=Math.max(y,0),we=Math.floor(b-ce),Fe=Math.floor(re-pe);a.drawImage(E.Oa,ce,pe,we,Fe,0,0,we,Fe),Jd(this.Yf,this)&&a.clearRect(0,0,oe,ue),E=Si(),a=Si(),Fe=Math.abs(z),we=Math.abs(y);var Ie=ce===0?0:b-Fe;ce=st.allocAt(Ie,0),Fe=st.allocAt(Fe+Ie,re),a.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y)));var ze=this.Ab;if(ze.reset(),ze.scale(ne,ne),this.Ca!==1&&ze.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&ze.translate(-ne.x,-ne.y),Xr(ce,ze),Xr(Fe,ze),E.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Ie=pe===0?0:re-we,ce.h(0,Ie),Fe.h(b,we+Ie),a.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Xr(ce,ze),Xr(Fe,ze),E.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Jd(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,ce.h(b,re),Fe.h(oe+b,ue+re),a.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Xr(ce,ze),Xr(Fe,ze),E.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y)))),st.free(ce),st.free(Fe),ud(this,!1,!0),this.Ka===null&&zt("No div specified"),this.ta===null&&zt("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(cc(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,ue=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,-ue),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),nu(this,b),b.globalAlpha=this.pb,re=0;re<z;re++)if(ne=y[re],oe=E,ne.visible&&ne.pb!==0){ue=xl(ne,b),pe=ne.Zq,pe.length=0,ce=this.scale,we=Bn.alloc(),Fe=ne.Pa.s,ze=Fe.length,Ie=oe.length;for(var gt=0;gt<ze;gt++){var nt=Fe[gt],Et=eg(nt,nt.actualBounds);e:{for(var At=2/ce,Tt=4/ce,Vt=0;Vt<Ie;Vt++){var mn=oe[Vt];if(mn.width!==0&&mn.height!==0&&Et.Vu(mn.x-At,mn.y-At,mn.width+Tt,mn.height+Tt)){Et=!0;break e}}Et=!1}Et&&ne.Oj(b,nt,this,pe,ce,we,!0)}Bn.free(we),b.globalAlpha=ue}b.restore(),b.Vc(!0),this.Yf&&Jd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Fi(E),Fi(a),this.ld=!1}}else this.bd();x&&(Ml(this),this.bd(),dh(this,!0))}else x?(Ml(this),this.bd(),dh(this,!0)):this.bd()}};function cc(a){a.pn!==!1&&(a.pn=!1,$d(a,a.Aa,a.ya))}function $d(a,y,x){Jc(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function cd(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,ue=b.clientHeight||E+re,ce=a.viewportBounds;b=ce.x;var pe=ce.y,we=ce.width,Fe=ce.height;if((oe!==x+ne||ue!==E+re)&&(a.gf=!1,a.Be=!1,re=ne=0,a.Aa=oe,a.ya=ue,z=a.pn=!0,Jc(a)),!a.hf||!a.viewportBounds.w())return!0;var Ie=a.ku,ze=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var gt=a.documentBounds,nt=0,Et=0,At=0,Tt=0,Vt=ce.width,mn=ce.height,bi=a.rj;a.contentAlignment.sb()?(gt.width>Vt&&(nt=bi.left,Et=bi.right),gt.height>mn&&(At=bi.top,Tt=bi.bottom)):(nt=bi.left,Et=bi.right,At=bi.top,Tt=bi.bottom);var Yi=gt.width+nt+Et,Gi=gt.height+At+Tt;bi=a.scale;var di=Yi>oe/bi,qn=Gi>ue/bi;if(!(z||a.gf||a.Be||di||qn))return!0;nt=gt.x-nt,oe=ce.x,Et=gt.right+Et,ue=ce.right+ne,At=gt.y-At;var so=ce.y;gt=gt.bottom+Tt,ce=ce.bottom+re;var Vr="1px";if(Tt="1px",a.scrollMode===Yd&&(di||qn)&&(di&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(di=1,nt+1<oe&&(di=Math.max((oe-nt)*bi+a.Aa,di)),Et>ue+1&&(di=Math.max((Et-ue)*bi+a.Aa,di)),Vt+ne+1<Yi&&(di=Math.max((Yi-Vt)*bi+a.Aa,di)),Vr=di.toString()+"px"),qn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(di=1,At+1<so&&(di=Math.max((so-At)*bi+a.ya,di)),gt>ce+1&&(di=Math.max((gt-ce)*bi+a.ya,di)),mn+re+1<Gi&&(di=Math.max((Gi-mn)*bi+a.ya,di)),Tt=di.toString()+"px")),di=Vr!=="1px",qn=Tt!=="1px",di&&qn||!di&&!qn||(qn&&(ue-=a.Db),di&&(ce-=a.Db),Yi<Vt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,nt+1<oe&&(ne=Math.max((oe-nt)*bi+a.Aa,ne)),Et>ue+1&&(ne=Math.max((Et-ue)*bi+a.Aa,ne)),Vt+1<Yi&&(ne=Math.max((Yi-Vt)*bi+a.Aa,ne)),Vr=ne.toString()+"px"),di=Vr!=="1px",ne=a.ya,di!==a.Be&&(ne=di?a.ya-a.Db:a.ya+a.Db),Gi<mn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,At+1<so&&(re=Math.max((so-At)*bi+ne,re)),gt>ce+1&&(re=Math.max((gt-ce)*bi+ne,re)),mn+1<Gi&&(re=Math.max((Gi-mn)*bi+ne,re)),Tt=re.toString()+"px"),qn=Tt!=="1px"),a.qr&&di===a.Be&&qn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(di!==a.Be&&(Vr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=di,ze.style.width=Vr,qn!==a.gf&&(Tt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=st.alloc(),qn?(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)),st.free(re))),z&&Jc(a),a.gf=qn,ze.style.height=Tt,a.gu=!0,z&&(a.pn=!0),y=Ie.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Vt+1<Yi?y=(a.position.x-nt)*bi:nt+1<oe?y=Ie.scrollWidth-Ie.clientWidth:Et>ue+1&&(y=a.position.x*bi)),a.tn)switch(a.bu){case"negative":y=-(Ie.scrollWidth-y-Ie.clientWidth);break;case"reverse":y=Ie.scrollWidth-y-Ie.clientWidth}return Ie.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(mn+1<Gi?Ie.scrollTop=(a.position.y-At)*bi:At+1<so?Ie.scrollTop=Ie.scrollHeight-Ie.clientHeight:gt>ce+1&&(Ie.scrollTop=a.position.y*bi)),oe=a.Aa,ue=a.ya,Ie.style.width=oe+(a.gf?a.Db:0)+"px",Ie.style.height=ue+(a.Be?a.Db:0)+"px",x!==oe||E!==ue||a.animationManager.zb?(x=Bn.allocAt(b,pe,we,Fe),a.onViewportBoundsChanged(x,a.viewportBounds,bi,z),Bn.free(x),!1):!0}De=gn.prototype,De.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&zt("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&&zt('Cannot add a Part when unable find a Layer named "'+a.layerName+'" and there is no default Layer'),a.layer!==y)){var x=y.oi(99999999,a,a.diagram===this);0<=x&&this.cb(Sa,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},De.oi=function(a){this.partManager.oi(a);var y=this;Jf(a,function(x){zh(y,x)}),(a instanceof pa||a instanceof ho&&a.placeholder!==null)&&a.v(),a.data!==null&&Jf(a,function(x){vy(y.partManager,x)}),kt(a)!==!0&&Pf(a)!==!0||this.De.add(a),_1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.$b()},De.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Jf(a,function(x){yy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(eg(a,a.actualBounds)),this.$b()},De.remove=function(a){vh(this,a,!0)};function vh(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(Ga,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}De.Is=function(a,y){if(y===void 0&&(y=!1),fn(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 Un,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},De.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},gn.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Wf(this)),this.toolManager!==null){var b=new Hi;if(a!==null)if(fn(a))for(var z=0;z<a.length;z++)Sc(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Sc(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Sc(this,b,a.value,x,E);for(a=this.nodes;a.next();)Sc(this,b,a.value,x,E);for(a=this.links;a.next();)Sc(this,b,a.value,x,E)}Yc(this,b,y,E,x)}};function Sc(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=Wf(a)),x instanceof Ai){if(y.add(x,a.Pd(b,x,x.location)),x instanceof ho&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Sc(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)&&Sc(a,y,ne,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Sc(a,y,x.value,E,b)}else if(x instanceof hi)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Sc(a,y,x.value,E,b);else x instanceof pa||y.add(x,a.Pd(b,x,x.location))}function Yc(a,y,x,E,b){if(y!==null&&y.count!==0){var z=st.alloc(),ne=st.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||$f(a,y);for(var re=Si(),oe=Si(),ue=y.iterator,ce=st.alloc();ue.next();){var pe=ue.key,we=ue.value;if(pe.Zc()){var Fe=hg(a,pe,y);Fe!==null?re.push(new ie(pe,we,Fe)):(!b||pe.canMove())&&(Fe=we.point,z.assign(Fe),a.computeMove(pe,z.add(ne),E,ce),pe.location=ce,we.shifted===void 0&&(we.shifted=new st),we.shifted.assign(ce.re(Fe)))}else ue.key instanceof hi&&oe.push(ue.sa)}for(st.free(ce),b=re.length,ue=0;ue<b;ue++)pe=re[ue],z.assign(pe.info.point),pe.Su.shifted===void 0&&(pe.Su.shifted=new st),pe.node.location=z.add(pe.Su.shifted);for(b=st.alloc(),ue=st.alloc(),pe=oe.length,we=0;we<pe;we++){var Ie=oe[we];if(Fe=Ie.key,Fe instanceof hi)if(Fe.suspendsRouting){Fe.Tg=null,ce=Fe.fromNode;var ze=Fe.toNode;if(a.draggedLink!==null&&E.dragsLink)if(ze=Ie.value.point,Fe.dragComputation===null)y.add(Fe,a.Pd(E,Fe,ne)),Yh(Fe,ne.x-ze.x,ne.y-ze.y);else{Ie=st.allocAt(0,0),(ce=Fe.i(0))&&ce.w()&&Ie.assign(ce);var gt=ce=st.alloc().assign(Ie).add(ne);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(gt=st.alloc(),Gf(a,Fe,ce,gt,E)),ce.assign(Fe.dragComputation(Fe,ce,gt)).re(Ie),y.add(Fe,a.Pd(E,Fe,ce)),Yh(Fe,ce.x-ze.x,ce.y-ze.y),st.free(Ie),st.free(ce),gt!==ce&&st.free(gt)}else ce!==null&&(b.assign(ce.location),gt=y.I(ce),gt!==null&&b.re(gt.point)),ze!==null&&(ue.assign(ze.location),gt=y.I(ze),gt!==null&&ue.re(gt.point)),ce!==null&&ze!==null?b.Xa(ue)?(ce=Ie.value.point,ze=z,ze.assign(b),ze.re(ce),y.add(Fe,a.Pd(E,Fe,b)),Yh(Fe,ze.x,ze.y)):(Fe.suspendsRouting=!1,Fe.bb()):(Ie=Ie.value.point,ce=ce!==null?b:ze!==null?ue:ne,y.add(Fe,a.Pd(E,Fe,ce)),Yh(Fe,ce.x-Ie.x,ce.y-Ie.y))}else(Fe.fromNode===null||Fe.toNode===null)&&(ce=Ie.value.point,y.add(Fe,a.Pd(E,Fe,ne)),Yh(Fe,ne.x-ce.x,ne.y-ce.y))}st.free(z),st.free(ne),st.free(b),st.free(ue),Fi(re),Fi(oe),x||(Ll(a),Kd(a,y))}}gn.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new st),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=st.alloc(),Gf(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,ue=oe.x;return isNaN(ue)&&(ue=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,ue)),Math.max(ne,Math.min(x.y,oe))),b!==y&&st.free(b),E};function Wf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Gf(a,y,x,E,b){if(b===void 0&&(b=Wf(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=st.allocAt(0,0),z.yi(0,0,a,y,b),tt.No(x.x,x.y,re+z.x,ne+z.y,a,y,E),st.free(z)}}function $f(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof hi&&(y.suspendsRouting=!0)}function Kd(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof hi&&(x.suspendsRouting=!1,iy(x)&&x.bb())}a.Mr=!1}}function hg(a,y,x){return y=y.containingGroup,y!==null&&(a=hg(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}De=gn.prototype,De.Pd=function(a,y,x){if(x===void 0)return new dd(_o);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new dd(new st(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new dd(x.copy())};function fg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&zt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&zt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&zt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&zt("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&&zt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}De.Al=function(a){fg(this,a,null),a.Xe(this);var y=this.Wa,x=y.count-1;if(!a.isTemporary)for(;0<=x&&y.M(x).isTemporary;)x--;return y.Gb(x+1,a),this.cc!==null&&this.cb(Sa,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},De.Ww=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Ga,"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(Sa,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},De.Cy=function(a,y){fg(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Ga,"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(Sa,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},De.kA=function(a){if(a.diagram!==this&&zt("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(Ga,"layers",this,a,null,x,null),this.N(),this.Ya()}}},De.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},De.Yw=function(a){return this.pf===null&&(this.pf=new $n),this.pf.add(a),this.model.Pe(a),this},De.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},De.Pe=function(a){return this.zg===null&&(this.zg=new $n),this.zg.add(a),this},De.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},De.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Na&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},De.cb=function(a,y,x,E,b,z,ne){z===void 0&&(z=null),ne===void 0&&(ne=null);var re=new gr;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)},De.g=function(a,y,x,E,b){this.cb(jo,a,this,y,x,E,b)},gn.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===jo){var b=a.object;if(hs(b,a.propertyName,a.I(y)),b instanceof Ut){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===Sa){var ne=a.object,re=a.newParam,oe=a.newValue;if(ne instanceof si)if(typeof re=="number"&&oe instanceof Ut){y?ne.pc(re):ne.Gb(re,oe);var ue=ne.part;ue!==null&&ue.Wb()}else typeof re=="number"&&oe instanceof ol&&(oe.isRow?d1(ne,re,y?void 0:oe):h1(ne,re,y?void 0:oe));else if(ne instanceof ds){var ce=a.oldParam===!0;typeof re=="number"&&oe instanceof Sr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ne.pc(ce?re:-1,oe,ce)):ne.oi(re,oe,ce))}else ne instanceof gn?typeof re=="number"&&oe instanceof ds&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):zt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Ga){var pe=a.object,we=a.oldParam,Fe=a.oldValue;if(pe instanceof si)typeof we=="number"&&Fe instanceof Ut?y?pe.Gb(we,Fe):pe.pc(we):typeof we=="number"&&Fe instanceof ol&&(Fe.isRow?d1(pe,we,y?Fe:void 0):h1(pe,we,y?Fe:void 0));else if(pe instanceof ds){var Ie=a.newParam===!0;typeof we=="number"&&Fe instanceof Sr&&(y?0>pe.Pa.indexOf(Fe)&&pe.oi(we,Fe,Ie):(Fe.isSelected=!1,Fe.isHighlighted=!1,Fe.Wb(),pe.pc(Ie?we:-1,Fe,Ie)))}else pe instanceof gn?typeof we=="number"&&Fe instanceof ds&&(y?(Fe.Xe(this),this.Wa.Gb(we,Fe)):this.Wa.mb(we)):zt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Na&&zt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},gn.prototype.Ea=function(a){return this.undoManager.Ea(a)},gn.prototype.eb=function(a){return this.undoManager.eb(a)},gn.prototype.Kf=function(){return this.undoManager.Kf()},gn.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}},gn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},gn.prototype.rp=function(){this.partManager.rp()};function gg(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Jc(a),a.N(),a.Ee=!0,E.zb&&(Bl(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,Jc(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,ne=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,ue=a.contentAlignment;isNaN(re)&&(ue.$c()?ue.Hf(qi)?re=0:ue.Hf($i)&&(re=z-1):re=ue.sb()?ue.x*(z-1):z/2),isNaN(oe)&&(ue.$c()?ue.Hf(ri)?oe=0:ue.Hf(ki)&&(oe=ne-1):oe=ue.sb()?ue.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=st.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,st.free(z),a.Ca=x,Jc(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Vu(a,!1),E.zb&&(Bl(E)||E.ce.add(E.H,"scale",y,a.Ca))}}gn.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!==iu||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof zo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Hs(b,this)),this.vb||this.invalidateViewport(a,y),Xc(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 Xc(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=fi.alloc(),b=1,z=1,ne=x.O.s,re=ne.length,oe=0;oe<re;oe++){var ue=ne[oe],ce=Math.abs(ue.interval);2>ce||(bv(ue.figure)?z=z*ce/tt.vx(z,ce):b=b*ce/tt.vx(b,ce))}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=Bn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Bn.free(y);return}b=y.width,z=y.height,a=y.x,ne=y.y,Bn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=st.alloc(),tt.No(a,ne,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),fi.free(E),x.part.location=y,st.free(y)}}gn.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)}},gn.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))},gn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),fn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Sr||zt("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 Sr||zt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},gn.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()}},De=gn.prototype,De.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},De.Jz=function(a){a=new Un().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 Sr||zt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},De.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=st.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)),st.free(z);return}zt("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):zt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),st.free(z)},De.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)},De.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},De.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)},De.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,ue=y.m22,ce=y.dx,pe=y.dy,we=x*ne+E*oe+ce;y=x*re+E*ue+pe;var Fe=b*ne+E*oe+ce;return a=b*re+E*ue+pe,E=x*ne+z*oe+ce,x=x*re+z*ue+pe,ne=b*ne+z*oe+ce,b=b*re+z*ue+pe,z=Math.min(we,Fe),we=Math.max(we,Fe),Fe=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),we=Math.max(we,E),Fe=Math.min(Fe,x),y=Math.max(y,x),z=Math.min(z,ne),we=Math.max(we,ne),Fe=Math.min(Fe,b),y=Math.max(y,b),new Bn(z,Fe,we-z,y-Fe)},De.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),Xr(a.copy(),this.Ab)};function pg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function mg(a){return a=Uf.get(a),a!==null?new a:new ja}gn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===Na&&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===Na){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Ll(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||fl(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&&(pg(this),this.As.clear(),Is(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;ei(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function zh(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)yh(a,y[E])}function yh(a,y){if(y instanceof zu){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Un&&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 vg(a,y){if(y instanceof zu){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 Un&&x.Bg.remove(a),fp(E));break}}}}}gn.prototype.Wd=function(){this.partManager.Wd()},gn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},gn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},gn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},gn.prototype.Vb=function(a){return this.partManager.Vb(a)},gn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},De=gn.prototype,De.Lc=function(a){return this.partManager.Lc(a)},De.ii=function(a){return this.partManager.ii(a)},De.Kc=function(a){return this.partManager.Kc(a)},De.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:Ln(Pr(y)))},De.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:Ln(Pr(y)))};function Jc(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function yg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Vu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}De.Va=function(){if(this.Zi){var a=Bn.alloc();yg(this,this.computeBounds(a)),Bn.free(a)}},De.rz=function(){for(var a=new Un,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},De.qz=function(){return this.ai.iterator},De.Uz=function(a){Ll(this),a&&xh(this,!0),this.ld?Sg(this,!1):(this.Jk=!0,lu(this))};function xh(a,y){for(var x=a.ai.iterator;x.next();)xg(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function xg(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)xg(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Sg(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||Hl(z,"Layout")),a.xh=!1;for(var ne=a.ai.iterator;ne.next();)Pg(a,ne.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Ll(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||fl(z),a.aa=x}}}function Pg(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Pg(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),cs(a,y),b.isValidLayout=!0):a.xh=!0)}}De.yz=function(){for(var a=new $n,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function Hp(a){function y(b){var z=b.toLowerCase(),ne=new $n;x.add(b,ne),x.add(z,ne),E.add(b,b),E.add(z,b)}var x=new Hi,E=new Hi;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function qg(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Vd(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;zt("Unknown DiagramEvent name: "+y)}De.Bj=function(a,y){return a=Vd(this,a),a!==null&&a.add(y),this},De.am=function(a,y){a=Vd(this,a),a!==null&&a.remove(y)},De.R=function(a,y,x){var E=Vd(this,a),b=new Rr;if(b.diagram=this,a=qg(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 Kf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}De.Yj=function(a,y){return gf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},gn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?gh(this,a):a.assign(this.documentBounds)};function gf(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new lm(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=ep(a,x)),x===null){y=Bn.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&&Vf(a,ne,E,y)}Bn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Bn.alloc(),z=x.memberParts;z.next();)ne=z.value,ne instanceof Ai&&Vf(a,ne,E,y);Bn.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&ox(b);return b}function ep(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?ep(a,y.containingGroup):null}function Vf(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(xp(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(Jh,x,y+1);else for(var ne=x;ne<=y;ne++)z[ne]=Jh}else if(y instanceof ho)for(y=y.memberParts;y.next();)b=y.value,b instanceof Ai&&Vf(a,b,x,E)}}function Sh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}gn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():wg(this)};function wg(a){a.vk===-1&&(a.vk=ei(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=Bn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),yg(a,y),Bn.free(y),a.Fc=!0,a.bd(),wg(a))}},a.vp))}gn.prototype.ug=function(){this.vk!==-1&&(ct.clearTimeout(this.vk),this.vk=-1)},gn.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=Bn.allocAt(0,0,E.width*b,E.height*b);var z=st.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(_o)||(y=new st(y.x+z.x/b,y.y+z.y/b)),Bn.free(E),st.free(z),y},De=gn.prototype,De.Cs=function(){return null},De.av=function(){return null},De.bs=function(a,y){this.pj.add(a,y)},De.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof ho&&(y.$p=null)})};function Ph(a,y,x){function E(){var ce=+new Date;for(z=!0,ne.reset();ne.next();)if(!ne.value[0].al){z=!1;break}z||ce-ue>oe?y(x,b,re):ct.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,ue=+new Date;return ct.requestAnimationFrame(function(){E()}),null}De.Wz=function(a){return Ls?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},De.Jx=function(a){return a===void 0&&(a={}),Ph(this,this.Xz,a)},De.Xz=function(a,y,x){var E=tp(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 Eh+"data":b=E.getImageData(0,0,x.width,x.height);break;case Eh:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&zt('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 tp(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&zt("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 fi(1/0,1/0):new fi(2e3,2e3));var re=y.position||null,oe=y.parts||null,ue=y.padding===void 0?1:y.padding,ce=y.background||null,pe=y.omitTemporary;pe===void 0&&(pe=!0);var we=y.document||document,Fe=y.elementFinished||null,Ie=y.showTemporary;Ie===void 0&&(Ie=!pe),y=y.showGrid,y===void 0&&(y=Ie),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof ue=="number"?ue=new pr(ue):ue instanceof pr||zt("MakeImage padding must be a Margin or a number."),ue.left=Math.max(ue.left,0),ue.right=Math.max(ue.right,0),ue.top=Math.max(ue.top,0),ue.bottom=Math.max(ue.bottom,0),a.ib.Vc(!0),pe=new $l(null,we,void 0,!0);var ze=pe.context;if(!(b||z||oe||re))return pe.width=a.Aa+Math.ceil(ue.left+ue.right),pe.height=a.ya+Math.ceil(ue.top+ue.bottom),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=we,E.hs=Fe,Js(a,E.context,ue,new fi(pe.width,pe.height),a.Ca,a.pa,oe,ce,Ie,y),E.context):(a.Xm=!1,Js(a,ze,ue,new fi(pe.width,pe.height),a.Ca,a.pa,oe,ce,Ie,y),a.Xm=!0,pe.context);var gt=a.Pp,nt=a.documentBounds.copy();if(nt.Fv(a.yb),Ie)for(var Et=a.Wa.s,At=Et.length,Tt=0;Tt<At;Tt++){var Vt=Et[Tt];if(Vt.visible&&Vt.isTemporary){Vt=Vt.Pa.s;for(var mn=Vt.length,bi=0;bi<mn;bi++){var Yi=Vt[bi];Yi.isInDocumentBounds&&Yi.isVisible()&&(Yi=Yi.actualBounds,Yi.w()&&nt.ed(Yi))}}}if(Et=new st(nt.x,nt.y),oe!==null){for(At=new Bn(0,0,0,0),Tt=!0,Vt=oe.iterator,Vt.reset();Vt.next();)mn=Vt.value,mn instanceof Sr&&(bi=mn.layer,bi!==null&&!bi.visible||bi!==null&&!Ie&&bi.isTemporary||!mn.isVisible()||(mn=mn.actualBounds,mn.w()&&(Tt?(Tt=!1,At.assign(mn)):At.ed(mn))));nt.width=At.width,nt.height=At.height,Et.x=At.x,Et.y=At.y}return re!==null&&re.w()&&(Et=re,z||(z=gt)),At=re=0,ue!==null&&(re=ue.left+ue.right,At=ue.top+ue.bottom),Tt=Vt=0,b!==null&&(Vt=b.width,Tt=b.height,isFinite(Vt)&&(Vt=Math.max(0,Vt-re)),isFinite(Tt)&&(Tt=Math.max(0,Tt-At))),b!==null&&z!==null?(z==="NaN"&&(z=gt),b.w()?(b=Vt,nt=Tt):isNaN(Tt)?(b=Vt,nt=nt.height*z):(b=nt.width*z,nt=Tt)):b!==null?b.w()?(z=Math.min(Vt/nt.width,Tt/nt.height),b=Vt,nt=Tt):isNaN(Tt)?(z=Vt/nt.width,b=Vt,nt=nt.height*z):(z=Tt/nt.height,b=nt.width*z,nt=Tt):z!==null?z==="NaN"&&ne.w()?(z=Math.min((ne.width-re)/nt.width,(ne.height-At)/nt.height),z>gt?(z=gt,b=nt.width,nt=nt.height):(b=ne.width,nt=ne.height)):(b=nt.width*z,nt=nt.height*z):(z=gt,b=nt.width,nt=nt.height),ue!==null?(b+=re,nt+=At):ue=new pr(0),ne!==null&&(gt=ne.width,ne=ne.height,isNaN(gt)&&(gt=2e3),isNaN(ne)&&(ne=2e3),isFinite(gt)&&(b=Math.min(b,gt)),isFinite(ne)&&(nt=Math.min(nt,ne))),pe.width=Math.ceil(b),pe.height=Math.ceil(nt),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=we,E.hs=Fe,Js(a,E.context,ue,new fi(Math.ceil(b),Math.ceil(nt)),z,Et,oe,ce,Ie,y),E.context):(a.Xm=!1,Js(a,ze,ue,new fi(Math.ceil(b),Math.ceil(nt)),z,Et,oe,ce,Ie,y),a.Xm=!0,pe.context)}wt.Object.defineProperties(gn.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 qo(this,ct.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new qo(this,ct.document),this.bs("SVG",a),a.Oa.style.backgroundColor="whitesmoke",this.div!==null&&this.div.after(a.Oa)),this.hk()))}},div:{get:function(){return this.Ka},set:function(a){if(this.Ka!==a){var y=this.Ka;y!==null?(y.H=void 0,y.goDiagram=void 0,y.go=void 0,y.innerHTML="",this.ta!==null&&(y=this.ta.Oa,this.removeEventListener(y,"pointermove",this.dk,!1),this.removeEventListener(y,"pointerdown",this.ui,!1),this.removeEventListener(y,"pointerup",this.fk,!1),this.removeEventListener(y,"pointerout",this.ek,!1),this.removeEventListener(y,"pointercancel",this.ck,!1),this.ta.mx()),this.ol&&(this.ol.disconnect(),this.ol=null),y=this.toolManager,y!==null&&(y.mouseDownTools.each(function(x){x.cancelWaitAfter()}),y.mouseMoveTools.each(function(x){x.cancelWaitAfter()}),y.mouseUpTools.each(function(x){x.cancelWaitAfter()})),y.cancelWaitAfter(),this.currentTool.doCancel(),this.ta=null,this.removeEventListener(ct,"resize",this.Ov,!1),this.removeEventListener(ct,"wheel",this.$j,!0),Bc===this&&(Bc=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Rh(this,a),this.hk())}}},$w:{get:function(){return this.Sq}},pi:{get:function(){return this.hf}},draggedLink:{get:function(){return this.nt},set:function(a){this.nt!==a&&(this.nt=a,a!==null&&(this.Vt=a.fromPort,this.Wt=a.toPort))}},Mx:{get:function(){return this.Vt},set:function(a){this.Vt=a}},Nx:{get:function(){return this.Wt},set:function(a){this.Wt=a}},animationManager:{get:function(){return this.Yd}},undoManager:{get:function(){return this.cc.undoManager}},skipsUndoManager:{get:function(){return this.Wg},set:function(a){this.Wg=a,this.cc.skipsUndoManager=a}},delaysLayout:{get:function(){return this.lt},set:function(a){this.lt=a}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Qn(a,"0 <= value <= 1",gn,"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),Vu(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),Vu(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),Vu(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),Vu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Qn(a,">= 0",gn,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Qn(a,">= 0",gn,"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 Qn(a,">= 0",gn,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||pg(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&zt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=zd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Hl(this.animationManager,"Model"),y&&(this.pf!==null&&this.pf.each(function(z){return y.ik(z)}),y.ik(this.Oc)),this.cc=a,this.partManager=mg(this.cc.type);for(var 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(ct,"pointermove",this.dk,!0),this.addEventListener(ct,"pointerdown",this.ui,!0),this.addEventListener(ct,"pointerup",this.fk,!0),this.addEventListener(ct,"pointerout",this.ek,!0),this.addEventListener(ct,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ct,"wheel",this.$j,!0),this.addEventListener(ct,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ct,"pointermove",this.dk,!0),this.removeEventListener(ct,"pointerdown",this.ui,!0),this.removeEventListener(ct,"pointerup",this.fk,!0),this.removeEventListener(ct,"pointerout",this.ek,!0),this.removeEventListener(ct,"pointercancel",this.ck,!0),this.addEventListener(y,"pointermove",this.dk,!1),this.addEventListener(y,"pointerdown",this.ui,!1),this.addEventListener(y,"pointerup",this.fk,!1),this.addEventListener(y,"pointerout",this.ek,!1),this.addEventListener(y,"pointercancel",this.ck,!1),this.removeEventListener(ct,"wheel",this.$j,!0),this.removeEventListener(ct,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=st.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),ml(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Jc(this):(this.vb=!0,a=this.scale,ff(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)}st.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=hf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=hf(this)),a.type!==si.Grid&&zt("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),Xc(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),Jc(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||zt("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 pr(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===Yd&&Vu(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,Vu(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,gg(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&gg(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==iu&&Vu(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()||zt("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()||zt("initialViewportSpot must be a specific Spot: "+a),this.yt=a,this.g("initialDocumentSpot",y,a))}},minScale:{get:function(){return this.Ot},set:function(a){var y=this.Ot;y!==a&&(0<a?(this.Ot=a,this.g("minScale",y,a),a>this.scale&&(this.scale=a)):Qn(a,"> 0",gn,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Qn(a,"> 0",gn,"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),Vu(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 pr(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&&zt("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Ld&&a!==Ks&&a!==Ch&&zt("Unknown Diagram.treeCollapsePolicy: "+a),this.uu=a,this.g("treeCollapsePolicy",y,a))}},Ue:{get:function(){return this.pw},set:function(a){this.pw=a}},avoidanceCellSize:{get:function(){return this.aw},set:function(a){this.Xh=null,this.aw=new fi(Math.max(1,a.width),Math.max(1,a.height))}},avoidanceLimit:{get:function(){return this.bw},set:function(a){this.bw=Math.max(1,a)}},autoScrollInterval:{get:function(){return this.vp},set:function(a){var y=this.vp;y!==a&&(this.vp=a,this.g("autoScrollInterval",y,a))}},autoScrollRegion:{get:function(){return this.xp},set:function(a){typeof a=="number"&&(a=new pr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),wt.Object.defineProperties(gn,{licenseKey:{get:function(){return Mg.jc()},set:function(a){Mg.add(a.replace(/\s/g,""))}},version:{get:function(){return Xd}}}),gn.prototype.makeImageData=gn.prototype.Jx,gn.prototype.makeImage=gn.prototype.Wz,gn.prototype.cacheGroupExternalLinks=gn.prototype.Fu,gn.prototype.addRenderer=gn.prototype.bs,gn.prototype.makeSVG=gn.prototype.av,gn.prototype.makeSvg=gn.prototype.Cs,gn.prototype.stopAutoScroll=gn.prototype.ug,gn.prototype.doAutoScroll=gn.prototype.gs,gn.prototype.isUnoccupied=gn.prototype.Yj,gn.prototype.raiseDiagramEvent=gn.prototype.R,gn.prototype.removeDiagramListener=gn.prototype.am,gn.prototype.addDiagramListener=gn.prototype.Bj,gn.prototype.findTreeRoots=gn.prototype.yz,gn.prototype.layoutDiagram=gn.prototype.Uz,gn.prototype.findTopLevelGroups=gn.prototype.qz,gn.prototype.findTopLevelNodesAndLinks=gn.prototype.rz,gn.prototype.ensureBounds=gn.prototype.Va,gn.prototype.findLinksByExample=gn.prototype.ls,gn.prototype.findNodesByExample=gn.prototype.ms,gn.prototype.findLinkForData=gn.prototype.Kc,gn.prototype.findNodeForData=gn.prototype.ii,gn.prototype.findPartForData=gn.prototype.Lc,gn.prototype.findLinkForKey=gn.prototype.findLinkForKey,gn.prototype.findNodeForKey=gn.prototype.Vb,gn.prototype.findPartForKey=gn.prototype.findPartForKey,gn.prototype.rebuildParts=gn.prototype.Wd,gn.prototype.transformViewToDoc=gn.prototype.Ps,gn.prototype.transformRectDocToView=gn.prototype.zA,gn.prototype.transformDocToView=gn.prototype.op,gn.prototype.centerRect=gn.prototype.es,gn.prototype.scrollToRect=gn.prototype.tv,gn.prototype.scroll=gn.prototype.scroll,gn.prototype.highlightCollection=gn.prototype.Jz,gn.prototype.highlight=gn.prototype.Iz,gn.prototype.selectCollection=gn.prototype.rA,gn.prototype.select=gn.prototype.select,gn.prototype.updateAllRelationshipsFromData=gn.prototype.rp,gn.prototype.updateAllTargetBindings=gn.prototype.updateAllTargetBindings,gn.prototype.commit=gn.prototype.commit,gn.prototype.rollbackTransaction=gn.prototype.Kf,gn.prototype.commitTransaction=gn.prototype.eb,gn.prototype.startTransaction=gn.prototype.Ea,gn.prototype.raiseChanged=gn.prototype.g,gn.prototype.raiseChangedEvent=gn.prototype.cb,gn.prototype.removeChangedListener=gn.prototype.ik,gn.prototype.addChangedListener=gn.prototype.Pe,gn.prototype.removeModelChangedListener=gn.prototype.mA,gn.prototype.addModelChangedListener=gn.prototype.Yw,gn.prototype.findLayer=gn.prototype.Qj,gn.prototype.removeLayer=gn.prototype.kA,gn.prototype.addLayerAfter=gn.prototype.Cy,gn.prototype.addLayerBefore=gn.prototype.Ww,gn.prototype.addLayer=gn.prototype.Al,gn.prototype.moveParts=gn.prototype.moveParts,gn.prototype.copyParts=gn.prototype.Kj,gn.prototype.removeParts=gn.prototype.Is,gn.prototype.remove=gn.prototype.remove,gn.prototype.add=gn.prototype.add,gn.prototype.clearDelayedGeometries=gn.prototype.bx,gn.prototype.setProperties=gn.prototype.nm,gn.prototype.attach=gn.prototype.Du,gn.prototype.set=gn.prototype.set,gn.prototype.resetInputOptions=gn.prototype.Sx,gn.prototype.setInputOption=gn.prototype.sA,gn.prototype.getInputOption=gn.prototype.Ql,gn.prototype.resetRenderingHints=gn.prototype.Tx,gn.prototype.setRenderingHint=gn.prototype.Xx,gn.prototype.getRenderingHint=gn.prototype.Gf,gn.prototype.maybeUpdate=gn.prototype.bd,gn.prototype.requestUpdate=gn.prototype.$b,gn.prototype.delayInitialization=gn.prototype.Xy,gn.prototype.isUpdateRequested=gn.prototype.Pz,gn.prototype.invalidateDocumentBounds=gn.prototype.Ya,gn.prototype.findObjectsNear=gn.prototype.og,gn.prototype.findPartsNear=gn.prototype.mz,gn.prototype.findObjectsIn=gn.prototype.Cf,gn.prototype.findPartsIn=gn.prototype.ux,gn.prototype.findObjectsAt=gn.prototype.ji,gn.prototype.findPartsAt=gn.prototype.lz,gn.prototype.findObjectAt=gn.prototype.ic,gn.prototype.findPartAt=gn.prototype.Ol,gn.prototype.focusObject=gn.prototype.zz,gn.prototype.alignDocument=gn.prototype.Jy,gn.prototype.zoomToRect=gn.prototype.BA,gn.prototype.zoomToFit=gn.prototype.zoomToFit,gn.prototype.diagramScroll=gn.prototype.kx,gn.prototype.focus=gn.prototype.focus;var Uf=new Hi,np=null,Ls=ct.document!==void 0,Zh=null,Ud="",iu=new Jt(gn,"None",0),Ru=new Jt(gn,"Uniform",1),Hh=new Jt(gn,"UniformToFill",2),wh=new Jt(gn,"CycleAll",10),Cg=new Jt(gn,"CycleNotDirected",11),Eg=new Jt(gn,"CycleNotDirectedFast",12),bg=new Jt(gn,"CycleNotUndirected",13),Fg=new Jt(gn,"CycleDestinationTree",14),Bg=new Jt(gn,"CycleSourceTree",15),Yd=new Jt(gn,"DocumentScroll",1),pf=new Jt(gn,"InfiniteScroll",2),Ld=new Jt(gn,"TreeParentCollapsed",21),Ks=new Jt(gn,"AllParentsCollapsed",22),Ch=new Jt(gn,"AnyParentsCollapsed",23),Mg=new $n,Xd="2.3.10",Eh="image",mf=null,ip=!1;function Jl(){if(Ls){var a=ct.document.createElement("canvas"),y=a.getContext("2d"),x=Ki("7ca11abfd022028846");y[x]=Ki("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",an.Dx+"4ae6247590da4bb21c324ba3a84e385776",Xt.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",tt.za],b=1;5>b;b++)y[Ki("7ca11abfd7330390")](Ki(E[b-1]),10,15*b);for(y[x]=Ki("39f046ebb36e4b"),x=1;5>x;x++)y[Ki("7ca11abfd7330390")](Ki(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Xt.prototype.Cd=Xt.prototype.Eu),mf=a}}gn.className="Diagram",gn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ct.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof gn?y.H:null},gn.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},gn.useDOM=function(a){Ls=a?ct.document!==void 0:!1},gn.isUsingDOM=function(){return Ls},gn.None=iu,gn.Uniform=Ru,gn.UniformToFill=Hh,gn.CycleAll=wh,gn.CycleNotDirected=Cg,gn.CycleNotDirectedFast=Eg,gn.CycleNotUndirected=bg,gn.CycleDestinationTree=Fg,gn.CycleSourceTree=Bg,gn.DocumentScroll=Yd,gn.InfiniteScroll=pf,gn.TreeParentCollapsed=Ld,gn.AllParentsCollapsed=Ks,gn.AnyParentsCollapsed=Ch;function rp(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Jd(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=ct[Ki("76a715b2f73f148a")][Ki("72ba13b5")]||"";if(a.Rc=!0,Ls){var E=gn[Ki("76a115b6ed251eaf4692")];if(E)for(var b=Mg.iterator;b.next()&&(E=b.value,E=Ki(E).split(Ki("39e9")),!(6>E.length));){var z=Ki(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ne=Ki(an[Ki("6cae19")]).split(".");if(z[0]>ne[0]||z[0]===ne[0]&&z[1]>=ne[1]){var re=ct[Ki("74a900bae4370f8b51")][Ki("6fbb13a1c2311e8a57")].toLowerCase();if(ne=re[Ki("73a612b6fb191d")](Ki("3aad1ab6e022098b4dc4")),z=Ki(E[2]),-1<ne&&(re=re[Ki("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ne),!a.Rc))break;for(ne=x[Ki("76ad18b4f73e")],re=x[Ki("73a612b6fb191d")](Ki("35e7"))+2;re<ne;re++)y+=x[re];if(ne=y[Ki("73a612b6fb191d")](z),0>ne&&z!==Ki("7da71ca0ad381e90")&&(ne=y[Ki("73a612b6fb191d")](Ki("76a715b2ef3e149757"))),0>ne&&(ne=y[Ki("73a612b6fb191d")](Ki("76a715b2ef3e149757"))),0>ne&&(ne=y[Ki("73a612b6fb191d")](Ki("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Ki("73a612b6fb191d")](Ki("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Ki("73a612b6fb191d")](Ki("35"))||y[Ki("73a612b6fb191d")](Ki("35"))===-1),!a.Rc||x[Ki("73a612b6fb191d")](Ki("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Ki("73a612b6fb191d")](z)),!a.Rc)||(ne=ct[Ki("76a715b2f73f148a")][Ki("69ad17a1e03e")],re=ne[Ki("73a612b6fb191d")](Ki("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ne[Ki("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ne=ct.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[Ki("79a417a0f0181a8946")]=E,ct.document[Ki("78a712aa")]){ct.document[Ki("78a712aa")][Ki("7bb806b6ed32388c4a875b")](ne),oe=ct.getComputedStyle(ne).getPropertyValue(Ki("78a704b7e62456904c9b12701b6532a8"));var ue=ct.getComputedStyle(ne).getPropertyValue(Ki("75b817b0ea2202"));if(ct.document[Ki("78a712aa")][Ki("68ad1bbcf533388c4a875b")](ne),oe){if(ne=ct[Ki("77a902b0eb1b1e804a8a")],ue==="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(Ki("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ne=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ce in ne)if(E===ne[ce].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ce=x[Ki("76ad18b4f73e")],b=x[Ki("73a612b6fb191d")](Ki("35e7"))+2;b<ce;b++)y+=x[b];x=y[Ki("73a612b6fb191d")](Ki("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Ki("73a612b6fb191d")](Ki("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function dd(a){this.j=a===void 0?new st:a,this.o=new st}wt.Object.defineProperties(dd.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 bh="DraggingInfo";dd.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ae(){this.reset()}ae.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new fi(NaN,NaN).freeze(),this.gridSnapCellSpot=Us,this.gridSnapOrigin=new st(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"||ct.Element&&a instanceof Element)var x=gn.call(this,a)||this;else x=gn.call(this)||this,y=a;return fe(x),y&&x.nm(y),x}Zt(ge,gn);function fe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Vl,a.layout=new _l}ge.prototype.reset=function(){gn.prototype.reset.call(this),fe(this)},ge.className="Palette";function ye(a,y){if(typeof a=="string"||ct.Element&&a instanceof Element)var x=gn.call(this,a)||this;else x=gn.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 Sr;var b=new Co;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 pr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new pt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ne=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new st(re.x-ne.width/2,re.y-ne.height/2)}},x.Pf=function(){E.Ya(),Ye(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&&Ye(E)},x.autoScale=Ru,x.vb=!1,y&&Object.assign(x,y),x}Zt(ye,gn),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(cc(this),this.ql===null){var x=new $l(null);x.width=a.width,x.height=a.height,this.ql=x}try{this.ta=this.ql,this.ib=this.ta.context,this.ib.Vc(!0),this.ib.setTransform(1,0,0,1,0,0),this.ib.clearRect(0,0,this.ta.width,this.ta.height),Re(this)}finally{this.ta=a,this.ib=y}}}gn.prototype.redraw.call(this)},ye.prototype.gc=function(){if(this.Ka===null&&zt("No div specified"),this.ta===null&&zt("No canvas specified"),!(this.ta instanceof qo)&&($v(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){cc(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?Re(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Re(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=Bn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Xc(y,b),Bn.free(b),Ll(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 ue=re.diagram.grid.part;if(!x&&re.isTemporary)E&&ue.layer===re&&(re=xl(re,b),ue.gc(b,oe),b.globalAlpha=re);else{for(var ce=xl(re,b),pe=oe.scale,we=Bn.alloc(),Fe=re.Pa.s,Ie=Fe.length,ze=0;ze<Ie;ze++){var gt=Fe[ze];(E||gt!==ue)&&re.Oj(b,gt,oe,null,pe,we,!1)}Bn.free(we),b.globalAlpha=ce}}}}}function Ye(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=fi.alloc();b.h(x.width,x.height),E.desiredSize=b,fi.free(b),a=2/a.scale,E instanceof Co&&(E.strokeWidth=a),y.location=new st(x.x-a/2,x.y-a/2),y.isSelected=!0}}}ye.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Vo;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(),Ye(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))},wt.Object.defineProperties(ye.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof ye&&zt("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),Ye(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),Ye(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 pt(){is.call(this),this.j=null}Zt(pt,is),pt.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 st(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)),!0)},pt.prototype.doActivate=function(){this.j=null,is.prototype.doActivate.call(this)},pt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},pt.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 st(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)}}},pt.className="OverviewDraggingTool";function ft(){Do(this),this.H=Bc,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=Vo,this.hb=!0,this.cg=null,this.ob=200}ft.prototype.toString=function(){return"CommandHandler"},ft.prototype.Xe=function(a){this.H=a},ft.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Qr?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()},ft.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},ft.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof zo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},ft.prototype.canStopCommand=function(){return!0},ft.prototype.selectAll=function(){var a=this.diagram;a.N();try{a.currentCursor="wait",a.R("ChangingSelection",a.selection);for(var y=a.parts;y.next();)y.value.isSelected=!0;for(var x=a.nodes;x.next();)x.value.isSelected=!0;for(var E=a.links;E.next();)E.value.isSelected=!0}finally{a.R("ChangedSelection",a.selection),a.currentCursor=""}},ft.prototype.canSelectAll=function(){return this.diagram.allowSelect},ft.prototype.deleteSelection=function(){var a=this.diagram;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Delete"),a.R("SelectionDeleting",a.selection);for(var y=new Un,x=a.selection.iterator;x.next();)Cf(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=""}},ft.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},ft.prototype.copySelection=function(){var a=this.diagram,y=new Un;for(a=a.selection.iterator;a.next();)Cf(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},ft.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},ft.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},ft.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},ft.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Zh=null,Ud="";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 $n,x.addAll(z),Zh=x,Ud=y.model.dataFormat}}y.R("ClipboardChanged",x)},ft.prototype.pasteFromClipboard=function(){var a=new Un,y=Zh;if(y===null)return a;var x=this.diagram;if(Ud!==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},ft.prototype.pasteSelection=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Paste");var x=this.pasteFromClipboard();0<x.count&&y.clearSelection(!0);for(var 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);Yc(y,z,new st(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=""}},ft.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Zh===null||Zh.count===0||Ud!==a.model.dataFormat)},ft.prototype.undo=function(){this.diagram.undoManager.undo()},ft.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},ft.prototype.redo=function(){this.diagram.undoManager.redo()},ft.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},ft.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===iu&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ft.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==iu?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ft.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===iu&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},ft.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==iu?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},ft.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},ft.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},ft.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Hl(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=Vo):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),fl(y)},ft.prototype.canZoomToFit=function(){return this.diagram.allowZoom},ft.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(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;Hl(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=jt(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 Ai&&oe.isTreeExpanded&&(!(oe instanceof ho)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof Sr&&y.tv(oe.actualBounds),oe instanceof Ai&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof ho&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof Sr&&y.es(oe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){ei(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 jt(a,y,x){if(y.isVisible())return x;if(y instanceof pa)jt(a,y.adornedPart,x);else if(y instanceof hi){var E=y.fromNode;E!==null&&jt(a,E,x),y=y.toNode,y!==null&&jt(a,y,x)}else y instanceof Ai&&(E=y.labeledLink,E!==null&&jt(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),jt(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),jt(a,y,x));return x}ft.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Sr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},ft.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Hl(y.animationManager,"Collapse Tree");var x=new $n;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 Ai&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},ft.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Ai&&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 Ai&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ft.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Hl(y.animationManager,"Expand Tree");var x=new $n;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 Ai&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},ft.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Ai)||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 Ai&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},ft.prototype.groupSelection=function(){var a=this.diagram,y=a.model;if(y.Xj()){var x=this.archetypeGroupData;if(x!==null){var E=null;try{a.currentCursor="wait",a.R("ChangingSelection",a.selection),a.Ea("Group");for(var b=new $n,z=a.selection.iterator;z.next();){var ne=z.value;ne.Zc()&&ne.canGroup()&&b.add(ne)}for(var re=new $n,oe=b.iterator;oe.next();){var ue=oe.value;z=!1;for(var ce=b.iterator;ce.next();)if(ue.Td(ce.value)){z=!0;break}z||re.add(ue)}if(0<re.count){var pe=re.first().containingGroup;if(pe!==null)for(;pe!==null;){b=!1;for(var we=re.iterator;we.next();)if(!we.value.Td(pe)){b=!0;break}if(b)pe=pe.containingGroup;else break}if(x instanceof ho)Zc(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Fe=y.copyNodeData(x);tn(Fe)&&(y.xf(Fe),E=a.ii(Fe))}if(E!==null){pe!==null&&this.isValidMember(pe,E)&&(E.containingGroup=pe);for(var Ie=re.iterator;Ie.next();){var ze=Ie.value;this.isValidMember(E,ze)&&(ze.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},ft.prototype.canGroupSelection=function(){var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowGroup||!a.model.Xj()||this.archetypeGroupData===null)return!1;for(a=a.selection.iterator;a.next();){var y=a.value;if(y.Zc()&&y.canGroup())return!0}return!1};function Mn(a){var y=Si();for(a=a.iterator;a.next();){var x=a.value;x instanceof hi||y.push(x)}a=new Un,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 Fi(y),a}ft.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof hi)return!1;if(a!==null){if(a===y||a.Td(y))return!1;var x=a.memberValidation;if(x!==null&&!x(a,y)||a.data===null&&y.data!==null||a.data!==null&&y.data===null)return!1}return x=this.memberValidation,x!==null?x(a,y):!0},ft.prototype.ungroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.model;if(x.Xj())try{y.currentCursor="wait",y.R("ChangingSelection",y.selection),y.Ea("Ungroup");var E=new $n;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof ho&&z.canUngroup()&&E.add(z)}var ne=new $n;if(0<E.count){y.clearSelection(!0);for(var re=E.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var ue=oe.containingGroup,ce=ue!==null&&ue.data!==null?x.wa(ue.data):void 0;ne.addAll(oe.memberParts);for(var pe=ne.iterator;pe.next();){var we=pe.value;if(we.isSelected=!0,!(we instanceof hi)){var Fe=we.data;Fe!==null?x.mp(Fe,ce):we.containingGroup=ue}}y.remove(oe)}}y.R("SelectionUngrouped",E,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},ft.prototype.canUngroupSelection=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowDelete||!y.allowUngroup||!y.model.Xj())return!1;if(a!==null){if(!(a instanceof ho))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ho&&y.canUngroup())return!0;return!1},ft.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Mn(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},ft.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Hl(y.animationManager,"Collapse SubGraph");var x=new $n;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 ho&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},ft.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof ho&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ho&&y.isSubGraphExpanded)return!0;return!1},ft.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Hl(y.animationManager,"Expand SubGraph");var x=new $n;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 ho&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},ft.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof ho&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof ho&&!y.isSubGraphExpanded)return!0;return!1},ft.prototype.editTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.toolManager.findTool("TextEditing");if(x!==null){if(a===null){a=null;for(var 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 Qa&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},ft.prototype.canEditTextBlock=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly||y.isModelReadOnly||!y.allowTextEdit||y.toolManager.findTool("TextEditing")===null)return!1;if(a!==null){if(!(a instanceof Qa))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 Qa&&x.editable}),a!==null))return!0;return!1},ft.prototype.showContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");if(x!==null&&(a===void 0&&(a=0<y.selection.count?y.selection.first():y),a=x.findObjectWithContextMenu(a),a!==null)){var E=y.lastInput,b=null;a instanceof Ut?b=a.ga(Io):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new st(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,Va(x,!1,a)}},ft.prototype.canShowContextMenu=function(a){var y=this.diagram,x=y.toolManager.findTool("ContextMenu");return x===null?!1:(a===void 0&&(a=0<y.selection.count?y.selection.first():y),x.findObjectWithContextMenu(a)!==null)},ft.prototype.computeEffectiveCollection=function(a,y){var x=this.diagram,E=x.toolManager.findTool("Dragging"),b=x.currentTool===E;if(y===void 0&&(y=b?E.dragOptions:x.Wm),E=new Hi,a===null)return E;for(var z=a.iterator;z.next();)Sc(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 hi&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},wt.Object.defineProperties(ft.prototype,{diagram:{get:function(){return this.H}},copiesClipboardData:{get:function(){return this.o},set:function(a){this.o=a}},copiesConnectedLinks:{get:function(){return this.u},set:function(a){this.u=a}},deletesConnectedLinks:{get:function(){return this.Ha},set:function(a){this.Ha=a}},copiesTree:{get:function(){return this.ia},set:function(a){this.ia=a}},deletesTree:{get:function(){return this.nb},set:function(a){this.nb=a}},copiesParentKey:{get:function(){return this.V},set:function(a){this.V=a}},copiesGroupKey:{get:function(){return this.F},set:function(a){this.F=a}},archetypeGroupData:{get:function(){return this.j},set:function(a){this.j=a}},memberValidation:{get:function(){return this.ij},set:function(a){this.ij=a}},defaultScale:{get:function(){return this.diagram.defaultScale},set:function(a){this.diagram.defaultScale=a}},zoomFactor:{get:function(){return this.Hb},set:function(a){1<a||zt("zoomFactor must be larger than 1.0, not: "+a),this.Hb=a}},isZoomToFitRestoreEnabled:{get:function(){return this.hb},set:function(a){this.hb=a}},scrollToPartPause:{get:function(){return this.ob},set:function(a){this.ob=a}}}),ft.className="CommandHandler",Zd=function(){return new ft};function Ut(){Do(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new st(NaN,NaN).freeze(),this.jd=ms,this.Ab=new Xt,this.wh=new Xt,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=ll,this.uc=new Bn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Bn(NaN,NaN,NaN,NaN).freeze(),this.dc=new Bn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Bi,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 oi,ni,ir,cr,Br,ao,Ho,Bo,ea,_a;Ut.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=kn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Ut.prototype.Vw=function(a){var y=this.Dh;if(fn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Ut.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Ut.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},Ut.prototype.copy=function(){return this.clone()},De=Ut.prototype,De.qb=function(a){a.classType===hi?a.name.indexOf("Orient")===0?this.segmentOrientation=a:zt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Ut&&(this.stretch=a)},De.toString=function(){return Ti(this.constructor)+"#"+Ji(this)},De.th=function(){this.A!==null&&(this.A.nc=!0)};function Mo(a){a.A===null?a.A=new Kr:a.A.nc&&(a.A=a.A.copy())}De.Xc=function(){if(this.ba===null){var a=new vo;a.Xi=Ss,a.yj=Ss,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},De.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===jo&&Se(this)&&ns(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 Hi),ne=z.undoManager.transactionLevel===0,a.startCondition===yl?ne=!0:a.startCondition===Xs&&(ne=!1),ne?(z=new Ms,ys(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()):(Hl(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof si&&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 si&&Jf(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function ns(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=Bx(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))}}De.ks=function(a){return this.bindingId===a?this:null},De.g=function(a,y,x){this.cb(jo,a,this,y,x)},De.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 Xt);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function rl(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}De.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?ha(a.x,a.y,0,0,0,E.height)<=y||ha(a.x,a.y,0,E.height,E.width,E.height)<=y||ha(a.x,a.y,E.width,E.height,E.width,0)<=y||ha(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},De.se=function(){return!0},De.ca=function(a){var y=st.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return st.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=ya(x.x-ne*oe,x.y-ne*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),st.free(y),a}return b=!1,(this instanceof pa||this instanceof Co?ya(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)),st.free(y),b},De.gh=function(a){var y=this.naturalBounds;return ya(0,0,y.width,y.height,a.x,a.y)},De.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Bn.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=st.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)))),st.free(b),Bn.free(y),E},De.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=st.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)))),st.free(b),E},De.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=st.allocAt(0,0),b=st.allocAt(0,x.height),z=st.allocAt(x.width,x.height),ne=st.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=Bn.allocAt(0,0,x.width,x.height);var oe=st.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)))),st.free(oe),Bn.free(x),!re&&(tt.us(a,E,b)||tt.us(a,b,z)||tt.us(a,z,ne)||tt.us(a,ne,E))&&(re=!0)}return st.free(E),st.free(b),st.free(z),st.free(ne),re},De.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof Qi){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},De.mi=function(a){a===void 0&&(a=new Bn);var y=this.naturalBounds,x=this.oe,E=st.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),gs(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),gs(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),gs(a,E.x,E.y,0,0),st.free(E),a},De.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},De.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},De.qs=function(a,y){return y===void 0&&(y=new st),y.assign(a),this.oe.Cd(y),y},De.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},De.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,ue=-z.m21*ne,ce=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),we=ne*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,tt.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ne=a*re+y*ue+pe,a=a*oe+y*ce+we,y=x*re+E*ue+pe,x=x*oe+E*ce+we,b.h(0,0),E=this.naturalBounds,x=tt.Ff(0,0,E.width,E.height,ne,a,y,x,b),b.transform(z),x)},Ut.prototype.measure=function(a,y,x,E){if(yt(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 si;switch(fu(this,!0)){case ni:ne=b=0,re&&(y=a=1/0);break;case oi:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(ne=y);break;case cr:isFinite(a)&&a>x&&(b=a),ne=0,re&&(y=1/0);break;case Br: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()||zt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),vt(this,!1)}},Ut.prototype.Wl=function(){},Ut.prototype.Dd=function(){return!1},Ut.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Bn.alloc();z.assign(this.Ib),this.Ib.ka(),kt(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&&$h(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 Qa&&(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()||zt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Ht(this,!1),Bn.free(z)},De=Ut.prototype,De.eh=function(){};function ru(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=fu(a,!0),x===E&&z===b&&(y=ni),y){case ni:(x>E||z>b)&&(vt(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case oi:vt(a,!0),a.measure(E,b,0,0);break;case cr:vt(a,!0),a.measure(E,z,0,0);break;case Br:vt(a,!0),a.measure(x,b,0,0)}}}De.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||Uv(x,!0),this.N(),_s(a,y)||(x.oh(),this.Pn(x)))},De.Pn=function(a){this.portId!==null&&(Uv(a,!0),a instanceof Ai&&G1(a,this))},De.gc=function(a,y){if(!Yu(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 si&&$h(this),ne=this.Ib;if(z){var re=this.Ib,oe=this.dc,ue=this.areaBackground,ce=this.Ma;ue===null&&ce===null||a.yc(),ue!==null&&(Ns(this,a,ue,!0,!0,oe,re),ue instanceof da&&ue.type===Nc?(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)),ce!==null&&(Ns(this,a,ce,!0,!1,oe,re),ce instanceof da&&ce.type===Nc?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ce)):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&&Pl(this),ue=this.part,oe=!1;var pe=0;ue&&y.Gf("drawShadows")&&(oe=ue.isShadowed)&&(ce=ue.shadowOffset,pe=Math.max(ce.y,ce.x)*y.scale*y.Mb),ce=this.Dd();var we;if(!(we=y.$i||!ce)){var Fe=this.naturalBounds;we=this.wh;var Ie=we.m11,ze=we.m21,gt=we.dx,nt=we.m12,Et=we.m22,At=we.dy,Tt,Vt=Tt=0;we=Tt*Ie+Vt*ze+gt;var mn=Tt*nt+Vt*Et+At;Tt=Fe.width+pe,Vt=0;var bi=Tt*Ie+Vt*ze+gt;Tt=Tt*nt+Vt*Et+At,Vt=Math.min(we,bi);var Yi=Math.min(mn,Tt),Gi=Math.max(we+0,bi)-Vt,di=Math.max(mn+0,Tt)-Yi;we=Vt,mn=Yi,Tt=Fe.width+pe,Vt=Fe.height+pe,bi=Tt*Ie+Vt*ze+gt,Tt=Tt*nt+Vt*Et+At,Vt=Math.min(we,bi),Yi=Math.min(mn,Tt),Gi=Math.max(we+Gi,bi)-Vt,di=Math.max(mn+di,Tt)-Yi,we=Vt,mn=Yi,Tt=0,Vt=Fe.height+pe,bi=Tt*Ie+Vt*ze+gt,Tt=Tt*nt+Vt*Et+At,Vt=Math.min(we,bi),Yi=Math.min(mn,Tt),Gi=Math.max(we+Gi,bi)-Vt,di=Math.max(mn+di,Tt)-Yi,we=Vt,mn=Yi,pe=y.viewportBounds,Fe=pe.x,Ie=pe.y,we=!(we>pe.width+Fe||Fe>Gi+we||mn>pe.height+Ie||Ie>di+mn)}if(we){if(we=(this.l&256)!==0,a.clipInsteadOfFill&&(we=!1),this instanceof Qa&&(a.font=this.font),we){if(mn=re.se()?re.naturalBounds:re.actualBounds,Gi=Math.max(ne.x,mn.x),di=Math.max(ne.y,mn.y),pe=Math.min(ne.right,mn.right)-Gi,Fe=Math.min(ne.bottom,mn.bottom)-di,Ie=this.tb,Ie!==null&&(Gi=Ie.x,di=Ie.y,pe=Ie.width,Fe=Ie.height),Gi>ne.width+ne.x||ne.x>mn.width+mn.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Gi,di,pe,Fe),a.clip()}if(ce){if(!ue.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}oe&&(mn=ue.shadowOffset,a.Ev(mn.x*y.scale*this.scale*y.Mb,mn.y*y.scale*this.scale*y.Mb,ue.shadowBlur),Ol(a),a.shadowColor=ue.shadowColor)}oe&&this.shadowVisible===!0?Ol(a):oe&&this.shadowVisible===!1&&gu(a),ue=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Uu(this,a,ue,ne)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&Sl(this,re)&&this.shadowVisible===null&&gu(a),this.Ma!==null&&(a.yc(),wu(this,a,ue,ne)),oe&&(this.Ma!==null||this.areaBackground!==null||Sl(this,re))?(Pc(this,!0),this.shadowVisible===null&&gu(a)):Pc(this,!1),this.hh(a,y),oe&&this.l&512&&Ol(a),ce&&oe&&gu(a),we&&(a.restore(),a.Vc(this instanceof si)),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 Sl(a,y){return y===null?!1:($h(y)&&(y=y.panel),(y.l&512)!==0||(y.type===si.Auto||y.type===si.Spot)&&y.Pb()!==a)}De.Dv=function(){};function Uu(a,y,x,E){Ns(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof da&&a.areaBackground.type===Nc?(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 wu(a,y,x,E){var b=a.kq(),z=x.x,ne=x.y,re=x.width+b,oe=x.height+b;Ns(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof da&&a.Ma.type===Nc?(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 Ql(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===si.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 Yu(a,y,x){if(!(y instanceof Da))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&&Ql(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),Ol(y),y.shadowColor=a.shadowColor}a instanceof Qa&&(y.font=a.font),y.yd=null;var ne=a.transform;z=a instanceof si;var re=a instanceof si?$h(a):!1;a.l&4096&&Pl(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&re?(Lc(y,1,0,0,1,0,0),a.svg=y.ad):z?(Lc(y,ne.m11,ne.m12,ne.m21,ne.m22,ne.dx,ne.dy),a.svg=y.ad):Lc(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var ue=ne.copy().Vj();y.rb.ha=[ue.m11,ue.m12,ue.m21,ue.m22,ue.dx,ue.dy],Uu(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]),wu(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],wu(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&&Ol(y),re&&a.shadowVisible===!0?Ol(y):re&&a.shadowVisible===!1&&gu(y),b=a.panel,re&&Sl(a,b)&&a.shadowVisible===null&&gu(y),y.Il&&(ue=x.computePixelRatio(),ue="drop-shadow("+y.shadowOffsetX/ue+"px "+y.shadowOffsetY/ue+"px "+y.shadowBlur/ue/2+"px "+y.shadowColor+")",a.background!==null&&ne.Ma.setAttributeNS(null,"filter",ue),a.areaBackground!==null&&ne.gd.setAttributeNS(null,"filter",ue)),re&&(a.Ma!==null||a.areaBackground!==null||Sl(a,b))?(Pc(a,!0),a.shadowVisible===null&&gu(y)):Pc(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,ue=a.svg,!z&&ue!==null&&re!==ue&&ue.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,E,oe,re),hu(y,ue),!0):(a.svg=re,ne!==null&&re===null&&(wc(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&&Ol(y),a.Dd()&&gu(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&&Ql(a,E,re),ne!==null&&ne(a,re)),!0)}De.$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"+la++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ne,height:x}),this instanceof si&&(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"),hu(a,E)};function hu(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function ql(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Pr(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()}}De.hh=function(){},De.lv=function(){this.Uc=!0},De.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 si?$h(this):!1;if(!(this instanceof si&&b))if(this instanceof zu){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&Os(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",eu(a)):y.setAttributeNS(null,"transform",eu(a))}else if(!x||this instanceof si)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Co){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],Uu(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&&Nd(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Nd(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof si))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),wu(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Nd(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&&Nd(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},De.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 Ns(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===Gh)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ue=a.kq();if(re=z.width,oe=z.height,b?(re=ne.width,oe=ne.height):E||(re+=ue,oe+=ue),(z=y instanceof fd)&&x.xe&&(x.type===lp||x.yk===re&&x.ft===oe))var ce=x.xe;else{var pe=0,we=0,Fe=0,Ie=0,ze=0,gt=0;if(gt=ze=0,b?(ze=ne.x,gt=ne.y):E||(ze-=ue/2,gt-=ue/2),pe=x.start.x*re+x.start.offsetX,we=x.start.y*oe+x.start.offsetY,Fe=x.end.x*re+x.end.offsetX,Ie=x.end.y*oe+x.end.offsetY,pe+=ze,Fe+=ze,we+=gt,Ie+=gt,x.type===Bh)ce=y.createLinearGradient(pe,we,Fe,Ie);else if(x.type===Nc)gt=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(ze=0,gt=Math.max(re,oe)/2):ze=x.startRadius,ce=y.createRadialGradient(pe,we,ze,Fe,Ie,gt);else if(x.type===lp)try{ce=y.createPattern(x.pattern,"repeat")}catch(Et){ce=null}if(x.type!==lp&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ce.addColorStop(b.key,b.value);if(z&&(x.xe=ce,ce!==null&&(x.yk=re,x.ft=oe),ce===null&&x.type===lp&&x.yk!==-1)){x.yk=-1;var nt=a.diagram;nt!==null&&x.yk===-1&&ei(function(){nt.redraw()},600)}}E?y.fillStyle=ce:y.strokeStyle=ce}}}De.rg=function(a){if(a instanceof si)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},De.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},De.If=function(){for(var a=this instanceof si?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Pl(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){ke(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)}ke(a,!1),$e(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,$e(a,!1)):y.oe!==null&&(x=a.wh,x.reset(),y.se()?x.multiply(y.wh):y.panel!==null&&x.multiply(y.panel.wh),x.multiply(a.Ab),a.Kk=a.scale*y.Kk,$e(a,!1)))}De.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=st.alloc();z.yi(y,x,E,b,Io),a.rotate(this.Kb,z.x,z.y),st.free(z)}},De.v=function(a){if(!yt(this)){a===void 0&&(a=!1),vt(this,!0),Ht(this,!0);var y=this.panel;y===null||a||y.v()}},De.Uj=function(){yt(this)||(vt(this,!0),Ht(this,!0))};function uu(a){if(!kt(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Ai&&a.Bd(),y.$b())),Ht(a,!0)}}De.Uk=function(){!(this.l&2048)&&(ke(this,!0),$e(this,!0))},De.Wu=function(){$e(this,!0)},De.N=function(){var a=this.part;a!==null&&a.N()};function fu(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===si.Table?jc(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===si.Auto&&E.Pb()===a?wl(a,oi,y):x===ao?E!==null?E.type===si.Spot&&E.Pb()===a?wl(a,oi,y):(x=E.defaultStretch,x===ao?wl(a,ni,y):wl(a,x,y)):wl(a,ni,y):wl(a,x,y)}function jc(a,y,x,E){var b=a.stretch;if(b!==ao)return wl(a,b,E);var z=b=null;switch(y.stretch){case Br:z=!0;break;case oi:z=!0}switch(x.stretch){case cr:b=!0;break;case oi:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===cr||y===oi),z===null&&(z=y===Br||y===oi),b===!0&&z===!0?wl(a,oi,E):b===!0?wl(a,cr,E):z===!0?wl(a,Br,E):wl(a,ni,E)}function wl(a,y,x){if(x)return y;if(y===ni||(x=a.desiredSize,x.w()))return ni;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===cr)return ni;if(y===oi)return Br}else{if(y===Br)return ni;if(y===oi)return cr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Br)return ni;if(y===oi)return cr}else{if(y===cr)return ni;if(y===oi)return Br}return y}function Pc(a,y){a.l=y?a.l|512:a.l&-513}function Se(a){return(a.l&1024)!==0}function Ce(a,y){a.l=y?a.l|1024:a.l&-1025}function ke(a,y){a.l=y?a.l|2048:a.l&-2049}function $e(a,y){a.l=y?a.l|4096:a.l&-4097}function yt(a){return(a.l&8192)!==0}function vt(a,y){a.l=y?a.l|8192:a.l&-8193}function kt(a){return(a.l&16384)!==0}function Ht(a,y){a.l=y?a.l|16384:a.l&-16385}De.Gj=function(){this.svg=null},De.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},De.Av=function(){},De.zv=function(a){return this.pa=a,uu(this),!0},De.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},De.kq=function(){return 0};function Cn(a){var y=a.part;if(y instanceof Ai&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||G1(y,a)}}function Hn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof si?a instanceof Ai?a.Bd():a.qm(a,function(x){Cn(x)}):Cn(a))}De.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new tl(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&f1(a)&&zt("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new $n),this.localBindings.add(b),this},De.set=function(a){return Object.assign(this,a),this},De.Du=function(a){return Fn(this,a),this},De.apply=function(a){return a(this),this},De.nm=function(a){return uc(this,a),this},De.pz=function(){return this.ih()},De.ih=function(){for(var a=this instanceof si?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},De.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Hi),this.animationTriggers.add(a.propertyName,a),this};function Dn(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=Oi.I(a);typeof z=="function"?(x=kn(arguments),E=z(x),tn(E)||zt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=ct.go[a]}if(E===null&&(b!=null&&b.constructor||zt("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 gn&&1<x.length){z=E;var ne=x[1];(typeof ne=="string"||ne instanceof HTMLDivElement)&&(Rh(z,ne),b++)}for(;b<x.length;b++)z=x[b],z===void 0?zt("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):Fn(E,z);return E}function Fn(a,y){if(typeof y=="string")if(a instanceof Qa)a.text=y;else if(a instanceof Co)a.figure=y;else if(a instanceof zu)a.source=y;else if(a instanceof si)y=Qc.I(y),y!==null&&(a.type=y);else if(a instanceof da){var x=gi(da,y);x!==null?a.type=x:zt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof nn?(y=gi(nn,y),y!==null&&(a.type=y)):a instanceof fr&&(y=gi(fr,y),y!==null&&(a.type=y));else if(y instanceof Ut)a instanceof si||zt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof ol){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 ol?Qm(E,y):zt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Jt)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ul)a.type=y;else if(y instanceof tl)a instanceof Ut||a instanceof ol?a.bind(y):zt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ku)a instanceof Ut?a.Jv(y):zt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof yo)a instanceof nn&&a.type===nn.o?a.figures.add(y):zt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof fr)a instanceof yo?a.segments.add(y):zt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof ps)a instanceof gn||a instanceof ho?a.layout=y:zt("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++)Fn(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof da){x=new tr;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);uc(a,x)}else if(a instanceof ol){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&zt("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)&&zt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new tr;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);uc(a,b)}else uc(a,y);else zt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function bn(a,y){Oi.add(a,y)}function ti(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}wt.Object.defineProperties(Ut.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Kr),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 Kr),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 Kr),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Mo(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&&(Mo(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Eu},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new no),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Eu&&(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 no),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 no),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:_o},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new no),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:ao},set:function(a){var y=this.stretch;y!==a&&(Mo(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&&(Mo(this),this.A.xa=a,this.part!==null&&(this.part.Rh=null),this.g("name",y,a))}},opacity:{get:function(){return this.pb},set:function(a){var y=this.pb;y!==a&&((0>a||1<a)&&Qn(a,"0 <= value <= 1",Ut,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(eg(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(eg(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(),Hn(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&&yf(a,"GraphObject.areaBackground"),a instanceof da&&a.freeze(),Mo(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&&yf(a,"GraphObject.background"),a instanceof da&&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 Sr)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 st(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&&zt("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,Hn(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 Co&&this.qc(),this.g("desiredSize",E,a),Se(this)&&(a=this.part,a!==null&&(ns(this,a,"width"),ns(this,a,"height"))))}},width:{get:function(){return this.jd.width},set:function(a){var y=this.jd.width;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new fi(a,this.jd.height).freeze(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&ns(this,a,"width")))}},height:{get:function(){return this.jd.height},set:function(a){var y=this.jd.height;y===a||isNaN(y)&&isNaN(a)||(y=this.jd,this.jd=a=new fi(this.jd.width,a).freeze(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&ns(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Ba},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(),Mo(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:$a},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(),Mo(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 pr(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&&Pl(this),this.Ab}},oe:{get:function(){return this.l&4096&&Pl(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Mo(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:ni},set:function(a){this.reshapingBehavior!==a&&(Mo(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()&&zt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),uu(this),this.g("alignment",y,a))}},column:{get:function(){return this.Ag},set:function(a){a=Math.round(a);var y=this.Ag;y!==a&&(0>a&&Qn(a,">= 0",Ut,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Qn(a,">= 1",Ut,"columnSpan"),Mo(this),this.A.ob=a,this.v(),this.g("columnSpan",y,a))}},row:{get:function(){return this.io},set:function(a){a=Math.round(a);var y=this.io;y!==a&&(0>a&&Qn(a,">= 0",Ut,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Qn(a,">= 1",Ut,"rowSpan"),Mo(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&&(Mo(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 Ai||zt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Qv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,V1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Ss},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Cn(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Qn(a,">= 0",Ut,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Cn(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),Cn(this))}},toLinkable:{get:function(){return this.ba!==null?this.ba.Tr:null},set:function(a){var y=this.toLinkable;y!==a&&(this.Xc(),this.ba.Tr=a,this.g("toLinkable",y,a))}},toMaxLinks:{get:function(){return this.ba!==null?this.ba.Ur:1/0},set:function(a){var y=this.toMaxLinks;y!==a&&(0>a&&Qn(a,">= 0",Ut,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Ss},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Cn(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Qn(a,">= 0",Ut,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Cn(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),Cn(this))}},fromLinkable:{get:function(){return this.ba!==null?this.ba.hq:null},set:function(a){var y=this.fromLinkable;y!==a&&(this.Xc(),this.ba.hq=a,this.g("fromLinkable",y,a))}},fromMaxLinks:{get:function(){return this.ba!==null?this.ba.iq:1/0},set:function(a){var y=this.fromMaxLinks;y!==a&&(0>a&&Qn(a,">= 0",Ut,"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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(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&&(Mo(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Ut.prototype.trigger=Ut.prototype.Jv,Ut.prototype.findBindingPanel=Ut.prototype.ih,Ut.prototype.findTemplateBinder=Ut.prototype.pz,Ut.prototype.setProperties=Ut.prototype.nm,Ut.prototype.apply=Ut.prototype.apply,Ut.prototype.attach=Ut.prototype.Du,Ut.prototype.set=Ut.prototype.set,Ut.prototype.isEnabledObject=Ut.prototype.If,Ut.prototype.isVisibleObject=Ut.prototype.Ed,Ut.prototype.isContainedBy=Ut.prototype.rg,Ut.prototype.getNearestIntersectionPoint=Ut.prototype.rs,Ut.prototype.getLocalPoint=Ut.prototype.qs,Ut.prototype.getDocumentScale=Ut.prototype.Df,Ut.prototype.getDocumentAngle=Ut.prototype.li,Ut.prototype.getDocumentBounds=Ut.prototype.mi,Ut.prototype.getDocumentPoint=Ut.prototype.ga,Ut.prototype.intersectsRect=Ut.prototype.Yc,Ut.prototype.containedInRect=Ut.prototype.fh,Ut.prototype.containsRect=Ut.prototype.Re,Ut.prototype.containsPoint=Ut.prototype.ca,Ut.prototype.raiseChanged=Ut.prototype.g,Ut.prototype.raiseChangedEvent=Ut.prototype.cb,Ut.prototype.addCopyProperty=Ut.prototype.Vw;var Oi=null;Ut.className="GraphObject",Oi=new Hi,bn("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=Dn(si,si.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof si){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"},Dn(Co,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Qi(0,0,2.76142374915397,2.761423749153969),spot2:new Qi(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 si&&(x=E.fb("ButtonBorder"),x instanceof Co)){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 si&&(x=E.fb("ButtonBorder"),x instanceof Co&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof si&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Co){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 si&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Co){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 si&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Co){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 si&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Co))){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}),bn("TreeExpanderButton",function(){var a=Dn("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Dn(Co,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:fa},new tl("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new tl("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof pa&&(x=x.adornedPart),x instanceof Ai){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}),bn("SubGraphExpanderButton",function(){var a=Dn("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Dn(Co,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:fa},new tl("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 pa&&(x=x.adornedPart),x instanceof ho){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}),bn("ToolTip",function(){return Dn(pa,si.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},Dn(Co,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Qi(0,0,4,6),spot2:new Qi(1,1,-4,-4)}))}),bn("ContextMenu",function(){return Dn(pa,si.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},new tl("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),bn("ContextMenuButton",function(){var a=Dn("Button");a.stretch=cr;var y=a.fb("ButtonBorder");return y instanceof Co&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Qi(0,0,2,3),y.spot2=new Qi(1,1,-2,-2)),a}),bn("PanelExpanderButton",function(a){var y=ti(a,"COLLAPSIBLE"),x=Dn("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},Dn(Co,{name:"ButtonIcon",strokeWidth:2},new tl("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Co&&(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}),bn("CheckBoxButton",function(a){var y=ti(a);return a=Dn("Button",{desiredSize:new fi(14,14)},Dn(Co,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:oi,geometryStretch:ir,visible:!1},y!==""?new tl("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof si){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}),bn("CheckBox",function(a){a=ti(a),a=Dn("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new pr(0,1,0,0)});var y=Dn(si,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new pr(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}),Ut.None=ni=new Jt(Ut,"None",0),Ut.Default=ao=new Jt(Ut,"Default",0),Ut.Vertical=Br=new Jt(Ut,"Vertical",4),Ut.Horizontal=cr=new Jt(Ut,"Horizontal",5),Ut.Fill=oi=new Jt(Ut,"Fill",3),Ut.Uniform=ir=new Jt(Ut,"Uniform",1),Ut.UniformToFill=Ho=new Jt(Ut,"UniformToFill",2),Ut.FlipVertical=Bo=new Jt(Ut,"FlipVertical",1),Ut.FlipHorizontal=ea=new Jt(Ut,"FlipHorizontal",2),Ut.FlipBoth=_a=new Jt(Ut,"FlipBoth",3),Ut.make=Dn,Ut.getBuilders=function(){var a=new Hi,y;for(y in Oi)if(y!==y.toLowerCase()){var x=Oi.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Ut.defineBuilder=bn,Ut.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Oi.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Ut))return y&&E.set(y),E;zt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Ut.takeBuilderArgument=ti;function Kr(){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=Ba,this.o=$a,this.hg=ao,this.ob=this.Bi=1,this.Pf=ni,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Kr.prototype.copy=function(){var a=new Kr;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 no(){this.u=-1/0,this.o=0,this.F=_o,this.rr=Eu,this.j=this.V="None"}no.prototype.copy=function(){var a=new no;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},no.className="LinkElementSettings";function vo(){this.yj=this.Xi=Bi,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}vo.prototype.copy=function(){var a=new vo;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},vo.className="LinkSettings";function ko(){this.ha=[1,0,0,1,0,0]}ko.prototype.copy=function(){var a=new ko;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},ko.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},ko.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},ko.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)}},ko.className="STransform";function na(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}na.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},na.className="SGradient";function qo(a,y,x){this.ownerDocument=a=y===void 0?ct.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new Da(this,x)}qo.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},qo.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),tn(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},qo.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},qo.prototype.focus=function(){this.Oa.focus()},qo.prototype.mx=function(){this.ownerDocument=null},wt.Object.defineProperties(qo.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}}}),qo.className="SVGSurface";function Da(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 ko,this.j=wc(this),this.Nj=wc(this,"gojs-diagram"),this.Hl=this.ti=null;var x=la++,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 ls(a,y,x,E,b,z,ne){a.Nj===void 0?Lc(a,y,x,E,b,z,ne):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+ne+")")}De=Da.prototype,De.arc=function(a,y,x,E,b,z,ne,re){var oe=2*Math.PI,ue=oe-1e-6,ce=x*Math.cos(E),pe=x*Math.sin(E),we=a+ce,Fe=y+pe,Ie=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ne-we)||1e-6<Math.abs(re-Fe))&&this.path.push(["L",we,+Fe]),0>E&&(E=E%oe+oe),E>ue?(this.path.push(["A",x,x,0,1,Ie,a-ce,y-pe]),this.path.push(["A",x,x,0,1,Ie,we,Fe])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Ie,a+x*Math.cos(b),y+x*Math.sin(b)])},De.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},De.Se=function(a){this.addPath(this.path,this.rb,a||0)},De.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},De.clearRect=function(){},De.clip=function(){this.Yl.clipPath=!0},De.closePath=function(){this.path.push(["z"])},De.createLinearGradient=function(a,y,x,E){var b=new na("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},De.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"+la++,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(Eh,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},De.createRadialGradient=function(a,y,x,E,b,z){var ne=new na("radial");return ne.x1=a,ne.y1=y,ne.r1=x,ne.x2=E,ne.y2=b,ne.r2=z,ne};function Os(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)}De.drawImage=function(a,y,x,E,b,z,ne,re,oe){var ue="";a instanceof HTMLCanvasElement&&(ue=a.toDataURL()),a instanceof HTMLImageElement&&(ue=a.getAttribute("src"));var ce=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ne=x,re=E=ce,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,Os(this,y,x,E,b,z||0,ne||0,re,oe),z={x:0,y:0,width:ce||E,height:a||b,href:ue},tt.$(E,re)&&tt.$(b,oe)?ue.toLowerCase().indexOf(".svg")===-1&&ue.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ce||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),As(this,Eh,z,this.rb),this.addElement(Eh,z)},De.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),Gl(this,this.Yl)},De.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},De.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},As(this,"fill",a,this.rb),this.addElement("rect",a)},De.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},As(this,"fill",a,this.rb),Gl(this,a),this.svg.prepend(this.Ud("rect",a))},De.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},As(this,"fill",y,this.rb),this.addElement("text",y,a[0])},De.lineTo=function(a,y){this.path.push(["L",a,y])},De.moveTo=function(a,y){this.path.push(["M",a,y])},De.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},De.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"])},De.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},De.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())},De.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Lc(this,a,y,x,E,b,z)};function eu(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}De.scale=function(a,y){this.rb.scale(a,y)},De.translate=function(a,y){this.rb.translate(a,y)},De.transform=function(){},De.yc=function(){},De.stroke=function(){Xu(this,this.Yl)},De.jk=function(){this.clipInsteadOfFill||this.stroke()},De.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},De.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 As(a,y,x,E){y==="fill"?Gl(a,x):y==="stroke"&&Xu(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function Gl(a,y){a.fillStyle instanceof na?y.fill=hd(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 _u(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof na?y.setAttributeNS(null,"fill",hd(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 Xu(a,y){if(a.strokeStyle instanceof na)y.stroke=hd(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 hd(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"+la++,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(ue,ce){return ue.offset>ce.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}De.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=kn(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,As(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 Lc(a,y,x,E,b,z,ne){var re=new ko;re.ha=[y,x,E,b,z,ne],y={},As(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function wc(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}De.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function gu(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Ol(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}De.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},De.fs=function(){this.Ct=!1},De.Vc=function(){},De.Wx=function(){},Da.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Da.prototype.getImageData=function(){return null},Da.prototype.measureText=function(){return null};function Nd(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()))}Da.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Da.className="SVGContext",gn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new qo(this,ct.document));var y=new qo(this,ct.document,!0);a===void 0&&(a=new tr);var x=this;return Ph(this,function(E,b){return E=tp(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},gn.prototype.makeSvg=gn.prototype.Cs,gn.prototype.av=function(a){return this.Cs(a)},gn.prototype.makeSVG=gn.prototype.av;function $l(a,y,x,E){this.ownerDocument=y=y===void 0?ct.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new fd(y,x,E),y.H=a}$l.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},$l.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},$l.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},$l.prototype.focus=function(){this.Oa.focus()},$l.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},wt.Object.defineProperties($l.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}}}),$l.className="CanvasSurface";function fd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&zt("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 Xt,this.isTemporary=!!x}De=fd.prototype,De.Wx=function(a){this.Z.imageSmoothingEnabled=a},De.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},De.beginPath=function(){this.Z.beginPath()},De.Se=function(){},De.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},De.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},De.clip=function(){this.Z.clip()},De.closePath=function(){this.Z.closePath()},De.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},De.createPattern=function(a,y){return this.Z.createPattern(a,y)},De.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},De.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)},De.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},De.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},De.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},De.fillText=function(a,y,x){this.Z.fillText(a,y,x)},De.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},De.lineTo=function(a,y){this.Z.lineTo(a,y)},De.measureText=function(a){return this.Z.measureText(a)},De.moveTo=function(a,y){this.Z.moveTo(a,y)},De.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},De.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},De.restore=function(){this.Z.restore()},De.save=function(){this.yc(),this.Z.save()},fd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},De=fd.prototype,De.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},De.scale=function(a,y){this.El.scale(a,y)},De.translate=function(a,y){this.El.translate(a,y)},De.stroke=function(){this.Z.stroke()},De.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}},De.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},De.ng=function(a,y){if(a instanceof da&&a.type===Nc){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)},De.jk=function(){this.Hm||this.stroke()},De.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},De.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},De.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vf),a.lineDashOffset=0)},De.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},De.Hs=function(){},wt.Object.defineProperties(fd.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 vf=Object.freeze([]);fd.className="CanvasSurfaceContext";function gd(){this.F=this.o=this.u=this.j=0}gd.className="ColorNumbers";function da(a,y){sp||(ap(),sp=!0),Do(this),this._isFrozen=!1,a===void 0?(this.na=Gh,this.xk="black"):typeof a=="string"?(this.na=Gh,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Bh?(this.Qd=Vl,this.Lk=En):this.Lk=a===Nc?this.Qd=Io:this.Qd=Ss,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}da.prototype.copy=function(){var a=new da;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},De=da.prototype,De.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},De.ka=function(){return Object.isFrozen(this)&&zt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},De.qb=function(a){a.classType===da&&(this.type=a)},De.toString=function(){var a="Brush(";if(this.type===Gh)a+=this.color;else if(a=this.type===Bh?a+"Linear ":this.type===Nc?a+"Radial ":this.type===lp?a+"Pattern ":a+"(unknown) ",a+=this.start+" "+this.end,this.colorStops!==null)for(var y=this.colorStops.iterator;y.next();)a+=" "+y.key+":"+y.value;return a+")"},De.addColorStop=function(a,y){return this._isFrozen&&In(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Qn(a,"0 <= loc <= 1",da,"addColorStop:loc"),this.we===null&&(this.we=new Hi),this.we.add(a,y),this.na===Gh&&(this.type=Bh),this.xe=null,this},De.Vz=function(a,y){if(this._isFrozen&&In(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===Gh)Cc(this.color),this.color=Fh(a,y);else if((this.type===Bh||this.type===Nc)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Cc(x.value),this.addColorStop(x.key,Fh(a,y));return this};function Wh(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,Cc(a),Fh(y,x)}De.Wy=function(a,y){if(this._isFrozen&&In(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===Gh)Cc(this.color),this.color=Fh(-a,y);else if((this.type===Bh||this.type===Nc)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Cc(x.value),this.addColorStop(x.key,Fh(-a,y));return this};function Lg(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,Cc(a),Fh(-y,x)}function pd(a,y,x){Cc(a),a=Ya.j;var E=Ya.u,b=Ya.o,z=Ya.F;return Cc(y),x===void 0&&(x=.5),"rgba("+Math.round((Ya.j-a)*x+a)+", "+Math.round((Ya.u-E)*x+E)+", "+Math.round((Ya.o-b)*x+b)+", "+Math.round((Ya.F-z)*x+z)+")"}De.Gx=function(){if(this.type===Gh)return Qd(this.color);if((this.type===Bh||this.type===Nc)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Nc)return Qd(a.first().value);if(a.get(.5)!==null)return Qd(a.get(.5));if(a.count===2)return a=a.Fa(),Qd(pd(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,Qd(pd(a.get(x),a.get(E),1-z/b))}return!1};function Qd(a){return a?a instanceof da?a.Gx():(Cc(a),128>(299*Ya.j+587*Ya.u+114*Ya.o)/1e3):!1}function Fh(a,y){switch(y){case up:y=100*Xf(Ya.j);var x=100*Xf(Ya.u),E=100*Xf(Ya.o);return Rl.j=.4124564*y+.3575761*x+.1804375*E,Rl.u=.2126729*y+.7151522*x+.072175*E,Rl.o=.0193339*y+.119192*x+.9503041*E,Rl.F=Ya.F,y=Wp(Rl.j/Sf[0]),x=Wp(Rl.u/Sf[1]),E=Wp(Rl.o/Sf[2]),zc.j=116*x-16,zc.u=500*(y-x),zc.o=200*(x-E),zc.F=Rl.F,zc.j=Math.min(100,Math.max(0,zc.j+100*a)),a=(zc.j+16)/116,y=a-zc.o/200,Rl.j=Sf[0]*Ng(zc.u/500+a),Rl.u=Sf[1]*(zc.j>xf*Ag?Math.pow(a,3):zc.j/xf),Rl.o=Sf[2]*Ng(y),Rl.F=zc.F,a=-.969266*Rl.j+1.8760108*Rl.u+.041556*Rl.o,y=.0556434*Rl.j+-.2040259*Rl.u+1.0572252*Rl.o,Ya.j=255*op((3.2404542*Rl.j+-1.5371385*Rl.u+-.4985314*Rl.o)/100),Ya.u=255*op(a/100),Ya.o=255*op(y/100),Ya.F=Rl.F,Ya.j=Math.round(Ya.j),255<Ya.j?Ya.j=255:0>Ya.j&&(Ya.j=0),Ya.u=Math.round(Ya.u),255<Ya.u?Ya.u=255:0>Ya.u&&(Ya.u=0),Ya.o=Math.round(Ya.o),255<Ya.o?Ya.o=255:0>Ya.o&&(Ya.o=0),"rgba("+Ya.j+", "+Ya.u+", "+Ya.o+", "+Ya.F+")";case i1:return Yf(),Ju.o=Math.min(100,Math.max(0,Ju.o+100*a)),"hsla("+Ju.j+", "+Ju.u+"%, "+Ju.o+"%, "+Ju.F+")";default:zt("Unknown color space: "+y)}}function Cc(a){sp||(ap(),sp=!0);var y=Dg;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,Ya.j=a[0],Ya.u=a[1],Ya.o=a[2],Ya.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ya.j=0,Ya.u=0,Ya.o=0,Ya.F=1)}}function Yf(){var a=Ya.j/255,y=Ya.u/255,x=Ya.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))}Ju.j=Math.round(ne),Ju.u=Math.round(100*a),Ju.o=Math.round(100*b),Ju.F=Ya.F}function Xf(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function op(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Wp(a){return a>Ag?Math.pow(a,1/3):(xf*a+16)/116}function Ng(a){var y=a*a*a;return y>Ag?y:(116*a-16)/xf}function yf(a,y){typeof a!="string"&&(a instanceof da||zt("Value for "+y+" must be a color string or a Brush, not "+a))}function ap(){Dg=Ls?new $l(null,void 0,{willReadFrequently:!0}).context:null}wt.Object.defineProperties(da.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&In(this,a),this.na=a,this.start.Mc()&&(a===Bh?this.start=Vl:a===Nc&&(this.start=Io)),this.end.Mc()&&(a===Bh?this.end=En:a===Nc&&(this.end=Io)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&In(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&In(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&In(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&In(this,a),0>a&&Qn(a,">= zero",da,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&In(this,a),0>a&&Qn(a,">= zero",da,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&In(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&In(this,a),this.cr=a,this.xe=null}}}),da.prototype.isDark=da.prototype.Gx,da.prototype.darkenBy=da.prototype.Wy,da.prototype.lightenBy=da.prototype.Vz,da.prototype.addColorStop=da.prototype.addColorStop;var Ag=216/24389,xf=24389/27,Sf=[95.047,100,108.883],Dg=null,Ya=new gd,Ju=new gd,Rl=new gd,zc=new gd,sp=!1;da.className="Brush";var Gh;da.Solid=Gh=new Jt(da,"Solid",0);var Bh;da.Linear=Bh=new Jt(da,"Linear",1);var Nc;da.Radial=Nc=new Jt(da,"Radial",2);var lp;da.Pattern=lp=new Jt(da,"Pattern",4);var up;da.Lab=up=new Jt(da,"Lab",5);var i1;da.HSL=i1=new Jt(da,"HSL",6),da.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},da.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;sp||(ap(),sp=!0);var y=Dg;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)},da.lighten=function(a){return Wh(a)},da.lightenBy=Wh,da.darken=function(a){return Lg(a)},da.darkenBy=Lg,da.mix=pd,da.isDark=Qd;function ul(){this.xa="Base"}ul.prototype.measure=function(){},ul.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},ul.prototype.arrange=function(){},ul.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},ul.prototype.iA=function(a){a.Uj()},ul.prototype.gc=function(){},wt.Object.defineProperties(ul.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return si}}}),ul.prototype.remeasureObject=ul.prototype.iA,ul.prototype.arrangeElement=ul.prototype.Ly,ul.prototype.measureElement=ul.prototype.Yz,ul.className="PanelLayout";function _m(){this.xa="Base"}Zt(_m,ul),_m.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;a=Mh(a);for(var oe=0;oe<re;oe++){var ue=E[oe];if(ue.visible||ue===a){var ce=ue.margin,pe=ce.right+ce.left;ce=ce.top+ce.bottom,ue.measure(y,x,z,ne);var we=ue.measuredBounds;pe=Math.max(we.width+pe,0),ce=Math.max(we.height+ce,0),we=ue.position.x;var Fe=ue.position.y;isFinite(we)||(we=0),isFinite(Fe)||(Fe=0),ue instanceof Co&&ue.isGeometryPositioned&&(ue=ue.strokeWidth/2,we-=ue,Fe-=ue),gs(b,we,Fe,pe,ce)}}},_m.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,ue=z.position.y;if(oe=isNaN(oe)?-a:oe-a,ue=isNaN(ue)?-x:ue-x,z instanceof Co&&z.isGeometryPositioned){var ce=z.strokeWidth/2;oe-=ce,ue-=ce}z.visible&&z.arrange(oe+re.left,ue+re.top,ne.width,ne.height)}};function jm(){this.xa="Base"}Zt(jm,ul),jm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;y=Si(),z=Mh(a);for(var oe=0;oe<re;oe++){var ue=E[oe];if(ue.visible||ue===z){var ce=fu(ue,!1);if(ce!==ni&&ce!==cr)y.push(ue);else{ue.measure(1/0,x,0,ne),ce=ue.margin,ue=ue.measuredBounds;var pe=Math.max(ue.height+ce.top+ce.bottom,0);b.width+=Math.max(ue.width+ce.right+ce.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)&&(ce=oe.margin,re=ce.right+ce.left,ce=ce.top+ce.bottom,oe.measure(1/0,x,0,ne),oe=oe.measuredBounds,ce=Math.max(oe.height+ce,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,ce));Fi(y)},jm.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 ue=z,ce=y[oe];if(ce.visible){var pe=ce.measuredBounds,we=ce.margin,Fe=we.top+we.bottom,Ie=z+b.bottom,ze=pe.height,gt=fu(ce,!1);(isNaN(ce.desiredSize.height)&>===oi||gt===Br)&&(ze=Math.max(x.height-Fe-Ie,0)),Fe=ze+Fe+Ie,Ie=ce.alignment,Ie.Xb()&&(Ie=a.defaultAlignment),Ie.sb()||(Ie=Io),ne&&(re-=pe.width+we.left+we.right),ce.arrange(re+Ie.offsetX+we.left,ue+Ie.offsetY+we.top+(x.height*Ie.y-Fe*Ie.y),pe.width,ze),ne||(re+=pe.width+we.left+we.right)}}};function zm(){this.xa="Base"}Zt(zm,ul),zm.prototype.measure=function(a,y,x,E,b,z){var ne=E.length;x=Si();for(var re=Mh(a),oe=0;oe<ne;oe++){var ue=E[oe];if(ue.visible||ue===re){var ce=fu(ue,!1);if(ce!==ni&&ce!==Br)x.push(ue);else{var pe=ue.margin;ce=pe.right+pe.left,pe=pe.top+pe.bottom,ue.measure(y,1/0,z,0),ue=ue.measuredBounds,Fs(b,Math.max(b.width,Math.max(ue.width+ce,0)),b.height+Math.max(ue.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)&&(ue=oe.margin,ne=ue.right+ue.left,ue=ue.top+ue.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,ue=Math.max(oe.height+ue,0),b.width=Math.max(b.width,Math.max(oe.width+ne,0)),b.height+=ue);Fi(x)}},zm.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 ue=z,ce=y[oe];if(ce.visible){var pe=ce.measuredBounds,we=ce.margin,Fe=we.left+we.right,Ie=z+b.right,ze=pe.width,gt=fu(ce,!1);(isNaN(ce.desiredSize.width)&>===oi||gt===cr)&&(ze=Math.max(x.width-Fe-Ie,0)),Fe=ze+Fe+Ie,Ie=ce.alignment,Ie.Xb()&&(Ie=a.defaultAlignment),Ie.sb()||(Ie=Io),ne&&(re-=pe.height+we.bottom+we.top),ce.arrange(ue+Ie.offsetX+we.left+(x.width*Ie.x-Fe*Ie.x),re+Ie.offsetY+we.top,ze,pe.height),ne||(re+=pe.height+we.bottom+we.top)}}};function Zm(){this.xa="Base"}Zt(Zm,ul),Zm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),ue=oe.margin,ce=ue.right+ue.left,pe=ue.top+ue.bottom;oe.measure(y,x,z,ne);var we=oe.measuredBounds;z=we.width,ne=we.height;var Fe=Math.max(z+ce,0),Ie=Math.max(ne+pe,0),ze=a.isClipping,gt=Bn.allocAt(-ue.left,-ue.top,Fe,Ie),nt=Bn.allocAt(0,0,z,ne);Cv(oe,nt,!0),z=nt.width,ne=nt.height;for(var Et=!0,At=Mh(a),Tt=0;Tt<re;Tt++){var Vt=E[Tt];we=y;var mn=x;if(Vt!==oe&&(Vt.visible||Vt===At)){ue=Vt.margin;var bi=ue.left,Yi=ue.top;switch(Fe=ue.right+ue.left,Ie=ue.top+ue.bottom,ue=fu(Vt,!1),ue){case oi:we=z,mn=ne,Yi=bi=Ie=Fe=0;break;case cr:we=z,bi=Fe=0;break;case Br:mn=ne,Yi=Ie=0}Vt.measure(we,mn,0,0),we=Vt.measuredBounds,Fe=Math.max(we.width+Fe,0),Ie=Math.max(we.height+Ie,0),ue=Vt.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Io);var Gi=Vt.alignmentFocus;if(Gi.Xb()&&(Gi=Io),mn=null,Vt instanceof si&&Vt.$e!==""&&(mn=Vt.fb(Vt.$e),mn===Vt&&(mn=null)),bi=nt.x-bi,Yi=nt.y-Yi,mn!==null){for(Vt.arrange(0,0,we.width,we.height),we=mn.actualBounds,we=st.allocAt(we.x+(Gi.x*we.width-Gi.offsetX),we.y+(Gi.y*we.height-Gi.offsetY)),mn=mn.panel;mn!==Vt;)mn.transform.Ga(we),mn=mn.panel;bi+=ue.x*z+ue.offsetX-we.x,Yi+=ue.y*ne+ue.offsetY-we.y,st.free(we)}else bi+=ue.x*z+ue.offsetX-(Gi.x*we.width+Gi.offsetX),Yi+=ue.y*ne+ue.offsetY-(Gi.y*we.height+Gi.offsetY);Et?(Et=!1,b.h(bi,Yi,Fe,Ie)):gs(b,bi,Yi,Fe,Ie)}}switch(Et?b.assign(gt):ze?b.Uu(nt.x,nt.y,nt.width,nt.height):gs(b,gt.x,gt.y,gt.width,gt.height),Bn.free(gt),Bn.free(nt),ue=oe.stretch,ue===ao&&(ue=fu(oe,!1)),ue){case ni:return;case oi:if(!isFinite(y)&&!isFinite(x))return;break;case cr:if(!isFinite(y))return;break;case Br:if(!isFinite(x))return}for(we=oe.measuredBounds,z=we.width,ne=we.height,Fe=Math.max(z+ce,0),Ie=Math.max(ne+pe,0),ue=oe.margin,nt=Bn.allocAt(-ue.left,-ue.top,Fe,Ie),Cv(oe,nt,!0),z=nt.width,ne=nt.height,y=0;y<re;y++)x=E[y],x===oe||!x.visible&&x!==At||(ue=x.margin,Fe=ue.right+ue.left,Ie=ue.top+ue.bottom,we=x.measuredBounds,Fe=Math.max(we.width+Fe,0),Ie=Math.max(we.height+Ie,0),ce=x.alignment,ce.Xb()&&(ce=a.defaultAlignment),ce.sb()||(ce=Io),x=x.alignmentFocus,x.Xb()&&(x=Io),Et?(Et=!1,b.h(ce.x*z+ce.offsetX-(x.x*we.width+x.offsetX)-ue.left,ce.y*ne+ce.offsetY-(x.y*we.height+x.offsetY)-ue.top,Fe,Ie)):gs(b,ce.x*z+ce.offsetX-(x.x*we.width+x.offsetX)-ue.left,ce.y*ne+ce.offsetY-(x.y*we.height+x.offsetY)-ue.top,Fe,Ie));Et?b.assign(gt):ze?b.Uu(nt.x,nt.y,nt.width,nt.height):gs(b,gt.x,gt.y,gt.width,gt.height),Bn.free(nt)},Zm.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 ue=z-x.x,ce=oe-x.y;for(b.arrange(ue,ce,ne,re),ne=Bn.allocAt(0,0,ne,re),Cv(b,ne,!1),re=0;re<E;re++){var pe=y[re];if(pe!==b){ue=pe.measuredBounds;var we=ue.width,Fe=ue.height;ce=pe.alignment,ce.Xb()&&(ce=a.defaultAlignment),ce.sb()||(ce=Io);var Ie=pe.alignmentFocus;if(Ie.Xb()&&(Ie=Io),ue=null,pe instanceof si&&pe.$e!==""&&(ue=pe.fb(pe.$e),ue===pe&&(ue=null)),ue!==null){var ze=ue.actualBounds;for(Ie=st.allocAt(ze.x+(Ie.x*ze.width-Ie.offsetX),ze.y+(Ie.y*ze.height-Ie.offsetY)),ue=ue.panel;ue!==pe;)ue.transform.Ga(Ie),ue=ue.panel;ue=ce.x*ne.width+ce.offsetX-Ie.x,ce=ce.y*ne.height+ce.offsetY-Ie.y,st.free(Ie)}else ue=ce.x*ne.width+ce.offsetX-(Ie.x*we+Ie.offsetX),ce=ce.y*ne.height+ce.offsetY-(Ie.y*Fe+Ie.offsetY);ue+=ne.x-x.x,ce+=ne.y-x.y,pe.visible&&pe.arrange(z+ue,oe+ce,we,Fe)}}Bn.free(ne)};function Cv(a,y,x){var E=null;if(a instanceof si&&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 Hm(){this.xa="Base"}Zt(Hm,ul),Hm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),ue=oe.margin,ce=y,pe=x,we=ue.right+ue.left,Fe=ue.top+ue.bottom;oe.measure(y,x,z,ne),ue=oe.measuredBounds;var Ie=0,ze=null;oe instanceof Co&&(ze=oe,Ie=ze.strokeWidth*ze.scale);var gt=Math.max(ue.width+we,0);ue=Math.max(ue.height+Fe,0);var nt=Bv(oe),Et=nt.x*gt+nt.offsetX;nt=nt.y*ue+nt.offsetY;var At=Mv(oe),Tt=At.x*gt+At.offsetX;for(At=At.y*ue+At.offsetY,isFinite(y)&&(ce=Math.max(Math.abs(Et-Tt)-Ie,0)),isFinite(x)&&(pe=Math.max(Math.abs(nt-At)-Ie,0)),Ie=fi.alloc(),Ie.h(0,0),a=Mh(a),At=0;At<re;At++)nt=E[At],nt===oe||!nt.visible&&nt!==a||(ue=nt.margin,gt=ue.right+ue.left,Et=ue.top+ue.bottom,nt.measure(ce,pe,0,0),ue=nt.measuredBounds,gt=Math.max(ue.width+gt,0),ue=Math.max(ue.height+Et,0),Ie.h(Math.max(gt,Ie.width),Math.max(ue,Ie.height)));if(re===1)b.width=gt,b.height=ue,fi.free(Ie);else{switch(nt=Bv(oe),At=Mv(oe),re=E=0,At.x!==nt.x&&At.y!==nt.y&&(E=Ie.width/Math.abs(At.x-nt.x),re=Ie.height/Math.abs(At.y-nt.y)),fi.free(Ie),Ie=0,ze!==null&&(Ie=ze.strokeWidth*ze.scale,Ov(ze)===ir&&(E=re=Math.max(E,re))),E+=Math.abs(nt.offsetX)+Math.abs(At.offsetX)+Ie,re+=Math.abs(nt.offsetY)+Math.abs(At.offsetY)+Ie,ze=oe.stretch,ze===ao&&(ze=fu(oe,!1)),ze){case ni:ne=z=0;break;case oi:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case cr:isFinite(y)&&(E=y),ne=0;break;case Br:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(E,re,z,ne),b.width=oe.measuredBounds.width+we,b.height=oe.measuredBounds.height+Fe}},Hm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Bn.alloc();z.h(0,0,1,1);var ne=E.margin,re=ne.left;ne=ne.top;var oe=a.padding,ue=oe.left;oe=oe.top,E.arrange(ue+re,oe+ne,b.width,b.height);var ce=Bv(E),pe=Mv(E),we=ce.y*b.height+ce.offsetY,Fe=pe.x*b.width+pe.offsetX;for(pe=pe.y*b.height+pe.offsetY,z.x=ce.x*b.width+ce.offsetX,z.y=we,gs(z,Fe,pe,0,0),z.x+=re+ue,z.y+=ne+oe,b=0;b<x;b++)re=y[b],re!==E&&(ue=re.measuredBounds,ne=re.margin,oe=Math.max(ue.width+ne.right+ne.left,0),ce=Math.max(ue.height+ne.top+ne.bottom,0),we=re.alignment,we.Xb()&&(we=a.defaultAlignment),we.sb()||(we=Io),oe=z.width*we.x+we.offsetX-oe*we.x+ne.left+z.x,ne=z.height*we.y+we.offsetY-ce*we.y+ne.top+z.y,re.visible&&(ya(z.x,z.y,z.width,z.height,oe,ne,ue.width,ue.height)?re.arrange(oe,ne,ue.width,ue.height):re.arrange(oe,ne,ue.width,ue.height,new Bn(z.x,z.y,z.width,z.height))));Bn.free(z)};function Wm(){this.xa="Base",this.name="Table"}Zt(Wm,ul),Wm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ne=Si(),re=Si(),oe=0;oe<z;oe++){var ue=E[oe],ce=ue instanceof si?ue:null;if(ce!==null&&$h(ce)&&ue.visible){re.push(ce);for(var pe=ce.O.s,we=pe.length,Fe=0;Fe<we;Fe++){var Ie=pe[Fe];ce.type===si.TableRow?Ie.row=ue.row:ce.type===si.TableColumn&&(Ie.column=ue.column),ne.push(Ie)}}else ne.push(ue)}z=ne.length,z===0&&(a.Fb(0),a.Eb(0));for(var ze=[],gt=0;gt<z;gt++){var nt=ne[gt];nt.visible&&(vt(nt,!0),Ht(nt,!0),ze[nt.row]||(ze[nt.row]=[]),ze[nt.row][nt.column]||(ze[nt.row][nt.column]=[]),ze[nt.row][nt.column].push(nt))}Fi(ne);var Et=Si(),At=Si(),Tt=Si(),Vt={count:0},mn={count:0},bi=y,Yi=x,Gi=a.rowDefs,di=a.colDefs,qn=null;z=Gi.length;for(var so=0;so<z;so++)qn=Gi[so],qn!==void 0&&(qn.actual=0);z=di.length;for(var Vr=0;Vr<z;Vr++)qn=di[Vr],qn!==void 0&&(qn.actual=0);for(var Fa=ze.length,Ja=0,Cl=0;Cl<Fa;Cl++)ze[Cl]&&(Ja=Math.max(Ja,ze[Cl].length));var Al=Math.min(a.topIndex,Fa-1),pu=Math.min(a.leftIndex,Ja-1),El=0;Fa=ze.length;for(var tf=Mh(a),nl=0;nl<Fa;nl++)if(ze[nl]){Ja=ze[nl].length;var Sd=a.Fb(nl);Sd.actual=0;for(var mu=Sd.oc=0;mu<Ja;mu++)if(ze[nl][mu]){var nf=a.Eb(mu);Et[mu]===void 0&&(nf.actual=0,nf.oc=0,Et[mu]=!0);for(var Fc=ze[nl][mu],Gc=Fc.length,fc=0;fc<Gc;fc++){var qu=Fc[fc];if(qu.visible||qu===tf){var Of=1<qu.rowSpan||1<qu.columnSpan;Of&&(nl<Al||mu<pu||At.push(qu));var Pd=qu.margin,Dp=Pd.right+Pd.left,gc=Pd.top+Pd.bottom,vu=jc(qu,Sd,nf,!1),Nm=qu.desiredSize,Gg=!isNaN(Nm.height),Id=!isNaN(Nm.width)&⋙if(Of||vu===ni||Id||nl<Al||mu<pu||(Vt[mu]!==void 0||vu!==oi&&vu!==cr||(Vt[mu]=-1,Vt.count++),mn[nl]!==void 0||vu!==oi&&vu!==Br||(mn[nl]=-1,mn.count++),Tt.push(qu)),qu.measure(1/0,1/0,0,0),!(nl<Al||mu<pu)){var ec=qu.measuredBounds,og=Math.max(ec.width+Dp,0),pc=Math.max(ec.height+gc,0);if(qu.rowSpan===1&&(vu===ni||vu===cr)){qn=a.Fb(nl);var kf=qn.Wc();El=Math.max(pc-qn.actual,0),El+kf>Yi&&(El=Math.max(Yi-kf,0));var hv=qn.oa===0;qn.oc=qn.oc+El,qn.actual=qn.oa+El,Yi=Math.max(Yi-(El+(hv?kf:0)),0)}if(qu.columnSpan===1&&(vu===ni||vu===Br)){qn=a.Eb(mu);var Am=qn.Wc();El=Math.max(og-qn.actual,0),El+Am>bi&&(El=Math.max(bi-Am,0));var Xy=qn.oa===0;qn.oc=qn.oc+El,qn.actual=qn.oa+El,bi=Math.max(bi-(El+(Xy?Am:0)),0)}Of&&qu.Uj()}}}}}Fi(Et);var sh=0,Ah=0;z=a.columnCount;for(var $g=0;$g<z;$g++){var Tf=di[$g];Tf!==void 0&&(sh+=isNaN(Tf.Hc)?Tf.oc:Tf.Hc,Tf.oc!==0&&(sh+=Tf.Wc()))}z=a.rowCount;for(var Ip=0;Ip<z;Ip++){var Rf=Gi[Ip];Rf!==void 0&&(Ah+=isNaN(Rf.Hc)?Rf.oc:Rf.Hc,Rf.oc!==0&&(Ah+=Rf.Wc()))}bi=Math.max(y-sh,0);var lh=Yi=Math.max(x-Ah,0),rf=bi;z=Tt.length;for(var tc=0;tc<z;tc++){var Od=Tt[tc],fv=a.Fb(Od.row),Dh=a.Eb(Od.column),Op=Od.measuredBounds,wd=Od.margin,ag=wd.right+wd.left,kd=wd.top+wd.bottom;Vt[Od.column]=Dh.oc===0&&Vt[Od.column]!==void 0?Math.max(Op.width+ag,Vt[Od.column]):null,mn[Od.row]=fv.oc===0&&mn[Od.row]!==void 0?Math.max(Op.height+kd,mn[Od.row]):null}var Kg=0,kp=0,rd;for(rd in mn)rd!=="count"&&(Kg+=mn[rd]);for(rd in Vt)rd!=="count"&&(kp+=Vt[rd]);for(var jl=fi.alloc(),Dm=0;Dm<z;Dm++){var Lu=Tt[Dm];if(Lu.visible||Lu===tf){var il=a.Fb(Lu.row),Nu=a.Eb(Lu.column),Ih=0;isFinite(Nu.width)?Ih=Nu.width:(isFinite(bi)&&Vt[Lu.column]!==null?kp===0?Ih=Nu.actual+bi:Ih=Vt[Lu.column]/kp*rf:Vt[Lu.column]!==null?Ih=bi:Ih=Nu.actual||bi,Ih=Math.max(0,Ih-Nu.Wc()));var of=0;switch(isFinite(il.height)?of=il.height:(isFinite(Yi)&&mn[Lu.row]!==null?Kg===0?of=il.actual+Yi:of=mn[Lu.row]/Kg*lh:mn[Lu.row]!==null?of=Yi:of=il.actual||Yi,of=Math.max(0,of-il.Wc())),jl.h(Math.max(Nu.minimum,Math.min(Ih,Nu.maximum)),Math.max(il.minimum,Math.min(of,il.maximum))),vu=jc(Lu,il,Nu,!1),vu){case cr:jl.height=Math.max(jl.height,il.actual+Yi);break;case Br:jl.width=Math.max(jl.width,Nu.actual+bi)}var sg=Lu.margin,Jy=sg.right+sg.left,gv=sg.top+sg.bottom;Lu.Uj(),Lu.measure(jl.width,jl.height,Nu.minimum,il.minimum);var Tp=Lu.measuredBounds,lg=Math.max(Tp.width+Jy,0),Vg=Math.max(Tp.height+gv,0);isFinite(bi)&&(lg=Math.min(lg,jl.width)),isFinite(Yi)&&(Vg=Math.min(Vg,jl.height));var nc=0;nc=il.actual,il.actual=Math.max(il.actual,Vg),il.oc=Math.max(il.oc,Vg),El=il.actual-nc,Yi=Math.max(Yi-El,0),mn[Lu.row]===null&&(lh=Math.max(lh-El,0)),nc=Nu.actual,Nu.actual=Math.max(Nu.actual,lg),Nu.oc=Math.max(Nu.oc,lg),El=Nu.actual-nc,bi=Math.max(bi-El,0),Vt[Lu.column]===null&&(rf=Math.max(rf-El,0))}}Fi(Tt);var Oh=fi.alloc(),Cd=Si(),kc=Si();if(z=At.length,z!==0){for(var _f=0;_f<Fa;_f++)if(ze[_f]){Ja=ze[_f].length;var Rp=a.Fb(_f);Cd[_f]=Rp.actual;for(var jf=0;jf<Ja;jf++)if(ze[_f][jf]){var pv=a.Eb(jf);kc[jf]=pv.actual}}}for(var _p=0;_p<z;_p++){var Vs=At[_p];if(Vs.visible||Vs===tf){var od=a.Fb(Vs.row),$c=a.Eb(Vs.column);switch(jl.h(Math.max($c.minimum,Math.min(y,$c.maximum)),Math.max(od.minimum,Math.min(x,od.maximum))),vu=jc(Vs,od,$c,!1),vu){case oi:kc[$c.index]!==0&&(jl.width=Math.min(jl.width,kc[$c.index])),Cd[od.index]!==0&&(jl.height=Math.min(jl.height,Cd[od.index]));break;case cr:kc[$c.index]!==0&&(jl.width=Math.min(jl.width,kc[$c.index]));break;case Br:Cd[od.index]!==0&&(jl.height=Math.min(jl.height,Cd[od.index]))}isFinite($c.width)&&(jl.width=$c.width),isFinite(od.height)&&(jl.height=od.height),Oh.h(0,0);for(var mv=$c.minimum,mc=od.minimum,af=1;af<Vs.rowSpan&&!(Vs.row+af>=a.rowCount);af++)qn=a.Fb(Vs.row+af),El=0,El=vu===oi||vu===Br?Math.max(qn.minimum,Cd[Vs.row+af]===0?qn.maximum:Math.min(Cd[Vs.row+af],qn.maximum)):Math.max(qn.minimum,isNaN(qn.Hc)?qn.maximum:Math.min(qn.Hc,qn.maximum)),Oh.height+=El,mc+=qn.minimum;for(var Kc=1;Kc<Vs.columnSpan&&!(Vs.column+Kc>=a.columnCount);Kc++)qn=a.Eb(Vs.column+Kc),El=0,El=vu===oi||vu===cr?Math.max(qn.minimum,kc[Vs.column+Kc]===0?qn.maximum:Math.min(kc[Vs.column+Kc],qn.maximum)):Math.max(qn.minimum,isNaN(qn.Hc)?qn.maximum:Math.min(qn.Hc,qn.maximum)),Oh.width+=El,mv+=qn.minimum;jl.width+=Oh.width,jl.height+=Oh.height;var jp=Vs.margin,zf=jp.right+jp.left,Im=jp.top+jp.bottom;Vs.measure(jl.width,jl.height,mv,mc);for(var zp=Vs.measuredBounds,Td=Math.max(zp.width+zf,0),ug=Math.max(zp.height+Im,0),Zf=0,Zp=0;Zp<Vs.rowSpan&&!(Vs.row+Zp>=a.rowCount);Zp++)qn=a.Fb(Vs.row+Zp),Zf+=qn.total||0;if(Zf<ug){var sf=ug-Zf,uh=ug-Zf;if(Vs.spanAllocation!==null)for(var lf=Vs.spanAllocation,kh=0;kh<Vs.rowSpan&&!(0>=sf)&&!(Vs.row+kh>=a.rowCount);kh++){qn=a.Fb(Vs.row+kh);var uf=qn.oa||0,cg=lf(Vs,qn,uh);qn.actual=Math.min(qn.maximum,uf+cg),qn.oa!==uf&&(sf-=qn.oa-uf)}for(;0<sf;){var Ed=qn.oa||0;if(isNaN(qn.height)&&qn.maximum>Ed&&(qn.actual=Math.min(qn.maximum,Ed+sf),qn.oa!==Ed&&(sf-=qn.oa-Ed)),qn.index===0)break;qn=a.Fb(qn.index-1)}}for(var Ug=0,cf=0;cf<Vs.columnSpan&&!(Vs.column+cf>=a.columnCount);cf++)qn=a.Eb(Vs.column+cf),Ug+=qn.total||0;if(Ug<Td){var Yg=Td-Ug,Qy=Td-Ug;if(Vs.spanAllocation!==null)for(var Th=Vs.spanAllocation,dg=0;dg<Vs.columnSpan&&!(0>=Yg)&&!(Vs.column+dg>=a.columnCount);dg++){qn=a.Eb(Vs.column+dg);var Om=qn.oa||0,qy=Th(Vs,qn,Qy);qn.actual=Math.min(qn.maximum,Om+qy),qn.oa!==Om&&(Yg-=qn.oa-Om)}for(;0<Yg;){var vv=qn.oa||0;if(isNaN(qn.width)&&qn.maximum>vv&&(qn.actual=Math.min(qn.maximum,vv+Yg),qn.oa!==vv&&(Yg-=qn.oa-vv)),qn.index===0)break;qn=a.Eb(qn.index-1)}}}}Fi(At),fi.free(Oh),fi.free(jl),Cd!==void 0&&Fi(Cd),kc!==void 0&&Fi(kc);var Xg=0,Jg=0,yv=a.desiredSize,pS=a.maxSize;vu=fu(a,!0);var km=Ah=sh=0,Tm=0;z=a.columnCount;for(var xv=0;xv<z;xv++)di[xv]!==void 0&&(qn=a.Eb(xv),isFinite(qn.width)?(km+=qn.width,km+=qn.Wc()):qm(qn)===Vp?(km+=qn.oa,km+=qn.Wc()):qn.oa!==0&&(sh+=qn.oa,sh+=qn.Wc()));isFinite(yv.width)?Xg=Math.min(yv.width,pS.width):Xg=vu!==ni&&isFinite(y)?y:sh,Xg=Math.max(Xg,a.minSize.width),Xg=Math.max(Xg-km,0);for(var JS=sh===0?1:Math.max(Xg/sh,1),Sv=0;Sv<z;Sv++)di[Sv]!==void 0&&(qn=a.Eb(Sv),isFinite(qn.width)||qm(qn)===Vp||(qn.actual=qn.oa*JS),qn.position=b.width,qn.oa!==0&&(b.width+=qn.oa,b.width+=qn.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)Gi[Pv]!==void 0&&(qn=a.Fb(Pv),isFinite(qn.height)?(Tm+=qn.height,Tm+=qn.Wc()):qm(qn)===Vp?(Tm+=qn.oa,Tm+=qn.Wc()):qn.oa!==0&&(Ah+=qn.oa,Ah+=qn.Wc()));isFinite(yv.height)?Jg=Math.min(yv.height,pS.height):Jg=vu!==ni&&isFinite(x)?x:Ah,Jg=Math.max(Jg,a.minSize.height),Jg=Math.max(Jg-Tm,0);for(var QS=Ah===0?1:Math.max(Jg/Ah,1),wv=0;wv<z;wv++)Gi[wv]!==void 0&&(qn=a.Fb(wv),isFinite(qn.height)||qm(qn)===Vp||(qn.actual=qn.oa*QS),qn.position=b.height,qn.oa!==0&&(b.height+=qn.oa,b.height+=qn.Wc()));z=re.length;for(var e1=0;e1<z;e1++){var Rm=re[e1],t1=0,n1=0;Rm.type===si.TableRow?(t1=b.width,qn=a.Fb(Rm.row),n1=qn.actual):(qn=a.Eb(Rm.column),t1=qn.actual,n1=b.height),Rm.measuredBounds.h(0,0,t1,n1),vt(Rm,!1)}Fi(re),a.inRowsCols=ze},Wm.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,ue=ne.length,ce=0,pe=0;pe<ue;pe++)ne[pe]&&(ce=Math.max(ce,ne[pe].length));oe=a.rowDefs,re=a.colDefs;var we=pe=0,Fe=Math.min(a.topIndex,ue-1);if(0<oe.length){for(;Fe!==ue&&(oe[Fe]===void 0||oe[Fe].oa===0);)Fe++;Fe=Math.max(Math.min(Fe,ue-1),0),pe=-oe[Fe].position}var Ie=Math.min(a.leftIndex,ce-1);if(0<re.length){for(;Ie!==ce&&(re[Ie]===void 0||re[Ie].oa===0);)Ie++;Ie=Math.max(Math.min(Ie,ce-1),0),we=-re[Ie].position}for(var ze=0,gt=0;ze!==ue&&oe[ze]===void 0;)ze++;for(;gt!==ue&&re[gt]===void 0;)gt++;ce=a.part,a.Fb(ze),a.Eb(gt);for(var nt=0;nt<y.length;nt++){var Et=y[nt];if(Et instanceof si&&Et.visible&&$h(Et)){if(Et.type===si.TableRow){re=a.Fb(Et.row);var At=a.Eb(gt)}else re=a.Fb(ze),At=a.Eb(Et.column);oe=re.position+pe+b,re.oa!==0&&(oe+=re.Io(Math.max(ze,Fe))),re=At.position+we+z,At.oa!==0&&(re+=At.Io(Math.max(gt,Ie))),At=Et.measuredBounds,Et.Uk(),Et.actualBounds.ka();var Tt=Et.actualBounds,Vt=Bn.allocAt(Tt.x,Tt.y,Tt.width,Tt.height);Tt.x=Et.type===si.TableRow?z:re,Tt.y=Et.type===si.TableColumn?b:oe,Tt.width=At.width,Tt.height=At.height,Et.actualBounds.freeze(),Ht(Et,!1),_s(Vt,Tt)||ce===null||(ce.oh(),Et.Pn(ce)),Bn.free(Vt)}}for(nt=fi.alloc(),Et=0;Et<ue;Et++)if(ne[Et]){for(ce=ne[Et].length,At=a.Fb(Et),oe=At.position+pe+b,At.oa!==0&&(oe+=At.Io(Math.max(ze,Fe))),Tt=0;Tt<ce;Tt++)if(ne[Et][Tt]){Vt=a.Eb(Tt),re=Vt.position+we+z,Vt.oa!==0&&(re+=Vt.Io(Math.max(gt,Ie)));for(var mn=ne[Et][Tt],bi=mn.length,Yi=0;Yi<bi;Yi++){var Gi=mn[Yi],di=Gi.measuredBounds;nt.h(0,0);for(var qn=1;qn<Gi.rowSpan&&!(Et+qn>=a.rowCount);qn++){var so=a.Fb(Et+qn);so.oa!==0&&(nt.height+=so.total)}for(qn=1;qn<Gi.columnSpan&&!(Tt+qn>=a.columnCount);qn++)so=a.Eb(Tt+qn),so.oa!==0&&(nt.width+=so.total);var Vr=Vt.oa+nt.width,Fa=At.oa+nt.height;qn=re,so=oe;var Ja=Vr,Cl=Fa,Al=re,pu=oe,El=Vr,tf=Fa;re+Vr>x.width&&(El=Math.max(x.width-re,0)),oe+Fa>x.height&&(tf=Math.max(x.height-oe,0));var nl=Gi.alignment;if(nl.Xb()){nl=a.defaultAlignment,nl.sb()||(nl=Io);var Sd=nl.x,mu=nl.y,nf=nl.offsetX;nl=nl.offsetY;var Fc=Vt.alignment,Gc=At.alignment;Fc.sb()&&(Sd=Fc.x,nf=Fc.offsetX),Gc.sb()&&(mu=Gc.y,nl=Gc.offsetY)}else Sd=nl.x,mu=nl.y,nf=nl.offsetX,nl=nl.offsetY;(isNaN(Sd)||isNaN(mu))&&(mu=Sd=.5,nl=nf=0),Fc=di.width,Gc=di.height;var fc=Gi.margin,qu=fc.left+fc.right,Of=fc.top+fc.bottom,Pd=jc(Gi,At,Vt,!1);!isNaN(Gi.desiredSize.width)||Pd!==oi&&Pd!==cr||(Fc=Math.max(Vr-qu,0)),!isNaN(Gi.desiredSize.height)||Pd!==oi&&Pd!==Br||(Gc=Math.max(Fa-Of,0)),Vr=Gi.maxSize,Fa=Gi.minSize,Fc=Math.min(Vr.width,Fc),Gc=Math.min(Vr.height,Gc),Fc=Math.max(Fa.width,Fc),Gc=Math.max(Fa.height,Gc),Vr=Gc+Of,qn+=Ja*Sd-(Fc+qu)*Sd+nf+fc.left,so+=Cl*mu-Vr*mu+nl+fc.top,Gi.visible&&(ya(Al,pu,El,tf,qn,so,di.width,di.height)?Gi.arrange(qn,so,Fc,Gc):Gi.arrange(qn,so,Fc,Gc,new Bn(Al,pu,El,tf)))}}}for(fi.free(nt),a=0;a<E;a++)x=y[a],z=x instanceof si?x:null,z!==null&&$h(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Gm(){this.xa="Base"}Zt(Gm,ul),Gm.prototype.measure=function(){},Gm.prototype.arrange=function(){};function $m(){this.xa="Base"}Zt($m,ul),$m.prototype.measure=function(){},$m.prototype.arrange=function(){};function Km(){this.xa="Base"}Zt(Km,ul),Km.prototype.measure=function(a,y,x,E,b,z,ne){1<E.length&&zt("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,ue=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ce=E.scale,pe=re.width;re=re.height;var we=Math.max(y-ue,0),Fe=Math.max(x-oe,0),Ie=1;a.viewboxStretch===ir?pe!==0&&re!==0&&(Ie=Math.min(we/pe,Fe/re)):pe!==0&&re!==0&&(Ie=Math.max(we/pe,Fe/re)),Ie===0&&(Ie=1e-4),E.Ca*=Ie,ce!==E.scale&&(vt(E,!0),E.measure(1/0,1/0,z,ne))}re=E.measuredBounds,b.width=isFinite(y)?y:Math.max(re.width+ue,0),b.height=isFinite(x)?x:Math.max(re.height+oe,0)},Km.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=Io),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 Gp(){this.xa="Base"}Zt(Gp,ul),Gp.prototype.measure=function(){},Gp.prototype.arrange=function(){},Gp.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,ue=Math.ceil(re/b),ce=Math.ceil(oe/E),pe=a.gridOrigin,we=pe.x;pe=pe.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Fe=[],Ie=a.O.s,ze=Ie.length,gt=0;gt<ze;gt++){var nt=Ie[gt],Et=[];if(Fe.push(Et),nt.visible){var At=nt.interval;if(!(0>At)){nt=bv(nt.figure);for(var Tt=0;Tt<ze;Tt++)if(Tt!==gt){var Vt=Ie[Tt];Vt.visible&&bv(Vt.figure)===nt&&(Vt=Vt.interval,Vt>At&&Et.push(Vt))}}}}for(Ie=a.O.s,ze=Ie.length,gt=0;gt<ze;gt++){var mn=Ie[gt];if(mn.visible&&(Et=mn.interval||1,nt=Math.abs(Et),!(2>b*nt*x))){if(At=mn.segmentIndex,(!isFinite(At)||isNaN(At))&&(At=0),0>At&&(At=nt-Math.min(-At,nt)),At=Math.round(At%nt),nt=mn.opacity,Tt=1,nt!==1){if(nt===0)continue;Tt=y.globalAlpha,y.globalAlpha=Tt*nt}Vt=Fe[gt];var bi=!1,Yi=mn.strokeDashArray;if(Yi!==null&&(bi=!0,y.js(Yi,mn.strokeDashOffset)),mn.figure==="LineV"&&mn.stroke!==null&&0<mn.strokeWidth){for(y.lineWidth=mn.strokeWidth,Ns(a,y,mn.stroke,!1,!1,z,ne),y.beginPath(),Yi=mn=Math.floor((we-b)/b);Yi<=mn+ue;Yi++){var Gi=Yi*b+we;0<=Gi&&Gi<=re&&Vm(Yi,Et,At,Vt)&&(y.moveTo(Gi,0),y.lineTo(Gi,oe))}y.stroke(),y.Se()}else if(mn.figure==="LineH"&&mn.stroke!==null&&0<mn.strokeWidth){for(y.lineWidth=mn.strokeWidth,Ns(a,y,mn.stroke,!1,!1,z,ne),y.beginPath(),Yi=mn=Math.floor((pe-E)/E);Yi<=mn+ce;Yi++)Gi=Yi*E+pe,0<=Gi&&Gi<=oe&&Vm(Yi,Et,At,Vt)&&(y.moveTo(0,Gi),y.lineTo(re,Gi));y.stroke(),y.Se()}else if(mn.figure==="BarV"&&mn.fill!==null)for(Ns(a,y,mn.fill,!0,!1,z,ne),mn=mn.width,isNaN(mn)&&(mn=b),Gi=Yi=Math.floor((we-b)/b);Gi<=Yi+ue;Gi++){var di=Gi*b+we;0<=di+mn&&di<=re&&Vm(Gi,Et,At,Vt)&&y.fillRect(di,0,mn,oe)}else if(mn.figure==="BarH"&&mn.fill!==null)for(Ns(a,y,mn.fill,!0,!1,z,ne),mn=mn.height,isNaN(mn)&&(mn=E),Gi=Yi=Math.floor((pe-E)/E);Gi<=Yi+ce;Gi++)di=Gi*E+pe,0<=di+mn&&di<=oe&&Vm(Gi,Et,At,Vt)&&y.fillRect(0,di,re,mn);bi&&y.fs(),nt!==1&&(y.globalAlpha=Tt)}}y.restore(),y.Vc(!1)};function Vm(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 Um(){this.xa="Base"}Zt(Um,ul),Um.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof pa||a instanceof hi){var ne=null,re=null;if(a instanceof hi&&(ne=a),a instanceof pa&&(re=a,ne=re.adornedPart,a.j===null&&(a.j=[])),ne instanceof hi){var oe=ne;if(z===0)Fs(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ue=a instanceof pa?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ce=oe.points,pe=ne.pointsCount;re!==null?re.Ul(!1):ne!==null&&ne.Ul(!1),re=y.width;var we=y.height,Fe=a.j;if(Fe.length=0,ue!==null){r1(a,re,we,ue);var Ie=ue.measuredBounds;x.ed(Ie),Fe.push(Ie)}Ie=Xt.alloc();for(var ze=st.alloc(),gt=st.alloc(),nt=0;nt<z;nt++){var Et=E[nt];if(Et!==ue)if(Et.isPanelMain&&Et instanceof Co){r1(a,re,we,Et);var At=Et.measuredBounds;x.ed(At),Fe.push(At)}else if(2>pe)Et.measure(1/0,1/0,0,0),At=Et.measuredBounds,x.ed(At),Fe.push(At);else{var Tt=Et.segmentIndex,Vt=Et.segmentFraction,mn=Et.alignmentFocus;mn.Mc()&&(mn=Io);var bi=Et.segmentOrientation,Yi=Et.segmentOffset;if(isNaN(Tt)){var Gi=oe.ua;At=Si(),Gi.Qu(Vt,At);var di=st.allocAt(At[0],At[1]);if(di.add(oe.i(0)),Gi.type===nn.j?di.offset(-Gi.startX,-Gi.startY):(Gi=Gi.figures.first(),Gi!==null&&di.offset(-Gi.startX,-Gi.startY)),Gi=At[2],bi!==Eu){var qn=oe.computeAngle(Et,bi,Gi);Et.Kb=qn}qn=di.x-y.x;var so=di.y-y.y;st.free(di),Fi(At)}else if(Tt<-pe||Tt>=pe)At=st.alloc(),oe.vg(),oe.computeMidPoint(At),Gi=oe.midAngle,bi!==Eu&&(qn=oe.computeAngle(Et,bi,Gi),Et.Kb=qn),qn=At.x-y.x,so=At.y-y.y,st.free(At);else{if(qn=0,0<=Tt?(so=ce.M(Tt),At=Tt<pe-1?ce.M(Tt+1):so):(qn=pe+Tt,so=ce.M(qn),At=0<qn?ce.M(qn-1):so),so.Xa(At)){0<=Tt?(Gi=0<Tt?ce.M(Tt-1):so,qn=Tt<pe-2?ce.M(Tt+2):At):(Gi=qn<pe-1?ce.M(qn+1):so,qn=1<qn?ce.M(qn-2):At),di=Gi.Bf(so);var Vr=At.Bf(qn);Gi=di>Vr+10?0<=Tt?Gi.ab(so):so.ab(Gi):Vr>di+10?0<=Tt?At.ab(qn):qn.ab(At):0<=Tt?Gi.ab(qn):qn.ab(Gi)}else Gi=0<=Tt?so.ab(At):At.ab(so);bi!==Eu&&(qn=oe.computeAngle(Et,bi,Gi),Et.Kb=qn),qn=so.x+(At.x-so.x)*Vt-y.x,so=so.y+(At.y-so.y)*Vt-y.y}Et.measure(1/0,1/0,0,0),At=Et.measuredBounds,di=Et.naturalBounds;var Fa=0;Et instanceof Co&&(Fa=Et.strokeWidth),Vr=di.width+Fa;var Ja=di.height+Fa;Ie.reset(),Ie.translate(-At.x,-At.y),Ie.scale(Et.scale,Et.scale),Ie.rotate(bi===Eu?Et.angle:Gi,Vr/2,Ja/2),bi!==im&&bi!==om||Ie.rotate(90,Vr/2,Ja/2),bi!==rm&&bi!==am||Ie.rotate(-90,Vr/2,Ja/2),bi===E0&&(45<Gi&&135>Gi||225<Gi&&315>Gi)&&Ie.rotate(-Gi,Vr/2,Ja/2),di=new Bn(0,0,Vr,Ja),ze.xi(di,mn),Ie.Ga(ze),mn=-ze.x+Fa/2*Et.scale,Et=-ze.y+Fa/2*Et.scale,gt.assign(Yi),Fa=isNaN(Yi.x);var Cl=isNaN(Yi.y);if(Fa||Cl){Vr=Vr/2+3,Ja=Ja/2+3;var Al=45<=Gi&&135>=Gi,pu=225<=Gi&&315>=Gi;bi===Eu&&(Al||pu)?(gt.x=Cl?Vr:Yi.y,gt.y=Fa?Ja:Yi.x,Al?0<=Tt||isNaN(Tt)&&.5>Vt||!Fa||(gt.y=-Ja):pu&&((0<=Tt||isNaN(Tt)&&.5>Vt)&&Fa&&(gt.y=-Ja),Cl&&(gt.x=-Vr))):(Fa&&(gt.x=0<=Tt||isNaN(Tt)&&.5>Vt?Vr:-Vr),Cl&&(gt.y=-Ja),gt.rotate(Gi))}else gt.rotate(Gi);qn+=gt.x,so+=gt.y,di.set(At),di.h(qn+mn,so+Et,At.width,At.height),Fe.push(di),x.ed(di)}}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),Fs(b,x.width||0,x.height||0),Xt.free(Ie),st.free(ze),st.free(gt)}}}},Um.prototype.arrange=function(a,y){var x=y.length;if(a instanceof pa||a instanceof hi){var E=a,b=null;a instanceof pa&&(b=a,E=b.adornedPart);var z=a instanceof pa?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 ue=y[oe];if(ue!==z&&re<ne.length){var ce=ne[re];re++,ue.arrange(ce.x-a.jg.x,ce.y-a.jg.y,ce.width,ce.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof hi)for(z=a.labelNodes;z.next();){var pe=a;ne=z.value,re=ne.segmentIndex,oe=ne.segmentFraction;var we=ne.alignmentFocus;if(ue=ne.segmentOrientation,ce=ne.segmentOffset,isNaN(re)){var Fe=pe.ua,Ie=Si();Fe.Qu(oe,Ie);var ze=st.allocAt(Ie[0],Ie[1]);ze.add(pe.i(0)),Fe.type===nn.j||(Fe=Fe.figures.first()),ze.offset(-Fe.startX,-Fe.startY),Fe=Ie[2],ue!==Eu&&(pe=pe.computeAngle(ne,ue,Fe),ne.angle=pe),pe=ze.x;var gt=ze.y;st.free(ze),Fi(Ie)}else if(re<-x||re>=x)Ie=st.alloc(),Fe=pe,gt=Ie,Fe.vg(),Fe.computeMidPoint(gt),Fe=pe.midAngle,ue!==Eu&&(pe=pe.computeAngle(ne,ue,Fe),ne.angle=pe),pe=Ie.x,gt=Ie.y,st.free(Ie);else{if(ze=0,0<=re?(Ie=y.s[re],gt=re<x-1?y.s[re+1]:Ie):(ze=x+re,Ie=y.s[ze],gt=0<ze?y.s[ze-1]:Ie),Ie.Xa(gt)){0<=re?(Fe=0<re?y.s[re-1]:Ie,ze=re<x-2?y.s[re+2]:gt):(Fe=ze<x-1?y.s[ze+1]:Ie,ze=1<ze?y.s[ze-2]:gt);var nt=Fe.Bf(Ie),Et=gt.Bf(ze);Fe=nt>Et+10?0<=re?Fe.ab(Ie):Ie.ab(Fe):Et>nt+10?0<=re?gt.ab(ze):ze.ab(gt):0<=re?Fe.ab(ze):ze.ab(Fe)}else Fe=0<=re?Ie.ab(gt):gt.ab(Ie);ue!==Eu&&(pe=pe.computeAngle(ne,ue,Fe),ne.angle=pe),pe=Ie.x+(gt.x-Ie.x)*oe,gt=Ie.y+(gt.y-Ie.y)*oe}if(we.ys())ne.location=new st(pe,gt);else{we.Mc()&&(we=Io),Ie=Xt.alloc(),Ie.reset(),Ie.scale(ne.scale,ne.scale),Ie.rotate(ne.angle,0,0);var At=ne.naturalBounds;ze=Bn.allocAt(0,0,At.width,At.height),nt=st.alloc(),nt.xi(ze,we),Ie.Ga(nt),we=-nt.x,Et=-nt.y;var Tt=At.width,Vt=At.height;At=st.alloc(),At.assign(ce);var mn=isNaN(ce.x),bi=isNaN(ce.y);if(mn||bi){Tt=Tt/2+3,Vt=Vt/2+3;var Yi=45<=Fe&&135>=Fe,Gi=225<=Fe&&315>=Fe;ue===Eu&&(Yi||Gi)?(At.x=bi?Tt:ce.y,At.y=mn?Vt:ce.x,Yi?0<=re||isNaN(re)&&.5>oe||!mn||(At.y=-Vt):Gi&&((0<=re||isNaN(re)&&.5>oe)&&mn&&(At.y=-Vt),bi&&(At.x=-Tt))):(mn&&(At.x=0<=re||isNaN(re)&&.5>oe?Tt:-Tt),bi&&(At.y=-Vt),At.rotate(Fe))}else At.rotate(Fe);pe+=At.x,gt+=At.y,Ie.pp(ze),we+=ze.x,Et+=ze.y,re=st.allocAt(pe+we,gt+Et),ne.move(re),st.free(re),st.free(At),st.free(nt),Bn.free(ze),Xt.free(Ie)}}b!==null?b.Ul(!1):E.Ul(!1),E=I1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),st.free(E)}};function r1(a,y,x,E){if(yt(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof pa&&a.type===si.Link&&a.adornedObject instanceof Co&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof hi&&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 pa&&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),vt(E,!1)}}function $p(){this.xa="Base"}Zt($p,ul),$p.prototype.measure=function(a,y,x,E,b,z,ne){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,ue=oe.right+oe.left,ce=oe.top+oe.bottom;re.measure(y,x,z,ne);var pe=re.measuredBounds,we=new Bn(-oe.left,-oe.top,Math.max(pe.width+ue,0),Math.max(pe.height+ce,0));a.graduatedBounds.push(we),b.assign(we);for(var Fe=re.geometry,Ie=re.strokeWidth,ze=Fe.flattenedSegments,gt=Fe.flattenedLengths,nt=Fe.flattenedTotalLength,Et=ze.length,At=0,Tt=0,Vt=Si(),mn=0;mn<Et;mn++){var bi=ze[mn],Yi=[];Tt=At=0;for(var Gi=bi.length,di=0;di<Gi;di+=2){var qn=bi[di],so=bi[di+1];if(di!==0){var Vr=180*Math.atan2(so-Tt,qn-At)/Math.PI;0>Vr&&(Vr+=360),Yi.push(Vr)}At=qn,Tt=so}Vt.push(Yi)}if(a.graduatedIntervals===null){for(var Fa=[],Ja=a.O.s,Cl=Ja.length,Al=0;Al<Cl;Al++){var pu=Ja[Al],El=[];if(Fa.push(El),pu.visible){var tf=pu.interval;if(!(0>tf)){for(var nl=0;nl<Cl;nl++)if(nl!==Al){var Sd=Ja[nl];if(Sd.visible&&pu.constructor===Sd.constructor){var mu=Sd.interval;mu>tf&&El.push(mu)}}}}}a.graduatedIntervals=Fa}var nf=a.graduatedIntervals,Fc=a.O.s,Gc=Fc.length,fc=0,qu=0,Of=nt;a.graduatedMarks=[];for(var Pd,Dp=0;Dp<Gc;Dp++){var gc=Fc[Dp];if(Pd=[],gc.visible&&gc!==re){var vu=Math.abs(gc.interval),Nm=a.graduatedTickUnit;if(!(2>Nm*vu*nt/a.graduatedRange&&gc.graduatedSkip===null)){var Gg=gt[0][0],Id=0,ec=0;qu=nt*gc.graduatedStart-1e-4,Of=nt*gc.graduatedEnd+1e-4;var og=Nm*vu,pc=a.graduatedTickBase;if(pc<a.graduatedMin){var kf=(a.graduatedMin-pc)/og;kf=kf%1===0?kf:Math.floor(kf+1),pc+=kf*og}else pc>a.graduatedMin+og&&(pc-=Math.floor((pc-a.graduatedMin)/og)*og);for(var hv=nf[Dp],Am=pc,Xy=1e-6*a.graduatedMax,sh=1;pc<=a.graduatedMax+Xy;sh++){e:{for(var Ah=hv.length,$g=0;$g<Ah;$g++){var Tf=(pc-a.graduatedTickBase)%(hv[$g]*a.graduatedTickUnit),Ip=1e-6*a.graduatedTickUnit;if(Tf<Ip&&Tf>-Ip){var Rf=!1;break e}}Rf=!0}if(Rf&&(pc>a.graduatedMax&&(pc=a.graduatedMax),gc.graduatedSkip===null||gc instanceof Qa&&!gc.graduatedSkip(pc,gc)||gc instanceof Co&&!gc.graduatedSkip(pc,gc))&&(fc=(pc-a.graduatedMin)*nt/a.graduatedRange,fc>nt&&(fc=nt),qu<=fc&&fc<=Of)){for(var lh=Vt[Id][ec],rf=gt[Id][ec];Id<gt.length;){for(;fc>Gg&&ec<gt[Id].length-1;)ec++,lh=Vt[Id][ec],rf=gt[Id][ec],Gg+=rf;if(fc<=Gg)break;Id++,ec=0,lh=Vt[Id][ec],rf=gt[Id][ec],Gg+=rf}var tc=ze[Id],Od=tc[2*ec],fv=tc[2*ec+1],Dh=(fc-(Gg-rf))/rf,Op=new st(Od+(tc[2*ec+2]-Od)*Dh+Ie/2-Fe.bounds.x,fv+(tc[2*ec+3]-fv)*Dh+Ie/2-Fe.bounds.y);Op.scale(re.scale,re.scale);e:{var wd=lh,ag=Vt[Id];if(!(.5005>Dh&&.4995<Dh)){var kd=wd;if(.5>Dh?0<ec?kd=ag[ec-1]:tt.$(tc[0],tc[tc.length-2])&&tt.$(tc[1],tc[tc.length-1])&&(kd=ag[ag.length-1]):.5<Dh&&(ec+1<ag.length?kd=ag[ec+1]:tt.$(tc[0],tc[tc.length-2])&&tt.$(tc[1],tc[tc.length-1])&&(kd=ag[0])),wd!==kd){var Kg=Math.abs(wd-kd);if(180<Kg&&(wd<kd?wd+=360:kd+=360,Kg=Math.abs(wd-kd)),5e-4>Dh||.9995<Dh){lh=(wd+kd)/2%360;break e}if(10>Kg){var kp=1-Math.abs(.5-Dh);lh=(wd*kp+kd*(1-kp))%360;break e}}}lh=wd}if(gc instanceof Qa){var rd="";gc.graduatedFunction!==null?(rd=gc.graduatedFunction(pc,gc),rd=rd!=null?rd.toString():""):rd=(+pc.toFixed(2)).toString(),rd!==""&&Pd.push({$l:Op,angle:lh,text:rd})}else Pd.push({$l:Op,angle:lh})}pc=Am+sh*og}}}a.graduatedMarks.push(Pd)}Fi(Vt);var jl=a.graduatedMarks;if(jl!==null)for(var Dm=E.length,Lu=0;Lu<Dm;Lu++){var il=E[Lu],Nu=jl[Lu];if(il.visible&&il!==re&&Nu.length!==0){if(il instanceof Co){var Ih=a,of=b,sg=il.alignmentFocus;sg.Mc()&&(sg=Vl);var Jy=il.angle;il.Kb=0,il.measure(1/0,1/0,0,0),il.Kb=Jy;var gv=il.measuredBounds,Tp=gv.width,lg=gv.height,Vg=Bn.allocAt(0,0,Tp,lg),nc=st.alloc();nc.xi(Vg,sg),Bn.free(Vg);for(var Oh=-nc.x,Cd=-nc.y,kc=new Bn,_f=Nu.length,Rp=0;Rp<_f;Rp++)for(var jf=Nu[Rp],pv=jf.$l.x,_p=jf.$l.y,Vs=jf.angle,od=0;4>od;od++){switch(od){case 0:nc.h(Oh,Cd);break;case 1:nc.h(Oh+Tp,Cd);break;case 2:nc.h(Oh,Cd+lg);break;case 3:nc.h(Oh+Tp,Cd+lg)}nc.rotate(Vs+il.angle),nc.offset(pv,_p),Rp===0&&od===0?kc.h(nc.x,nc.y,0,0):kc.Ye(nc),nc.offset(-pv,-_p),nc.rotate(-Vs-il.angle)}st.free(nc),Ih.graduatedBounds!==null&&Ih.graduatedBounds.push(kc),gs(of,kc.x,kc.y,kc.width,kc.height)}else if(il instanceof Qa){var $c=a,mv=b;$c.temporaryTextBlock===null&&($c.temporaryTextBlock=new Qa);var mc=$c.temporaryTextBlock;x1(mc,il);var af=il.alignmentFocus;af.Mc()&&(af=Vl);for(var Kc=il.segmentOrientation,jp=il.segmentOffset,zf=new Bn,Im=0,zp=0,Td=0,ug=0,Zf=0,Zp=Nu.length,sf=0;sf<Zp;sf++){var uh=Nu[sf];Im=uh.$l.x,zp=uh.$l.y,Td=uh.angle,Zf=ug=il.angle,Kc!==Eu&&(Zf=Kc===nm||Kc===C0?Td+il.angle:Td,ug=hi.computeAngle(Kc,Zf)),mc.Kb=ug,mc.text=uh.text||"",mc.measure(1/0,1/0,0,0);var lf=mc.measuredBounds,kh=mc.naturalBounds,uf=kh.width,cg=kh.height,Ed=Xt.alloc();Ed.reset(),Ed.translate(-lf.x,-lf.y),Ed.scale(mc.scale,mc.scale),Ed.rotate(Zf,uf/2,cg/2),Kc!==im&&Kc!==om||Ed.rotate(90,uf/2,cg/2),Kc!==rm&&Kc!==am||Ed.rotate(-90,uf/2,cg/2),Kc===E0&&(45<Td&&135>Td||225<Td&&315>Td)&&Ed.rotate(-Td,uf/2,cg/2);var Ug=Bn.allocAt(0,0,uf,cg),cf=st.alloc();cf.xi(Ug,af),Ed.Ga(cf);var Yg=-cf.x,Qy=-cf.y,Th=st.alloc();Th.assign(jp),isNaN(Th.x)&&(Th.x=uf/2+3),isNaN(Th.y)&&(Th.y=-(cg/2+3)),Th.rotate(Td),Im+=Th.x+Yg,zp+=Th.y+Qy;var dg=new Bn(Im,zp,lf.width,lf.height),Om=new Bn(lf.x,lf.y,lf.width,lf.height),qy=new Bn(kh.x,kh.y,kh.width,kh.height);uh.Sz=ug,uh.lineCount=mc.lineCount,uh.lines=[mc.Cb,mc.Ih,mc.df,mc.Le,mc.Qc,mc.Qb,mc.ze],uh.actualBounds=dg,uh.measuredBounds=Om,uh.naturalBounds=qy,sf===0?zf.assign(dg):zf.ed(dg),st.free(Th),st.free(cf),Bn.free(Ug),Xt.free(Ed)}$c.graduatedBounds!==null&&$c.graduatedBounds.push(zf),gs(mv,zf.x,zf.y,zf.width,zf.height)}vt(il,!1)}}},$p.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,ue=0;ue<oe;ue++){var ce=y[ue];re=b[ue],ce.visible&&ce!==E&&re.length!==0&&(re=z[ne],ne++,ce.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},$p.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 Da,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,ue=a.graduatedMarks,ce=oe.length,pe=0;pe<ce;pe++){var we=oe[pe],Fe=ue[pe],Ie=Fe.length;if(we.visible&&we!==z&&Fe.length!==0){if(we instanceof Co){if(!(2>a.graduatedTickUnit*we.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ne&&we.graduatedSkip===null)){var ze=we.measuredBounds,gt=we.strokeWidth*we.scale,nt=we.alignmentFocus;nt.Mc()&&(nt=Vl);for(var Et=0;Et<Ie;Et++){var At=Fe[Et].$l,Tt=Fe[Et].angle,Vt=nt,mn=we.Ab;mn.reset(),mn.translate(At.x+re.x,At.y+re.y),mn.rotate(Tt+we.angle,0,0),mn.translate(-ze.width*Vt.x+Vt.offsetX+gt/2,-ze.height*Vt.y+Vt.offsetY+gt/2),mn.scale(we.scale,we.scale),ke(we,!1),we.wh.set(we.Ab),we.Kk=we.scale,$e(we,!1),we.gc(y,x),b&&(a.svg.appendChild(we.svg),we.svg=null),we.Ab.reset()}}}else if(we instanceof Qa)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Qa),ze=a.temporaryTextBlock,x1(ze,we),gt=0;gt<Ie;gt++)nt=Fe[gt],nt.actualBounds&&nt.measuredBounds&&nt.naturalBounds&&(ze.ec=nt.text||"",ze.Kb=nt.Sz||0,ze.Gc=nt.lineCount||0,Et=nt.lines,Et!==void 0&&(ze.Cb=Et[0],ze.Ih=Et[1],ze.df=Et[2],ze.Le=Et[3],ze.Qc=Et[4],ze.Qb=Et[5],ze.ze=Et[6]),nt.naturalBounds&&(ze.dc=nt.naturalBounds),nt.actualBounds&&(Et=nt.actualBounds,ze.arrange(Et.x,Et.y,Et.width,Et.height)),Et=nt.actualBounds,ze.arrange(Et.x,Et.y,Et.width,Et.height),At=nt.measuredBounds,nt=nt.naturalBounds,Tt=ze.Ab,Tt.reset(),Tt.translate(Et.x+re.x,Et.y+re.y),Tt.translate(-At.x,-At.y),ze.no(Tt,nt.x,nt.y,nt.width,nt.height),ke(ze,!1),ze.wh.set(ze.Ab),ze.Kk=ze.scale,$e(ze,!1),ze.Ng=we.part,ze.Me=we.panel,ze.gc(y,x),ze.Me=null,ze.Ng=null,b&&(a.svg.appendChild(ze.svg),ze.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function si(a,y){if(Ut.call(this),this.na=null,a===void 0)this.na=si.Position;else if(typeof a=="string"){var x=Qc.I(a);x!==null&&(this.na=x)}else a instanceof ul?this.na=a:a&&(this.na=si.Position,y=a);this.na===null&&zt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===si.Grid?1048576:0),this.O=new $n,this.yb=ll,this.Tm=Bi,this.Uf=ao,this.$g=null,this.$e="",this.jg=new Bn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=ir,this.jn=va,this.kn=_o,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Zt(si,Ut),si.prototype.cloneProtected=function(a){Ut.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},si.prototype.Af=function(a){Ut.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},si.prototype.copy=function(){var a=Ut.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 Ai&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(Sa,"elements",a,null,b,null,ne)}}return a}return null},De=si.prototype,De.toString=function(){return"Panel("+this.type.name+")#"+Ji(this)},De.Pn=function(a){Ut.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},De.hh=function(a,y){if(this.na===si.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===si.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===si.Table)if(a.yc(),a instanceof Da){var x=a.yd;a.yd=wc(a,"gojs-ts"),Ev(this,a),a.nh.pop(),a.yd=x}else Ev(this,a);(x=this.isClipping&&this.na===si.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 Ev(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Ym(a,y,!0,x,!0),E!==null&&Ym(a,y,!1,E,!0),x!==null&&o1(a,y,!0,x),E!==null&&o1(a,y,!1,E),x!==null&&Ym(a,y,!0,x,!1),E!==null&&Ym(a,y,!1,E,!1)}function o1(a,y,x,E){for(var b=E.length,z=a.actualBounds,ne=a.naturalBounds,re=!0,oe=0;oe<b;oe++){var ue=E[oe];if(ue!==void 0&&ue.actual!==0)if(re)re=!1;else{if(x){if(ue.position>ne.height)continue}else if(ue.position>ne.width)continue;var ce=ue.separatorStrokeWidth;isNaN(ce)&&(ce=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var pe=ue.separatorStroke;if(pe===null&&(pe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ce!==0&&pe!==null){Ns(a,y,pe,!1,!1,ne,z),pe=!1;var we=ue.separatorDashArray;we===null&&(we=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),we!==null&&(pe=!0,y.js(we,0)),y.beginPath(),we=ue.position+ce,x?we>ne.height&&(ce-=we-ne.height):we>ne.width&&(ce-=we-ne.width),ue=ue.position+ce/2,y.lineWidth=ce,ce=a.yb,x?(ue+=ce.top,we=ne.width-ce.right,y.moveTo(ce.left,ue),y.lineTo(we,ue)):(ue+=ce.left,we=ne.height-ce.bottom,y.moveTo(ue,ce.top),y.lineTo(ue,we)),y.stroke(),y.Se(),pe&&y.fs()}}}}function Ym(a,y,x,E,b){for(var z=E.length,ne=a.actualBounds,re=a.naturalBounds,oe=a1(a,!0),ue=a1(a,!1),ce=0;ce<z;ce++){var pe=E[ce];if(pe!==void 0&&pe.background!==null&&pe.coversSeparators!==b&&pe.actual!==0){var we=x?ne.height:ne.width;if(!(pe.position>we)){var Fe=pe.Wc(),Ie=pe.separatorStrokeWidth;isNaN(Ie)&&(Ie=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ze=pe.separatorStroke;ze===null&&(ze=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(ze===null||pe.index===(x?oe:ue))&&(Ie=0),Fe-=Ie,Ie=pe.position+Ie,Fe+=pe.actual,Ie+Fe>we&&(Fe=we-Ie),0>=Fe||(we=a.yb,Ns(a,y,pe.background,!0,!1,re,ne),x?y.fillRect(we.left,Ie+we.top,ne.width-(we.left+we.right),Fe):y.fillRect(Ie+we.left,we.top,Fe,ne.height-(we.top+we.bottom)))}}}}function a1(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 bv(a){return a==="LineV"||a==="BarV"}De.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},De.kk=function(a,y,x){if(!Ut.prototype.kk.call(this,a,y,x))return!1;if(this.type===si.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,Ev(this,a),a.yd=null;else if(this.na===si.Grid||this.na===si.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},De.nk=function(){return!0},De.$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 Ut.prototype.$o.call(this,a,y,x,E)},De.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,ue=-ne.m12*re,ce=-ne.m21*re,pe=ne.m11*re,we=re*(ne.m21*ne.dy-ne.m22*ne.dx),Fe=re*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,tt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,E,b);if(this.background!==null)return z=a*oe+y*ce+we,re=a*ue+y*pe+Fe,a=x*oe+E*ce+we,oe=x*ue+E*pe+Fe,b.h(0,0),x=this.naturalBounds,z=tt.Ff(0,0,x.width,x.height,z,re,a,oe,b),b.transform(ne),z;z||(oe=1,ce=ue=0,pe=1,Fe=we=0),re=a*oe+y*ce+we,a=a*ue+y*pe+Fe,oe=x*oe+E*ce+we,x=x*ue+E*pe+Fe,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),ue=!1,pe=this.O.s,Fe=pe.length,ce=st.alloc(),we=null,y=1/0;var Ie=null,ze=this.isClipping&&this.na===si.Spot;ze&&(Ie=st.alloc(),we=this.Pb(),(ue=we.Sj(re,a,oe,x,Ie))&&(y=(re-Ie.x)*(re-Ie.x)+(a-Ie.y)*(a-Ie.y)));for(var gt=0;gt<Fe;gt++){var nt=pe[gt];nt.visible&&nt!==we&&nt.Sj(re,a,oe,x,ce)&&(ue=!0,nt=(re-ce.x)*(re-ce.x)+(a-ce.y)*(a-ce.y),nt<E&&(E=nt,b.set(ce)))}return ze&&(y>E&&b.set(Ie),st.free(Ie)),st.free(ce),z&&b.transform(ne),ue},De.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Ut.prototype.Gj.call(this)},De.v=function(a){if(!yt(this)){Ut.prototype.v.call(this,a),a=null,(this.na===si.Auto||this.na===si.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=fu(b,!1);(b instanceof Cu||b instanceof si||b instanceof Qa||z!==ni)&&b.v(!0)}}}},De.Uj=function(){if(!yt(this)){vt(this,!0),Ht(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},De.Uk=function(){if(!(this.l&2048)){ke(this,!0),$e(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},De.Wu=function(){$e(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},De.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 ue=this.O.s;ue.length!==0&&this.na.measure(this,a,y,ue,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),Fs(b,a,oe),Fs(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},De.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 Mh(a){return a.part!==null?a.part.locationObject:null}De.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=fu(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=ni),a){case ni:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case oi:this.v(!0),this.measure(x+re,E+ne,0,0);break;case cr:this.v(!0),this.measure(x+re,z+ne,0,0);break;case Br:this.v(!0),this.measure(y+re,E+ne,0,0)}}this.na.arrange(this,b,this.jg)}},De.gh=function(a){var y=this.naturalBounds,x=Mh(this);if(ya(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=st.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Xr(b.set(a),z.transform),z.ca(b)))return st.free(b),!0}return st.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},De.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},De.qm=function(a,y){if(y(this,a),a instanceof si){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Jf(a,y){s1(a,a,y)}function s1(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 si&&s1(a,z,x)}}function vS(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof si){y=y.O.s;for(var E=y.length,b=0;b<E;b++)l1(a,y[b],x)}}De.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof si){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=u1(a,y[b],x);if(z!==null)return z}}return null}De.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Kp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof si){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function c1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof si?x=Math.max(x,c1(b)):b instanceof Co&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}De.se=function(){return!(this.type===si.TableRow||this.type===si.TableColumn)};function $h(a){return a.type===si.TableRow||a.type===si.TableColumn}De.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),kt(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ne=z?a:Xr(st.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,ue=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),ue=oe/2),ya(-(ue*b),-(ue*b),E.width+oe*b,E.height+oe*b,ne.x,ne.y)){if(!this.isAtomic){b=this.O.s;var ce=b.length;if(re=st.alloc(),ue=(oe=this.isClipping&&this.na===si.Spot)?this.Pb():null,oe&&(ue.se()?Xr(re.set(a),ue.transform):re.set(a),!ue.ca(re)))return st.free(re),z||st.free(ne),null;for(var pe=Mh(this);ce--;){var we=b[ce];if((we.visible||we===pe)&&(we.se()?Xr(re.set(a),we.transform):re.set(a),!oe||we!==ue)){var Fe=null;if(we instanceof si?Fe=we.ic(re,y,x):we.pickable===!0&&we.ca(re)&&(Fe=we),Fe!==null&&(y!==null&&(Fe=y(Fe)),Fe!==null&&(x===null||x(Fe))))return st.free(re),z||st.free(ne),Fe}}st.free(re)}return this.background===null&&this.areaBackground===null?(z||st.free(ne),null):(a=ya(0,0,E.width,E.height,ne.x,ne.y)?this:null,z||st.free(ne),a)}return z||st.free(ne),null},De.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:Xr(st.allocAt(a.x,a.y),this.transform);if(b=ya(0,0,b.width,b.height,ne.x,ne.y),$h(this)||b){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,ue=st.alloc(),ce=Mh(this);oe--;){var pe=re[oe];if(pe.visible||pe===ce){pe.se()?Xr(ue.set(a),pe.transform):ue.set(a);var we=pe;pe=pe instanceof si?pe:null,(pe!==null?pe.ji(ue,y,x,E):we.ca(ue))&&we.pickable!==!1&&(y!==null&&(we=y(we)),we===null||x!==null&&!x(we)||E.add(we))}}st.free(ue)}return z||st.free(ne),b&&(this.background!==null||this.areaBackground!==null)}return z||st.free(ne),!1},De.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=Xt.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Fv(this,y,x,b),z===void 0&&Xt.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var re=Mh(this),oe=this.O.s,ue=oe.length;ue--;){var ce=oe[ue];if(ce.visible||ce===re){var pe=ce.actualBounds,we=this.naturalBounds;pe.x>we.width||pe.y>we.height||0>pe.x+pe.width||0>pe.y+pe.height||(pe=ce,ce=ce instanceof si?ce:null,we=Xt.alloc(),we.set(ne),(ce!==null?ce.Cf(a,y,x,E,b,we):rl(pe,a,E,we))&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||b.add(pe)),Xt.free(we))}}return z===void 0&&Xt.free(ne),E}return z===void 0&&Xt.free(ne),!1};function Fv(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 si&&Fv(ne,y,x,E),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||E.add(ne))}}}De.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:Xr(st.allocAt(a.x,a.y),this.transform),ue=re?y:Xr(st.allocAt(y.x,y.y),this.transform),ce=oe.Bf(ue),pe=0<oe.x&&oe.x<ne.width&&0<oe.y&&oe.y<ne.height||ha(oe.x,oe.y,0,0,0,ne.height)<=ce||ha(oe.x,oe.y,0,ne.height,ne.width,ne.height)<=ce||ha(oe.x,oe.y,ne.width,ne.height,ne.width,0)<=ce||ha(oe.x,oe.y,ne.width,0,0,0)<=ce;if(ne=oe.zd(0,0)<=ce&&oe.zd(0,ne.height)<=ce&&oe.zd(ne.width,0)<=ce&&oe.zd(ne.width,ne.height)<=ce,re||(st.free(oe),st.free(ue)),pe){if(!this.isAtomic){oe=st.alloc(),ue=st.alloc(),ce=Mh(this);for(var we=this.O.s,Fe=we.length;Fe--;){var Ie=we[Fe];if(Ie.visible||Ie===ce){var ze=Ie.actualBounds,gt=this.naturalBounds;(!re||!(ze.x>gt.width||ze.y>gt.height||0>ze.x+ze.width||0>ze.y+ze.height))&&(Ie.se()?(ze=Ie.transform,Xr(oe.set(a),ze),Xr(ue.set(y),ze)):(oe.set(a),ue.set(y)),ze=Ie,Ie=Ie instanceof si?Ie:null,(Ie!==null?Ie.og(oe,ue,x,E,b,z):ze.tx(oe,ue,b))&&(x!==null&&(ze=x(ze)),ze===null||E!==null&&!E(ze)||z.add(ze)))}}st.free(oe),st.free(ue)}return b?pe:ne}return!1};function Bv(a){var y=null;return a instanceof Co&&(y=a.spot1,y===Bi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Us),y}function Mv(a){var y=null;return a instanceof Co&&(y=a.spot2,y===Bi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Nn),y}De.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},De.M=function(a){return this.O.M(a)},De.Gb=function(a,y){y instanceof Sr&&zt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&zt("Cannot make a Panel contain itself: "+this.toString()),zt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&zt("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!==si.Grid||y instanceof Co||zt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==si.Graduated||y instanceof Co||y instanceof Qa||zt("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 Hi),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 zt("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),yt(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof si&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Jm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Ai&&(x.Te=!0),x.Te&&x instanceof Ai&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Ga,"elements",this,y,null,E,null),x.cb(Sa,"elements",this,null,y,null,a)))};function Lv(a,y){a.l=y?a.l|16777216:a.l&-16777217}De.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)},De.mb=function(a){0<=a&&this.pc(a,!0)},De.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),vt(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 Ai&&(E instanceof si?E.qm(E,function(ne,re){Qv(z,re,y)}):Qv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Ga,"elements",this,E,null,a,null))},De.Fb=function(a){0>a&&Qn(a,">= 0",si,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new ol;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Sa,"rowdefs",this,null,x,null,a)}return y[a]},De.oA=function(a){if(0>a&&Qn(a,">= 0",si,"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(Ga,"rowdefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof ol?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}De.Eb=function(a){0>a&&Qn(a,">= 0",si,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new ol;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Sa,"coldefs",this,null,x,null,a)}return y[a]},De.jA=function(a){if(0>a&&Qn(a,">= 0",si,"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(Ga,"coldefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof ol?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}De.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Qm(y,a),this},De.Hy=function(a,y){return(a=this.Fb(a))&&Qm(a,new ol(y)),this},De.By=function(a,y){return(a=this.Eb(a))&&Qm(a,new ol(y)),this},De.nz=function(a){if(0>a||this.type!==si.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},De.fz=function(a){if(0>a||this.type!==si.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},De.Fz=function(a,y){if(y===void 0&&(y=new st(NaN,NaN)),this.type!==si.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)},De.Gz=function(a){if(this.type!==si.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Zc(a){var y=a.allBindings;if(y===null)a.data!==null&&zt("Template cannot have .data be non-null: "+a),a.allBindings=y=new $n;else if(y._isFrozen)return;var x=new $n;Lv(a,!1),a.qm(a,function(ue,ce){ce.th();var pe=ce.localBindings;if(pe!==null)for(Ce(ce,!1),pe=pe.iterator;pe.next();){var we=pe.value;we.mode===gm&&Ce(ce,!0);var Fe=we.sourceName;Fe!==null&&(Fe==="/"&&Lv(ue,!0),Fe=Bx(we,ue,ce),Fe!==null&&(x.add(Fe),Fe.srcBindings===null&&(Fe.srcBindings=new $n),Fe.srcBindings.add(we))),y.add(we)}if(ce instanceof si&&ce.type===si.Table){if(0<ce.rowCount){for(ue=ce.rowDefs,pe=ue.length,we=0;we<pe;we++)if(Fe=ue[we],Fe!==void 0&&Fe.be!==null)for(var Ie=Fe.be.iterator;Ie.next();){var ze=Ie.value;ze.xd=Fe,ze.to=2,ze.wl=Fe.index,y.add(ze)}}if(0<ce.columnCount){for(ce=ce.colDefs,ue=ce.length,pe=0;pe<ue;pe++)if(we=ce[pe],we!==void 0&&we.be!==null)for(Fe=we.be.iterator;Fe.next();)Ie=Fe.value,Ie.xd=we,Ie.to=1,Ie.wl=we.index,y.add(Ie)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){Ce(b,!0);for(var z=b.srcBindings.iterator;z.next();){var ne=z.value;b.localBindings===null&&(b.localBindings=new $n),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 si&&(ne=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ne),oe!==null?(z=oe,b.targetProperty=re):xi('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+b.toString())),z instanceof ol?(ne=Ji(z.panel),b.Ai=ne===void 0?-1:ne,z.panel.bindingId=b.Ai):z instanceof Ut?(ne=Ji(z),b.Ai=ne===void 0?-1:ne,z.bindingId=b.Ai):zt("Unknown type of binding target: "+z)}y.freeze(),a instanceof Sr&&a.Zc()&&a.Va()}De.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vS(y,function(x){x instanceof si&&(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&&Zc(y),y},De.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 si))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},De.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yS(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 si&&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 si)||z.data!==y[ne])return!0;b++,ne++}return!1}function Kp(a){if(a.type===si.Spot||a.type===si.Auto)return Math.min(a.O.length,1);if(a.type===si.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Co&&E.isPanelMain))break}return x}return a.type===si.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof si&&$h(a))?1:0}De.mv=function(){for(var a=Kp(this);this.O.length>a;)this.pc(this.O.length-1,!1);g1(this,this.itemArray)};function g1(a,y){var x=Kp(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++)Xm(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 si){if(ne.data!==z){var re=Av(a,ne.data),oe=Av(a,z),ue=oe!==re;ue||(re=Dv(a,re),ue=Dv(a,oe)!==re),ue?(a.pc(E,!1),Xm(a,z,b,!1)):ne.data=z}}else Xm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Nv(a,x,0),yt(a)||a.v(),a.graduatedIntervals=null,a.If()||Jm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Ai&&(y.Te=!0),y.Te&&y instanceof Ai&&(y.wc=null))}}function Xm(a,y,x,E){if(!(y==null||0>x)){var b=Av(a,y);if(b=Dv(a,b),b!==null){if(Zc(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Lv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new Hi),a.ge.add(y,b)),z=x+Kp(a),a.Gb(z,b),E&&(b.ub=y,Nv(a,z,x),b.ub=null),b.data=y}}}function Nv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof si){var b=y,z=x;E.type===si.TableRow?E.row=b:E.type===si.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Av(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=Qs(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;zt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Dv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(p1||(p1=!0,xi('No item template Panel found for category "'+y+'" on '+a),xi(" Using default item template."),a=new si,y=new Qa,y.bind(new tl("text","",nr)),a.add(y),m1=a),E=m1)),E}function Jm(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof si){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof si&&!z.isEnabled||Jm(a,z,x)}}}function Ad(a,y){y.name=a,Qc.add(a,y)}wt.Object.defineProperties(si.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===si.Grid,this.v(),this.g("type",y,a))}},elements:{get:function(){return this.O.iterator}},naturalBounds:{get:function(){return this.dc}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"?(0>a&&Qn(a,">= 0",si,"padding"),a=new pr(a)):(0>a.left&&Qn(a.left,">= 0",si,"padding:value.left"),0>a.right&&Qn(a.right,">= 0",si,"padding:value.right"),0>a.top&&Qn(a.top,">= 0",si,"padding:value.top"),0>a.bottom&&Qn(a.bottom,">= 0",si,"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:ll},set:function(a){typeof a=="number"&&(a=new pr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Ac),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 da)&&(a instanceof da&&a.freeze(),this.T===null&&(this.T=new Ac),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 Ac),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)||zt("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 Ac),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 da)&&(a instanceof da&&a.freeze(),this.T===null&&(this.T=new Ac),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 Ac),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)||zt("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 Ac),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 Ac),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||zt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Xc(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()||zt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Xc(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 Lh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Se(this)&&(a=this.part,a!==null&&ns(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 Lh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Se(this)&&(a=this.part,a!==null&&ns(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 Lh),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 Lh),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 Lh,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 Lh,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 Lh,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 Lh,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 Ac),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new Ac),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:e0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new Ac),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:e0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new Ac),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)&&zt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Ac),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)&&zt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new Ac),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 Sr&&!(this instanceof pa);Zc(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof hi?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Sr&&(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 Kr),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yS(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&yy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&vy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||g1(this,a)}}},itemTemplate:{get:function(){return this.itemTemplateMap===null?null:this.itemTemplateMap.I("")},set:function(a){if(this.itemTemplateMap===null){if(a===null)return;this.itemTemplateMap=new Hi}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Sr||a.isPanelMain)&&zt("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(););Mo(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&&(Mo(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 ho&&(this.tb=null),this.v(),this.g("isClipping",y,a))}},isOpposite:{get:function(){return(this.l&33554432)!==0},set:function(a){var y=(this.l&33554432)!==0;y!==a&&(this.l^=33554432,this.v(),this.g("isOpposite",y,a))}},isEnabled:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;if(y!==a){var x=this.panel===null||this.panel.If();this.l^=4194304,this.g("isEnabled",y,a),y=this.diagram,y!==null&&y.undoManager.isUndoingRedoing||x&&Jm(this,this,a)}}},alignmentFocusName:{get:function(){return this.$e},set:function(a){var y=this.$e;y!==a&&(this.$e=a,this.v(),this.g("alignmentFocusName",y,a))}}}),wt.Object.defineProperties(si,{Position:{get:function(){return Qc.I("Position")}},Horizontal:{get:function(){return Qc.I("Horizontal")}},Vertical:{get:function(){return Qc.I("Vertical")}},Spot:{get:function(){return Qc.I("Spot")}},Auto:{get:function(){return Qc.I("Auto")}},Table:{get:function(){return Qc.I("Table")}},Viewbox:{get:function(){return Qc.I("Viewbox")}},TableRow:{get:function(){return Qc.I("TableRow")}},TableColumn:{get:function(){return Qc.I("TableColumn")}},Link:{get:function(){return Qc.I("Link")}},Grid:{get:function(){return Qc.I("Grid")}},Graduated:{get:function(){return Qc.I("Graduated")}}}),si.prototype.rebuildItemElements=si.prototype.mv,si.prototype.findItemPanelForData=si.prototype.sx,si.prototype.updateTargetBindings=si.prototype.La,si.prototype.copyTemplate=si.prototype.Uy,si.prototype.graduatedValueForPoint=si.prototype.Gz,si.prototype.graduatedPointForValue=si.prototype.Fz,si.prototype.findColumnForLocalX=si.prototype.fz,si.prototype.findRowForLocalY=si.prototype.nz,si.prototype.addColumnDefinition=si.prototype.By,si.prototype.addRowDefinition=si.prototype.Hy,si.prototype.addRowColumnDefinition=si.prototype.Gy,si.prototype.removeColumnDefinition=si.prototype.jA,si.prototype.getColumnDefinition=si.prototype.Eb,si.prototype.removeRowDefinition=si.prototype.oA,si.prototype.getRowDefinition=si.prototype.Fb,si.prototype.removeAt=si.prototype.mb,si.prototype.remove=si.prototype.remove,si.prototype.insertAt=si.prototype.Gb,si.prototype.elt=si.prototype.M,si.prototype.add=si.prototype.add,si.prototype.findObject=si.prototype.fb,si.prototype.findInVisualTree=si.prototype.Nl,si.prototype.walkVisualTreeFrom=si.prototype.qm,si.prototype.findMainElement=si.prototype.Pb;var p1=!1,m1=null,Qc=new Hi;si.className="Panel",si.definePanelLayout=Ad,Ad("Position",new _m),Ad("Vertical",new zm),Ad("Auto",new Hm),Ad("Link",new Um);function Lh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Lh.prototype.copy=function(){var a=new Lh;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},Lh.className="GradPanelSettings";function Ac(){this.Pc=[],this.Oc=[],this.j=this.ob=e0,this.hb=this.Hb=0,this.Qp=ll,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}Ac.prototype.copy=function(a){for(var y=new Ac,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},Ac.className="TablePanelSettings";function ol(a){Do(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Bi,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Iv,this.hg=ao,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))}ol.prototype.copy=function(){var a=new ol;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=kn(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Qm(a,y){y.isRow?a.height=y.height:a.width=y.width,a.minimum=y.minimum,a.maximum=y.maximum,a.alignment=y.alignment,a.stretch=y.stretch,a.sizing=y.sizing,a.dg=y.separatorPadding===null?null:y.separatorPadding.J(),a.separatorStroke=y.separatorStroke,a.separatorStrokeWidth=y.separatorStrokeWidth,a.tj=null,y.separatorDashArray&&(a.tj=kn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}De=ol.prototype,De.qb=function(a){a.classType===ol&&(this.sizing=a)},De.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Ji(this)},De.wi=function(a){this.Me=a},De.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)},De.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===si.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)},De.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(jo,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 qm(a){if(a.sizing===Iv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}De.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new tl(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&zt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new $n),this.be.add(b),this},wt.Object.defineProperties(ol.prototype,{panel:{get:function(){return this.Me}},isRow:{get:function(){return this.uq},set:function(a){this.uq=a}},index:{get:function(){return this.Za},set:function(a){this.Za=a}},height:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Qn(a,">= 0",ol,"height"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("height",y,a))}},width:{get:function(){return this.Hc},set:function(a){var y=this.Hc;y!==a&&(0>a&&Qn(a,">= 0",ol,"width"),this.Hc=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("width",y,a))}},minimum:{get:function(){return this.jj},set:function(a){var y=this.jj;y!==a&&((0>a||!isFinite(a))&&Qn(a,">= 0",ol,"minimum"),this.jj=a,this.actual=this.oa,this.panel!==null&&this.panel.v(),this.Ob("minimum",y,a))}},maximum:{get:function(){return this.hj},set:function(a){var y=this.hj;y!==a&&(0>a&&Qn(a,">= 0",ol,"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 pr(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&&yf(a,"RowColumnDefinition.separatorStroke"),a instanceof da&&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)||zt("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&&yf(a,"RowColumnDefinition.background"),a instanceof da&&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}}}),ol.prototype.computeEffectiveSpacing=ol.prototype.Wc,ol.prototype.computeEffectiveSpacingTop=ol.prototype.Io;var Iv=new Jt(ol,"Default",0),Vp=new Jt(ol,"None",1),e0=new Jt(ol,"ProportionalExtra",2);ol.className="RowColumnDefinition",ol.Default=Iv,ol.None=Vp,ol.ProportionalExtra=e0;function Co(a,y){Ut.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)}Zt(Co,Ut),Co.prototype.cloneProtected=function(a){Ut.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=kn(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 Qf(a){a.Na===null?a.Na=new Tv:a.Na.nc&&(a.Na=a.Na.copy())}De=Co.prototype,De.th=function(){Ut.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},De.qb=function(a){a===ni||a===ir||a===Ho||a===ao?this.geometryStretch=a:Ut.prototype.qb.call(this,a)},De.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Ji(this)};function cp(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],ue,ce,pe,we,Fe,Ie,ze=0,gt=Si(),nt=2;nt<b;nt+=2)ue=x[nt],ce=x[nt+1],pe=ue-re,re=ce-oe,pe===0&&(pe=.001),we=re/pe,Fe=Math.atan2(re,pe),Ie=Math.sqrt(pe*pe+re*re),gt.push([pe,Fe,we,Ie]),ze+=Ie,re=ue,oe=ce;re=x[0],oe=x[1],pe=E.measuredBounds.width,E instanceof Co&&(pe-=E.strokeWidth),1>pe&&(pe=1),b=x=pe,ue=ne/2,ce=ue!==0,nt=0,Ie=gt[nt],pe=Ie[0],Fe=Ie[1],we=Ie[2],Ie=Ie[3];for(var Et=0;.1<=ze;){if(Et===0&&(ce?(b=x,b-=ue,ze-=ue,ce=!1):b=x,b===0&&(b=1)),b>ze){Fi(gt);return}b>Ie?(Et=b-Ie,b=Ie):Et=0;var At=Math.sqrt(b*b/(1+we*we));if(0>pe&&(At=-At),re+=At,oe+=we*At,a.translate(re,oe),a.rotate(Fe),a.translate(-(ne/2),-(z/2)),Et===0&&E.hh(a,y),a.translate(ne/2,z/2),a.rotate(-Fe),a.translate(-re,-oe),ze-=b,Ie-=b,Et!==0){if(nt++,nt===gt.length){Fi(gt);return}Ie=gt[nt],pe=Ie[0],Fe=Ie[1],we=Ie[2],Ie=Ie[3],b=Et}}Fi(gt)}}De.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&&Ns(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===si.Link&&re instanceof pa&&re.category==="Selection"&&re.adornedObject instanceof Co&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(Ns(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===nn.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===nn.u){var ue=b.startX;oe=b.startY;var ce=b.endX,pe=b.endY;b=Math.min(ue,ce);var we=Math.min(oe,pe);ue=Math.abs(ce-ue),oe=Math.abs(pe-oe),a.beginPath(),a.rect(b,we,ue,oe),E!==null&&a.ng(E),x!==null&&(re&&z&&gu(a),a.jk(),re&&z&&Ol(a)),a.Se()}else if(b.type===nn.F)ue=b.startX,oe=b.startY,ce=b.endX,pe=b.endY,b=Math.abs(ce-ue)/2,we=Math.abs(pe-oe)/2,ue=Math.min(ue,ce)+b,oe=Math.min(oe,pe)+we,a.beginPath(),a.moveTo(ue,oe-we),a.bezierCurveTo(ue+tt.wg*b,oe-we,ue+b,oe-tt.wg*we,ue+b,oe),a.bezierCurveTo(ue+b,oe+tt.wg*we,ue+tt.wg*b,oe+we,ue,oe+we),a.bezierCurveTo(ue-tt.wg*b,oe+we,ue-b,oe+tt.wg*we,ue-b,oe),a.bezierCurveTo(ue-b,oe-tt.wg*we,ue-tt.wg*b,oe-we,ue,oe-we),a.closePath(),E!==null&&a.ng(E),x!==null&&(re&&z&&gu(a),a.jk(),re&&z&&Ol(a)),a.Se();else if(b.type===nn.o)for(b=b.figures,oe=b.length,we=0;we<oe;we++){ue=b.s[we],a.beginPath(),a.moveTo(ue.startX,ue.startY),ce=ue.segments.s,pe=ce.length;for(var Fe=null,Ie=0;Ie<pe;Ie++){var ze=ce[Ie];switch(ze.type){case _i:a.moveTo(ze.endX,ze.endY);break;case Ii:a.lineTo(ze.endX,ze.endY);break;case Gr:a.bezierCurveTo(ze.point1X,ze.point1Y,ze.point2X,ze.point2Y,ze.endX,ze.endY);break;case Zo:a.quadraticCurveTo(ze.point1X,ze.point1Y,ze.endX,ze.endY);break;case Fr:if(ze.radiusX===ze.radiusY){var gt=Math.PI/180;a.arc(ze.point1X,ze.point1Y,ze.radiusX,ze.startAngle*gt,(ze.startAngle+ze.sweepAngle)*gt,0>ze.sweepAngle,Fe!==null?Fe.endX:ue.startX,Fe!==null?Fe.endY:ue.startY)}else if(Fe=vr(ze,ue),gt=Fe.length,gt===0)a.lineTo(ze.centerX,ze.centerY);else for(var nt=0;nt<gt;nt++){var Et=Fe[nt];nt===0&&a.lineTo(Et[0],Et[1]),a.bezierCurveTo(Et[2],Et[3],Et[4],Et[5],Et[6],Et[7])}break;case Er:if(nt=gt=0,Fe!==null&&Fe.type===Fr){if(Fe=vr(Fe,ue),Et=Fe.length,Et===0){a.lineTo(ze.endX,ze.endY);break}Fe=Fe[Et-1]||null,Fe!==null&&(gt=Fe[6],nt=Fe[7])}else gt=Fe!==null?Fe.endX:ue.startX,nt=Fe!==null?Fe.endY:ue.startY;if(Fe=xr(ze,ue,gt,nt),gt=Fe.length,gt===0){a.lineTo(ze.endX,ze.endY);break}for(nt=0;nt<gt;nt++)Et=Fe[nt],a.bezierCurveTo(Et[2],Et[3],Et[4],Et[5],Et[6],Et[7]);break;default:zt("Segment not of valid type: "+ze.type)}ze.isClosed&&a.closePath(),Fe=ze}ce=ue.isFilled,z?ue.isShadowed?(ce===!0&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&(ce&&re&&gu(a),a.jk(),ce&&re&&Ol(a))):(gu(a),ce&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk(),Ol(a)):(ce&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk()),a.Se(we)}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=Si(),z.type===nn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),cp(a,y,E,x);else if(z.type===nn.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,we=b,ue=re.segments.s,ce=ue.length,pe=0;pe<ce;pe++){switch(Ie=ue[pe],Ie.type){case _i:cp(a,y,E,x),E.length=0,E.push(Ie.endX),E.push(Ie.endY),ne=Ie.endX,b=Ie.endY,oe=ne,we=b;break;case Ii:E.push(Ie.endX),E.push(Ie.endY),ne=Ie.endX,b=Ie.endY;break;case Gr:tt.Qe(ne,b,Ie.point1X,Ie.point1Y,Ie.point2X,Ie.point2Y,Ie.endX,Ie.endY,.5,E),ne=Ie.endX,b=Ie.endY;break;case Zo:tt.ep(ne,b,Ie.point1X,Ie.point1Y,Ie.endX,Ie.endY,.5,E),ne=Ie.endX,b=Ie.endY;break;case Fr:if(ze=vr(Ie,re),Fe=ze.length,Fe===0){E.push(Ie.centerX),E.push(Ie.centerY),ne=Ie.centerX,b=Ie.centerY;break}for(gt=0;gt<Fe;gt++)nt=ze[gt],tt.Qe(ne,b,nt[2],nt[3],nt[4],nt[5],nt[6],nt[7],.5,E),ne=nt[6],b=nt[7];break;case Er:if(ze=xr(Ie,re,ne,b),Fe=ze.length,Fe===0){E.push(Ie.endX),E.push(Ie.endY),ne=Ie.endX,b=Ie.endY;break}for(gt=0;gt<Fe;gt++)nt=ze[gt],tt.Qe(ne,b,nt[2],nt[3],nt[4],nt[5],nt[6],nt[7],.5,E),ne=nt[6],b=nt[7];break;default:zt("Segment not of valid type: "+Ie.type)}Ie.isClosed&&(E.push(oe),E.push(we),cp(a,y,E,x))}cp(a,y,E,x)}else if(z.type===nn.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),cp(a,y,E,x);else if(z.type===nn.F){if(b=new yo,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ne=new fr(Fr),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=vr(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++)we=z[oe],tt.Qe(ne,b,we[2],we[3],we[4],we[5],we[6],we[7],.5,E),ne=we[6],b=we[7];cp(a,y,E,x)}Fi(E),a.restore(),a.Vc(!1)}}}},De.kk=function(a,y,x){return!Ut.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)},De.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Ut.prototype.nk.call(this,a)},De.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)}},De.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof Qi){a.Mc()&&zt("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},De.mi=function(a){a===void 0&&(a=new Bn);var y=this.naturalBounds,x=this.oe;y=Bn.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=st.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),gs(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),gs(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),gs(a,E.x,E.y,0,0),Bn.free(y),st.free(E),a},De.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!==nn.j||y||(b+=2);var z=Bn.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Bn.free(z),!1;if(E=b+1e-4,x.type===nn.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:(Bn.free(z),tt.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===nn.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 Bn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Bn.free(z),a}if(x.type===nn.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 Bn.free(z),!1;ne+=E,b+=E}return this.stroke!==null&&(ne+=E,b+=E),Bn.free(z),0>=ne||0>=b?!1:1>=x*x/(ne*ne)+y*y/(b*b)}if(x.type===nn.o)return Bn.free(z),this.fill===null?Mi(x,a.x,a.y,b):yr(x,a,b,1<this.strokeWidth,y);zt("Unknown Geometry type: "+x.type)},De.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=kv[re];if(oe===void 0){var ue=tt.Ze[re];typeof ue=="string"&&(ue=tt.Ze[ue]),typeof ue=="function"?(oe=ue(null,100,100),kv[re]=oe):zt("Unsupported Figure: "+re)}ne=oe.bounds}re=ne.width,oe=ne.height,ue=ne.width;var ce=ne.height;switch(fu(this,!0)){case ni:E=x=0;break;case oi:ue=Math.max(a-z,0),ce=Math.max(y-z,0);break;case cr:ue=Math.max(a-z,0),E=0;break;case Br:x=0,ce=Math.max(y-z,0)}isFinite(b.width)&&(ue=b.width),isFinite(b.height)&&(ce=b.height);var pe=this.maxSize,we=this.minSize;switch(x=Math.max(x-z,we.width),E=Math.max(E-z,we.height),ue=Math.min(pe.width,ue),ce=Math.min(pe.height,ce),ue=isFinite(ue)?Math.max(x,ue):Math.max(re,x),ce=isFinite(ce)?Math.max(E,ce):Math.max(oe,E),x=Ov(this),x){case ni:break;case oi:re=ue,oe=ce;break;case ir:x=Math.min(ue/re,ce/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:zt(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&&tt.$(this.ua.Sk,a-z)&&tt.$(this.ua.Rk,y-z)||(this.ua=Co.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),ue+z,ce+z),b.w()?(ue=b.width,ce=b.height,ue=Math.min(pe.width,ue),ce=Math.min(pe.height,ce),ue=Math.max(we.width,ue),ce=Math.max(we.height,ce),this.dc.h(0,0,ue,ce)):this.dc.assign(ne)};function Ov(a){var y=a.geometryStretch;return a.Rd!==null?y===ao?oi:y:y===ao?kv[a.figure].defaultStretch:y}De.eh=function(a,y,x,E){ru(this,a,y,x,E)},De.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},De.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,ue=-z.m21*ne,ce=z.m11*ne,pe=ne*(z.m21*z.dy-z.m22*z.dx),we=ne*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*ue+pe,ne=a*oe+y*ce+we,re=x*re+E*ue+pe,oe=x*oe+E*ce+we,pe=this.ig/2,ue=this.ua,ue===null&&(this.measure(1/0,1/0),ue=this.ua);var Fe=ue.bounds;if(ce=!1,ue.type===nn.j)if(1.5>=this.strokeWidth)ce=tt.Ve(ue.startX,ue.startY,ue.endX,ue.endY,z,ne,re,oe,b);else{if(ue.startX===ue.endX?(E=pe,ce=0):(y=(ue.endY-ue.startY)/(ue.endX-ue.startX),ce=pe/Math.sqrt(1+y*y),E=ce*y),y=Si(),a=new st,tt.Ve(ue.startX+E,ue.startY+ce,ue.endX+E,ue.endY+ce,z,ne,re,oe,a)&&y.push(a),a=new st,tt.Ve(ue.startX-E,ue.startY-ce,ue.endX-E,ue.endY-ce,z,ne,re,oe,a)&&y.push(a),a=new st,tt.Ve(ue.startX+E,ue.startY+ce,ue.startX-E,ue.startY-ce,z,ne,re,oe,a)&&y.push(a),a=new st,tt.Ve(ue.endX+E,ue.endY+ce,ue.endX-E,ue.endY-ce,z,ne,re,oe,a)&&y.push(a),re=y.length,re===0)return Fi(y),!1;for(ce=!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);Fi(y)}else if(ue.type===nn.u)ce=tt.Ff(Fe.x-pe,Fe.y-pe,Fe.x+Fe.width+pe,Fe.y+Fe.height+pe,z,ne,re,oe,b);else if(ue.type===nn.F){y=Bn.allocAt(Fe.x,Fe.y,Fe.width,Fe.height).Bc(pe,pe);e:if(y.width===0)ce=tt.Ve(y.x,y.y,y.x,y.y+y.height,z,ne,re,oe,b);else if(y.height===0)ce=tt.Ve(y.x,y.y,y.x+y.width,y.y,z,ne,re,oe,b);else{if(a=y.width/2,ue=y.height/2,E=y.x+a,ce=y.y+ue,x=9999,z!==re&&(x=(ne-oe)/(z-re)),9999>Math.abs(x)){if(oe=ne-ce-x*(z-E),0>a*a*x*x+ue*ue-oe*oe){b.x=NaN,b.y=NaN,ce=!1;break e}pe=Math.sqrt(a*a*x*x+ue*ue-oe*oe),re=(-(a*a*x*oe)+a*ue*pe)/(ue*ue+a*a*x*x)+E,a=(-(a*a*x*oe)-a*ue*pe)/(ue*ue+a*a*x*x)+E,ue=x*(re-E)+oe+ce,oe=x*(a-E)+oe+ce,Math.abs((z-re)*(z-re))+Math.abs((ne-ue)*(ne-ue))<Math.abs((z-a)*(z-a))+Math.abs((ne-oe)*(ne-oe))?(b.x=re,b.y=ue):(b.x=a,b.y=oe)}else{if(re=ue*ue,oe=z-E,re-=re/(a*a)*oe*oe,0>re){b.x=NaN,b.y=NaN,ce=!1;break e}oe=Math.sqrt(re),re=ce+oe,oe=ce-oe,Math.abs(re-ne)<Math.abs(oe-ne)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}ce=!0}Bn.free(y)}else if(ue.type===nn.o){we=st.alloc();var Ie=re-z,ze=oe-ne,gt=Ie*Ie+ze*ze,nt=z,Et=ne;if(0<gt&&Fe.contains(nt,Et)&&(we.x=nt,we.y=Et,this.ca(we)))for(Ie!==0&&.5>Math.abs(Ie)?(ze*=.5/Ie,Ie=.5):ze!==0&&.5>Math.abs(ze)&&(Ie*=.5/ze,ze=.5),nt-=Ie,Et-=ze;Fe.contains(nt,Et);)nt-=Ie,Et-=ze;for(b.x=re,b.y=oe,ze=0;ze<ue.figures.count;ze++){var At=ue.figures.s[ze],Tt=At.isFilled?nt:z,Vt=At.isFilled?Et:ne,mn=At.segments;Fe=At.startX,Ie=At.startY;for(var bi=Fe,Yi=Ie,Gi=0;Gi<mn.count;Gi++){var di=mn.s[Gi],qn=di.type,so=di.endX,Vr=di.endY,Fa=!1;switch(qn){case _i:bi=so,Yi=Vr;break;case Ii:Fa=n0(Fe,Ie,so,Vr,Tt,Vt,re,oe,we);break;case Gr:Fa=tt.Eo(Fe,Ie,di.point1X,di.point1Y,di.point2X,di.point2Y,so,Vr,Tt,Vt,re,oe,.6,we);break;case Zo:Fa=tt.Eo(Fe,Ie,Fe+2/3*(di.point1X-Fe),Ie+2/3*(di.point1Y-Ie),so+2/3*(di.point1X-so),Vr+2/3*(di.point1Y-Vr),so,Vr,Tt,Vt,re,oe,.6,we);break;case Fr:case Er:qn=di.type===Fr?vr(di,At):xr(di,At,Fe,Ie);var Ja=qn.length;if(Ja===0){Fa=n0(Fe,Ie,di.type===Fr?di.centerX:di.endX,di.type===Fr?di.centerY:di.endY,Tt,Vt,re,oe,we);break}for(Vr=null,so=0;so<Ja;so++){if(Vr=qn[so],so===0&&n0(Fe,Ie,Vr[0],Vr[1],Tt,Vt,re,oe,we)){var Cl=t0(Tt,Vt,we,gt,b);Cl<gt&&(gt=Cl,ce=!0)}tt.Eo(Vr[0],Vr[1],Vr[2],Vr[3],Vr[4],Vr[5],Vr[6],Vr[7],Tt,Vt,re,oe,.6,we)&&(Cl=t0(Tt,Vt,we,gt,b),Cl<gt&&(gt=Cl,ce=!0))}so=Vr[6],Vr=Vr[7];break;default:zt("Unknown Segment type: "+qn)}Fe=so,Ie=Vr,Fa&&(Fa=t0(Tt,Vt,we,gt,b),Fa<gt&&(gt=Fa,ce=!0)),di.isClosed&&(so=bi,Vr=Yi,n0(Fe,Ie,so,Vr,Tt,Vt,re,oe,we)&&(di=t0(Tt,Vt,we,gt,b),di<gt&&(gt=di,ce=!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,st.free(we)}else zt("Unknown Geometry type: "+ue.type);return ce?(this.transform.Ga(b),!0):!1};function t0(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 n0(a,y,x,E,b,z,ne,re,oe){if(tt.$(a,x)&&tt.$(y,E)||tt.$(b,ne)&&tt.$(z,re))return!1;var ue=!1,ce=(b-ne)*(y-E)-(z-re)*(a-x);return ce===0?!1:(oe.x=((b*re-z*ne)*(a-x)-(b-ne)*(a*E-y*x))/ce,oe.y=((b*re-z*ne)*(y-E)-(z-re)*(a*E-y*x))/ce,(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||tt.$(oe.y,a))&&(oe.y<y||tt.$(oe.y,y))&&(ue=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||tt.$(oe.x,y))&&(oe.x<a||tt.$(oe.x,a))&&(ue=!0)),ue)}De.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=st.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)))),st.free(z),b},De.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Xt.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ne=st.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 st.free(ne),!0;var re=st.alloc(),oe=st.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,qf(this,ne,re,oe)?y=!0:(ne.x=b,ne.y=a,ne.transform(x),qf(this,ne,re,oe)?y=!0:(re.x=E,re.y=a,re.transform(x),qf(this,ne,re,oe)?y=!0:(ne.x=E,ne.y=z,ne.transform(x),qf(this,ne,re,oe)&&(y=!0)))),st.free(ne),Xt.free(x),st.free(re),st.free(oe),y};function qf(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)}De.tx=function(a,y,x){function E(gt,nt){for(var Et=gt.length,At=0;At<Et;At+=2)if(nt.zd(gt[At],gt[At+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,ue=ne.x+ne.width;if(ne=ne.y+ne.height,br(a.x,a.y,re,oe)<=b&&br(a.x,a.y,ue,oe)<=b&&br(a.x,a.y,re,ne)<=b&&br(a.x,a.y,ue,ne)<=b)return!0}if(re=y.startX,oe=y.startY,ue=y.endX,ne=y.endY,y.type===nn.j){if(x=(re-ue)*(a.x-ue)+(oe-ne)*(a.y-ne),ha(a.x,a.y,re,oe,ue,ne)<=(0<=(ue-re)*(a.x-re)+(ne-oe)*(a.y-oe)&&0<=x?b:z))return!0}else{if(y.type===nn.u)return y=!1,x&&(y=ha(a.x,a.y,re,oe,re,ne)<=b||ha(a.x,a.y,re,oe,ue,oe)<=b||ha(a.x,a.y,ue,oe,ue,ne)<=b||ha(a.x,a.y,re,ne,ue,ne)<=b),y;if(y.type===nn.F){y=a.x-(re+ue)/2,z=a.y-(oe+ne)/2;var ce=Math.abs(ue-re)/2,pe=Math.abs(ne-oe)/2;if(ce===0||pe===0)return ha(a.x,a.y,re,oe,ue,ne)<=b;if(x){if(a=tt.$y(ce,pe,y,z),a*a<=b)return!0}else return!(br(y,z,-ce,0)>=b||br(y,z,0,-pe)>=b||br(y,z,0,pe)>=b||br(y,z,ce,0)>=b)}else if(y.type===nn.o){if(ue=y.bounds,z=ue.x,re=ue.y,oe=ue.x+ue.width,ue=ue.y+ue.height,a.x>oe&&a.x<z&&a.y>ue&&a.y<re&&ha(a.x,a.y,z,re,z,ue)>b&&ha(a.x,a.y,z,re,oe,re)>b&&ha(a.x,a.y,oe,ue,z,ue)>b&&ha(a.x,a.y,oe,ue,oe,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Mi(y,a.x,a.y,z):yr(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,ce=z.startY,a.zd(ne,ce)>b)return!1;for(re=z.segments.s,oe=re.length,ue=0;ue<oe;ue++)switch(pe=re[ue],pe.type){case _i:case Ii:if(ne=pe.endX,ce=pe.endY,a.zd(ne,ce)>b)return!1;break;case Gr:var we=Si();if(tt.Qe(ne,ce,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.8,we),ne=E(we,a),Fi(we),ne||(ne=pe.endX,ce=pe.endY,a.zd(ne,ce)>b))return!1;break;case Zo:if(we=Si(),tt.ep(ne,ce,pe.point1X,pe.point1Y,pe.endX,pe.endY,.8,we),ne=E(we,a),Fi(we),ne||(ne=pe.endX,ce=pe.endY,a.zd(ne,ce)>b))return!1;break;case Fr:case Er:we=pe.type===Fr?vr(pe,z):xr(pe,z,ne,ce);var Fe=we.length;if(Fe===0){if(ne=pe.type===Fr?pe.centerX:pe.endX,ce=pe.type===Fr?pe.centerY:pe.endY,a.zd(ne,ce)>b)return!1;break}pe=null;for(var Ie=Si(),ze=0;ze<Fe;ze++)if(pe=we[ze],Ie.length=0,tt.Qe(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.8,Ie),E(Ie,a))return Fi(Ie),!1;Fi(Ie),pe!==null&&(ne=pe[6],ce=pe[7]);break;default:zt("Unknown Segment type: "+pe.type)}}return!0}}}return!1},De.qc=function(){this.ua=null},De.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=nm,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Ao):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Qi(1-Ao.x,Ao.y)))}Co.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=qd[a.toArrow];else a.fromArrow!=="None"?E=qd[a.fromArrow]:(E=tt.Ze[a.figure],typeof E=="string"&&(E=tt.Ze[E]),E===void 0&&zt("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=tt.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function y1(a){var y=qd[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=qd[x],y===void 0){var E=null,b;for(b in tt.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=nn.parse(tt.um[E],!1),qd[E]=a,x!==E&&(qd[x]=E),E}}return typeof y=="string"?y:y instanceof nn?a:null}wt.Object.defineProperties(Co.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),Se(this)&&(a=this.part,a!==null&&ns(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=nn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=st.allocAt(-y.x,-y.y),st.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&&yf(a,"Shape.fill"),a instanceof da&&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&&yf(a,"Shape.stroke"),a instanceof da&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else Qn(a,"value >= 0",Co,"strokeWidth:value")}},strokeCap:{get:function(){return this.Na!==null?this.Na.Hr:"butt"},set:function(a){var y=this.strokeCap;y!==a&&(typeof a!="string"||a!=="butt"&&a!=="round"&&a!=="square"?Qn(a,'"butt", "round", or "square"',Co,"strokeCap"):(Qf(this),this.Na.Hr=a,this.N(),this.g("strokeCap",y,a)))}},strokeJoin:{get:function(){return this.Na!==null?this.Na.Ir:"miter"},set:function(a){var y=this.strokeJoin;y!==a&&(typeof a!="string"||a!=="miter"&&a!=="bevel"&&a!=="round"?Qn(a,'"miter", "bevel", or "round"',Co,"strokeJoin"):(Qf(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){Qf(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)||zt("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&&(Qf(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=tt.Ze[a];typeof x=="function"?x=a:(x=tt.Ze[a.toLowerCase()])||zt("Unknown Shape.figure: "+a),y!==x&&(a=this.part,a!==null&&(a.ag=NaN),this.an=x,this.Rd=null,this.qc(),this.v(),this.g("figure",y,x))}}},toArrow:{get:function(){return this.Ua!==null?this.Ua.V:"None"},set:function(a){var y=this.toArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?zt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new no),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?zt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new no),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Bi},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Qf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Bi},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Qf(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&&(Qf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:ao},set:function(a){var y=this.geometryStretch;y!==a&&(Qf(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 eh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Xc(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 eh),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 eh),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 eh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Co.prototype.intersectsRect=Co.prototype.Yc,Co.prototype.containedInRect=Co.prototype.fh,Co.prototype.getNearestIntersectionPoint=Co.prototype.rs,Co.prototype.getDocumentBounds=Co.prototype.mi,Co.prototype.getDocumentPoint=Co.prototype.ga;var qd=new tr,kv=new tr;Co.className="Shape",Co.getFigureGenerators=function(){var a=new Hi,y;for(y in tt.Ze)y!==y.toLowerCase()&&a.add(y,tt.Ze[y]);return a.freeze(),a},Co.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=tt.Ze;E[a]=y,E[x]=a},Co.getArrowheadGeometries=function(){var a=new Hi;for(E in tt.um)if(qd[E]===void 0){var y=nn.parse(tt.um[E],!1);qd[E]=y,y=E.toLowerCase(),y!==E&&(qd[y]=E)}for(var x in qd)if(x!==x.toLowerCase()){var E=qd[x];E instanceof nn&&a.add(x,E)}return a.freeze(),a},Co.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=nn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||zt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=qd;E[a]=x,E[y]=a};function Tv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=ao,this.gg=this.fg=Bi}Tv.prototype.copy=function(){var a=new Tv;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 Qa(a,y){return Ut.call(this),s0||(ju=Ls?new $l(null).context:null,s0=!0),this.l|=2097152,this.ec="",this.xc="black",this.Ae="13px sans-serif",this.Lq=this.Cb=this.Gc=0,this.da=this.fa=this.Gm=null,this.Ih=0,this.df=null,this.Le=0,this.ze=this.Qb=this.Qc=null,typeof a=="string"?this.text=a:a&&Object.assign(this,a),y&&Object.assign(this,y),this}Zt(Qa,Ut),Qa.prototype.cloneProtected=function(a){Ut.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 Dd(a){a.da===null?a.da=new Wv:a.da.nc&&(a.da=a.da.copy())}De=Qa.prototype,De.th=function(){Ut.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function x1(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}De.qb=function(a){a.classType===Qa?this.wrap=a:Ut.prototype.qb.call(this,a)},De.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},De.v=function(){Ut.prototype.v.call(this)},De.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=Yp(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 ue=this.isStrikethrough;Ns(this,a,this.xc,!0,!1,x,E),(oe||ue)&&Ns(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ce=this.oe,pe=ce.dx-(ne*ce.m21+ce.dx);ce=ce.dy-(ne*ce.m22+ce.dy);var we=y.scale;switch(8>(pe*pe+ce*ce)*we*we&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Da&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,pe=this.spacingBelow,this.flip){case ea:a.translate(b,0),a.scale(-1,1);break;case Bo:a.translate(0,z),a.scale(1,-1);break;case _a:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ce=this.Gc,we=(y+ne+pe)*ce,z>we&&(E=this.verticalAlignment,E=E.y*z-E.y*we+E.offsetY),ce===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,ue);else if(this.Qc!==null&&this.Qb!==null)for(we=0;we<ce;we++){var Fe=this.Qc[we];Fe>b&&(Fe=b),E+=y,this.Oj(this.Qb[we],a,0,E,b,ne,Fe,x,re,oe,ue),E+=ne+pe}switch(this.flip){case ea:a.scale(-1,1),a.translate(-b,0);break;case Bo:a.scale(1,-1),a.translate(0,-z);break;case _a:a.scale(-1,-1),a.translate(-b,-z)}}},De.Oj=function(a,y,x,E,b,z,ne,re,oe,ue,ce){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=i0!==null?i0(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),ue){re=r0!==null?r0(this,z):.8*z,oe=x+pe,ue=E+re,b=x+pe+ne,re=E+re;var we=a;y.beginPath(),y.lineWidth=we,y.moveTo(oe,ue),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Da&&y.ad.classList.add("gojs-td")}ce&&(ce=E+z-z/2.2|0,a%2!==0&&(ce+=.5),E=x+pe,z=ce,x=x+pe+ne,ne=ce,pe=a,y.beginPath(),y.lineWidth=pe,y.moveTo(E,z),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Da&&y.ad.classList.add("gojs-td"))}},De.kk=function(a,y,x){if(!Ut.prototype.kk.call(this,a,y,x))return!1;if(Ns(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++)_u(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,_u(a,y,!0);return!0},De.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Ut.prototype.nk.call(this,a)},De.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)}},De.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;ju!==null&&F1!==z&&(F1=ju.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 ue=z.indexOf(`
|
|
|
`,re);ue===-1&&(ue=z.length,oe=!0),re=z.substr(re,ue-re),this.formatting===Xp&&(re=re.trim()),ne=Math.max(ne,qc(re)),re=ue+1}z=ne}else ne=z.indexOf(`
|
|
|
`,0),0<=ne&&(z=z.substr(0,ne)),z=qc(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=P1(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===o0&&(y=this.Ae,y=this.overflow===o0?S1(y):0,ue=this.spacingAbove+this.spacingBelow,ue=Math.max(0,Yp(this)+ue),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/ue+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,ue=this.Qb[oe],y=Math.max(1,a-y);qc(ue)>y&&1<ue.length;)ue=ue.substr(0,ue.length-1);ue+=Jp,y=qc(ue),this.Qb[oe]=ue,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===w1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),ne=Math.max(E,ne),Fs(this.dc,z,ne),this.Ge(0,0,z,ne),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},De.eh=function(a,y,x,E){ru(this,a,y,x,E)};function Up(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Rv(a,y,x,E){var b=a.formatting===Xp;b&&(y=y.trim());var z=0,ne=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,Yp(a)+re);var oe=a.overflow===o0?S1(ne):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ne=y,a.wrap===_v){a.Le=1;var ue=qc(y);if(oe===0||ue<=x)a.Cb=Math.max(a.Cb,ue),Up(a,y,a.Cb),E!==null&&E.h(ue,re);else{for(z=dp(a,ne),ne=ne.substr(z.length),y=dp(a,ne),ue=qc(z+y);0<y.length&&ue<=x;)z+=y,ne=ne.substr(y.length),y=dp(a,ne),ue=z+y,b&&(ue=ue.trim()),ue=qc(ue);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);qc(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Jp;var ce=qc(z);a.Cb=ce,Up(a,z,ce),E!==null&&E.h(ce,re)}}else{for(oe=0,ne.length===0&&(oe=1,Up(a,ne,0));0<ne.length;){for(y=dp(a,ne),ne=ne.substr(y.length);qc(y)>x;){var pe=1;for(ue=qc(y.substr(0,pe)),ce=0;ue<=x;)pe++,ce=ue,ue=qc(y.substr(0,pe));if(pe===1){var we=ue;z=Math.max(z,ue)}else we=ce,z=Math.max(z,ce);if(pe--,1>pe&&(pe=1),Up(a,y.substr(0,pe),we),oe++,y=y.substr(pe),a.Gc+oe>a.maxLines)break}for(ce=dp(a,ne),ue=qc(y+ce);0<ce.length&&ue<=x;)y+=ce,ne=ne.substr(ce.length),ce=dp(a,ne),ue=y+ce,b&&(ue=ue.trim()),ue=qc(ue);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ce.length===0?(pe=ue,z=Math.max(z,ue)):(pe=ce=qc(y),z=Math.max(z,ce)),Up(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 dp(a,y){if(a.wrap===C1)return y.substr(0,1);for(var x=y.length,E=0,b=xS;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===E1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function qc(a){return ju===null?8*a.length:ju.measureText(a).width}function Yp(a){if(a.df!==null)return a.df;var y=a.Ae;if(ju===null){var x=16;return a.df=x}return Zv[y]!==void 0&&5e3>b1?x=Zv[y]:(x=1.3*ju.measureText("M").width,Zv[y]=x,b1++),a.df=x}function S1(a){if(ju===null)return 6;if(a0[a]!==void 0&&5e3>Hv)var y=a0[a];else y=ju.measureText(Jp).width,a0[a]=y,Hv++;return y}function P1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
|
`).replace(/\r/g,`
|
|
|
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,Yp(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!==_v){a.Le=0;var oe=fi.alloc();Rv(a,z,y,oe),b+=oe.height,fi.free(oe),a.Gc+=a.Le}else Rv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ne+1}return a.Lq=b}wt.Object.defineProperties(Qa.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"||(Dd(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:ni},set:function(a){var y=this.flip;y!==a&&(Dd(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:ma},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),Dd(this),this.da.Yr=a,uu(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=fi.alloc();Rv(this,this.ec,999999,a);var y=a.width;fi.free(a),a=P1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Fs(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:jv},set:function(a){var y=this.wrap;y!==a&&(Dd(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:zv},set:function(a){var y=this.overflow;y!==a&&(Dd(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&&yf(a,"TextBlock.stroke"),a instanceof da&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(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&&(Dd(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&&(Dd(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 eh),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 eh),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 eh),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 eh),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 eh),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&&(Dd(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&&(Dd(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&&(Dd(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&&(Dd(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Xp},set:function(a){var y=this.formatting;y!==a&&(Dd(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&Qn(a,"> 0",Qa,"maxLines"),Dd(this),this.da.Jq=a,this.v(),this.g("maxLines",y,a))}},metrics:{get:function(){return{arrSize:this.Qc!==null?this.Qc:[this.Cb],arrText:this.Qb!==null?this.Qb:[this.ze],maxLineWidth:this.Cb,fontHeight:this.df}}},choices:{get:function(){return this.Gm},set:function(a){var y=this.Gm;y!==a&&(this.Gm=a,this.g("choices",y,a))}}});var i0=null,r0=null,_v=new Jt(Qa,"None",0),w1=new Jt(Qa,"WrapFit",1),jv=new Jt(Qa,"WrapDesiredSize",2),C1=new Jt(Qa,"WrapBreakAll",3),zv=new Jt(Qa,"OverflowClip",0),o0=new Jt(Qa,"OverflowEllipsis",1),Xp=new Jt(Qa,"FormatTrim",0),E1=new Jt(Qa,"FormatNone",0),xS=/[ \u200b\u00ad]/,Zv=new tr,b1=0,a0=new tr,Hv=0,Jp="...",F1="",ju=null,s0=!1;Qa.className="TextBlock";function Wv(){this.nc=!1,this.Hd=null,this.Xf=ni,this.gq=Xp,this.Jq=1/0,this.$q=zv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=ma,this.$r=jv}Wv.prototype.copy=function(){var a=new Wv;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},Qa.getEllipsis=function(){return Jp},Qa.setEllipsis=function(a){Jp=a,a0=new tr,Hv=0},Qa.getBaseline=function(){return i0},Qa.setBaseline=function(a){i0=a},Qa.getUnderline=function(){return r0},Qa.setUnderline=function(a){r0=a},Qa.isValidFont=function(a){if(s0||(ju=Ls?new $l(null).context:null,s0=!0),ju===null)return!0;var y=ju.font;if(a===y||a==="10px sans-serif")return!0;ju.font="10px sans-serif",ju.font=a;var x=ju.font;if(x!=="10px sans-serif")return ju.font=y,!0;ju.font="19px serif";var E=ju.font;return ju.font=a,x=ju.font,ju.font=y,x!==E},Qa.FormatNone=E1,Qa.FormatTrim=Xp,Qa.None=_v,Qa.OverflowClip=zv,Qa.OverflowEllipsis=o0,Qa.WrapBreakAll=C1,Qa.WrapDesiredSize=jv,Qa.WrapFit=w1;function eh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}eh.prototype.copy=function(){var a=new eh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},eh.className="GradElementSettings";function zu(a,y){Ut.call(this),this.Eg=null,this.qo="",this.Xg=Ea,this.Nk=oi,this.Zg=this.Hd=null,this.Mk=Io,this.Xf=ni,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var hp;Zt(zu,Ut),zu.prototype.cloneProtected=function(a){Ut.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},zu.prototype.qb=function(a){a===ni||a===ir||a===Ho?this.imageStretch=a:Ut.prototype.qb.call(this,a)},zu.prototype.toString=function(){return"Picture("+this.source+")#"+Ji(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new tr,l0=0)}function B1(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()||(vt(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=Si();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);Fi(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}zu.prototype.hA=function(){if(this.source!==""){fp(this.source);var a=this.source;this.source="",this.source=a}},zu.prototype.redraw=function(){this.N(),this.Uc=!0},zu.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 fd)){var b=a instanceof Da;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 ue=oe,ce=re;this.sourceRect.w()&&(z=this.Xg.x,ne=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var pe=oe,we=re,Fe=this.Nk,Ie=this.Mk;switch(Fe){case ni:if(this.sourceRect.w())break;pe>=E.width&&(z=z+Ie.offsetX+(pe*Ie.x-E.width*Ie.x)),we>=E.height&&(ne=ne+Ie.offsetY+(we*Ie.y-E.height*Ie.y)),oe=Math.min(E.width,pe),re=Math.min(E.height,we);break;case oi:pe=E.width,we=E.height;break;case ir:case Ho:Fe===ir?(Fe=Math.min(E.height/we,E.width/pe),pe*=Fe,we*=Fe):Fe===Ho&&(Fe=Math.max(E.height/we,E.width/pe),pe*=Fe,we*=Fe,pe>=E.width&&(z=(z+Ie.offsetX+(pe*Ie.x-E.width*Ie.x)/pe)*oe),we>=E.height&&(ne=(ne+Ie.offsetY+(we*Ie.y-E.height*Ie.y)/we)*re),oe*=1/(pe/E.width),re*=1/(we/E.height),pe=E.width,we=E.height)}Fe=this.Df()*y.scale;var ze=pe*Fe*we*Fe,gt=oe*re/ze,nt=x.__goCache;Fe=null;var Et=SS;if(!b){if(x.sq&&nt!==void 0&&4<ze&>>Et*Et)for(nt.gi===null&&(L1(nt,4,ue,ce,x),L1(nt,16,ue,ce,x)),b=nt.gi,ue=b.length,ce=0;ce<ue&&b[ce].ratio*b[ce].ratio<gt;ce++)Fe=b[ce];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new $l(null).context;try{b.drawImage(this.Eg,0,0)}catch(At){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(At){this.vl=!0}}if(this.vl)return}}switch(b=pe<E.width?Ie.offsetX+(E.width*Ie.x-pe*Ie.x):0,Ie=we<E.height?Ie.offsetY+(E.height*Ie.y-we*Ie.y):0,this.flip){case ea:a.translate(Math.min(E.width,pe),0),a.scale(-1,1);break;case Bo:a.translate(0,Math.min(E.height,we)),a.scale(1,-1);break;case _a:a.translate(Math.min(E.width,pe),Math.min(E.height,we)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&nt!==void 0&&Fe!==null&&Fe.ratio!==1){a.save(),y=Fe.ratio;try{a.drawImage(Fe.source,z/y,ne/y,Math.min(Fe.source.width,oe/y),Math.min(Fe.source.height,re/y),b,Ie,Math.min(E.width,pe),Math.min(E.height,we)),a instanceof Da&&(this.bt=[z/y,ne/y,Math.min(Fe.source.width,oe/y),Math.min(Fe.source.height,re/y),b,Ie,Math.min(E.width,pe),Math.min(E.height,we)])}catch(At){this.en=!1}a.restore()}else try{a.drawImage(x,z,ne,oe,re,b,Ie,Math.min(E.width,pe),Math.min(E.height,we)),a instanceof Da&&(this.bt=[z,ne,oe,re,b,Ie,Math.min(E.width,pe),Math.min(E.height,we)])}catch(At){this.en=!1}switch(this.flip){case ea:a.scale(-1,1),a.translate(-Math.min(E.width,pe),0);break;case Bo:a.scale(1,-1),a.translate(0,-Math.min(E.height,we));break;case _a:a.scale(-1,-1),a.translate(-Math.min(E.width,pe),-Math.min(E.height,we))}}}}},zu.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=fu(this,!0),ne=this.Eg,re=this.qn,oe=0,ue=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,ue=re?+ne.height:ne.naturalHeight),isFinite(b.width)||z===oi||z===cr?(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===oi||z===Br?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ne!==null&&(y=ue)),E=0):ne!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ue),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)),Fs(this.dc,a,y),this.Ge(0,0,a,y)},zu.prototype.eh=function(a,y,x,E){ru(this,a,y,x,E)},wt.Object.defineProperties(zu.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||zt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&vg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Un),E!==null&&x&&yh(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()||(vt(this,!1),this.v())):x&&B1(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=hp;if(Ls){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<l0&&(fp(),x=hp),E=pn("img"),E.hn=!0,B1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,l0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new M1),this.v(),this.N()}this.g("source",y,a)}}},sourceCrossOrigin:{get:function(){return this.rl},set:function(a){if(this.rl!==a&&(this.rl=a,this.element!==null)){var y=this.element.getAttribute("src");a===null&&typeof y=="string"?this.element.crossOrigin=null:a!==null&&(this.element.crossOrigin=a(this)),this.element.src=y}}},sourceRect:{get:function(){return this.Xg},set:function(a){var y=this.Xg;y.D(a)||(this.Xg=a=a.J(),this.N(),this.g("sourceRect",y,a))}},imageStretch:{get:function(){return this.Nk},set:function(a){var y=this.Nk;y!==a&&(this.Nk=a,this.N(),this.g("imageStretch",y,a))}},flip:{get:function(){return this.Xf},set:function(a){var y=this.Xf;y!==a&&(this.Xf=a,this.N(),this.g("flip",y,a))}},imageAlignment:{get:function(){return this.Mk},set:function(a){var y=this.Mk;y.D(a)||(this.Mk=a=a.J(),this.N(),this.g("imageAlignment",y,a))}},errorFunction:{get:function(){return this.Hd},set:function(a){var y=this.Hd;y!==a&&(this.Hd=a,this.g("errorFunction",y,a))}},successFunction:{get:function(){return this.Zg},set:function(a){var y=this.Zg;y!==a&&(this.Zg=a,this.g("successFunction",y,a))}},naturalBounds:{get:function(){return this.dc}}}),zu.prototype.redraw=zu.prototype.redraw,zu.prototype.reloadSource=zu.prototype.hA;var l0=0,SS=4;zu.className="Picture",hp=new tr,zu.clearCache=fp;function M1(){this.gi=null}function L1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new $l(null),ne=z.context,re=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new N1(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))}M1.className="PictureCacheArray";function N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function gp(){this.os=new nn,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new nn,this.mc=null};function pp(a,y,x,E,b,z){a.mc=new yo,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 PS(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}gp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new fr(_i);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},gp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new fr(Ii);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Kh(a,y,x,E,b,z,ne){var re;re===void 0&&(re=!1);var oe=new fr(Gr);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 u0(a,y,x,E,b){var z;z===void 0&&(z=!1);var ne=new fr(Zo);ne.point1X=y,ne.point1Y=x,ne.endX=E,ne.endY=b,z&&ne.close(),a.mc.segments.add(ne)}gp.prototype.arcTo=function(a,y,x,E,b,z,ne){z===void 0&&(z=0),ne===void 0&&(ne=!1);var re=new fr(Fr);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 wS(a,y,x,E,b,z,ne,re){var oe;oe===void 0&&(oe=!1),y=new fr(Er,ne,re,y,x,E,b,z),oe&&y.close(),a.mc.segments.add(y)}function A1(a){var y=c0;return y!==null?(c0=null,y.reset(a),y):(y=new gp,y.reset(a),y)}var c0=null;gp.className="StreamGeometryContext";function cu(a,y){var x=a.toLowerCase(),E=tt.Ze;E[a]=y,E[x]=a}cu("Rectangle",function(a,y,x){a="r"+y+","+x;var E=tt.Mf[a];return E!==void 0||(E=new nn(nn.u),E.endX=y,E.endY=x,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),cu("Square",function(a,y,x){a="s"+y+","+x;var E=tt.Mf[a];return E!==void 0||(E=new nn(nn.u),E.endX=y,E.endY=x,E.defaultStretch=ir,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),cu("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=tt.Mf[E];if(b!==void 0)return b;var z=a*tt.wg;return b=new nn().add(new yo(a,0,!0).add(new fr(Ii,y-a,0)).add(new fr(Gr,y,a,y-z,0,y,z)).add(new fr(Ii,y,x-a)).add(new fr(Gr,y-a,x,y,x-z,y-z,x)).add(new fr(Ii,a,x)).add(new fr(Gr,0,x-a,z,x,0,x-z)).add(new fr(Ii,0,a)).add(new fr(Gr,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Qi(0,0,z,z),b.spot2=new Qi(1,1,-z,-z)),tt.Nf<tt.vm&&(tt.Mf[E]=b,tt.Nf++),b}),cu("Border","RoundedRectangle"),cu("Ellipse",function(a,y,x){a="e"+y+","+x;var E=tt.Mf[a];return E!==void 0||(E=new nn(nn.F),E.endX=y,E.endY=x,E.spot1=Aa,E.spot2=Ha,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),cu("Circle",function(a,y,x){a="c"+y+","+x;var E=tt.Mf[a];return E!==void 0||(E=new nn(nn.F),E.endX=y,E.endY=x,E.spot1=Aa,E.spot2=Ha,E.defaultStretch=ir,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),cu("TriangleRight",function(a,y,x){return new nn().add(new yo(0,0).add(new fr(Ii,y,.5*x)).add(new fr(Ii,0,x).close())).pm(0,.25,.5,.75)}),cu("TriangleDown",function(a,y,x){return new nn().add(new yo(0,0).add(new fr(Ii,y,0)).add(new fr(Ii,.5*y,x).close())).pm(.25,0,.75,.5)}),cu("TriangleLeft",function(a,y,x){return new nn().add(new yo(y,x).add(new fr(Ii,0,.5*x)).add(new fr(Ii,y,0).close())).pm(.5,.25,1,.75)}),cu("TriangleUp",function(a,y,x){return new nn().add(new yo(y,x).add(new fr(Ii,0,x)).add(new fr(Ii,.5*y,0).close())).pm(.25,.5,.75,1)}),cu("Triangle","TriangleUp"),cu("Diamond",function(a,y,x){return new nn().add(new yo(.5*y,0).add(new fr(Ii,0,.5*x)).add(new fr(Ii,.5*y,x)).add(new fr(Ii,y,.5*x).close())).pm(.25,.25,.75,.75)}),cu("LineH",function(a,y,x){return a=new nn(nn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),cu("LineV",function(a,y,x){return a=new nn(nn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),cu("None","Rectangle"),cu("BarH","Rectangle"),cu("BarV","Rectangle"),cu("MinusLine","LineH"),cu("PlusLine",function(a,y,x){return new nn().add(new yo(0,x/2,!1).add(new fr(Ii,y,x/2)).add(new fr(_i,y/2,0)).add(new fr(Ii,y/2,x)))}),cu("XLine",function(a,y,x){return new nn().add(new yo(0,x,!1).add(new fr(Ii,y,0)).add(new fr(_i,0,0)).add(new fr(Ii,y,x)))}),cu("LineRight",function(a,y,x){return new nn().add(new yo(.25*y,0,!1).add(new fr(Ii,.75*y,.5*x)).add(new fr(Ii,.25*y,x)))}),cu("LineDown",function(a,y,x){return new nn().add(new yo(0,.25*x,!1).add(new fr(Ii,.5*y,.75*x)).add(new fr(Ii,y,.25*x)))}),cu("LineLeft",function(a,y,x){return new nn().add(new yo(.75*y,0,!1).add(new fr(Ii,.25*y,.5*x)).add(new fr(Ii,.75*y,x)))}),cu("LineUp",function(a,y,x){return new nn().add(new yo(0,.75*x,!1).add(new fr(Ii,.5*y,.25*x)).add(new fr(Ii,y,.75*x)))}),tt.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 Gv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=ms,this.ir=null,this.jr="",this.lr=Bi,this.Gq="",this.Hq=Us,this.Pq=Ia,this.Kq=Ma,this.Up=null,this.Cq=127,this.zr=xs,this.yr="gray",this.Vg=4}Gv.prototype.copy=function(){var a=new Gv;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 Sr(a,y){a===void 0||a instanceof ul||typeof a=="string"?si.call(this,a):(si.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 st(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Bn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Zt(Sr,si),Sr.prototype.cloneProtected=function(a){si.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},De=Sr.prototype,De.Af=function(a){si.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},De.toString=function(){var a=Ti(this.constructor)+"#"+Ji(this);return this.data!==null&&(a+="("+nr(this.data)+")"),a};function Zu(a){a.P===null?a.P=new Gv:a.P.nc&&(a.P=a.P.copy())}De.th=function(){si.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},De.gk=function(a,y,x,E,b,z,ne){var re=this.diagram;re!==null&&(a===Sa&&y==="elements"?b instanceof si?Jf(b,function(oe){vy(re.partManager,oe),zh(re,oe)}):yh(re,b):a===Ga&&y==="elements"&&(b instanceof si?Jf(b,function(oe){yy(re.partManager,oe,re)}):vg(re,b)),re.cb(a,y,x,E,b,z,ne))},De.La=function(a){if(si.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 si&&Jf(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Sr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Sr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Sr.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 Hi),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)))}}},Sr.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)}},Sr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Si();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Fi(y)}},Sr.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 ho?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof pa))break e;Zc(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=si.Link),x.adornedObject=y)}if(x!==null){x.type===si.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(CS(this,a),y=this.adornments;y.next();)y.value.La()}},Sr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function $v(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function CS(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function d0(a){if(Pf(a)===!1){Vv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function D1(a){if(a.G|=2097152,Pf(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||k1(a,y,x),x=a.Ib;var E=Bn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Bn.free(E),Vv(a,!1)}}Sr.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Xt);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Sr.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Io;this.locationSpot.sb()&&(z=this.locationSpot);var ne=st.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),st.free(ne)}},Sr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Sr.prototype.moveTo=function(a,y,x){a=st.allocAt(a,y),this.move(a,x),st.free(a)},Sr.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())},Sr.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())},Sr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new Hi),y.I(a)!==null)return y.I(a);var x=si.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Vh(a,y,x,E){E===void 0&&(E=new st),x=x.Mc()?Io: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}Sr.prototype.mi=function(a){return a===void 0&&(a=new Bn),a.assign(this.actualBounds)},Sr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function I1(a){var y=st.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Co?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 eg(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=c1(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}Sr.prototype.arrange=function(){if(kt(this)===!1)D1(this);else{Ht(this,!1);var a=this.Ib,y=Bn.alloc();y.assign(a);var x=wf(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;k1(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()||tt.B(y.width,a.width)&&tt.B(y.height,a.height)||0<=this.vw&&this.C(16),Bn.free(y),Vv(this,!1)}},De=Sr.prototype,De.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Bn.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),Bn.free(b)}!(this.G&65536)&&a.D(y)||_1(this,E,x),x.N(),!a.w()&&!y.w()||_s(a,y)||(this instanceof Ai&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},De.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&O1(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 st(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Pf(this)===!1&&kt(this)===!1&&(d0(this),D1(this)),!0};function O1(a,y,x,E,b){y===null||a instanceof pa||(y=y.animationManager,y.zb&&_c(y,a,new st(E,b),x))}De.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;Pf(this)||kt(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)}d0(this)},De.Av=function(){this.G&=-2097153,d0(this)};function k1(a,y,x){var E=I1(a),b=a.diagram,z=x.w(),ne=y.w();z&&ne?a.G&2097152?T1(a,y,x,b,E):R1(a,y,x,b,E):z?T1(a,y,x,b,E):ne&&R1(a,y,x,b,E),a.G|=2097152,st.free(E),a.Uk()}function T1(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 pa||_c(x,a,new st(z,ne),y),E||y.x===z&&y.y===ne||a.g("position",new st(z,ne),y.copy()))}function R1(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 _1(a,y,x){Uv(a,!1),a instanceof Ai&&Sh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?wf(a)?(Kl(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}De.si=function(){return!0},De.Zc=function(){return!0},De.ph=function(){return!1},De.Dd=function(){return!0};function Kv(a,y,x,E){y.constructor===a.constructor||Z1||(Z1=!0,xi('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),xi(" Old class: "+Ti(a.constructor)+", new class: "+Ti(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,ue=!1;a instanceof Ai&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,ue=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 Ai&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=ue?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)}Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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},Sr.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 Pf(a){return(a.G&32768)!==0}function Vv(a,y){a.G=y?a.G|32768:a.G&-32769}function Uv(a,y){a.G=y?a.G|65536:a.G&-65537}function wf(a){return(a.G&131072)!==0}De=Sr.prototype,De.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function h0(a,y){a.G=y?a.G|1048576:a.G&-1048577}De.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},De.N=function(){var a=this.diagram;a!==null&&!kt(this)&&!Pf(this)&&this.isVisible()&&this.Ib.w()&&a.N(eg(this,this.Ib))},De.v=function(){si.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Ai&&this.labeledLink!==null&&uu(this.labeledLink),a.$b(!0))},De.Vo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},De.Wo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},De.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},De.oz=function(){return Yv(this,this)};function Yv(a,y){var x=y.containingGroup;return x!==null?1+Yv(a,x):y instanceof Ai&&(y=y.labeledLink,y!==null)?Yv(a,y):0}De.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof Ai&&(x=y.labeledLink,x!==null)?j1(a,x):y}De.Td=function(a){return a instanceof ho?Xv(this,this,a):!1};function Xv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!Xv(a,E,x)?y instanceof Ai&&(y=y.labeledLink,y!==null)?Xv(a,y,x):!1:!0}De.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof ho&&h0(y,!0),y instanceof Ai){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 Ai&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof ho&&h0(y,!1),y instanceof Ai&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Sr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Ai&&this.isLinkLabel)},Sr.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 Ai&&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 Cf(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof pa)){if(a.add(y),y instanceof Ai){if(x&&y instanceof ho)for(var ne=y.memberParts;ne.next();)Cf(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,ue=re.toNode;oe=oe===null||a.contains(oe),ue=ue===null||a.contains(ue),(b?oe&&ue:oe||ue)&&Cf(a,re,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)Cf(a,y.value,x,E-1,b,z)}else if(y instanceof hi)for(y=y.labelNodes;y.next();)Cf(a,y.value,x,E,b,z)}}wt.Object.defineProperties(Sr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?lo: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(Ga,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Sa,"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&&(Zu(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&&xc(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 pa?this.type!==si.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:Ia},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Zu(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:Ma},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Zu(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&&(Zu(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:Us},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Zu(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,kt(this)===!1&&(d0(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)),O1(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 pa)){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 pa?this instanceof pa&&(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&&(Zc(x),x=x.copy(),x!==null&&Kv(this,x,y,a))):(z!==null&&z.jm(E,a),x=hx(x.partManager,E,a),x!==null&&(Zc(x),x=x.copy(),x===null||x instanceof hi||(E=this.location.copy(),Kv(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){Kv(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&&(Zu(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&&(Zu(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&&(Zu(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 hi?(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&&(Zu(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&&(Zu(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&&(Zu(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:ms},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Zu(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&&(Zu(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&&(Zu(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:Bi},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Zu(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&&zt("Cannot make a Group a member of itself: "+this.toString()),zt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?ty(y,this):this instanceof ho&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ey(a,this):this instanceof ho&&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 ho){for(x=new Un,Cf(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Ai)for(E=E.linksConnected;E.next();)mp(E.value)}if(this instanceof Ai){for(x=this.linksConnected;x.next();)mp(x.value);x=this.labeledLink,x!==null&&mp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&xc(y,-1,a))}}else zt("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&&(Zu(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Ai&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Zu(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&&(Zu(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:xs},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Zu(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&&(Zu(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&&(Zu(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Sr.prototype.invalidateLayout=Sr.prototype.C,Sr.prototype.findCommonContainingGroup=Sr.prototype.px,Sr.prototype.isMemberOf=Sr.prototype.Td,Sr.prototype.findTopLevelPart=Sr.prototype.sz,Sr.prototype.findSubGraphLevel=Sr.prototype.oz,Sr.prototype.ensureBounds=Sr.prototype.Va,Sr.prototype.getDocumentBounds=Sr.prototype.mi,Sr.prototype.findObject=Sr.prototype.fb,Sr.prototype.moveTo=Sr.prototype.moveTo,Sr.prototype.invalidateAdornments=Sr.prototype.Wb,Sr.prototype.clearAdornments=Sr.prototype.Ej,Sr.prototype.removeAdornment=Sr.prototype.Jf,Sr.prototype.addAdornment=Sr.prototype.bh,Sr.prototype.findAdornment=Sr.prototype.Pj,Sr.prototype.updateTargetBindings=Sr.prototype.La;var Z1=!1;Sr.className="Part",Sr.LayoutNone=0,Sr.LayoutAdded=1,Sr.LayoutRemoved=2,Sr.LayoutShown=4,Sr.LayoutHidden=8,Sr.LayoutNodeSized=16,Sr.LayoutGroupLayout=32,Sr.LayoutNodeReplaced=64,Sr.LayoutStandard=127,Sr.LayoutAll=16777215;function pa(a,y){a===void 0||a instanceof ul||typeof a=="string"?Sr.call(this,a):(Sr.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)}Zt(pa,Sr),pa.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},pa.prototype.updateRelationshipsFromData=function(){},pa.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof hi&&y instanceof Co){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 Co&&(b.ua=a)}}},pa.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!kt(a))},pa.prototype.Zc=function(){return!1},pa.prototype.gk=function(a,y,x,E,b,z,ne){if(a===Sa&&y==="elements"){if(b instanceof Cu)this.$a===null&&(this.$a=b);else if(b instanceof si){var re=b.Nl(function(oe){return oe instanceof Cu});re instanceof Cu&&this.$a===null&&(this.$a=re)}}else a===Ga&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof si&&this.$a.rg(E)&&(this.$a=null));Sr.prototype.gk.call(this,a,y,x,E,b,z,ne)},pa.prototype.updateAdornments=function(){},pa.prototype.Lj=function(){},wt.Object.defineProperties(pa.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}}}),pa.className="Adornment";function Jv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=zl,this.er=p0,this.Kr=this.ij=this.Nq=this.Mq=null}Jv.prototype.copy=function(){var a=new Jv;return a.Dq=this.Dq,a.Eq=this.Eq,a.gj=this.gj,a.Vr=this.Vr,a.yp=this.yp.J(),a.er=this.er,a.Mq=this.Mq,a.Nq=this.Nq,a.ij=this.ij,a.Kr=this.Kr,a};function Ai(a,y){a===void 0||a instanceof ul||typeof a=="string"?Sr.call(this,a):(Sr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new $n,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Zt(Ai,Sr),Ai.prototype.cloneProtected=function(a){Sr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},De=Ai.prototype,De.Af=function(a){Sr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function Uh(a){a.Ba===null?a.Ba=new Jv:a.Ba.nc&&(a.Ba=a.Ba.copy())}De.th=function(){Sr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new Un),a.af.add(y))}function W1(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}De.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},De.gk=function(a,y,x,E,b,z,ne){a===Sa&&y==="elements"?this.wc=null:a===Ga&&y==="elements"&&(this.wc=null),Sr.prototype.gk.call(this,a,y,x,E,b,z,ne)},De.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(dc(x.fromPort),dc(x.toPort),x.bb())}};function G1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(dc(x.fromPort),dc(x.toPort),x.bb())}}function dc(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||dc(y.port)}}De.si=function(){return!0},Ai.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Ai.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Ai.prototype.isVisible=function(){if(!Sr.prototype.isVisible.call(this))return!1;var a=!0,y=Ld,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Ld){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Ks){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===Ch&&(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},Ai.prototype.Zb=function(a){Sr.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)}},Ai.prototype.qx=function(){var a=new Un,y=new Un;return $1(this,this,a,y),y.iterator};function $1(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)&&$1(a,b?ne.toNode:ne.fromNode,x,E):E.add(ne)})}}Ai.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new jr(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},De=Ai.prototype,De.Mo=function(a){a===void 0&&(a=null);var y=new jr(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},De.Sd=function(a){a===void 0&&(a=null);var y=new jr(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},De.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 Un,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 Un,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Wr(x):lo},De.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 Un,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Wr(x):lo},De.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 Un,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Wr(x):lo},De.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new jr(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},De.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new jr(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 f0(a,y,x){dc(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 g0(a,y,x){dc(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)):Qp(y)))}function Qp(a){if(a.ci=!1,a.jb.count!==0){var y=!0,x=a.diagram;if(x===null||!x.undoManager.isUndoingRedoing){for(x!==null&&(y=x.isTreePathToChildren),x=a.jb.iterator;x.next();){var 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}}}Ai.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},De=Ai.prototype,De.Vo=function(a){Sr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&ex(a,this))},De.Wo=function(a){Sr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},De.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,Sr.prototype.Lj.call(this)},De.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new Hi:a.wc.clear(),a.qm(a,function(y,x){V1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function V1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Qv(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=Si()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Fi(x)}}}De.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},De.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}},De.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)h0(y,!0),y=y.pg();var x=null;for(y=a;y!==null;){if(y.G&1048576){x=y;break}y=y.pg()}for(y=this;y!==null;)h0(y,!1),y=y.pg();return x},De.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},De.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Ai)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},De.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 Un;return a(this,y),y},De.uz=function(){return U1(this,this)};function U1(a,y){return y=y.pg(),y===null?0:1+U1(a,y)}De.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new jr(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},De.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 $n,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 $n,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Wr(x):lo},De.wz=function(a){a===void 0&&(a=1/0);var y=new Un;return Cf(y,this,!1,a,!0),y},Ai.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 Un;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ld),y.Ue=!1}};function Y1(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),Y1(oe,y,x,E-1,b,z,ne)))}else X1(a,y,x,b,z,ne)}function X1(a,y,x,E,b,z){for(var ne=b===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var ue=re.value;if(ue.isTreeLink&&(ue=ue.To(a),ue!==null&&ue!==a)){var ce=y.contains(ue);if(ce||y.add(ue),ne){var pe=x?ue.Oo():ue.Po();oe.uv=a,pe.all(function(we){return function(Fe){return Fe===we.uv||!Fe.isTreeExpanded}}(oe))&&E.Aj(ue,b),ue.oh(),ue.Zb(!1)}ue.isTreeExpanded&&(ue.wasTreeExpanded=ue.isTreeExpanded,ce||X1(ue,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}Ai.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 Un;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ld),y.Ue=!1}};function J1(a,y,x,E,b,z,ne){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),ue={};oe.next();){var ce=oe.value;if(ce.isTreeLink&&(re||ce.fd||ce.bb(),ce=ce.To(a),ce!==null&&ce!==a&&!y.contains(ce))){if(y.add(ce),!re){ce.Zb(!0),ce.oh();var pe=x?ce.Oo():ce.Po();ue.vv=a,pe.all(function(we){return function(Fe){return Fe===we.vv||!Fe.isTreeExpanded}}(ue))&&b.Cj(ce,z)}(2<E||ce.wasTreeExpanded)&&(ce.wasTreeExpanded=!1,J1(ce,y,x,E-1,b,z,ne))}ue={vv:ue.vv}}a.isTreeExpanded=!0}wt.Object.defineProperties(Ai.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:p0},set:function(a){var y=this.portSpreading;y!==a&&(Uh(this),this.Ba.er=a,this.g("portSpreading",y,a),a=this.diagram,a!==null&&a.undoManager.isUndoingRedoing||this.Bd())}},avoidable:{get:function(){return(this.U&8)!==0},set:function(a){var y=(this.U&8)!==0;if(y!==a){this.U^=8;var x=this.diagram;x!==null&&Sh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:zl},set:function(a){typeof a=="number"&&(a=new pr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Uh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Sh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(Uh(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&&(Uh(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&&(Uh(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&&(ex(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),uu(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var 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&&(Uh(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))}}}),Ai.prototype.expandTree=Ai.prototype.expandTree,Ai.prototype.collapseTree=Ai.prototype.collapseTree,Ai.prototype.findTreeParts=Ai.prototype.wz,Ai.prototype.findTreeChildrenNodes=Ai.prototype.Ou,Ai.prototype.findTreeChildrenLinks=Ai.prototype.Qo,Ai.prototype.findTreeLevel=Ai.prototype.uz,Ai.prototype.findTreeParentChain=Ai.prototype.vz,Ai.prototype.findTreeParentNode=Ai.prototype.pg,Ai.prototype.findTreeParentLink=Ai.prototype.kh,Ai.prototype.findCommonTreeParent=Ai.prototype.gz,Ai.prototype.findTreeRoot=Ai.prototype.xz,Ai.prototype.isInTreeOf=Ai.prototype.Nz,Ai.prototype.findPort=Ai.prototype.ns,Ai.prototype.findLinksTo=Ai.prototype.kz,Ai.prototype.findLinksBetween=Ai.prototype.jz,Ai.prototype.findNodesInto=Ai.prototype.Oo,Ai.prototype.findNodesOutOf=Ai.prototype.Po,Ai.prototype.findNodesConnected=Ai.prototype.Mu,Ai.prototype.findLinksInto=Ai.prototype.Sd,Ai.prototype.findLinksOutOf=Ai.prototype.Mo,Ai.prototype.findExternalTreeLinksConnected=Ai.prototype.qx,Ai.prototype.invalidateConnectedLinks=Ai.prototype.Bd,Ai.prototype.invalidateLinkBundle=Ai.prototype.Lz;var ES=new Jt(Ai,"SpreadingNone",10),p0=new Jt(Ai,"SpreadingEvenly",11),qv=new Jt(Ai,"SpreadingPacked",12);Ai.className="Node",Ai.SpreadingNone=ES,Ai.SpreadingEvenly=p0,Ai.SpreadingPacked=qv;function ho(a,y){a===void 0||a instanceof ul||typeof a=="string"?Ai.call(this,a):(Ai.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Un,this.$a=null,this.Sc=new ps,this.Sc.group=this,this.gl=new Un,this.tb=this.$p=null,y&&Object.assign(this,y)}Zt(ho,Ai),ho.prototype.cloneProtected=function(a){Ai.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Cu});y instanceof Cu?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())},De=ho.prototype,De.Af=function(a){Ai.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 Ai)x.Bd(y);else if(x instanceof hi)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},De.gk=function(a,y,x,E,b,z,ne){if(a===Sa&&y==="elements"){if(b instanceof Cu)this.$a===null?this.$a=b:this.$a!==b&&zt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof si){var re=b.Nl(function(oe){return oe instanceof Cu});re instanceof Cu&&(this.$a===null?this.$a=re:this.$a!==re&&zt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Ga&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof si&&this.$a.rg(E)&&(this.$a=null));Ai.prototype.gk.call(this,a,y,x,E,b,z,ne)},De.Xl=function(a,y){Ai.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==si.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof si&&(a=a.Pb()),this.tb===null&&(this.tb=new Bn),a.mi(this.tb),a instanceof Co&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},De.eh=function(a,y,x,E){this.nf=this.$a,Ai.prototype.eh.call(this,a,y,x,E)},De.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof hi||y.Va()}),Ai.prototype.Va.call(this)},De.si=function(){if(!Ai.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Ai){if(y.isVisible()&&kt(y))return!1}else if(y instanceof hi&&y.isVisible()&&kt(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ey(a,y){if(a.Gn.add(y)){y instanceof ho&&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 hi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ty(a,y){if(a.Gn.remove(y)){y instanceof ho&&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 hi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}De.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)}Ai.prototype.Lj.call(this)},ho.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Mn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},ho.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Mn(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},ho.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))},De=ho.prototype,De.Bd=function(a){var y=(this.U&65536)!==0;if(Ai.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()?(dc(x.fromPort),dc(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(dc(x.fromPort),dc(x.toPort),x.bb()))}}},De.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 Un,E=y.iterator;E.next();){var b=E.value;if(b instanceof Ai)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},De.iz=function(){var a=this.Rj();a.add(this);for(var y=new Un,x=a.iterator;x.next();){var E=x.value;if(E instanceof Ai)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},De.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Un;return a(this,y),y},De.Rj=function(){var a=new Un;return Cf(a,this,!0,0,!0),a.remove(this),a},De.Zb=function(a){Ai.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},ho.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof ho&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,Q1(z,y,x,E)),z instanceof Ai)z.Bd(y),x.Aj(z,E);else if(z instanceof hi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}ho.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 ho&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,q1(z,y,x,E)),z instanceof Ai)z.Bd(y),x.Cj(z,E);else if(z instanceof hi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}ho.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=st.alloc(),Ai.prototype.move.call(this,a,y),a=new Un,y=this.Rj().iterator;y.next();)b=y.value,b instanceof hi&&(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 Ai&&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 hi&&(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(),iy(b)&&b.bb());st.free(z)}},wt.Object.defineProperties(ho.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&&zt("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&&(Uh(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&&(Uh(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&&(Uh(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&&(Uh(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)}}}),ho.prototype.expandSubGraph=ho.prototype.expandSubGraph,ho.prototype.collapseSubGraph=ho.prototype.collapseSubGraph,ho.prototype.findSubGraphParts=ho.prototype.Rj,ho.prototype.findContainingGroupChain=ho.prototype.hz,ho.prototype.findExternalNodesConnected=ho.prototype.iz,ho.prototype.findExternalLinksConnected=ho.prototype.Lu,ho.prototype.ensureBounds=ho.prototype.Va,ho.className="Group";function Cu(a){Ut.call(this),this.yb=ll,this.ko=new Bn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Zt(Cu,Ut),Cu.prototype.cloneProtected=function(a){Ut.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Cu.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return ya(0,0,y.width,y.height,a.x,a.y)},Cu.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof ho||a instanceof pa)||zt("Placeholder is not inside a Group or Adornment."),a instanceof ho){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Fs(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=st.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),st.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 Co&&(ne=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,ue=(oe.width+ne)*re;ne=(oe.height+ne)*re,a.type!==si.Link&&(re=z.ga(a.category==="Selection"?Us:a.locationSpot,st.alloc()),a.location=re,st.free(re)),isNaN(ue)||isNaN(ne)?(a=z.ga(Us,st.alloc()),ue=Bn.allocAt(a.x,a.y,0,0),ue.Ye(z.ga(Nn,a)),ue.Ye(z.ga(Tl,a)),ue.Ye(z.ga(Zl,a)),Fs(y,ue.width+E||0,ue.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),st.free(a),Bn.free(ue)):(Fs(y,ue+E||0,ne+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Cu.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Cu.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof ho&&!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=Bn.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof ho&&!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)),Bn.free(x),E&&y instanceof ho&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Cu.prototype.computeMemberBounds=function(a){if(!(this.part instanceof ho))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 hi&&(!y.computesBoundsIncludingLinks||yt(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},wt.Object.defineProperties(Cu.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new pr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Cu.className="Placeholder";function hi(a){Sr.call(this,si.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Eu,this.Om=0,this.Qm=Eu,this.Rm=NaN,this.qj=ay,this.po=.5,this.wd=null,this.Nb=new $n().freeze(),this.Tg=this.Mg=null,this.ml=new Bn,this.ua=new nn,this.u=this.o=this.Sf=this.Wf=null,this.su=new st,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Zt(hi,Sr),hi.prototype.cloneProtected=function(a){Sr.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())},De=hi.prototype,De.Af=function(a){Sr.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&&dc(y),a=a.toPort,a!==null&&dc(a)},De.qb=function(a){a.classType===hi?(a.value&2)===2?this.routing=a:a===Ec||a===Xh||a===yp?this.curve=a:a===tm||a===P0||a===w0?this.adjusting=a:a!==ay&&a!==Eu&&zt("Unknown Link enum value for a Link property: "+a):Sr.prototype.qb.call(this,a)},De.Xc=function(){this.ba===null&&(this.ba=new vo)},De.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),kt(a)||Pf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),kt(a)||Pf(a)))},De.zv=function(){return!1},De.Av=function(){},De.Zc=function(){return!1},hi.prototype.computeAngle=function(a,y,x){return hi.computeAngle(y,x)},hi.computeAngle=function(a,y){switch(a){default:case Eu:a=0;break;case nm:a=y;break;case im:a=y+90;break;case rm:a=y-90;break;case sy:a=y+180;break;case C0:a=tt.bp(y),90<a&&270>a&&(a-=180);break;case om:a=tt.bp(y+90),90<a&&270>a&&(a-=180);break;case am:a=tt.bp(y-90),90<a&&270>a&&(a-=180);break;case E0:if(a=tt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return tt.bp(a)};function mp(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&&ty(x,a),a.Ah=y,y!==null&&ey(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}De=hi.prototype,De.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Sr.prototype.oh.call(this)},De.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},De.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function ex(a,y){a.wd===null&&(a.wd=new Un),a.wd.add(y),a.v()}De.Vo=function(a){if(Sr.prototype.Vo.call(this,a),tg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,f0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||f0(x,this,E)}qp(this)}},De.Wo=function(a){if(Sr.prototype.Wo.call(this,a),tg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,g0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||g0(x,this,E)}em(this)}},De.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))},hi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},hi.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?Sr.prototype.move.call(this,a,!1):(a=st.allocAt(x.x+E,x.y+b),Sr.prototype.move.call(this,a,!1),st.free(a)),Yh(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},hi.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},hi.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},hi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Wa),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()===Ec))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()===Ec){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return tt.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),tt.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},hi.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()===Ec))return this.ua.wx(.5);if(this.computeCurve()===Ec&&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),tt.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)},De=hi.prototype,De.i=function(a){return this.Nb.s[a]},De.dd=function(a,y){this.Nb.cd(a,y)},De.L=function(a,y,x){this.Nb.cd(a,new st(y,x))},De.Kz=function(a,y){this.Nb.Gb(a,y)},De.m=function(a,y,x){this.Nb.Gb(a,new st(y,x))},De.ne=function(a){this.Nb.add(a)},De.yf=function(a,y){this.Nb.add(new st(a,y))},De.pv=function(a){this.Nb.mb(a)},De.Fj=function(){this.Nb.clear()};function Yh(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 $n,z=a.Nb.iterator;z.next();){var ne=z.value;b.add(new st(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),uu(a)),E?m0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ts(ne.animationManager,a,b),a.g("points",z,b)}}De.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},De.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,ue=oe.length,ce=0;ce<ue;ce++){var pe=oe[ce];ne=Math.min(pe.x,ne),re=Math.min(pe.y,re),pe.freeze()}if(y.freeze(),ue===z){for(z=0;z<ue;z++)if(ce=b[z],pe=oe[z],ce.x-x!==pe.x-ne||ce.y-E!==pe.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ts(x.animationManager,this,y),m0(this),this.g("points",a,y)}},De.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function m0(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),S0(a,!1))}De.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())}},De.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()}}},hi.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kg||(kg=new Ai,kg.desiredSize=Ba,kg.Va()),this.defaultFromPoint&&(kg.location=this.defaultFromPoint,kg.Va(),y=a=kg)):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?(Tg||(Tg=new Ai,Tg.desiredSize=Ba,Tg.Va()),this.defaultToPoint&&(Tg.location=this.defaultToPoint,Tg.Va(),b=E=Tg)):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=vp(ne),oe=vp(x),ue=y===b&&y!==null,ce=this.isOrthogonal,pe=this.curve===Ec;this.Wf=ue&&!ce?pe=!0:!1;var we=this.computeAdjusting()===Eu||ue;if(!ce&&!ue&&re&&oe){if(re=!1,!we&&3<=z&&(we=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=this.adjustPoints(0,we,z-1,oe))&&(we=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,we,z-1,oe)),!re)if(this.Fj(),pe){z=this.getLinkPoint(a,y,ne,!0,!1,E,b),we=this.getLinkPoint(E,b,x,!1,!1,a,y),re=we.x-z.x,oe=we.y-z.y,ue=this.computeCurviness(),pe=ce=0;var Fe=z.x+re/3,Ie=z.y+oe/3,ze=Fe,gt=Ie;tt.B(oe,0)?gt=0<re?gt-ue:gt+ue:(ce=-re/oe,pe=Math.sqrt(ue*ue/(ce*ce+1)),0>ue&&(pe=-pe),ze=(0>oe?-1:1)*pe+Fe,gt=ce*(ze-Fe)+Ie),Fe=z.x+2*re/3,Ie=z.y+2*oe/3;var nt=Fe,Et=Ie;tt.B(oe,0)?Et=0<re?Et-ue:Et+ue:(nt=(0>oe?-1:1)*pe+Fe,Et=ce*(nt-Fe)+Ie),this.Fj(),this.ne(z),this.yf(ze,gt),this.yf(nt,Et),this.ne(we),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,we=b,E=this.getLinkPoint(a,y,ne,!0,!1,z,we),b=this.getLinkPoint(z,we,x,!1,!1,a,y),this.hasCurviness()?(we=b.x-E.x,x=b.y-E.y,ne=this.computeCurviness(),a=E.x+we/2,y=E.y+x/2,z=a,re=y,tt.B(x,0)?re=0<we?re-ne:re+ne:(we=-we/x,z=Math.sqrt(ne*ne/(we*we+1)),0>ne&&(z=-z),z=(0>x?-1:1)*z+a,re=we*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=Bn.alloc(),y.mi(re),oe=re.ca(b),we.mi(re),ue=re.ca(E),(oe||ue)&&(ne=y.ga(y0(ne),new st),this.dd(0,this.getLinkPointFromPoint(a,y,ne,b,!0,ne)),x=we.ga(y0(x),new st),this.dd(1,this.getLinkPointFromPoint(z,we,x,E,!1,x))),Bn.free(re))}else{pe=this.isAvoiding,we&&(ce&&pe||ue)&&this.Fj();var At=ue?this.computeCurviness():0;pe=this.getLinkPoint(a,y,ne,!0,ce,E,b),Fe=ze=Ie=0,(ce||!re||ue)&&(gt=this.computeEndSegmentLength(a,y,ne,!0),Fe=this.getLinkDirection(a,y,pe,ne,!0,ce,E,b),ue&&(re||ne.D(x)||!ce&&ne.x+x.x===1&&ne.y+x.y===1)&&(Fe-=ce?90:30,0>At&&(Fe-=180)),0>Fe?Fe+=360:360<=Fe&&(Fe-=360),ue&&(gt+=Math.abs(At)*(ce?1:2)),Fe===0?Ie=gt:Fe===90?ze=gt:Fe===180?Ie=-gt:Fe===270?ze=-gt:(Ie=gt*Math.cos(Fe*Math.PI/180),ze=gt*Math.sin(Fe*Math.PI/180)),ne.Mc()&&ue&&(gt=y.ga(Io,st.alloc()),nt=st.allocAt(gt.x+1e3*Ie,gt.y+1e3*ze),this.getLinkPointFromPoint(a,y,gt,nt,!0,pe),st.free(gt),st.free(nt))),gt=this.getLinkPoint(E,b,x,!1,ce,a,y);var Tt=Et=nt=0;if(ce||!oe||ue){var Vt=this.computeEndSegmentLength(E,b,x,!1);Tt=this.getLinkDirection(E,b,gt,x,!1,ce,a,y),ue&&(oe||ne.D(x)||!ce&&ne.x+x.x===1&&ne.y+x.y===1)&&(Tt+=ce?0:30,0>At&&(Tt+=180)),0>Tt?Tt+=360:360<=Tt&&(Tt-=360),ue&&(Vt+=Math.abs(At)*(ce?1:2)),Tt===0?nt=Vt:Tt===90?Et=Vt:Tt===180?nt=-Vt:Tt===270?Et=-Vt:(nt=Vt*Math.cos(Tt*Math.PI/180),Et=Vt*Math.sin(Tt*Math.PI/180)),x.Mc()&&ue&&(x=b.ga(Io,st.alloc()),ne=st.allocAt(x.x+1e3*nt,x.y+1e3*Et),this.getLinkPointFromPoint(E,b,x,ne,!1,gt),st.free(x),st.free(ne))}x=pe,(ce||!re||ue)&&(x=new st(pe.x+Ie,pe.y+ze)),ne=gt,(ce||!oe||ue)&&(ne=new st(gt.x+nt,gt.y+Et)),!we&&!ce&&re&&3<z&&this.adjustPoints(0,pe,z-2,ne)?this.dd(z-1,gt):!we&&!ce&&oe&&3<z&&this.adjustPoints(1,x,z-1,gt)?this.dd(0,pe):!we&&(ce?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ne)?(this.dd(0,pe),this.dd(z-1,gt)):(this.Fj(),this.ne(pe),(ce||!re||ue)&&this.ne(x),ce&&this.addOrthoPoints(x,Fe,ne,Tt,a,E),(ce||!oe||ue)&&this.ne(ne),this.ne(gt))}return!0};function ny(a,y){return Math.abs(y.x-a.x)>Math.abs(y.y-a.y)?(y.x>=a.x?y.x=a.x+9e9:y.x=a.x-9e9,y.y=a.y):(y.y>=a.y?y.y=a.y+9e9:y.y=a.y-9e9,y.x=a.x),y}hi.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new st),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,ue=a.m11*b,ce=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+ce,E=E.x*re+E.y*ue+pe,ne=x.x*ne+x.y*oe+ce,x=x.x*re+x.y*ue+pe}return y.Sj(b,E,ne,x,z),a!==null&&z.transform(a),z};function v0(a,y){var x=y.Zn;return x===null&&(x=new Rg,x.port=y,x.node=y.part,y.Zn=x),lx(x,a)}hi.prototype.getLinkPoint=function(a,y,x,E,b,z,ne,re){if(re===void 0&&(re=new st),x.sb()&&!vp(x))return y.ga(x,re),re;if(x.$c()){var oe=v0(this,y);if(oe!==null){if(re.assign(oe.Zo),b&&this.routing===nx){var ue=v0(this,ne);if(ue!==null&&oe.Gl<ue.Gl){oe=st.alloc(),ue=st.alloc();var ce=new Bn(y.ga(Us,oe),y.ga(Nn,ue)),pe=this.computeSpot(!E,ne);a=this.getLinkPoint(z,ne,pe,!E,b,a,y,ue),(x.Hf(qi)||x.Hf($i))&&a.y>=ce.y&&a.y<=ce.y+ce.height?re.y=a.y:(x.Hf(ri)||x.Hf(ki))&&a.x>=ce.x&&a.x<=ce.x+ce.width&&(re.x=a.x),st.free(oe),st.free(ue)}}return re}}return x=y.ga(y0(x),st.alloc()),this.pointsCount>(b?6:2)?(ne=E?this.i(1):this.i(this.pointsCount-2),b&&(ne=ny(x,ne.copy()))):(oe=this.computeSpot(!E,ne),z=st.alloc(),ne=ne.ga(y0(oe),z),b&&(ne=ny(x,ne)),st.free(z)),this.getLinkPointFromPoint(a,y,x,ne,E,re),st.free(x),re},hi.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=v0(this,y),oe!==null))switch(oe.Nc){case 1:oe=270;break e;case 2:oe=180;break e;default:case 4:oe=0;break e;case 8:oe=90;break e}oe=y.ga(Io,st.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=st.alloc(),re=re.ga(Io,x),st.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,st.free(oe),oe=x}return E.Mc()&&ne.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),vp(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},hi.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=v0(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)},hi.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Io:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Bi?Ss:y)):(a=y||this.toPort,a===null?a=Io:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Bi?Ss:y)),a};function vp(a){return a===Ss||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:Io}hi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Eu&&4<this.pointsCount?this.computeMidPoint(new st):(a=y.Zn,a=a!==null?lx(a,this):null,a!==null?a.Zo:y.ga(Io))},hi.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},hi.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=Xt.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Fv(this,y,x,b),z===void 0&&Xt.free(ne),!0;if(this.Yc(a,ne)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,ue=oe.length;ue--;){var ce=oe[ue];if(ce.visible||ce===this.locationObject){var pe=ce.actualBounds,we=this.naturalBounds;if(!(pe.x>we.width||pe.y>we.height||0>pe.x+pe.width||0>pe.y+pe.height)){if(pe=Xt.alloc(),pe.set(ne),ce instanceof si)re=ce.Cf(a,y,x,E,b,pe);else if(this.path===ce){if(ce instanceof Co)if(re=a,we=E,ce.pickable===!1)re=!1;else if(pe.multiply(ce.transform),we)e:{var Fe=re,Ie=pe;if(ce.fh(Fe,Ie))re=!0;else{if(Ie===void 0&&(Ie=ce.transform,Fe.Re(ce.actualBounds))){re=!0;break e}re=Fe.left,we=Fe.right;var ze=Fe.top;Fe=Fe.bottom;var gt=st.alloc(),nt=st.alloc(),Et=st.alloc(),At=Xt.alloc();At.set(Ie),At.bv(ce.transform),At.Vj(),nt.x=we,nt.y=ze,nt.transform(At),gt.x=re,gt.y=ze,gt.transform(At),Ie=!1,qf(ce,gt,nt,Et)?Ie=!0:(gt.x=we,gt.y=Fe,gt.transform(At),qf(ce,gt,nt,Et)?Ie=!0:(nt.x=re,nt.y=Fe,nt.transform(At),qf(ce,gt,nt,Et)?Ie=!0:(gt.x=re,gt.y=ze,gt.transform(At),qf(ce,gt,nt,Et)&&(Ie=!0)))),Xt.free(At),st.free(gt),st.free(nt),st.free(Et),re=Ie}}else re=ce.fh(re,pe)}else re=rl(ce,a,E,pe);re&&(we=ce,y!==null&&(we=y(ce)),we&&(x===null||x(we))&&b.add(we)),Xt.free(pe)}}}return z===void 0&&Xt.free(ne),re||this.background!==null||this.areaBackground!==null}return z===void 0&&Xt.free(ne),!1},hi.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?Ec:this.curve},hi.prototype.computeCorner=function(){if(this.curve===Ec)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},hi.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},hi.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rx;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===nm||E===C0||E===sy?a=Math.max(a,b):E===rm||E===am||E===im||E===om?a=Math.max(a,ne):(y=y.ga(Io).ab(x.ga(Io))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ne)+Math.abs(Math.cos(y)*b)+1)),this.curve===Ec&&(a*=1.333)}}return a},hi.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Eu&&x.bb()}},hi.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=ix;var y=this.Sf;if(y!==null){for(var x=Si(),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),Fi(x)}}return a},hi.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},hi.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},hi.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===P0)return!1;b===w0&&(b=tm)}switch(b){case P0: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,ue=Math.sqrt(re*re+oe*oe);if(!tt.$(ue,0)){if(tt.$(re,0))var ce=0>oe?-Math.PI/2:Math.PI/2;else ce=Math.atan(oe/Math.abs(re)),0>re&&(ce=Math.PI-ce);ne=y.x;var pe=y.y;re=E.x-ne;var we=E.y-pe;for(oe=Math.sqrt(re*re+we*we),tt.$(re,0)?we=0>we?-Math.PI/2:Math.PI/2:(we=Math.atan(we/Math.abs(re)),0>re&&(we=Math.PI-we)),ue=oe/ue,ce=we-ce,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),tt.$(y,0)||(tt.$(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+ce,y*=ue,this.L(a,ne+y*Math.cos(re),pe+y*Math.sin(re)));this.dd(x,E)}}return!0;case w0: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,ue=(ne-b)*(ne-b)+(pe-z)*(pe-z),re=y.x,ce=y.y,oe=E.x,we=E.y;var Fe=1;if(oe-re!==0){var Ie=(we-ce)/(oe-re);Fe=Math.sqrt(1+1/(Ie*Ie))}else Ie=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var ze=y.x,gt=y.y,nt=.5;ue!==0&&(nt=((b-ze)*(b-ne)+(z-gt)*(z-pe))/ue);var Et=b+nt*(ne-b),At=z+nt*(pe-z);y=Math.sqrt((ze-Et)*(ze-Et)+(gt-At)*(gt-At)),gt<Ie*(ze-Et)+At&&(y=-y),0<Ie&&(y=-y),ze=re+nt*(oe-re),nt=ce+nt*(we-ce),Ie!==0?(y=ze+y/Fe,this.L(a,y,nt-(y-ze)/Ie)):this.L(a,ze,nt+y)}this.dd(x,E)}return!0;case tm:e:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),ne=this.i(a+2),re=z.x,ce=z.y,pe=re,ue=ce,tt.B(b.y,z.y)?tt.B(z.x,ne.x)?ce=y.y:tt.B(z.y,ne.y)&&(re=y.x):tt.B(b.x,z.x)&&(tt.B(z.y,ne.y)?re=y.x:tt.B(z.x,ne.x)&&(ce=y.y)),this.L(a+1,re,ce),b=this.i(x),z=this.i(x-1),ne=this.i(x-2),re=z.x,ce=z.y,oe=re,we=ce,tt.B(b.y,z.y)?tt.B(z.x,ne.x)?ce=E.y:tt.B(z.y,ne.y)&&(re=E.x):tt.B(b.x,z.x)&&(tt.B(z.y,ne.y)?re=E.x:tt.B(z.x,ne.x)&&(ce=E.y)),this.L(x-1,re,ce),iy(this))){this.L(a+1,pe,ue),this.L(x-1,oe,we),x=!1;break e}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},hi.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(sm,sm),oe.Bc(sm,sm),re.Ye(a),oe.Ye(x);var ue=st.alloc(),ce=st.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?(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),E===180?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=ue.x,ce.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(ue.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,ce.x=ue.x,ce.y=x.y):E===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(ue.x=a.x,ue.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ce.y=ue.y)):(ue.h(a.x,x.y),ce.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))?ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?ue.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===180||E===270)&&(ue.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ce.x=x.x,ce.y=ue.y),ue.y>re.top&&ue.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(E===90||E===270)&&(ue.h(Math.max((a.x+x.x)/2,a.x),a.y),ce.h(ue.x,x.y)):(ue.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)),ce.x=x.x,ce.y=ue.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?(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),E===0?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=ue.x,ce.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(ue.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,ce.x=ue.x,ce.y=x.y):E===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(ue.x=a.x,ue.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ce.y=ue.y)):(ue.h(a.x,x.y),ce.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))?ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?ue.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===0||E===270)&&(ue.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ce.x=x.x,ce.y=ue.y),ue.y>re.top&&ue.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(E===90||E===270)&&(ue.h(Math.min((a.x+x.x)/2,a.x),a.y),ce.h(ue.x,x.y)):(ue.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)),ce.x=x.x,ce.y=ue.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?(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),E===270?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=ue.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(ue.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,ce.x=x.x,ce.y=ue.y):E===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(ue.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),ue.y=a.y,ce.x=ue.x)):(ue.h(x.x,a.y),ce.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))?ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?ue.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(ue.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ce.x=ue.x,ce.y=x.y),ue.x>re.left&&ue.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(E===0||E===180)&&(ue.h(a.x,Math.max((a.y+x.y)/2,a.y)),ce.h(x.x,ue.y)):(ue.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)),ce.x=ue.x,ce.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?(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),E===90?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=ue.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(ue.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,ce.x=x.x,ce.y=ue.y):E===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(ue.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),ue.y=a.y,ce.x=ue.x)):(ue.h(x.x,a.y),ce.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))?ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?ue.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(ue.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ce.x=ue.x,ce.y=x.y),ue.x>re.left&&ue.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(E===0||E===180)&&(ue.h(a.x,Math.min((a.y+x.y)/2,a.y)),ce.h(x.x,ue.y)):(ue.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)),ce.x=ue.x,ce.y=x.y)));var pe=x;if(this.isAvoiding){var we=this.diagram;if(we===null||b===z||this.layer.isTemporary||!Kf(we)||re.ca(pe)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var Fe=gf(we,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Fe.Yj(Math.min(a.x,ue.x),Math.min(a.y,ue.y),Math.abs(a.x-ue.x),Math.abs(a.y-ue.y))&&Fe.Yj(Math.min(ue.x,ce.x),Math.min(ue.y,ce.y),Math.abs(ue.x-ce.x),Math.abs(ue.y-ce.y))&&Fe.Yj(Math.min(ce.x,pe.x),Math.min(ce.y,pe.y),Math.abs(ce.x-pe.x),Math.abs(ce.y-pe.y)))y=!1;else{b=a,z=pe;var Ie=x=null;if(we.isVirtualized){we=Fe.bounds.copy(),we.Bc(-Fe.Ho,-Fe.Go);var ze=st.alloc();xp(Fe,a.x,a.y)||(tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,a.x,a.y,ue.x,ue.y,ze)?(x=a=ze.copy(),y=ze.ab(ue)):tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,ce.x,ce.y,ze)?(x=a=ze.copy(),y=ze.ab(ce)):tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ce.x,ce.y,pe.x,pe.y,ze)&&(x=a=ze.copy(),y=ze.ab(pe))),xp(Fe,pe.x,pe.y)||(tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,pe.x,pe.y,ce.x,ce.y,ze)?(Ie=pe=ze.copy(),E=ce.ab(ze)):tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ce.x,ce.y,ue.x,ue.y,ze)?(Ie=pe=ze.copy(),E=ue.ab(ze)):tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,a.x,a.y,ze)&&(Ie=pe=ze.copy(),E=a.ab(ze))),st.free(ze)}re=re.copy().ed(oe),re.Bc(Fe.Ho*Fe.Os,Fe.Go*Fe.Os),ax(Fe,a,y,pe,E,re,!0),oe=th(Fe,pe.x,pe.y),!Fe.abort&&oe>=Sp&&(ox(Fe),re.Bc(Fe.Ho*Fe.Hx,Fe.Go*Fe.Ix),ax(Fe,a,y,pe,E,re,!1),oe=th(Fe,pe.x,pe.y)),!Fe.abort&&oe<Sp&&th(Fe,pe.x,pe.y)!==Jh?(ry(this,Fe,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?tt.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)):tt.B(re.y,ne.y)?(Math.abs(a.y-re.y)<=Fe.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)&&(tt.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)):tt.B(re.x,ne.x)?(Math.abs(a.x-re.x)<=Fe.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)),Ie!==null&&(E===0||E===180?this.yf(z.x,Ie.y):this.yf(Ie.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ue.copy()),this.ne(ce.copy())),st.free(ue),st.free(ce)}},hi.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 iy(a){if(a.diagram===null||!a.isAvoiding||!Kf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=gf(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 ry(a,y,x,E,b,z,ne){var re=y.Ho,oe=y.Go,ue=th(y,x,E),ce=x,pe=E;for(b===0?ce+=re:b===90?pe+=oe:b===180?ce-=re:pe-=oe,b!==ne&&ue>ng&&th(y,ce,pe)!==ue-1&&(th(y,x-re,E)===ue-1?(b=180,ce=x-re,pe=E):th(y,x+re,E)===ue-1?(b=0,ce=x+re,pe=E):th(y,x,E-oe)===ue-1?(b=270,ce=x,pe=E-oe):th(y,x,E+oe)===ue-1&&(b=90,ce=x,pe=E+oe));ue>ng&&th(y,ce,pe)===ue-1;)x=ce,E=pe,b===0?ce+=re:b===90?pe+=oe:b===180?ce-=re:pe-=oe,--ue;z?ue>ng&&(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),ue>ng&&(z=b,ne=x,ce=E,b===0?(z=90,ce+=oe):b===90?(z=180,ne-=re):b===180?(z=270,ce-=oe):b===270&&(z=0,ne+=re),th(y,ne,ce)===ue-1?ry(a,y,ne,ce,z,!1,z):(ne=x,ce=E,b===0?(z=270,ce-=oe):b===90?(z=0,ne+=re):b===180?(z=90,ce+=oe):b===270&&(z=180,ne-=re),th(y,ne,ce)===ue-1&&ry(a,y,ne,ce,z,!1,z))),a.yf(x,E)}hi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=ha(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=ha(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ne,b=re)}return z},hi.prototype.qc=function(){this.lk=!1,this.v()},hi.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 Co&&(b.ua=this.ua)}}},hi.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&tg(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===Ec&&3<=y&&!tt.$(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||tg(this)){if(a.type=nn.o,re=A1(a),this.computeShortLength(!0)!==0&&(b=Ig(this,b,!0,z)),pp(re,b.x,b.y,!1),ne===Ec&&3<=y&&!tt.$(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=Ig(this,b,!1,z)),Kh(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=st.allocAt(E,oe),x=st.alloc(),x.assign(this.i(1)),z=st.allocAt(E,oe),b=st.allocAt(E,oe),ne=this.i(0);for(var ue,ce=this.smoothness/3,pe=1;pe<this.pointsCount-1;pe++){ue=this.i(pe);var we=ne,Fe=ue,Ie=this.i(oy(this,ue,pe,!1));if((!tt.$(we.x,Fe.x)||!tt.$(Fe.x,Ie.x))&&(!tt.$(we.y,Fe.y)||!tt.$(Fe.y,Ie.y))){var ze=ce;isNaN(ze)&&(ze=this.smoothness/3);var gt=we.x;we=we.y;var nt=Fe.x;Fe=Fe.y;var Et=Ie.x;Ie=Ie.y;var At=ze*x0(gt,we,nt,Fe);ze*=x0(nt,Fe,Et,Ie),tt.$(we,Fe)&&tt.$(nt,Et)&&(nt>gt?Ie>Fe?(z.x=nt-At,z.y=Fe-At,b.x=nt+ze,b.y=Fe+ze):(z.x=nt-At,z.y=Fe+At,b.x=nt+ze,b.y=Fe-ze):Ie>Fe?(z.x=nt+At,z.y=Fe-At,b.x=nt-ze,b.y=Fe+ze):(z.x=nt+At,z.y=Fe+At,b.x=nt-ze,b.y=Fe-ze)),tt.$(gt,nt)&&tt.$(Fe,Ie)&&(Fe>we?(Et>nt?(z.x=nt-At,z.y=Fe-At,b.x=nt+ze):(z.x=nt+At,z.y=Fe-At,b.x=nt-ze),b.y=Fe+ze):(Et>nt?(z.x=nt-At,z.y=Fe+At,b.x=nt+ze):(z.x=nt+At,z.y=Fe+At,b.x=nt-ze),b.y=Fe-ze)),(tt.$(gt,nt)&&tt.$(nt,Et)||tt.$(we,Fe)&&tt.$(Fe,Ie))&&(gt=.5*(gt+Et),we=.5*(we+Ie),z.x=gt,z.y=we,b.x=gt,b.y=we),(pe===1||pe===2&&tt.$(ne.x,this.i(0).x)&&tt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+ue.x),x.y=.5*(ne.y+ue.y)),Kh(re,x.x-E,x.y-oe,z.x-E,z.y-oe,ue.x-E,ue.y-oe),y.set(z),x.set(b),ne=ue}}ue=ne.x,ne=ne.y,ce=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ce=Ig(this,ce.copy(),!1,_o)),ue=.5*(ue+ce.x),ne=.5*(ne+ce.y),Kh(re,b.x-E,b.y-oe,ue-E,ne-oe,ce.x-E,ce.y-oe),st.free(y),st.free(x),st.free(z),st.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=Ig(this,ne.copy(),!1,_o)),Kh(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ne.x-E,ne.y-oe);else{for(z=st.alloc(),z.assign(this.i(0)),b=st.alloc(),b.assign(z),ne=this.computeCorner(),pe=1,ue=0;pe<y;){if(pe=oy(this,z,pe,1<pe),ce=this.i(pe),pe>=y-1){if(!z.D(ce))this.computeShortLength(!1)!==0&&(ce=Ig(this,ce.copy(),!1,_o)),Og(this,re,-E,-oe,z,ce,x);else if(ue===0)for(pe=1;pe<y;)b.assign(z),ce=this.i(pe++),Og(this,re,-E,-oe,z,ce,x),z.assign(ce);break}if(ue=oy(this,ce,pe+1,pe<y-3),pe=-E,gt=-oe,we=ce,nt=this.i(ue),ze=x,tt.B(z.y,we.y)&&tt.B(we.x,nt.x))if(Ie=Math.min(ne,Math.abs(we.x-b.x)/2),Ie=At=Math.min(Ie,Math.abs(nt.y-we.y)/2),tt.B(Ie,0))Og(this,re,pe,gt,z,we,ze),z.assign(we);else{var Tt=we.x,Vt=we.y;Fe=Tt,Et=Vt,we.x>z.x?Tt=we.x-Ie:Tt=we.x+Ie,nt.y>we.y?Et=we.y+At:Et=we.y-At,nt=st.allocAt(Tt,Vt),Og(this,re,pe,gt,z,nt,ze),st.free(nt),u0(re,we.x+pe,we.y+gt,Fe+pe,Et+gt),z.h(Fe,Et)}else tt.B(z.x,we.x)&&tt.B(we.y,nt.y)?(Ie=Math.min(ne,Math.abs(we.y-b.y)/2),Ie=At=Math.min(Ie,Math.abs(nt.x-we.x)/2),tt.B(At,0)?(Og(this,re,pe,gt,z,we,ze),z.assign(we)):(Tt=we.x,Vt=we.y,Fe=Tt,Et=Vt,we.y>z.y?Vt=we.y-Ie:Vt=we.y+Ie,nt.x>we.x?Fe=we.x+At:Fe=we.x-At,nt=st.allocAt(Tt,Vt),Og(this,re,pe,gt,z,nt,ze),st.free(nt),u0(re,we.x+pe,we.y+gt,Fe+pe,Et+gt),z.h(Fe,Et))):(Og(this,re,pe,gt,z,we,ze),z.assign(we));b.assign(ce),pe=ue}st.free(z)}c0=re}else re=this.i(1).copy(),re.x-=E,re.y-=oe,this.computeShortLength(!0)!==0&&(b=Ig(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=Ig(this,re,!1,z)),a.type=nn.j,a.startX=b.x,a.startY=b.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function x0(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),tt.$(a,0)?y:tt.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Ig(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=x0(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=x0(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 oy(a,y,x,E){for(var b=a.pointsCount,z=y;tt.$(y.x,z.x)&&tt.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!tt.$(y.x,z.x)&&!tt.$(y.y,z.y))return x-1;for(var ne=z;tt.$(y.x,z.x)&&tt.$(z.x,ne.x)&&(!E||(y.y>=z.y?z.y>=ne.y:z.y<=ne.y))||tt.$(y.y,z.y)&&tt.$(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}hi.prototype.computeJumpLength=function(){return 10};function Og(a,y,x,E,b,z,ne){if(!ne&&tg(a)){ne=a.computeJumpLength();var re=ne/2,oe=[],ue=0;if(a.isVisible()&&(ue=bS(a,b,z,oe)),0<ue){if(tt.B(b.y,z.y))if(b.x<z.x)for(var ce=0;ce<ue;){var pe=Math.max(b.x,Math.min(oe[ce++]-re,z.x-ne));y.lineTo(pe+x,z.y+E);for(var we=pe+x,Fe=Math.min(pe+ne,z.x);ce<ue&&(pe=oe[ce],pe<Fe+ne);)ce++,Fe=Math.min(pe+re,z.x);pe=z.y-ne+E,Fe+=x;var Ie=z.y+E;a.curve===Xh?pp(y,Fe,Ie,!1):Kh(y,we,pe,Fe,pe,Fe,Ie)}else for(--ue;0<=ue;){for(ce=Math.min(b.x,Math.max(oe[ue--]+re,z.x+ne)),y.lineTo(ce+x,z.y+E),we=ce+x,pe=Math.max(ce-ne,z.x);0<=ue&&(ce=oe[ue],ce>pe-ne);)ue--,pe=Math.max(ce-re,z.x);ce=z.y-ne+E,pe+=x,Fe=z.y+E,a.curve===Xh?pp(y,pe,Fe,!1):Kh(y,we,ce,pe,ce,pe,Fe)}else if(tt.B(b.x,z.x))if(b.y<z.y)for(ce=0;ce<ue;){for(pe=Math.max(b.y,Math.min(oe[ce++]-re,z.y-ne)),y.lineTo(z.x+x,pe+E),we=pe+E,pe=Math.min(pe+ne,z.y);ce<ue&&(Fe=oe[ce],Fe<pe+ne);)ce++,pe=Math.min(Fe+re,z.y);Fe=z.x-ne+x,Ie=z.x+x,pe+=E,a.curve===Xh?pp(y,Ie,pe,!1):Kh(y,Fe,we,Fe,pe,Ie,pe)}else for(--ue;0<=ue;){for(ce=Math.min(b.y,Math.max(oe[ue--]+re,z.y+ne)),y.lineTo(z.x+x,ce+E),we=ce+E,ce=Math.max(ce-ne,z.y);0<=ue&&(pe=oe[ue],pe>ce-ne);)ue--,ce=Math.max(pe-re,z.y);pe=z.x-ne+x,Fe=z.x+x,ce+=E,a.curve===Xh?pp(y,Fe,ce,!1):Kh(y,pe,we,pe,ce,Fe,ce)}}}y.lineTo(z.x+x,z.y+E)}function bS(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 hi){if(oe===a)return 0<E.length&&E.sort(function(ce,pe){return ce-pe}),E.length;if(oe.isVisible()&&tg(oe)){var ue=oe.routeBounds;ue.w()&&a.routeBounds.Yc(ue)&&!a.usesSamePort(oe)&&(ue=oe.path,ue!==null&&ue.Ed()&&FS(y,x,E,oe))}}}}}return 0<E.length&&E.sort(function(ce,pe){return ce-pe}),E.length}function FS(a,y,x,E){for(var b=tt.B(a.y,y.y),z=E.pointsCount,ne=E.i(0),re=st.alloc(),oe=1;oe<z;oe++){var ue=E.i(oe);if(oe<z-1){var ce=E.i(oe+1);if(ne.y===ue.y&&ue.y===ce.y){if(ue.x>ne.x&&ce.x>=ue.x||ue.x<ne.x&&ce.x<=ue.x)continue}else if(ne.x===ue.x&&ue.x===ce.x&&(ue.y>ne.y&&ce.y>=ue.y||ue.y<ne.y&&ce.y<=ue.y))continue}e:{ce=a.x;var pe=a.y,we=y.x,Fe=y.y,Ie=ne.x;ne=ne.y;var ze=ue.x,gt=ue.y;if(tt.B(ce,we)){if(!tt.B(pe,Fe)&&tt.B(ne,gt)&&Math.min(pe,Fe)<ne&&Math.max(pe,Fe)>ne&&Math.min(Ie,ze)<ce&&Math.max(Ie,ze)>ce&&!tt.B(Ie,ze)){re.x=ce,re.y=ne,ce=!0;break e}}else if(tt.B(pe,Fe)&&tt.B(Ie,ze)&&Math.min(ce,we)<Ie&&Math.max(ce,we)>Ie&&Math.min(ne,gt)<pe&&Math.max(ne,gt)>pe&&!tt.B(ne,gt)){re.x=Ie,re.y=pe,ce=!0;break e}re.x=0,re.y=0,ce=!1}ce&&(b?x.push(re.x):x.push(re.y)),ne=ue}st.free(re)}function tg(a){return a=a.curve,a===yp||a===Xh}function S0(a,y){(y||tg(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()))}hi.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 hi&&(oe===this?z=!0:z&&tx(this,oe,a))}}else if(E)for(z=b.Pa.s,b=z.length,ne=0;ne<b;ne++)re=z[ne],re instanceof hi&&tx(this,re,a)}}}}};function tx(a,y,x){if(y!==null&&y.lk&&y.fd&&tg(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}hi.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},hi.prototype.isVisible=function(){if(!Sr.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},hi.prototype.Zb=function(a){if(Sr.prototype.Zb.call(this,a),a&&S0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},hi.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tm:this.qk};function qp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,ne=y.jb.s,re=ne.length,oe=0;oe<re;oe++){var ue=ne[oe];(ue.ef===y&&ue.ff===E&&ue.uf===x&&ue.vf===b||ue.ef===x&&ue.ff===b&&ue.uf===y&&ue.vf===E)&&(z===null?z=ue:(a===null&&(a=[],a.push(z)),a.push(ue)))}if(a!==null){for(z=W1(y,x,E,b),z===null&&(z=new b0(y,E,x,b),H1(y,z),H1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function em(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Di(y.links,a),y.Sl()))}hi.prototype.ph=function(){return!0},wt.Object.defineProperties(hi.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&g0(y,this,x),em(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var 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&&f0(a,this,b),qp(this),this.C(1)),this.g("fromNode",y,a),mp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&dc(x),em(this),this.ff=a;var E=this.fromPort;E!==null&&dc(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))),qp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&g0(y,this,x),em(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var 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&&f0(a,this,b),qp(this),this.C(1)),this.g("toNode",y,a),mp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&dc(x),em(this),this.vf=a;var E=this.toPort;E!==null&&dc(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))),qp(this),this.g("toPortId",y,a)}}},toPort:{get:function(){var a=this.uf;return a===null?null:a.ns(this.vf)}},toPortChanged:{get:function(){return this.uo},set:function(a){var y=this.uo;y!==a&&(this.uo=a,this.g("toPortChanged",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Bi},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&&dc(this.fromPort),this.bb())}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:NaN},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Qn(a,">= 0",hi,"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:Bi},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&&dc(this.toPort),this.bb())}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:NaN},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Qn(a,">= 0",hi,"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?lo:this.wd.iterator}},relinkableFrom:{get:function(){return(this.Qa&1)!==0},set:function(a){var y=(this.Qa&1)!==0;y!==a&&(this.Qa^=1,this.g("relinkableFrom",y,a),this.Wb())}},relinkableTo:{get:function(){return(this.Qa&2)!==0},set:function(a){var y=(this.Qa&2)!==0;y!==a&&(this.Qa^=2,this.g("relinkableTo",y,a),this.Wb())}},resegmentable:{get:function(){return(this.Qa&4)!==0},set:function(a){var y=(this.Qa&4)!==0;y!==a&&(this.Qa^=4,this.g("resegmentable",y,a),this.Wb())}},isTreeLink:{get:function(){return(this.Qa&8)!==0},set:function(a){var y=(this.Qa&8)!==0;y!==a&&(this.Qa^=8,this.g("isTreeLink",y,a),this.fromNode!==null&&Qp(this.fromNode),this.toNode!==null&&Qp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Co?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()===Ec&&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),tt.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);tt.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 st)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||m0(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);tt.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):tt.$(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 $n,E=0;E<a.length/2;E++)b=new st(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(!tn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new $n,E=0;E<a.length;E++)b=a[E],x.add(new st(b.x,b.y).freeze())}}else if(a instanceof $n)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else zt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),m0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ts(a.animationManager,this,x)),this.g("points",y,x)}}},pointsCount:{get:function(){return this.Nb.count}},fd:{get:function(){return(this.Qa&16)!==0},set:function(a){(this.Qa&16)!==0!==a&&(this.Qa^=16)}},suspendsRouting:{get:function(){return(this.Qa&32)!==0},set:function(a){(this.Qa&32)!==0!==a&&(this.Qa^=32)}},computingPoints:{get:function(){return(this.Qa&64)!==0},set:function(a){(this.Qa&64)!==0!==a&&(this.Qa^=64)}},defaultFromPoint:{get:function(){return this.o},set:function(a){this.o=a.copy()}},defaultToPoint:{get:function(){return this.u},set:function(a){this.u=a.copy()}},isOrthogonal:{get:function(){return(this.qj.value&2)===2}},isAvoiding:{get:function(){return(this.qj.value&4)===4}},lk:{get:function(){return(this.Qa&128)!==0},set:function(a){(this.Qa&128)!==0!==a&&(this.Qa^=128)}},geometry:{get:function(){if(!this.lk){if(this.vg(),2>this.pointsCount)return this.lk=!0,this.ua;this.ua=this.makeGeometry()}return this.ua}},firstPickIndex:{get:function(){return 2>=this.pointsCount?0:this.isOrthogonal||!vp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!vp(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),S0(this,y===Xh||y===yp||a===Xh||a===yp),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),S0(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)}}}),hi.prototype.invalidateOtherJumpOvers=hi.prototype.Xo,hi.prototype.findClosestSegment=hi.prototype.ez,hi.prototype.updateRoute=hi.prototype.vg,hi.prototype.invalidateRoute=hi.prototype.bb,hi.prototype.rollbackRoute=hi.prototype.rv,hi.prototype.commitRoute=hi.prototype.zf,hi.prototype.startRoute=hi.prototype.uh,hi.prototype.clearPoints=hi.prototype.Fj,hi.prototype.removePoint=hi.prototype.pv,hi.prototype.addPointAt=hi.prototype.yf,hi.prototype.addPoint=hi.prototype.ne,hi.prototype.insertPointAt=hi.prototype.m,hi.prototype.insertPoint=hi.prototype.Kz,hi.prototype.setPointAt=hi.prototype.L,hi.prototype.setPoint=hi.prototype.dd,hi.prototype.getPoint=hi.prototype.i,hi.prototype.getOtherPort=hi.prototype.Cz,hi.prototype.getOtherNode=hi.prototype.To;var kg=null,Tg=null,ay=new Jt(hi,"Normal",1),BS=new Jt(hi,"Orthogonal",2),MS=new Jt(hi,"AvoidsNodes",6),nx=new Jt(hi,"AvoidsNodesStraight",7),Eu=new Jt(hi,"None",0),Ec=new Jt(hi,"Bezier",9),Xh=new Jt(hi,"JumpGap",10),yp=new Jt(hi,"JumpOver",11),tm=new Jt(hi,"End",17),P0=new Jt(hi,"Scale",18),w0=new Jt(hi,"Stretch",19),nm=new Jt(hi,"OrientAlong",21),im=new Jt(hi,"OrientPlus90",22),rm=new Jt(hi,"OrientMinus90",23),sy=new Jt(hi,"OrientOpposite",24),C0=new Jt(hi,"OrientUpright",25),om=new Jt(hi,"OrientPlus90Upright",26),am=new Jt(hi,"OrientMinus90Upright",27),E0=new Jt(hi,"OrientUpright45",28),ix=16,rx=14,sm=8;hi.className="Link",hi.Normal=ay,hi.Orthogonal=BS,hi.AvoidsNodes=MS,hi.AvoidsNodesStraight=nx,hi.None=Eu,hi.Bezier=Ec,hi.JumpGap=Xh,hi.JumpOver=yp,hi.End=tm,hi.Scale=P0,hi.Stretch=w0,hi.OrientAlong=nm,hi.OrientPlus90=im,hi.OrientMinus90=rm,hi.OrientOpposite=sy,hi.OrientUpright=C0,hi.OrientPlus90Upright=om,hi.OrientMinus90Upright=am,hi.OrientUpright45=E0,hi.EndSegmentStep=8,hi.CurvinessStart=ix,hi.SpacingMin=rx,hi.OrthoShortCut=sm;function b0(a,y,x,E){Do(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}b0.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},b0.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))}},b0.className="LinkBundle";function lm(a){Do(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}lm.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,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=ly,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 xp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function th(a,y,x){return xp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ly}function ox(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]>=ng&&(x[E]=ly)}lm.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]===Jh)return!1}return!0};function nh(a,y,x,E,b,z,ne,re,oe){if(!(y<z||y>ne||x<re||x>oe)){var ue=y|0,ce=x|0,pe=a.ac[ue][ce];if(pe>=ng&&pe<Sp)for(b?ce+=E:ue+=E,pe+=1;z<=ue&&ue<=ne&&re<=ce&&ce<=oe&&!(pe>=a.ac[ue][ce]);)a.ac[ue][ce]=pe,pe+=1,b?ce+=E:ue+=E;if(ue=b?ce:ue,b)if(0<E)for(x+=E;x<ue;x+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else for(x+=E;x>ue;x+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else if(0<E)for(y+=E;y<ue;y+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else for(y+=E;y>ue;y+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe)}}function F0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var ue=Jh,ce=ng;for(a.ac[y][x]=ce;ue===Jh&&y>z&&y<ne&&x>re&&x<oe;)ce+=1,a.ac[y][x]=ce,b?x+=E:y+=E,ue=a.ac[y][x]}function B0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var ue=Jh,ce=Sp;for(a.ac[y][x]=ce;ue===Jh&&y>z&&y<ne&&x>re&&x<oe;)a.ac[y][x]=ce,b?x+=E:y+=E,ue=a.ac[y][x]}function ax(a,y,x,E,b,z,ne){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(xp(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var ue=E.x,ce=E.y;if(xp(a,ue,ce))if(ue-=a.Nd,ue/=a.rc,ce-=a.Od,ce/=a.sc,1>=Math.abs(re-ue)&&1>=Math.abs(oe-ce))a.abort=!0;else{var pe=z.x;E=z.y,y=z.x+z.width;var we=z.y+z.height;pe-=a.Nd,pe/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,we-=a.Od,we/=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)),we=Math.min(a.ei,Math.max(0,we|0)),E=a.ac,re|=0,oe|=0,ue|=0,ce|=0;var Fe=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===Jh?(F0(a,re,oe,Fe,x,z,y,pe,we),F0(a,re,oe,1,!x,z,y,pe,we),F0(a,re,oe,-1,!x,z,y,pe,we)):F0(a,re,oe,Fe,x,re,oe,re,oe),E[ue][ce]===Jh?(B0(a,ue,ce,b===0||b===90?1:-1,b===90||b===270,z,y,pe,we),B0(a,ue,ce,1,!(b===90||b===270),z,y,pe,we),B0(a,ue,ce,-1,!(b===90||b===270),z,y,pe,we)):B0(a,ue,ce,Fe,x,ue,ce,ue,ce),x=Si(),ne&&sx(a,ue,ce,b,re,oe,x))for((x[0]!==ue||x[1]!==ce)&&(x.unshift(ce),x.unshift(ue)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=ng,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],ue=x[z+1];y>b?b++:y<b?b--:ue>ne?ne++:ue<ne&&ne--,E[b][ne]=a++,b!==y||ne!==ue;);else nh(a,re,oe,1,!1,z,y,pe,we),nh(a,re,oe,-1,!1,z,y,pe,we),nh(a,re,oe,1,!0,z,y,pe,we),nh(a,re,oe,-1,!0,z,y,pe,we);Fi(x)}}}}function sx(a,y,x,E,b,z,ne){for(var re=a.ac,oe=y,ue=x;;){if(oe===b&&ue===z)return!0;var ce=oe,pe=ue;if(E===0)if(ce<b)ce++;else break;else if(E===90)if(pe<z)pe++;else break;else if(E===180)if(ce>b)ce--;else break;else if(pe>z)pe--;else break;var we=re[ce][pe];if(we===0||we===uy)break;oe=ce,ue=pe}for(;;){if(ce=E,pe=oe,we=ue,E===0?we<z?(ce=90,we++):we>z&&(ce=270,we--):E===90?pe<b?(ce=0,pe++):pe>b&&(ce=180,pe--):E===180?we<z?(ce=90,we++):we>z&&(ce=270,we--):pe<b?(ce=0,pe++):pe>b&&(ce=180,pe--),pe=re[pe][we],ce!==E&&pe!==0&&pe!==uy){if(ne.push(oe),ne.push(ue),sx(a,oe,ue,ce,b,z,ne))return!0;ne.pop(),ne.pop()}if(re[oe][ue]=uy,E===0){if(oe===y)return!1;oe--}else if(E===90){if(ue===x)return!1;ue--}else if(E===180){if(oe===y)return!1;oe++}else{if(ue===x)return!1;ue++}}}wt.Object.defineProperties(lm.prototype,{bounds:{get:function(){return new Bn(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var Jh=0,ng=1,Sp=999999,ly=Sp+1,uy=Sp+2;lm.className="PositionArray";function Rg(){Do(this),this.port=this.node=null,this.pe=[],this.ap=!1}Rg.prototype.toString=function(){for(var a=this.pe,y=this.node.toString()+" "+a.length.toString()+":",x=0;x<a.length;x++){var E=a[x];E!==null&&(y+=`
|
|
|
`+E.toString())}return y};function LS(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}Rg.prototype.Sl=function(){this.pe.length=0};function lx(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 ho?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(Us,st.alloc()),oe=a.port.ga(Nn,st.alloc());for(b=Bn.allocAt(re.x,re.y,0,0),b.Ye(oe),st.free(re),st.free(oe),re=st.allocAt(b.x+b.width/2,b.y+b.height/2),oe=a.port.li(),ne=ne.iterator;ne.next();){var ue=ne.value;if(ue.isVisible()&&ue.fromPort!==ue.toPort){var ce=ue.fromPort===a.port||ue.fromNode!==null&&ue.fromNode.Td(E),pe=ue.computeSpot(ce,a.port);if(pe.$c()&&(ce=ce?ue.toPort:ue.fromPort,ce!==null)){var we=ce.part;if(we!==null){var Fe=we.findVisibleNode();Fe!==null&&Fe!==we&&(we=Fe,ce=we.port),ce=ue.computeOtherPoint(we,ce),we=re.ab(ce),we-=oe,0>we?we+=360:360<=we&&(we-=360),pe=LS(b,pe,we,ue.isOrthogonal),pe===0?(pe=4,180<we&&(we-=360)):pe===90?(pe=8,270<we&&(we-=360)):pe===180?pe=2:(pe=1,90>we&&(we+=360)),Fe=a.pe[z],Fe===void 0?(Fe=new cy(ue,we,pe),a.pe[z]=Fe):(Fe.link=ue,Fe.angle=we,Fe.Nc=pe),Fe.hv.set(ce),z++}}}}for(st.free(re),a.pe.sort(Rg.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=st.alloc(),oe=st.alloc(),ne=st.alloc(),ue=st.alloc(),pe.ga(Us,re),pe.ga(Tl,oe),pe.ga(Nn,ne),pe.ga(Zl,ue),Fe=we=ce=pe=0,E===qv)for(var Ie=0;Ie<z.length;Ie++){var ze=z[Ie];if(ze!==null){var gt=ze.link.computeThickness();switch(ze.Nc){case 8:we+=gt;break;case 2:Fe+=gt;break;case 1:pe+=gt;break;default:case 4:ce+=gt}}}var nt=Ie=0,Et=1,At=ze=0;for(gt=0;gt<z.length;gt++){var Tt=z[gt];if(Tt!==null){if(Ie!==Tt.Nc){switch(Ie=Tt.Nc,Ie){case 8:var Vt=ne;nt=ue;break;case 2:Vt=ue,nt=re;break;case 1:Vt=re,nt=oe;break;default:case 4:Vt=oe,nt=ne}switch(ze=nt.x-Vt.x,At=nt.y-Vt.y,Ie){case 8:we>Math.abs(ze)?(Et=Math.abs(ze)/we,we=Math.abs(ze)):Et=1;break;case 2:Fe>Math.abs(At)?(Et=Math.abs(At)/Fe,Fe=Math.abs(At)):Et=1;break;case 1:pe>Math.abs(ze)?(Et=Math.abs(ze)/pe,pe=Math.abs(ze)):Et=1;break;default:case 4:ce>Math.abs(At)?(Et=Math.abs(At)/ce,ce=Math.abs(At)):Et=1}nt=0}var mn=Tt.Zo;if(E===qv){switch(Tt=Tt.link.computeThickness(),Tt*=Et,mn.set(Vt),Ie){case 8:mn.x=Vt.x+ze/2+we/2-nt-Tt/2;break;case 2:mn.y=Vt.y+At/2+Fe/2-nt-Tt/2;break;case 1:mn.x=Vt.x+ze/2-pe/2+nt+Tt/2;break;default:case 4:mn.y=Vt.y+At/2-ce/2+nt+Tt/2}nt+=Tt}else{var bi=.5;E===p0&&(bi=(Tt.Uo+1)/(Tt.Gl+1)),mn.x=Vt.x+ze*bi,mn.y=Vt.y+At*bi}}}for(st.free(re),st.free(oe),st.free(ne),st.free(ue),Vt=a.pe,z=0;z<Vt.length;z++)E=Vt[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Bn.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}Rg.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},Rg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Ss,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)},Rg.className="Knot";function cy(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new st,this.Gl=this.Uo=0,this.Zo=new st,this.Ju=0}cy.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},cy.className="LinkInfo";function ps(a){Do(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new st(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}ps.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},ps.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ps.prototype.qb=function(){},ps.prototype.toString=function(){var a=Ti(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},ps.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())}}},ps.prototype.createNetwork=function(){return new qa(this)},ps.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof gn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ho?y.lg(a.memberParts):y.lg(a.iterator),y},ps.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")}},ps.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()}},ps.prototype.doLayout=function(a){var y=new Un;a instanceof gn?(Ef(this,y,a.nodes,!0,this.rh,!0,!1,!0),Ef(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof ho?Ef(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},ps.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;um(re);var oe=re.measuredBounds,ue=oe.width;oe=oe.height,re.moveTo(E,b),re instanceof ho&&(re.rh=!1),E+=Math.max(ue,50)+20,ne=Math.max(ne,Math.max(oe,50)),z>=y-1?(z=0,E=x,b+=ne+20,ne=0):z++}},ps.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 hi)&&(um(re),this.rh(re))){var oe=re.measuredBounds,ue=oe.width;oe=oe.height,re.moveTo(x,E),re instanceof ho&&(re.rh=!1),x+=Math.max(ue,50)+20,z=Math.max(z,Math.max(oe,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},ps.prototype.rh=function(a){return!!(!a.location.w()||a instanceof ho&&a.rh)};function Ef(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 Ai?oe.isLinkLabel||(oe instanceof ho&&oe.layout===null?Ef(a,y,oe.memberParts,!1,b,z,ne,re):(um(oe),y.add(oe))):ne&&oe instanceof hi?y.add(oe):!re||!oe.Zc()||oe instanceof Ai||(um(oe),y.add(oe)))}}function um(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}ps.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Bn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},ps.prototype.ex=function(a){var y=new Un;return a instanceof gn?(Ef(this,y,a.nodes,!0,null,!0,!0,!0),Ef(this,y,a.links,!0,null,!0,!0,!0),Ef(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof ho?Ef(this,y,a.memberParts,!1,null,!0,!0,!0):Ef(this,y,a.iterator,!1,null,!0,!0,!0),y},ps.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(Us),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},wt.Object.defineProperties(ps.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())}}}),ps.prototype.collectParts=ps.prototype.ex,ps.prototype.getLayoutBounds=ps.prototype.ni,ps.prototype.invalidateLayout=ps.prototype.C,ps.className="Layout";function qa(a){Do(this),this.Sc=a,this.wf=new Un,this.ye=new Un,this.Es=new Hi,this.zs=new Hi}qa.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 Un,this.ye=new Un,this.Es=new Hi,this.zs=new Hi},qa.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},qa.prototype.createVertex=function(){return new cl(this)},qa.prototype.createEdge=function(){return new hc(this)},qa.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 Ai)return!ne.isLinkLabel;if(ne instanceof hi){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 Ai&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof ho&&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 hi&&(!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))}}},qa.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},De=qa.prototype,De.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},De.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},De.Iu=function(a){if(a!==null&&ux(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 ux(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}De.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},De.ki=function(a){return a===null?null:this.Es.I(a)},De.Bo=function(a){if(a!==null){dy(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function dy(a,y){if(y!==null){a.ye.add(y);var x=y.link;x!==null&&a.Lo(x)===null&&a.zs.add(x,y),y.network=a}}De.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},De.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),hy(this,a)}};function hy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}De.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},De.Lo=function(a){return a===null?null:this.zs.I(a)},De.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},De.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))}},De.Ko=function(){for(var a=Si(),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]);Fi(a)},qa.prototype.deleteArtificialVertexes=function(){for(var a=Si(),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=Si(),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]);Fi(a),Fi(y)};function NS(a){for(var y=Si(),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]);Fi(y)}qa.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),NS(this),this.Ko()),a=new $n;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),fy(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 fy(a,y,x){if(x!==null&&x.network!==y){ux(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(hy(a,b),dy(y,b),fy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(hy(a,x),dy(y,x),fy(a,y,x.toVertex))}}qa.prototype.dz=function(){for(var a=new Un,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},wt.Object.defineProperties(qa.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}}}),qa.prototype.findAllParts=qa.prototype.dz,qa.prototype.splitIntoSubNetworks=qa.prototype.Zx,qa.prototype.deleteSelfEdges=qa.prototype.Ko,qa.prototype.reverseEdge=qa.prototype.gm,qa.prototype.linkVertexes=qa.prototype.Zj,qa.prototype.findEdge=qa.prototype.Lo,qa.prototype.deleteLink=qa.prototype.Yy,qa.prototype.deleteEdge=qa.prototype.Mj,qa.prototype.addLink=qa.prototype.Dy,qa.prototype.addEdge=qa.prototype.Bo,qa.prototype.findVertex=qa.prototype.ki,qa.prototype.deleteNode=qa.prototype.Zy,qa.prototype.deleteVertex=qa.prototype.Iu,qa.prototype.addNode=qa.prototype.Bl,qa.prototype.addVertex=qa.prototype.dh,qa.prototype.addParts=qa.prototype.lg,qa.className="LayoutNetwork";function cl(a){Do(this),this.ob=a,this.j=new Bn(0,0,10,10).freeze(),this.o=new st(5,5).freeze(),this.Sh=this.ub=null,this.tg=new $n,this.mg=new $n}cl.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new $n,this.mg=new $n},cl.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Ji(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},cl.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;tn(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 ho)){x=Bn.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Io);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Bn.free(x);return}Bn.free(x)}a.moveTo(y.x,y.y)}},cl.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},cl.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},cl.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},cl.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function gy(a,y){return a=a.Sh,y=y.Sh,a?y?(a=a.text,y=y.text,a<y?-1:a>y?1:0):1:y!==null?-1:0}wt.Object.defineProperties(cl.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=Bn.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),Bn.free(x),!(a instanceof ho)&&(a=a.locationObject.ga(Io),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 Un,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Un,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Un,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 $n,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}}}),cl.prototype.deleteDestinationEdge=cl.prototype.Jl,cl.prototype.addDestinationEdge=cl.prototype.zl,cl.prototype.deleteSourceEdge=cl.prototype.Kl,cl.prototype.addSourceEdge=cl.prototype.Cl,cl.className="LayoutVertex",cl.standardComparer=gy,cl.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 hc(a){Do(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}hc.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},hc.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Ji(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},hc.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},hc.prototype.commit=function(){},hc.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},wt.Object.defineProperties(hc.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)}}}),hc.prototype.getOtherVertex=hc.prototype.Ax,hc.className="LayoutEdge";function _l(a){ps.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new fi(NaN,NaN).freeze(),this.tf=new fi(10,10).freeze(),this.Jb=cm,this.Rb=L0,this.nd=dm,this.hd=cx,a&&Object.assign(this,a)}Zt(_l,ps),_l.prototype.cloneProtected=function(a){ps.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},_l.prototype.qb=function(a){a.classType===_l?a===dm||a===A0||a===py||a===N0?this.sorting=a:a===L0||a===md?this.arrangement=a:a===cm||a===M0?this.alignment=a:zt("Unknown enum value: "+a):ps.prototype.qb.call(this,a)},_l.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 ho)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 N0:b.reverse();break;case dm:b.sort(this.comparer);break;case A0: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 M0:var re=y,oe=x,ue=Bn.alloc(),ce=Math.max(this.cellSize.width,1);if(!isFinite(ce))for(var pe=ce=0;pe<b.length;pe++){var we=this.ni(b[pe],ue);ce=Math.max(ce,we.width)}if(ce=Math.max(ce+re,1),pe=Math.max(this.cellSize.height,1),!isFinite(pe))for(we=pe=0;we<b.length;we++){var Fe=this.ni(b[we],ue);pe=Math.max(pe,Fe.height)}pe=Math.max(pe+oe,1),we=this.arrangement;for(var Ie=Fe=this.arrangementOrigin.x,ze=this.arrangementOrigin.y,gt=0,nt=0,Et=0;Et<b.length;Et++){var At=b[Et],Tt=this.ni(At,ue),Vt=Math.ceil((Tt.width+re)/ce)*ce,mn=Math.ceil((Tt.height+oe)/pe)*pe;switch(we){case md:var bi=Math.abs(Ie-Tt.width);break;default:bi=Ie+Tt.width}switch((0<z&>>z-1||0<ne&&0<gt&&bi-Fe>ne)&&(E.push(new Bn(0,ze,ne+re,nt)),gt=0,Ie=Fe,ze+=nt,nt=0),nt=Math.max(nt,mn),we){case md:Tt=-Tt.width;break;default:Tt=0}switch(At.moveTo(Ie+Tt,ze),we){case md:Ie-=Vt;break;default:Ie+=Vt}gt++}E.push(new Bn(0,ze,ne+re,nt)),Bn.free(ue);break;case cm:for(oe=ne,ce=z,pe=y,we=x,ne=Bn.alloc(),Fe=Math.max(this.cellSize.width,1),z=ze=ue=0,re=st.alloc(),Ie=0;Ie<b.length;Ie++)nt=b[Ie],gt=this.ni(nt,ne),nt=Vh(nt,nt.locationObject,nt.locationSpot,re),ue=Math.max(ue,nt.x),ze=Math.max(ze,gt.width-nt.x),z=Math.max(z,nt.y);switch(Ie=this.arrangement,Ie){case md:ue+=pe;break;default:ze+=pe}Fe=isFinite(Fe)?Math.max(Fe+pe,1):Math.max(ue+ze,1);var Yi=nt=this.arrangementOrigin.x;for(Et=this.arrangementOrigin.y,ze=0,oe>=ue&&(oe-=ue),ue=At=0,Vt=Math.max(this.cellSize.height,1),Tt=z=0,mn=!0,gt=st.alloc(),bi=0;bi<b.length;bi++){var Gi=b[bi],di=this.ni(Gi,ne),qn=Vh(Gi,Gi.locationObject,Gi.locationSpot,re);if(0<ze)switch(Ie){case md:Yi=(Yi-nt-(di.width-qn.x))/Fe,Yi=tt.$(Math.round(Yi),Yi)?Math.round(Yi):Math.floor(Yi),Yi=Yi*Fe+nt;break;default:Yi=(Yi-nt+qn.x)/Fe,Yi=tt.$(Math.round(Yi),Yi)?Math.round(Yi):Math.ceil(Yi),Yi=Yi*Fe+nt}else switch(Ie){case md:At=Yi+qn.x+di.width;break;default:At=Yi-qn.x}switch(Ie){case md:var so=-(Yi+qn.x)+At;break;default:so=Yi+di.width-qn.x-At}if(0<ce&&ze>ce-1||0<oe&&0<ze&&so>oe){for(E.push(new Bn(0,mn?Et-z:Et,oe+pe,Tt+z+we)),Yi=0;Yi<ze&&bi!==ze;Yi++){so=b[bi-ze+Yi];var Vr=Vh(so,so.locationObject,so.locationSpot,gt);so.moveTo(so.position.x,so.position.y+z-Vr.y)}Tt+=we,Et=mn?Et+Tt:Et+(Tt+z),ze=Tt=z=0,Yi=nt,mn=!1}switch(Yi===nt&&(ue=Ie===md?Math.max(ue,di.width-qn.x):Math.min(ue,-qn.x)),z=Math.max(z,qn.y),Tt=Math.max(Tt,di.height-qn.y),isFinite(Vt)&&(Tt=Math.max(Tt,Math.max(di.height,Vt)-qn.y)),mn?Gi.moveTo(Yi-qn.x,Et-qn.y):Gi.moveTo(Yi-qn.x,Et),Ie){case md:Yi-=qn.x+pe;break;default:Yi+=di.width-qn.x+pe}ze++}if(E.push(new Bn(0,Et,oe+pe,(mn?Tt:Tt+z)+we)),b.length!==ze)for(oe=0;oe<ze;oe++)ce=b[b.length-ze+oe],pe=Vh(ce,ce.locationObject,ce.locationSpot,re),ce.moveTo(ce.position.x,ce.position.y+z-pe.y);if(st.free(re),st.free(gt),Ie===md)for(b=0;b<E.length;b++)z=E[b],z.width+=ue,z.x-=ue;else for(b=0;b<E.length;b++)z=E[b],z.x>ue&&(z.width+=z.x-ue,z.x=ue);Bn.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===md?this.commitLayers(E,new st(b+y/2-(z+b),ne-x/2)):this.commitLayers(E,new st(b-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},_l.prototype.commitLayers=function(){};function cx(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}wt.Object.defineProperties(_l.prototype,{wrappingWidth:{get:function(){return this.zo},set:function(a){this.zo!==a&&(0<a||isNaN(a))&&(this.zo=a,this.isViewportSized=isNaN(a),this.C())}},wrappingColumn:{get:function(){return this.yo},set:function(a){this.yo!==a&&(0<a||isNaN(a))&&(this.yo=a,this.C())}},cellSize:{get:function(){return this.yg},set:function(a){this.yg.D(a)||(this.yg.assign(a),this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf.D(a)||(this.tf.assign(a),this.C())}},alignment:{get:function(){return this.Jb},set:function(a){this.Jb===a||a!==cm&&a!==M0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==L0&&a!==md||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==py&&a!==N0&&a!==dm&&a!==A0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var M0=new Jt(_l,"Position",0),cm=new Jt(_l,"Location",1),L0=new Jt(_l,"LeftToRight",2),md=new Jt(_l,"RightToLeft",3),py=new Jt(_l,"Forward",4),N0=new Jt(_l,"Reverse",5),dm=new Jt(_l,"Ascending",6),A0=new Jt(_l,"Descending",7);_l.className="GridLayout",_l.standardComparer=cx,_l.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},_l.Position=M0,_l.Location=cm,_l.LeftToRight=L0,_l.RightToLeft=md,_l.Forward=py,_l.Reverse=N0,_l.Ascending=dm,_l.Descending=A0;function ja(){this.On=new Un,this.Dn=new Un,this.Pa=new Un,this.cf=new Hi,this.bf=new Hi,this.aj=new Hi,this.H=null,this.tp=!1}De=ja.prototype,De.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},De.Xe=function(a){this.H=a},De.oi=function(a){if(a instanceof Ai){if(this.On.add(a),a instanceof ho){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 hi?this.Dn.add(a):a instanceof pa||this.Pa.add(a);y=a.data,y===null||a instanceof pa||(a instanceof hi?this.bf.add(y,a):this.cf.add(y,a))},De.pc=function(a){if(a.Ej(),a instanceof Ai){if(this.On.remove(a),a instanceof ho){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 hi?this.Dn.remove(a):a instanceof pa||this.Pa.remove(a);y=a.data,y===null||a instanceof pa||(a instanceof hi?this.bf.remove(y):this.cf.remove(y))},De.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 ho)&&zt('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 ho||zt('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 hi||zt('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Si(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Si(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Si(),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]);Fi(y),Fi(x),Fi(a)}},ja.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},ja.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&dx(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&xh(this.diagram,!1)};function dx(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=hx(a,y,E);if(b!==null&&(Zc(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)}}ja.prototype.insertLink=function(){return null},ja.prototype.resolveReferencesForData=function(){},ja.prototype.Ro=function(a){return this.H.model.Ro(a)};function hx(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&&(px||(px=!0,xi('No Group template found for category "'+x+'"'),xi(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(gx||(gx=!0,xi('No Node template found for category "'+x+'"'),xi(" Using default node template")),y=a.ny))),y}ja.prototype.getLinkCategoryForData=function(){return""},ja.prototype.setLinkCategoryForData=function(){},ja.prototype.setFromNodeForLink=function(){},ja.prototype.setToNodeForLink=function(){},ja.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mx||(mx=!0,xi('No Link template found for category "'+a+'"'),xi(" Using default link template")),x=y.my)),x},ja.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},ja.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},ja.prototype.ip=function(a){a=this.Lc(a),a!==null&&(vh(this.diagram,a,!1),this.unresolveReferencesForPart(a))},ja.prototype.unresolveReferencesForPart=function(){},ja.prototype.removeDataForLink=function(){},ja.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},ja.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Ai?a:null)},ja.prototype.findLinkForKey=function(){return null},De=ja.prototype,De.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},De.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Ai?a:null)},De.Kc=function(a){return a===null?null:this.bf.I(a)},De.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Un;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(tn(ne)&&my(this,b,ne)){y.add(E);break}}}return y.iterator},De.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Un;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(tn(ne)&&my(this,b,ne)){y.add(E);break}}}return y.iterator};function my(a,y,x){for(var E in x){var b=y[E],z=x[E];if(fn(z)){if(!fn(b)||b.length<z.length)return!1;for(var ne=0;ne<b.length;ne++){var re=z[ne];if(re!==void 0&&!fx(a,b[ne],re))return!1}}else if(!fx(a,b,z))return!1}return!0}function fx(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(tn(y)&&tn(x)){if(!my(a,y,x))return!1}else if(y!==x)return!1;return!0}ja.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===jo){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===Sa){var ne=a.newValue;E==="nodeDataArray"&&tn(ne)&&dx(this,ne),y.isModified=!0}else if(x===Ga){var re=a.oldValue;E==="nodeDataArray"&&tn(re)&&this.ip(re),y.isModified=!0}else x===Na&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===jo){var oe=a.propertyName,ue=a.object;ue===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ue,oe),y.isModified=!0}else if(x===Sa||x===Ga){var ce=a.change===Sa,pe=ce?a.newParam:a.oldParam,we=ce?a.newValue:a.oldValue,Fe=this.aj.I(a.object);if(Array.isArray(Fe))for(a=0;a<Fe.length;a++){var Ie=Fe[a];if(ce)Xm(Ie,we,pe,!0);else if(!(0>pe)){var ze=pe+Kp(Ie);Ie.pc(ze,!0),Nv(Ie,ze,pe)}}y.isModified=!0}}finally{y.aa=!0}}}}},ja.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)},ja.prototype.rp=function(){for(var a=this.H.model,y=new Un,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){bx(a,ne,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&Ex(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()},ja.prototype.refreshDataBoundLinks=function(){},ja.prototype.updateRelationshipsFromData=function(){},ja.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=Si()),x.push(ne))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Fi(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(a,y){var x=y.Hh;if(fn(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 yy(a,y,x){Jf(y,function(ne){ne=ne.O.s;for(var re=ne.length,oe=0;oe<re;oe++)vg(x,ne[oe])});var E=y.Hh;if(fn(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}}}}ja.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new Hi;if(fn(a))for(var b=0;b<a.length;b++)D0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)D0(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 Un;for(var z=new Hi,ne=E.iterator;ne.next();){var re=ne.value;if(re instanceof hi)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof Ai&&re.data!==null&&x.Tl()){var oe=re;re=ne.key;var ue=re.pg();ue!==null&&(ue=E.I(ue),ue!==null?(x.qe(oe.data,x.wa(ue.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 ce=new Hi;E.each(function(pe){pe.key.data!==null&&ce.add(pe.key.data,pe.value.data)}),x(ce,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function D0(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 Sr))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Ai){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 ho&&z instanceof ho)for(y=y.memberParts;y.next();)ne=D0(a,y.value,x,E,b),ne instanceof hi||ne===null||(ne.containingGroup=z)}else if(y instanceof hi&&z instanceof hi)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=D0(a,y.value,x,E,b),ne!==null&&ne instanceof Ai&&(ne.labeledLink=z);return z}ja.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof hi||(E=b.copyNodeData(E),tn(E)&&(b.xf(E),x=y.Lc(E)))}else Zc(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 hi||(b=y.copyNodeData(E)),tn(b)&&(x.data=b)));return x},wt.Object.defineProperties(ja.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}}}),ja.prototype.updateAllRelationshipsFromData=ja.prototype.rp,ja.prototype.findLinksByExample=ja.prototype.ls,ja.prototype.findNodesByExample=ja.prototype.ms,ja.prototype.findLinkForData=ja.prototype.Kc,ja.prototype.findNodeForData=ja.prototype.ii,ja.prototype.findPartForData=ja.prototype.Lc,ja.prototype.findNodeForKey=ja.prototype.Vb,ja.prototype.removeModeledPart=ja.prototype.ip,ja.prototype.removeModeledParts=ja.prototype.Gs,ja.prototype.rebuildParts=ja.prototype.Wd;var gx=!1,px=!1,mx=!1;ja.className="PartManager";function Nl(a){ja.apply(this,arguments)}Zt(Nl,ja),Nl.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vx(this,a.linkDataArray)},Nl.prototype.addModeledParts=function(a){for(ja.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)mp(a.value);xh(this.diagram,!1)};function vx(a,y){y.forEach(function(x){yx(a,x)}),xh(a.diagram,!1)}function yx(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){Zc(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=T0(x,y,!0);z!==""&&(b.fromPortId=z),z=bc(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Ai&&(b.fromNode=z)),z=T0(x,y,!1),z!==""&&(b.toPortId=z),z=bc(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Ai&&(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}}}}Nl.prototype.removeAllModeledParts=function(){var a=this.diagram.model;xx(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function xx(a,y){y.forEach(function(x){a.ip(x)})}Nl.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Nl.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Nl.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Nl.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Nl.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Nl.prototype.findPartForKey=function(a){var y=ja.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},Nl.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Nl.prototype.doModelChanged=function(a){var y=this;if(ja.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===jo){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 ue=this.Kc(a.object);if(ue!==null){var ce=a.newValue;typeof ce=="string"&&(ue.fromPortId=ce)}}else if(b==="linkToPortId"){var pe=this.Kc(a.object);if(pe!==null){var we=a.newValue;typeof we=="string"&&(pe.toPortId=we)}}else if(b==="nodeGroupKey"){var Fe=this.Lc(a.object);if(Fe!==null){var Ie=a.newValue;if(Ie!==void 0){var ze=this.Vb(Ie);ze instanceof ho?Fe.containingGroup=ze:Fe.containingGroup=null}else Fe.containingGroup=null}}else if(b==="linkLabelKeys"){var gt=this.Kc(a.object);if(gt!==null){var nt=a.oldValue,Et=a.newValue;Array.isArray(nt)&&nt.forEach(function(qn){0<=Et.indexOf(qn)||(qn=y.Vb(qn),qn!==null&&(qn.labeledLink=null))}),Array.isArray(Et)&&Et.forEach(function(qn){qn=y.Vb(qn),qn!==null&&(qn.labeledLink=gt)})}}else if(b==="linkCategory"){var At=this.Kc(a.object),Tt=a.newValue;At!==null&&typeof Tt=="string"&&(At.category=Tt)}else b==="linkDataArray"&&(xx(this,a.oldValue),vx(this,a.newValue));x.isModified=!0}else if(E===Sa){var Vt=a.newValue;if(b==="linkDataArray"&&typeof Vt=="object"&&Vt!==null)yx(this,Vt);else if(b==="linkLabelKeys"&&Ff(Vt)){var mn=this.Kc(a.object),bi=this.Vb(Vt);mn!==null&&bi!==null&&(bi.labeledLink=mn)}x.isModified=!0}else if(E===Ga){var Yi=a.oldValue;if(b==="linkDataArray"&&typeof Yi=="object"&&Yi!==null)this.ip(Yi);else if(b==="linkLabelKeys"&&Ff(Yi)){var Gi=this.Vb(Yi);Gi!==null&&(Gi.labeledLink=null)}x.isModified=!0}}else if(E===jo){var di=a.propertyName;a.object!==x.model||di!=="linkFromKeyProperty"&&di!=="linkToKeyProperty"&&di!=="linkFromPortIdProperty"&&di!=="linkToPortIdProperty"&&di!=="linkLabelKeysProperty"&&di!=="nodeIsGroupProperty"&&di!=="nodeGroupKeyProperty"&&di!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Nl.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Un,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){Ax(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&Nx(y,z,!1)})},Nl.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 hi){var b=bc(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=bc(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 Un().addAll(y);var ne=new Un;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 pa)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof ho)&&(a.containingGroup=y)}}},Nl.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=hm(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 ho&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=b)):(z.link=this.Kc(ne),z.link!==null&&b instanceof Ai&&(bc(y,ne,!0)===x&&(z.link.fromNode=b),bc(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}}yd(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof ho&&(b.containingGroup=a))}},Nl.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Ai){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)vd(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&vd(y,x,E.data)),a instanceof ho)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&vd(y,x,E)}}},Nl.prototype.copyPartData=function(a,y){var x=ja.prototype.copyPartData.call(this,a,y);if(a instanceof hi)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},Nl.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 hi){if(Zc(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 Ai&&(Zc(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&&wp(z,E,z.wa(a.data),!0),Cp(z,E,re,!0),x!==null&&wp(z,E,z.wa(x.data),!1),Cp(z,E,y,!1),z.fi(E),a=ne.archetypeLabelNodeData,a===null||a instanceof Ai||(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},Nl.prototype.findLinkForKey=Nl.prototype.findLinkForKey,Nl.prototype.findPartForKey=Nl.prototype.findPartForKey,Nl.prototype.removeAllModeledParts=Nl.prototype.removeAllModeledParts,Nl.prototype.addModeledParts=Nl.prototype.addModeledParts,Nl.prototype.addAllModeledParts=Nl.prototype.addAllModeledParts,Nl.className="GraphLinksPartManager";function Dc(){ja.apply(this,arguments),this.Sg=null}Zt(Dc,ja);function I0(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||!zn(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Zc(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}}}Dc.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},Dc.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},Dc.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}},Dc.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))},Dc.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},Dc.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},Dc.prototype.doModelChanged=function(a){if(ja.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===jo){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:I0(this,z,ne)}}else if(E==="parentLinkCategory"){var oe=this.ii(a.object),ue=a.newValue;if(oe!==null&&typeof ue=="string"){var ce=oe.kh();ce!==null&&(ce.category=ue)}}y.isModified=!0}}else if(x===jo){var pe=a.propertyName;a.object===y.model&&pe==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},Dc.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof Ai&&(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:I0(this,y,a):E!==null&&vh(x,E,!1)))}}},Dc.prototype.updateDataBindings=function(a,y){ja.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},Dc.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=hm(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 Ai&&y.mh(z)===x&&I0(this,b,this.ii(z))}yd(y,x)}a=y.mh(a),a!==void 0&&b instanceof Ai&&(a=this.Vb(a),I0(this,a,b))}},Dc.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Ai){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(Ga,"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)&&vd(y,x,b)}},Dc.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},Dc.prototype.findLinkForKey=Dc.prototype.findLinkForKey,Dc.className="TreePartManager";function ar(a,y){this.kl=new Un,this.il=new Un,this.Wv=`,
|
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
|
"removedNodeKeys": `,this.vh=null,Do(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Hi,this.Th="key",this.Bk=this.bl=null,this.Jm=this.Km=!1,this.Mm=!0,this.xm=null,this.lj="category",this.Vf=new Hi,this.Lt=new $n,this.Wg=!1,this.o=null,this.undoManager=new Oa,a!==void 0&&(fn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ar.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},ar.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ar.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ar.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)+":"+nr(b)}}return y},ar.prototype.xA=function(a){a.change!==Na&&zt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof So?(Px(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ar.prototype.Qv=function(a,y){var x=this,E=!1,b=new Un,z=new Un,ne=new Un,re=this.vh;a.changes.each(function(pe){pe.model===x&&(pe.modelChange==="nodeDataArray"?pe.change===Sa?b.add(pe.newValue):pe.change===Ga&&ne.add(pe.oldValue):x.lb(pe.object)?z.add(pe.object):pe.change!==jo||x.modelData!==pe.object&&pe.propertyName!=="modelData"?pe.object!==null&&(re&&re.contains(pe.object)?re.get(pe.object).each(function(we){x.lb(we)&&z.add(we)}):pe.object instanceof ar||x.ri()&&x.Jc(pe.object)||wx(x,pe.object).each(function(we){z.add(we)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(pe){oe.add(x.wa(pe)),y||z.add(pe)});var ue=this.kl;ue.clear(),ne.each(function(pe){ue.add(x.wa(pe)),y&&z.add(pe)}),a=x.cloneDeep(z.Fa());var ce=null;return E&&(ce===null&&(ce={}),ce.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(ce===null&&(ce={}),y?ce.removedNodeKeys=oe.Fa():ce.insertedNodeKeys=oe.Fa()),0<a.length&&(ce===null&&(ce={}),ce.modifiedNodeData=a),0<ue.count&&(ce===null&&(ce={}),y?ce.insertedNodeKeys=ue.Fa():ce.removedNodeKeys=ue.Fa()),ue.clear(),oe.clear(),ce},ar.prototype.cloneDeep=function(a){return Pp(this,a,!0)};function Pp(a,y,x,E,b,z){function ne(pe,we){re?(pe.__gohashid===void 0&&z.push(pe),E.set(pe,we)):(pe=la++,E.set(pe,we),b.set(pe,y))}if(!tn(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new Hi),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new Hi),oe=b.iterator;oe.next();){var ue=oe.key;if(oe.value===y&&(ue=E.get(ue)))return ue}if(Array.isArray(y)){oe=[],ne(y,oe);for(var ce=0;ce<y.length;ce++)oe.push(Pp(a,y[ce],!1,E,b,z))}else if(y instanceof st||y instanceof fi||y instanceof Bn||y instanceof pr||y instanceof Qi)oe=y.copy(),ne(y,oe);else{if(y instanceof da||y instanceof nn||y instanceof Jt)return y;if(y instanceof $n)oe=new $n().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Un)oe=new Un().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Hi)oe=new Hi().addAll(Pp(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(ce in oe={},ne(y,oe),y)ce!=="__gohashid"&&(oe[ce]=Pp(a,y[ce],!1,E,b,z))}return x&&z.forEach(function(pe){delete pe.__gohashid}),oe}De=ar.prototype,De.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},De.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},De.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 Sx(a,y){y=y.modelData,tn(y)&&(a.dm(y),a.modelData=y)}De.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!Cx(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
|
"modelData": `+xy(this,this.modelData)),a+`,
|
|
|
"nodeDataArray": `+bf(this,this.nodeDataArray,!0)},De.kv=function(a){Sx(this,a),a=a.nodeDataArray,fn(a)&&(this.dm(a),this.nodeDataArray=a)};function Px(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var ne=E.get(b);ne===null?(ne=new Un,ne.add(z),E.add(b,ne)):ne.add(z)}}var E=a.vh;E===null&&(E=new Hi,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===jo?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Sa||z===Ga)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function wx(a,y){for(var x=new Un,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];O0(a,y,b,b,x)}return x}function O0(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(O0(a,y,ne,E,b))return!0}else if(tn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ne=x[z],ne===y)return b.add(E),!0;if(O0(a,y,ne,E,b))return!0}return!1}De.Pv=function(a,y){var x=this,E=!1,b=new Un,z=new Un,ne=new Un,re=this.vh;a.changes.each(function(ce){ce.model===x&&(ce.modelChange==="nodeDataArray"?ce.change===Sa?b.add(ce.newValue):ce.change===Ga&&ne.add(ce.oldValue):x.lb(ce.object)?z.add(ce.object):ce.change!==jo||x.modelData!==ce.object&&ce.propertyName!=="modelData"?ce.object!==null&&(re&&re.contains(ce.object)?re.get(ce.object).each(function(pe){x.lb(pe)&&z.add(pe)}):ce.object instanceof ar||x.ri()&&x.Jc(ce.object)||wx(x,ce.object).each(function(pe){z.add(pe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(x.wa(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(x.wa(ce)),y&&z.add(ce)}),a="",E&&(a+=`,
|
|
|
"modelData": `+xy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+bf(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+bf(this,z.Fa(),!0)),0<ue.count&&(a+=(y?this.Wv:this.Yv)+bf(this,ue.Fa(),!0)),ue.clear(),oe.clear(),a},De.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)&&zt("applyIncrementalJson cannot change Model properties"),Sx(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Hi;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)},De.$x=function(a,y){a.change!==Na&&zt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof So?(y===void 0&&(y=fm(this,this)),Px(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 }'},De.yA=function(a,y){return this.$x(a,y)},De.np=function(a){return a===void 0&&(a=fm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},De.toJSON=function(a){return this.np(a)},De.Zw=function(a){var y=null;if(typeof a=="string")try{y=ct.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:zt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&zt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},De.Ky=function(a){return this.Zw(a)},ar.constructGraphLinksModel=function(){return new ar},De=ar.prototype,De.dm=function(a){if(fn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(tn(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:zt("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(tn(a)){for(y in a)if(x=a[y],tn(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 $n,E=0;E<x.length/2;E++)b.add(new st(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return AS(a)}return a},De.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()):fn(a)?bf(this,a):tn(a)?xy(this,a):typeof a=="function"?"null":a.toString()};function bf(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new mr;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 Cx(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function bu(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function xy(a,y){var x=y;if(x instanceof st)y={class:"go.Point",x:bu(x.x),y:bu(x.y)};else if(x instanceof fi)y={class:"go.Size",width:bu(x.width),height:bu(x.height)};else if(x instanceof Bn)y={class:"go.Rect",x:bu(x.x),y:bu(x.y),width:bu(x.width),height:bu(x.height)};else if(x instanceof pr)y={class:"go.Margin",top:bu(x.top),right:bu(x.right),bottom:bu(x.bottom),left:bu(x.left)};else if(x instanceof Qi)x.sb()?y={class:"go.Spot",x:bu(x.x),y:bu(x.y),offsetX:bu(x.offsetX),offsetY:bu(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof da){if(y={class:"go.Brush",type:x.type.name},x.type===Gh?y.color=x.color:(x.type===Bh||x.type===Nc)&&(y.start=x.start,y.end=x.end,x.type===Nc&&(x.startRadius!==0&&(y.startRadius=bu(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=bu(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 nn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=bu(x.startX)),x.startY!==0&&(y.startY=bu(x.startY)),x.endX!==0&&(y.endX=bu(x.endX)),x.endY!==0&&(y.endY=bu(x.endY)),x.spot1.D(Us)||(y.spot1=x.spot1),x.spot2.D(Nn)||(y.spot2=x.spot2),x.type===nn.o&&(y.path=nn.ia(x))):x instanceof Jt&&(y={class:"go.EnumValue",classType:fm(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Qs(y,b);if(!Cx(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof $n){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 Fu(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function AS(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 st(Fu(a.x),Fu(a.y));else if(y==="Size")x=new fi(Fu(a.width),Fu(a.height));else if(y==="Rect")x=new Bn(Fu(a.x),Fu(a.y),Fu(a.width),Fu(a.height));else if(y==="Margin")x=new pr(Fu(a.top),Fu(a.right),Fu(a.bottom),Fu(a.left));else if(y==="Spot")typeof a.enum=="string"?x=gl(a.enum):x=new Qi(Fu(a.x),Fu(a.y),Fu(a.offsetX),Fu(a.offsetY));else if(y==="Brush"){if(x=new da,x.type=gi(da,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Qi&&(x.start=a.start),a.end instanceof Qi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Fu(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Fu(a.endRadius)),a=a.colorStops,tn(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=nn.parse(a.path):x=new nn,x.type=gi(nn,a.type),typeof a.startX=="number"&&(x.startX=Fu(a.startX)),typeof a.startY=="number"&&(x.startY=Fu(a.startY)),typeof a.endX=="number"&&(x.endX=Fu(a.endX)),typeof a.endY=="number"&&(x.endY=Fu(a.endY)),a.spot1 instanceof Qi&&(x.spot1=a.spot1),a.spot2 instanceof Qi&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Py(E),typeof E=="function"&&(x=gi(E,a.name)));return x}De.Pe=function(a){return this.Lt.add(a),this},De.ik=function(a){this.Lt.remove(a)},De.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)},De.cb=function(a,y,x,E,b,z,ne){al(this,"",a,y,x,E,b,z,ne)},De.g=function(a,y,x,E,b){al(this,"",jo,a,this,y,x,E,b)},De.Fs=function(a,y,x,E,b,z){al(this,"",jo,y,a,x,E,b,z)};function al(a,y,x,E,b,z,ne,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var ue=new gr;ue.model=a,ue.change=x,ue.modelChange=y,ue.propertyName=E,ue.object=b,ue.oldValue=z,ue.oldParam=re,ue.newValue=ne,ue.newParam=oe,a.ds(ue)}ar.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===jo){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)),hs(x,E,b)}else a.change===Sa?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,tn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Di(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&zi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!fn(E)&&a.propertyName&&(E=Qs(a.object,a.propertyName)),fn(E)&&typeof x=="number"&&(a=a.newValue,y?Di(E,x):zi(E,x,a))):zt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Ga?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,tn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&zi(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Di(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!fn(E)&&a.propertyName&&(E=Qs(a.object,a.propertyName)),fn(E)&&typeof x=="number"&&(a=a.oldValue,y?zi(E,x,a):Di(E,x))):zt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Na&&zt("unknown ChangedEvent: "+a.toString())},ar.prototype.Ea=function(a){return this.undoManager.Ea(a)},ar.prototype.eb=function(a){return this.undoManager.eb(a)},ar.prototype.Kf=function(){return this.undoManager.Kf()},ar.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}},De=ar.prototype,De.La=function(a,y){y===void 0&&(y=""),al(this,"SourceChanged",Na,y,a,null,null)},De.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;zt("Key value for node data "+a+" is not a number or a string: "+y)}}},De.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=Qs(a,x);E!==y&&this.hc(y)===null&&(hs(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),al(this,"nodeKey",jo,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else hs(a,x,y)}};function Ff(a){return typeof a=="number"||typeof a=="string"}De.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},De.hc=function(a){return a===null&&zt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Ff(a)?this.kb.I(a):null},De.$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))){hs(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;hs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;hs(a,y,x)}}}}},De.xf=function(a){a!==null&&(Ko(a),this.lb(a)||Ex(this,a,!0))};function Ex(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&&zt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,zi(a.Tc,E,y)),al(a,"nodeDataArray",Sa,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}De.Fy=function(a){if(fn(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)},De.cm=function(a){a!==null&&bx(this,a,!0)};function bx(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;Di(a.Tc,E)}al(a,"nodeDataArray",Ga,"nodeDataArray",a,y,null,E,null),a.qp(y)}De.nA=function(a){if(fn(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)},De.$z=function(a){if(a!==this.nodeDataArray&&fn(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()}},De.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof Un&&this.Vf.add(y,a))},De.Lv=function(){},De.fm=function(){},De.em=function(){},De.qp=function(){};function vd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Un,a.Vf.add(y,E)),E.add(x)}}function yd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Un&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function hm(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Un?a:null)}De.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ar.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):k0(this,a,!0),tn(a)&&Do(a),a};function k0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=k0(a,y[x],a.copiesArrayObjects);E.push(b)}return Do(E),E}if(x&&tn(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=Qs(y,E),ne=fm(a,z);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||z instanceof ar||z instanceof Oa||z instanceof So||z instanceof gr||(z=k0(a,z,!1)),hs(x,E,z)}return Do(x),x}return y instanceof st||y instanceof fi||y instanceof Bn||y instanceof Qi||y instanceof pr?y.copy():y}ar.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!Fx&&a instanceof Ut&&(Fx=!0,xi('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),xi(" Is that really your intent?"));var E=Qs(a,y);E!==x&&(hs(a,y,x),this.Fs(a,y,E,x))},De=ar.prototype,De.set=function(a,y,x){this.setDataProperty(a,y,x)},De.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])}},De.Ay=function(a,y){this.ts(a,-1,y)},De.ts=function(a,y,x){0>y&&(y=a.length),zi(a,y,x),al(this,"",Sa,"",a,null,x,null,y)},De.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&zt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Di(a,y),al(this,"",Ga,"",a,x,null,y,null)},De.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Qs(a,y),y===void 0))return"";if(typeof y=="string")return y;zt("getCategoryForNodeData found a non-string category for "+a+": "+y)},De.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Qs(a,x);E===void 0&&(E=""),E!==y&&(hs(a,x,y),al(this,"nodeCategory",jo,x,a,E,y))}else hs(a,x,y)}},De.lm=function(a,y){this.jm(y,this.Ro(a))},De.Tl=function(){return!1},De.Wj=function(){return!1},De.ri=function(){return!1},De.xs=function(){return!1},De.Xj=function(){return!1};function Sy(){return new ar}function fm(a,y){if(typeof y=="function"){if(y.className)return y.className;if(y.name)return y.name}else if(typeof y=="object"&&y!==null&&y.constructor)return fm(a,y.constructor);return typeof y}function Py(a){return ed[a]?ed[a]:ct.go!==void 0&&ct.go[a]?ct.go[a]:null}function Qs(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 hs(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){}}wt.Object.defineProperties(ar.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===""&&zt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&zt("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];tn(b)||zt("Model.nodeDataArray must only contain Objects, not: "+b),Ko(b)}for(this.Tc=a,E=new $n,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(al(this,"nodeDataArray",jo,"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"}}}),ar.prototype.setCategoryForNodeData=ar.prototype.jm,ar.prototype.getCategoryForNodeData=ar.prototype.Ro,ar.prototype.removeArrayItem=ar.prototype.ov,ar.prototype.insertArrayItem=ar.prototype.ts,ar.prototype.addArrayItem=ar.prototype.Ay,ar.prototype.assignAllDataProperties=ar.prototype.Do,ar.prototype.set=ar.prototype.set,ar.prototype.clearUnresolvedReferences=ar.prototype.Qy,ar.prototype.mergeNodeDataArray=ar.prototype.$z,ar.prototype.removeNodeDataCollection=ar.prototype.nA,ar.prototype.removeNodeData=ar.prototype.cm,ar.prototype.addNodeDataCollection=ar.prototype.Fy,ar.prototype.addNodeData=ar.prototype.xf,ar.prototype.makeNodeDataKeyUnique=ar.prototype.$u,ar.prototype.findNodeDataForKey=ar.prototype.hc,ar.prototype.containsNodeData=ar.prototype.lb,ar.prototype.setKeyForNodeData=ar.prototype.km,ar.prototype.getKeyForNodeData=ar.prototype.wa,ar.prototype.updateTargetBindings=ar.prototype.La,ar.prototype.commit=ar.prototype.commit,ar.prototype.rollbackTransaction=ar.prototype.Kf,ar.prototype.commitTransaction=ar.prototype.eb,ar.prototype.startTransaction=ar.prototype.Ea,ar.prototype.raiseDataChanged=ar.prototype.Fs,ar.prototype.raiseChanged=ar.prototype.g,ar.prototype.raiseChangedEvent=ar.prototype.cb,ar.prototype.removeChangedListener=ar.prototype.ik,ar.prototype.addChangedListener=ar.prototype.Pe,ar.prototype.writeJsonValue=ar.prototype.sm,ar.prototype.replaceJsonObjects=ar.prototype.dm,ar.prototype.applyIncrementalJSON=ar.prototype.Ky,ar.prototype.applyIncrementalJson=ar.prototype.Zw,ar.prototype.toJSON=ar.prototype.toJSON,ar.prototype.toJson=ar.prototype.np,ar.prototype.toIncrementalJSON=ar.prototype.yA,ar.prototype.toIncrementalJson=ar.prototype.$x,ar.prototype.toIncrementalData=ar.prototype.xA,ar.prototype.clear=ar.prototype.clear;var Fx=!1,ed={};ar.className="Model",ar.fromJSON=ar.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=ct.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:zt("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=Py(E)):(b=Py(E),b===null&&(b=ct[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof ar?y=a:zt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ar.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ar.safePropertyValue=Qs,ar.safePropertySet=hs,ed.Brush=da,ed.ChangedEvent=gr,ed.Geometry=nn,ed.Margin=pr,ed.Panel=si,ed.Point=st,ed.Rect=Bn,ed.Size=fi,ed.Spot=Qi,ed.Transaction=So,ed.UndoManager=Oa;function tl(a,y,x,E){Do(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=Mx,this.wk=null):(this.el=gm,this.wk=E),this.st=new Un}tl.prototype.copy=function(){var a=new tl;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},De=tl.prototype,De.qb=function(a){a.classType===tl&&(this.mode=a)},De.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},De.freeze=function(){return this._isFrozen=!0,this},De.ka=function(){return this._isFrozen=!1,this},De.Kx=function(a){return a===void 0&&(a=null),this.mode=gm,this.backConverter=a,this},De.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},De.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function Bx(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}De.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==="")xi("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Qs(y,E)),z!==void 0)if(b===null)x!==""&&hs(a,x,z);else try{if(x!==""){var ne=b(z,a);hs(a,x,ne)}else b(z,a)}catch(re){}}}},De.sp=function(a,y,x,E){if(this.el===gm){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,ne=a;if(b!==""&&(ne=Qs(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):hs(y,x,ne);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var ue=E.itemIndex,ce=E.panel.itemArray;oe.ov(ce,ue),oe.ts(ce,ue,ne)}}else try{if(x!==""){var pe=z(ne,y,oe);oe!==null?oe.setDataProperty(y,x,pe):hs(y,x,pe)}else{var we=z(ne,y,oe);if(we!==void 0&&oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Fe=E.itemIndex,Ie=E.panel.itemArray;oe.ov(Ie,Fe),oe.ts(Ie,Fe,we)}}}catch(ze){}}finally{this.st.remove(a)}}}},wt.Object.defineProperties(tl.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&In(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&In(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&In(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&In(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&In(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&In(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&In(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&In(this),this.el=a}}}),tl.prototype.updateSource=tl.prototype.sp,tl.prototype.updateTarget=tl.prototype.Mv,tl.prototype.ofModel=tl.prototype.dA,tl.prototype.ofObject=tl.prototype.cp,tl.prototype.makeTwoWay=tl.prototype.Kx;var DS="Binding",Mx=new Jt(tl,"OneWay",1),gm=new Jt(tl,"TwoWay",2);tl.className="Binding",tl.parseEnum=function(a,y){return function(x){return x=gi(a,x),x===null?y:x}},tl.toString=nr,tl.OneWay=Mx,tl.TwoWay=gm;function ia(a,y,x){ar.call(this),this.Vv=`,
|
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Un,this.wb=new Hi,this.Jh="",this.Ri=this.Ak=this.cl=null,this.lf="from",this.mf="to",this.fj=this.ej="",this.dj="category",this.je="",this.jl="isGroup",this.Je="group",this.Lm=!1,y!==void 0&&(this.linkDataArray=y),a!==void 0&&(fn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Zt(ia,ar),ia.constructGraphLinksModel=ar.constructGraphLinksModel,ia.prototype.cloneProtected=function(a){ar.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},De=ia.prototype,De.clear=function(){ar.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},De.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)+":"+nr(b)}for(y+=`
|
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+bc(this,b,!0)+"-->"+bc(this,b,!1)}return y},De.Qv=function(a,y){this.linkKeyProperty===""&&zt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ar.prototype.Qv.call(this,a,y),E=this,b=new Un,z=new Un,ne=new Un,re=this.vh;a.changes.each(function(ce){ce.model===E&&(ce.modelChange==="linkDataArray"?ce.change===Sa?b.add(ce.newValue):ce.change===Ga&&ne.add(ce.oldValue):E.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):ce.object instanceof ar||E.lb(ce.object)||Lx(E,ce.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(E.Ac(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(E.Ac(ce)),y&&z.add(ce)}),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<ue.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ue.Fa():x.removedLinkKeys=ue.Fa()),ue.clear(),oe.clear(),x},De.rm=function(){var a=ar.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},De.gp=function(a){ar.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)},De.Rv=function(){var a=ar.prototype.Rv.call(this),y=`,
|
|
|
"linkDataArray": `+bf(this,this.linkDataArray,!0);return a+y},De.kv=function(a){ar.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function Lx(a,y){for(var x=new Un,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];O0(a,y,b,b,x)}return x}De.Pv=function(a,y){this.linkKeyProperty===""&&zt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ar.prototype.Pv.call(this,a,y),E=this,b=new Un,z=new Un,ne=new Un,re=this.vh;a.changes.each(function(ce){ce.model===E&&(ce.modelChange==="linkDataArray"?ce.change===Sa?b.add(ce.newValue):ce.change===Ga&&ne.add(ce.oldValue):E.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):ce.object instanceof ar||E.lb(ce.object)||Lx(E,ce.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(E.Ac(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(E.Ac(ce)),y&&z.add(ce)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+bf(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+bf(this,z.Fa(),!0)),0<ue.count&&(a+=(y?this.Vv:this.Xv)+bf(this,ue.Fa(),!0)),ue.clear(),oe.clear(),a},De.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)&&zt("applyIncrementalJson cannot change Model properties"),ar.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]);Dx(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)},ia.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===jo){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),hs(x,E,b);return}}else if(a.change===Sa){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,tn(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===Ga){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,tn(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}}ar.prototype.changeState.call(this,a,y)}},De=ia.prototype,De.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),hs(x,this.nodeKeyProperty,a),this.xf(x))}return a}},De.yx=function(a){return bc(this,a,!0)},De.wv=function(a,y){wp(this,a,y,!0)},De.Bx=function(a){return bc(this,a,!1)},De.Bv=function(a,y){wp(this,a,y,!1)};function bc(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Qs(y,a),a!==void 0))){if(Ff(a))return a;zt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function wp(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=Qs(y,b);z!==x&&(yd(a,z,y),hs(y,b,x),a.hc(x)===null&&vd(a,x,y),al(a,E?"linkFromKey":"linkToKey",jo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else hs(y,b,x)}}De.zx=function(a){return T0(this,a,!0)},De.xv=function(a,y){Cp(this,a,y,!0)},De.Cx=function(a){return T0(this,a,!1)},De.Cv=function(a,y){Cp(this,a,y,!1)};function T0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Qs(y,a),y===void 0?"":y)}function Cp(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Qs(y,b);z===void 0&&(z=""),z!==x&&(hs(y,b,x),al(a,E?"linkFromPortId":"linkToPortId",jo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else hs(y,b,x)}}De.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=Qs(a,y),a===void 0?R0:a)},De.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Qs(a,x);if(E===void 0&&(E=R0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)yd(this,E[z],a);for(hs(a,x,y),b=y.length,z=0;z<b;z++){var ne=y[z];this.hc(ne)===null&&vd(this,ne,a)}al(this,"linkLabelKeys",jo,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else hs(a,x,y)}},De.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Qs(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&&vd(this,y,a),al(this,"linkLabelKeys",Sa,x,a,null,y,null,b)))}else zt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},De.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Qs(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(yd(this,y,a),al(this,"linkLabelKeys",Ga,x,a,y,null,b,null)))}else E!==void 0&&zt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},De.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;zt("Key value for link data "+a+" is not a number or a string: "+y)}}},De.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Qs(a,x);E!==y&&this.jh(y)===null&&(hs(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),al(this,"linkKey",jo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else hs(a,x,y)}},De.jh=function(a){return a===null&&zt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Ff(a)?this.wb.I(a):null},De.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))){hs(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;hs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;hs(a,y,x)}}}}},De.Jc=function(a){return a===null?!1:this.$f.contains(a)},De.fi=function(a){a!==null&&(Ko(a),this.Jc(a)||Nx(this,a,!0))};function Nx(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&&zt("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)),al(a,"linkDataArray",Sa,"linkDataArray",a,null,y,null,E),wy(a,y)}De.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)},De.bm=function(a){a!==null&&Ax(this,a,!0)};function Ax(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(al(a,"linkDataArray",Ga,"linkDataArray",a,y,null,E,null),x=bc(a,y,!0),yd(a,x,y),x=bc(a,y,!1),yd(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],yd(a,x,y)}De.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)},De.Zz=function(a){if(this.linkKeyProperty===""&&zt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&fn(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),Dx(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 wy(a,y){var x=bc(a,y,!0);x=a.Vl(x),a.hc(x)===null&&vd(a,x,y),x=bc(a,y,!1),x=a.Vl(x),a.hc(x)===null&&vd(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&&vd(a,x,y)}De.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):k0(this,a,!0),tn(a)&&(Do(a),this.lf!==""&&hs(a,this.lf,void 0),this.mf!==""&&hs(a,this.mf,void 0),this.je!==""&&hs(a,this.je,[])),a},De.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Qs(a,y)},De.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;zt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},De.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=Qs(a,x);E!==y&&(yd(this,E,a),hs(a,x,y),this.hc(y)===null&&vd(this,y,a),al(this,"nodeGroupKey",jo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else hs(a,x,y)}},ia.prototype.copyNodeData=function(a){return a===null?null:(a=ar.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Qs(a,this.Je)===void 0||hs(a,this.Je,void 0),a)},ia.prototype.setDataProperty=function(a,y,x){if(this.lb(a)){if(y===this.nodeKeyProperty){this.km(a,x);return}if(y===this.nodeCategoryProperty){this.jm(a,x);return}if(y===this.nodeGroupKeyProperty){this.mp(a,x);return}}else if(this.Jc(a)){if(y===this.linkFromKeyProperty){wp(this,a,x,!0);return}if(y===this.linkToKeyProperty){wp(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Cp(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Cp(this,a,x,!1);return}if(y===this.linkKeyProperty){this.Ks(a,x);return}if(y===this.linkCategoryProperty){this.lp(a,x);return}if(y===this.linkLabelKeysProperty){this.Ls(a,x);return}}var E=Qs(a,y);E!==x&&(hs(a,y,x),this.Fs(a,y,E,x))},De=ia.prototype,De.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&&Qs(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},De.jp=function(a,y){ar.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(bc(this,E,!0)===b){var ne=this.lf;hs(E,ne,z),al(this,"linkFromKey",jo,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)}if(bc(this,E,!1)===b&&(ne=this.mf,hs(E,ne,z),al(this,"linkToKey",jo,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,ue=0;ue<re;ue++)ne[ue]===b&&(ne[ue]=z,al(this,"linkLabelKeys",Sa,oe,E,b,z,ue,ue))}},De.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;hs(a,E,x),al(this,"nodeGroupKey",jo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},De.Lv=function(){ar.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)wy(this,a[x])},De.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Si();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;al(this,"nodeGroupKey",jo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(bc(this,E,!0)===a&&(b=this.lf,al(this,"linkFromKey",jo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),bc(this,E,!1)===a&&(b=this.mf,al(this,"linkToKey",jo,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&&(al(this,"linkLabelKeys",Sa,ne,E,a,a,re,re),x.push(E))}for(y=0;y<x.length;y++)yd(this,a,x[y]);Fi(x)}},De.em=function(a){ar.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&vd(this,y,a)},De.qp=function(a){ar.prototype.qp.call(this,a);var y=this.lh(a);yd(this,y,a)},De.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Qs(a,y),y===void 0))return"";if(typeof y=="string")return y;zt("getCategoryForLinkData found a non-string category for "+a+": "+y)},ia.prototype.getLinkCategoryForData=function(a){return this.ps(a)},ia.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Qs(a,x);E===void 0&&(E=""),E!==y&&(hs(a,x,y),al(this,"linkCategory",jo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else hs(a,x,y)}},ia.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},De=ia.prototype,De.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function Dx(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))}De.Wj=function(){return!0},De.ri=function(){return!0},De.xs=function(){return!0},De.Xj=function(){return!0},wt.Object.defineProperties(ia.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];tn(b)||zt("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Ko(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new $n,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 Un,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,al(this,"linkDataArray",jo,"linkDataArray",this,y,a),y=0;y<x;y++)wy(this,a[y])}}},linkKeyProperty:{get:function(){return this.Jh},set:function(a){var y=this.Jh;if(y!==a){this.Jh=a,this.wb.clear();for(var x=this.linkDataArray.length,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"}}}),ia.prototype.setCategoryForLinkData=ia.prototype.lp,ia.prototype.getCategoryForLinkData=ia.prototype.ps,ia.prototype.assignAllDataProperties=ia.prototype.Do,ia.prototype.setGroupKeyForNodeData=ia.prototype.mp,ia.prototype.getGroupKeyForNodeData=ia.prototype.lh,ia.prototype.isGroupForNodeData=ia.prototype.Yu,ia.prototype.copyLinkData=ia.prototype.Jo,ia.prototype.mergeLinkDataArray=ia.prototype.Zz,ia.prototype.removeLinkDataCollection=ia.prototype.lA,ia.prototype.removeLinkData=ia.prototype.bm,ia.prototype.addLinkDataCollection=ia.prototype.Ey,ia.prototype.addLinkData=ia.prototype.fi,ia.prototype.containsLinkData=ia.prototype.Jc,ia.prototype.makeLinkDataKeyUnique=ia.prototype.Bs,ia.prototype.findLinkDataForKey=ia.prototype.jh,ia.prototype.setKeyForLinkData=ia.prototype.Ks,ia.prototype.getKeyForLinkData=ia.prototype.Ac,ia.prototype.removeLabelKeyForLinkData=ia.prototype.Qx,ia.prototype.addLabelKeyForLinkData=ia.prototype.Bu,ia.prototype.setLabelKeysForLinkData=ia.prototype.Ls,ia.prototype.getLabelKeysForLinkData=ia.prototype.Ef,ia.prototype.setToPortIdForLinkData=ia.prototype.Cv,ia.prototype.getToPortIdForLinkData=ia.prototype.Cx,ia.prototype.setFromPortIdForLinkData=ia.prototype.xv,ia.prototype.getFromPortIdForLinkData=ia.prototype.zx,ia.prototype.setToKeyForLinkData=ia.prototype.Bv,ia.prototype.getToKeyForLinkData=ia.prototype.Bx,ia.prototype.setFromKeyForLinkData=ia.prototype.wv,ia.prototype.getFromKeyForLinkData=ia.prototype.yx,ia.prototype.clear=ia.prototype.clear;var R0=Object.freeze([]);ia.className="GraphLinksModel",ed.GraphLinksModel=ia,ar.constructGraphLinksModel=ar.constructGraphLinksModel=function(){return new ia},ar.initDiagramModel=Sy=function(){return new ia};function Bu(a,y){ar.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(fn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Zt(Bu,ar),Bu.constructGraphLinksModel=ar.constructGraphLinksModel,Bu.prototype.cloneProtected=function(a){ar.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},De=Bu.prototype,De.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)+":"+nr(b)}}return y},De.rm=function(){var a=ar.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},De.gp=function(a){ar.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},De.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&zt("applyIncrementalJson cannot change Model properties"),ar.prototype.fp.call(this,a)},De.Vl=function(a){return a},De.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;zt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},De.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=Qs(a,x);E!==y&&(yd(this,E,a),hs(a,x,y),this.hc(y)===null&&vd(this,y,a),al(this,"nodeParentKey",jo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else hs(a,x,y)}},De.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Qs(a,y),y===void 0)?"":typeof y=="string"?y:(zt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},Bu.prototype.getLinkCategoryForData=function(a){return this.ss(a)},Bu.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Qs(a,x);E===void 0&&(E=""),E!==y&&(hs(a,x,y),al(this,"parentLinkCategory",jo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else hs(a,x,y)}},Bu.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},Bu.prototype.copyNodeData=function(a){return a===null?null:(a=ar.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Qs(a,this.Ke)===void 0||hs(a,this.Ke,void 0),a)},Bu.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=Qs(a,y);E!==x&&(hs(a,y,x),this.Fs(a,y,E,x))},De=Bu.prototype,De.jp=function(a,y){ar.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},De.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;hs(a,E,x),al(this,"nodeParentKey",jo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},De.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Si();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;al(this,"nodeParentKey",jo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)yd(this,a,x[y]);Fi(x)}},De.em=function(a){ar.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&vd(this,y,a)},De.qp=function(a){ar.prototype.qp.call(this,a);var y=this.mh(a);yd(this,y,a)},De.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},De.Tl=function(){return!0},De.xs=function(){return!0},wt.Object.defineProperties(Bu.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"}}}),Bu.prototype.setParentLinkCategoryForNodeData=Bu.prototype.Ms,Bu.prototype.getParentLinkCategoryForNodeData=Bu.prototype.ss,Bu.prototype.setParentKeyForNodeData=Bu.prototype.qe,Bu.prototype.getParentKeyForNodeData=Bu.prototype.mh,Bu.className="TreeModel",ed.TreeModel=Bu;function Ds(a){ps.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=td,this.Ti=0,this.Zv=new st,this.Jp=this.me=0,this.Xr=new ym,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=td,this.K=Mu,this.nd=bp,this.hd=gy,this.tf=6,this.Nn=G0,a&&Object.assign(this,a)}Zt(Ds,ps),Ds.prototype.cloneProtected=function(a){ps.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},Ds.prototype.qb=function(a){a.classType===Ds?a===H0||a===W0||a===z0||a===Z0||a===bp?this.sorting=a:a===ig||a===Ep||a===Mu||a===Mf?this.direction=a:a===Qh||a===Bf||a===td||a===nd?this.arrangement=a:(a===_g||a===G0)&&(this.nodeDiameterFormula=a):ps.prototype.qb.call(this,a)},Ds.prototype.createNetwork=function(){return new Fp(this)},Ds.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 $n;y.addAll(a.iterator),a=new $n;var x=new $n,E=this.sort(y),b,z,ne=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,ue=this.radius;(!isFinite(ue)||0>=ue)&&(ue=NaN);var ce=this.aspectRatio;(!isFinite(ce)||0>=ce)&&(ce=1);var pe=this.startAngle;isFinite(pe)||(pe=0);var we=this.sweepAngle;if((!isFinite(we)||360<we||1>we)&&(we=360),y=this.spacing,isFinite(y)||(y=NaN),re===nd&&oe===_g?re=td:re===nd&&oe!==_g&&(re=this.arrangement),(this.direction===ig||this.direction===Ep)&&this.sorting!==bp){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===ig?(this.arrangement===nd&&a.reverse(),E=new $n,E.addAll(a),E.addAll(x)):(this.arrangement===nd&&x.reverse(),E=new $n,E.addAll(x),E.addAll(a))}oe=E.length;for(var Fe=z=b=0;Fe<E.length;Fe++){var Ie=pe+we*z*(this.direction===Mu?1:-1)/oe,ze=E.M(Fe).diameter;isNaN(ze)&&(ze=Lf(E.M(Fe),Ie)),360>we&&(Fe===0||Fe===E.length-1)&&(ze/=2),b+=ze,z++}if(isNaN(ue)||re===nd){if(isNaN(y)&&(y=6),re!==td&&re!==nd){for(z=-1/0,ne=0;ne<oe;ne++)Fe=E.M(ne),b=E.M(ne===oe-1?0:ne+1),isNaN(Fe.diameter)&&Lf(Fe,0),isNaN(b.diameter)&&Lf(b,0),z=Math.max(z,(Fe.diameter+b.diameter)/2);ne=z+y,re===Qh?ue=(z+y)/(2*Math.PI/oe):ue=_0(this,ne*(360<=we?oe:oe-1),ce,pe*Math.PI/180,we*Math.PI/180)}else ue=_0(this,b+(360<=we?oe:oe-1)*(re!==nd?y:1.6*y),ce,pe*Math.PI/180,we*Math.PI/180);z=ue*ce}else if(z=ue*ce,Fe=Cy(this,ue,z,pe*Math.PI/180,we*Math.PI/180),isNaN(y))(re===td||re===nd)&&(y=(Fe-b)/(360<=we?oe:oe-1));else if(re===td||re===nd)Fe=(Fe-b)/(360<=we?oe:oe-1),Fe<y?(ue=_0(this,b+y*(360<=we?oe:oe-1),ce,pe*Math.PI/180,we*Math.PI/180),z=ue*ce):y=Fe;else{for(ne=-1/0,b=0;b<oe;b++)Ie=E.M(b),ze=E.M(b===oe-1?0:b+1),isNaN(Ie.diameter)&&Lf(Ie,0),isNaN(ze.diameter)&&Lf(ze,0),ne=Math.max(ne,(Ie.diameter+ze.diameter)/2);ne+=y,b=_0(this,ne*(360<=we?oe:oe-1),ce,pe*Math.PI/180,we*Math.PI/180),b>ue?(ue=b,z=ue*ce):ne=Fe/(360<=we?oe:oe-1)}if(this.kw=re,this.lc=ue,this.Zm=ce,this.lw=pe,this.Wp=we,this.Ti=y,this.me=z,this.Jp=ne,y=E,E=this.kw,re=this.lc,ue=this.lw,ce=this.Wp,pe=this.Ti,we=this.me,oe=this.Jp,this.direction!==ig&&this.direction!==Ep||E!==nd)if(this.direction===ig||this.direction===Ep){switch(ne=0,E){case Bf:ne=180*j0(this,re,we,ue,oe)/Math.PI;break;case td:oe=y=0,ne=a.first(),ne!==null&&(y=Lf(ne,Math.PI/2)),ne=x.first(),ne!==null&&(oe=Lf(ne,Math.PI/2)),ne=180*j0(this,re,we,ue,pe+(y+oe)/2)/Math.PI;break;case Qh:ne=ce/y.length}if(this.direction===ig){switch(E){case Bf:vm(this,a,ue,Mf);break;case td:mm(this,a,ue,Mf);break;case Qh:pm(this,a,ce/2,ue,Mf)}switch(E){case Bf:vm(this,x,ue+ne,Mu);break;case td:mm(this,x,ue+ne,Mu);break;case Qh:pm(this,x,ce/2,ue+ne,Mu)}}else{switch(E){case Bf:vm(this,x,ue,Mf);break;case td:mm(this,x,ue,Mf);break;case Qh:pm(this,x,ce/2,ue,Mf)}switch(E){case Bf:vm(this,a,ue+ne,Mu);break;case td:mm(this,a,ue+ne,Mu);break;case Qh:pm(this,a,ce/2,ue+ne,Mu)}}}else switch(E){case Bf:vm(this,y,ue,this.direction);break;case td:mm(this,y,ue,this.direction);break;case Qh:pm(this,y,ce,ue,this.direction);break;case nd:Ix(this,y,ce,ue,this.direction)}else Ix(this,y,ce,ue-ce/2,Mu)}this.updateParts(),this.network=null,this.isValidLayout=!0};function pm(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 ue=E+(b===Mu?oe*x/(360<=z?re:re-1):-(oe*x)/re),ce=y.M(oe),pe=ne*Math.tan(ue)/a;pe=Math.sqrt((ne*ne+a*a*pe*pe)/(1+pe*pe)),ce.centerX=pe*Math.cos(ue),ce.centerY=pe*Math.sin(ue),ce.actualAngle=180*ue/Math.PI}}function mm(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 ue=y.M(oe),ce=y.M(oe===re-1?0:oe+1),pe=z*Math.sin(x);ue.centerX=b*Math.cos(x),ue.centerY=pe,ue.actualAngle=180*x/Math.PI,isNaN(ue.diameter)&&Lf(ue,0),isNaN(ce.diameter)&&Lf(ce,0),ue=j0(a,b,z,E===Mu?x:-x,(ue.diameter+ce.diameter)/2+ne),x+=E===Mu?ue:-ue}}function vm(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 ue=y.M(oe);ue.centerX=b*Math.cos(x),ue.centerY=z*Math.sin(x),ue.actualAngle=180*x/Math.PI,ue=j0(a,b,z,E===Mu?x:-x,ne),x+=E===Mu?ue:-ue}}function Ix(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new ym,360>x){for(z=E+(b===Mu?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,kx(a,y,x,E,b)}else Ox(a,y,x,E,b);a.Xr.commit(y)}function Ox(a,y,x,E,b){var z=a.lc,ne=a.Ti,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),ue=a.me*Math.sin(E*Math.PI/180),ce=y.Fa();if(ce.length===3)ce[0].centerX=z,ce[0].centerY=0,ce[1].centerX=ce[0].centerX-ce[0].width/2-ce[1].width/2-ne,ce[1].y=ce[0].y,ce[2].centerX=(ce[0].centerX+ce[1].centerX)/2,ce[2].y=ce[0].y-ce[2].height-ne;else if(ce.length===4)ce[0].centerX=z,ce[0].centerY=0,ce[2].centerX=-ce[0].centerX,ce[2].centerY=ce[0].centerY,ce[1].centerX=0,ce[1].y=Math.min(ce[0].y,ce[2].y)-ce[1].height-ne,ce[3].centerX=0,ce[3].y=Math.max(ce[0].y+ce[0].height+ne,ce[2].y+ce[2].height+ne);else{z=st.alloc();for(var pe=0;pe<ce.length&&(ce[pe].centerX=oe,ce[pe].centerY=ue,!(pe>=ce.length-1));pe++)Tx(a,oe,ue,ce,pe,b,z)||Rx(a,oe,ue,ce,pe,b,z),oe=z.x,ue=z.y;if(st.free(z),a.mj++,!(23<a.mj)){oe=ce[0].centerX,ue=ce[0].centerY,z=ce[ce.length-1].centerX,pe=ce[ce.length-1].centerY;var we=Math.abs(oe-z)-((ce[0].width+ce[ce.length-1].width)/2+ne),Fe=Math.abs(ue-pe)-((ce[0].height+ce[ce.length-1].height)/2+ne);ne=0,1>Math.abs(Fe)?Math.abs(oe-z)<(ce[0].width+ce[ce.length-1].width)/2&&(ne=0):ne=0<Fe?Fe:1>Math.abs(we)?0:we,oe=Math.abs(z)>Math.abs(pe)?0<z!=ue>pe:0<pe!=oe<z,(oe=b===Mu?oe:!oe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ce[ce.length-1].width),ne=Math.min(ne,-ce[ce.length-1].height)),a.Xr.compare(ne,ce),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ce.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*re,Ox(a,y,x,E,b))}}}function kx(a,y,x,E,b){for(var z=a.lc,ne=a.me,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),ue=ne*Math.sin(E*Math.PI/180),ce=st.alloc(),pe=y.Fa(),we=0;we<pe.length&&(pe[we].centerX=oe,pe[we].centerY=ue,!(we>=pe.length-1));we++)Tx(a,oe,ue,pe,we,b,ce)||Rx(a,oe,ue,pe,we,b,ce),oe=ce.x,ue=ce.y;if(st.free(ce),a.mj++,!(23<a.mj)){if(oe=Math.atan2(ue,oe),oe=b===Mu?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,kx(a,y,x,E,b))}}function Tx(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,ue=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ce=!1;if(0<=x!=(z===Mu)){if(z=y+a,z>re){if(z=y-a,z<-re)return ne.x=z,ne.y=ue,!1;ce=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ne.x=z,ne.y=ue,!1;ce=!0}return ue=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==ce&&(ue=-ue),Math.abs(x-ue)>(E[b].height+E[b+1].height)/2?(ne.x=z,ne.y=ue,!1):(ne.x=z,ne.y=ue,!0)}function Rx(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,ue=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Mu)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ne.x=ue,ne.y=z;return}E=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ne.x=ue,ne.y=z;return}E=!0}ue=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==E&&(ue=-ue),ne.x=ue,ne.y=z}Ds.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Ds.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 st(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))},Ds.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Cy(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,ue=0;ue<=z;ue++){E!==void 0&&b!==void 0?oe=E+ue*b/z:oe=ue*Math.PI/(2*z);var ce=Math.sin(oe);ne+=Math.sqrt(1-a*a*ce*ce)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function _0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?Cy(a,1,x,E,b):Cy(a,1,x))}function j0(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}}Ds.prototype.sort=function(a){switch(this.sorting){case z0:break;case Z0:a.reverse();break;case H0:a.sort(this.comparer);break;case W0:a.sort(this.comparer),a.reverse();break;case bp:return this.ak(IS(a));default:zt("Invalid sorting type.")}return a};function IS(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new $n;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}Ds.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 $n;for(var oe=0,ue=0;ue<y.length;ue++){var ce=y[ue].length;if(ce===1)E.push(ue);else if(ce===0)b.add(a.M(ue));else{if(oe===0)x.push(ue);else{for(var pe=ce=1/0,we=-1,Fe=[],Ie=0;Ie<x.length;Ie++)0>y[x[Ie]].indexOf(x[Ie===x.length-1?0:Ie+1])&&Fe.push(Ie===x.length-1?0:Ie+1);if(Fe.length===0)for(Ie=0;Ie<x.length;Ie++)Fe.push(Ie);for(Ie=0;Ie<Fe.length;Ie++){for(var ze=Fe[Ie],gt=y[ue],nt=0,Et=0;Et<ne.length;Et++){var At=z[ne[Et]],Tt=z[re[Et]];if(At<Tt){var Vt=At;At=Tt}else Vt=Tt;if(Vt<ze&&ze<=At)for(Tt=0;Tt<gt.length;Tt++){var mn=gt[Tt];0>x.indexOf(mn)||Vt<z[mn]&&z[mn]<At||Vt===z[mn]||At===z[mn]||nt++}else for(Tt=0;Tt<gt.length;Tt++)mn=gt[Tt],0>x.indexOf(mn)||Vt<z[mn]&&z[mn]<At&&Vt!==z[mn]&&At!==z[mn]&&nt++}for(gt=nt,Et=nt=0;Et<y[ue].length;Et++)Vt=x.indexOf(y[ue][Et]),0<=Vt&&(Vt=Math.abs(ze-(Vt>=ze?Vt+1:Vt)),nt+=Vt<x.length+1-Vt?Vt:x.length+1-Vt);for(Et=0;Et<ne.length;Et++)Vt=z[ne[Et]],At=z[re[Et]],Vt>=ze&&Vt++,At>=ze&&At++,Vt>At&&(Tt=At,At=Vt,Vt=Tt),At-Vt<(x.length+2)/2==(Vt<ze&&ze<=At)&&nt++;(gt<ce||gt===ce&&nt<pe)&&(ce=gt,pe=nt,we=ze)}for(x.splice(we,0,ue),ce=0;ce<x.length;ce++)z[x[ce]]=ce;for(ce=0;ce<y[ue].length;ce++)pe=y[ue][ce],0<=x.indexOf(pe)&&(ne.push(ue),re.push(pe))}oe++}}for(ne=x.length;;){for(z=!0,re=0;re<E.length;re++)if(oe=E[re],ue=y[oe][0],ce=x.indexOf(ue),0<=ce){for(we=pe=0;we<y[ue].length;we++)Fe=x.indexOf(y[ue][we]),0>Fe||Fe===ce||(Ie=Fe>ce?Fe-ce:ce-Fe,pe+=Fe<ce!=Ie>ne-Ie?1:-1);x.splice(0>pe?ce:ce+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},wt.Object.defineProperties(Ds.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!==nd&&a!==td&&a!==Bf&&a!==Qh||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Mu&&a!==Mf&&a!==ig&&a!==Ep||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==z0&&a!==Z0&&a!==H0&&!W0&&a!==bp||(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!==G0&&a!==_g||(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 td=new Jt(Ds,"ConstantSpacing",0),Bf=new Jt(Ds,"ConstantDistance",1),Qh=new Jt(Ds,"ConstantAngle",2),nd=new Jt(Ds,"Packed",3),Mu=new Jt(Ds,"Clockwise",4),Mf=new Jt(Ds,"Counterclockwise",5),ig=new Jt(Ds,"BidirectionalLeft",6),Ep=new Jt(Ds,"BidirectionalRight",7),z0=new Jt(Ds,"Forwards",8),Z0=new Jt(Ds,"Reverse",9),H0=new Jt(Ds,"Ascending",10),W0=new Jt(Ds,"Descending",11),bp=new Jt(Ds,"Optimized",12),G0=new Jt(Ds,"Pythagorean",13),_g=new Jt(Ds,"Circular",14);Ds.className="CircularLayout",Ds.ConstantSpacing=td,Ds.ConstantDistance=Bf,Ds.ConstantAngle=Qh,Ds.Packed=nd,Ds.Clockwise=Mu,Ds.Counterclockwise=Mf,Ds.BidirectionalLeft=ig,Ds.BidirectionalRight=Ep,Ds.Forwards=z0,Ds.Reverse=Z0,Ds.Ascending=H0,Ds.Descending=W0,Ds.Optimized=bp,Ds.Pythagorean=G0,Ds.Circular=_g;function ym(){this.Pl=-1/0,this.tm=this.mk=null}ym.prototype.compare=function(a,y){if(0<a&&0>this.Pl||Math.abs(a)<Math.abs(this.Pl)&&!(0>a&&0<this.Pl))for(this.Pl=a,this.mk=[],this.tm=[],a=0;a<y.length;a++)this.mk[a]=y[a].bounds.x,this.tm[a]=y[a].bounds.y},ym.prototype.commit=function(a){if(this.mk!==null&&this.tm!==null)for(var y=0;y<this.mk.length;y++){var x=a.M(y);x.x=this.mk[y],x.y=this.tm[y]}},ym.className="VertexArrangement";function Fp(a){qa.call(this,a)}Zt(Fp,qa),Fp.prototype.createVertex=function(){return new xm(this)},Fp.prototype.createEdge=function(){return new $0(this)},Fp.className="CircularNetwork";function xm(a){cl.call(this,a),this.u=this.Si=NaN}Zt(xm,cl);function Lf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===nd)if(x.nodeDiameterFormula===_g)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===_g?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}wt.Object.defineProperties(xm.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)}}}),xm.className="CircularVertex";function $0(a){hc.call(this,a)}Zt($0,hc),$0.className="CircularEdge";function tu(a){ps.call(this),this.ah=null,this.An=0,this.$d=new fi(100,100).freeze(),this.Bm=!1,this.sf=!0,this.td=!1,this.dl=100,this.$m=1,this.Zf=1e3,this.In=10,this.fo=Math,this.Hk=.05,this.Gk=50,this.Ek=150,this.Fk=0,this.Vm=10,this.Um=5,a&&Object.assign(this,a)}Zt(tu,ps),tu.prototype.cloneProtected=function(a){ps.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},tu.prototype.createNetwork=function(){return new jg(this)},tu.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}_x(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 ue=Si(),ce=0;ce<re+y.vertexes.count+2;ce++)ue[ce]=null;re=0,ne.reset();for(var pe=Bn.alloc();ne.next();)if(ce=ne.value,this.computeBounds(ce,pe),oe)oe=!1,b=pe.x+pe.width/2,z=pe.y+pe.height/2,ue[0]=new st(pe.x+pe.width+E.width,pe.y),ue[1]=new st(pe.x,pe.y+pe.height+E.height),re=2;else{var we=jx(ue,re,b,z,pe.width,pe.height,E),Fe=ue[we],Ie=new st(Fe.x+pe.width+E.width,Fe.y),ze=new st(Fe.x,Fe.y+pe.height+E.height);for(we+1<re&&ue.splice(we+1,0,null),ue[we]=Ie,ue[we+1]=ze,re++,we=Fe.x-pe.x,Fe=Fe.y-pe.y,ce=ce.vertexes.iterator;ce.next();)Ie=ce.value,Ie.centerX+=we,Ie.centerY+=Fe}for(Bn.free(pe),ce=y.vertexes.iterator;ce.next();)ne=ce.value,we=ne.bounds,2>re?(b=we.x+we.width/2,z=we.y+we.height/2,ue[0]=new st(we.x+we.width+E.width,we.y),ue[1]=new st(we.x,we.y+we.height+E.height),re=2):(oe=jx(ue,re,b,z,we.width,we.height,E),pe=ue[oe],Fe=new st(pe.x+we.width+E.width,pe.y),we=new st(pe.x,pe.y+we.height+E.height),oe+1<re&&ue.splice(oe+1,0,null),ue[oe]=Fe,ue[oe+1]=we,re++,ne.centerX=pe.x+ne.width/2,ne.centerY=pe.y+ne.height/2);for(Fi(ue),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)}}Zx(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},tu.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},tu.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 _x(a,y,x){if(OS(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=kS(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,_x(a,y+1,x),Zx(a,z),TS(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++)RS(a,y[x]);a.Zf=E}}function OS(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 kS(a,y){for(var x=a.network,E=new jg(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var ne=new Hx;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 $n),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 $n,b.Hj=re),re.add(ne),b.Vd--,b.sh+=ne.sh):ne.network===E&&(re=ne.Hj,re===null&&(re=new $n,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,tt.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 ue=re=0,ce=oe.count-ne;ce<oe.count;ce++){var pe=oe.M(ce),we=null;for(z=pe.edges.iterator;z.next();){var Fe=z.value;if(Fe.Ax(pe)===b){we=Fe;break}}we!==null&&(ue+=we.length,re+=pe.width*pe.height)}z=b.centerX,oe=b.centerY,ce=b.width,pe=b.height,we=b.focus,Fe=ce*pe,1>Fe&&(Fe=1),re=tt.sqrt((re+Fe+ue*ue*4/(ne*ne))/Fe),ne=(re-1)*ce/2,re=(re-1)*pe/2,b.bounds=new Bn(z-we.x-ne,oe-we.y-re,ce+2*ne,pe+2*re),b.focus=new st(we.x+ne,we.y+re)}}return a.network=E,x}function TS(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 Bn(E.centerX-z,E.centerY-ne,b.Ss,b.Qs),E.focus=new st(z,ne),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function RS(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=tt.sqrt(z*z+ne*ne)/2;for(var re=!1,oe=ne=0,ue=0,ce=y.vertexes.iterator;ce.next();){var pe=ce.value;1>=pe.Vd?oe++:(re=!0,ue++,ne+=Math.atan2(y.centerY-pe.centerY,y.centerX-pe.centerX))}if(oe!==0){for(0<ue&&(ne/=ue),ue=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(ue=y/2),1<x.count&&x.sort(function(Fe,Ie){return Fe===null||Ie===null||Fe===Ie?0:Ie.width*Ie.height-Fe.width*Fe.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(ce=null,pe=oe.edges.iterator;pe.next();){ce=pe.value;break}pe=oe.width;var we=oe.height;pe=tt.sqrt(pe*pe+we*we)/2,ce=z+ce.length+pe,pe=ne+(y*(re/2>>1)+ue)*(re%2===0?1:-1),oe.centerX=E+ce*Math.cos(pe),oe.centerY=b+ce*Math.sin(pe),re++}}}}function jx(a,y,x,E,b,z,ne){var re=9e19,oe=-1,ue=0;e:for(;ue<y;ue++){var ce=a[ue],pe=ce.x-x,we=ce.y-E;if(pe=pe*pe+we*we,pe<re){for(we=ue-1;0<=we;we--)if(a[we].y>ce.y&&a[we].x-ce.x<b+ne.width)continue e;for(we=ue+1;we<y;we++)if(a[we].x>ce.x&&a[we].y-ce.y<z+ne.height)continue e;oe=ue,re=pe}}return oe}tu.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},tu.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 zx(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,tt.sqrt(x*x+a*a)):a+x<y?(E=E+b-ne,a=a+x-y,tt.sqrt(E*E+a*a)):ne-(E+b):E>ne+re?a>y+z?(x=E-ne-re,a=a-y-z,tt.sqrt(x*x+a*a)):a+x<y?(E=E-ne-re,a=a+x-y,tt.sqrt(E*E+a*a)):E-(ne+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function Zx(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,_S(a)););a.ah=null}function _S(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(ze,gt){return ze===null||gt===null||ze===gt?0:ze.centerX-gt.centerX}):y.sort(function(ze,gt){return ze===null||gt===null||ze===gt?0:ze.centerY-gt.centerY}),x=a.Zf;var ue=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 ce=E.y+re.y;E=ne.charge*a.electricalFieldX(oe,ce),ue=ne.charge*a.electricalFieldY(oe,ce),E+=ne.mass*a.gravitationalFieldX(oe,ce),ue+=ne.mass*a.gravitationalFieldY(oe,ce),ne.forceX+=E,ne.forceY+=ue;for(var pe=z+1;pe<y.length;pe++){var we=y[pe];if(we!==ne){E=we.bounds,re=we.focus,ue=E.x+re.x;var Fe=E.y+re.y;if(oe-ue>x||ue-oe>x){if(b)break}else if(ce-Fe>x||Fe-ce>x){if(!b)break}else{var Ie=zx(ne,we);1>Ie?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new K0),Ie=E.random(),re=E.random(),oe>ue?(E=Math.abs(we.bounds.right-ne.bounds.x),E=(1+E)*Ie):oe<ue?(E=Math.abs(we.bounds.x-ne.bounds.right),E=-(1+E)*Ie):(E=Math.max(we.width,ne.width),E=(1+E)*Ie-E/2),ce>Fe?(ue=Math.abs(we.bounds.bottom-ne.bounds.y),ue=(1+ue)*re):oe<ue?(ue=Math.abs(we.bounds.y-ne.bounds.bottom),ue=-(1+ue)*re):(ue=Math.max(we.height,ne.height),ue=(1+ue)*re-ue/2)):(re=-(ne.charge*we.charge)/(Ie*Ie),E=(ue-oe)/Ie*re,ue=(Fe-ce)/Ie*re),ne.forceX+=E,ne.forceY+=ue,we.forceX-=E,we.forceY-=ue}}}}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,ce=z.bounds,pe=z.focus,oe=ce.x+pe.x,ce=ce.y+pe.y,pe=zx(x,z),1>pe?(pe=a.randomNumberGenerator,pe===null&&(a.randomNumberGenerator=pe=new K0),re=pe.random(),pe=pe.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,ue=(ne>ce?1:-1)*(1+(z.height>x.height?z.height:x.height))*pe):(re=re.stiffness*(pe-re.length),E=(oe-E)/pe*re,ue=(ce-ne)/pe*re),x.forceX+=E,x.forceY+=ue,z.forceX-=E,z.forceY-=ue;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}tu.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},tu.prototype.moveFixedVertex=function(){},tu.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},tu.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Bi,y.toSpot=Bi)}},tu.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Bn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Bn.free(x)}x=Bn.alloc();for(var 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()}Bn.free(x)},tu.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},tu.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},tu.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},tu.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},tu.prototype.electricalFieldX=function(){return 0},tu.prototype.electricalFieldY=function(){return 0},tu.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},tu.prototype.gravitationalFieldX=function(){return 0},tu.prototype.gravitationalFieldY=function(){return 0},tu.prototype.isFixed=function(a){return a.isFixed},wt.Object.defineProperties(tu.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"&&zt('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())}}}),tu.className="ForceDirectedLayout";function Hx(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}Hx.className="ForceDirectedSubnet";function jg(a){qa.call(this,a)}Zt(jg,qa),jg.prototype.createVertex=function(){return new Sm(this)},jg.prototype.createEdge=function(){return new Pm(this)},jg.className="ForceDirectedNetwork";function Sm(a){cl.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}Zt(Sm,cl),wt.Object.defineProperties(Sm.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)}}}),Sm.className="ForceDirectedVertex";function Pm(a){hc.call(this,a),this.j=this.o=NaN}Zt(Pm,hc),wt.Object.defineProperties(Pm.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Pm.className="ForceDirectedEdge";function K0(){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()}K0.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},K0.className="RandomNumberGenerator";function za(a){ps.call(this),this.kc=this.ie=25,this.K=0,this.Dk=J0,this.Zk=Q0,this.Qk=q0,this.bj=4,this.rk=ev,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new st,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Zt(za,ps),za.prototype.cloneProtected=function(a){ps.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},za.prototype.qb=function(a){a.classType===za?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:zt("Unknown enum value: "+a):ps.prototype.qb.call(this,a)},za.prototype.createNetwork=function(){return new Mp(this)},za.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Cm&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Cm&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var 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,ue=0;if(E.link!==null){if(re=E.link,re===null)continue;var ce=b.node;if(ne=z.node,ce===null||ne===null)continue;var pe=re.fromNode;oe=re.toNode;for(var we=re.fromPort;we!==null&&!we.Ed();)we=we.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(E.rev){ue=pe;var Fe=we;pe=oe,we=re,oe=ue,re=Fe}var Ie=b.focus;ue=z.focus;var ze=E.rev?z.bounds:b.bounds;Fe=st.alloc(),ce!==pe?ze.w()&&pe.isVisible()?pe.actualBounds.w()?(Vh(pe,we,Io,Fe),Fe.x+=pe.actualBounds.x-ze.x,Fe.y+=pe.actualBounds.y-ze.y):(Vh(pe,we,Io,Fe),Fe.w()||Fe.assign(Ie)):Fe.assign(Ie):ze.w()?(Vh(pe,we,Io,Fe),Fe.w()||Fe.assign(Ie)):Fe.assign(Ie),pe=E.rev?b.bounds:z.bounds,ce=st.alloc(),ne!==oe?pe.w()&&oe.isVisible()?oe.actualBounds.w()?(Vh(oe,re,Io,ce),ce.x+=oe.actualBounds.x-pe.x,ce.y+=oe.actualBounds.y-pe.y):(Vh(oe,re,Io,ce),ce.w()||ce.assign(ue)):ce.assign(ue):pe.w()?(Vh(oe,re,Io,ce),ce.w()||ce.assign(ue)):ce.assign(ue),this.K===90||this.K===270?(ne=Math.round((Fe.x-Ie.x)/this.kc),oe=Fe.x,re=Math.round((ce.x-ue.x)/this.kc),ue=ce.x):(ne=Math.round((Fe.y-Ie.y)/this.kc),oe=Fe.y,re=Math.round((ce.y-ue.y)/this.kc),ue=ce.y),st.free(Fe),st.free(ce),E.portFromColOffset=ne,E.portFromPos=oe,E.portToColOffset=re,E.portToPos=ue}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Fe=b.layer,ce=z.layer,pe=0,ze=E.link,ze!==null){var gt=ze.fromPort,nt=ze.toPort;if(gt!==null&&nt!==null){var Et=ze.fromNode;if(we=ze.toNode,Et!==null&&we!==null){var At=X0(this,!0),Tt=X0(this,!1),Vt=this.setsPortSpots?At:ze.computeSpot(!0,gt);Ie=this.setsPortSpots?Tt:ze.computeSpot(!1,nt);var mn=ze.isOrthogonal;Vt.$c()&&Vt.Hf(Tt)&&Ie.$c()&&Ie.Hf(At)?pe=0:(At=ze.getLinkPoint(Et,gt,Vt,!0,mn,we,nt,st.alloc()),Tt=ze.getLinkDirection(Et,gt,At,Vt,!0,mn,we,nt),st.free(At),Vt.ys()||Tt!==Jx(this,E,!0)?this.setsPortSpots&&Et!==null&&Et.ports.count===1&&E.rev&&(pe+=1):pe+=1,Vt=ze.getLinkPoint(we,nt,Ie,!1,mn,Et,gt,st.alloc()),ze=ze.getLinkDirection(we,nt,Vt,Ie,!1,mn,Et,gt),st.free(Vt),Ie.ys()||ze!==Jx(this,E,!1)?this.setsPortSpots&&we!==null&&we.ports.count===1&&E.rev&&(pe+=2):pe+=2)}}}if(we=pe,pe=we===1||we===3,(we=we===2||we===3)&&(Ie=a.createVertex(),Ie.node=null,Ie.Dj=1,Ie.layer=Fe,Ie.near=b,a.dh(Ie),b=a.Zj(b,Ie,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ne,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=Ie),ze=1,pe&&ze--,Fe-ce>ze&&0<Fe){for(E.valid=!1,Ie=a.createVertex(),Ie.node=null,Ie.Dj=2,Ie.layer=Fe-1,a.dh(Ie),b=a.Zj(b,Ie,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=we?0:ne,b.portToColOffset=0,b.portFromPos=we?0:oe,b.portToPos=0,b=Ie,Fe--;Fe-ce>ze&&0<Fe;)Ie=a.createVertex(),Ie.node=null,Ie.Dj=3,Ie.layer=Fe-1,a.dh(Ie),b=a.Zj(b,Ie,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Ie,Fe--;b=a.Zj(Ie,z,E.link),b.valid=!pe,pe&&(Ie.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=re,b.portFromPos=0,b.portToPos=ue}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=Nf(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),Af(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},za.prototype.linkMinLength=function(){return 1};function Ey(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}za.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},za.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 Hu(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 Ic(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 Wx(a,y,x){var E=Nf(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],ue=oe.near;if(ue!==null&&ue.layer===oe.layer)if(oe=ue.index,oe>ne)for(var ce=ne+1;ce<oe;ce++){var pe=E[ce];pe.near===ue&&pe.Dj===ue.Dj||re++}else for(ce=ne-1;ce>oe;ce--)pe=E[ce],pe.near===ue&&pe.Dj===ue.Dj||re++;var we;if(0<=x)for(oe=E[ne].sourceEdgesArrayAccess,ue=0;ue<oe.length;ue++){var Fe=oe[ue];if(Fe.valid&&Fe.fromVertex.layer!==y)for(pe=Fe.fromVertex.index,ce=Fe.portToPos,Fe=Fe.portFromPos,we=ue+1;we<oe.length;we++){var Ie=oe[we];if(Ie.valid&&Ie.fromVertex.layer!==y){var ze=Ie.fromVertex.index,gt=Ie.portToPos;Ie=Ie.portFromPos,ce<gt&&(pe>ze||pe===ze&&Fe>Ie)&&re++,gt<ce&&(ze>pe||ze===pe&&Ie>Fe)&&re++}}}if(0>=x){for(oe=E[ne].destinationEdgesArrayAccess,ue=0;ue<oe.length;ue++)if(Fe=oe[ue],Fe.valid&&Fe.toVertex.layer!==y)for(pe=Fe.toVertex.index,ce=Fe.portToPos,Fe=Fe.portFromPos,we=ue+1;we<oe.length;we++)Ie=oe[we],Ie.valid&&Ie.toVertex.layer!==y&&(ze=Ie.toVertex.index,gt=Ie.portToPos,Ie=Ie.portFromPos,Fe<Ie&&(pe>ze||pe===ze&&ce>gt)&&re++,Ie<Fe&&(ze>pe||ze===pe&>>ce)&&re++)}for(z[ne*b+ne]=re,oe=ne+1;oe<b;oe++){var nt=0,Et=0;if(0<=x){re=E[ne].sourceEdgesArrayAccess;var At=E[oe].sourceEdgesArrayAccess;for(ue=0;ue<re.length;ue++)if(Fe=re[ue],Fe.valid&&Fe.fromVertex.layer!==y)for(pe=Fe.fromVertex.index,Fe=Fe.portFromPos,we=0;we<At.length;we++)Ie=At[we],Ie.valid&&Ie.fromVertex.layer!==y&&(ze=Ie.fromVertex.index,Ie=Ie.portFromPos,(pe<ze||pe===ze&&Fe<Ie)&&Et++,(ze<pe||ze===pe&&Ie<Fe)&&nt++)}if(0>=x){for(re=E[ne].destinationEdgesArrayAccess,At=E[oe].destinationEdgesArrayAccess,ue=0;ue<re.length;ue++)if(Fe=re[ue],Fe.valid&&Fe.toVertex.layer!==y)for(pe=Fe.toVertex.index,ce=Fe.portToPos,we=0;we<At.length;we++)Ie=At[we],Ie.valid&&Ie.toVertex.layer!==y&&(ze=Ie.toVertex.index,gt=Ie.portToPos,(pe<ze||pe===ze&&ce<gt)&&Et++,(ze<pe||ze===pe&><ce)&&nt++)}z[ne*b+oe]=nt,z[oe*b+ne]=Et}}return Af(a,y,E),z}za.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=Wx(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 V0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Nf(E,b),ne=E.tc[b],re=0,oe=0;oe<ne;oe++){var ue=z[oe].destinationEdgesArrayAccess;if(ue!==null)for(var ce=0;ce<ue.length;ce++){var pe=ue[ce];if(pe.valid&&pe.toVertex.layer!==b){var we=pe.fromVertex.column+pe.portFromColOffset,Fe=pe.toVertex.column+pe.portToColOffset;re+=(Math.abs(we-Fe)+1)*Ey(pe)}}}Af(E,b,z),y+=re}return y}za.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 by(a,y,x){for(var E=Nf(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var ue=null;0<=x&&(ue=re.destinationEdgesArrayAccess);var ce=0,pe=0,we=re.near;if(we!==null&&we.layer===re.layer&&(ce+=we.column-1,pe++),oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Fe=re.fromVertex;re.valid&&!re.rev&&Fe.layer!==y&&(ce+=Fe.column,pe++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(ce+=we.column,pe++);z[ne]=pe===0?-1:ce/pe}return Af(a,y,E),z}function Gx(a,y,x){for(var E=Nf(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var ue=null;0<=x&&(ue=re.destinationEdgesArrayAccess);var ce=0,pe=[],we=re.near;if(we!==null&&we.layer===re.layer&&(pe[ce]=we.column-1,ce++),re=void 0,oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Fe=re.fromVertex;re.valid&&!re.rev&&Fe.layer!==y&&(pe[ce]=Fe.column+re.portFromColOffset,ce++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(pe[ce]=we.column+re.portToColOffset,ce++);ce===0?z[ne]=-1:(pe.sort(function(Ie,ze){return Ie-ze}),ue=ce>>1,z[ne]=ce&1?pe[ue]:pe[ue-1]+pe[ue]>>1)}return Af(a,y,E),z}function wm(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,ue=y.layer-oe.layer;re=a.linkMinLength(re),ue===re&&wm(a,oe,x,E,b,z)}if(z)for(ne=y.sourceEdges;ne.next();)re=ne.value,oe=re.fromVertex,ue=oe.layer-y.layer,re=a.linkMinLength(re),ue===re&&wm(a,oe,x,E,b,z)}}function Fy(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();)Fy(a,ne.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)Fy(a,y.value.fromVertex,x,E,b,z)}}za.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Ly: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(;jS(a)!==null;){for(b=$x(a);b!==null;)E[x]=b,x--,b.valid=!1,b=$x(a);for(b=Kx(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Kx(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,ue=re.destinationEdges;ue.next();)ue.value.toVertex.valid&&oe++;ue=0;for(var ce=re.sourceEdges;ce.next();)ce.value.fromVertex.valid&&ue++;(b===null||z<oe-ue)&&(b=re,z=oe-ue)}}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 J0: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&&By(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&By(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 Cm: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 jS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function $x(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 Kx(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 By(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,By(a,b))}y.finish=a.Kn,a.Kn++}za.prototype.assignLayers=function(){switch(this.Zk){case Ny:Vx(this);break;case Ay:for(var a,y=this.network.vertexes.iterator;y.next();)a=Yx(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case Q0:for(Vx(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Xx(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 Vx(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Ux(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Ux(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,Ux(a,z)+b)}y.layer=x}else x=y.layer;return x}function Yx(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,Yx(a,z)+b)}y.layer=x}else x=y.layer;return x}function Xx(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Xx(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&&wm(a,re,0,-1,!0,!1)}for(wm(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 ue=ne.value;if(ue.component===1){var ce=0,pe=!1,we=ue.sourceEdgesArrayAccess;b=we.length;for(var Fe=0;Fe<b;Fe++){var Ie=we[Fe],ze=Ie.fromVertex;ce+=1,ze.component!==1&&(z+=1,ze=ze.layer-ue.layer,Ie=a.linkMinLength(Ie),E=Math.min(E,ze-Ie))}for(we=ue.destinationEdgesArrayAccess,b=we.length,Fe=0;Fe<b;Fe++)Ie=we[Fe].toVertex,--ce,Ie.component!==1?--z:pe=!0;(oe===null||ce<re)&&!pe&&(oe=ue,re=ce)}}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(wm(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(ue=0,ce=!1,we=ne.sourceEdgesArrayAccess,pe=we.length,Fe=0;Fe<pe;Fe++)Ie=we[Fe].fromVertex,ue+=1,Ie.component!==1?E+=1:ce=!0;for(we=ne.destinationEdgesArrayAccess,pe=we.length,Fe=0;Fe<pe;Fe++)Ie=we[Fe],ze=Ie.toVertex,--ue,ze.component!==1&&(--E,ze=ne.layer-ze.layer,Ie=a.linkMinLength(Ie),b=Math.min(b,ze-Ie));(re===null||ue>z)&&!ce&&(re=ne,z=ue)}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 Jx(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}za.prototype.initializeIndices=function(){switch(this.Qk){default:case Iy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case q0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&Qx(this,x);break;case Dy: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&&qx(this,x)}};function Qx(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&&Qx(a,E))}function qx(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&&qx(a,E))}za.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Hu(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)U0(this,E,1),Hc(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=Hu(this)),E=this.Ia;0<=E;E--)U0(this,E,-1),Hc(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=Hu(this))}for(Ic(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)U0(this,E,0),Hc(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=Hu(this)),E=this.Ia;0<=E;E--)U0(this,E,0),Hc(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=Hu(this))}Ic(this,y);var z,ne,re;switch(this.rk){case Oy:break;case ky: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=Hc(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,-1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,0)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,0)||z;b>=a?Ic(this,y):(a=b,y=Hu(this))}break;default:case ev: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=Hc(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,-1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,0)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,0)||z;b>=a?Ic(this,y):(a=b,y=Hu(this))}}Ic(this,y)};function U0(a,y,x){var E=Nf(a,y),b=a.tc[y],z=Gx(a,y,x),ne=by(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);Af(a,y,E)}function Hc(a,y,x){var E=Nf(a,y),b=a.tc[y];x=Wx(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,ue=!0;ue;)for(ue=!1,z=0;z<b-1;z++){var ce=x[E[z].index*b+E[z+1].index],pe=x[E[z+1].index*b+E[z].index],we=0,Fe=0,Ie=E[z].column,ze=E[z+1].column,gt=a.nodeMinColumnSpace(E[z],!0),nt=a.nodeMinColumnSpace(E[z],!1),Et=a.nodeMinColumnSpace(E[z+1],!0),At=a.nodeMinColumnSpace(E[z+1],!1);gt=Ie-gt+Et,nt=ze-nt+At;var Tt=E[z].sourceEdges.iterator;for(Tt.reset();Tt.next();)if(Et=Tt.value,At=Et.fromVertex,Et.valid&&At.layer===y){for(Et=0;E[Et]!==At;)Et++;Et<z&&(we+=2*(z-Et),Fe+=2*(z+1-Et)),Et===z+1&&(we+=1),Et>z+1&&(we+=4*(Et-z),Fe+=4*(Et-(z+1)))}for(Tt=E[z].destinationEdges.iterator,Tt.reset();Tt.next();)if(Et=Tt.value,At=Et.toVertex,Et.valid&&At.layer===y){for(Et=0;E[Et]!==At;)Et++;Et===z+1&&(Fe+=1)}for(Tt=E[z+1].sourceEdges.iterator,Tt.reset();Tt.next();)if(Et=Tt.value,At=Et.fromVertex,Et.valid&&At.layer===y){for(Et=0;E[Et]!==At;)Et++;Et<z&&(we+=2*(z+1-Et),Fe+=2*(z-Et)),Et===z&&(Fe+=1),Et>z+1&&(we+=4*(Et-(z+1)),Fe+=4*(Et-z))}for(Tt=E[z+1].destinationEdges.iterator,Tt.reset();Tt.next();)if(Et=Tt.value,At=Et.toVertex,Et.valid&&At.layer===y){for(Et=0;E[Et]!==At;)Et++;Et===z&&(we+=1)}Et=At=0,Tt=ne[E[z].index];var Vt=re[E[z].index],mn=ne[E[z+1].index],bi=re[E[z+1].index];Tt!==-1&&(At+=Math.abs(Tt-Ie),Et+=Math.abs(Tt-nt)),Vt!==-1&&(At+=Math.abs(Vt-Ie),Et+=Math.abs(Vt-nt)),mn!==-1&&(At+=Math.abs(mn-ze),Et+=Math.abs(mn-gt)),bi!==-1&&(At+=Math.abs(bi-ze),Et+=Math.abs(bi-gt)),(Fe<we-.5||Fe===we&&pe<ce-.5||Fe===we&&pe===ce&&Et<At-.5)&&(ue=oe=!0,E[z].column=nt,E[z+1].column=gt,ce=E[z],E[z]=E[z+1],E[z+1]=ce)}for(z=0;z<b;z++)E[z].index=z;return Af(a,y,E),oe}za.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&VS)!==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=Bp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Bp(this,y,-1)||x;x=Bp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)My(this,y,1);for(y=this.Md-1;0<=y;y--)My(this,y,-1);My(this,this.Md,0)}if(a&&(eS(this,-1),eS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Bp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Bp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Bp(this,y,0)||x}}else WS(this)};function Bp(a,y,x){for(var E=!1;zS(a,y,x);)E=!0;return E}function zS(a,y,x){var E,b=Nf(a,y),z=a.tc[y],ne=by(a,y,-1);if(0<x)for(E=0;E<z;E++)ne[E]=-1;var re=by(a,y,1);if(0>x)for(E=0;E<z;E++)re[E]=-1;for(var oe=!1,ue=!0;ue;)for(ue=!1,E=0;E<z;E++){var ce=b[E].column,pe=a.nodeMinColumnSpace(b[E],!0),we=a.nodeMinColumnSpace(b[E],!1),Fe=0;0>E-1||ce-b[E-1].column-1>pe+a.nodeMinColumnSpace(b[E-1],!1)?Fe=ce-1:Fe=ce,pe=E+1>=z||b[E+1].column-ce-1>we+a.nodeMinColumnSpace(b[E+1],!0)?ce+1:ce;var Ie=we=0,ze=0;if(0>=x)for(var gt=b[E].sourceEdges.iterator;gt.next();){var nt=gt.value,Et=nt.fromVertex;if(nt.valid&&Et.layer!==y){var At=Ey(nt),Tt=nt.portFromColOffset;nt=nt.portToColOffset,Et=Et.column,we+=(Math.abs(ce+nt-(Et+Tt))+1)*At,Ie+=(Math.abs(Fe+nt-(Et+Tt))+1)*At,ze+=(Math.abs(pe+nt-(Et+Tt))+1)*At}}if(0<=x)for(gt=b[E].destinationEdges.iterator;gt.next();)nt=gt.value,Et=nt.toVertex,nt.valid&&Et.layer!==y&&(At=Ey(nt),Tt=nt.portFromColOffset,nt=nt.portToColOffset,Et=Et.column,we+=(Math.abs(ce+Tt-(Et+nt))+1)*At,Ie+=(Math.abs(Fe+Tt-(Et+nt))+1)*At,ze+=(Math.abs(pe+Tt-(Et+nt))+1)*At);nt=Tt=At=0,gt=ne[b[E].index],Et=re[b[E].index],gt!==-1&&(At+=Math.abs(gt-ce),Tt+=Math.abs(gt-Fe),nt+=Math.abs(gt-pe)),Et!==-1&&(At+=Math.abs(Et-ce),Tt+=Math.abs(Et-Fe),nt+=Math.abs(Et-pe)),Ie<we||Ie===we&&Tt<At?(ue=oe=!0,b[E].column=Fe):(ze<we||ze===we&&nt<At)&&(ue=oe=!0,b[E].column=pe)}return Af(a,y,b),a.normalize(),oe}function My(a,y,x){var E=Nf(a,y),b=a.tc[y],z=Gx(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),ue=a.nodeMinColumnSpace(E[x],!1),ce=0;if(ne[x]===-1)if(x===0&&x===b-1)ce=re;else if(x===0){var pe=E[x+1].column;pe-re===ue+a.nodeMinColumnSpace(E[x+1],!0)?ce=re-1:ce=re}else x===b-1?(pe=E[x-1].column,ce=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,ue=pe-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,ce=(oe+ue)/2|0);else x===0&&x===b-1?ce=ne[x]:x===0?(pe=E[x+1].column,ue=pe-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,ce=Math.min(ne[x],ue)):x===b-1?(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,ce=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,ue=pe-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,oe<ne[x]&&ne[x]<ue?ce=ne[x]:oe>=ne[x]?ce=oe:ue<=ne[x]&&(ce=ue));ce!==re&&(z=!0,E[x].column=ce)}Af(a,y,E),a.normalize()}function ZS(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 HS(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 eS(a,y){for(var x=0;x<=a.Ra;x++)for(;ZS(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;HS(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=Hu(a),z=V0(a);for(E=z+1;z<E;){E=z,tS(a,x,1);var ne=V0(a);ne>z?Ic(a,b):ne<z&&(z=ne,b=Hu(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=Hu(a),z=V0(a),E=z+1;z<E;)E=z,tS(a,x,-1),ne=V0(a),ne>z?Ic(a,b):ne<z&&(z=ne,b=Hu(a));a.normalize()}function tS(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&&(Fy(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 WS(a){for(var y=Si(),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 Un,GS(y,x);var z=null,ne=null,re=null,oe=null,ue=(a.ve&1)!==0,ce=(a.ve&2)!==0,pe=(a.ve&4)!==0,we=(a.ve&8)!==0;for(ue&&(a.verticalAlignment(y,x,!0),z=Y0(a,y,!0,!1)),y.reverse(),pe&&(a.verticalAlignment(y,x,!1),re=Y0(a,y,!1,!1)),E=Pr(y),b=E.next();!b.done;b=E.next())b.value.reverse();we&&(a.verticalAlignment(y,x,!1),oe=Y0(a,y,!1,!0)),y.reverse(),ce&&(a.verticalAlignment(y,x,!0),ne=Y0(a,y,!0,!0)),Fi(y),a.u(z,ne,re,oe),a.network.vertexes.each(function(Fe){var Ie=Si();ue&&Ie.push(z.get(Fe)),ce&&Ie.push(ne.get(Fe)),pe&&Ie.push(re.get(Fe)),we&&Ie.push(oe.get(Fe)),Ie.sort(function(gt,nt){return gt-nt});var ze=Ie.length;ze=(Ie[Math.floor((ze-1)/2)]+Ie[Math.ceil((ze-1)/2)])/2,Fi(Ie),Fe.zc=ze})}function GS(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 ue=re[oe];e:{if(ue.node===null){var ce=Ty(ue);if(0<ce.length){ce=ce[0].node===null;break e}}ce=!1}var pe=ce;if(oe===re.length-1||pe){for(ce=ne.length-1,pe&&(ce=Ty(ue)[0].index);z<=oe;){if(ue=re[z],!ue.bo){pe=[];for(var we=Pr(ue.sourceEdgesArrayAccess),Fe=we.next();!Fe.done;Fe=we.next())Fe=Fe.value,Fe.valid&&pe.push(Fe);ue.bo=pe}for(ue=Pr(ue.bo),pe=ue.next();!pe.done;pe=ue.next())pe=pe.value,we=pe.fromVertex.index,(we<b||we>ce)&&y.add(pe);z++}b=ce}}}za.prototype.verticalAlignment=function(a,y,x){$S(a),a=Pr(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Pr(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var ne=x?Ty(z):US(z),re=ne.length;if(0<re){ne.sort(function(pe,we){return pe.vi-we.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var ue=ne[re],ce=void 0;ce=x?tv(ue,z):tv(z,ue),!y.contains(ce)&&b<ue.vi&&(ue.align=z,z.root=ue.root,z.align=ue.root,b=ue.vi)}}}}};function $S(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 Y0(a,y,x,E){for(var b=a.K===90||a.K===270,z=Pr(y),ne=z.next();!ne.done;ne=z.next()){var re=Pr(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=Pr(y),re=z.next();!re.done;re=z.next()){re=Pr(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var ue=0,ce=oe;ce.align!==oe;){var pe=ce.align,we=ne?ce.width:ce.height,Fe=ne?pe.width:pe.height;if(x){var Ie=tv(ce,pe),ze=Ie.portFromPos,gt=Ie.portToPos;Ie.link!==null&&(ce.node&&ce.node!==Ie.link.fromNode&&(ze=ne?ce.focusX:ce.focusY),pe.node&&pe.node!==Ie.link.toNode&&(gt=ne?pe.focusX:pe.focusY))}else Ie=tv(pe,ce),ze=Ie.portToPos,gt=Ie.portFromPos,Ie.link!==null&&(ce.node&&ce.node!==Ie.link.toNode&&(ze=ne?ce.focusX:ce.focusY),pe.node&&pe.node!==Ie.link.fromNode&&(gt=ne?pe.focusX:pe.focusY));we=E?ce.qg+(we-ze)-(Fe-gt):ce.qg+ze-gt,pe.qg=we,ue=Math.min(ue,we),ce=ce.align}ce=oe;do ce.qg=ce.qg-ue,ce=ce.align;while(ce!==oe)}}for(x=Pr(y),ne=x.next();!ne.done;ne=x.next())for(z=Pr(ne.value),ne=z.next();!ne.done;ne=z.next())ne=ne.value,ne.root===ne&&nS(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=iS(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 Hi,y=Pr(y),ne=y.next();!ne.done;ne=y.next())for(x=Pr(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 nS(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=iS(E,x),z=b.root;nS(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 iS(a,y){var x=a.Tz;return a=a.vi,1>a&&zt("Could not determine previous vertex in layer"),y[x][a-1]}za.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Si(),b=Si(),z=1/0,ne=0;4>ne;ne++)if(y[ne]){var re=KS(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(ue){ue.value+=oe.delta}}(z)));Fi(E),Fi(b)};function KS(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}za.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=X0(this,!0),y=X0(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 X0(a,y){return a.K===270?y?bo:Or:a.K===90?y?Or:bo:a.K===180?y?ra:Ao:y?Ao:ra}za.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,ue=oe.layer,ce=oe.column|0;E?(ne=y.x+this.kc*ce,ue=this.Kd[ue]):(ne=this.Kd[ue],ue=y.y+this.kc*ce),oe.centerX=ne,oe.centerY=ue,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 st(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},za.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 Bn(0,0,x,Math.abs(this.Ta[0]))):y.push(new Bn(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Bn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Bn(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Bn(0,0,Math.abs(this.Ta[0]),x)):y.push(new Bn(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Bn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Bn(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},za.prototype.commitLayers=function(){},za.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 ue=y.computeSpot(!0,ne);oe=y.computeSpot(!1,re);var ce=x.fromVertex,pe=x.toVertex;if(x.valid)y.curve===Ec&&y.pointsCount===4&&(ce.column===pe.column&&this.alignOption===0?(x=y.getLinkPoint(b,ne,ue,!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&&ue===Ss&&(E=!0),re!==null&&oe===Ss&&(x=!0),(E||x)&&(oe=null,E&&(oe=y.getLinkPointFromPoint(b,ne,ne.ga(Io),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(Io),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(ce.layer===pe.layer)y.zf();else{var we=!1,Fe=!1,Ie=this.ie,ze=y.firstPickIndex+1;if(y.isOrthogonal){Fe=!0;var gt=y.pointsCount;4<gt&&y.points.removeRange(2,gt-3)}else if(y.curve===Ec)we=!0,gt=y.pointsCount,4<gt&&y.points.removeRange(2,gt-3),gt===4&&(ze=2);else{gt=y.pointsCount;var nt=ue===Ss,Et=oe===Ss;2<gt&&nt&&Et?y.points.removeRange(1,gt-2):3<gt&&nt&&!Et?y.points.removeRange(1,gt-3):3<gt&&!nt&&Et?y.points.removeRange(2,gt-2):4<gt&&!nt&&!Et&&y.points.removeRange(2,gt-3)}if(x.rev){for(;pe!==null&&ce!==pe;){var At=gt=null;for(nt=pe.sourceEdges.iterator;nt.next()&&(Et=nt.value,Et.link!==x.link||(gt=Et.fromVertex,At=Et.toVertex,gt.node!==null)););if(gt===null)break;if(gt!==ce){nt=y.i(ze-1).x,Et=y.i(ze-1).y;var Tt=gt.centerX,Vt=gt.centerY;if(Fe)this.K===180||this.K===0?ze===y.firstPickIndex+1?(y.m(ze++,nt,Et),y.m(ze++,nt,Vt)):(At!==null?At.centerY:Et)!==Vt&&(At=this.Ta[gt.layer-1]+this.Rf.x,y.m(ze++,At,Et),y.m(ze++,At,Vt)):ze===y.firstPickIndex+1?(y.m(ze++,nt,Et),y.m(ze++,Tt,Et)):(At!==null?At.centerX:nt)!==Tt&&(At=this.Ta[gt.layer-1]+this.Rf.y,y.m(ze++,nt,At),y.m(ze++,Tt,At));else if(ze===y.firstPickIndex+1){At=Math.max(10,this.he[pe.layer]);var mn=Math.max(10,this.Ld[pe.layer]);if(we)this.K===180?Tt<=pe.bounds.x?(pe=pe.bounds.x,y.m(ze++,pe-At,Vt),y.m(ze++,pe,Vt),y.m(ze++,pe+mn,Vt)):(y.m(ze++,Tt-At,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt+mn,Vt)):this.K===90?Vt>=pe.bounds.bottom?(pe=pe.bounds.y+pe.bounds.height,y.m(ze++,Tt,pe+mn),y.m(ze++,Tt,pe),y.m(ze++,Tt,pe-At)):(y.m(ze++,Tt,Vt+mn),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt-At)):this.K===270?Vt<=pe.bounds.y?(pe=pe.bounds.y,y.m(ze++,Tt,pe-At),y.m(ze++,Tt,pe),y.m(ze++,Tt,pe+mn)):(y.m(ze++,Tt,Vt-At),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt+mn)):this.K===0&&(Tt>=pe.bounds.right?(pe=pe.bounds.x+pe.bounds.width,y.m(ze++,pe+mn,Vt),y.m(ze++,pe,Vt),y.m(ze++,pe-At,Vt)):(y.m(ze++,Tt+mn,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt-At,Vt)));else{y.m(ze++,nt,Et);var bi=0;this.K===180||this.K===0?((this.K===180?Tt>=pe.bounds.right:Tt<=pe.bounds.x)&&(bi=(this.K===0?-At:mn)/2),y.m(ze++,nt+bi,Vt)):((this.K===270?Vt>=pe.bounds.bottom:Vt<=pe.bounds.y)&&(bi=(this.K===90?-At:mn)/2),y.m(ze++,Tt,Et+bi)),y.m(ze++,Tt,Vt)}}else At=Math.max(10,this.he[gt.layer]),mn=Math.max(10,this.Ld[gt.layer]),we?this.K===180?(y.m(ze++,Tt-At-Ie,Vt),y.m(ze++,Math.min(Tt-At+Ie/2,Tt),Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Math.max(Tt+mn-Ie/2,Tt),Vt),y.m(ze++,Tt+mn+Ie,Vt)):this.K===90?(y.m(ze++,Tt,Vt+mn+Ie),y.m(ze++,Tt,Math.max(Vt+mn-Ie/2,Vt)),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Math.min(Vt-At+Ie/2,Vt)),y.m(ze++,Tt,Vt-At-Ie)):this.K===270?(y.m(ze++,Tt,Vt-At-Ie),y.m(ze++,Tt,Math.min(Vt-At+Ie/2,Vt)),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Math.max(Vt+mn-Ie/2,Vt)),y.m(ze++,Tt,Vt+mn+Ie)):(y.m(ze++,Tt+mn+Ie,Vt),y.m(ze++,Math.max(Tt+mn-Ie/2,Tt),Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Math.min(Tt-At+Ie/2,Tt),Vt),y.m(ze++,Tt-At-Ie,Vt)):y.m(ze++,Tt,Vt)}pe=gt}(re===null||ue!==Ss||Fe)&&(nt=y.i(ze-1).x,Et=y.i(ze-1).y,Tt=y.i(ze).x,Vt=y.i(ze).y,Fe?(Ie=this.Ld[ce.layer],this.K===180||this.K===0?(Fe=Et,Fe>=ce.bounds.y&&Fe<=ce.bounds.bottom&&(this.K===180?Tt>=ce.bounds.x:Tt<=ce.bounds.right)&&(pe=ce.centerX+(this.K===180?-Ie:Ie),Fe<ce.bounds.y+ce.bounds.height/2?Fe=ce.bounds.y-this.kc/2:Fe=ce.bounds.bottom+this.kc/2,y.m(ze++,pe,Et),y.m(ze++,pe,Fe)),y.m(ze++,Tt,Fe)):(Fe=nt,Fe>=ce.bounds.x&&Fe<=ce.bounds.right&&(this.K===270?Vt>=ce.bounds.y:Vt<=ce.bounds.bottom)&&(pe=ce.centerY+(this.K===270?-Ie:Ie),Fe<ce.bounds.x+ce.bounds.width/2?Fe=ce.bounds.x-this.kc/2:Fe=ce.bounds.right+this.kc/2,y.m(ze++,nt,pe),y.m(ze++,Fe,pe)),y.m(ze++,Fe,Vt)),y.m(ze++,Tt,Vt)):we?(At=Math.max(10,this.he[ce.layer]),mn=Math.max(10,this.Ld[ce.layer]),this.K===180&&Tt>=ce.bounds.x?(pe=ce.bounds.x+ce.bounds.width,y.L(ze-2,pe,Et),y.L(ze-1,pe+mn,Et)):this.K===90&&Vt<=ce.bounds.bottom?(pe=ce.bounds.y,y.L(ze-2,nt,pe),y.L(ze-1,nt,pe-At)):this.K===270&&Vt>=ce.bounds.y?(pe=ce.bounds.y+ce.bounds.height,y.L(ze-2,nt,pe),y.L(ze-1,nt,pe+mn)):this.K===0&&Tt<=ce.bounds.right&&(pe=ce.bounds.x,y.L(ze-2,pe,Et),y.L(ze-1,pe-At,Et))):(At=Math.max(10,this.he[ce.layer]),mn=Math.max(10,this.Ld[ce.layer]),Fe=0,this.K===180||this.K===0?((this.K===180?Tt<=ce.bounds.x:Tt>=ce.bounds.right)&&(Fe=(this.K===0?mn:-At)/2),y.m(ze++,Tt+Fe,Et)):((this.K===270?Vt<=ce.bounds.y:Vt>=ce.bounds.bottom)&&(Fe=(this.K===90?mn:-At)/2),y.m(ze++,nt,Vt+Fe)),y.m(ze++,Tt,Vt)))}else{for(;ce!==null&&ce!==pe;){for(At=gt=null,ce=ce.destinationEdges.iterator;ce.next()&&(nt=ce.value,nt.link!==x.link||(gt=nt.toVertex,At=nt.fromVertex,At.node!==null&&(At=null),gt.node!==null)););if(gt===null)break;gt!==pe&&(nt=y.i(ze-1).x,Et=y.i(ze-1).y,Tt=gt.centerX,Vt=gt.centerY,Fe?this.K===180||this.K===0?(At!==null?At.centerY:Et)!==Vt&&(At=this.Ta[gt.layer]+this.Rf.x,ze===y.firstPickIndex+1&&(At=this.K===0?Math.max(At,nt):Math.min(At,nt)),y.m(ze++,At,Et),y.m(ze++,At,Vt)):(At!==null?At.centerX:nt)!==Tt&&(At=this.Ta[gt.layer]+this.Rf.y,ze===y.firstPickIndex+1&&(At=this.K===90?Math.max(At,Et):Math.min(At,Et)),y.m(ze++,nt,At),y.m(ze++,Tt,At)):(At=Math.max(10,this.he[gt.layer]),mn=Math.max(10,this.Ld[gt.layer]),we?this.K===180?(y.m(ze++,Tt+mn+Ie,Vt),y.m(ze++,Math.max(Tt+mn-Ie/2,Tt),Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Math.min(Tt-At+Ie/2,Tt),Vt),y.m(ze++,Tt-At-Ie,Vt)):this.K===90?(y.m(ze++,Tt,Vt-At-Ie),y.m(ze++,Tt,Math.min(Vt-At+Ie/2,Vt)),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Math.max(Vt+mn-Ie/2,Vt)),y.m(ze++,Tt,Vt+mn+Ie)):this.K===270?(y.m(ze++,Tt,Vt+mn+Ie),y.m(ze++,Tt,Math.max(Vt+mn-Ie/2,Vt)),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Math.min(Vt-At+Ie/2,Vt)),y.m(ze++,Tt,Vt-At-Ie)):(y.m(ze++,Tt-At-Ie,Vt),y.m(ze++,Math.min(Tt-At+Ie/2,Tt),Vt),y.m(ze++,Tt,Vt),y.m(ze++,Tt,Vt),y.m(ze++,Math.max(Tt+mn-Ie/2,Tt),Vt),y.m(ze++,Tt+mn+Ie,Vt)):this.K===180?(y.m(ze++,Tt+mn,Vt),y.m(ze++,Tt-At,Vt)):this.K===90?(y.m(ze++,Tt,Vt-At),y.m(ze++,Tt,Vt+mn)):this.K===270?(y.m(ze++,Tt,Vt+mn),y.m(ze++,Tt,Vt-At)):(y.m(ze++,Tt-At,Vt),y.m(ze++,Tt+mn,Vt)))),ce=gt}Fe&&(nt=y.i(ze-1).x,Et=y.i(ze-1).y,Tt=y.i(ze).x,Vt=y.i(ze).y,this.K===180||this.K===0?Et!==Vt&&(At=this.K===0?Math.min(Math.max((Tt+nt)/2,this.Ta[pe.layer]+this.Rf.x),Tt):Math.max(Math.min((Tt+nt)/2,this.Ta[pe.layer]+this.Rf.x),Tt),y.m(ze++,At,Et),y.m(ze++,At,Vt)):nt!==Tt&&(At=this.K===90?Math.min(Math.max((Vt+Et)/2,this.Ta[pe.layer]+this.Rf.y),Vt):Math.max(Math.min((Vt+Et)/2,this.Ta[pe.layer]+this.Rf.y),Vt),y.m(ze++,nt,At),y.m(ze++,Tt,At)))}E!==null&&we&&4<=y.pointsCount&&(ne!==null&&(ne=ue===Ss?y.getLinkPointFromPoint(b,ne,ne.ga(Io),y.i(3),!0):y.i(0),ue===Ss&&(ue=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ne.x+ue.x)/2,ue.y),y.L(2,E.x,(ue.y+E.y)/2)):(y.L(1,ue.x,(ne.y+ue.y)/2),y.L(2,(ue.x+E.x)/2,E.y))),ne.w()||ne.set(b.actualBounds.center),y.L(0,ne.x,ne.y)),re!==null&&(b=oe===Ss?y.getLinkPointFromPoint(z,re,re.ga(Io),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===Ss&&(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()},za.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new $n,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 Df;re.layer=Math.floor(z.y/2);var oe=E.i(0),ue=E.i(E.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=ue.x*ue.x+ue.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),ue=E.i(b+2);var ce=0;oe.y<z.y?ce=ue.y<z.y?3:z.x<ne.x?2:1:oe.y>z.y&&(ce=ue.y>z.y?0:ne.x<z.x?2:1),re.j=ce}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),ce=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(ce++,re=ue.jc);this.zi(x,this.Ux,z,z+ne);var pe=1;for(re=x[z].first,oe=z;oe<b;oe++)ue=x[oe],ue.first!==re&&(pe++,re=ue.first);for(oe=!0,ue=pe,ce<pe?(oe=!1,ue=ce,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ce=0,pe=z;pe<b;pe++){var we=x[pe];(oe?we.first:we.jc)!==re&&(ce++,re=oe?we.first:we.jc);var Fe=we.link;z=Fe.i(we.index),ne=Fe.i(we.index+1);var Ie=this.linkSpacing*(ce-(ue-1)/2);y++,Fe.uh(),Fe.L(we.index,z.x,z.y+Ie),Fe.L(we.index+1,ne.x,ne.y+Ie),Fe.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 Df,re.layer=Math.floor(z.x/2),oe=E.i(0),ue=E.i(E.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=ue.x+ue.y*ue.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),ue=E.i(b+2),ce=0,oe.x<z.x?ce=ue.x<z.x?3:z.y<ne.y?2:1:oe.x>z.x&&(ce=ue.x>z.x?0:ne.y<z.y?2:1),re.j=ce),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),ce=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(ce++,re=ue.jc);for(this.zi(x,this.Ux,z,z+ne),pe=1,re=x[z].first,oe=z;oe<b;oe++)ue=x[oe],ue.first!==re&&(pe++,re=ue.first);for(oe=!0,ue=pe,ce<pe?(oe=!1,ue=ce,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ce=0,pe=z;pe<b;pe++)we=x[pe],(oe?we.first:we.jc)!==re&&(ce++,re=oe?we.first:we.jc),Fe=we.link,z=Fe.i(we.index),ne=Fe.i(we.index+1),Ie=this.linkSpacing*(ce-(ue-1)/2),y++,Fe.uh(),Fe.L(we.index,z.x+Ie,z.y),Fe.L(we.index+1,ne.x+Ie,ne.y),Fe.zf()}z=b}a=E}}}},De=za.prototype,De.Vx=function(a,y){return a instanceof Df&&y instanceof Df&&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},De.Ux=function(a,y){return a instanceof Df&&y instanceof Df&&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},De.Js=function(a,y){return a instanceof Df&&y instanceof Df&&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},De.B=function(a,y){return a-=y,-1<a&&1>a},De.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&zt("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 Nf(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 Af(a,y,x){a.He[a.tc[y]]=x}wt.Object.defineProperties(za.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()):zt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Ly&&a!==J0&&a!==Cm||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==Q0&&a!==Ny&&a!==Ay||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==q0&&a!==Dy&&a!==Iy||(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!==Oy&&a!==ev&&a!==ky||(this.rk=a,this.C())}},packOption:{get:function(){return this.bg},set:function(a){this.bg!==a&&0<=a&&8>a&&(this.bg=a,this.C())}},alignOption:{get:function(){return this.ve},set:function(a){this.ve!==a&&0<=a&&16>a&&(this.ve=a,this.C())}},setsPortSpots:{get:function(){return this.sf},set:function(a){this.sf!==a&&(this.sf=a,this.C())}},linkSpacing:{get:function(){return this.Cn},set:function(a){this.Cn!==a&&0<=a&&(this.Cn=a,this.C())}},maxLayer:{get:function(){return this.Ia}},maxIndex:{get:function(){return this.Iq}},maxColumn:{get:function(){return this.Ra}},minIndexLayer:{get:function(){return this.Hn}},maxIndexLayer:{get:function(){return this.Md}}});var J0=new Jt(za,"CycleDepthFirst",0),Ly=new Jt(za,"CycleGreedy",1),Cm=new Jt(za,"CycleFromLayers",2),Q0=new Jt(za,"LayerOptimalLinkLength",0),Ny=new Jt(za,"LayerLongestPathSink",1),Ay=new Jt(za,"LayerLongestPathSource",2),q0=new Jt(za,"InitDepthFirstOut",0),Dy=new Jt(za,"InitDepthFirstIn",1),Iy=new Jt(za,"InitNaive",2),Oy=new Jt(za,"AggressiveNone",0),ev=new Jt(za,"AggressiveLess",1),ky=new Jt(za,"AggressiveMore",2),VS=8;za.className="LayeredDigraphLayout",za.CycleDepthFirst=J0,za.CycleGreedy=Ly,za.CycleFromLayers=Cm,za.LayerOptimalLinkLength=Q0,za.LayerLongestPathSink=Ny,za.LayerLongestPathSource=Ay,za.InitDepthFirstOut=q0,za.InitDepthFirstIn=Dy,za.InitNaive=Iy,za.AggressiveNone=Oy,za.AggressiveLess=ev,za.AggressiveMore=ky,za.PackNone=0,za.PackExpand=1,za.PackStraighten=2,za.PackMedian=4,za.PackAll=15,za.AlignNone=0,za.AlignUpperLeft=1,za.AlignUpperRight=2,za.AlignLowerLeft=4,za.AlignLowerRight=8,za.AlignAll=15;function Df(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Df.className="SegInfo";function Mp(a){qa.call(this,a)}Zt(Mp,qa),Mp.prototype.createVertex=function(){return new Oc(this)},Mp.prototype.createEdge=function(){return new Em(this)},Mp.className="LayeredDigraphNetwork";function Oc(a){cl.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}Zt(Oc,cl);function rS(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],E=Pr(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Pr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;zt("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=Pr(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(rS),a.co=y}return a.co}function US(a){if(!a.ao){for(var y=[],x=Pr(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(rS),a.ao=y}return a.ao}Oc.prototype.Cl=function(a){cl.prototype.Cl.call(this,a),this.bo=this.co=null},Oc.prototype.Kl=function(a){cl.prototype.Kl.call(this,a),this.bo=this.co=null},Oc.prototype.zl=function(a){cl.prototype.zl.call(this,a),this.$n=this.ao=null},Oc.prototype.Jl=function(a){cl.prototype.Jl.call(this,a),this.$n=this.ao=null},wt.Object.defineProperties(Oc.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)}}}),Oc.prototype.deleteDestinationEdge=Oc.prototype.Jl,Oc.prototype.addDestinationEdge=Oc.prototype.zl,Oc.prototype.deleteSourceEdge=Oc.prototype.Kl,Oc.prototype.addSourceEdge=Oc.prototype.Cl,Oc.className="LayeredDigraphVertex";function Em(a){hc.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Zt(Em,hc),wt.Object.defineProperties(Em.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)}}}),Em.className="LayeredDigraphEdge";function To(a){ps.call(this),this.Ub=new Un,this.Wn=ov,this.ud=ih,this.vo=sv,this.Bq=Vy,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new fi(10,10).freeze();var y=new Wg(this);this.W=new Wc(y),this.Y=new Wc(y),this.ru=[],a&&Object.assign(this,a)}Zt(To,ps),To.prototype.cloneProtected=function(a){ps.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)},To.prototype.qb=function(a){a.classType===To?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:zt("Unknown enum value: "+a):ps.prototype.qb.call(this,a)},To.prototype.createNetwork=function(){return new Wg(this)},To.prototype.makeNetwork=function(a){function y(E){if(E instanceof Ai)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof hi){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 gn?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof ho?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},To.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof gn&&(y=a),this.path===ov&&y!==null?this.ud=y.isTreePathToChildren?ih:Zg:this.ud=this.path===ov?ih: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 Un,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Ai?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Wc&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,Ry(this,y));for(y=this.network.vertexes,a=null;a=YS(y),0<a.count;)y=oS(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ry(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&sS(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&lS(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&uS(this,y);if(this.Cu(),this.layerStyle===cv){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===Uy)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 Wc&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Un,this.isValidLayout=!0};function YS(a){var y=new Un;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}To.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case ih:x.sourceEdges.count===0&&this.Ub.add(x);break;case Zg:x.destinationEdges.count===0&&this.Ub.add(x);break;default:zt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=oS(this,a),a!==null&&this.Ub.add(a))};function oS(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case ih:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Zg:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:zt("Unhandled path value "+a.ud.toString())}}return E}function Ry(a,y){if(y!==null){switch(a.ud){case ih:if(0<y.destinationEdges.count){for(var x=new $n,E=y.destinationVertexes;E.next();){var b=E.value;aS(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Zg:if(0<y.sourceEdges.count){for(x=new $n,E=y.sourceVertexes;E.next();)b=E.value,aS(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:zt("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++)Ry(a,x[y])}}function aS(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}To.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 sS(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===ah&&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];sS(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 XS(a,y){switch(a.vo){default:case sv:return y.parent!==null?y.parent:a.W;case $y:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Gy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Wy: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}}To.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(XS(this,a)),a.parent!==null&&a.parent.alignment===ah){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 lS(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lS(a,y[E])}}To.prototype.assignTreeVertexValues=function(){};function uS(a,y){if(y!==null){y.alignment!==ah&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)uS(a,y[E])}}To.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Lp:break;case Fm:a.children.reverse();break;case Bm:a.children.sort(a.comparer);break;case Mm:a.children.sort(a.comparer),a.children.reverse();break;default:zt("Unhandled sorting value "+a.sorting.toString())}},To.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},To.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=If(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 ue=a.node.Mu();ue.next();){var ce=ue.value;ce.category==="Comment"&&ce.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ce),ce.Va(),ce=ce.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ce.width),ne+=ce.height+Math.abs(re)):(z+=ce.width+Math.abs(re),ne=Math.max(ne,ce.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=Bn.allocAt(0,0,a.bounds.width+z,a.bounds.height+ne),a.bounds=b,Bn.free(b))};function If(a){return a===qh||a===ah||a===ef||a===Nh}function bm(a){return a===qh||a===ah}function _y(a){var y=a.parent;if(y!==null){var x=y.alignment;if(If(x)){if(bm(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ef)return!0}}return!1}To.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=If(z)),E=E===90||E===270,x=b===90||b===270;for(var ne=a.childrenCount===0,re=_y(a),oe=0,ue=a.comments,ce=ue.length,pe=st.alloc(),we=0;we<ce;we++){var Fe=ue[we],Ie=Fe.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-Ie.width,a.bounds.y+oe),Fe.move(pe),Fe=Fe.Sd();Fe.next();){var ze=Fe.value;ze.fromSpot=ra,ze.toSpot=Ao}else for(pe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Fe.move(pe),Fe=Fe.Sd();Fe.next();)ze=Fe.value,ze.fromSpot=Ao,ze.toSpot=ra;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Fe.move(pe),Fe=Fe.Sd();Fe.next();)ze=Fe.value,ze.fromSpot=Ao,ze.toSpot=ra;else for(pe.h(a.bounds.x+a.commentMargin-Ie.width,a.bounds.y+oe),Fe.move(pe),Fe=Fe.Sd();Fe.next();)ze=Fe.value,ze.fromSpot=ra,ze.toSpot=Ao;oe=0<=a.commentSpacing?oe+(Ie.height+a.commentSpacing):oe+(a.commentSpacing-Ie.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Ie.height),Fe.move(pe),Fe=Fe.Sd();Fe.next();)ze=Fe.value,ze.fromSpot=bo,ze.toSpot=Or;else for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Fe.move(pe),Fe=Fe.Sd();Fe.next();)ze=Fe.value,ze.fromSpot=Or,ze.toSpot=bo;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Fe.move(pe),Fe=Fe.Sd();Fe.next();)ze=Fe.value,ze.fromSpot=Or,ze.toSpot=bo;else for(pe.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Ie.height),Fe.move(pe),Fe=Fe.Sd();Fe.next();)ze=Fe.value,ze.fromSpot=bo,ze.toSpot=Or;oe=0<=a.commentSpacing?oe+(Ie.width+a.commentSpacing):oe+(a.commentSpacing-Ie.width)}}if(st.free(pe),y=oe-a.commentSpacing-(E?y.height:y.width),this.ud===ih)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)}},To.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 av:cS(this,a);break;case Lm:if(a.alignment===ah)cS(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=If(x)),E=_y(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=id(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===rh;var ue=oe===oh,ce=If(oe),pe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var we=a.nodeSpacing,Fe=this.computeNodeIndent(a),Ie=a.rowSpacing,ze=0;(E||ue||a.hm||a.im&&a.maxGenerationCount===1)&&(ze=Math.max(0,a.rowIndent)),E=a.width;var gt=a.height,nt=0,Et=0,At=0,Tt=null,Vt=null,mn=0,bi=0,Yi=0,Gi=0,di=0,qn=0,so=0,Vr=0;if(ce&&!bm(oe)&&135<b&&ne.reverse(),bm(oe))if(1<re)for(var Fa=0;Fa<re;Fa++)Fa%2===0&&Fa!==re-1&&(Vr=Math.max(Vr,y?ne[Fa].Da.width:ne[Fa].Da.height));else re===1&&(Vr=y?ne[0].Da.width:ne[0].Da.height);if(ce){switch(oe){case qh:Et=135>b?dS(this,a,ne,Vr,nt,Et):hS(this,a,ne,Vr,nt,Et),Vr=Et.x,nt=Et.width,Et=Et.height;break;case ef:for(Tt=0;Tt<re;Tt++)Vt=ne[Tt],pe=Vt.Da,At=qn===0?0:Ie,y?(Vt.S.h(z-pe.width,Gi+At),nt=Math.max(nt,pe.width),Et=Math.max(Et,Gi+At+pe.height),Gi+=At+pe.height):(Vt.S.h(Yi+At,z-pe.height),nt=Math.max(nt,Yi+At+pe.width),Et=Math.max(Et,pe.height),Yi+=At+pe.width),qn++;break;case Nh:for(Tt=0;Tt<re;Tt++)Vt=ne[Tt],z=Vt.Da,pe=qn===0?0:Ie,y?(Vt.S.h(we/2+a.focus.x,Gi+pe),nt=Math.max(nt,z.width),Et=Math.max(Et,Gi+pe+z.height),Gi+=pe+z.height):(Vt.S.h(Yi+pe,we/2+a.focus.y),nt=Math.max(nt,Yi+pe+z.width),Et=Math.max(Et,z.height),Yi+=pe+z.width),qn++}Tt=Qu(this,2),Vt=Qu(this,2),y?(Tt[0].h(0,0),Tt[1].h(0,Et),Vt[0].h(nt,0)):(Tt[0].h(0,0),Tt[1].h(nt,0),Vt[0].h(0,Et)),Vt[1].h(nt,Et)}else for(Fa=0;Fa<re;Fa++){var Ja=ne[Fa],Cl=Ja.Da;if(y){0<pe&&0<qn&&Yi+we+Cl.width>pe&&(Yi<z&&rg(a,oe,z-Yi,0,so,Fa-1),di++,qn=0,so=Fa,At=Et,Yi=0,Gi=135<b?-Et-Ie:Et+Ie),iv(this,Ja,0,Gi);var Al=0;if(qn===0)Tt=Ja.Yo,Vt=Ja.kp,mn=Cl.width,bi=Cl.height,(Tt===null||Vt===null||b!==id(Ja))&&(Tt=Qu(this,2),Vt=Qu(this,2),Tt[0].h(0,0),Tt[1].h(0,bi),Vt[0].h(mn,0),Vt[1].h(mn,bi));else{var pu=Si();bi=fS(this,a,Ja,Tt,Vt,mn,bi,pu),Al=bi.x,Tt=pu[0],Vt=pu[1],mn=bi.width,bi=bi.height,Fi(pu),Yi<Cl.width&&0>Al&&(zg(a,-Al,0,so,Fa-1),rv(Tt,-Al,0),rv(Vt,-Al,0),Al=0)}Ja.S.h(Al,Gi),nt=Math.max(nt,mn),Et=Math.max(Et,At+(di===0?0:Ie)+Cl.height),Yi=mn}else 0<pe&&0<qn&&Gi+we+Cl.height>pe&&(Gi<z&&rg(a,oe,0,z-Gi,so,Fa-1),di++,qn=0,so=Fa,At=nt,Gi=0,Yi=135<b?-nt-Ie:nt+Ie),iv(this,Ja,Yi,0),Al=0,qn===0?(Tt=Ja.Yo,Vt=Ja.kp,mn=Cl.width,bi=Cl.height,(Tt===null||Vt===null||b!==id(Ja))&&(Tt=Qu(this,2),Vt=Qu(this,2),Tt[0].h(0,0),Tt[1].h(mn,0),Vt[0].h(0,bi),Vt[1].h(mn,bi))):(pu=Si(),bi=fS(this,a,Ja,Tt,Vt,mn,bi,pu),Al=bi.x,Tt=pu[0],Vt=pu[1],mn=bi.width,bi=bi.height,Fi(pu),Gi<Cl.height&&0>Al&&(zg(a,0,-Al,so,Fa-1),rv(Tt,0,-Al),rv(Vt,0,-Al),Al=0)),Ja.S.h(Yi,Al),Et=Math.max(Et,bi),nt=Math.max(nt,At+(di===0?0:Ie)+Cl.width),Gi=bi;qn++}switch(0<di&&(y?(Et+=Math.max(0,x),Yi<nt&&rg(a,oe,nt-Yi,0,so,re-1),0<ze&&(ue||zg(a,ze,0,0,re-1),nt+=ze)):(nt+=Math.max(0,x),Gi<Et&&rg(a,oe,0,Et-Gi,so,re-1),0<ze&&(ue||zg(a,0,ze,0,re-1),Et+=ze))),ze=ue=0,oe){case Np:y?ue+=nt/2-a.focus.x-Fe/2:ze+=Et/2-a.focus.y-Fe/2;break;case Hg:0<di?y?ue+=nt/2-a.focus.x-Fe/2:ze+=Et/2-a.focus.y-Fe/2:y?(Vr=ne[0].S.x+ne[0].la.x,ue+=Vr+(ne[re-1].S.x+ne[re-1].la.x+2*ne[re-1].focus.x-Vr)/2-a.focus.x-Fe/2):(Vr=ne[0].S.y+ne[0].la.y,ze+=Vr+(ne[re-1].S.y+ne[re-1].la.y+2*ne[re-1].focus.y-Vr)/2-a.focus.y-Fe/2);break;case rh:y?(ue-=Fe,nt+=Fe):(ze-=Fe,Et+=Fe);break;case oh:y?(ue+=nt-a.width+Fe,nt+=Fe):(ze+=Et-a.height+Fe,Et+=Fe);break;case qh:y?1<re?ue+=Vr+we/2-a.focus.x:ue+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<re?ze+=Vr+we/2-a.focus.y:ze+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case ef:y?ue+=nt+we/2-a.focus.x:ze+=Et+we/2-a.focus.y;break;case Nh:break;default:Et=this.customAlignment(a,ue,ze,nt,Et),ue=Et[0],ze=Et[1],nt=Et[2],Et=Et[3]}for(Fe=0;Fe<re;Fe++)Vr=ne[Fe],y?Vr.S.h(Vr.S.x+Vr.la.x-ue,Vr.S.y+(135<b?(ce?-Et:-Vr.Da.height)+Vr.la.y-x:gt+x+Vr.la.y)):Vr.S.h(Vr.S.x+(135<b?(ce?-nt:-Vr.Da.width)+Vr.la.x-x:E+x+Vr.la.x),Vr.S.y+Vr.la.y-ze);if(re=ne=0,ce?y?(nt=jy(a,nt,ue),0>ue&&(ue=0),135<b&&(ze+=Et+x),Et+=gt+x,oe===Nh&&(ne+=we/2+a.focus.x),re+=gt+x):(135<b&&(ue+=nt+x),nt+=E+x,Et=zy(a,Et,ze),0>ze&&(ze=0),oe===Nh&&(re+=we/2+a.focus.y),ne+=E+x):y?(a.comments===null?E>nt&&(nt=Zy(oe,E-nt,0),ne=nt.x,re=nt.y,nt=E,ue=0):nt=jy(a,nt,ue),0>ue&&(ne-=ue,ue=0),135<b&&(ze+=Et+x),Et=Math.max(Math.max(Et,gt),Et+gt+x),re+=gt+x):(135<b&&(ue+=nt+x),nt=Math.max(Math.max(nt,E),nt+E+x),a.comments===null?gt>Et&&(Et=Zy(oe,0,gt-Et),ne=Et.x,re=Et.y,Et=gt,ze=0):Et=zy(a,Et,ze),0>ze&&(re-=ze,ze=0),ne+=E+x),0<di)b=Qu(this,4),di=Qu(this,4),y?(b[2].h(0,gt+x),b[3].h(b[2].x,Et),di[2].h(nt,b[2].y),di[3].h(di[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(nt,b[2].y),di[2].h(b[2].x,Et),di[3].h(b[3].x,di[2].y));else{for(b=Qu(this,Tt.length+2),di=Qu(this,Vt.length+2),oe=0;oe<Tt.length;oe++)ce=Tt[oe],b[oe+2].h(ce.x+ne,ce.y+re);for(oe=0;oe<Vt.length;oe++)ce=Vt[oe],di[oe+2].h(ce.x+ne,ce.y+re)}y?(b[0].h(ue,0),b[1].h(b[0].x,gt),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])),di[0].h(ue+E,0),di[1].h(di[0].x,gt),di[2].y<di[1].y&&(di[2].x<di[0].x?di[2].assign(di[1]):di[1].assign(di[2])),di[3].y<di[2].y&&(di[3].x<di[0].x?di[3].assign(di[2]):di[2].assign(di[3])),b[2].y-=x/2,di[2].y-=x/2):(b[0].h(0,ze),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])),di[0].h(0,ze+gt),di[1].h(E,di[0].y),di[2].x<di[1].x&&(di[2].y<di[0].y?di[2].assign(di[1]):di[1].assign(di[2])),di[3].x<di[2].x&&(di[3].y<di[0].y?di[3].assign(di[2]):di[2].assign(di[3])),b[2].x-=x/2,di[2].x-=x/2),xd(this,Tt),xd(this,Vt),a.Yo=b,a.kp=di,a.la.h(ue,ze),a.Da.h(nt,Et)}break;default:zt("Unhandled compaction value "+a.compaction.toString())}}};function cS(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=If(x));var b=_y(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=id(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 ue=y.alignment,ce=ue===rh,pe=ue===oh;re=If(ue);var we=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Fe=y.nodeSpacing,Ie=a.computeNodeIndent(y),ze=ce||pe?0:Ie/2,gt=y.rowSpacing,nt=0;(ce||pe||y.hm||y.im&&y.maxGenerationCount===1)&&(nt=Math.max(0,y.rowIndent)),ce=y.width;var Et=y.height,At=0,Tt=0,Vt=0,mn=0,bi=0,Yi=0,Gi=0,di=0,qn=0,so=0;if(re&&!bm(ue)&&135<E&&b.reverse(),bm(ue))if(1<ne)for(var Vr=0;Vr<ne;Vr++){var Fa=b[Vr],Ja=Fa.Da;Vr%2===0&&Vr!==ne-1?qn=Math.max(qn,(x?Ja.width:Ja.height)+a.computeBusNodeSpacing(Fa)-Fe):Vr%2!==0&&(so=Math.max(so,(x?Ja.width:Ja.height)+a.computeBusNodeSpacing(Fa)-Fe))}else ne===1&&(qn=x?b[0].Da.width:b[0].Da.height);if(re)switch(ue){case qh:case ah:Tt=135>E?dS(a,y,b,qn,At,Tt):hS(a,y,b,qn,At,Tt),qn=Tt.x,At=Tt.width,Tt=Tt.height;break;case ef:for(we=0;we<ne;we++)ze=b[we],Vt=ze.Da,so=Gi===0?0:gt,x?(ze.S.h(z-Vt.width,bi+so),At=Math.max(At,Vt.width),Tt=Math.max(Tt,bi+so+Vt.height),bi+=so+Vt.height):(ze.S.h(mn+so,z-Vt.height),At=Math.max(At,mn+so+Vt.width),Tt=Math.max(Tt,Vt.height),mn+=so+Vt.width),Gi++;break;case Nh:for(z=0;z<ne;z++)we=b[z],ze=we.Da,Vt=Gi===0?0:gt,x?(we.S.h(Fe/2+y.focus.x,bi+Vt),At=Math.max(At,ze.width),Tt=Math.max(Tt,bi+Vt+ze.height),bi+=Vt+ze.height):(we.S.h(mn+Vt,Fe/2+y.focus.y),At=Math.max(At,mn+Vt+ze.width),Tt=Math.max(Tt,ze.height),mn+=Vt+ze.width),Gi++}else for(so=0;so<ne;so++)Vr=b[so],Fa=Vr.Da,x?(0<we&&0<Gi&&mn+Fe+Fa.width>we&&(mn<z&&rg(y,ue,z-mn,0,di,so-1),Yi++,Gi=0,di=so,Vt=Tt,mn=0,bi=135<E?-Tt-gt:Tt+gt),Ja=Gi===0?ze:Fe,iv(a,Vr,0,bi),Vr.S.h(mn+Ja,bi),At=Math.max(At,mn+Ja+Fa.width),Tt=Math.max(Tt,Vt+(Yi===0?0:gt)+Fa.height),mn+=Ja+Fa.width):(0<we&&0<Gi&&bi+Fe+Fa.height>we&&(bi<z&&rg(y,ue,0,z-bi,di,so-1),Yi++,Gi=0,di=so,Vt=At,bi=0,mn=135<E?-At-gt:At+gt),Ja=Gi===0?ze:Fe,iv(a,Vr,mn,0),Vr.S.h(mn,bi+Ja),Tt=Math.max(Tt,bi+Ja+Fa.height),At=Math.max(At,Vt+(Yi===0?0:gt)+Fa.width),bi+=Ja+Fa.height),Gi++;switch(0<Yi&&(x?(Tt+=Math.max(0,oe),mn<At&&rg(y,ue,At-mn,0,di,ne-1),0<nt&&(pe||zg(y,nt,0,0,ne-1),At+=nt)):(At+=Math.max(0,oe),bi<Tt&&rg(y,ue,0,Tt-bi,di,ne-1),0<nt&&(pe||zg(y,0,nt,0,ne-1),Tt+=nt))),nt=pe=0,ue){case Np:x?pe+=At/2-y.focus.x-Ie/2:nt+=Tt/2-y.focus.y-Ie/2;break;case Hg:0<Yi?x?pe+=At/2-y.focus.x-Ie/2:nt+=Tt/2-y.focus.y-Ie/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-Ie/2):(a=b[0].S.y+b[0].la.y,nt+=a+(b[ne-1].S.y+b[ne-1].la.y+2*b[ne-1].focus.y-a)/2-y.focus.y-Ie/2);break;case rh:x?(pe-=Ie,At+=Ie):(nt-=Ie,Tt+=Ie);break;case oh:x?(pe+=At-y.width+Ie,At+=Ie):(nt+=Tt-y.height+Ie,Tt+=Ie);break;case qh:case ah:x?1<ne?pe+=qn+Fe/2-y.focus.x:pe+=b[0].focus.x-y.focus.x+b[0].la.x:1<ne?nt+=qn+Fe/2-y.focus.y:nt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case ef:x?pe+=At+Fe/2-y.focus.x:nt+=Tt+Fe/2-y.focus.y;break;case Nh:break;default:a=a.customAlignment(y,pe,nt,At,Tt),pe=a[0],nt=a[1],At=a[2],Tt=a[3]}for(a=0;a<ne;a++)Ie=b[a],x?Ie.S.h(Ie.S.x+Ie.la.x-pe,Ie.S.y+(135<E?(re?-Tt:-Ie.Da.height)+Ie.la.y-oe:Et+oe+Ie.la.y)):Ie.S.h(Ie.S.x+(135<E?(re?-At:-Ie.Da.width)+Ie.la.x-oe:ce+oe+Ie.la.x),Ie.S.y+Ie.la.y-nt);x?(At=jy(y,At,pe),0>pe&&(pe=0),135<E&&(nt+=Tt+oe),Tt=Math.max(Math.max(Tt,Et),Tt+Et+oe)):(135<E&&(pe+=At+oe),At=Math.max(Math.max(At,ce),At+ce+oe),Tt=zy(y,Tt,nt),0>nt&&(nt=0)),y.la.h(pe,nt),y.Da.h(At,Tt)}}To.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function dS(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new Bn(E,0,b,z);if(ne===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Bn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=id(y)===90,ce=0,pe=0,we=0,Fe=0;Fe<ne;Fe++)if(!(Fe%2!==0||1<ne&&Fe===ne-1)){var Ie=x[Fe],ze=Ie.Da,gt=ce===0?0:oe;if(ue){var nt=a.computeBusNodeSpacing(Ie)-re;Ie.S.h(E-(ze.width+nt),we+gt),b=Math.max(b,ze.width+nt),z=Math.max(z,we+gt+ze.height),we+=gt+ze.height}else nt=a.computeBusNodeSpacing(Ie)-re,Ie.S.h(pe+gt,E-(ze.height+nt)),z=Math.max(z,ze.height+nt),b=Math.max(b,pe+gt+ze.width),pe+=gt+ze.width;ce++}for(ce=0,Ie=pe,Fe=we,ue?(pe=E+re,we=0):(pe=0,we=E+re),ze=0;ze<ne;ze++)if(ze%2!==0){gt=x[ze],nt=gt.Da;var Et=ce===0?0:oe;if(ue){var At=a.computeBusNodeSpacing(gt)-re;gt.S.h(pe+At,we+Et),b=Math.max(b,pe+nt.width+At),z=Math.max(z,we+Et+nt.height),we+=Et+nt.height}else At=a.computeBusNodeSpacing(gt)-re,gt.S.h(pe+Et,we+At),b=Math.max(b,pe+Et+nt.width),z=Math.max(z,we+nt.height+At),pe+=Et+nt.width;ce++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ue?Math.max(Math.abs(Fe),Math.abs(we)):Math.max(Math.abs(Ie),Math.abs(pe))),ue?(x.S.h(E+re/2-x.focus.x-x.la.x,z+a),ue=E+re/2-x.focus.x-x.la.x,b=Math.max(b,ue+ne.width),0>ue&&(b-=ue),z=Math.max(z,Math.max(Fe,we)+a+ne.height),0>x.S.x&&(E=nv(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(Ie,pe)+a+ne.width),we=E+re/2-x.focus.y-x.la.y,z=Math.max(z,we+ne.height),0>we&&(z-=we),0>x.S.y&&(E=nv(y,x.S.y,!0,E,re)))),new Bn(E,0,b,z)}function hS(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new Bn(E,0,b,z);if(ne===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Bn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=id(y)===270,ce=0,pe=0,we=0,Fe=0;Fe<ne;Fe++)if(!(Fe%2!==0||1<ne&&Fe===ne-1)){var Ie=x[Fe],ze=Ie.Da,gt=ce===0?0:oe;if(ue){var nt=a.computeBusNodeSpacing(Ie)-re;we-=gt+ze.height,Ie.S.h(E-(ze.width+nt),we),b=Math.max(b,ze.width+nt),z=Math.max(z,Math.abs(we))}else nt=a.computeBusNodeSpacing(Ie)-re,pe-=gt+ze.width,Ie.S.h(pe,E-(ze.height+nt)),z=Math.max(z,ze.height+nt),b=Math.max(b,Math.abs(pe));ce++}for(ce=0,Ie=pe,Fe=we,ue?(pe=E+re,we=0):(pe=0,we=E+re),ze=0;ze<ne;ze++)if(ze%2!==0){gt=x[ze],nt=gt.Da;var Et=ce===0?0:oe;if(ue){var At=a.computeBusNodeSpacing(gt)-re;we-=Et+nt.height,gt.S.h(pe+At,we),b=Math.max(b,pe+nt.width+At),z=Math.max(z,Math.abs(we))}else At=a.computeBusNodeSpacing(gt)-re,pe-=Et+nt.width,gt.S.h(pe,we+At),z=Math.max(z,we+nt.height+At),b=Math.max(b,Math.abs(pe));ce++}for(1<ne&&ne%2===1&&(oe=x[ne-1],ce=oe.Da,a=a.computeBusLastRowSpacing(oe,ue?Math.max(Math.abs(Fe),Math.abs(we)):Math.max(Math.abs(Ie),Math.abs(pe))),ue?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-ce.height-a),pe=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,pe+ce.width),0>pe&&(b-=pe),z=Math.max(z,Math.abs(Math.min(Fe,we))+a+ce.height),0>oe.S.x&&(E=nv(y,oe.S.x,!1,E,re))):(oe.S.h(-b-ce.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(Ie,pe))+a+ce.width),we=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,we+ce.height),0>we&&(z-=we),0>oe.S.y&&(E=nv(y,oe.S.y,!0,E,re)))),y=0;y<ne;y++)re=x[y],ue?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+b,re.S.y);return new Bn(E,0,b,z)}To.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},To.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function nv(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 jy(a,y,x){switch(a.alignment){case Hg:case Np:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case rh:return a.width>y?a.width:y;case oh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case qh:case ah:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case ef:return a.width-a.focus.x+a.nodeSpacing/2+y;case Nh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function zy(a,y,x){switch(a.alignment){case Hg:case Np:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case rh:return a.height>y?a.height:y;case oh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case qh:case ah:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case ef:return a.height-a.focus.y+a.nodeSpacing/2+y;case Nh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Zy(a,y,x){switch(a){case Np:y/=2,x/=2;break;case Hg:y/=2,x/=2;break;case rh:x=y=0;break;case oh:break;default:zt("Unhandled alignment value "+a.toString())}return new st(y,x)}function rg(a,y,x,E,b,z){y=Zy(y,x,E),zg(a,y.x,y.y,b,z)}function zg(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 iv(a,y,x,E){var b=y.parent;switch(a.ud){case ih:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Zg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:zt("Unhandled path value "+a.ud.toString())}}function rv(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function fS(a,y,x,E,b,z,ne,re){var oe=id(y),ue=oe===90||oe===270,ce=y.nodeSpacing;y=E;var pe=b;E=z;var we=ne,Fe=x.Yo,Ie=x.kp;ne=x.Da;var ze=ue?Math.max(we,ne.height):Math.max(E,ne.width);if((Fe===null||oe!==id(x))&&(Fe=Qu(a,2),Ie=Qu(a,2),ue?(Fe[0].h(0,0),Fe[1].h(0,ne.height),Ie[0].h(ne.width,0),Ie[1].h(Ie[0].x,Fe[1].y)):(Fe[0].h(0,0),Fe[1].h(ne.width,0),Ie[0].h(0,ne.height),Ie[1].h(Fe[1].x,Ie[0].y))),ue){if(we=9999999,!(pe===null||2>pe.length||Fe===null||2>Fe.length))for(b=x=0;x<pe.length&&b<Fe.length;){z=pe[x];var gt=Fe[b];oe=gt.x,ue=gt.y,oe+=E;var nt=z;x+1<pe.length&&(nt=pe[x+1]);var Et=gt;gt=Et.x,Et=Et.y,b+1<Fe.length&&(Et=Fe[b+1],gt=Et.x,Et=Et.y,gt+=E);var At=we;z.y===ue?At=oe-z.x:z.y>ue&&z.y<Et?At=oe+(z.y-ue)/(Et-ue)*(gt-oe)-z.x:ue>z.y&&ue<nt.y&&(At=oe-(z.x+(ue-z.y)/(nt.y-z.y)*(nt.x-z.x))),At<we&&(we=At),nt.y<=z.y?x++:Et<=ue?b++:(nt.y<=Et&&x++,Et<=nt.y&&b++)}if(we=E-we,we+=ce,x=Fe,b=we,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ce=Qu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)ue=x[z++],ce[E++].h(ue.x+b,ue.y);for(;oe<y.length;)ue=y[oe++],ce[E++].h(ue.x,ue.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)ue=x[z++],ce[E++].h(ue.x+b,ue.y);for(x=Qu(a,E),oe=0;oe<E;oe++)x[oe].assign(ce[oe]);xd(a,ce),E=x}if(z=Ie,oe=we,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(ce=Qu(a,pe.length+z.length),b=ue=x=0;x<pe.length&&pe[x].y<z[0].y;)nt=pe[x++],ce[b++].h(nt.x,nt.y);for(;ue<z.length;)nt=z[ue++],ce[b++].h(nt.x+oe,nt.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++],ce[b++].h(oe.x,oe.y);for(z=Qu(a,b),x=0;x<b;x++)z[x].assign(ce[x]);xd(a,ce),b=z}return z=Math.max(0,we)+ne.width,ne=ze,xd(a,y),xd(a,Fe),xd(a,pe),xd(a,Ie),re[0]=E,re[1]=b,new Bn(we,0,z,ne)}if(E=9999999,!(pe===null||2>pe.length||Fe===null||2>Fe.length))for(b=x=0;x<pe.length&&b<Fe.length;)z=pe[x],gt=Fe[b],oe=gt.x,ue=gt.y,ue+=we,nt=z,x+1<pe.length&&(nt=pe[x+1]),Et=gt,gt=Et.x,Et=Et.y,b+1<Fe.length&&(Et=Fe[b+1],gt=Et.x,Et=Et.y,Et+=we),At=E,z.x===oe?At=ue-z.y:z.x>oe&&z.x<gt?At=ue+(z.x-oe)/(gt-oe)*(Et-ue)-z.y:oe>z.x&&oe<nt.x&&(At=ue-(z.y+(oe-z.x)/(nt.x-z.x)*(nt.y-z.y))),At<E&&(E=At),nt.x<=z.x?x++:gt<=oe?b++:(nt.x<=gt&&x++,gt<=nt.x&&b++);if(we-=E,we+=ce,x=Fe,b=we,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ce=Qu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)ue=x[z++],ce[E++].h(ue.x,ue.y+b);for(;oe<y.length;)ue=y[oe++],ce[E++].h(ue.x,ue.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)ue=x[z++],ce[E++].h(ue.x,ue.y+b);for(x=Qu(a,E),oe=0;oe<E;oe++)x[oe].assign(ce[oe]);xd(a,ce),E=x}if(z=Ie,oe=we,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(ce=Qu(a,pe.length+z.length),b=ue=x=0;x<pe.length&&pe[x].x<z[0].x;)nt=pe[x++],ce[b++].h(nt.x,nt.y);for(;ue<z.length;)nt=z[ue++],ce[b++].h(nt.x,nt.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++],ce[b++].h(oe.x,oe.y);for(z=Qu(a,b),x=0;x<b;x++)z[x].assign(ce[x]);xd(a,ce),b=z}return z=ze,ne=Math.max(0,we)+ne.height,xd(a,y),xd(a,Fe),xd(a,pe),xd(a,Ie),re[0]=E,re[1]=b,new Bn(we,0,z,ne)}function Qu(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 st;return a}function xd(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}To.prototype.arrangeTrees=function(){if(this.Rb===uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Wc){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),Hy(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Wc&&a.push(x);switch(this.sorting){case Lp:break;case Fm:a.reverse();break;case Bm:a.sort(this.comparer);break;case Mm:a.sort(this.comparer),a.reverse();break;default:zt("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(Hy(this,b,y+b.la.x,x+b.la.y),this.Rb){case lv:x+=b.Da.height+this.$d.height;break;case Ky:y+=b.Da.width+this.$d.width;break;default:zt("Unhandled arrangement value "+this.Rb.toString())}}}};function Hy(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];Hy(a,ne,x+ne.S.x,E+ne.S.y)}}}To.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},To.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},To.prototype.Gu=function(){if(this.layerStyle===cv){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 st(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new st(-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 Bn(0,z,x,re))):this.angle===90?(b.push(new Bn(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new Bn(z,0,re,x))):(b.push(new Bn(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},To.prototype.commitLayers=function(){},To.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},To.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Wc&&gS(this,y)}};function gS(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)gS(a,y[E])}}To.prototype.setPortSpots=function(a){var y=a.alignment;if(If(y)){var x=this.ud===ih,E=id(a);switch(E){case 0:var b=Ao;break;case 90:b=Or;break;case 180:b=ra;break;default:b=bo}var z=a.children,ne=z.length;switch(y){case qh:case ah: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?ra:bo;if(ne===1||y===ne-1&&ne%2===1)switch(E){case 0:oe=ra;break;case 90:oe=bo;break;case 180:oe=Ao;break;default:oe=Or}else y%2===0&&(oe=E===90||E===270?Ao:Or);x?(a.setsPortSpot&&(re.fromSpot=b),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=b))}}break;case ef:for(E=E===90||E===270?Ao:Or,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 Nh:for(E=E===90||E===270?ra:bo,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=id(a),this.ud===ih){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=Ao;break;case 90:E.fromSpot=Or;break;case 180:E.fromSpot=ra;break;default:E.fromSpot=bo}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=ra;break;case 90:E.toSpot=bo;break;case 180:E.toSpot=Ao;break;default:E.toSpot=Or}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=Ao;break;case 90:E.toSpot=Or;break;case 180:E.toSpot=ra;break;default:E.toSpot=bo}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=ra;break;case 90:E.fromSpot=bo;break;case 180:E.fromSpot=Ao;break;default:E.fromSpot=Or}else E.fromSpot=a.childPortSpot}};function id(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}To.prototype.computeLayerSpacing=function(a){var y=id(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},To.prototype.computeNodeIndent=function(a){var y=id(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)},wt.Object.defineProperties(To.prototype,{roots:{get:function(){return this.Ub},set:function(a){this.Ub!==a&&(this.Ub=a,this.C())}},path:{get:function(){return this.Wn},set:function(a){this.Wn!==a&&(this.Wn=a,this.C())}},treeStyle:{get:function(){return this.vo},set:function(a){this.Rb===a||a!==sv&&a!==Gy&&a!==Wy&&a!==$y||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Vy&&a!==Uy&&a!==cv||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==lv&&a!==Ky&&a!==uv||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Lp&&a!==Fm&&a!==Bm&&!Mm||(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()):zt("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==av&&a!==Lm||(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!==Lp&&a!==Fm&&a!==Bm&&!Mm||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==av&&a!==Lm||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var ov=new Jt(To,"PathDefault",-1),ih=new Jt(To,"PathDestination",0),Zg=new Jt(To,"PathSource",1),Lp=new Jt(To,"SortingForwards",10),Fm=new Jt(To,"SortingReverse",11),Bm=new Jt(To,"SortingAscending",12),Mm=new Jt(To,"SortingDescending",13),Np=new Jt(To,"AlignmentCenterSubtrees",20),Hg=new Jt(To,"AlignmentCenterChildren",21),rh=new Jt(To,"AlignmentStart",22),oh=new Jt(To,"AlignmentEnd",23),qh=new Jt(To,"AlignmentBus",24),ah=new Jt(To,"AlignmentBusBranching",25),ef=new Jt(To,"AlignmentTopLeftBus",26),Nh=new Jt(To,"AlignmentBottomRightBus",27),av=new Jt(To,"CompactionNone",30),Lm=new Jt(To,"CompactionBlock",31),sv=new Jt(To,"StyleLayered",40),Wy=new Jt(To,"StyleLastParents",41),Gy=new Jt(To,"StyleAlternating",42),$y=new Jt(To,"StyleRootOnly",43),lv=new Jt(To,"ArrangementVertical",50),Ky=new Jt(To,"ArrangementHorizontal",51),uv=new Jt(To,"ArrangementFixedRoots",52),Vy=new Jt(To,"LayerIndividual",60),Uy=new Jt(To,"LayerSiblings",61),cv=new Jt(To,"LayerUniform",62);To.className="TreeLayout",To.PathDefault=ov,To.PathDestination=ih,To.PathSource=Zg,To.SortingForwards=Lp,To.SortingReverse=Fm,To.SortingAscending=Bm,To.SortingDescending=Mm,To.AlignmentCenterSubtrees=Np,To.AlignmentCenterChildren=Hg,To.AlignmentStart=rh,To.AlignmentEnd=oh,To.AlignmentBus=qh,To.AlignmentBusBranching=ah,To.AlignmentTopLeftBus=ef,To.AlignmentBottomRightBus=Nh,To.CompactionNone=av,To.CompactionBlock=Lm,To.StyleLayered=sv,To.StyleLastParents=Wy,To.StyleAlternating=Gy,To.StyleRootOnly=$y,To.ArrangementVertical=lv,To.ArrangementHorizontal=Ky,To.ArrangementFixedRoots=uv,To.LayerIndividual=Vy,To.LayerSiblings=Uy,To.LayerUniform=cv;function Wg(a){qa.call(this,a)}Zt(Wg,qa),Wg.prototype.createVertex=function(){return new Wc(this)},Wg.prototype.createEdge=function(){return new Ap(this)},Wg.className="TreeNetwork";function Wc(a){cl.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 st(0,0),this.Da=new fi(0,0),this.la=new st(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Lp,this.hd=gy,this.Kb=0,this.Jb=Hg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Lm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Bi,this.wr=!0,this.Dp=Bi}Zt(Wc,cl),Wc.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)},wt.Object.defineProperties(Wc.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)}}}),Wc.className="TreeVertex";function Ap(a){hc.call(this,a),this.$t=new st(0,0)}Zt(Ap,hc),Ap.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 ih:x=this.fromVertex,E=this.toVertex;break;case Zg:x=this.toVertex,E=this.fromVertex;break;default:zt("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=id(x),ne=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===Ec,ue=a.isOrthogonal,ce;if(a.uh(),ue||oe){for(ce=2;4<a.pointsCount;)a.pv(2);var pe=a.i(1),we=a.i(2)}else{for(ce=1;3<a.pointsCount;)a.pv(1);pe=a.i(0),we=a.i(a.pointsCount-1)}var Fe=a.i(a.pointsCount-1);z===0?(x.alignment===oh?(z=E.bottom+b.y,b.y===0&&pe.y>Fe.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.top+b.y,b.y===0&&pe.y<Fe.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(ce,pe.x,z),ce++,a.m(ce,E.right+ne,z),ce++,a.m(ce,E.right+ne+(b.x-re)/3,z),ce++,a.m(ce,E.right+ne+2*(b.x-re)/3,z),ce++,a.m(ce,E.right+ne+(b.x-re),z),ce++,a.m(ce,we.x,z)):(ue&&(a.m(ce,E.right+ne/2,pe.y),ce++),a.m(ce,E.right+ne/2,z),ce++,a.m(ce,E.right+ne+b.x-(ue?re/2:re),z),ce++,ue&&a.m(ce,a.i(ce-1).x,we.y))):z===90?(x.alignment===oh?(z=E.right+b.x,b.x===0&&pe.x>Fe.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.left+b.x,b.x===0&&pe.x<Fe.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(ce,z,pe.y),ce++,a.m(ce,z,E.bottom+ne),ce++,a.m(ce,z,E.bottom+ne+(b.y-re)/3),ce++,a.m(ce,z,E.bottom+ne+2*(b.y-re)/3),ce++,a.m(ce,z,E.bottom+ne+(b.y-re)),ce++,a.m(ce,z,we.y)):(ue&&(a.m(ce,pe.x,E.bottom+ne/2),ce++),a.m(ce,z,E.bottom+ne/2),ce++,a.m(ce,z,E.bottom+ne+b.y-(ue?re/2:re)),ce++,ue&&a.m(ce,we.x,a.i(ce-1).y))):z===180?(x.alignment===oh?(z=E.bottom+b.y,b.y===0&&pe.y>Fe.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.top+b.y,b.y===0&&pe.y<Fe.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(ce,pe.x,z),ce++,a.m(ce,E.left-ne,z),ce++,a.m(ce,E.left-ne+(b.x+re)/3,z),ce++,a.m(ce,E.left-ne+2*(b.x+re)/3,z),ce++,a.m(ce,E.left-ne+(b.x+re),z),ce++,a.m(ce,we.x,z)):(ue&&(a.m(ce,E.left-ne/2,pe.y),ce++),a.m(ce,E.left-ne/2,z),ce++,a.m(ce,E.left-ne+b.x+(ue?re/2:re),z),ce++,ue&&a.m(ce,a.i(ce-1).x,we.y))):z===270?(x.alignment===oh?(z=E.right+b.x,b.x===0&&pe.x>Fe.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.left+b.x,b.x===0&&pe.x<Fe.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(ce,z,pe.y),ce++,a.m(ce,z,E.top-ne),ce++,a.m(ce,z,E.top-ne+(b.y+re)/3),ce++,a.m(ce,z,E.top-ne+2*(b.y+re)/3),ce++,a.m(ce,z,E.top-ne+(b.y+re)),ce++,a.m(ce,z,we.y)):(ue&&(a.m(ce,pe.x,E.top-ne/2),ce++),a.m(ce,z,E.top-ne/2),ce++,a.m(ce,z,E.top-ne+b.y+(ue?re/2:re)),ce++,ue&&a.m(ce,we.x,a.i(ce-1).y))):zt("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=id(x),y!==id(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===Ec,b=a.isOrthogonal,E=If(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()))}}},wt.Object.defineProperties(Ap.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)}}}),Ap.className="TreeEdge",zo.prototype.initializeStandardTools=function(){this.gb("Action",new uo,this.mouseDownTools),this.gb("Relinking",new Ui,this.mouseDownTools),this.gb("LinkReshaping",new rr,this.mouseDownTools),this.gb("Rotating",new $o,this.mouseDownTools),this.gb("Resizing",new ro,this.mouseDownTools),this.gb("Linking",new Jn,this.mouseMoveTools),this.gb("Dragging",new is,this.mouseMoveTools),this.gb("DragSelecting",new co,this.mouseMoveTools),this.gb("Panning",new Ir,this.mouseMoveTools),this.gb("ContextMenu",new Pa,this.mouseUpTools),this.gb("TextEditing",new oa,this.mouseUpTools),this.gb("ClickCreating",new Oo,this.mouseUpTools),this.gb("ClickSelecting",new ka,this.mouseUpTools)},Ad("Horizontal",new jm),Ad("Spot",new Zm),Ad("Table",new Wm),Ad("Viewbox",new Km),Ad("TableRow",new Gm),Ad("TableColumn",new $m),Ad("Graduated",new $p),Ad("Grid",new Gp),Uf.add("GraphLinksModel",Nl),Uf.add("TreeModel",Dc);var dv=ct.go,Yy={get licenseKey(){return gn.licenseKey},set licenseKey(a){gn.licenseKey=a},get version(){return gn.version},Group:ho,EnumValue:Jt,List:$n,Set:Un,Map:Hi,Point:st,Size:fi,Rect:Bn,Margin:pr,Spot:Qi,Geometry:nn,PathFigure:yo,PathSegment:fr,InputEvent:Tr,DiagramEvent:Rr,ChangedEvent:gr,Model:ar,GraphLinksModel:ia,TreeModel:Bu,Binding:tl,Transaction:So,UndoManager:Oa,CommandHandler:ft,Tool:Dr,DraggingTool:is,DraggingInfo:dd,DraggingOptions:ae,LinkingBaseTool:on,LinkingTool:Jn,RelinkingTool:Ui,LinkReshapingTool:rr,ResizingTool:ro,RotatingTool:$o,ClickSelectingTool:ka,ActionTool:uo,ClickCreatingTool:Oo,HTMLInfo:Fo,ContextMenuTool:Pa,DragSelectingTool:co,PanningTool:Ir,TextEditingTool:oa,ToolManager:zo,Animation:Ms,AnimationManager:Cs,AnimationTrigger:ku,Layer:ds,Diagram:gn,Palette:ge,Overview:ye,Brush:da,GraphObject:Ut,Panel:si,RowColumnDefinition:ol,Shape:Co,TextBlock:Qa,Picture:zu,Part:Sr,Adornment:pa,Node:Ai,Link:hi,Placeholder:Cu,Layout:ps,LayoutNetwork:qa,LayoutVertex:cl,LayoutEdge:hc,GridLayout:_l,PanelLayout:ul,CircularLayout:Ds,CircularNetwork:Fp,CircularVertex:xm,CircularEdge:$0,ForceDirectedLayout:tu,ForceDirectedNetwork:jg,ForceDirectedVertex:Sm,ForceDirectedEdge:Pm,LayeredDigraphLayout:za,LayeredDigraphNetwork:Mp,LayeredDigraphVertex:Oc,LayeredDigraphEdge:Em,TreeLayout:To,TreeNetwork:Wg,TreeVertex:Wc,TreeEdge:Ap};typeof dv=="object"&&dv.version&&xi("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+Yy.version),gn.prototype.go=Yy,ct.go=Yy,typeof Tn.exports=="object"&&(Tn.exports=typeof me.g!="undefined"?me.g.go:self.go)}();var le=typeof me.g!="undefined"?me.g.go:self.go;const Te=typeof me.g!="undefined"?me.g.go:self.go,He=Te.Group,lt=Te.EnumValue,We=Te.List,Ve=Te.Set,Le=Te.Map,Ct=Te.Point,xt=Te.Size,Ue=Te.Rect,bt=Te.Margin,at=Te.Spot,mt=Te.Geometry,Oe=Te.PathFigure,te=Te.PathSegment,ee=Te.InputEvent,de=Te.DiagramEvent,se=Te.ChangedEvent,he=Te.Model,ve=Te.GraphLinksModel,Ee=Te.TreeModel,Me=Te.Binding,Be=Te.Transaction,je=Te.UndoManager,_e=Te.CommandHandler,Je=Te.Tool,Xe=Te.DraggingTool,ht=Te.DraggingInfo,Ze=Te.LinkingBaseTool,Mt=Te.LinkingTool,ot=Te.RelinkingTool,Ot=Te.LinkReshapingTool,Pt=Te.ResizingTool,Dt=Te.RotatingTool,Wt=Te.ClickSelectingTool,Lt=Te.ActionTool,qe=Te.ClickCreatingTool,Ke=Te.HTMLInfo,Rt=Te.ContextMenuTool,Sn=Te.DragSelectingTool,Pn=Te.PanningTool,_t=Te.TextEditingTool,rn=Te.ToolManager,ln=Te.Animation,Wn=Te.AnimationManager,un=Te.AnimationTrigger,_n=Te.Layer,St=Te.Diagram,Zn=Te.Palette,li=Te.Overview,Ge=Te.Brush,be=Te.GraphObject,Pe=Te.Panel,Ae=Te.RowColumnDefinition,Ne=Te.Shape,xe=Te.TextBlock,ut=Te.TextBlockMetrics,Bt=Te.Picture,Qe=Te.Part,it=Te.Adornment,Ft=Te.Node,Nt=Te.Link,dt=Te.Placeholder,Kt=Te.Layout,wn=Te.LayoutNetwork,sn=Te.LayoutVertex,qt=Te.LayoutEdge,Rn=Te.GridLayout,Vn=Te.PanelLayout,hn=Te.CircularLayout,Yn=Te.CircularNetwork,mi=Te.CircularVertex,jn=Te.CircularEdge,An=Te.ForceDirectedLayout,wi=Te.ForceDirectedNetwork,ji=Te.ForceDirectedVertex,Wi=Te.ForceDirectedEdge,dr=Te.LayeredDigraphLayout,Mr=Te.LayeredDigraphNetwork,pi=Te.LayeredDigraphVertex,ui=Te.LayeredDigraphEdge,Ci=Te.TreeLayout,Xi=Te.TreeNetwork,Ni=Te.TreeVertex,io=Te.TreeEdge,hr=Te.version},24334:function(Tn,xn,me){var le,Te;(function(He,lt){Tn.exports=lt(He)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof me.g!="undefined"?me.g:this,function(He){"use strict";He=He||{};var lt=He.Base64,We="2.6.4",Ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Le=function(ot){for(var Ot={},Pt=0,Dt=ot.length;Pt<Dt;Pt++)Ot[ot.charAt(Pt)]=Pt;return Ot}(Ve),Ct=String.fromCharCode,xt=function(ot){if(ot.length<2){var Ot=ot.charCodeAt(0);return Ot<128?ot:Ot<2048?Ct(192|Ot>>>6)+Ct(128|Ot&63):Ct(224|Ot>>>12&15)+Ct(128|Ot>>>6&63)+Ct(128|Ot&63)}else{var Ot=65536+(ot.charCodeAt(0)-55296)*1024+(ot.charCodeAt(1)-56320);return Ct(240|Ot>>>18&7)+Ct(128|Ot>>>12&63)+Ct(128|Ot>>>6&63)+Ct(128|Ot&63)}},Ue=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,bt=function(ot){return ot.replace(Ue,xt)},at=function(ot){var Ot=[0,2,1][ot.length%3],Pt=ot.charCodeAt(0)<<16|(ot.length>1?ot.charCodeAt(1):0)<<8|(ot.length>2?ot.charCodeAt(2):0),Dt=[Ve.charAt(Pt>>>18),Ve.charAt(Pt>>>12&63),Ot>=2?"=":Ve.charAt(Pt>>>6&63),Ot>=1?"=":Ve.charAt(Pt&63)];return Dt.join("")},mt=He.btoa&&typeof He.btoa=="function"?function(ot){return He.btoa(ot)}:function(ot){if(ot.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ot.replace(/[\s\S]{1,3}/g,at)},Oe=function(ot){return mt(bt(String(ot)))},te=function(ot){return ot.replace(/[+\/]/g,function(Ot){return Ot=="+"?"-":"_"}).replace(/=/g,"")},ee=function(ot,Ot){return Ot?te(Oe(ot)):Oe(ot)},de=function(ot){return ee(ot,!0)},se;He.Uint8Array&&(se=function(ot,Ot){for(var Pt="",Dt=0,Wt=ot.length;Dt<Wt;Dt+=3){var Lt=ot[Dt],qe=ot[Dt+1],Ke=ot[Dt+2],Rt=Lt<<16|qe<<8|Ke;Pt+=Ve.charAt(Rt>>>18)+Ve.charAt(Rt>>>12&63)+(typeof qe!="undefined"?Ve.charAt(Rt>>>6&63):"=")+(typeof Ke!="undefined"?Ve.charAt(Rt&63):"=")}return Ot?te(Pt):Pt});var he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ve=function(ot){switch(ot.length){case 4:var Ot=(7&ot.charCodeAt(0))<<18|(63&ot.charCodeAt(1))<<12|(63&ot.charCodeAt(2))<<6|63&ot.charCodeAt(3),Pt=Ot-65536;return Ct((Pt>>>10)+55296)+Ct((Pt&1023)+56320);case 3:return Ct((15&ot.charCodeAt(0))<<12|(63&ot.charCodeAt(1))<<6|63&ot.charCodeAt(2));default:return Ct((31&ot.charCodeAt(0))<<6|63&ot.charCodeAt(1))}},Ee=function(ot){return ot.replace(he,ve)},Me=function(ot){var Ot=ot.length,Pt=Ot%4,Dt=(Ot>0?Le[ot.charAt(0)]<<18:0)|(Ot>1?Le[ot.charAt(1)]<<12:0)|(Ot>2?Le[ot.charAt(2)]<<6:0)|(Ot>3?Le[ot.charAt(3)]:0),Wt=[Ct(Dt>>>16),Ct(Dt>>>8&255),Ct(Dt&255)];return Wt.length-=[0,0,2,1][Pt],Wt.join("")},Be=He.atob&&typeof He.atob=="function"?function(ot){return He.atob(ot)}:function(ot){return ot.replace(/\S{1,4}/g,Me)},je=function(ot){return Be(String(ot).replace(/[^A-Za-z0-9\+\/]/g,""))},_e=function(ot){return Ee(Be(ot))},Je=function(ot){return String(ot).replace(/[-_]/g,function(Ot){return Ot=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Xe=function(ot){return _e(Je(ot))},ht;He.Uint8Array&&(ht=function(ot){return Uint8Array.from(je(Je(ot)),function(Ot){return Ot.charCodeAt(0)})});var Ze=function(){var ot=He.Base64;return He.Base64=lt,ot};if(He.Base64={VERSION:We,atob:je,btoa:mt,fromBase64:Xe,toBase64:ee,utob:bt,encode:ee,encodeURI:de,btou:Ee,decode:Xe,noConflict:Ze,fromUint8Array:se,toUint8Array:ht},typeof Object.defineProperty=="function"){var Mt=function(ot){return{value:ot,enumerable:!1,writable:!0,configurable:!0}};He.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Mt(function(){return Xe(this)})),Object.defineProperty(String.prototype,"toBase64",Mt(function(ot){return ee(this,ot)})),Object.defineProperty(String.prototype,"toBase64URI",Mt(function(){return ee(this,!0)}))}}return He.Meteor&&(Base64=He.Base64),Tn.exports?Tn.exports.Base64=He.Base64:(le=[],Te=function(){return He.Base64}.apply(xn,le),Te!==void 0&&(Tn.exports=Te)),{Base64:He.Base64}})},2859:function(Tn,xn,me){"use strict";me.d(xn,{hP:function(){return li}});var le=function(Ge,be){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pe,Ae){Pe.__proto__=Ae}||function(Pe,Ae){for(var Ne in Ae)Object.prototype.hasOwnProperty.call(Ae,Ne)&&(Pe[Ne]=Ae[Ne])})(Ge,be)};function Te(Ge,be){function Pe(){this.constructor=Ge}le(Ge,be),Ge.prototype=be===null?Object.create(be):(Pe.prototype=be.prototype,new Pe)}function He(Ge,be,Pe,Ae){return new(Pe||(Pe=Promise))(function(Ne,xe){function ut(it){try{Qe(Ae.next(it))}catch(Ft){xe(Ft)}}function Bt(it){try{Qe(Ae.throw(it))}catch(Ft){xe(Ft)}}function Qe(it){var Ft;it.done?Ne(it.value):(Ft=it.value,Ft instanceof Pe?Ft:new Pe(function(Nt){Nt(Ft)})).then(ut,Bt)}Qe((Ae=Ae.apply(Ge,be||[])).next())})}function lt(Ge,be){var Pe,Ae,Ne,xe,ut={label:0,sent:function(){if(1&Ne[0])throw Ne[1];return Ne[1]},trys:[],ops:[]};return xe={next:Bt(0),throw:Bt(1),return:Bt(2)},typeof Symbol=="function"&&(xe[Symbol.iterator]=function(){return this}),xe;function Bt(Qe){return function(it){return function(Ft){if(Pe)throw new TypeError("Generator is already executing.");for(;ut;)try{if(Pe=1,Ae&&(Ne=2&Ft[0]?Ae.return:Ft[0]?Ae.throw||((Ne=Ae.return)&&Ne.call(Ae),0):Ae.next)&&!(Ne=Ne.call(Ae,Ft[1])).done)return Ne;switch(Ae=0,Ne&&(Ft=[2&Ft[0],Ne.value]),Ft[0]){case 0:case 1:Ne=Ft;break;case 4:return ut.label++,{value:Ft[1],done:!1};case 5:ut.label++,Ae=Ft[1],Ft=[0];continue;case 7:Ft=ut.ops.pop(),ut.trys.pop();continue;default:if(Ne=ut.trys,!((Ne=Ne.length>0&&Ne[Ne.length-1])||Ft[0]!==6&&Ft[0]!==2)){ut=0;continue}if(Ft[0]===3&&(!Ne||Ft[1]>Ne[0]&&Ft[1]<Ne[3])){ut.label=Ft[1];break}if(Ft[0]===6&&ut.label<Ne[1]){ut.label=Ne[1],Ne=Ft;break}if(Ne&&ut.label<Ne[2]){ut.label=Ne[2],ut.ops.push(Ft);break}Ne[2]&&ut.ops.pop(),ut.trys.pop();continue}Ft=be.call(Ge,ut)}catch(Nt){Ft=[6,Nt],Ae=0}finally{Pe=Ne=0}if(5&Ft[0])throw Ft[1];return{value:Ft[0]?Ft[1]:void 0,done:!0}}([Qe,it])}}}function We(){for(var Ge=0,be=0,Pe=arguments.length;be<Pe;be++)Ge+=arguments[be].length;var Ae=Array(Ge),Ne=0;for(be=0;be<Pe;be++)for(var xe=arguments[be],ut=0,Bt=xe.length;ut<Bt;ut++,Ne++)Ae[Ne]=xe[ut];return Ae}var Ve=function(){function Ge(){}return Ge.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ge.setAttributes=function(be,Pe){for(var Ae=0,Ne=Pe;Ae<Ne.length;Ae++){var xe=Ne[Ae],ut=xe[0],Bt=xe[1];be.setAttribute(ut,Bt)}},Ge.createRect=function(be,Pe,Ae){var Ne=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ne.setAttribute("width",be.toString()),Ne.setAttribute("height",Pe.toString()),Ae&&Ge.setAttributes(Ne,Ae),Ne},Ge.createLine=function(be,Pe,Ae,Ne,xe){var ut=document.createElementNS("http://www.w3.org/2000/svg","line");return ut.setAttribute("x1",be.toString()),ut.setAttribute("y1",Pe.toString()),ut.setAttribute("x2",Ae.toString()),ut.setAttribute("y2",Ne.toString()),xe&&Ge.setAttributes(ut,xe),ut},Ge.createPolygon=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ae.setAttribute("points",be),Pe&&Ge.setAttributes(Ae,Pe),Ae},Ge.createCircle=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ae.setAttribute("cx",(be/2).toString()),Ae.setAttribute("cy",(be/2).toString()),Ae.setAttribute("r",be.toString()),Pe&&Ge.setAttributes(Ae,Pe),Ae},Ge.createEllipse=function(be,Pe,Ae){var Ne=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ne.setAttribute("cx",(be/2).toString()),Ne.setAttribute("cy",(Pe/2).toString()),Ne.setAttribute("rx",(be/2).toString()),Ne.setAttribute("ry",(Pe/2).toString()),Ae&&Ge.setAttributes(Ne,Ae),Ne},Ge.createGroup=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","g");return be&&Ge.setAttributes(Pe,be),Pe},Ge.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ge.createMarker=function(be,Pe,Ae,Ne,xe,ut,Bt){var Qe=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ge.setAttributes(Qe,[["id",be],["orient",Pe],["markerWidth",Ae.toString()],["markerHeight",Ne.toString()],["refX",xe.toString()],["refY",ut.toString()]]),Qe.appendChild(Bt),Qe},Ge.createText=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","text");return Pe.setAttribute("x","0"),Pe.setAttribute("y","0"),be&&Ge.setAttributes(Pe,be),Pe},Ge.createTSpan=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ae.textContent=be,Pe&&Ge.setAttributes(Ae,Pe),Ae},Ge.createImage=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","image");return be&&Ge.setAttributes(Pe,be),Pe},Ge.createPoint=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ae.x=be,Ae.y=Pe,Ae},Ge.createPath=function(be,Pe){var Ae=document.createElementNS("http://www.w3.org/2000/svg","path");return Ae.setAttribute("d",be),Pe&&Ge.setAttributes(Ae,Pe),Ae},Ge}(),Le=function(){function Ge(){}return Ge.addKey=function(be){Ge.key=be},Object.defineProperty(Ge,"isLicensed",{get:function(){return!!Ge.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ge.key)},enumerable:!1,configurable:!0}),Ge}(),Ct=function(){function Ge(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ge.prototype.rasterize=function(be,Pe,Ae){var Ne=this;return new Promise(function(xe){var ut=Ae!==void 0?Ae:document.createElement("canvas");be===null&&(Ne.markersOnly=!0,Ne.naturalSize=!1);var Bt=document.createElementNS("http://www.w3.org/2000/svg","svg");Bt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Bt.setAttribute("width",Pe.width.baseVal.valueAsString),Bt.setAttribute("height",Pe.height.baseVal.valueAsString),Bt.setAttribute("viewBox","0 0 "+Pe.viewBox.baseVal.width.toString()+" "+Pe.viewBox.baseVal.height.toString()),Bt.innerHTML=Pe.innerHTML,Ne.naturalSize===!0?(Bt.width.baseVal.value=be.naturalWidth,Bt.height.baseVal.value=be.naturalHeight):Ne.width!==void 0&&Ne.height!==void 0&&(Bt.width.baseVal.value=Ne.width,Bt.height.baseVal.value=Ne.height),ut.width=Bt.width.baseVal.value,ut.height=Bt.height.baseVal.value;var Qe=Bt.outerHTML,it=ut.getContext("2d");Ne.markersOnly!==!0&&it.drawImage(be,0,0,ut.width,ut.height);var Ft=window.URL,Nt=new Image(ut.width,ut.height);Nt.setAttribute("crossOrigin","anonymous");var dt=new Blob([Qe],{type:"image/svg+xml"}),Kt=Ft.createObjectURL(dt);Nt.onload=function(){it.drawImage(Nt,0,0),Ft.revokeObjectURL(Kt);var wn=ut.toDataURL(Ne.imageType,Ne.imageQuality);xe(wn)},Nt.src=Kt})},Ge}(),xt=function(){},Ue=function(){function Ge(be){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+be+"_"}return Object.defineProperty(Ge.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.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(Ge.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ge.prototype.addClass=function(be){return this.styleSheet===void 0&&this.addStyleSheet(),be.name=""+this.classNamePrefix+be.localName,this.classes.push(be),this.styleSheet.sheet.insertRule("."+be.name+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length),be},Ge.prototype.addRule=function(be){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(be),this.styleSheet.sheet.insertRule(be.selector+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length)},Ge.prototype.addStyleSheet=function(){var be;this.styleSheet=document.createElement("style"),((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).appendChild(this.styleSheet),this.addRule(new bt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new bt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new bt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new at("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new at("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},Ge.prototype.removeStyleSheet=function(){var be;this.styleSheet&&(((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ge}(),bt=function(Ge,be){this.selector=Ge,this.style=be},at=function(Ge,be){this.localName=Ge,this.style=be},mt=function(){function Ge(be,Pe,Ae,Ne,xe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=be,this.displayMode=Pe,this.markerItems=Ae,this.uiStyleSettings=Ne,this.styles=xe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ge.prototype.show=function(be){var Pe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ae=document.createElement("div");Ae.className=this.toolbarBlockStyleClass.name,Ae.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ae),this.addActionButton(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(Ae,'<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(xe){var ut=document.createElement("div");ut.className=""+Pe.toolbarButtonStyleClass.name,ut.setAttribute("data-type-name",xe.typeName),ut.innerHTML=xe.icon,ut.addEventListener("click",function(){Pe.markerToolbarButtonClicked(ut,xe)}),Pe.buttons.push(ut),Pe.markerButtons.push(ut)}),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 Ne=document.createElement("div");Ne.className=this.toolbarBlockStyleClass.name,Ne.style.whiteSpace="nowrap",Ne.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ne),this.addActionButton(Ne,'<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(Ne,'<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()},Ge.prototype.addButtonClickListener=function(be){this.buttonClickListeners.push(be)},Ge.prototype.removeButtonClickListener=function(be){this.buttonClickListeners.indexOf(be)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(be),1)},Ge.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ge.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var be=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<be||Pe===be&&this.markerButtons.length-1===be?this.markerButtonBlock.appendChild(this.markerButtons[Pe]):(Pe===be&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Pe]))}},Ge.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")},Ge.prototype.resetButtonStyles=function(){var be=this;this.buttons.forEach(function(Pe){Pe.className=Pe.className.replace(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className=Pe.className.replace(be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:be.toolbarActiveButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name)})},Ge.prototype.addActionButton=function(be,Pe,Ae){var Ne=this,xe=document.createElement("div");switch(xe.className=""+this.toolbarButtonStyleClass.name,xe.innerHTML=Pe,xe.setAttribute("data-action",Ae),xe.addEventListener("click",function(){Ne.actionToolbarButtonClicked(xe,Ae)}),Ae){case"select":xe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":xe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":xe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":xe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":xe.style.fill=this.uiStyleSettings.closeButtonColor}be.appendChild(xe),this.buttons.push(xe)},Ge.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new at("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 at("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new at("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new at("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 at("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var be=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new at("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
|
|
|
padding: `+be+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new at("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new at("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new bt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new bt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},Ge.prototype.markerToolbarButtonClicked=function(be,Pe){this.setActiveButton(be),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ae){return Ae("marker",Pe)}),this.markerButtonOverflowBlock.style.display="none"},Ge.prototype.actionToolbarButtonClicked=function(be,Pe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ae){return Ae("action",Pe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ge.prototype.setActiveButton=function(be){this.resetButtonStyles(),be.className=be.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),be.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ge.prototype.setActiveMarkerButton=function(be){var Pe=this.markerButtons.find(function(Ae){return Ae.getAttribute("data-type-name")===be});Pe&&this.setActiveButton(Pe)},Ge.prototype.setCurrentMarker=function(be){var Pe=this;this.currentMarker=be,this.buttons.filter(function(Ae){return/delete|notes/.test(Ae.getAttribute("data-action"))}).forEach(function(Ae){Pe.currentMarker===void 0?(Ae.style.fillOpacity="0.4",Ae.style.pointerEvents="none"):(Ae.style.fillOpacity="1",Ae.style.pointerEvents="all")})},Ge}(),Oe=function(){function Ge(be,Pe,Ae,Ne){this.panels=[],this.panelButtons=[],this.markerjsContainer=be,this.displayMode=Pe,this.uiStyleSettings=Ae,this.styles=Ne,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ge.prototype.addStyles=function(){var be;this.toolboxStyleClass=this.styles.addClass(new at("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 at("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new at("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new at("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new at("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 at("toolbox-panel-row_colors",`
|
|
|
background-color: `+((be=this.uiStyleSettings.toolboxBackgroundColor)!==null&&be!==void 0?be:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new at("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 at("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new at("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new bt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new bt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},Ge.prototype.show=function(be){var Pe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ge.prototype.setPanelButtons=function(be){var Pe,Ae,Ne=this;this.panels=be,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+" "+((Ae=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ae!==void 0?Ae:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(xe){var ut;xe.uiStyleSettings=Ne.uiStyleSettings;var Bt=document.createElement("div");Bt.className=Ne.toolboxButtonStyleClass.name+" "+((ut=Ne.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ut!==void 0?ut:Ne.toolboxButtonStyleColorsClass.name),Bt.innerHTML=xe.icon,Bt.title=xe.title,Bt.addEventListener("click",function(){Ne.panelButtonClick(xe)}),Ne.panelButtons.push(Bt),Ne.buttonRow.appendChild(Bt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ge.prototype.panelButtonClick=function(be){var Pe=this,Ae=-1;if(be!==this.activePanel){Ae=this.panels.indexOf(be),this.panelRow.innerHTML="";var Ne=be.getUi();Ne.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ne),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=be}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(xe,ut){var Bt,Qe;xe.className=Pe.toolboxButtonStyleClass.name+" "+(ut===Ae?""+((Bt=Pe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Bt!==void 0?Bt:Pe.toolboxActiveButtonStyleColorsClass.name):""+((Qe=Pe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:Pe.toolboxButtonStyleColorsClass.name))})},Ge}(),te=function(Ge,be){this.title=Ge,this.icon=be},ee=function(Ge){function be(Pe,Ae,Ne,xe){var ut=Ge.call(this,Pe,xe||'<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 ut.colors=[],ut.addTransparent=!1,ut.colorBoxes=[],ut.colors=Ae,ut.currentColor=Ne,ut.setCurrentColor=ut.setCurrentColor.bind(ut),ut.getColorBox=ut.getColorBox.bind(ut),ut}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.overflow="hidden",Ae.style.whiteSpace="nowrap",this.colors.forEach(function(Ne){var xe=Pe.getColorBox(Ne);Ae.appendChild(xe),Pe.colorBoxes.push(xe)}),Ae},be.prototype.getColorBox=function(Pe){var Ae=this,Ne=this.uiStyleSettings.toolbarHeight/4,xe=this.uiStyleSettings.toolbarHeight-Ne,ut=document.createElement("div");ut.style.display="inline-block",ut.style.boxSizing="content-box",ut.style.width=xe-2+"px",ut.style.height=xe-2+"px",ut.style.padding="1px",ut.style.marginRight="2px",ut.style.marginBottom="2px",ut.style.borderWidth="2px",ut.style.borderStyle="solid",ut.style.borderRadius=(xe+2)/2+"px",ut.style.borderColor=Pe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ut.addEventListener("click",function(){Ae.setCurrentColor(Pe,ut)});var Bt=document.createElement("div");return Bt.style.display="inline-block",Bt.style.width=xe-2+"px",Bt.style.height=xe-2+"px",Bt.style.backgroundColor=Pe,Bt.style.borderRadius=xe/2+"px",Pe==="transparent"&&(Bt.style.fill=this.uiStyleSettings.toolboxAccentColor,Bt.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>`),ut.appendChild(Bt),ut},be.prototype.setCurrentColor=function(Pe,Ae){var Ne=this;this.currentColor=Pe,this.colorBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Pe)},be}(te),de=function(){function Ge(be,Pe,Ae){this._state="new",this._isSelected=!1,this._container=be,this._overlayContainer=Pe,this.globalSettings=Ae,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ge.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ge.prototype.ownsTarget=function(be){return!1},Object.defineProperty(Ge.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ge.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ge.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ge.prototype.pointerDown=function(be,Pe){},Ge.prototype.dblClick=function(be,Pe){},Ge.prototype.manipulate=function(be){},Ge.prototype.pointerUp=function(be){this.stateChanged()},Ge.prototype.dispose=function(){},Ge.prototype.addMarkerVisualToContainer=function(be){this.container.childNodes.length>0?this.container.insertBefore(be,this.container.childNodes[0]):this.container.appendChild(be)},Ge.prototype.getState=function(){return{typeName:Ge.typeName,state:this.state,notes:this.notes}},Ge.prototype.restoreState=function(be){this._state=be.state,this.notes=be.notes},Ge.prototype.scale=function(be,Pe){},Ge.prototype.colorChanged=function(be){this.onColorChanged&&this.onColorChanged(be),this.stateChanged()},Ge.prototype.fillColorChanged=function(be){this.onFillColorChanged&&this.onFillColorChanged(be),this.stateChanged()},Ge.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var be=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),be.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(be)&&this.onStateChanged(this)}},Ge.typeName="MarkerBase",Ge}(),se=function(){function Ge(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ge.prototype.findGripByVisual=function(be){return this.topLeft.ownsTarget(be)?this.topLeft:this.topCenter.ownsTarget(be)?this.topCenter:this.topRight.ownsTarget(be)?this.topRight:this.centerLeft.ownsTarget(be)?this.centerLeft:this.centerRight.ownsTarget(be)?this.centerRight:this.bottomLeft.ownsTarget(be)?this.bottomLeft:this.bottomCenter.ownsTarget(be)?this.bottomCenter:this.bottomRight.ownsTarget(be)?this.bottomRight:void 0},Ge}(),he=function(){function Ge(){this.GRIP_SIZE=10,this.visual=Ve.createGroup(),this.visual.appendChild(Ve.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ve.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ge.prototype.ownsTarget=function(be){return be===this.visual||be===this.visual.childNodes[0]||be===this.visual.childNodes[1]},Ge}(),ve=function(){function Ge(){}return Ge.toITransformMatrix=function(be){return{a:be.a,b:be.b,c:be.c,d:be.d,e:be.e,f:be.f}},Ge.toSVGMatrix=function(be,Pe){return be.a=Pe.a,be.b=Pe.b,be.c=Pe.c,be.d=Pe.d,be.e=Pe.e,be.f=Pe.f,be},Ge}(),Ee=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.left=0,xe.top=0,xe.width=0,xe.height=0,xe.defaultSize={x:50,y:20},xe.offsetX=0,xe.offsetY=0,xe.rotationAngle=0,xe.CB_DISTANCE=10,xe._suppressMarkerCreateEvent=!1,xe.container.transform.baseVal.appendItem(Ve.createTransform()),xe.setupControlBox(),xe}return Te(be,Ge),Object.defineProperty(be.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"visual",{get:function(){return this._visual},set:function(Pe){this._visual=Pe;var Ae=Ve.createTransform();this._visual.transform.baseVal.appendItem(Ae)},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Pe){return!!Ge.prototype.ownsTarget.call(this,Pe)||!!(this.controlGrips.findGripByVisual(Pe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Pe))},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),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 Ne=this.unrotatePoint(Pe);if(this.manipulationStartX=Ne.x,this.manipulationStartY=Ne.y,this.offsetX=Ne.x-this.left,this.offsetY=Ne.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ae),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ae)){this.activeGrip=this.rotatorGrip;var xe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=xe.x-this.width/2,this.top=xe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ut=this.container.transform.baseVal.getItem(0);ut.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ut,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},be.prototype.pointerUp=function(Pe){var Ae=this.state;Ge.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",Ae==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},be.prototype.moveVisual=function(Pe){this.visual.style.transform="translate("+Pe.x+"px, "+Pe.y+"px)"},be.prototype.manipulate=function(Pe){var Ae=this.unrotatePoint(Pe);this.state==="creating"?this.resize(Pe):this.state==="move"?(this.left=this.manipulationStartLeft+(Ae.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ae.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ae):this.state==="rotate"&&this.rotate(Pe)},be.prototype.resize=function(Pe){var Ae=this.manipulationStartLeft,Ne=this.manipulationStartWidth,xe=this.manipulationStartTop,ut=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ae=this.manipulationStartLeft+Pe.x-this.manipulationStartX,Ne=this.manipulationStartWidth+this.manipulationStartLeft-Ae;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ne=this.manipulationStartWidth+Pe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:xe=this.manipulationStartTop+Pe.y-this.manipulationStartY,ut=this.manipulationStartHeight+this.manipulationStartTop-xe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ut=this.manipulationStartHeight+Pe.y-this.manipulationStartY}Ne>=0?(this.left=Ae,this.width=Ne):(this.left=Ae+Ne,this.width=-Ne),ut>=0?(this.top=xe,this.height=ut):(this.top=xe+ut,this.height=-ut),this.setSize()},be.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},be.prototype.rotate=function(Pe){if(Math.abs(Pe.x-this.centerX)>.1){var Ae=Math.sign(Pe.x-this.centerX);this.rotationAngle=180*Math.atan((Pe.y-this.centerY)/(Pe.x-this.centerX))/Math.PI+90*Ae,this.applyRotation()}},be.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)},be.prototype.rotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ae=this.container.getCTM(),Ne=Ve.createPoint(Pe.x,Pe.y);return{x:(Ne=Ne.matrixTransform(Ae)).x,y:Ne.y}},be.prototype.unrotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ae=this.container.getCTM();Ae=Ae.inverse();var Ne=Ve.createPoint(Pe.x,Pe.y);return{x:(Ne=Ne.matrixTransform(Ae)).x,y:Ne.y}},be.prototype.select=function(){Ge.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Ge.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=Ve.createGroup();var Pe=Ve.createTransform();Pe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Pe),this.container.appendChild(this.controlBox),this.controlRect=Ve.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=Ve.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"},be.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()},be.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()},be.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(Ve.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},be.prototype.positionGrips=function(){var Pe=this.controlGrips.topLeft.GRIP_SIZE,Ae=-Pe/2,Ne=Ae,xe=(this.width+this.CB_DISTANCE)/2-Pe/2,ut=(this.height+this.CB_DISTANCE)/2-Pe/2,Bt=this.height+this.CB_DISTANCE-Pe/2,Qe=this.width+this.CB_DISTANCE-Pe/2;this.positionGrip(this.controlGrips.topLeft.visual,Ae,Ne),this.positionGrip(this.controlGrips.topCenter.visual,xe,Ne),this.positionGrip(this.controlGrips.topRight.visual,Qe,Ne),this.positionGrip(this.controlGrips.centerLeft.visual,Ae,ut),this.positionGrip(this.controlGrips.centerRight.visual,Qe,ut),this.positionGrip(this.controlGrips.bottomLeft.visual,Ae,Bt),this.positionGrip(this.controlGrips.bottomCenter.visual,xe,Bt),this.positionGrip(this.controlGrips.bottomRight.visual,Qe,Bt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,xe,Ne-3*this.CB_DISTANCE)},be.prototype.positionGrip=function(Pe,Ae,Ne){var xe=Pe.transform.baseVal.getItem(0);xe.setTranslate(Ae,Ne),Pe.transform.baseVal.replaceItem(xe,0)},be.prototype.hideControlBox=function(){this.controlBox.style.display="none"},be.prototype.showControlBox=function(){this.controlBox.style.display=""},be.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ve.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ve.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ge.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ae=Pe;this.left=Ae.left,this.top=Ae.top,this.width=Ae.width,this.height=Ae.height,this.rotationAngle=Ae.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ae.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ae.containerTransformMatrix))},be.prototype.scale=function(Pe,Ae){Ge.prototype.scale.call(this,Pe,Ae);var Ne=this.rotatePoint({x:this.left,y:this.top}),xe=this.unrotatePoint({x:Ne.x*Pe,y:Ne.y*Ae});this.left=xe.x,this.top=xe.y,this.width=this.width*Pe,this.height=this.height*Ae,this.adjustControlBox()},be}(de),Me=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.opacity=1,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},be.prototype.createVisual=function(){this.visual=Ve.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)},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ge.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.setSize()},be.prototype.setSize=function(){Ge.prototype.setSize.call(this),Ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Pe){Ge.prototype.pointerUp.call(this,Pe),this.setSize()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ge.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){var Ae=Pe;this.fillColor=Ae.fillColor,this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.opacity=Ae.opacity,this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ae){Ge.prototype.scale.call(this,Pe,Ae),this.setSize()},be.title="Rectangle marker",be}(Ee),Be=function(Ge){function be(Pe,Ae,Ne,xe){var ut=Ge.call(this,Pe,xe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ut.widths=[],ut.widthBoxes=[],ut.widths=Ae,ut.currentWidth=Ne,ut.setCurrentWidth=ut.setCurrentWidth.bind(ut),ut}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.display="flex",Ae.style.overflow="hidden",Ae.style.flexGrow="2",this.widths.forEach(function(Ne){var xe=document.createElement("div");xe.style.display="flex",xe.style.flexGrow="2",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderColor=Ne===Pe.currentWidth?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentWidth(Ne,xe)}),Ae.appendChild(xe);var ut=document.createElement("div");ut.innerText=Ne.toString(),ut.style.marginRight="5px",xe.appendChild(ut);var Bt=document.createElement("div");Bt.style.minHeight="20px",Bt.style.flexGrow="2",Bt.style.display="flex",Bt.style.alignItems="center";var Qe=document.createElement("hr");Qe.style.minWidth="20px",Qe.style.border="0px",Qe.style.borderTop=Ne+"px solid "+Pe.uiStyleSettings.toolboxColor,Qe.style.flexGrow="2",Bt.appendChild(Qe),xe.appendChild(Bt),Pe.widthBoxes.push(xe)}),Ae},be.prototype.setCurrentWidth=function(Pe,Ae){var Ne=this;this.currentWidth=Pe,this.widthBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},be}(te),je=function(Ge){function be(Pe,Ae,Ne,xe){var ut=Ge.call(this,Pe,xe||'<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 ut.styles=[],ut.styleBoxes=[],ut.styles=Ae,ut.currentStyle=Ne,ut.setCurrentStyle=ut.setCurrentStyle.bind(ut),ut}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.display="flex",Ae.style.overflow="hidden",Ae.style.flexGrow="2",this.styles.forEach(function(Ne){var xe=document.createElement("div");xe.style.display="flex",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.overflow="hidden",xe.style.maxWidth=100/Pe.styles.length-5+"%",xe.style.borderColor=Ne===Pe.currentStyle?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentStyle(Ne,xe)}),Ae.appendChild(xe);var ut=document.createElement("div");ut.style.minHeight="20px",ut.style.flexGrow="2",ut.style.overflow="hidden";var Bt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Pe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ne!==""?'stroke-dasharray="'+Ne+'"':"")+` />
|
|
|
</svg>`;ut.innerHTML=Bt,xe.appendChild(ut),Pe.styleBoxes.push(xe)}),Ae},be.prototype.setCurrentStyle=function(Pe,Ae){var Ne=this;this.currentStyle=Pe,this.styleBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},be}(te),_e=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.strokeColor=Ne.defaultColor,xe.strokeWidth=Ne.defaultStrokeWidth,xe.strokeDasharray=Ne.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Ne.defaultColorSet,Ne.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new je("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return Te(be,Ge),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="FrameMarker",be.title="Frame marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',be}(Me),Je=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Xe=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.x1=0,xe.y1=0,xe.x2=0,xe.y2=0,xe.defaultLength=50,xe.manipulationStartX=0,xe.manipulationStartY=0,xe.manipulationStartX1=0,xe.manipulationStartY1=0,xe.manipulationStartX2=0,xe.manipulationStartY2=0,xe.setupControlBox(),xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!!Ge.prototype.ownsTarget.call(this,Pe)||!(!this.grip1.ownsTarget(Pe)&&!this.grip2.ownsTarget(Pe))},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),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(Ae)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ae)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},be.prototype.pointerUp=function(Pe){var Ae=this.state;Ge.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",Ae==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},be.prototype.adjustVisual=function(){},be.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)},be.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()},be.prototype.select=function(){Ge.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Ge.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=Ve.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){this.positionGrips()},be.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},be.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(Ve.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},be.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)},be.prototype.positionGrip=function(Pe,Ae,Ne){var xe=Pe.transform.baseVal.getItem(0);xe.setTranslate(Ae,Ne),Pe.transform.baseVal.replaceItem(xe,0)},be.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ge.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ae=Pe;this.x1=Ae.x1,this.y1=Ae.y1,this.x2=Ae.x2,this.y2=Ae.y2},be.prototype.scale=function(Pe,Ae){Ge.prototype.scale.call(this,Pe,Ae),this.x1=this.x1*Pe,this.y1=this.y1*Ae,this.x2=this.x2*Pe,this.y2=this.y2*Ae,this.adjustVisual(),this.adjustControlBox()},be}(de),ht=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.strokeColor=Ne.defaultColor,xe.strokeWidth=Ne.defaultStrokeWidth,xe.strokeDasharray=Ne.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Ne.defaultColorSet,Ne.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new je("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorLine&&Pe!==this.visibleLine)},be.prototype.createVisual=function(){this.visual=Ve.createGroup(),this.selectorLine=Ve.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ve.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)},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},be.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()),Ve.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ve.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ve.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ae=Pe;this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.createVisual(),this.adjustVisual()},be.typeName="LineMarker",be.title="Line marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',be}(Xe),Ze=function(Ge){function be(Pe,Ae,Ne,xe){var ut=Ge.call(this,Pe,xe||'<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 ut.fonts=[],ut.fontBoxes=[],ut.fonts=Ae,ut.currentFont=Ne,ut.setCurrentFont=ut.setCurrentFont.bind(ut),ut}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.overflow="hidden",Ae.style.flexGrow="2",this.fonts.forEach(function(Ne){var xe=document.createElement("div");xe.style.display="inline-block",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.overflow="hidden",xe.style.maxWidth=100/Pe.fonts.length-5+"%",xe.style.borderColor=Ne===Pe.currentFont?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentFont(Ne,xe)}),Ae.appendChild(xe);var ut=document.createElement("div");ut.style.display="flex",ut.style.minHeight="20px",ut.style.flexGrow="2",ut.style.fontFamily=Ne,ut.style.overflow="hidden";var Bt=document.createElement("div");Bt.style.whiteSpace="nowrap",Bt.style.overflow="hidden",Bt.style.textOverflow="ellipsis",Bt.innerHTML="The quick brown fox jumps over the lazy dog",ut.appendChild(Bt),xe.appendChild(ut),Pe.fontBoxes.push(xe)}),Ae},be.prototype.setCurrentFont=function(Pe,Ae){var Ne=this;this.currentFont=Pe,this.fontBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},be}(te),Mt=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.color="transparent",xe.padding=5,xe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",xe.text=xe.DEFAULT_TEXT,xe.isMoved=!1,xe.color=Ne.defaultColor,xe.fontFamily=Ne.defaultFontFamily,xe.defaultSize={x:100,y:30},xe.setColor=xe.setColor.bind(xe),xe.setFont=xe.setFont.bind(xe),xe.renderText=xe.renderText.bind(xe),xe.sizeText=xe.sizeText.bind(xe),xe.textEditDivClicked=xe.textEditDivClicked.bind(xe),xe.showTextEditor=xe.showTextEditor.bind(xe),xe.setSize=xe.setSize.bind(xe),xe.positionTextEditor=xe.positionTextEditor.bind(xe),xe.colorPanel=new ee("Color",Ne.defaultColorSet,Ne.defaultColor),xe.colorPanel.onColorChanged=xe.setColor,xe.fontFamilyPanel=new Ze("Font",Ne.defaultFontFamilies,Ne.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){if(Ge.prototype.ownsTarget.call(this,Pe)||Pe===this.visual||Pe===this.textElement||Pe===this.bgRectangle)return!0;var Ae=!1;return this.textElement.childNodes.forEach(function(Ne){Ne===Pe&&(Ae=!0)}),Ae},be.prototype.createVisual=function(){this.visual=Ve.createGroup(),this.bgRectangle=Ve.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ve.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ve.createTransform()),this.textElement.transform.baseVal.appendItem(Ve.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.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(Ae){Pe.textElement.appendChild(Ve.createTSpan(Ae.trim()===""?" ":Ae.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},be.prototype.getTextScale=function(){var Pe=this.textElement.getBBox(),Ae=1;if(Pe.width>0&&Pe.height>0){var Ne=(1*this.width-this.width*this.padding*2/100)/Pe.width,xe=(1*this.height-this.height*this.padding*2/100)/Pe.height;Ae=Math.min(Ne,xe)}return Ae},be.prototype.getTextPosition=function(Pe){var Ae=this.textElement.getBBox(),Ne=0,xe=0;return Ae.width>0&&Ae.height>0&&(Ne=(this.width-Ae.width*Pe)/2,xe=this.height/2-Ae.height*Pe/2),{x:Ne,y:xe}},be.prototype.sizeText=function(){var Pe=this.textElement.getBBox(),Ae=this.getTextScale(),Ne=this.getTextPosition(Ae);Ne.y-=Pe.y*Ae,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ne.x+"px, "+Ne.y+"px) scale("+Ae+", "+Ae+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ne.x,Ne.y),this.textElement.transform.baseVal.getItem(1).setScale(Ae,Ae))},be.prototype.manipulate=function(Pe){Ge.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)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.isMoved=!0,this.setSize(),this.sizeText()},be.prototype.setSize=function(){Ge.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ve.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},be.prototype.pointerUp=function(Pe){var Ae=this.state;Ae==="creating"&&(this._suppressMarkerCreateEvent=!0),Ge.prototype.pointerUp.call(this,Pe),this.setSize(),(Ae==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},be.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(Ae){Ae.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ae=Number.parseFloat(Pe.textEditor.style.fontSize);Pe.textEditor.clientWidth>=Number.parseInt(Pe.textEditor.style.maxWidth)&&Ae>.9;)Ae-=.1,Pe.textEditor.style.fontSize=Math.max(Ae,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ae){Ae.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ae){if(Ae.clipboardData){var Ne=Ae.clipboardData.getData("text"),xe=window.getSelection();if(!xe.rangeCount)return!1;xe.deleteFromDocument(),xe.getRangeAt(0).insertNode(document.createTextNode(Ne)),Ae.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")},be.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Pe=this.getTextScale(),Ae=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ne=this.textElement.getBBox(),xe={x:Ne.width*Pe,y:Ne.height*Pe};Ae.x-=xe.x/2,Ae.y-=xe.y/2,this.textEditor.style.top=Ae.y+"px",this.textEditor.style.left=Ae.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ae.x+"px",this.textEditor.style.fontSize=Math.max(16*Pe,12)+"px",this.textElement.style.display="none"}},be.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()},be.prototype.select=function(){Ge.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},be.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ge.prototype.deselect.call(this)},be.prototype.dblClick=function(Pe,Ae){Ge.prototype.dblClick.call(this,Pe,Ae),this.showTextEditor()},be.prototype.setColor=function(Pe){this.textElement&&Ve.setAttributes(this.textElement,[["fill",Pe]]),this.color=Pe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Pe)},be.prototype.setFont=function(Pe){this.textElement&&Ve.setAttributes(this.textElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},be.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},be.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ae=Pe;this.color=Ae.color,this.fontFamily=Ae.fontFamily,this.padding=Ae.padding,this.text=Ae.text,this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ae){Ge.prototype.scale.call(this,Pe,Ae),this.setSize(),this.sizeText(),this.positionTextEditor()},be.typeName="TextMarker",be.title="Text marker",be.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>',be}(Ee),ot=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.color="transparent",xe.lineWidth=3,xe.drawing=!1,xe.pixelRatio=1,xe.color=Ne.defaultColor,xe.lineWidth=Ne.defaultStrokeWidth,xe.pixelRatio=Ne.freehandPixelRatio,xe.setColor=xe.setColor.bind(xe),xe.addCanvas=xe.addCanvas.bind(xe),xe.finishCreation=xe.finishCreation.bind(xe),xe.setLineWidth=xe.setLineWidth.bind(xe),xe.colorPanel=new ee("Color",Ne.defaultColorSet,Ne.defaultColor),xe.colorPanel.onColorChanged=xe.setColor,xe.lineWidthPanel=new Be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),xe.lineWidthPanel.onWidthChanged=xe.setLineWidth,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.drawingImage)},be.prototype.createVisual=function(){this.visual=Ve.createGroup(),this.drawingImage=Ve.createImage(),this.visual.appendChild(this.drawingImage);var Pe=Ve.createTransform();this.visual.transform.baseVal.appendItem(Pe),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Pe,Ae){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):Ge.prototype.pointerDown.call(this,Pe,Ae)},be.prototype.manipulate=function(Pe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Pe.x,Pe.y),this.canvasContext.stroke()):Ge.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),Ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Pe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ge.prototype.pointerUp.call(this,Pe)},be.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)},be.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ge.prototype.select.call(this)},be.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ge.prototype.deselect.call(this)},be.prototype.finishCreation=function(){for(var Pe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ae=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ne=Ae[0],xe=Ae[1],ut=Ae[2],Bt=Ae[3],Qe=!1,it=0;it<this.canvasElement.height;it++)for(var Ft=0;Ft<this.canvasElement.width;Ft++)Pe.data[it*this.canvasElement.width*4+4*Ft+3]>0&&(Qe=!0,it<xe&&(xe=it),Ft<Ne&&(Ne=Ft),it>Bt&&(Bt=it),Ft>ut&&(ut=Ft));if(Qe){this.left=Ne/this.pixelRatio,this.top=xe/this.pixelRatio,this.width=(ut-Ne)/this.pixelRatio,this.height=(Bt-xe)/this.pixelRatio;var Nt=document.createElement("canvas");Nt.width=ut-Ne,Nt.height=Bt-xe,Nt.getContext("2d").putImageData(this.canvasContext.getImageData(Ne,xe,ut-Ne,Bt-xe),0,0),this.drawingImgUrl=Nt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},be.prototype.setDrawingImage=function(){Ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ve.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},be.prototype.setColor=function(Pe){this.color=Pe,this.colorChanged(Pe)},be.prototype.setLineWidth=function(Pe){this.lineWidth=Pe},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({drawingImgUrl:this.drawingImgUrl},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.drawingImgUrl=Pe.drawingImgUrl,this.setDrawingImage()},be.prototype.scale=function(Pe,Ae){Ge.prototype.scale.call(this,Pe,Ae),this.setDrawingImage()},be.typeName="FreehandMarker",be.title="Freehand marker",be.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>',be}(Ee),Ot=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ne||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return xe.typeBoxes=[],xe.currentType=Ae,xe.setCurrentType=xe.setCurrentType.bind(xe),xe}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");Ae.style.display="flex",Ae.style.overflow="hidden",Ae.style.flexGrow="2";for(var Ne=function(Bt){var Qe="both";switch(Bt){case 0:Qe="both";break;case 1:Qe="start";break;case 2:Qe="end";break;case 3:Qe="none"}var it=document.createElement("div");if(it.style.display="flex",it.style.flexGrow="2",it.style.alignItems="center",it.style.justifyContent="space-between",it.style.padding="5px",it.style.borderWidth="2px",it.style.borderStyle="solid",it.style.borderColor=Qe===xe.currentType?xe.uiStyleSettings.toolboxAccentColor:"transparent",it.addEventListener("click",function(){Pe.setCurrentType(Qe,it)}),Ae.appendChild(it),Qe==="both"||Qe==="start"){var Ft=document.createElement("div");Ft.style.display="flex",Ft.style.alignItems="center",Ft.style.minHeight="20px",Ft.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="`+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Ft.style.marginLeft="5px",it.appendChild(Ft)}var Nt=document.createElement("div");Nt.style.display="flex",Nt.style.alignItems="center",Nt.style.minHeight="20px",Nt.style.flexGrow="2";var dt=document.createElement("hr");if(dt.style.minWidth="20px",dt.style.border="0px",dt.style.borderTop="3px solid "+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee"),dt.style.flexGrow="2",Nt.appendChild(dt),it.appendChild(Nt),Qe==="both"||Qe==="end"){var Kt=document.createElement("div");Kt.style.display="flex",Kt.style.alignItems="center",Kt.style.minHeight="20px",Kt.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="`+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Kt.style.marginRight="5px",it.appendChild(Kt)}xe.typeBoxes.push(it)},xe=this,ut=0;ut<4;ut++)Ne(ut);return Ae},be.prototype.setCurrentType=function(Pe,Ae){var Ne=this;this.currentType=Pe,this.typeBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},be}(te),Pt=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.arrowType="end",xe.arrowBaseHeight=10,xe.arrowBaseWidth=10,xe.getArrowPoints=xe.getArrowPoints.bind(xe),xe.setArrowType=xe.setArrowType.bind(xe),xe.arrowTypePanel=new Ot("Arrow type","end"),xe.arrowTypePanel.onArrowTypeChanged=xe.setArrowType,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.arrow1&&Pe!==this.arrow2)},be.prototype.getArrowPoints=function(Pe,Ae){var Ne=this.arrowBaseWidth+2*this.strokeWidth,xe=this.arrowBaseHeight+2*this.strokeWidth;return Pe-Ne/2+","+(Ae+xe/2)+" "+Pe+","+(Ae-xe/2)+" "+(Pe+Ne/2)+","+(Ae+xe/2)},be.prototype.createTips=function(){this.arrow1=Ve.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ve.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ve.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ve.createTransform()),this.visual.appendChild(this.arrow2)},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Ge.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",Ve.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ve.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 Ae=this.arrow1.transform.baseVal.getItem(0);Ae.setRotate(Pe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ae,0);var Ne=this.arrow2.transform.baseVal.getItem(0);Ne.setRotate(Pe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ne,0)}},be.prototype.setArrowType=function(Pe){this.arrowType=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({arrowType:this.arrowType},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ae=Pe;this.arrowType=Ae.arrowType,this.createTips(),this.adjustVisual()},be.typeName="ArrowMarker",be.title="Arrow marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',be}(ht),Dt=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.fillColor=Ne.defaultFillColor,xe.strokeWidth=0,xe.fillPanel=new ee("Color",Ne.defaultColorSet,Ne.defaultFillColor),xe.fillPanel.onColorChanged=xe.setFillColor,xe}return Te(be,Ge),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="CoverMarker",be.title="Cover marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',be}(Me),Wt=function(Ge){function be(Pe,Ae,Ne,xe){var ut=Ge.call(this,Pe,xe||'<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 ut.opacities=[],ut.opacityBoxes=[],ut.opacities=Ae,ut.currentOpacity=Ne,ut.setCurrentOpacity=ut.setCurrentOpacity.bind(ut),ut}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ae=document.createElement("div");return Ae.style.display="flex",Ae.style.overflow="hidden",Ae.style.flexGrow="2",Ae.style.justifyContent="space-between",this.opacities.forEach(function(Ne){var xe=document.createElement("div");xe.style.display="flex",xe.style.alignItems="center",xe.style.justifyContent="center",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderColor=Ne===Pe.currentOpacity?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentOpacity(Ne,xe)}),Ae.appendChild(xe);var ut=document.createElement("div");ut.innerText=100*Ne+"%",xe.appendChild(ut),Pe.opacityBoxes.push(xe)}),Ae},be.prototype.setCurrentOpacity=function(Pe,Ae){var Ne=this;this.currentOpacity=Pe,this.opacityBoxes.forEach(function(xe){xe.style.borderColor=xe===Ae?Ne.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},be}(te),Lt=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.setOpacity=xe.setOpacity.bind(xe),xe.fillColor=Ne.defaultHighlightColor,xe.strokeWidth=0,xe.opacity=Ne.defaultHighlightOpacity,xe.fillPanel=new ee("Color",Ne.defaultColorSet,xe.fillColor),xe.fillPanel.onColorChanged=xe.setFillColor,xe.opacityPanel=new Wt("Opacity",Ne.defaultOpacitySteps,xe.opacity),xe.opacityPanel.onOpacityChanged=xe.setOpacity,xe}return Te(be,Ge),be.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="HighlightMarker",be.title="Highlight marker",be.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>',be}(Dt),qe='<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>',Ke='<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>',Rt=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.bgColor="transparent",xe.tipPosition={x:0,y:0},xe.tipBase1Position={x:0,y:0},xe.tipBase2Position={x:0,y:0},xe.tipMoving=!1,xe.color=Ne.defaultStrokeColor,xe.bgColor=Ne.defaultFillColor,xe.fontFamily=Ne.defaultFontFamily,xe.defaultSize={x:100,y:30},xe.setBgColor=xe.setBgColor.bind(xe),xe.getTipPoints=xe.getTipPoints.bind(xe),xe.positionTip=xe.positionTip.bind(xe),xe.setTipPoints=xe.setTipPoints.bind(xe),xe.colorPanel=new ee("Text color",Ne.defaultColorSet,xe.color,qe),xe.colorPanel.onColorChanged=xe.setColor,xe.bgColorPanel=new ee("Fill color",Ne.defaultColorSet,xe.bgColor,Ke),xe.bgColorPanel.onColorChanged=xe.setBgColor,xe.fontFamilyPanel=new Ze("Font",Ne.defaultFontFamilies,Ne.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe.tipGrip=new he,xe.tipGrip.visual.transform.baseVal.appendItem(Ve.createTransform()),xe.controlBox.appendChild(xe.tipGrip.visual),xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return Ge.prototype.ownsTarget.call(this,Pe)||this.tipGrip.ownsTarget(Pe)||this.tip===Pe},be.prototype.createTip=function(){Ve.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ve.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},be.prototype.pointerDown=function(Pe,Ae){this.state==="new"&&Ge.prototype.pointerDown.call(this,Pe,Ae),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ae)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ge.prototype.pointerDown.call(this,Pe,Ae)},be.prototype.pointerUp=function(Pe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ge.prototype.pointerUp.call(this,Pe);else{var Ae=this.state==="creating";Ge.prototype.pointerUp.call(this,Pe),this.setTipPoints(Ae),this.positionTip()}},be.prototype.manipulate=function(Pe){if(this.tipMoving){var Ae=this.unrotatePoint(Pe);this.tipPosition={x:Ae.x-this.manipulationStartLeft,y:Ae.y-this.manipulationStartTop},this.positionTip()}else Ge.prototype.manipulate.call(this,Pe)},be.prototype.setBgColor=function(Pe){this.bgRectangle&&this.tip&&(Ve.setAttributes(this.bgRectangle,[["fill",Pe]]),Ve.setAttributes(this.tip,[["fill",Pe]])),this.bgColor=Pe,this.fillColorChanged(Pe)},be.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},be.prototype.setTipPoints=function(Pe){Pe===void 0&&(Pe=!1);var Ae=Math.min(this.height/2,15),Ne=this.height/5;Pe&&(this.tipPosition={x:Ae+Ne/2,y:this.height+20});var xe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?xe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ne=this.width/5,Ae=Math.min(this.width/2,15),this.tipBase1Position={x:Ae,y:0},this.tipBase2Position={x:Ae+Ne,y:0}):(this.tipBase1Position={x:0,y:Ae},this.tipBase2Position={x:0,y:Ae+Ne}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?xe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ne=this.width/5,Ae=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ae-Ne,y:0},this.tipBase2Position={x:this.width-Ae,y:0}):(this.tipBase1Position={x:this.width,y:Ae},this.tipBase2Position={x:this.width,y:Ae+Ne}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?xe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ne=this.width/5,Ae=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ae-Ne,y:this.height},this.tipBase2Position={x:this.width-Ae,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ae-Ne},this.tipBase2Position={x:this.width,y:this.height-Ae}):xe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ne=this.width/5,Ae=Math.min(this.width/2,15),this.tipBase1Position={x:Ae,y:this.height},this.tipBase2Position={x:Ae+Ne,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ae},this.tipBase2Position={x:0,y:this.height-Ae-Ne})},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.positionTip()},be.prototype.positionTip=function(){Ve.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(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.select=function(){this.positionTip(),Ge.prototype.select.call(this)},be.prototype.getState=function(){var Pe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ae=Pe;this.bgColor=Ae.bgColor,this.tipPosition=Ae.tipPosition,Ge.prototype.restoreState.call(this,Pe),this.createTip(),this.setTipPoints()},be.prototype.scale=function(Pe,Ae){Ge.prototype.scale.call(this,Pe,Ae),this.tipPosition={x:this.tipPosition.x*Pe,y:this.tipPosition.y*Ae},this.positionTip()},be.typeName="CalloutMarker",be.title="Callout marker",be.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>',be}(Mt),Sn=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.opacity=1,xe.strokeColor=Ne.defaultColor,xe.strokeWidth=Ne.defaultStrokeWidth,xe.strokeDasharray=Ne.defaultStrokeDasharray,xe.fillColor=Ne.defaultFillColor,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.setOpacity=xe.setOpacity.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe.strokePanel=new ee("Line color",We(Ne.defaultColorSet,["transparent"]),Ne.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.fillPanel=new ee("Fill color",We(Ne.defaultColorSet,["transparent"]),xe.fillColor,Ke),xe.fillPanel.onColorChanged=xe.setFillColor,xe.strokeWidthPanel=new Be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new je("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe.opacityPanel=new Wt("Opacity",Ne.defaultOpacitySteps,xe.opacity),xe.opacityPanel.onOpacityChanged=xe.setOpacity,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},be.prototype.createVisual=function(){this.visual=Ve.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)},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ge.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.setSize()},be.prototype.setSize=function(){Ge.prototype.setSize.call(this),Ve.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},be.prototype.pointerUp=function(Pe){Ge.prototype.pointerUp.call(this,Pe),this.setSize()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ae=Pe;this.fillColor=Ae.fillColor,this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.opacity=Ae.opacity,this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ae){Ge.prototype.scale.call(this,Pe,Ae),this.setSize()},be.typeName="EllipseMarker",be.title="Ellipse marker",be.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>',be}(Ee),Pn=function(Ge){function be(Pe,Ae,Ne){return Ge.call(this,Pe,Ae,Ne)||this}return Te(be,Ge),Object.defineProperty(be.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.tip1&&Pe!==this.tip2)},be.prototype.createTips=function(){this.tip1=Ve.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(Ve.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ve.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(Ve.createTransform()),this.visual.appendChild(this.tip2)},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Ge.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ve.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()]]),Ve.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),Ae=this.tip1.transform.baseVal.getItem(0);Ae.setRotate(Pe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ae,0);var Ne=this.tip2.transform.baseVal.getItem(0);Ne.setRotate(Pe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ne,0)}},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe),this.createTips(),this.adjustVisual()},be.typeName="MeasurementMarker",be.title="Measurement marker",be.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>',be}(ht),_t=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.strokePanel.colors=Ne.defaultColorSet,xe.fillColor="transparent",xe}return Te(be,Ge),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="EllipseFrameMarker",be.title="Ellipse frame marker",be.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>',be}(Sn),rn=function(){function Ge(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ge.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ge.prototype.addUndoStep=function(be){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(be)||(this.undoStack.push(be),JSON.stringify(this.lastRedoStep)!==JSON.stringify(be)&&this.redoStack.splice(0,this.redoStack.length))},Ge.prototype.replaceLastUndoStep=function(be){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=be)},Ge.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ge.prototype.undo=function(){if(this.undoStack.length>1){var be=this.undoStack.pop();return be!==void 0&&this.redoStack.push(be),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ge.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ge}(),ln=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.curveX=0,xe.curveY=0,xe.manipulationStartCurveX=0,xe.manipulationStartCurveY=0,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.positionGrips=xe.positionGrips.bind(xe),xe.addControlGrips=xe.addControlGrips.bind(xe),xe.adjustVisual=xe.adjustVisual.bind(xe),xe.setupControlBox=xe.setupControlBox.bind(xe),xe.resize=xe.resize.bind(xe),xe.strokeColor=Ne.defaultColor,xe.strokeWidth=Ne.defaultStrokeWidth,xe.strokeDasharray=Ne.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Ne.defaultColorSet,Ne.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new je("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorCurve&&Pe!==this.visibleCurve&&!this.curveGrip.ownsTarget(Pe))},be.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},be.prototype.createVisual=function(){this.visual=Ve.createGroup(),this.selectorCurve=Ve.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ve.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)},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),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(Ae)&&(this.activeGrip=this.curveGrip,this._state="resize")},be.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ve.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ve.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ve.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setupControlBox=function(){Ge.prototype.setupControlBox.call(this),this.curveControlLine1=Ve.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ve.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)},be.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ge.prototype.addControlGrips.call(this)},be.prototype.positionGrips=function(){Ge.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()))},be.prototype.manipulate=function(Pe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Pe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Pe.y-this.manipulationStartY),Ge.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){this.activeGrip===this.curveGrip&&(this.curveX=Pe.x,this.curveY=Pe.y),Ge.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)},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual()},be.prototype.scale=function(Pe,Ae){this.curveX=this.curveX*Pe,this.curveY=this.curveY*Ae,Ge.prototype.scale.call(this,Pe,Ae)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ae=Pe;this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.curveX=Ae.curveX,this.curveY=Ae.curveY,this.createVisual(),this.adjustVisual()},be.typeName="CurveMarker",be.title="Curve marker",be.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>',be}(Xe),Wn=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,Ae,Ne)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.textColor="transparent",xe.fontSize="1rem",xe.isMoved=!1,xe.captionText="Caption",xe.PADDING=5,xe.captionBoxWidth=0,xe.captionBoxHeight=0,xe.strokeColor=Ne.defaultColor,xe.strokeWidth=Ne.defaultStrokeWidth,xe.strokeDasharray=Ne.defaultStrokeDasharray,xe.fillColor=Ne.defaultFillColor,xe.textColor=Ne.defaultStrokeColor,xe.fontFamily=Ne.defaultFontFamily,xe.fontSize=Ne.defaultCaptionFontSize,xe.captionText=Ne.defaultCaptionText,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe.sizeCaption=xe.sizeCaption.bind(xe),xe.setCaptionText=xe.setCaptionText.bind(xe),xe.showTextEditor=xe.showTextEditor.bind(xe),xe.positionTextEditor=xe.positionTextEditor.bind(xe),xe.finishTextEditing=xe.finishTextEditing.bind(xe),xe.setFont=xe.setFont.bind(xe),xe.setTextColor=xe.setTextColor.bind(xe),xe.strokePanel=new ee("Line color",We(Ne.defaultColorSet,["transparent"]),xe.strokeColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.fillPanel=new ee("Fill color",We(Ne.defaultColorSet,["transparent"]),xe.fillColor,Ke),xe.fillPanel.onColorChanged=xe.setFillColor,xe.strokeWidthPanel=new Be("Line width",Ne.defaultStrokeWidths,Ne.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new je("Line style",Ne.defaultStrokeDasharrays,Ne.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe.fontFamilyPanel=new Ze("Font",Ne.defaultFontFamilies,Ne.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe.textColorPanel=new ee("Text color",Ne.defaultColorSet,xe.textColor,qe),xe.textColorPanel.onColorChanged=xe.setTextColor,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.frame&&Pe!==this.captionBg&&Pe!==this.captionElement)},be.prototype.createVisual=function(){this.visual=Ve.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ve.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ve.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=Ve.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()},be.prototype.setCaptionText=function(Pe){this.captionText=Pe,this.captionElement.textContent=this.captionText,this.sizeCaption()},be.prototype.pointerDown=function(Pe,Ae){Ge.prototype.pointerDown.call(this,Pe,Ae),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ge.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)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.setSize()},be.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),Ve.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')"]]),Ve.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')"]])},be.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(Ae){Ae.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ae){Ae.key==="Enter"&&Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ae){Ae.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()},be.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"))},be.prototype.finishTextEditing=function(Pe){this.setCaptionText(Pe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},be.prototype.setFont=function(Pe){this.captionElement&&Ve.setAttributes(this.captionElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},be.prototype.setTextColor=function(Pe){this.captionElement&&Ve.setAttributes(this.captionElement,[["fill",Pe]]),this.textColor=Pe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},be.prototype.setSize=function(){Ge.prototype.setSize.call(this),Ve.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},be.prototype.pointerUp=function(Pe){Ge.prototype.pointerUp.call(this,Pe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.dblClick=function(Pe,Ae){Ge.prototype.dblClick.call(this,Pe,Ae),this.showTextEditor()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.frame&&Ve.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.captionBg&&Ve.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.frame&&Ve.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.frame&&Ve.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),be.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},Ge.prototype.getState.call(this));return Pe.typeName=this.typeName,Pe},be.prototype.restoreState=function(Pe){var Ae=Pe;this.fillColor=Ae.fillColor,this.strokeColor=Ae.strokeColor,this.strokeWidth=Ae.strokeWidth,this.strokeDasharray=Ae.strokeDasharray,this.textColor=Ae.textColor,this.fontFamily=Ae.fontFamily,this.captionText=Ae.captionText,this.fontSize=Ae.fontSize,this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ae){Ge.prototype.scale.call(this,Pe,Ae),this.setSize()},be.typeName="CaptionFrameMarker",be.title="Caption frame marker",be.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>',be}(Ee),un=function(){function Ge(be,Pe){Pe===void 0&&(Pe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=be,this.cancelable=Pe}return Object.defineProperty(Ge.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ge.prototype.preventDefault=function(){this._defaultPrevented=!0},Ge}(),_n=function(Ge){function be(Pe,Ae,Ne){var xe=Ge.call(this,Pe,!1)||this;return xe.dataUrl=Ae,xe.state=Ne,xe}return Te(be,Ge),be}(un),St=function(Ge){function be(Pe,Ae,Ne){Ne===void 0&&(Ne=!1);var xe=Ge.call(this,Pe,Ne)||this;return xe.marker=Ae,xe}return Te(be,Ge),be}(un),Zn=function(){function Ge(){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 Ge.prototype.addEventListener=function(be,Pe){this[be].push(Pe)},Ge.prototype.removeEventListener=function(be,Pe){var Ae=this[be].indexOf(Pe);Ae>-1&&this[be].splice(Ae,1)},Ge}(),li=function(){function Ge(be){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Je,this._isOpen=!1,this.undoRedoManager=new rn,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Zn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ge.instanceCounter++,this.styles=new Ue(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=be,this.targetRoot=document.body,this.width=be.clientWidth,this.height=be.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(Ge.prototype,"ALL_MARKER_TYPES",{get:function(){return[_e,ot,Pt,Mt,_t,Sn,Lt,Rt,Pn,Dt,ht,ln,Wn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[_e,ot,Pt,Mt,Sn,Lt,Rt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"BASIC_MARKER_TYPES",{get:function(){return[_e,ot,Pt,Mt,Lt]},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(be){var Pe=this;this._availableMarkerTypes.splice(0),be.forEach(function(Ae){if(typeof Ae=="string"){var Ne=Pe.ALL_MARKER_TYPES.find(function(xe){return xe.typeName===Ae});Ne!==void 0&&Pe._availableMarkerTypes.push(Ne)}else Pe._availableMarkerTypes.push(Ae)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(be){this._zoomLevel=be,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(Ge.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ge.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Le.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ge.prototype.show=function(){var be=this;this.styles.styleSheetRoot===void 0&&xt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=xt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Pe){return Pe(new un(be))})},Ge.prototype.render=function(){return He(this,void 0,void 0,function(){var be;return lt(this,function(Pe){switch(Pe.label){case 0:return this.setCurrentMarker(),(be=new Ct).naturalSize=this.renderAtNaturalSize,be.imageType=this.renderImageType,be.imageQuality=this.renderImageQuality,be.markersOnly=this.renderMarkersOnly,be.width=this.renderWidth,be.height=this.renderHeight,[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Pe.sent(),[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Pe.sent()]}})})},Ge.prototype.close=function(be){var Pe=this;if(be===void 0&&(be=!1),this.isOpen){var Ae=!1;be||this.eventListeners.beforeclose.forEach(function(Ne){var xe=new un(Pe,!0);Ne(xe),xe.defaultPrevented&&(Ae=!0)}),Ae||(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(Ne){return Ne(new un(Pe))}),this.detachEvents(),this._isOpen=!1)}},Ge.prototype.addMarkersToToolbar=function(){for(var be,Pe=[],Ae=0;Ae<arguments.length;Ae++)Pe[Ae]=arguments[Ae];(be=this._availableMarkerTypes).push.apply(be,Pe)},Ge.prototype.addRenderEventListener=function(be){this.addEventListener("render",function(Pe){be(Pe.dataUrl,Pe.state)})},Ge.prototype.removeRenderEventListener=function(be){},Ge.prototype.addCloseEventListener=function(be){this.addEventListener("close",function(){be()})},Ge.prototype.removeCloseEventListener=function(be){},Ge.prototype.setupResizeObserver=function(){var be=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){be.resize(be.target.clientWidth,be.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return be.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ge.prototype.onPopupTargetResize=function(){var be=1*this.target.clientWidth/this.target.clientHeight,Pe=this.editorCanvas.clientWidth/be>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*be:this.editorCanvas.clientWidth,Ae=Pe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/be;this.resize(Pe,Ae)},Ge.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ge.prototype.resize=function(be,Pe){this._isResizing=!0;var Ae=be/this.imageWidth,Ne=Pe/this.imageHeight;this.imageWidth=Math.round(be),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(Ae,Ne),this._isResizing=!1},Ge.prototype.scaleMarkers=function(be,Pe){var Ae,Ne=this;this._currentMarker&&this._currentMarker instanceof Mt?this._currentMarker.scale(be,Pe):(Ae=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(xe){xe!==Ne._currentMarker&&xe.scale(be,Pe)}),Ae!==void 0&&this.setCurrentMarker(Ae)},Ge.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"},Ge.prototype.setTopLeft=function(){var be=this.editingTarget.getBoundingClientRect(),Pe=this.editorCanvas.getBoundingClientRect();this.left=be.left-Pe.left,this.top=be.top-Pe.top},Ge.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)},Ge.prototype.addDefs=function(){for(var be,Pe=[],Ae=0;Ae<arguments.length;Ae++)Pe[Ae]=arguments[Ae];this.defs=Ve.createDefs(),this.addDefsToImage(),(be=this.defs).append.apply(be,Pe)},Ge.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ge.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)},Ge.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ge.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ge.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)},Ge.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ge.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)},Ge.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 be=document.createElement("a");be.href="https://markerjs.com/",be.target="_blank",be.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>',be.title="Powered by marker.js",be.style.display="grid",be.style.alignItems="center",be.style.justifyItems="center",be.style.padding="3px",be.style.width="20px",be.style.height="20px",this.logoUI.appendChild(be),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ge.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")},Ge.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"},Ge.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ge.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 be=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=be+"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 mt(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 Oe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ge.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ge.prototype.removeMarker=function(be){this.markerImage.removeChild(be.container),this.markers.indexOf(be)>-1&&this.markers.splice(this.markers.indexOf(be),1),be.dispose()},Ge.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())},Ge.prototype.toolbarButtonClicked=function(be,Pe){if(be==="marker"&&Pe!==void 0)this.createNewMarker(Pe);else if(be==="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()}},Ge.prototype.deleteSelectedMarker=function(){var be=this;if(this._currentMarker!==void 0){var Pe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ne){var xe=new St(be,be._currentMarker,!0);Ne(xe),xe.defaultPrevented&&(Pe=!0)}),!Pe){var Ae=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(Ne){return Ne(new St(be,Ae))})}}},Ge.prototype.clear=function(){var be=this,Pe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ut){var Bt=new St(be,void 0,!0);ut(Bt),Bt.defaultPrevented&&(Pe=!0)}),!Pe)){this.setCurrentMarker();for(var Ae=function(ut){var Bt=Ne.markers[ut];Ne.setCurrentMarker(Ne.markers[ut]),Ne._currentMarker.dispose(),Ne.markerImage.removeChild(Ne._currentMarker.container),Ne.markers.splice(Ne.markers.indexOf(Ne._currentMarker),1),Ne.eventListeners.markerdelete.forEach(function(Qe){return Qe(new St(be,Bt))})},Ne=this,xe=this.markers.length-1;xe>=0;xe--)Ae(xe);this.addUndoStep()}},Object.defineProperty(Ge.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ge.prototype.showNotesEditor=function(){var be;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=(be=this._currentMarker.notes)!==null&&be!==void 0?be:"",this.overlayContainer.appendChild(this.notesArea))},Ge.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)},Ge.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ge.prototype.addUndoStep=function(){var be=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Pe=this.getState(),Ae=this.undoRedoManager.getLastUndoStep();if(!Ae||Ae.width===Pe.width&&Ae.height===Pe.height){var Ne=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Pe),Ne<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(xe){return xe(new un(be))})}else this.undoRedoManager.replaceLastUndoStep(Pe),this.eventListeners.statechange.forEach(function(xe){return xe(new un(be))})}},Ge.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ge.prototype.undoStep=function(){var be=this,Pe=this.undoRedoManager.undo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ae){return Ae(new un(be))}))},Ge.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ge.prototype.redoStep=function(){var be=this,Pe=this.undoRedoManager.redo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ae){return Ae(new un(be))}))},Ge.prototype.stepZoom=function(){var be=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=be<this.zoomSteps.length-1?this.zoomSteps[be+1]:this.zoomSteps[0]},Ge.prototype.panTo=function(be){this.contentDiv.scrollBy({left:this.prevPanPoint.x-be.x,top:this.prevPanPoint.y-be.y}),this.prevPanPoint=be},Ge.prototype.startRenderAndClose=function(){return He(this,void 0,void 0,function(){var be,Pe,Ae=this;return lt(this,function(Ne){switch(Ne.label){case 0:return[4,this.render()];case 1:return be=Ne.sent(),Pe=this.getState(),this.eventListeners.render.forEach(function(xe){return xe(new _n(Ae,be,Pe))}),this.close(!0),[2]}})})},Ge.prototype.getState=function(be){be===!0&&this.setCurrentMarker();var Pe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ae){return Pe.markers.push(Ae.getState())}),Pe},Ge.prototype.restoreState=function(be){var Pe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);be.markers.forEach(function(Ae){var Ne=Pe._availableMarkerTypes.find(function(ut){return ut.typeName===Ae.typeName});if(Ne!==void 0){var xe=Pe.addNewMarker(Ne);xe.restoreState(Ae),Pe.markers.push(xe)}}),be.width&&be.height&&(be.width!==this.imageWidth||be.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/be.width,this.imageHeight/be.height),this.eventListeners.restorestate.forEach(function(Ae){return Ae(new un(Pe))})},Ge.prototype.addNewMarker=function(be){var Pe=Ve.createGroup();return this.markerImage.appendChild(Pe),new be(Pe,this.overlayContainer,this.settings)},Ge.prototype.createNewMarker=function(be){var Pe,Ae=this;(Pe=typeof be=="string"?this._availableMarkerTypes.find(function(Ne){return Ne.typeName===be}):be)&&(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(Ne){return Ne(new St(Ae,Ae._currentMarker))}))},Ge.prototype.markerCreated=function(be){var Pe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(be),this.setCurrentMarker(be),be instanceof ot&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ot):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ae){return Ae(new St(Pe,Pe._currentMarker))})},Ge.prototype.colorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=be,this.settings.defaultStrokeColor=be)},Ge.prototype.fillColorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=be)},Ge.prototype.markerStateChanged=function(be){var Pe=this;this.eventListeners.markerchange.forEach(function(Ae){return Ae(new St(Pe,be))})},Ge.prototype.setCurrentMarker=function(be){var Pe=this;this._currentMarker!==be&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ae){return Ae(new St(Pe,Pe._currentMarker))})),this._currentMarker=be,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(Ae){return Ae(new St(Pe,Pe._currentMarker))}))},Ge.prototype.onPointerDown=function(be){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||be.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(Ae){return Ae.ownsTarget(be.target)});Pe!==void 0?(this.setCurrentMarker(Pe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:be.clientX,y:be.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY))},Ge.prototype.onDblClick=function(be){if(this._isFocused||this.focus(),this.mode==="select"){var Pe=this.markers.find(function(Ae){return Ae.ownsTarget(be.target)});Pe!==void 0&&Pe!==this._currentMarker&&this.setCurrentMarker(Pe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target):this.setCurrentMarker()}},Ge.prototype.onPointerMove=function(be){this.touchPoints!==1&&be.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||be.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(be.clientX,be.clientY)):this.zoomLevel>1&&this.panTo({x:be.clientX,y:be.clientY}))},Ge.prototype.onPointerUp=function(be){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(be.clientX,be.clientY)),this.isDragging=!1,this.addUndoStep()},Ge.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ge.prototype.onKeyUp=function(be){this._currentMarker===void 0||this.notesArea!==void 0||be.key!=="Delete"&&be.key!=="Backspace"||this.deleteSelectedMarker()},Ge.prototype.clientToLocalCoordinates=function(be,Pe){var Ae=this.markerImage.getBoundingClientRect();return{x:(be-Ae.left)/this.zoomLevel,y:(Pe-Ae.top)/this.zoomLevel}},Ge.prototype.onWindowResize=function(){this.positionUI()},Ge.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var be=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=be+"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()},Ge.prototype.addLicenseKey=function(be){Le.addKey(be)},Ge.prototype.addEventListener=function(be,Pe){this.eventListeners.addEventListener(be,Pe)},Ge.prototype.removeEventListener=function(be,Pe){this.eventListeners.removeEventListener(be,Pe)},Ge.prototype.renderState=function(be){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(be),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ge.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ge.prototype.focus=function(){var be=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 un(be))}))},Ge.prototype.blur=function(){var be=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Pe){return Pe(new un(be))}))},Ge.instanceCounter=0,Ge}()},17115:function(Tn,xn,me){"use strict";me.d(xn,{ZP:function(){return Le}});var le=me(33606),Te=me(59301),He=me(47273),lt=0,We=(0,He.Z)();function Ve(){var Ct;return We?(Ct=lt,lt+=1):Ct="TEST_OR_SSR",Ct}function Le(Ct){var xt=Te.useState(),Ue=(0,le.Z)(xt,2),bt=Ue[0],at=Ue[1];return Te.useEffect(function(){at("rc_select_".concat(Ve()))},[]),Ct||bt}},77861:function(Tn,xn,me){"use strict";me.d(xn,{Ac:function(){return Kt},Xo:function(){return Wi},Wx:function(){return Mr},ZP:function(){return cn},lk:function(){return Ee}});var le=me(92413),Te=me(26407),He=me(400),lt=me(33708),We=me(33606),Ve=me(37061),Le=me(39559),Ct=me(18929),xt=me(48736),Ue=me(59301),bt=me(92310),at=me.n(bt),mt=me(34280),Oe=me(49658),te=me(10228),ee=me(8654),de=function(ct){var an=ct.className,dn=ct.customizeIcon,ei=ct.customizeIconProps,pn=ct.onMouseDown,zt=ct.onClick,In=ct.children,Qn;return typeof dn=="function"?Qn=dn(ei):Qn=dn,Ue.createElement("span",{className:an,onMouseDown:function(tn){tn.preventDefault(),pn&&pn(tn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:zt,"aria-hidden":!0},Qn!==void 0?Qn:Ue.createElement("span",{className:at()(an.split(/\s+/).map(function(xi){return"".concat(xi,"-icon")}))},In))},se=de;function he(It,ct,an,dn,ei){var pn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,zt=arguments.length>6?arguments[6]:void 0,In=arguments.length>7?arguments[7]:void 0,Qn=Ue.useMemo(function(){if((0,Le.Z)(dn)==="object")return dn.clearIcon;if(ei)return ei},[dn,ei]),xi=Ue.useMemo(function(){return!!(!pn&&dn&&(an.length||zt)&&!(In==="combobox"&&zt===""))},[dn,pn,an.length,zt,In]);return{allowClear:xi,clearIcon:Ue.createElement(se,{className:"".concat(It,"-clear"),onMouseDown:ct,customizeIcon:Qn},"\xD7")}}var ve=Ue.createContext(null);function Ee(){return Ue.useContext(ve)}function Me(){var It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ct=Ue.useState(!1),an=(0,We.Z)(ct,2),dn=an[0],ei=an[1],pn=Ue.useRef(null),zt=function(){window.clearTimeout(pn.current)};Ue.useEffect(function(){return zt},[]);var In=function(xi,tn){zt(),pn.current=window.setTimeout(function(){ei(xi),tn&&tn()},It)};return[dn,In,zt]}function Be(){var It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ct=Ue.useRef(null),an=Ue.useRef(null);Ue.useEffect(function(){return function(){window.clearTimeout(an.current)}},[]);function dn(ei){(ei||ct.current===null)&&(ct.current=ei),window.clearTimeout(an.current),an.current=window.setTimeout(function(){ct.current=null},It)}return[function(){return ct.current},dn]}function je(It,ct,an,dn){var ei=Ue.useRef(null);ei.current={open:ct,triggerOpen:an,customizedTrigger:dn},Ue.useEffect(function(){function pn(zt){var In;if(!((In=ei.current)!==null&&In!==void 0&&In.customizedTrigger)){var Qn=zt.target;Qn.shadowRoot&&zt.composed&&(Qn=zt.composedPath()[0]||Qn),ei.current.open&&It().filter(function(xi){return xi}).every(function(xi){return!xi.contains(Qn)&&xi!==Qn})&&ei.current.triggerOpen(!1)}}return window.addEventListener("mousedown",pn),function(){return window.removeEventListener("mousedown",pn)}},[])}var _e=me(26112),Je=me(11780),Xe=function(ct,an){var dn,ei,pn=ct.prefixCls,zt=ct.id,In=ct.inputElement,Qn=ct.disabled,xi=ct.tabIndex,tn=ct.autoFocus,fn=ct.autoComplete,kn=ct.editable,zi=ct.activeDescendantId,Di=ct.value,Si=ct.maxLength,Fi=ct.onKeyDown,Ti=ct.onMouseDown,nr=ct.onChange,$r=ct.onPaste,ci=ct.onCompositionStart,Ki=ct.onCompositionEnd,Yr=ct.open,Qr=ct.attrs,Cr=In||Ue.createElement("input",null),Jt=Cr,gi=Jt.ref,mr=Jt.props,tr=mr.onKeyDown,Hr=mr.onChange,Lr=mr.onMouseDown,lo=mr.onCompositionStart,Wr=mr.onCompositionEnd,jr=mr.style;return(0,xt.Kp)(!("maxLength"in Cr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Cr=Ue.cloneElement(Cr,(0,lt.Z)((0,lt.Z)((0,lt.Z)({type:"search"},mr),{},{id:zt,ref:(0,ee.sQ)(an,gi),disabled:Qn,tabIndex:xi,autoComplete:fn||"off",autoFocus:tn,className:at()("".concat(pn,"-selection-search-input"),(dn=Cr)===null||dn===void 0||(ei=dn.props)===null||ei===void 0?void 0:ei.className),role:"combobox","aria-label":"Search","aria-expanded":Yr||!1,"aria-haspopup":"listbox","aria-owns":"".concat(zt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(zt,"_list"),"aria-activedescendant":Yr?zi:void 0},Qr),{},{value:kn?Di:"",maxLength:Si,readOnly:!kn,unselectable:kn?null:"on",style:(0,lt.Z)((0,lt.Z)({},jr),{},{opacity:kn?null:0}),onKeyDown:function($n){Fi($n),tr&&tr($n)},onMouseDown:function($n){Ti($n),Lr&&Lr($n)},onChange:function($n){nr($n),Hr&&Hr($n)},onCompositionStart:function($n){ci($n),lo&&lo($n)},onCompositionEnd:function($n){Ki($n),Wr&&Wr($n)},onPaste:$r})),Cr},ht=Ue.forwardRef(Xe);ht.displayName="Input";var Ze=ht;function Mt(It){return Array.isArray(It)?It:It!==void 0?[It]:[]}var ot=typeof window!="undefined"&&window.document&&window.document.documentElement,Ot=ot;function Pt(It){return It!=null}function Dt(It){return!It&&It!==0}function Wt(It){return["string","number"].includes((0,Le.Z)(It))}function Lt(It){var ct=void 0;return It&&(Wt(It.title)?ct=It.title.toString():Wt(It.label)&&(ct=It.label.toString())),ct}function qe(It,ct){Ot?Ue.useLayoutEffect(It,ct):Ue.useEffect(It,ct)}function Ke(It){var ct;return(ct=It.key)!==null&&ct!==void 0?ct:It.value}var Rt=function(ct){ct.preventDefault(),ct.stopPropagation()},Sn=function(ct){var an=ct.id,dn=ct.prefixCls,ei=ct.values,pn=ct.open,zt=ct.searchValue,In=ct.autoClearSearchValue,Qn=ct.inputRef,xi=ct.placeholder,tn=ct.disabled,fn=ct.mode,kn=ct.showSearch,zi=ct.autoFocus,Di=ct.autoComplete,Si=ct.activeDescendantId,Fi=ct.tabIndex,Ti=ct.removeIcon,nr=ct.maxTagCount,$r=ct.maxTagTextLength,ci=ct.maxTagPlaceholder,Ki=ci===void 0?function(_o){return"+ ".concat(_o.length," ...")}:ci,Yr=ct.tagRender,Qr=ct.onToggleOpen,Cr=ct.onRemove,Jt=ct.onInputChange,gi=ct.onInputPaste,mr=ct.onInputKeyDown,tr=ct.onInputMouseDown,Hr=ct.onInputCompositionStart,Lr=ct.onInputCompositionEnd,lo=Ue.useRef(null),Wr=(0,Ue.useState)(0),jr=(0,We.Z)(Wr,2),fo=jr[0],$n=jr[1],aa=(0,Ue.useState)(!1),Un=(0,We.Z)(aa,2),Do=Un[0],Ko=Un[1],Ji="".concat(dn,"-selection"),la=pn||fn==="multiple"&&In===!1||fn==="tags"?zt:"",Ro=fn==="tags"||fn==="multiple"&&In===!1||kn&&(pn||Do);qe(function(){$n(lo.current.scrollWidth)},[la]);function Nr(_o,Ia,Ma,xs,Wa){return Ue.createElement("span",{className:at()("".concat(Ji,"-item"),(0,He.Z)({},"".concat(Ji,"-item-disabled"),Ma)),title:Lt(_o)},Ue.createElement("span",{className:"".concat(Ji,"-item-content")},Ia),xs&&Ue.createElement(se,{className:"".concat(Ji,"-item-remove"),onMouseDown:Rt,onClick:Wa,customizeIcon:Ti},"\xD7"))}function Ar(_o,Ia,Ma,xs,Wa){var Ps=function(Po){Rt(Po),Qr(!pn)};return Ue.createElement("span",{onMouseDown:Ps},Yr({label:Ia,value:_o,disabled:Ma,closable:xs,onClose:Wa}))}function xo(_o){var Ia=_o.disabled,Ma=_o.label,xs=_o.value,Wa=!tn&&!Ia,Ps=Ma;if(typeof $r=="number"&&(typeof Ma=="string"||typeof Ma=="number")){var Lo=String(Ps);Lo.length>$r&&(Ps="".concat(Lo.slice(0,$r),"..."))}var Po=function(ha){ha&&ha.stopPropagation(),Cr(_o)};return typeof Yr=="function"?Ar(xs,Ps,Ia,Wa,Po):Nr(_o,Ps,Ia,Wa,Po)}function Wo(_o){var Ia=typeof Ki=="function"?Ki(_o):Ki;return Nr({title:Ia},Ia,!1)}var Hi=Ue.createElement("div",{className:"".concat(Ji,"-search"),style:{width:fo},onFocus:function(){Ko(!0)},onBlur:function(){Ko(!1)}},Ue.createElement(Ze,{ref:Qn,open:pn,prefixCls:dn,id:an,inputElement:null,disabled:tn,autoFocus:zi,autoComplete:Di,editable:Ro,activeDescendantId:Si,value:la,onKeyDown:mr,onMouseDown:tr,onChange:Jt,onPaste:gi,onCompositionStart:Hr,onCompositionEnd:Lr,tabIndex:Fi,attrs:(0,_e.Z)(ct,!0)}),Ue.createElement("span",{ref:lo,className:"".concat(Ji,"-search-mirror"),"aria-hidden":!0},la,"\xA0")),st=Ue.createElement(Je.Z,{prefixCls:"".concat(Ji,"-overflow"),data:ei,renderItem:xo,renderRest:Wo,suffix:Hi,itemKey:Ke,maxCount:nr});return Ue.createElement(Ue.Fragment,null,st,!ei.length&&!la&&Ue.createElement("span",{className:"".concat(Ji,"-placeholder")},xi))},Pn=Sn,_t=function(ct){var an=ct.inputElement,dn=ct.prefixCls,ei=ct.id,pn=ct.inputRef,zt=ct.disabled,In=ct.autoFocus,Qn=ct.autoComplete,xi=ct.activeDescendantId,tn=ct.mode,fn=ct.open,kn=ct.values,zi=ct.placeholder,Di=ct.tabIndex,Si=ct.showSearch,Fi=ct.searchValue,Ti=ct.activeValue,nr=ct.maxLength,$r=ct.onInputKeyDown,ci=ct.onInputMouseDown,Ki=ct.onInputChange,Yr=ct.onInputPaste,Qr=ct.onInputCompositionStart,Cr=ct.onInputCompositionEnd,Jt=ct.title,gi=Ue.useState(!1),mr=(0,We.Z)(gi,2),tr=mr[0],Hr=mr[1],Lr=tn==="combobox",lo=Lr||Si,Wr=kn[0],jr=Fi||"";Lr&&Ti&&!tr&&(jr=Ti),Ue.useEffect(function(){Lr&&Hr(!1)},[Lr,Ti]);var fo=tn!=="combobox"&&!fn&&!Si?!1:!!jr,$n=Jt===void 0?Lt(Wr):Jt,aa=function(){if(Wr)return null;var Do=fo?{visibility:"hidden"}:void 0;return Ue.createElement("span",{className:"".concat(dn,"-selection-placeholder"),style:Do},zi)};return Ue.createElement(Ue.Fragment,null,Ue.createElement("span",{className:"".concat(dn,"-selection-search")},Ue.createElement(Ze,{ref:pn,prefixCls:dn,id:ei,open:fn,inputElement:an,disabled:zt,autoFocus:In,autoComplete:Qn,editable:lo,activeDescendantId:xi,value:jr,onKeyDown:$r,onMouseDown:ci,onChange:function(Do){Hr(!0),Ki(Do)},onPaste:Yr,onCompositionStart:Qr,onCompositionEnd:Cr,tabIndex:Di,attrs:(0,_e.Z)(ct,!0),maxLength:Lr?nr:void 0})),!Lr&&Wr?Ue.createElement("span",{className:"".concat(dn,"-selection-item"),title:$n,style:fo?{visibility:"hidden"}:void 0},Wr.label):null,aa())},rn=_t;function ln(It){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(It)}var Wn=function(ct,an){var dn=(0,Ue.useRef)(null),ei=(0,Ue.useRef)(!1),pn=ct.prefixCls,zt=ct.open,In=ct.mode,Qn=ct.showSearch,xi=ct.tokenWithEnter,tn=ct.autoClearSearchValue,fn=ct.onSearch,kn=ct.onSearchSubmit,zi=ct.onToggleOpen,Di=ct.onInputKeyDown,Si=ct.domRef;Ue.useImperativeHandle(an,function(){return{focus:function(){dn.current.focus()},blur:function(){dn.current.blur()}}});var Fi=Be(0),Ti=(0,We.Z)(Fi,2),nr=Ti[0],$r=Ti[1],ci=function(jr){var fo=jr.which;(fo===te.Z.UP||fo===te.Z.DOWN)&&jr.preventDefault(),Di&&Di(jr),fo===te.Z.ENTER&&In==="tags"&&!ei.current&&!zt&&(kn==null||kn(jr.target.value)),ln(fo)&&zi(!0)},Ki=function(){$r(!0)},Yr=(0,Ue.useRef)(null),Qr=function(jr){fn(jr,!0,ei.current)!==!1&&zi(!0)},Cr=function(){ei.current=!0},Jt=function(jr){ei.current=!1,In!=="combobox"&&Qr(jr.target.value)},gi=function(jr){var fo=jr.target.value;if(xi&&Yr.current&&/[\r\n]/.test(Yr.current)){var $n=Yr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");fo=fo.replace($n,Yr.current)}Yr.current=null,Qr(fo)},mr=function(jr){var fo=jr.clipboardData,$n=fo.getData("text");Yr.current=$n},tr=function(jr){var fo=jr.target;if(fo!==dn.current){var $n=document.body.style.msTouchAction!==void 0;$n?setTimeout(function(){dn.current.focus()}):dn.current.focus()}},Hr=function(jr){var fo=nr();jr.target!==dn.current&&!fo&&In!=="combobox"&&jr.preventDefault(),(In!=="combobox"&&(!Qn||!fo)||!zt)&&(zt&&tn!==!1&&fn("",!0,!1),zi())},Lr={inputRef:dn,onInputKeyDown:ci,onInputMouseDown:Ki,onInputChange:gi,onInputPaste:mr,onInputCompositionStart:Cr,onInputCompositionEnd:Jt},lo=In==="multiple"||In==="tags"?Ue.createElement(Pn,(0,le.Z)({},ct,Lr)):Ue.createElement(rn,(0,le.Z)({},ct,Lr));return Ue.createElement("div",{ref:Si,className:"".concat(pn,"-selector"),onClick:tr,onMouseDown:Hr},lo)},un=Ue.forwardRef(Wn);un.displayName="Selector";var _n=un,St=me(35593),Zn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],li=function(ct){var an=ct===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:an,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:an,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:an,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:an,adjustY:1},htmlRegion:"scroll"}}},Ge=function(ct,an){var dn=ct.prefixCls,ei=ct.disabled,pn=ct.visible,zt=ct.children,In=ct.popupElement,Qn=ct.animation,xi=ct.transitionName,tn=ct.dropdownStyle,fn=ct.dropdownClassName,kn=ct.direction,zi=kn===void 0?"ltr":kn,Di=ct.placement,Si=ct.builtinPlacements,Fi=ct.dropdownMatchSelectWidth,Ti=ct.dropdownRender,nr=ct.dropdownAlign,$r=ct.getPopupContainer,ci=ct.empty,Ki=ct.getTriggerDOMNode,Yr=ct.onPopupVisibleChange,Qr=ct.onPopupMouseEnter,Cr=(0,Ve.Z)(ct,Zn),Jt="".concat(dn,"-dropdown"),gi=In;Ti&&(gi=Ti(In));var mr=Ue.useMemo(function(){return Si||li(Fi)},[Si,Fi]),tr=Qn?"".concat(Jt,"-").concat(Qn):xi,Hr=typeof Fi=="number",Lr=Ue.useMemo(function(){return Hr?null:Fi===!1?"minWidth":"width"},[Fi,Hr]),lo=tn;Hr&&(lo=(0,lt.Z)((0,lt.Z)({},lo),{},{width:Fi}));var Wr=Ue.useRef(null);return Ue.useImperativeHandle(an,function(){return{getPopupElement:function(){return Wr.current}}}),Ue.createElement(St.Z,(0,le.Z)({},Cr,{showAction:Yr?["click"]:[],hideAction:Yr?["click"]:[],popupPlacement:Di||(zi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:mr,prefixCls:Jt,popupTransitionName:tr,popup:Ue.createElement("div",{ref:Wr,onMouseEnter:Qr},gi),stretch:Lr,popupAlign:nr,popupVisible:pn,getPopupContainer:$r,popupClassName:at()(fn,(0,He.Z)({},"".concat(Jt,"-empty"),ci)),popupStyle:lo,getTriggerDOMNode:Ki,onPopupVisibleChange:Yr}),zt)},be=Ue.forwardRef(Ge);be.displayName="SelectTrigger";var Pe=be,Ae=me(34589);function Ne(It,ct){var an=It.key,dn;return"value"in It&&(dn=It.value),an!=null?an:dn!==void 0?dn:"rc-index-key-".concat(ct)}function xe(It,ct){var an=It||{},dn=an.label,ei=an.value,pn=an.options,zt=an.groupLabel,In=dn||(ct?"children":"label");return{label:In,value:ei||"value",options:pn||"options",groupLabel:zt||In}}function ut(It){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},an=ct.fieldNames,dn=ct.childrenAsData,ei=[],pn=xe(an,!1),zt=pn.label,In=pn.value,Qn=pn.options,xi=pn.groupLabel;function tn(fn,kn){fn.forEach(function(zi){if(kn||!(Qn in zi)){var Di=zi[In];ei.push({key:Ne(zi,ei.length),groupOption:kn,data:zi,label:zi[zt],value:Di})}else{var Si=zi[xi];Si===void 0&&dn&&(Si=zi.label),ei.push({key:Ne(zi,ei.length),group:!0,data:zi,label:Si}),tn(zi[Qn],!0)}})}return tn(It,!1),ei}function Bt(It){var ct=(0,lt.Z)({},It);return"props"in ct||Object.defineProperty(ct,"props",{get:function(){return(0,xt.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),ct}}),ct}function Qe(It,ct){if(!ct||!ct.length)return null;var an=!1;function dn(pn,zt){var In=(0,Ae.Z)(zt),Qn=In[0],xi=In.slice(1);if(!Qn)return[pn];var tn=pn.split(Qn);return an=an||tn.length>1,tn.reduce(function(fn,kn){return[].concat((0,Te.Z)(fn),(0,Te.Z)(dn(kn,xi)))},[]).filter(function(fn){return fn})}var ei=dn(It,ct);return an?ei:null}var it=["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"],Ft=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Nt(It){return It==="tags"||It==="multiple"}var dt=Ue.forwardRef(function(It,ct){var an,dn,ei=It.id,pn=It.prefixCls,zt=It.className,In=It.showSearch,Qn=It.tagRender,xi=It.direction,tn=It.omitDomProps,fn=It.displayValues,kn=It.onDisplayValuesChange,zi=It.emptyOptions,Di=It.notFoundContent,Si=Di===void 0?"Not Found":Di,Fi=It.onClear,Ti=It.mode,nr=It.disabled,$r=It.loading,ci=It.getInputElement,Ki=It.getRawInputElement,Yr=It.open,Qr=It.defaultOpen,Cr=It.onDropdownVisibleChange,Jt=It.activeValue,gi=It.onActiveValueChange,mr=It.activeDescendantId,tr=It.searchValue,Hr=It.autoClearSearchValue,Lr=It.onSearch,lo=It.onSearchSplit,Wr=It.tokenSeparators,jr=It.allowClear,fo=It.suffixIcon,$n=It.clearIcon,aa=It.OptionList,Un=It.animation,Do=It.transitionName,Ko=It.dropdownStyle,Ji=It.dropdownClassName,la=It.dropdownMatchSelectWidth,Ro=It.dropdownRender,Nr=It.dropdownAlign,Ar=It.placement,xo=It.builtinPlacements,Wo=It.getPopupContainer,Hi=It.showAction,st=Hi===void 0?[]:Hi,_o=It.onFocus,Ia=It.onBlur,Ma=It.onKeyUp,xs=It.onKeyDown,Wa=It.onMouseDown,Ps=(0,Ve.Z)(It,it),Lo=Nt(Ti),Po=(In!==void 0?In:Lo)||Ti==="combobox",Xr=(0,lt.Z)({},Ps);Ft.forEach(function(Bi){delete Xr[Bi]}),tn==null||tn.forEach(function(Bi){delete Xr[Bi]});var ha=Ue.useState(!1),br=(0,We.Z)(ha,2),Ur=br[0],wo=br[1];Ue.useEffect(function(){wo((0,Oe.Z)())},[]);var fi=Ue.useRef(null),Ba=Ue.useRef(null),Eo=Ue.useRef(null),es=Ue.useRef(null),fa=Ue.useRef(null),va=Me(),$a=(0,We.Z)(va,3),ms=$a[0],fs=$a[1],Rs=$a[2];Ue.useImperativeHandle(ct,function(){var Bi,eo;return{focus:(Bi=es.current)===null||Bi===void 0?void 0:Bi.focus,blur:(eo=es.current)===null||eo===void 0?void 0:eo.blur,scrollTo:function(ma){var xa;return(xa=fa.current)===null||xa===void 0?void 0:xa.scrollTo(ma)}}});var Zs=Ue.useMemo(function(){var Bi;if(Ti!=="combobox")return tr;var eo=(Bi=fn[0])===null||Bi===void 0?void 0:Bi.value;return typeof eo=="string"||typeof eo=="number"?String(eo):""},[tr,Ti,fn]),Bn=Ti==="combobox"&&typeof ci=="function"&&ci()||null,Fs=typeof Ki=="function"&&Ki(),Go=(0,ee.x1)(Ba,Fs==null||(an=Fs.props)===null||an===void 0?void 0:an.ref),kl=Ue.useState(!1),_s=(0,We.Z)(kl,2),sl=_s[0],yu=_s[1];(0,mt.Z)(function(){yu(!0)},[]);var Kl=(0,Ct.Z)(!1,{defaultValue:Qr,value:Yr}),gs=(0,We.Z)(Kl,2),ya=gs[0],dl=gs[1],Vo=sl?ya:!1,Ea=!Si&&zi;(nr||Ea&&Vo&&Ti==="combobox")&&(Vo=!1);var ua=Ea?!1:Vo,pr=Ue.useCallback(function(Bi){var eo=Bi!==void 0?Bi:!Vo;nr||(dl(eo),Vo!==eo&&(Cr==null||Cr(eo)))},[nr,Vo,dl,Cr]),ks=Ue.useMemo(function(){return(Wr||[]).some(function(Bi){return[`
|
|
|
`,`\r
|
|
|
`].includes(Bi)})},[Wr]),os=function(eo,Yo,ma){var xa=!0,bo=eo;gi==null||gi(null);var ra=ma?null:Qe(eo,Wr);return Ti!=="combobox"&&ra&&(bo="",lo==null||lo(ra),pr(!1),xa=!1),Lr&&Zs!==bo&&Lr(bo,{source:Yo?"typing":"effect"}),xa},ll=function(eo){!eo||!eo.trim()||Lr(eo,{source:"submit"})};Ue.useEffect(function(){!Vo&&!Lo&&Ti!=="combobox"&&os("",!1,!1)},[Vo]),Ue.useEffect(function(){ya&&nr&&dl(!1),nr&&fs(!1)},[nr]);var zl=Be(),ou=(0,We.Z)(zl,2),Qi=ou[0],Ss=ou[1],Us=function(eo){var Yo=Qi(),ma=eo.which;if(ma===te.Z.ENTER&&(Ti!=="combobox"&&eo.preventDefault(),Vo||pr(!0)),Ss(!!Zs),ma===te.Z.BACKSPACE&&!Yo&&Lo&&!Zs&&fn.length){for(var xa=(0,Te.Z)(fn),bo=null,ra=xa.length-1;ra>=0;ra-=1){var Ao=xa[ra];if(!Ao.disabled){xa.splice(ra,1),bo=Ao;break}}bo&&kn(xa,{type:"remove",values:[bo]})}for(var Or=arguments.length,Aa=new Array(Or>1?Or-1:0),Ha=1;Ha<Or;Ha++)Aa[Ha-1]=arguments[Ha];if(Vo&&fa.current){var La;(La=fa.current).onKeyDown.apply(La,[eo].concat(Aa))}xs==null||xs.apply(void 0,[eo].concat(Aa))},Vl=function(eo){for(var Yo=arguments.length,ma=new Array(Yo>1?Yo-1:0),xa=1;xa<Yo;xa++)ma[xa-1]=arguments[xa];if(Vo&&fa.current){var bo;(bo=fa.current).onKeyUp.apply(bo,[eo].concat(ma))}Ma==null||Ma.apply(void 0,[eo].concat(ma))},Tl=function(eo){var Yo=fn.filter(function(ma){return ma!==eo});kn(Yo,{type:"remove",values:[eo]})},Ul=Ue.useRef(!1),Io=function(){fs(!0),nr||(_o&&!Ul.current&&_o.apply(void 0,arguments),st.includes("focus")&&pr(!0)),Ul.current=!0},ic=function(){fs(!1,function(){Ul.current=!1,pr(!1)}),!nr&&(Zs&&(Ti==="tags"?Lr(Zs,{source:"submit"}):Ti==="multiple"&&Lr("",{source:"blur"})),Ia&&Ia.apply(void 0,arguments))},Zl=[];Ue.useEffect(function(){return function(){Zl.forEach(function(Bi){return clearTimeout(Bi)}),Zl.splice(0,Zl.length)}},[]);var En=function(eo){var Yo,ma=eo.target,xa=(Yo=Eo.current)===null||Yo===void 0?void 0:Yo.getPopupElement();if(xa&&xa.contains(ma)){var bo=setTimeout(function(){var Aa=Zl.indexOf(bo);if(Aa!==-1&&Zl.splice(Aa,1),Rs(),!Ur&&!xa.contains(document.activeElement)){var Ha;(Ha=es.current)===null||Ha===void 0||Ha.focus()}});Zl.push(bo)}for(var ra=arguments.length,Ao=new Array(ra>1?ra-1:0),Or=1;Or<ra;Or++)Ao[Or-1]=arguments[Or];Wa==null||Wa.apply(void 0,[eo].concat(Ao))},Nn=Ue.useState({}),ri=(0,We.Z)(Nn,2),qi=ri[1];function $i(){qi({})}var ki;Fs&&(ki=function(eo){pr(eo)}),je(function(){var Bi;return[fi.current,(Bi=Eo.current)===null||Bi===void 0?void 0:Bi.getPopupElement()]},ua,pr,!!Fs);var Ri=Ue.useMemo(function(){return(0,lt.Z)((0,lt.Z)({},It),{},{notFoundContent:Si,open:Vo,triggerOpen:ua,id:ei,showSearch:Po,multiple:Lo,toggleOpen:pr})},[It,Si,ua,Vo,ei,Po,Lo,pr]),ii=!!fo||$r,Li;ii&&(Li=Ue.createElement(se,{className:at()("".concat(pn,"-arrow"),(0,He.Z)({},"".concat(pn,"-arrow-loading"),$r)),customizeIcon:fo,customizeIconProps:{loading:$r,searchValue:Zs,open:Vo,focused:ms,showSearch:Po}}));var ur=function(){var eo;Fi==null||Fi(),(eo=es.current)===null||eo===void 0||eo.focus(),kn([],{type:"clear",values:fn}),os("",!1,!1)},Zr=he(pn,ur,fn,jr,$n,nr,Zs,Ti),ga=Zr.allowClear,Uo=Zr.clearIcon,Ua=Ue.createElement(aa,{ref:fa}),Ka=at()(pn,zt,(dn={},(0,He.Z)(dn,"".concat(pn,"-focused"),ms),(0,He.Z)(dn,"".concat(pn,"-multiple"),Lo),(0,He.Z)(dn,"".concat(pn,"-single"),!Lo),(0,He.Z)(dn,"".concat(pn,"-allow-clear"),jr),(0,He.Z)(dn,"".concat(pn,"-show-arrow"),ii),(0,He.Z)(dn,"".concat(pn,"-disabled"),nr),(0,He.Z)(dn,"".concat(pn,"-loading"),$r),(0,He.Z)(dn,"".concat(pn,"-open"),Vo),(0,He.Z)(dn,"".concat(pn,"-customize-input"),Bn),(0,He.Z)(dn,"".concat(pn,"-show-search"),Po),dn)),No=Ue.createElement(Pe,{ref:Eo,disabled:nr,prefixCls:pn,visible:ua,popupElement:Ua,animation:Un,transitionName:Do,dropdownStyle:Ko,dropdownClassName:Ji,direction:xi,dropdownMatchSelectWidth:la,dropdownRender:Ro,dropdownAlign:Nr,placement:Ar,builtinPlacements:xo,getPopupContainer:Wo,empty:zi,getTriggerDOMNode:function(){return Ba.current},onPopupVisibleChange:ki,onPopupMouseEnter:$i},Fs?Ue.cloneElement(Fs,{ref:Go}):Ue.createElement(_n,(0,le.Z)({},It,{domRef:Ba,prefixCls:pn,inputElement:Bn,ref:es,id:ei,showSearch:Po,autoClearSearchValue:Hr,mode:Ti,activeDescendantId:mr,tagRender:Qn,values:fn,open:Vo,onToggleOpen:pr,activeValue:Jt,searchValue:Zs,onSearch:os,onSearchSubmit:ll,onRemove:Tl,tokenWithEnter:ks}))),qr;return Fs?qr=No:qr=Ue.createElement("div",(0,le.Z)({className:Ka},Xr,{ref:fi,onMouseDown:En,onKeyDown:Us,onKeyUp:Vl,onFocus:Io,onBlur:ic}),ms&&!Vo&&Ue.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(fn.map(function(Bi){var eo=Bi.label,Yo=Bi.value;return["number","string"].includes((0,Le.Z)(eo))?eo:Yo}).join(", "))),No,Li,ga&&Uo),Ue.createElement(ve.Provider,{value:Ri},qr)}),Kt=dt,wn=function(It,ct){var an=Ue.useRef({values:new Map,options:new Map}),dn=Ue.useMemo(function(){var pn=an.current,zt=pn.values,In=pn.options,Qn=It.map(function(fn){if(fn.label===void 0){var kn;return(0,lt.Z)((0,lt.Z)({},fn),{},{label:(kn=zt.get(fn.value))===null||kn===void 0?void 0:kn.label})}return fn}),xi=new Map,tn=new Map;return Qn.forEach(function(fn){xi.set(fn.value,fn),tn.set(fn.value,ct.get(fn.value)||In.get(fn.value))}),an.current.values=xi,an.current.options=tn,Qn},[It,ct]),ei=Ue.useCallback(function(pn){return ct.get(pn)||an.current.options.get(pn)},[ct]);return[dn,ei]};function sn(It,ct){return Mt(It).join("").toUpperCase().includes(ct)}var qt=function(It,ct,an,dn,ei){return Ue.useMemo(function(){if(!an||dn===!1)return It;var pn=ct.options,zt=ct.label,In=ct.value,Qn=[],xi=typeof dn=="function",tn=an.toUpperCase(),fn=xi?dn:function(zi,Di){return ei?sn(Di[ei],tn):Di[pn]?sn(Di[zt!=="children"?zt:"label"],tn):sn(Di[In],tn)},kn=xi?function(zi){return Bt(zi)}:function(zi){return zi};return It.forEach(function(zi){if(zi[pn]){var Di=fn(an,kn(zi));if(Di)Qn.push(zi);else{var Si=zi[pn].filter(function(Fi){return fn(an,kn(Fi))});Si.length&&Qn.push((0,lt.Z)((0,lt.Z)({},zi),{},(0,He.Z)({},pn,Si)))}return}fn(an,kn(zi))&&Qn.push(zi)}),Qn},[It,dn,ei,an,ct])},Rn=me(17115),Vn=me(11592),hn=["children","value"],Yn=["children"];function mi(It){var ct=It,an=ct.key,dn=ct.props,ei=dn.children,pn=dn.value,zt=(0,Ve.Z)(dn,hn);return(0,lt.Z)({key:an,value:pn!==void 0?pn:an,children:ei},zt)}function jn(It){var ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Vn.Z)(It).map(function(an,dn){if(!Ue.isValidElement(an)||!an.type)return null;var ei=an,pn=ei.type.isSelectOptGroup,zt=ei.key,In=ei.props,Qn=In.children,xi=(0,Ve.Z)(In,Yn);return ct||!pn?mi(an):(0,lt.Z)((0,lt.Z)({key:"__RC_SELECT_GRP__".concat(zt===null?dn:zt,"__"),label:zt},xi),{},{options:jn(Qn)})}).filter(function(an){return an})}function An(It,ct,an,dn,ei){return Ue.useMemo(function(){var pn=It,zt=!It;zt&&(pn=jn(ct));var In=new Map,Qn=new Map,xi=function(kn,zi,Di){Di&&typeof Di=="string"&&kn.set(zi[Di],zi)};function tn(fn){for(var kn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zi=0;zi<fn.length;zi+=1){var Di=fn[zi];!Di[an.options]||kn?(In.set(Di[an.value],Di),xi(Qn,Di,an.label),xi(Qn,Di,dn),xi(Qn,Di,ei)):tn(Di[an.options],!0)}}return tn(pn),{options:pn,valueOptions:In,labelOptions:Qn}},[It,ct,an,dn,ei])}function wi(It){var ct=Ue.useRef();ct.current=It;var an=Ue.useCallback(function(){return ct.current.apply(ct,arguments)},[]);return an}var ji=function(){return null};ji.isSelectOptGroup=!0;var Wi=ji,dr=function(){return null};dr.isSelectOption=!0;var Mr=dr,pi=me(80547),ui=me(2738),Ci=me(4409),Xi=Ue.createContext(null),Ni=Xi;function io(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var hr=["disabled","title","children","style","className"];function De(It){return typeof It=="string"||typeof It=="number"}var Ei=function(ct,an){var dn=Ee(),ei=dn.prefixCls,pn=dn.id,zt=dn.open,In=dn.multiple,Qn=dn.mode,xi=dn.searchValue,tn=dn.toggleOpen,fn=dn.notFoundContent,kn=dn.onPopupScroll,zi=Ue.useContext(Ni),Di=zi.flattenOptions,Si=zi.onActiveValue,Fi=zi.defaultActiveFirstOption,Ti=zi.onSelect,nr=zi.menuItemSelectedIcon,$r=zi.rawValues,ci=zi.fieldNames,Ki=zi.virtual,Yr=zi.direction,Qr=zi.listHeight,Cr=zi.listItemHeight,Jt="".concat(ei,"-item"),gi=(0,pi.Z)(function(){return Di},[zt,Di],function(Nr,Ar){return Ar[0]&&Nr[1]!==Ar[1]}),mr=Ue.useRef(null),tr=function(Ar){Ar.preventDefault()},Hr=function(Ar){mr.current&&mr.current.scrollTo(typeof Ar=="number"?{index:Ar}:Ar)},Lr=function(Ar){for(var xo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Wo=gi.length,Hi=0;Hi<Wo;Hi+=1){var st=(Ar+Hi*xo+Wo)%Wo,_o=gi[st],Ia=_o.group,Ma=_o.data;if(!Ia&&!Ma.disabled)return st}return-1},lo=Ue.useState(function(){return Lr(0)}),Wr=(0,We.Z)(lo,2),jr=Wr[0],fo=Wr[1],$n=function(Ar){var xo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;fo(Ar);var Wo={source:xo?"keyboard":"mouse"},Hi=gi[Ar];if(!Hi){Si(null,-1,Wo);return}Si(Hi.value,Ar,Wo)};(0,Ue.useEffect)(function(){$n(Fi!==!1?Lr(0):-1)},[gi.length,xi]);var aa=Ue.useCallback(function(Nr){return $r.has(Nr)&&Qn!=="combobox"},[Qn,(0,Te.Z)($r).toString(),$r.size]);(0,Ue.useEffect)(function(){var Nr=setTimeout(function(){if(!In&&zt&&$r.size===1){var xo=Array.from($r)[0],Wo=gi.findIndex(function(Hi){var st=Hi.data;return st.value===xo});Wo!==-1&&($n(Wo),Hr(Wo))}});if(zt){var Ar;(Ar=mr.current)===null||Ar===void 0||Ar.scrollTo(void 0)}return function(){return clearTimeout(Nr)}},[zt,xi,Di.length]);var Un=function(Ar){Ar!==void 0&&Ti(Ar,{selected:!$r.has(Ar)}),In||tn(!1)};if(Ue.useImperativeHandle(an,function(){return{onKeyDown:function(Ar){var xo=Ar.which,Wo=Ar.ctrlKey;switch(xo){case te.Z.N:case te.Z.P:case te.Z.UP:case te.Z.DOWN:{var Hi=0;if(xo===te.Z.UP?Hi=-1:xo===te.Z.DOWN?Hi=1:io()&&Wo&&(xo===te.Z.N?Hi=1:xo===te.Z.P&&(Hi=-1)),Hi!==0){var st=Lr(jr+Hi,Hi);Hr(st),$n(st,!0)}break}case te.Z.ENTER:{var _o=gi[jr];_o&&!_o.data.disabled?Un(_o.value):Un(void 0),zt&&Ar.preventDefault();break}case te.Z.ESC:tn(!1),zt&&Ar.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ar){Hr(Ar)}}}),gi.length===0)return Ue.createElement("div",{role:"listbox",id:"".concat(pn,"_list"),className:"".concat(Jt,"-empty"),onMouseDown:tr},fn);var Do=Object.keys(ci).map(function(Nr){return ci[Nr]}),Ko=function(Ar){return Ar.label};function Ji(Nr,Ar){var xo=Nr.group;return{role:xo?"presentation":"option",id:"".concat(pn,"_list_").concat(Ar)}}var la=function(Ar){var xo=gi[Ar];if(!xo)return null;var Wo=xo.data||{},Hi=Wo.value,st=xo.group,_o=(0,_e.Z)(Wo,!0),Ia=Ko(xo);return xo?Ue.createElement("div",(0,le.Z)({"aria-label":typeof Ia=="string"&&!st?Ia:null},_o,{key:Ar},Ji(xo,Ar),{"aria-selected":aa(Hi)}),Hi):null},Ro={role:"listbox",id:"".concat(pn,"_list")};return Ue.createElement(Ue.Fragment,null,Ki&&Ue.createElement("div",(0,le.Z)({},Ro,{style:{height:0,width:0,overflow:"hidden"}}),la(jr-1),la(jr),la(jr+1)),Ue.createElement(Ci.Z,{itemKey:"key",ref:mr,data:gi,height:Qr,itemHeight:Cr,fullHeight:!1,onMouseDown:tr,onScroll:kn,virtual:Ki,direction:Yr,innerProps:Ki?null:Ro},function(Nr,Ar){var xo,Wo=Nr.group,Hi=Nr.groupOption,st=Nr.data,_o=Nr.label,Ia=Nr.value,Ma=st.key;if(Wo){var xs,Wa=(xs=st.title)!==null&&xs!==void 0?xs:De(_o)?_o.toString():void 0;return Ue.createElement("div",{className:at()(Jt,"".concat(Jt,"-group")),title:Wa},_o!==void 0?_o:Ma)}var Ps=st.disabled,Lo=st.title,Po=st.children,Xr=st.style,ha=st.className,br=(0,Ve.Z)(st,hr),Ur=(0,ui.Z)(br,Do),wo=aa(Ia),fi="".concat(Jt,"-option"),Ba=at()(Jt,fi,ha,(xo={},(0,He.Z)(xo,"".concat(fi,"-grouped"),Hi),(0,He.Z)(xo,"".concat(fi,"-active"),jr===Ar&&!Ps),(0,He.Z)(xo,"".concat(fi,"-disabled"),Ps),(0,He.Z)(xo,"".concat(fi,"-selected"),wo),xo)),Eo=Ko(Nr),es=!nr||typeof nr=="function"||wo,fa=typeof Eo=="number"?Eo:Eo||Ia,va=De(fa)?fa.toString():void 0;return Lo!==void 0&&(va=Lo),Ue.createElement("div",(0,le.Z)({},(0,_e.Z)(Ur),Ki?{}:Ji(Nr,Ar),{"aria-selected":wo,className:Ba,title:va,onMouseMove:function(){jr===Ar||Ps||$n(Ar)},onClick:function(){Ps||Un(Ia)},style:Xr}),Ue.createElement("div",{className:"".concat(fi,"-content")},fa),Ue.isValidElement(nr)||wo,es&&Ue.createElement(se,{className:"".concat(Jt,"-option-state"),customizeIcon:nr,customizeIconProps:{isSelected:wo}},wo?"\u2713":null))}))},Pr=Ue.forwardRef(Ei);Pr.displayName="OptionList";var Ln=Pr;function vi(It){var ct=It.mode,an=It.options,dn=It.children,ei=It.backfill,pn=It.allowClear,zt=It.placeholder,In=It.getInputElement,Qn=It.showSearch,xi=It.onSearch,tn=It.defaultOpen,fn=It.autoFocus,kn=It.labelInValue,zi=It.value,Di=It.inputValue,Si=It.optionLabelProp,Fi=isMultiple(ct),Ti=Qn!==void 0?Qn:Fi||ct==="combobox",nr=an||convertChildrenToData(dn);if(warning(ct!=="tags"||nr.every(function(Yr){return!Yr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ct==="tags"||ct==="combobox"){var $r=nr.some(function(Yr){return Yr.options?Yr.options.some(function(Qr){return typeof("value"in Qr?Qr.value:Qr.key)=="number"}):typeof("value"in Yr?Yr.value:Yr.key)=="number"});warning(!$r,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ct!=="combobox"||!Si,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ct==="combobox"||!ei,"`backfill` only works with `combobox` mode."),warning(ct==="combobox"||!In,"`getInputElement` only work with `combobox` mode."),noteOnce(ct!=="combobox"||!In||!pn||!zt,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xi&&!Ti&&ct!=="combobox"&&ct!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!tn||fn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),zi!=null){var ci=toArray(zi);warning(!kn||ci.every(function(Yr){return _typeof(Yr)==="object"&&("key"in Yr||"value"in Yr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Fi||Array.isArray(zi),"`value` should be array when `mode` is `multiple` or `tags`")}if(dn){var Ki=null;toNodeArray(dn).some(function(Yr){if(!React.isValidElement(Yr)||!Yr.type)return!1;var Qr=Yr,Cr=Qr.type;if(Cr.isSelectOption)return!1;if(Cr.isSelectOptGroup){var Jt=toNodeArray(Yr.props.children).every(function(gi){return!React.isValidElement(gi)||!Yr.type||gi.type.isSelectOption?!0:(Ki=gi.type,!1)});return!Jt}return Ki=Cr,!0}),Ki&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ki.displayName||Ki.name||Ki,"`.")),warning(Di===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Zi(It,ct){if(It){var an=function dn(ei){for(var pn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,zt=0;zt<ei.length;zt++){var In=ei[zt];if(In[ct==null?void 0:ct.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!pn&&Array.isArray(In[ct==null?void 0:ct.options])&&dn(In[ct==null?void 0:ct.options],!0))break}};an(It)}}var er=null,Gn=["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"],$t=["inputValue"];function Gt(It){return!It||(0,Le.Z)(It)!=="object"}var Zt=Ue.forwardRef(function(It,ct){var an=It.id,dn=It.mode,ei=It.prefixCls,pn=ei===void 0?"rc-select":ei,zt=It.backfill,In=It.fieldNames,Qn=It.inputValue,xi=It.searchValue,tn=It.onSearch,fn=It.autoClearSearchValue,kn=fn===void 0?!0:fn,zi=It.onSelect,Di=It.onDeselect,Si=It.dropdownMatchSelectWidth,Fi=Si===void 0?!0:Si,Ti=It.filterOption,nr=It.filterSort,$r=It.optionFilterProp,ci=It.optionLabelProp,Ki=It.options,Yr=It.children,Qr=It.defaultActiveFirstOption,Cr=It.menuItemSelectedIcon,Jt=It.virtual,gi=It.direction,mr=It.listHeight,tr=mr===void 0?200:mr,Hr=It.listItemHeight,Lr=Hr===void 0?20:Hr,lo=It.value,Wr=It.defaultValue,jr=It.labelInValue,fo=It.onChange,$n=(0,Ve.Z)(It,Gn),aa=(0,Rn.ZP)(an),Un=Nt(dn),Do=!!(!Ki&&Yr),Ko=Ue.useMemo(function(){return Ti===void 0&&dn==="combobox"?!1:Ti},[Ti,dn]),Ji=Ue.useMemo(function(){return xe(In,Do)},[JSON.stringify(In),Do]),la=(0,Ct.Z)("",{value:xi!==void 0?xi:Qn,postState:function(Ea){return Ea||""}}),Ro=(0,We.Z)(la,2),Nr=Ro[0],Ar=Ro[1],xo=An(Ki,Yr,Ji,$r,ci),Wo=xo.valueOptions,Hi=xo.labelOptions,st=xo.options,_o=Ue.useCallback(function(Vo){var Ea=Mt(Vo);return Ea.map(function(ua){var pr,ks,os,ll,zl;if(Gt(ua))pr=ua;else{var ou;os=ua.key,ks=ua.label,pr=(ou=ua.value)!==null&&ou!==void 0?ou:os}var Qi=Wo.get(pr);if(Qi){var Ss;if(ks===void 0&&(ks=Qi==null?void 0:Qi[ci||Ji.label]),os===void 0&&(os=(Ss=Qi==null?void 0:Qi.key)!==null&&Ss!==void 0?Ss:pr),ll=Qi==null?void 0:Qi.disabled,zl=Qi==null?void 0:Qi.title,0)var Us}return{label:ks,value:pr,key:os,disabled:ll,title:zl}})},[Ji,ci,Wo]),Ia=(0,Ct.Z)(Wr,{value:lo}),Ma=(0,We.Z)(Ia,2),xs=Ma[0],Wa=Ma[1],Ps=Ue.useMemo(function(){var Vo,Ea=_o(xs);return dn==="combobox"&&Dt((Vo=Ea[0])===null||Vo===void 0?void 0:Vo.value)?[]:Ea},[xs,_o,dn]),Lo=wn(Ps,Wo),Po=(0,We.Z)(Lo,2),Xr=Po[0],ha=Po[1],br=Ue.useMemo(function(){if(!dn&&Xr.length===1){var Vo=Xr[0];if(Vo.value===null&&(Vo.label===null||Vo.label===void 0))return[]}return Xr.map(function(Ea){var ua;return(0,lt.Z)((0,lt.Z)({},Ea),{},{label:(ua=Ea.label)!==null&&ua!==void 0?ua:Ea.value})})},[dn,Xr]),Ur=Ue.useMemo(function(){return new Set(Xr.map(function(Vo){return Vo.value}))},[Xr]);Ue.useEffect(function(){if(dn==="combobox"){var Vo,Ea=(Vo=Xr[0])===null||Vo===void 0?void 0:Vo.value;Ar(Pt(Ea)?String(Ea):"")}},[Xr]);var wo=wi(function(Vo,Ea){var ua,pr=Ea!=null?Ea:Vo;return ua={},(0,He.Z)(ua,Ji.value,Vo),(0,He.Z)(ua,Ji.label,pr),ua}),fi=Ue.useMemo(function(){if(dn!=="tags")return st;var Vo=(0,Te.Z)(st),Ea=function(pr){return Wo.has(pr)};return(0,Te.Z)(Xr).sort(function(ua,pr){return ua.value<pr.value?-1:1}).forEach(function(ua){var pr=ua.value;Ea(pr)||Vo.push(wo(pr,ua.label))}),Vo},[wo,st,Wo,Xr,dn]),Ba=qt(fi,Ji,Nr,Ko,$r),Eo=Ue.useMemo(function(){return dn!=="tags"||!Nr||Ba.some(function(Vo){return Vo[$r||"value"]===Nr})||Ba.some(function(Vo){return Vo[Ji.value]===Nr})?Ba:[wo(Nr)].concat((0,Te.Z)(Ba))},[wo,$r,dn,Ba,Nr,Ji]),es=Ue.useMemo(function(){return nr?(0,Te.Z)(Eo).sort(function(Vo,Ea){return nr(Vo,Ea)}):Eo},[Eo,nr]),fa=Ue.useMemo(function(){return ut(es,{fieldNames:Ji,childrenAsData:Do})},[es,Ji,Do]),va=function(Ea){var ua=_o(Ea);if(Wa(ua),fo&&(ua.length!==Xr.length||ua.some(function(os,ll){var zl;return((zl=Xr[ll])===null||zl===void 0?void 0:zl.value)!==(os==null?void 0:os.value)}))){var pr=jr?ua:ua.map(function(os){return os.value}),ks=ua.map(function(os){return Bt(ha(os.value))});fo(Un?pr:pr[0],Un?ks:ks[0])}},$a=Ue.useState(null),ms=(0,We.Z)($a,2),fs=ms[0],Rs=ms[1],Zs=Ue.useState(0),Bn=(0,We.Z)(Zs,2),Fs=Bn[0],Go=Bn[1],kl=Qr!==void 0?Qr:dn!=="combobox",_s=Ue.useCallback(function(Vo,Ea){var ua=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pr=ua.source,ks=pr===void 0?"keyboard":pr;Go(Ea),zt&&dn==="combobox"&&Vo!==null&&ks==="keyboard"&&Rs(String(Vo))},[zt,dn]),sl=function(Ea,ua,pr){var ks=function(){var Ul,Io=ha(Ea);return[jr?{label:Io==null?void 0:Io[Ji.label],value:Ea,key:(Ul=Io==null?void 0:Io.key)!==null&&Ul!==void 0?Ul:Ea}:Ea,Bt(Io)]};if(ua&&zi){var os=ks(),ll=(0,We.Z)(os,2),zl=ll[0],ou=ll[1];zi(zl,ou)}else if(!ua&&Di&&pr!=="clear"){var Qi=ks(),Ss=(0,We.Z)(Qi,2),Us=Ss[0],Vl=Ss[1];Di(Us,Vl)}},yu=wi(function(Vo,Ea){var ua,pr=Un?Ea.selected:!0;pr?ua=Un?[].concat((0,Te.Z)(Xr),[Vo]):[Vo]:ua=Xr.filter(function(ks){return ks.value!==Vo}),va(ua),sl(Vo,pr),dn==="combobox"?Rs(""):(!Nt||kn)&&(Ar(""),Rs(""))}),Kl=function(Ea,ua){va(Ea);var pr=ua.type,ks=ua.values;(pr==="remove"||pr==="clear")&&ks.forEach(function(os){sl(os.value,!1,pr)})},gs=function(Ea,ua){if(Ar(Ea),Rs(null),ua.source==="submit"){var pr=(Ea||"").trim();if(pr){var ks=Array.from(new Set([].concat((0,Te.Z)(Ur),[pr])));va(ks),sl(pr,!0),Ar("")}return}ua.source!=="blur"&&(dn==="combobox"&&va(Ea),tn==null||tn(Ea))},ya=function(Ea){var ua=Ea;dn!=="tags"&&(ua=Ea.map(function(ks){var os=Hi.get(ks);return os==null?void 0:os.value}).filter(function(ks){return ks!==void 0}));var pr=Array.from(new Set([].concat((0,Te.Z)(Ur),(0,Te.Z)(ua))));va(pr),pr.forEach(function(ks){sl(ks,!0)})},dl=Ue.useMemo(function(){var Vo=Jt!==!1&&Fi!==!1;return(0,lt.Z)((0,lt.Z)({},xo),{},{flattenOptions:fa,onActiveValue:_s,defaultActiveFirstOption:kl,onSelect:yu,menuItemSelectedIcon:Cr,rawValues:Ur,fieldNames:Ji,virtual:Vo,direction:gi,listHeight:tr,listItemHeight:Lr,childrenAsData:Do})},[xo,fa,_s,kl,yu,Cr,Ur,Ji,Jt,Fi,tr,Lr,Do]);return Ue.createElement(Ni.Provider,{value:dl},Ue.createElement(Kt,(0,le.Z)({},$n,{id:aa,prefixCls:pn,ref:ct,omitDomProps:$t,mode:dn,displayValues:br,onDisplayValuesChange:Kl,direction:gi,searchValue:Nr,onSearch:gs,autoClearSearchValue:kn,onSearchSplit:ya,dropdownMatchSelectWidth:Fi,OptionList:Ln,emptyOptions:!fa.length,activeValue:fs,activeDescendantId:"".concat(aa,"_list_").concat(Fs)})))}),wt=Zt;wt.Option=Mr,wt.OptGroup=Wi;var vn=wt,cn=vn},9296:function(Tn,xn,me){"use strict";me.r(xn),me.d(xn,{ResizableTextArea:function(){return ht},default:function(){return Dt}});var le=me(92413),Te=me(33708),He=me(400),lt=me(39559),We=me(33606),Ve=me(37061),Le=me(26407),Ct=me(92310),xt=me.n(Ct),Ue=me(93681),bt=me(5643),at=me(18929),mt=me(59301),Oe=me(29301),te=me(34280),ee=me(16089),de=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,se=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],he={},ve;function Ee(Wt){var Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=Wt.getAttribute("id")||Wt.getAttribute("data-reactid")||Wt.getAttribute("name");if(Lt&&he[qe])return he[qe];var Ke=window.getComputedStyle(Wt),Rt=Ke.getPropertyValue("box-sizing")||Ke.getPropertyValue("-moz-box-sizing")||Ke.getPropertyValue("-webkit-box-sizing"),Sn=parseFloat(Ke.getPropertyValue("padding-bottom"))+parseFloat(Ke.getPropertyValue("padding-top")),Pn=parseFloat(Ke.getPropertyValue("border-bottom-width"))+parseFloat(Ke.getPropertyValue("border-top-width")),_t=se.map(function(ln){return"".concat(ln,":").concat(Ke.getPropertyValue(ln))}).join(";"),rn={sizingStyle:_t,paddingSize:Sn,borderSize:Pn,boxSizing:Rt};return Lt&&qe&&(he[qe]=rn),rn}function Me(Wt){var Lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ke=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ve||(ve=document.createElement("textarea"),ve.setAttribute("tab-index","-1"),ve.setAttribute("aria-hidden","true"),document.body.appendChild(ve)),Wt.getAttribute("wrap")?ve.setAttribute("wrap",Wt.getAttribute("wrap")):ve.removeAttribute("wrap");var Rt=Ee(Wt,Lt),Sn=Rt.paddingSize,Pn=Rt.borderSize,_t=Rt.boxSizing,rn=Rt.sizingStyle;ve.setAttribute("style","".concat(rn,";").concat(de)),ve.value=Wt.value||Wt.placeholder||"";var ln=void 0,Wn=void 0,un,_n=ve.scrollHeight;if(_t==="border-box"?_n+=Pn:_t==="content-box"&&(_n-=Sn),qe!==null||Ke!==null){ve.value=" ";var St=ve.scrollHeight-Sn;qe!==null&&(ln=St*qe,_t==="border-box"&&(ln=ln+Sn+Pn),_n=Math.max(ln,_n)),Ke!==null&&(Wn=St*Ke,_t==="border-box"&&(Wn=Wn+Sn+Pn),un=_n>Wn?"":"hidden",_n=Math.min(Wn,_n))}var Zn={height:_n,overflowY:un,resize:"none"};return ln&&(Zn.minHeight=ln),Wn&&(Zn.maxHeight=Wn),Zn}var Be=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],je=0,_e=1,Je=2,Xe=mt.forwardRef(function(Wt,Lt){var qe=Wt,Ke=qe.prefixCls,Rt=qe.onPressEnter,Sn=qe.defaultValue,Pn=qe.value,_t=qe.autoSize,rn=qe.onResize,ln=qe.className,Wn=qe.style,un=qe.disabled,_n=qe.onChange,St=qe.onInternalAutoSize,Zn=(0,Ve.Z)(qe,Be),li=(0,at.Z)(Sn,{value:Pn,postState:function(Wi){return Wi!=null?Wi:""}}),Ge=(0,We.Z)(li,2),be=Ge[0],Pe=Ge[1],Ae=function(Wi){Pe(Wi.target.value),_n==null||_n(Wi)},Ne=mt.useRef();mt.useImperativeHandle(Lt,function(){return{textArea:Ne.current}});var xe=mt.useMemo(function(){return _t&&(0,lt.Z)(_t)==="object"?[_t.minRows,_t.maxRows]:[]},[_t]),ut=(0,We.Z)(xe,2),Bt=ut[0],Qe=ut[1],it=!!_t,Ft=function(){try{if(document.activeElement===Ne.current){var Wi=Ne.current,dr=Wi.selectionStart,Mr=Wi.selectionEnd,pi=Wi.scrollTop;Ne.current.setSelectionRange(dr,Mr),Ne.current.scrollTop=pi}}catch(ui){}},Nt=mt.useState(Je),dt=(0,We.Z)(Nt,2),Kt=dt[0],wn=dt[1],sn=mt.useState(),qt=(0,We.Z)(sn,2),Rn=qt[0],Vn=qt[1],hn=function(){wn(je)};(0,te.Z)(function(){it&&hn()},[Pn,Bt,Qe,it]),(0,te.Z)(function(){if(Kt===je)wn(_e);else if(Kt===_e){var ji=Me(Ne.current,!1,Bt,Qe);wn(Je),Vn(ji)}else Ft()},[Kt]);var Yn=mt.useRef(),mi=function(){ee.Z.cancel(Yn.current)},jn=function(Wi){Kt===Je&&(rn==null||rn(Wi),_t&&(mi(),Yn.current=(0,ee.Z)(function(){hn()})))};mt.useEffect(function(){return mi},[]);var An=it?Rn:null,wi=(0,Te.Z)((0,Te.Z)({},Wn),An);return(Kt===je||Kt===_e)&&(wi.overflowY="hidden",wi.overflowX="hidden"),mt.createElement(Oe.Z,{onResize:jn,disabled:!(_t||rn)},mt.createElement("textarea",(0,le.Z)({},Zn,{ref:Ne,style:wi,className:xt()(Ke,ln,(0,He.Z)({},"".concat(Ke,"-disabled"),un)),disabled:un,value:be,onChange:Ae})))}),ht=Xe,Ze=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Mt(Wt,Lt){return(0,Le.Z)(Wt||"").slice(0,Lt).join("")}function ot(Wt,Lt,qe,Ke){var Rt=qe;return Wt?Rt=Mt(qe,Ke):(0,Le.Z)(Lt||"").length<qe.length&&(0,Le.Z)(qe||"").length>Ke&&(Rt=Lt),Rt}var Ot=mt.forwardRef(function(Wt,Lt){var qe,Ke=Wt.defaultValue,Rt=Wt.value,Sn=Wt.onFocus,Pn=Wt.onBlur,_t=Wt.onChange,rn=Wt.allowClear,ln=Wt.maxLength,Wn=Wt.onCompositionStart,un=Wt.onCompositionEnd,_n=Wt.suffix,St=Wt.prefixCls,Zn=St===void 0?"rc-textarea":St,li=Wt.classes,Ge=Wt.showCount,be=Wt.className,Pe=Wt.style,Ae=Wt.disabled,Ne=Wt.hidden,xe=Wt.classNames,ut=Wt.styles,Bt=Wt.onResize,Qe=(0,Ve.Z)(Wt,Ze),it=(0,at.Z)(Ke,{value:Rt,defaultValue:Ke}),Ft=(0,We.Z)(it,2),Nt=Ft[0],dt=Ft[1],Kt=(0,mt.useRef)(null),wn=mt.useState(!1),sn=(0,We.Z)(wn,2),qt=sn[0],Rn=sn[1],Vn=mt.useState(!1),hn=(0,We.Z)(Vn,2),Yn=hn[0],mi=hn[1],jn=mt.useRef(),An=mt.useRef(0),wi=mt.useState(null),ji=(0,We.Z)(wi,2),Wi=ji[0],dr=ji[1],Mr=function(){var Gt;(Gt=Kt.current)===null||Gt===void 0||Gt.textArea.focus()};(0,mt.useImperativeHandle)(Lt,function(){return{resizableTextArea:Kt.current,focus:Mr,blur:function(){var Gt;(Gt=Kt.current)===null||Gt===void 0||Gt.textArea.blur()}}}),(0,mt.useEffect)(function(){Rn(function($t){return!Ae&&$t})},[Ae]);var pi=Number(ln)>0,ui=function(Gt){mi(!0),jn.current=Nt,An.current=Gt.currentTarget.selectionStart,Wn==null||Wn(Gt)},Ci=function(Gt){mi(!1);var Zt=Gt.currentTarget.value;if(pi){var wt,vn=An.current>=ln+1||An.current===((wt=jn.current)===null||wt===void 0?void 0:wt.length);Zt=ot(vn,jn.current,Zt,ln)}Zt!==Nt&&(dt(Zt),(0,bt.rJ)(Gt.currentTarget,Gt,_t,Zt)),un==null||un(Gt)},Xi=function(Gt){var Zt=Gt.target.value;if(!Yn&&pi){var wt=Gt.target.selectionStart>=ln+1||Gt.target.selectionStart===Zt.length||!Gt.target.selectionStart;Zt=ot(wt,Nt,Zt,ln)}dt(Zt),(0,bt.rJ)(Gt.currentTarget,Gt,_t,Zt)},Ni=function(Gt){var Zt=Qe.onPressEnter,wt=Qe.onKeyDown;Gt.key==="Enter"&&Zt&&Zt(Gt),wt==null||wt(Gt)},io=function(Gt){Rn(!0),Sn==null||Sn(Gt)},hr=function(Gt){Rn(!1),Pn==null||Pn(Gt)},De=function(Gt){var Zt;dt(""),Mr(),(0,bt.rJ)((Zt=Kt.current)===null||Zt===void 0?void 0:Zt.textArea,Gt,_t)},Ei=(0,bt.D7)(Nt);!Yn&&pi&&Rt==null&&(Ei=Mt(Ei,ln));var Pr=_n,Ln;if(Ge){var vi=(0,Le.Z)(Ei).length;(0,lt.Z)(Ge)==="object"?Ln=Ge.formatter({value:Ei,count:vi,maxLength:ln}):Ln="".concat(vi).concat(pi?" / ".concat(ln):""),Pr=mt.createElement(mt.Fragment,null,Pr,mt.createElement("span",{className:xt()("".concat(Zn,"-data-count"),xe==null?void 0:xe.count),style:ut==null?void 0:ut.count},Ln))}var Zi=function(Gt){var Zt;Bt==null||Bt(Gt),(Zt=Kt.current)!==null&&Zt!==void 0&&Zt.textArea.style.height&&dr(!0)},er=!Qe.autoSize&&!Ge&&!rn,Gn=mt.createElement(Ue.BaseInput,{value:Ei,allowClear:rn,handleReset:De,suffix:Pr,prefixCls:Zn,classes:{affixWrapper:xt()(li==null?void 0:li.affixWrapper,(qe={},(0,He.Z)(qe,"".concat(Zn,"-show-count"),Ge),(0,He.Z)(qe,"".concat(Zn,"-textarea-allow-clear"),rn),qe))},disabled:Ae,focused:qt,className:be,style:(0,Te.Z)((0,Te.Z)({},Pe),Wi&&!er?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ln=="string"?Ln:void 0}},hidden:Ne,inputElement:mt.createElement(ht,(0,le.Z)({},Qe,{onKeyDown:Ni,onChange:Xi,onFocus:io,onBlur:hr,onCompositionStart:ui,onCompositionEnd:Ci,className:xe==null?void 0:xe.textarea,style:(0,Te.Z)((0,Te.Z)({},ut==null?void 0:ut.textarea),{},{resize:Pe==null?void 0:Pe.resize}),disabled:Ae,prefixCls:Zn,onResize:Zi,ref:Kt}))});return Gn}),Pt=Ot,Dt=Pt},39417:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return _e}});var le=me(92413),Te=me(400),He=me(37061),lt=me(33708),We=me(6909),Ve=me(4771),Le=me(25314),Ct=me(9427),xt=me(25440),Ue=me(92310),bt=me.n(Ue),at=me(26112),mt=me(59301),Oe=me(39378),te=function(Xe){for(var ht=Xe.prefixCls,Ze=Xe.level,Mt=Xe.isStart,ot=Xe.isEnd,Ot="".concat(ht,"-indent-unit"),Pt=[],Dt=0;Dt<Ze;Dt+=1){var Wt;Pt.push(mt.createElement("span",{key:Dt,className:bt()(Ot,(Wt={},(0,Te.Z)(Wt,"".concat(Ot,"-start"),Mt[Dt]),(0,Te.Z)(Wt,"".concat(Ot,"-end"),ot[Dt]),Wt))}))}return mt.createElement("span",{"aria-hidden":"true",className:"".concat(ht,"-indent")},Pt)},ee=mt.memo(te),de=me(67841),se=me(71430),he=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ve="open",Ee="close",Me="---",Be=function(Je){(0,Ct.Z)(ht,Je);var Xe=(0,xt.Z)(ht);function ht(){var Ze;(0,We.Z)(this,ht);for(var Mt=arguments.length,ot=new Array(Mt),Ot=0;Ot<Mt;Ot++)ot[Ot]=arguments[Ot];return Ze=Xe.call.apply(Xe,[this].concat(ot)),Ze.state={dragNodeHighlight:!1},Ze.selectHandle=void 0,Ze.cacheIndent=void 0,Ze.onSelectorClick=function(Pt){var Dt=Ze.props.context.onNodeClick;Dt(Pt,(0,se.F)(Ze.props)),Ze.isSelectable()?Ze.onSelect(Pt):Ze.onCheck(Pt)},Ze.onSelectorDoubleClick=function(Pt){var Dt=Ze.props.context.onNodeDoubleClick;Dt(Pt,(0,se.F)(Ze.props))},Ze.onSelect=function(Pt){if(!Ze.isDisabled()){var Dt=Ze.props.context.onNodeSelect;Dt(Pt,(0,se.F)(Ze.props))}},Ze.onCheck=function(Pt){if(!Ze.isDisabled()){var Dt=Ze.props,Wt=Dt.disableCheckbox,Lt=Dt.checked,qe=Ze.props.context.onNodeCheck;if(!(!Ze.isCheckable()||Wt)){var Ke=!Lt;qe(Pt,(0,se.F)(Ze.props),Ke)}}},Ze.onMouseEnter=function(Pt){var Dt=Ze.props.context.onNodeMouseEnter;Dt(Pt,(0,se.F)(Ze.props))},Ze.onMouseLeave=function(Pt){var Dt=Ze.props.context.onNodeMouseLeave;Dt(Pt,(0,se.F)(Ze.props))},Ze.onContextMenu=function(Pt){var Dt=Ze.props.context.onNodeContextMenu;Dt(Pt,(0,se.F)(Ze.props))},Ze.onDragStart=function(Pt){var Dt=Ze.props.context.onNodeDragStart;Pt.stopPropagation(),Ze.setState({dragNodeHighlight:!0}),Dt(Pt,(0,Le.Z)(Ze));try{Pt.dataTransfer.setData("text/plain","")}catch(Wt){}},Ze.onDragEnter=function(Pt){var Dt=Ze.props.context.onNodeDragEnter;Pt.preventDefault(),Pt.stopPropagation(),Dt(Pt,(0,Le.Z)(Ze))},Ze.onDragOver=function(Pt){var Dt=Ze.props.context.onNodeDragOver;Pt.preventDefault(),Pt.stopPropagation(),Dt(Pt,(0,Le.Z)(Ze))},Ze.onDragLeave=function(Pt){var Dt=Ze.props.context.onNodeDragLeave;Pt.stopPropagation(),Dt(Pt,(0,Le.Z)(Ze))},Ze.onDragEnd=function(Pt){var Dt=Ze.props.context.onNodeDragEnd;Pt.stopPropagation(),Ze.setState({dragNodeHighlight:!1}),Dt(Pt,(0,Le.Z)(Ze))},Ze.onDrop=function(Pt){var Dt=Ze.props.context.onNodeDrop;Pt.preventDefault(),Pt.stopPropagation(),Ze.setState({dragNodeHighlight:!1}),Dt(Pt,(0,Le.Z)(Ze))},Ze.onExpand=function(Pt){var Dt=Ze.props,Wt=Dt.loading,Lt=Dt.context.onNodeExpand;Wt||Lt(Pt,(0,se.F)(Ze.props))},Ze.setSelectHandle=function(Pt){Ze.selectHandle=Pt},Ze.getNodeState=function(){var Pt=Ze.props.expanded;return Ze.isLeaf()?null:Pt?ve:Ee},Ze.hasChildren=function(){var Pt=Ze.props.eventKey,Dt=Ze.props.context.keyEntities,Wt=(0,de.Z)(Dt,Pt)||{},Lt=Wt.children;return!!(Lt||[]).length},Ze.isLeaf=function(){var Pt=Ze.props,Dt=Pt.isLeaf,Wt=Pt.loaded,Lt=Ze.props.context.loadData,qe=Ze.hasChildren();return Dt===!1?!1:Dt||!Lt&&!qe||Lt&&Wt&&!qe},Ze.isDisabled=function(){var Pt=Ze.props.disabled,Dt=Ze.props.context.disabled;return!!(Dt||Pt)},Ze.isCheckable=function(){var Pt=Ze.props.checkable,Dt=Ze.props.context.checkable;return!Dt||Pt===!1?!1:Dt},Ze.syncLoadData=function(Pt){var Dt=Pt.expanded,Wt=Pt.loading,Lt=Pt.loaded,qe=Ze.props.context,Ke=qe.loadData,Rt=qe.onNodeLoad;Wt||Ke&&Dt&&!Ze.isLeaf()&&!Ze.hasChildren()&&!Lt&&Rt((0,se.F)(Ze.props))},Ze.isDraggable=function(){var Pt=Ze.props,Dt=Pt.data,Wt=Pt.context.draggable;return!!(Wt&&(!Wt.nodeDraggable||Wt.nodeDraggable(Dt)))},Ze.renderDragHandler=function(){var Pt=Ze.props.context,Dt=Pt.draggable,Wt=Pt.prefixCls;return Dt!=null&&Dt.icon?mt.createElement("span",{className:"".concat(Wt,"-draggable-icon")},Dt.icon):null},Ze.renderSwitcherIconDom=function(Pt){var Dt=Ze.props.switcherIcon,Wt=Ze.props.context.switcherIcon,Lt=Dt||Wt;return typeof Lt=="function"?Lt((0,lt.Z)((0,lt.Z)({},Ze.props),{},{isLeaf:Pt})):Lt},Ze.renderSwitcher=function(){var Pt=Ze.props.expanded,Dt=Ze.props.context.prefixCls;if(Ze.isLeaf()){var Wt=Ze.renderSwitcherIconDom(!0);return Wt!==!1?mt.createElement("span",{className:bt()("".concat(Dt,"-switcher"),"".concat(Dt,"-switcher-noop"))},Wt):null}var Lt=bt()("".concat(Dt,"-switcher"),"".concat(Dt,"-switcher_").concat(Pt?ve:Ee)),qe=Ze.renderSwitcherIconDom(!1);return qe!==!1?mt.createElement("span",{onClick:Ze.onExpand,className:Lt},qe):null},Ze.renderCheckbox=function(){var Pt=Ze.props,Dt=Pt.checked,Wt=Pt.halfChecked,Lt=Pt.disableCheckbox,qe=Ze.props.context.prefixCls,Ke=Ze.isDisabled(),Rt=Ze.isCheckable();if(!Rt)return null;var Sn=typeof Rt!="boolean"?Rt:null;return mt.createElement("span",{className:bt()("".concat(qe,"-checkbox"),Dt&&"".concat(qe,"-checkbox-checked"),!Dt&&Wt&&"".concat(qe,"-checkbox-indeterminate"),(Ke||Lt)&&"".concat(qe,"-checkbox-disabled")),onClick:Ze.onCheck},Sn)},Ze.renderIcon=function(){var Pt=Ze.props.loading,Dt=Ze.props.context.prefixCls;return mt.createElement("span",{className:bt()("".concat(Dt,"-iconEle"),"".concat(Dt,"-icon__").concat(Ze.getNodeState()||"docu"),Pt&&"".concat(Dt,"-icon_loading"))})},Ze.renderSelector=function(){var Pt=Ze.state.dragNodeHighlight,Dt=Ze.props,Wt=Dt.title,Lt=Wt===void 0?Me:Wt,qe=Dt.selected,Ke=Dt.icon,Rt=Dt.loading,Sn=Dt.data,Pn=Ze.props.context,_t=Pn.prefixCls,rn=Pn.showIcon,ln=Pn.icon,Wn=Pn.loadData,un=Pn.titleRender,_n=Ze.isDisabled(),St="".concat(_t,"-node-content-wrapper"),Zn;if(rn){var li=Ke||ln;Zn=li?mt.createElement("span",{className:bt()("".concat(_t,"-iconEle"),"".concat(_t,"-icon__customize"))},typeof li=="function"?li(Ze.props):li):Ze.renderIcon()}else Wn&&Rt&&(Zn=Ze.renderIcon());var Ge;typeof Lt=="function"?Ge=Lt(Sn):un?Ge=un(Sn):Ge=Lt;var be=mt.createElement("span",{className:"".concat(_t,"-title")},Ge);return mt.createElement("span",{ref:Ze.setSelectHandle,title:typeof Lt=="string"?Lt:"",className:bt()("".concat(St),"".concat(St,"-").concat(Ze.getNodeState()||"normal"),!_n&&(qe||Pt)&&"".concat(_t,"-node-selected")),onMouseEnter:Ze.onMouseEnter,onMouseLeave:Ze.onMouseLeave,onContextMenu:Ze.onContextMenu,onClick:Ze.onSelectorClick,onDoubleClick:Ze.onSelectorDoubleClick},Zn,be,Ze.renderDropIndicator())},Ze.renderDropIndicator=function(){var Pt=Ze.props,Dt=Pt.disabled,Wt=Pt.eventKey,Lt=Ze.props.context,qe=Lt.draggable,Ke=Lt.dropLevelOffset,Rt=Lt.dropPosition,Sn=Lt.prefixCls,Pn=Lt.indent,_t=Lt.dropIndicatorRender,rn=Lt.dragOverNodeKey,ln=Lt.direction,Wn=!!qe,un=!Dt&&Wn&&rn===Wt,_n=Pn!=null?Pn:Ze.cacheIndent;return Ze.cacheIndent=Pn,un?_t({dropPosition:Rt,dropLevelOffset:Ke,indent:_n,prefixCls:Sn,direction:ln}):null},Ze}return(0,Ve.Z)(ht,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Mt=this.props.selectable,ot=this.props.context.selectable;return typeof Mt=="boolean"?Mt:ot}},{key:"render",value:function(){var Mt,ot=this.props,Ot=ot.eventKey,Pt=ot.className,Dt=ot.style,Wt=ot.dragOver,Lt=ot.dragOverGapTop,qe=ot.dragOverGapBottom,Ke=ot.isLeaf,Rt=ot.isStart,Sn=ot.isEnd,Pn=ot.expanded,_t=ot.selected,rn=ot.checked,ln=ot.halfChecked,Wn=ot.loading,un=ot.domRef,_n=ot.active,St=ot.data,Zn=ot.onMouseMove,li=ot.selectable,Ge=(0,He.Z)(ot,he),be=this.props.context,Pe=be.prefixCls,Ae=be.filterTreeNode,Ne=be.keyEntities,xe=be.dropContainerKey,ut=be.dropTargetKey,Bt=be.draggingNodeKey,Qe=this.isDisabled(),it=(0,at.Z)(Ge,{aria:!0,data:!0}),Ft=(0,de.Z)(Ne,Ot)||{},Nt=Ft.level,dt=Sn[Sn.length-1],Kt=this.isDraggable(),wn=!Qe&&Kt,sn=Bt===Ot,qt=li!==void 0?{"aria-selected":!!li}:void 0;return mt.createElement("div",(0,le.Z)({ref:un,className:bt()(Pt,"".concat(Pe,"-treenode"),(Mt={},(0,Te.Z)(Mt,"".concat(Pe,"-treenode-disabled"),Qe),(0,Te.Z)(Mt,"".concat(Pe,"-treenode-switcher-").concat(Pn?"open":"close"),!Ke),(0,Te.Z)(Mt,"".concat(Pe,"-treenode-checkbox-checked"),rn),(0,Te.Z)(Mt,"".concat(Pe,"-treenode-checkbox-indeterminate"),ln),(0,Te.Z)(Mt,"".concat(Pe,"-treenode-selected"),_t),(0,Te.Z)(Mt,"".concat(Pe,"-treenode-loading"),Wn),(0,Te.Z)(Mt,"".concat(Pe,"-treenode-active"),_n),(0,Te.Z)(Mt,"".concat(Pe,"-treenode-leaf-last"),dt),(0,Te.Z)(Mt,"".concat(Pe,"-treenode-draggable"),Kt),(0,Te.Z)(Mt,"dragging",sn),(0,Te.Z)(Mt,"drop-target",ut===Ot),(0,Te.Z)(Mt,"drop-container",xe===Ot),(0,Te.Z)(Mt,"drag-over",!Qe&&Wt),(0,Te.Z)(Mt,"drag-over-gap-top",!Qe&&Lt),(0,Te.Z)(Mt,"drag-over-gap-bottom",!Qe&&qe),(0,Te.Z)(Mt,"filter-node",Ae&&Ae((0,se.F)(this.props))),Mt)),style:Dt,draggable:wn,"aria-grabbed":sn,onDragStart:wn?this.onDragStart:void 0,onDragEnter:Kt?this.onDragEnter:void 0,onDragOver:Kt?this.onDragOver:void 0,onDragLeave:Kt?this.onDragLeave:void 0,onDrop:Kt?this.onDrop:void 0,onDragEnd:Kt?this.onDragEnd:void 0,onMouseMove:Zn},qt,it),mt.createElement(ee,{prefixCls:Pe,level:Nt,isStart:Rt,isEnd:Sn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),ht}(mt.Component),je=function(Xe){return mt.createElement(Oe.k.Consumer,null,function(ht){return mt.createElement(Be,(0,le.Z)({},Xe,{context:ht}))})};je.displayName="TreeNode",je.isTreeNode=1;var _e=je},39378:function(Tn,xn,me){"use strict";me.d(xn,{k:function(){return Te}});var le=me(59301),Te=le.createContext(null)},23130:function(Tn,xn,me){"use strict";me.d(xn,{O:function(){return _e.Z},Z:function(){return be}});var le=me(92413),Te=me(400),He=me(39559),lt=me(33708),We=me(26407),Ve=me(6909),Le=me(4771),Ct=me(25314),xt=me(9427),Ue=me(25440),bt=me(92310),at=me.n(bt),mt=me(10228),Oe=me(26112),te=me(48736),ee=me(59301),de=me(39378);function se(Pe){var Ae=Pe.dropPosition,Ne=Pe.dropLevelOffset,xe=Pe.indent,ut={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ae){case-1:ut.top=0,ut.left=-Ne*xe;break;case 1:ut.bottom=0,ut.left=-Ne*xe;break;case 0:ut.bottom=0,ut.left=xe;break}return ee.createElement("div",{style:ut})}function he(Pe){if(Pe==null)throw new TypeError("Cannot destructure "+Pe)}var ve=me(33606),Ee=me(37061),Me=me(34280),Be=me(4409),je=me(77900),_e=me(39417);function Je(Pe,Ae){var Ne=ee.useState(!1),xe=(0,ve.Z)(Ne,2),ut=xe[0],Bt=xe[1];ee.useLayoutEffect(function(){if(ut)return Pe(),function(){Ae()}},[ut]),ee.useLayoutEffect(function(){return Bt(!0),function(){Bt(!1)}},[])}var Xe=me(71430),ht=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ze=function(Ae,Ne){var xe=Ae.className,ut=Ae.style,Bt=Ae.motion,Qe=Ae.motionNodes,it=Ae.motionType,Ft=Ae.onMotionStart,Nt=Ae.onMotionEnd,dt=Ae.active,Kt=Ae.treeNodeRequiredProps,wn=(0,Ee.Z)(Ae,ht),sn=ee.useState(!0),qt=(0,ve.Z)(sn,2),Rn=qt[0],Vn=qt[1],hn=ee.useContext(de.k),Yn=hn.prefixCls,mi=Qe&&it!=="hide";(0,Me.Z)(function(){Qe&&mi!==Rn&&Vn(mi)},[Qe]);var jn=function(){Qe&&Ft()},An=ee.useRef(!1),wi=function(){Qe&&!An.current&&(An.current=!0,Nt())};Je(jn,wi);var ji=function(dr){mi===dr&&wi()};return Qe?ee.createElement(je.default,(0,le.Z)({ref:Ne,visible:Rn},Bt,{motionAppear:it==="show",onVisibleChanged:ji}),function(Wi,dr){var Mr=Wi.className,pi=Wi.style;return ee.createElement("div",{ref:dr,className:at()("".concat(Yn,"-treenode-motion"),Mr),style:pi},Qe.map(function(ui){var Ci=(0,le.Z)({},(he(ui.data),ui.data)),Xi=ui.title,Ni=ui.key,io=ui.isStart,hr=ui.isEnd;delete Ci.children;var De=(0,Xe.H8)(Ni,Kt);return ee.createElement(_e.Z,(0,le.Z)({},Ci,De,{title:Xi,active:dt,data:ui.data,key:Ni,isStart:io,isEnd:hr}))}))}):ee.createElement(_e.Z,(0,le.Z)({domRef:Ne,className:xe,style:ut},wn,{active:dt}))};Ze.displayName="MotionTreeNode";var Mt=ee.forwardRef(Ze),ot=Mt;function Ot(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ne=Pe.length,xe=Ae.length;if(Math.abs(Ne-xe)!==1)return{add:!1,key:null};function ut(Bt,Qe){var it=new Map;Bt.forEach(function(Nt){it.set(Nt,!0)});var Ft=Qe.filter(function(Nt){return!it.has(Nt)});return Ft.length===1?Ft[0]:null}return Ne<xe?{add:!0,key:ut(Pe,Ae)}:{add:!1,key:ut(Ae,Pe)}}function Pt(Pe,Ae,Ne){var xe=Pe.findIndex(function(it){return it.key===Ne}),ut=Pe[xe+1],Bt=Ae.findIndex(function(it){return it.key===Ne});if(ut){var Qe=Ae.findIndex(function(it){return it.key===ut.key});return Ae.slice(Bt+1,Qe)}return Ae.slice(Bt+1)}var Dt=["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"],Wt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Lt=function(){},qe="RC_TREE_MOTION_".concat(Math.random()),Ke={key:qe},Rt={key:qe,level:0,index:0,pos:"0",node:Ke,nodes:[Ke]},Sn={parent:null,children:[],pos:Rt.pos,data:Ke,title:null,key:qe,isStart:[],isEnd:[]};function Pn(Pe,Ae,Ne,xe){return Ae===!1||!Ne?Pe:Pe.slice(0,Math.ceil(Ne/xe)+1)}function _t(Pe){var Ae=Pe.key,Ne=Pe.pos;return(0,Xe.km)(Ae,Ne)}function rn(Pe){for(var Ae=String(Pe.data.key),Ne=Pe;Ne.parent;)Ne=Ne.parent,Ae="".concat(Ne.data.key," > ").concat(Ae);return Ae}var ln=ee.forwardRef(function(Pe,Ae){var Ne=Pe.prefixCls,xe=Pe.data,ut=Pe.selectable,Bt=Pe.checkable,Qe=Pe.expandedKeys,it=Pe.selectedKeys,Ft=Pe.checkedKeys,Nt=Pe.loadedKeys,dt=Pe.loadingKeys,Kt=Pe.halfCheckedKeys,wn=Pe.keyEntities,sn=Pe.disabled,qt=Pe.dragging,Rn=Pe.dragOverNodeKey,Vn=Pe.dropPosition,hn=Pe.motion,Yn=Pe.height,mi=Pe.itemHeight,jn=Pe.virtual,An=Pe.focusable,wi=Pe.activeItem,ji=Pe.focused,Wi=Pe.tabIndex,dr=Pe.onKeyDown,Mr=Pe.onFocus,pi=Pe.onBlur,ui=Pe.onActiveChange,Ci=Pe.onListChangeStart,Xi=Pe.onListChangeEnd,Ni=(0,Ee.Z)(Pe,Dt),io=ee.useRef(null),hr=ee.useRef(null);ee.useImperativeHandle(Ae,function(){return{scrollTo:function(fn){io.current.scrollTo(fn)},getIndentWidth:function(){return hr.current.offsetWidth}}});var De=ee.useState(Qe),Ei=(0,ve.Z)(De,2),Pr=Ei[0],Ln=Ei[1],vi=ee.useState(xe),Zi=(0,ve.Z)(vi,2),er=Zi[0],Gn=Zi[1],$t=ee.useState(xe),Gt=(0,ve.Z)($t,2),Zt=Gt[0],wt=Gt[1],vn=ee.useState([]),cn=(0,ve.Z)(vn,2),It=cn[0],ct=cn[1],an=ee.useState(null),dn=(0,ve.Z)(an,2),ei=dn[0],pn=dn[1],zt=ee.useRef(xe);zt.current=xe;function In(){var tn=zt.current;Gn(tn),wt(tn),ct([]),pn(null),Xi()}(0,Me.Z)(function(){Ln(Qe);var tn=Ot(Pr,Qe);if(tn.key!==null)if(tn.add){var fn=er.findIndex(function(Ti){var nr=Ti.key;return nr===tn.key}),kn=Pn(Pt(er,xe,tn.key),jn,Yn,mi),zi=er.slice();zi.splice(fn+1,0,Sn),wt(zi),ct(kn),pn("show")}else{var Di=xe.findIndex(function(Ti){var nr=Ti.key;return nr===tn.key}),Si=Pn(Pt(xe,er,tn.key),jn,Yn,mi),Fi=xe.slice();Fi.splice(Di+1,0,Sn),wt(Fi),ct(Si),pn("hide")}else er!==xe&&(Gn(xe),wt(xe))},[Qe,xe]),ee.useEffect(function(){qt||In()},[qt]);var Qn=hn?Zt:xe,xi={expandedKeys:Qe,selectedKeys:it,loadedKeys:Nt,loadingKeys:dt,checkedKeys:Ft,halfCheckedKeys:Kt,dragOverNodeKey:Rn,dropPosition:Vn,keyEntities:wn};return ee.createElement(ee.Fragment,null,ji&&wi&&ee.createElement("span",{style:Wt,"aria-live":"assertive"},rn(wi)),ee.createElement("div",null,ee.createElement("input",{style:Wt,disabled:An===!1||sn,tabIndex:An!==!1?Wi:null,onKeyDown:dr,onFocus:Mr,onBlur:pi,value:"",onChange:Lt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Ne,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Ne,"-indent")},ee.createElement("div",{ref:hr,className:"".concat(Ne,"-indent-unit")}))),ee.createElement(Be.Z,(0,le.Z)({},Ni,{data:Qn,itemKey:_t,height:Yn,fullHeight:!1,virtual:jn,itemHeight:mi,prefixCls:"".concat(Ne,"-list"),ref:io,onVisibleChange:function(fn,kn){var zi=new Set(fn),Di=kn.filter(function(Si){return!zi.has(Si)});Di.some(function(Si){return _t(Si)===qe})&&In()}}),function(tn){var fn=tn.pos,kn=(0,le.Z)({},(he(tn.data),tn.data)),zi=tn.title,Di=tn.key,Si=tn.isStart,Fi=tn.isEnd,Ti=(0,Xe.km)(Di,fn);delete kn.key,delete kn.children;var nr=(0,Xe.H8)(Ti,xi);return ee.createElement(ot,(0,le.Z)({},kn,nr,{title:zi,active:!!wi&&Di===wi.key,pos:fn,data:tn.data,isStart:Si,isEnd:Fi,motion:hn,motionNodes:Di===qe?It:null,motionType:ei,onMotionStart:Ci,onMotionEnd:In,treeNodeRequiredProps:xi,onMouseMove:function(){ui(null)}}))}))});ln.displayName="NodeList";var Wn=ln,un=me(35654),_n=me(90782),St=me(67841),Zn=10,li=function(Pe){(0,xt.Z)(Ne,Pe);var Ae=(0,Ue.Z)(Ne);function Ne(){var xe;(0,Ve.Z)(this,Ne);for(var ut=arguments.length,Bt=new Array(ut),Qe=0;Qe<ut;Qe++)Bt[Qe]=arguments[Qe];return xe=Ae.call.apply(Ae,[this].concat(Bt)),xe.destroyed=!1,xe.delayedDragEnterLogic=void 0,xe.loadingRetryTimes={},xe.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,Xe.w$)()},xe.dragStartMousePosition=null,xe.dragNode=void 0,xe.currentMouseOverDroppableNodeKey=null,xe.listRef=ee.createRef(),xe.onNodeDragStart=function(it,Ft){var Nt=xe.state,dt=Nt.expandedKeys,Kt=Nt.keyEntities,wn=xe.props.onDragStart,sn=Ft.props.eventKey;xe.dragNode=Ft,xe.dragStartMousePosition={x:it.clientX,y:it.clientY};var qt=(0,un._5)(dt,sn);xe.setState({draggingNodeKey:sn,dragChildrenKeys:(0,un.wA)(sn,Kt),indent:xe.listRef.current.getIndentWidth()}),xe.setExpandedKeys(qt),window.addEventListener("dragend",xe.onWindowDragEnd),wn==null||wn({event:it,node:(0,Xe.F)(Ft.props)})},xe.onNodeDragEnter=function(it,Ft){var Nt=xe.state,dt=Nt.expandedKeys,Kt=Nt.keyEntities,wn=Nt.dragChildrenKeys,sn=Nt.flattenNodes,qt=Nt.indent,Rn=xe.props,Vn=Rn.onDragEnter,hn=Rn.onExpand,Yn=Rn.allowDrop,mi=Rn.direction,jn=Ft.props,An=jn.pos,wi=jn.eventKey,ji=(0,Ct.Z)(xe),Wi=ji.dragNode;if(xe.currentMouseOverDroppableNodeKey!==wi&&(xe.currentMouseOverDroppableNodeKey=wi),!Wi){xe.resetDragState();return}var dr=(0,un.OM)(it,Wi,Ft,qt,xe.dragStartMousePosition,Yn,sn,Kt,dt,mi),Mr=dr.dropPosition,pi=dr.dropLevelOffset,ui=dr.dropTargetKey,Ci=dr.dropContainerKey,Xi=dr.dropTargetPos,Ni=dr.dropAllowed,io=dr.dragOverNodeKey;if(wn.indexOf(ui)!==-1||!Ni){xe.resetDragState();return}if(xe.delayedDragEnterLogic||(xe.delayedDragEnterLogic={}),Object.keys(xe.delayedDragEnterLogic).forEach(function(hr){clearTimeout(xe.delayedDragEnterLogic[hr])}),Wi.props.eventKey!==Ft.props.eventKey&&(it.persist(),xe.delayedDragEnterLogic[An]=window.setTimeout(function(){if(xe.state.draggingNodeKey!==null){var hr=(0,We.Z)(dt),De=(0,St.Z)(Kt,Ft.props.eventKey);De&&(De.children||[]).length&&(hr=(0,un.L0)(dt,Ft.props.eventKey)),"expandedKeys"in xe.props||xe.setExpandedKeys(hr),hn==null||hn(hr,{node:(0,Xe.F)(Ft.props),expanded:!0,nativeEvent:it.nativeEvent})}},800)),Wi.props.eventKey===ui&&pi===0){xe.resetDragState();return}xe.setState({dragOverNodeKey:io,dropPosition:Mr,dropLevelOffset:pi,dropTargetKey:ui,dropContainerKey:Ci,dropTargetPos:Xi,dropAllowed:Ni}),Vn==null||Vn({event:it,node:(0,Xe.F)(Ft.props),expandedKeys:dt})},xe.onNodeDragOver=function(it,Ft){var Nt=xe.state,dt=Nt.dragChildrenKeys,Kt=Nt.flattenNodes,wn=Nt.keyEntities,sn=Nt.expandedKeys,qt=Nt.indent,Rn=xe.props,Vn=Rn.onDragOver,hn=Rn.allowDrop,Yn=Rn.direction,mi=(0,Ct.Z)(xe),jn=mi.dragNode;if(jn){var An=(0,un.OM)(it,jn,Ft,qt,xe.dragStartMousePosition,hn,Kt,wn,sn,Yn),wi=An.dropPosition,ji=An.dropLevelOffset,Wi=An.dropTargetKey,dr=An.dropContainerKey,Mr=An.dropAllowed,pi=An.dropTargetPos,ui=An.dragOverNodeKey;dt.indexOf(Wi)!==-1||!Mr||(jn.props.eventKey===Wi&&ji===0?xe.state.dropPosition===null&&xe.state.dropLevelOffset===null&&xe.state.dropTargetKey===null&&xe.state.dropContainerKey===null&&xe.state.dropTargetPos===null&&xe.state.dropAllowed===!1&&xe.state.dragOverNodeKey===null||xe.resetDragState():wi===xe.state.dropPosition&&ji===xe.state.dropLevelOffset&&Wi===xe.state.dropTargetKey&&dr===xe.state.dropContainerKey&&pi===xe.state.dropTargetPos&&Mr===xe.state.dropAllowed&&ui===xe.state.dragOverNodeKey||xe.setState({dropPosition:wi,dropLevelOffset:ji,dropTargetKey:Wi,dropContainerKey:dr,dropTargetPos:pi,dropAllowed:Mr,dragOverNodeKey:ui}),Vn==null||Vn({event:it,node:(0,Xe.F)(Ft.props)}))}},xe.onNodeDragLeave=function(it,Ft){xe.currentMouseOverDroppableNodeKey===Ft.props.eventKey&&!it.currentTarget.contains(it.relatedTarget)&&(xe.resetDragState(),xe.currentMouseOverDroppableNodeKey=null);var Nt=xe.props.onDragLeave;Nt==null||Nt({event:it,node:(0,Xe.F)(Ft.props)})},xe.onWindowDragEnd=function(it){xe.onNodeDragEnd(it,null,!0),window.removeEventListener("dragend",xe.onWindowDragEnd)},xe.onNodeDragEnd=function(it,Ft){var Nt=xe.props.onDragEnd;xe.setState({dragOverNodeKey:null}),xe.cleanDragState(),Nt==null||Nt({event:it,node:(0,Xe.F)(Ft.props)}),xe.dragNode=null,window.removeEventListener("dragend",xe.onWindowDragEnd)},xe.onNodeDrop=function(it,Ft){var Nt,dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Kt=xe.state,wn=Kt.dragChildrenKeys,sn=Kt.dropPosition,qt=Kt.dropTargetKey,Rn=Kt.dropTargetPos,Vn=Kt.dropAllowed;if(Vn){var hn=xe.props.onDrop;if(xe.setState({dragOverNodeKey:null}),xe.cleanDragState(),qt!==null){var Yn=(0,lt.Z)((0,lt.Z)({},(0,Xe.H8)(qt,xe.getTreeNodeRequiredProps())),{},{active:((Nt=xe.getActiveItem())===null||Nt===void 0?void 0:Nt.key)===qt,data:(0,St.Z)(xe.state.keyEntities,qt).node}),mi=wn.indexOf(qt)!==-1;(0,te.ZP)(!mi,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var jn=(0,un.yx)(Rn),An={event:it,node:(0,Xe.F)(Yn),dragNode:xe.dragNode?(0,Xe.F)(xe.dragNode.props):null,dragNodesKeys:[xe.dragNode.props.eventKey].concat(wn),dropToGap:sn!==0,dropPosition:sn+Number(jn[jn.length-1])};dt||hn==null||hn(An),xe.dragNode=null}}},xe.cleanDragState=function(){var it=xe.state.draggingNodeKey;it!==null&&xe.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),xe.dragStartMousePosition=null,xe.currentMouseOverDroppableNodeKey=null},xe.triggerExpandActionExpand=function(it,Ft){var Nt=xe.state,dt=Nt.expandedKeys,Kt=Nt.flattenNodes,wn=Ft.expanded,sn=Ft.key,qt=Ft.isLeaf;if(!(qt||it.shiftKey||it.metaKey||it.ctrlKey)){var Rn=Kt.filter(function(hn){return hn.key===sn})[0],Vn=(0,Xe.F)((0,lt.Z)((0,lt.Z)({},(0,Xe.H8)(sn,xe.getTreeNodeRequiredProps())),{},{data:Rn.data}));xe.setExpandedKeys(wn?(0,un._5)(dt,sn):(0,un.L0)(dt,sn)),xe.onNodeExpand(it,Vn)}},xe.onNodeClick=function(it,Ft){var Nt=xe.props,dt=Nt.onClick,Kt=Nt.expandAction;Kt==="click"&&xe.triggerExpandActionExpand(it,Ft),dt==null||dt(it,Ft)},xe.onNodeDoubleClick=function(it,Ft){var Nt=xe.props,dt=Nt.onDoubleClick,Kt=Nt.expandAction;Kt==="doubleClick"&&xe.triggerExpandActionExpand(it,Ft),dt==null||dt(it,Ft)},xe.onNodeSelect=function(it,Ft){var Nt=xe.state.selectedKeys,dt=xe.state,Kt=dt.keyEntities,wn=dt.fieldNames,sn=xe.props,qt=sn.onSelect,Rn=sn.multiple,Vn=Ft.selected,hn=Ft[wn.key],Yn=!Vn;Yn?Rn?Nt=(0,un.L0)(Nt,hn):Nt=[hn]:Nt=(0,un._5)(Nt,hn);var mi=Nt.map(function(jn){var An=(0,St.Z)(Kt,jn);return An?An.node:null}).filter(function(jn){return jn});xe.setUncontrolledState({selectedKeys:Nt}),qt==null||qt(Nt,{event:"select",selected:Yn,node:Ft,selectedNodes:mi,nativeEvent:it.nativeEvent})},xe.onNodeCheck=function(it,Ft,Nt){var dt=xe.state,Kt=dt.keyEntities,wn=dt.checkedKeys,sn=dt.halfCheckedKeys,qt=xe.props,Rn=qt.checkStrictly,Vn=qt.onCheck,hn=Ft.key,Yn,mi={event:"check",node:Ft,checked:Nt,nativeEvent:it.nativeEvent};if(Rn){var jn=Nt?(0,un.L0)(wn,hn):(0,un._5)(wn,hn),An=(0,un._5)(sn,hn);Yn={checked:jn,halfChecked:An},mi.checkedNodes=jn.map(function(pi){return(0,St.Z)(Kt,pi)}).filter(function(pi){return pi}).map(function(pi){return pi.node}),xe.setUncontrolledState({checkedKeys:jn})}else{var wi=(0,_n.S)([].concat((0,We.Z)(wn),[hn]),!0,Kt),ji=wi.checkedKeys,Wi=wi.halfCheckedKeys;if(!Nt){var dr=new Set(ji);dr.delete(hn);var Mr=(0,_n.S)(Array.from(dr),{checked:!1,halfCheckedKeys:Wi},Kt);ji=Mr.checkedKeys,Wi=Mr.halfCheckedKeys}Yn=ji,mi.checkedNodes=[],mi.checkedNodesPositions=[],mi.halfCheckedKeys=Wi,ji.forEach(function(pi){var ui=(0,St.Z)(Kt,pi);if(ui){var Ci=ui.node,Xi=ui.pos;mi.checkedNodes.push(Ci),mi.checkedNodesPositions.push({node:Ci,pos:Xi})}}),xe.setUncontrolledState({checkedKeys:ji},!1,{halfCheckedKeys:Wi})}Vn==null||Vn(Yn,mi)},xe.onNodeLoad=function(it){var Ft=it.key,Nt=new Promise(function(dt,Kt){xe.setState(function(wn){var sn=wn.loadedKeys,qt=sn===void 0?[]:sn,Rn=wn.loadingKeys,Vn=Rn===void 0?[]:Rn,hn=xe.props,Yn=hn.loadData,mi=hn.onLoad;if(!Yn||qt.indexOf(Ft)!==-1||Vn.indexOf(Ft)!==-1)return null;var jn=Yn(it);return jn.then(function(){var An=xe.state.loadedKeys,wi=(0,un.L0)(An,Ft);mi==null||mi(wi,{event:"load",node:it}),xe.setUncontrolledState({loadedKeys:wi}),xe.setState(function(ji){return{loadingKeys:(0,un._5)(ji.loadingKeys,Ft)}}),dt()}).catch(function(An){if(xe.setState(function(ji){return{loadingKeys:(0,un._5)(ji.loadingKeys,Ft)}}),xe.loadingRetryTimes[Ft]=(xe.loadingRetryTimes[Ft]||0)+1,xe.loadingRetryTimes[Ft]>=Zn){var wi=xe.state.loadedKeys;(0,te.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),xe.setUncontrolledState({loadedKeys:(0,un.L0)(wi,Ft)}),dt()}Kt(An)}),{loadingKeys:(0,un.L0)(Vn,Ft)}})});return Nt.catch(function(){}),Nt},xe.onNodeMouseEnter=function(it,Ft){var Nt=xe.props.onMouseEnter;Nt==null||Nt({event:it,node:Ft})},xe.onNodeMouseLeave=function(it,Ft){var Nt=xe.props.onMouseLeave;Nt==null||Nt({event:it,node:Ft})},xe.onNodeContextMenu=function(it,Ft){var Nt=xe.props.onRightClick;Nt&&(it.preventDefault(),Nt({event:it,node:Ft}))},xe.onFocus=function(){var it=xe.props.onFocus;xe.setState({focused:!0});for(var Ft=arguments.length,Nt=new Array(Ft),dt=0;dt<Ft;dt++)Nt[dt]=arguments[dt];it==null||it.apply(void 0,Nt)},xe.onBlur=function(){var it=xe.props.onBlur;xe.setState({focused:!1}),xe.onActiveChange(null);for(var Ft=arguments.length,Nt=new Array(Ft),dt=0;dt<Ft;dt++)Nt[dt]=arguments[dt];it==null||it.apply(void 0,Nt)},xe.getTreeNodeRequiredProps=function(){var it=xe.state,Ft=it.expandedKeys,Nt=it.selectedKeys,dt=it.loadedKeys,Kt=it.loadingKeys,wn=it.checkedKeys,sn=it.halfCheckedKeys,qt=it.dragOverNodeKey,Rn=it.dropPosition,Vn=it.keyEntities;return{expandedKeys:Ft||[],selectedKeys:Nt||[],loadedKeys:dt||[],loadingKeys:Kt||[],checkedKeys:wn||[],halfCheckedKeys:sn||[],dragOverNodeKey:qt,dropPosition:Rn,keyEntities:Vn}},xe.setExpandedKeys=function(it){var Ft=xe.state,Nt=Ft.treeData,dt=Ft.fieldNames,Kt=(0,Xe.oH)(Nt,it,dt);xe.setUncontrolledState({expandedKeys:it,flattenNodes:Kt},!0)},xe.onNodeExpand=function(it,Ft){var Nt=xe.state.expandedKeys,dt=xe.state,Kt=dt.listChanging,wn=dt.fieldNames,sn=xe.props,qt=sn.onExpand,Rn=sn.loadData,Vn=Ft.expanded,hn=Ft[wn.key];if(!Kt){var Yn=Nt.indexOf(hn),mi=!Vn;if((0,te.ZP)(Vn&&Yn!==-1||!Vn&&Yn===-1,"Expand state not sync with index check"),mi?Nt=(0,un.L0)(Nt,hn):Nt=(0,un._5)(Nt,hn),xe.setExpandedKeys(Nt),qt==null||qt(Nt,{node:Ft,expanded:mi,nativeEvent:it.nativeEvent}),mi&&Rn){var jn=xe.onNodeLoad(Ft);jn&&jn.then(function(){var An=(0,Xe.oH)(xe.state.treeData,Nt,wn);xe.setUncontrolledState({flattenNodes:An})}).catch(function(){var An=xe.state.expandedKeys,wi=(0,un._5)(An,hn);xe.setExpandedKeys(wi)})}}},xe.onListChangeStart=function(){xe.setUncontrolledState({listChanging:!0})},xe.onListChangeEnd=function(){setTimeout(function(){xe.setUncontrolledState({listChanging:!1})})},xe.onActiveChange=function(it){var Ft=xe.state.activeKey,Nt=xe.props.onActiveChange;Ft!==it&&(xe.setState({activeKey:it}),it!==null&&xe.scrollTo({key:it}),Nt==null||Nt(it))},xe.getActiveItem=function(){var it=xe.state,Ft=it.activeKey,Nt=it.flattenNodes;return Ft===null?null:Nt.find(function(dt){var Kt=dt.key;return Kt===Ft})||null},xe.offsetActiveKey=function(it){var Ft=xe.state,Nt=Ft.flattenNodes,dt=Ft.activeKey,Kt=Nt.findIndex(function(qt){var Rn=qt.key;return Rn===dt});Kt===-1&&it<0&&(Kt=Nt.length),Kt=(Kt+it+Nt.length)%Nt.length;var wn=Nt[Kt];if(wn){var sn=wn.key;xe.onActiveChange(sn)}else xe.onActiveChange(null)},xe.onKeyDown=function(it){var Ft=xe.state,Nt=Ft.activeKey,dt=Ft.expandedKeys,Kt=Ft.checkedKeys,wn=Ft.fieldNames,sn=xe.props,qt=sn.onKeyDown,Rn=sn.checkable,Vn=sn.selectable;switch(it.which){case mt.Z.UP:{xe.offsetActiveKey(-1),it.preventDefault();break}case mt.Z.DOWN:{xe.offsetActiveKey(1),it.preventDefault();break}}var hn=xe.getActiveItem();if(hn&&hn.data){var Yn=xe.getTreeNodeRequiredProps(),mi=hn.data.isLeaf===!1||!!(hn.data[wn.children]||[]).length,jn=(0,Xe.F)((0,lt.Z)((0,lt.Z)({},(0,Xe.H8)(Nt,Yn)),{},{data:hn.data,active:!0}));switch(it.which){case mt.Z.LEFT:{mi&&dt.includes(Nt)?xe.onNodeExpand({},jn):hn.parent&&xe.onActiveChange(hn.parent.key),it.preventDefault();break}case mt.Z.RIGHT:{mi&&!dt.includes(Nt)?xe.onNodeExpand({},jn):hn.children&&hn.children.length&&xe.onActiveChange(hn.children[0].key),it.preventDefault();break}case mt.Z.ENTER:case mt.Z.SPACE:{Rn&&!jn.disabled&&jn.checkable!==!1&&!jn.disableCheckbox?xe.onNodeCheck({},jn,!Kt.includes(Nt)):!Rn&&Vn&&!jn.disabled&&jn.selectable!==!1&&xe.onNodeSelect({},jn);break}}}qt==null||qt(it)},xe.setUncontrolledState=function(it){var Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!xe.destroyed){var dt=!1,Kt=!0,wn={};Object.keys(it).forEach(function(sn){if(sn in xe.props){Kt=!1;return}dt=!0,wn[sn]=it[sn]}),dt&&(!Ft||Kt)&&xe.setState((0,lt.Z)((0,lt.Z)({},wn),Nt))}},xe.scrollTo=function(it){xe.listRef.current.scrollTo(it)},xe}return(0,Le.Z)(Ne,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var ut=this.props.activeKey;ut!==void 0&&ut!==this.state.activeKey&&(this.setState({activeKey:ut}),ut!==null&&this.scrollTo({key:ut}))}},{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 ut,Bt=this.state,Qe=Bt.focused,it=Bt.flattenNodes,Ft=Bt.keyEntities,Nt=Bt.draggingNodeKey,dt=Bt.activeKey,Kt=Bt.dropLevelOffset,wn=Bt.dropContainerKey,sn=Bt.dropTargetKey,qt=Bt.dropPosition,Rn=Bt.dragOverNodeKey,Vn=Bt.indent,hn=this.props,Yn=hn.prefixCls,mi=hn.className,jn=hn.style,An=hn.showLine,wi=hn.focusable,ji=hn.tabIndex,Wi=ji===void 0?0:ji,dr=hn.selectable,Mr=hn.showIcon,pi=hn.icon,ui=hn.switcherIcon,Ci=hn.draggable,Xi=hn.checkable,Ni=hn.checkStrictly,io=hn.disabled,hr=hn.motion,De=hn.loadData,Ei=hn.filterTreeNode,Pr=hn.height,Ln=hn.itemHeight,vi=hn.virtual,Zi=hn.titleRender,er=hn.dropIndicatorRender,Gn=hn.onContextMenu,$t=hn.onScroll,Gt=hn.direction,Zt=hn.rootClassName,wt=hn.rootStyle,vn=(0,Oe.Z)(this.props,{aria:!0,data:!0}),cn;return Ci&&((0,He.Z)(Ci)==="object"?cn=Ci:typeof Ci=="function"?cn={nodeDraggable:Ci}:cn={}),ee.createElement(de.k.Provider,{value:{prefixCls:Yn,selectable:dr,showIcon:Mr,icon:pi,switcherIcon:ui,draggable:cn,draggingNodeKey:Nt,checkable:Xi,checkStrictly:Ni,disabled:io,keyEntities:Ft,dropLevelOffset:Kt,dropContainerKey:wn,dropTargetKey:sn,dropPosition:qt,dragOverNodeKey:Rn,indent:Vn,direction:Gt,dropIndicatorRender:er,loadData:De,filterTreeNode:Ei,titleRender:Zi,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:at()(Yn,mi,Zt,(ut={},(0,Te.Z)(ut,"".concat(Yn,"-show-line"),An),(0,Te.Z)(ut,"".concat(Yn,"-focused"),Qe),(0,Te.Z)(ut,"".concat(Yn,"-active-focused"),dt!==null),ut)),style:wt},ee.createElement(Wn,(0,le.Z)({ref:this.listRef,prefixCls:Yn,style:jn,data:it,disabled:io,selectable:dr,checkable:!!Xi,motion:hr,dragging:Nt!==null,height:Pr,itemHeight:Ln,virtual:vi,focusable:wi,focused:Qe,tabIndex:Wi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Gn,onScroll:$t},this.getTreeNodeRequiredProps(),vn))))}}],[{key:"getDerivedStateFromProps",value:function(ut,Bt){var Qe=Bt.prevProps,it={prevProps:ut};function Ft(wi){return!Qe&&wi in ut||Qe&&Qe[wi]!==ut[wi]}var Nt,dt=Bt.fieldNames;if(Ft("fieldNames")&&(dt=(0,Xe.w$)(ut.fieldNames),it.fieldNames=dt),Ft("treeData")?Nt=ut.treeData:Ft("children")&&((0,te.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Nt=(0,Xe.zn)(ut.children)),Nt){it.treeData=Nt;var Kt=(0,Xe.I8)(Nt,{fieldNames:dt});it.keyEntities=(0,lt.Z)((0,Te.Z)({},qe,Rt),Kt.keyEntities)}var wn=it.keyEntities||Bt.keyEntities;if(Ft("expandedKeys")||Qe&&Ft("autoExpandParent"))it.expandedKeys=ut.autoExpandParent||!Qe&&ut.defaultExpandParent?(0,un.r7)(ut.expandedKeys,wn):ut.expandedKeys;else if(!Qe&&ut.defaultExpandAll){var sn=(0,lt.Z)({},wn);delete sn[qe],it.expandedKeys=Object.keys(sn).map(function(wi){return sn[wi].key})}else!Qe&&ut.defaultExpandedKeys&&(it.expandedKeys=ut.autoExpandParent||ut.defaultExpandParent?(0,un.r7)(ut.defaultExpandedKeys,wn):ut.defaultExpandedKeys);if(it.expandedKeys||delete it.expandedKeys,Nt||it.expandedKeys){var qt=(0,Xe.oH)(Nt||Bt.treeData,it.expandedKeys||Bt.expandedKeys,dt);it.flattenNodes=qt}if(ut.selectable&&(Ft("selectedKeys")?it.selectedKeys=(0,un.BT)(ut.selectedKeys,ut):!Qe&&ut.defaultSelectedKeys&&(it.selectedKeys=(0,un.BT)(ut.defaultSelectedKeys,ut))),ut.checkable){var Rn;if(Ft("checkedKeys")?Rn=(0,un.E6)(ut.checkedKeys)||{}:!Qe&&ut.defaultCheckedKeys?Rn=(0,un.E6)(ut.defaultCheckedKeys)||{}:Nt&&(Rn=(0,un.E6)(ut.checkedKeys)||{checkedKeys:Bt.checkedKeys,halfCheckedKeys:Bt.halfCheckedKeys}),Rn){var Vn=Rn,hn=Vn.checkedKeys,Yn=hn===void 0?[]:hn,mi=Vn.halfCheckedKeys,jn=mi===void 0?[]:mi;if(!ut.checkStrictly){var An=(0,_n.S)(Yn,!0,wn);Yn=An.checkedKeys,jn=An.halfCheckedKeys}it.checkedKeys=Yn,it.halfCheckedKeys=jn}}return Ft("loadedKeys")&&(it.loadedKeys=ut.loadedKeys),it}}]),Ne}(ee.Component);li.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},li.TreeNode=_e.Z;var Ge=li,be=Ge},35654:function(Tn,xn,me){"use strict";me.d(xn,{BT:function(){return ee},E6:function(){return he},L0:function(){return Ue},OM:function(){return te},_5:function(){return xt},r7:function(){return ve},wA:function(){return at},yx:function(){return bt}});var le=me(26407),Te=me(39559),He=me(48736),lt=me(59301),We=me(39417),Ve=me(67841),Le=me(71430),Ct=null;function xt(Ee,Me){if(!Ee)return[];var Be=Ee.slice(),je=Be.indexOf(Me);return je>=0&&Be.splice(je,1),Be}function Ue(Ee,Me){var Be=(Ee||[]).slice();return Be.indexOf(Me)===-1&&Be.push(Me),Be}function bt(Ee){return Ee.split("-")}function at(Ee,Me){var Be=[],je=(0,Ve.Z)(Me,Ee);function _e(){var Je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Je.forEach(function(Xe){var ht=Xe.key,Ze=Xe.children;Be.push(ht),_e(Ze)})}return _e(je.children),Be}function mt(Ee){if(Ee.parent){var Me=bt(Ee.pos);return Number(Me[Me.length-1])===Ee.parent.children.length-1}return!1}function Oe(Ee){var Me=bt(Ee.pos);return Number(Me[Me.length-1])===0}function te(Ee,Me,Be,je,_e,Je,Xe,ht,Ze,Mt){var ot,Ot=Ee.clientX,Pt=Ee.clientY,Dt=Ee.target.getBoundingClientRect(),Wt=Dt.top,Lt=Dt.height,qe=(Mt==="rtl"?-1:1)*(((_e==null?void 0:_e.x)||0)-Ot),Ke=(qe-12)/je,Rt=(0,Ve.Z)(ht,Be.props.eventKey);if(Pt<Wt+Lt/2){var Sn=Xe.findIndex(function(be){return be.key===Rt.key}),Pn=Sn<=0?0:Sn-1,_t=Xe[Pn].key;Rt=(0,Ve.Z)(ht,_t)}var rn=Rt.key,ln=Rt,Wn=Rt.key,un=0,_n=0;if(!Ze.includes(rn))for(var St=0;St<Ke&&mt(Rt);St+=1)Rt=Rt.parent,_n+=1;var Zn=Me.props.data,li=Rt.node,Ge=!0;return Oe(Rt)&&Rt.level===0&&Pt<Wt+Lt/2&&Je({dragNode:Zn,dropNode:li,dropPosition:-1})&&Rt.key===Be.props.eventKey?un=-1:(ln.children||[]).length&&Ze.includes(Wn)?Je({dragNode:Zn,dropNode:li,dropPosition:0})?un=0:Ge=!1:_n===0?Ke>-1.5?Je({dragNode:Zn,dropNode:li,dropPosition:1})?un=1:Ge=!1:Je({dragNode:Zn,dropNode:li,dropPosition:0})?un=0:Je({dragNode:Zn,dropNode:li,dropPosition:1})?un=1:Ge=!1:Je({dragNode:Zn,dropNode:li,dropPosition:1})?un=1:Ge=!1,{dropPosition:un,dropLevelOffset:_n,dropTargetKey:Rt.key,dropTargetPos:Rt.pos,dragOverNodeKey:Wn,dropContainerKey:un===0?null:((ot=Rt.parent)===null||ot===void 0?void 0:ot.key)||null,dropAllowed:Ge}}function ee(Ee,Me){if(Ee){var Be=Me.multiple;return Be?Ee.slice():Ee.length?[Ee[0]]:Ee}}var de=function(Me){return Me};function se(Ee,Me){if(!Ee)return[];var Be=Me||{},je=Be.processProps,_e=je===void 0?de:je,Je=Array.isArray(Ee)?Ee:[Ee];return Je.map(function(Xe){var ht=Xe.children,Ze=_objectWithoutProperties(Xe,Ct),Mt=se(ht,Me);return React.createElement(TreeNode,_extends({key:Ze.key},_e(Ze)),Mt)})}function he(Ee){if(!Ee)return null;var Me;if(Array.isArray(Ee))Me={checkedKeys:Ee,halfCheckedKeys:void 0};else if((0,Te.Z)(Ee)==="object")Me={checkedKeys:Ee.checked||void 0,halfCheckedKeys:Ee.halfChecked||void 0};else return(0,He.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Me}function ve(Ee,Me){var Be=new Set;function je(_e){if(!Be.has(_e)){var Je=(0,Ve.Z)(Me,_e);if(Je){Be.add(_e);var Xe=Je.parent,ht=Je.node;ht.disabled||Xe&&je(Xe.key)}}}return(Ee||[]).forEach(function(_e){je(_e)}),(0,le.Z)(Be)}},90782:function(Tn,xn,me){"use strict";me.d(xn,{S:function(){return Le}});var le=me(48736),Te=me(67841);function He(Ct,xt){var Ue=new Set;return Ct.forEach(function(bt){xt.has(bt)||Ue.add(bt)}),Ue}function lt(Ct){var xt=Ct||{},Ue=xt.disabled,bt=xt.disableCheckbox,at=xt.checkable;return!!(Ue||bt)||at===!1}function We(Ct,xt,Ue,bt){for(var at=new Set(Ct),mt=new Set,Oe=0;Oe<=Ue;Oe+=1){var te=xt.get(Oe)||new Set;te.forEach(function(he){var ve=he.key,Ee=he.node,Me=he.children,Be=Me===void 0?[]:Me;at.has(ve)&&!bt(Ee)&&Be.filter(function(je){return!bt(je.node)}).forEach(function(je){at.add(je.key)})})}for(var ee=new Set,de=Ue;de>=0;de-=1){var se=xt.get(de)||new Set;se.forEach(function(he){var ve=he.parent,Ee=he.node;if(!(bt(Ee)||!he.parent||ee.has(he.parent.key))){if(bt(he.parent.node)){ee.add(ve.key);return}var Me=!0,Be=!1;(ve.children||[]).filter(function(je){return!bt(je.node)}).forEach(function(je){var _e=je.key,Je=at.has(_e);Me&&!Je&&(Me=!1),!Be&&(Je||mt.has(_e))&&(Be=!0)}),Me&&at.add(ve.key),Be&&mt.add(ve.key),ee.add(ve.key)}})}return{checkedKeys:Array.from(at),halfCheckedKeys:Array.from(He(mt,at))}}function Ve(Ct,xt,Ue,bt,at){for(var mt=new Set(Ct),Oe=new Set(xt),te=0;te<=bt;te+=1){var ee=Ue.get(te)||new Set;ee.forEach(function(ve){var Ee=ve.key,Me=ve.node,Be=ve.children,je=Be===void 0?[]:Be;!mt.has(Ee)&&!Oe.has(Ee)&&!at(Me)&&je.filter(function(_e){return!at(_e.node)}).forEach(function(_e){mt.delete(_e.key)})})}Oe=new Set;for(var de=new Set,se=bt;se>=0;se-=1){var he=Ue.get(se)||new Set;he.forEach(function(ve){var Ee=ve.parent,Me=ve.node;if(!(at(Me)||!ve.parent||de.has(ve.parent.key))){if(at(ve.parent.node)){de.add(Ee.key);return}var Be=!0,je=!1;(Ee.children||[]).filter(function(_e){return!at(_e.node)}).forEach(function(_e){var Je=_e.key,Xe=mt.has(Je);Be&&!Xe&&(Be=!1),!je&&(Xe||Oe.has(Je))&&(je=!0)}),Be||mt.delete(Ee.key),je&&Oe.add(Ee.key),de.add(Ee.key)}})}return{checkedKeys:Array.from(mt),halfCheckedKeys:Array.from(He(Oe,mt))}}function Le(Ct,xt,Ue,bt){var at=[],mt;bt?mt=bt:mt=lt;var Oe=new Set(Ct.filter(function(se){var he=!!(0,Te.Z)(Ue,se);return he||at.push(se),he})),te=new Map,ee=0;Object.keys(Ue).forEach(function(se){var he=Ue[se],ve=he.level,Ee=te.get(ve);Ee||(Ee=new Set,te.set(ve,Ee)),Ee.add(he),ee=Math.max(ee,ve)}),(0,le.ZP)(!at.length,"Tree missing follow keys: ".concat(at.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var de;return xt===!0?de=We(Oe,te,ee,mt):de=Ve(Oe,xt.halfCheckedKeys,te,ee,mt),de}},67841:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return le}});function le(Te,He){return Te[He]}},71430:function(Tn,xn,me){"use strict";me.d(xn,{F:function(){return ve},H8:function(){return he},I8:function(){return se},km:function(){return at},oH:function(){return ee},w$:function(){return mt},zn:function(){return te}});var le=me(39559),Te=me(26407),He=me(33708),lt=me(37061),We=me(11592),Ve=me(2738),Le=me(48736),Ct=me(67841),xt=["children"];function Ue(Ee,Me){return"".concat(Ee,"-").concat(Me)}function bt(Ee){return Ee&&Ee.type&&Ee.type.isTreeNode}function at(Ee,Me){return Ee!=null?Ee:Me}function mt(Ee){var Me=Ee||{},Be=Me.title,je=Me._title,_e=Me.key,Je=Me.children,Xe=Be||"title";return{title:Xe,_title:je||[Xe],key:_e||"key",children:Je||"children"}}function Oe(Ee,Me){var Be=new Map;function je(_e){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(_e||[]).forEach(function(Xe){var ht=Xe[Me.key],Ze=Xe[Me.children];warning(ht!=null,"Tree node must have a certain key: [".concat(Je).concat(ht,"]"));var Mt=String(ht);warning(!Be.has(Mt)||ht===null||ht===void 0,"Same 'key' exist in the Tree: ".concat(Mt)),Be.set(Mt,!0),je(Ze,"".concat(Je).concat(Mt," > "))})}je(Ee)}function te(Ee){function Me(Be){var je=(0,We.Z)(Be);return je.map(function(_e){if(!bt(_e))return(0,Le.ZP)(!_e,"Tree/TreeNode can only accept TreeNode as children."),null;var Je=_e.key,Xe=_e.props,ht=Xe.children,Ze=(0,lt.Z)(Xe,xt),Mt=(0,He.Z)({key:Je},Ze),ot=Me(ht);return ot.length&&(Mt.children=ot),Mt}).filter(function(_e){return _e})}return Me(Ee)}function ee(Ee,Me,Be){var je=mt(Be),_e=je._title,Je=je.key,Xe=je.children,ht=new Set(Me===!0?[]:Me),Ze=[];function Mt(ot){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return ot.map(function(Pt,Dt){for(var Wt=Ue(Ot?Ot.pos:"0",Dt),Lt=at(Pt[Je],Wt),qe,Ke=0;Ke<_e.length;Ke+=1){var Rt=_e[Ke];if(Pt[Rt]!==void 0){qe=Pt[Rt];break}}var Sn=(0,He.Z)((0,He.Z)({},(0,Ve.Z)(Pt,[].concat((0,Te.Z)(_e),[Je,Xe]))),{},{title:qe,key:Lt,parent:Ot,pos:Wt,children:null,data:Pt,isStart:[].concat((0,Te.Z)(Ot?Ot.isStart:[]),[Dt===0]),isEnd:[].concat((0,Te.Z)(Ot?Ot.isEnd:[]),[Dt===ot.length-1])});return Ze.push(Sn),Me===!0||ht.has(Lt)?Sn.children=Mt(Pt[Xe]||[],Sn):Sn.children=[],Sn})}return Mt(Ee),Ze}function de(Ee,Me,Be){var je={};(0,le.Z)(Be)==="object"?je=Be:je={externalGetKey:Be},je=je||{};var _e=je,Je=_e.childrenPropName,Xe=_e.externalGetKey,ht=_e.fieldNames,Ze=mt(ht),Mt=Ze.key,ot=Ze.children,Ot=Je||ot,Pt;Xe?typeof Xe=="string"?Pt=function(Lt){return Lt[Xe]}:typeof Xe=="function"&&(Pt=function(Lt){return Xe(Lt)}):Pt=function(Lt,qe){return at(Lt[Mt],qe)};function Dt(Wt,Lt,qe,Ke){var Rt=Wt?Wt[Ot]:Ee,Sn=Wt?Ue(qe.pos,Lt):"0",Pn=Wt?[].concat((0,Te.Z)(Ke),[Wt]):[];if(Wt){var _t=Pt(Wt,Sn),rn={node:Wt,index:Lt,pos:Sn,key:_t,parentPos:qe.node?qe.pos:null,level:qe.level+1,nodes:Pn};Me(rn)}Rt&&Rt.forEach(function(ln,Wn){Dt(ln,Wn,{node:Wt,pos:Sn,level:qe?qe.level+1:-1},Pn)})}Dt(null)}function se(Ee){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=Me.initWrapper,je=Me.processEntity,_e=Me.onProcessFinished,Je=Me.externalGetKey,Xe=Me.childrenPropName,ht=Me.fieldNames,Ze=arguments.length>2?arguments[2]:void 0,Mt=Je||Ze,ot={},Ot={},Pt={posEntities:ot,keyEntities:Ot};return Be&&(Pt=Be(Pt)||Pt),de(Ee,function(Dt){var Wt=Dt.node,Lt=Dt.index,qe=Dt.pos,Ke=Dt.key,Rt=Dt.parentPos,Sn=Dt.level,Pn=Dt.nodes,_t={node:Wt,nodes:Pn,index:Lt,key:Ke,pos:qe,level:Sn},rn=at(Ke,qe);ot[qe]=_t,Ot[rn]=_t,_t.parent=ot[Rt],_t.parent&&(_t.parent.children=_t.parent.children||[],_t.parent.children.push(_t)),je&&je(_t,Pt)},{externalGetKey:Mt,childrenPropName:Xe,fieldNames:ht}),_e&&_e(Pt),Pt}function he(Ee,Me){var Be=Me.expandedKeys,je=Me.selectedKeys,_e=Me.loadedKeys,Je=Me.loadingKeys,Xe=Me.checkedKeys,ht=Me.halfCheckedKeys,Ze=Me.dragOverNodeKey,Mt=Me.dropPosition,ot=Me.keyEntities,Ot=(0,Ct.Z)(ot,Ee),Pt={eventKey:Ee,expanded:Be.indexOf(Ee)!==-1,selected:je.indexOf(Ee)!==-1,loaded:_e.indexOf(Ee)!==-1,loading:Je.indexOf(Ee)!==-1,checked:Xe.indexOf(Ee)!==-1,halfChecked:ht.indexOf(Ee)!==-1,pos:String(Ot?Ot.pos:""),dragOver:Ze===Ee&&Mt===0,dragOverGapTop:Ze===Ee&&Mt===-1,dragOverGapBottom:Ze===Ee&&Mt===1};return Pt}function ve(Ee){var Me=Ee.data,Be=Ee.expanded,je=Ee.selected,_e=Ee.checked,Je=Ee.loaded,Xe=Ee.loading,ht=Ee.halfChecked,Ze=Ee.dragOver,Mt=Ee.dragOverGapTop,ot=Ee.dragOverGapBottom,Ot=Ee.pos,Pt=Ee.active,Dt=Ee.eventKey,Wt=(0,He.Z)((0,He.Z)({},Me),{},{expanded:Be,selected:je,checked:_e,loaded:Je,loading:Xe,halfChecked:ht,dragOver:Ze,dragOverGapTop:Mt,dragOverGapBottom:ot,pos:Ot,active:Pt,key:Dt});return"props"in Wt||Object.defineProperty(Wt,"props",{get:function(){return(0,Le.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Ee}}),Wt}},8224:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Te}});var le=me(4676);function Te(He,lt,We,Ve){var Le=le.unstable_batchedUpdates?function(xt){le.unstable_batchedUpdates(We,xt)}:We;return He!=null&&He.addEventListener&&He.addEventListener(lt,Le,Ve),{remove:function(){He!=null&&He.removeEventListener&&He.removeEventListener(lt,Le,Ve)}}}},55468:function(Tn,xn,me){"use strict";me.d(xn,{g1:function(){return bt},os:function(){return mt}});var le=/margin|padding|width|height|max|min|offset/,Te={left:!0,top:!0},He={cssFloat:1,styleFloat:1,float:1};function lt(Oe){return Oe.nodeType===1?Oe.ownerDocument.defaultView.getComputedStyle(Oe,null):{}}function We(Oe,te,ee){if(te=te.toLowerCase(),ee==="auto"){if(te==="height")return Oe.offsetHeight;if(te==="width")return Oe.offsetWidth}return te in Te||(Te[te]=le.test(te)),Te[te]?parseFloat(ee)||0:ee}function Ve(Oe,te){var ee=arguments.length,de=lt(Oe);return te=He[te]?"cssFloat"in Oe.style?"cssFloat":"styleFloat":te,ee===1?de:We(Oe,te,de[te]||Oe.style[te])}function Le(Oe,te,ee){var de=arguments.length;if(te=He[te]?"cssFloat"in Oe.style?"cssFloat":"styleFloat":te,de===3)return typeof ee=="number"&&le.test(te)&&(ee="".concat(ee,"px")),Oe.style[te]=ee,ee;for(var se in te)te.hasOwnProperty(se)&&Le(Oe,se,te[se]);return lt(Oe)}function Ct(Oe){return Oe===document.body?document.documentElement.clientWidth:Oe.offsetWidth}function xt(Oe){return Oe===document.body?window.innerHeight||document.documentElement.clientHeight:Oe.offsetHeight}function Ue(){var Oe=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),te=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Oe,height:te}}function bt(){var Oe=document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight;return{width:Oe,height:te}}function at(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function mt(Oe){var te=Oe.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(Tn,xn,me){"use strict";me.d(xn,{G:function(){return lt}});var le=me(47273),Te=function(Ve){if((0,le.Z)()&&window.document.documentElement){var Le=Array.isArray(Ve)?Ve:[Ve],Ct=window.document.documentElement;return Le.some(function(xt){return xt in Ct.style})}return!1},He=function(Ve,Le){if(!Te(Ve))return!1;var Ct=document.createElement("div"),xt=Ct.style[Ve];return Ct.style[Ve]=Le,Ct.style[Ve]!==xt};function lt(We,Ve){return!Array.isArray(We)&&Ve!==void 0?He(We,Ve):Te(We)}},4409:function(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ge}});var le=me(92413),Te=me(39559),He=me(33708),lt=me(400),We=me(33606),Ve=me(37061),Le=me(92310),Ct=me.n(Le),xt=me(29301),Ue=me(70425),bt=me(34280),at=me(59301),mt=me(4676),Oe=at.forwardRef(function(be,Pe){var Ae=be.height,Ne=be.offsetY,xe=be.offsetX,ut=be.children,Bt=be.prefixCls,Qe=be.onInnerResize,it=be.innerProps,Ft=be.rtl,Nt=be.extra,dt={},Kt={display:"flex",flexDirection:"column"};return Ne!==void 0&&(dt={height:Ae,position:"relative",overflow:"hidden"},Kt=(0,He.Z)((0,He.Z)({},Kt),{},(0,lt.Z)((0,lt.Z)((0,lt.Z)((0,lt.Z)((0,lt.Z)({transform:"translateY(".concat(Ne,"px)")},Ft?"marginRight":"marginLeft",-xe),"position","absolute"),"left",0),"right",0),"top",0))),at.createElement("div",{style:dt},at.createElement(xt.Z,{onResize:function(sn){var qt=sn.offsetHeight;qt&&Qe&&Qe()}},at.createElement("div",(0,le.Z)({style:Kt,className:Ct()((0,lt.Z)({},"".concat(Bt,"-holder-inner"),Bt)),ref:Pe},it),ut,Nt)))});Oe.displayName="Filler";var te=Oe;function ee(be){var Pe=be.children,Ae=be.setRef,Ne=at.useCallback(function(xe){Ae(xe)},[]);return at.cloneElement(Pe,{ref:Ne})}function de(be,Pe,Ae,Ne,xe,ut,Bt,Qe){var it=Qe.getKey;return be.slice(Pe,Ae+1).map(function(Ft,Nt){var dt=Pe+Nt,Kt=Bt(Ft,dt,{style:{width:Ne},offsetX:xe}),wn=it(Ft);return at.createElement(ee,{key:wn,setRef:function(qt){return ut(Ft,qt)}},Kt)})}function se(be,Pe,Ae,Ne){var xe=Ae-be,ut=Pe-Ae,Bt=Math.min(xe,ut)*2;if(Ne<=Bt){var Qe=Math.floor(Ne/2);return Ne%2?Ae+Qe+1:Ae-Qe}return xe>ut?Ae-(Ne-ut):Ae+(Ne-xe)}function he(be,Pe,Ae){var Ne=be.length,xe=Pe.length,ut,Bt;if(Ne===0&&xe===0)return null;Ne<xe?(ut=be,Bt=Pe):(ut=Pe,Bt=be);var Qe={__EMPTY_ITEM__:!0};function it(sn){return sn!==void 0?Ae(sn):Qe}for(var Ft=null,Nt=Math.abs(Ne-xe)!==1,dt=0;dt<Bt.length;dt+=1){var Kt=it(ut[dt]),wn=it(Bt[dt]);if(Kt!==wn){Ft=dt,Nt=Nt||Kt!==it(Bt[dt+1]);break}}return Ft===null?null:{index:Ft,multiple:Nt}}function ve(be,Pe,Ae){var Ne=at.useState(be),xe=(0,We.Z)(Ne,2),ut=xe[0],Bt=xe[1],Qe=at.useState(null),it=(0,We.Z)(Qe,2),Ft=it[0],Nt=it[1];return at.useEffect(function(){var dt=he(ut||[],be||[],Pe);(dt==null?void 0:dt.index)!==void 0&&(Ae==null||Ae(dt.index),Nt(be[dt.index])),Bt(be)},[be]),[Ft]}var Ee=me(16089),Me=(typeof navigator=="undefined"?"undefined":(0,Te.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Be=Me,je=function(be,Pe,Ae,Ne){var xe=(0,at.useRef)(!1),ut=(0,at.useRef)(null);function Bt(){clearTimeout(ut.current),xe.current=!0,ut.current=setTimeout(function(){xe.current=!1},50)}var Qe=(0,at.useRef)({top:be,bottom:Pe,left:Ae,right:Ne});return Qe.current.top=be,Qe.current.bottom=Pe,Qe.current.left=Ae,Qe.current.right=Ne,function(it,Ft){var Nt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,dt=it?Ft<0&&Qe.current.left||Ft>0&&Qe.current.right:Ft<0&&Qe.current.top||Ft>0&&Qe.current.bottom;return Nt&&dt?(clearTimeout(ut.current),xe.current=!1):(!dt||xe.current)&&Bt(),!xe.current&&dt}};function _e(be,Pe,Ae,Ne,xe,ut,Bt){var Qe=(0,at.useRef)(0),it=(0,at.useRef)(null),Ft=(0,at.useRef)(null),Nt=(0,at.useRef)(!1),dt=je(Pe,Ae,Ne,xe);function Kt(hn,Yn){if(Ee.Z.cancel(it.current),!dt(!1,Yn)){var mi=hn;if(!mi._virtualHandled)mi._virtualHandled=!0;else return;Qe.current+=Yn,Ft.current=Yn,Be||mi.preventDefault(),it.current=(0,Ee.Z)(function(){var jn=Nt.current?10:1;Bt(Qe.current*jn,!1),Qe.current=0})}}function wn(hn,Yn){Bt(Yn,!0),Be||hn.preventDefault()}var sn=(0,at.useRef)(null),qt=(0,at.useRef)(null);function Rn(hn){if(be){Ee.Z.cancel(qt.current),qt.current=(0,Ee.Z)(function(){sn.current=null},2);var Yn=hn.deltaX,mi=hn.deltaY,jn=hn.shiftKey,An=Yn,wi=mi;(sn.current==="sx"||!sn.current&&jn&&mi&&!Yn)&&(An=mi,wi=0,sn.current="sx");var ji=Math.abs(An),Wi=Math.abs(wi);sn.current===null&&(sn.current=ut&&ji>Wi?"x":"y"),sn.current==="y"?Kt(hn,wi):wn(hn,An)}}function Vn(hn){be&&(Nt.current=hn.detail===Ft.current)}return[Rn,Vn]}function Je(be,Pe,Ae,Ne){var xe=at.useMemo(function(){return[new Map,[]]},[be,Ae.id,Ne]),ut=(0,We.Z)(xe,2),Bt=ut[0],Qe=ut[1],it=function(Nt){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nt,Kt=Bt.get(Nt),wn=Bt.get(dt);if(Kt===void 0||wn===void 0)for(var sn=be.length,qt=Qe.length;qt<sn;qt+=1){var Rn,Vn=be[qt],hn=Pe(Vn);Bt.set(hn,qt);var Yn=(Rn=Ae.get(hn))!==null&&Rn!==void 0?Rn:Ne;if(Qe[qt]=(Qe[qt-1]||0)+Yn,hn===Nt&&(Kt=qt),hn===dt&&(wn=qt),Kt!==void 0&&wn!==void 0)break}return{top:Qe[Kt-1]||0,bottom:Qe[wn]}};return it}var Xe=me(76846),ht=me(6909),Ze=me(4771),Mt=function(){function be(){(0,ht.Z)(this,be),(0,lt.Z)(this,"maps",void 0),(0,lt.Z)(this,"id",0),(0,lt.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Ze.Z)(be,[{key:"set",value:function(Ae,Ne){this.maps[Ae]=Ne,this.id+=1,this.diffKeys.add(Ae)}},{key:"get",value:function(Ae){return this.maps[Ae]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),be}(),ot=Mt;function Ot(be){var Pe=parseFloat(be);return isNaN(Pe)?0:Pe}function Pt(be,Pe,Ae){var Ne=at.useState(0),xe=(0,We.Z)(Ne,2),ut=xe[0],Bt=xe[1],Qe=(0,at.useRef)(new Map),it=(0,at.useRef)(new ot),Ft=(0,at.useRef)(0);function Nt(){Ft.current+=1}function dt(){var wn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Nt();var sn=function(){var Vn=!1;Qe.current.forEach(function(hn,Yn){if(hn&&hn.offsetParent){var mi=(0,Xe.ZP)(hn),jn=mi.offsetHeight,An=getComputedStyle(mi),wi=An.marginTop,ji=An.marginBottom,Wi=Ot(wi),dr=Ot(ji),Mr=jn+Wi+dr;it.current.get(Yn)!==Mr&&(it.current.set(Yn,Mr),Vn=!0)}}),Vn&&Bt(function(hn){return hn+1})};if(wn)sn();else{Ft.current+=1;var qt=Ft.current;Promise.resolve().then(function(){qt===Ft.current&&sn()})}}function Kt(wn,sn){var qt=be(wn),Rn=Qe.current.get(qt);sn?(Qe.current.set(qt,sn),dt()):Qe.current.delete(qt),!Rn!=!sn&&(sn?Pe==null||Pe(wn):Ae==null||Ae(wn))}return(0,at.useEffect)(function(){return Nt},[]),[Kt,dt,it.current,ut]}var Dt=14/15;function Wt(be,Pe,Ae){var Ne=(0,at.useRef)(!1),xe=(0,at.useRef)(0),ut=(0,at.useRef)(0),Bt=(0,at.useRef)(null),Qe=(0,at.useRef)(null),it,Ft=function(wn){if(Ne.current){var sn=Math.ceil(wn.touches[0].pageX),qt=Math.ceil(wn.touches[0].pageY),Rn=xe.current-sn,Vn=ut.current-qt,hn=Math.abs(Rn)>Math.abs(Vn);hn?xe.current=sn:ut.current=qt;var Yn=Ae(hn,hn?Rn:Vn,!1,wn);Yn&&wn.preventDefault(),clearInterval(Qe.current),Yn&&(Qe.current=setInterval(function(){hn?Rn*=Dt:Vn*=Dt;var mi=Math.floor(hn?Rn:Vn);(!Ae(hn,mi,!0)||Math.abs(mi)<=.1)&&clearInterval(Qe.current)},16))}},Nt=function(){Ne.current=!1,it()},dt=function(wn){it(),wn.touches.length===1&&!Ne.current&&(Ne.current=!0,xe.current=Math.ceil(wn.touches[0].pageX),ut.current=Math.ceil(wn.touches[0].pageY),Bt.current=wn.target,Bt.current.addEventListener("touchmove",Ft,{passive:!1}),Bt.current.addEventListener("touchend",Nt,{passive:!0}))};it=function(){Bt.current&&(Bt.current.removeEventListener("touchmove",Ft),Bt.current.removeEventListener("touchend",Nt))},(0,bt.Z)(function(){return be&&Pe.current.addEventListener("touchstart",dt,{passive:!0}),function(){var Kt;(Kt=Pe.current)===null||Kt===void 0||Kt.removeEventListener("touchstart",dt),it(),clearInterval(Qe.current)}},[be])}function Lt(be){return Math.floor(Math.pow(be,.5))}function qe(be,Pe){var Ae="touches"in be?be.touches[0]:be;return Ae[Pe?"pageX":"pageY"]-window[Pe?"scrollX":"scrollY"]}function Ke(be,Pe,Ae){at.useEffect(function(){var Ne=Pe.current;if(be&&Ne){var xe=!1,ut,Bt,Qe=function(){Ee.Z.cancel(ut)},it=function Kt(){Qe(),ut=(0,Ee.Z)(function(){Ae(Bt),Kt()})},Ft=function(wn){if(!wn.target.draggable){var sn=wn;sn._virtualHandled||(sn._virtualHandled=!0,xe=!0)}},Nt=function(){xe=!1,Qe()},dt=function(wn){if(xe){var sn=qe(wn,!1),qt=Ne.getBoundingClientRect(),Rn=qt.top,Vn=qt.bottom;if(sn<=Rn){var hn=Rn-sn;Bt=-Lt(hn),it()}else if(sn>=Vn){var Yn=sn-Vn;Bt=Lt(Yn),it()}else Qe()}};return Ne.addEventListener("mousedown",Ft),Ne.ownerDocument.addEventListener("mouseup",Nt),Ne.ownerDocument.addEventListener("mousemove",dt),function(){Ne.removeEventListener("mousedown",Ft),Ne.ownerDocument.removeEventListener("mouseup",Nt),Ne.ownerDocument.removeEventListener("mousemove",dt),Qe()}}},[be])}var Rt=10;function Sn(be,Pe,Ae,Ne,xe,ut,Bt,Qe){var it=at.useRef(),Ft=at.useState(null),Nt=(0,We.Z)(Ft,2),dt=Nt[0],Kt=Nt[1];return(0,bt.Z)(function(){if(dt&&dt.times<Rt){if(!be.current){Kt(function(De){return(0,He.Z)({},De)});return}ut();var wn=dt.targetAlign,sn=dt.originAlign,qt=dt.index,Rn=dt.offset,Vn=be.current.clientHeight,hn=!1,Yn=wn,mi=null;if(Vn){for(var jn=wn||sn,An=0,wi=0,ji=0,Wi=Math.min(Pe.length-1,qt),dr=0;dr<=Wi;dr+=1){var Mr=xe(Pe[dr]);wi=An;var pi=Ae.get(Mr);ji=wi+(pi===void 0?Ne:pi),An=ji}for(var ui=jn==="top"?Rn:Vn-Rn,Ci=Wi;Ci>=0;Ci-=1){var Xi=xe(Pe[Ci]),Ni=Ae.get(Xi);if(Ni===void 0){hn=!0;break}if(ui-=Ni,ui<=0)break}switch(jn){case"top":mi=wi-Rn;break;case"bottom":mi=ji-Vn+Rn;break;default:{var io=be.current.scrollTop,hr=io+Vn;wi<io?Yn="top":ji>hr&&(Yn="bottom")}}mi!==null&&Bt(mi),mi!==dt.lastTop&&(hn=!0)}hn&&Kt((0,He.Z)((0,He.Z)({},dt),{},{times:dt.times+1,targetAlign:Yn,lastTop:mi}))}},[dt,be.current]),function(wn){if(wn==null){Qe();return}if(Ee.Z.cancel(it.current),typeof wn=="number")Bt(wn);else if(wn&&(0,Te.Z)(wn)==="object"){var sn,qt=wn.align;"index"in wn?sn=wn.index:sn=Pe.findIndex(function(hn){return xe(hn)===wn.key});var Rn=wn.offset,Vn=Rn===void 0?0:Rn;Kt({times:0,index:sn,offset:Vn,originAlign:qt})}}}var Pn=at.forwardRef(function(be,Pe){var Ae=be.prefixCls,Ne=be.rtl,xe=be.scrollOffset,ut=be.scrollRange,Bt=be.onStartMove,Qe=be.onStopMove,it=be.onScroll,Ft=be.horizontal,Nt=be.spinSize,dt=be.containerSize,Kt=be.style,wn=be.thumbStyle,sn=be.showScrollBar,qt=at.useState(!1),Rn=(0,We.Z)(qt,2),Vn=Rn[0],hn=Rn[1],Yn=at.useState(null),mi=(0,We.Z)(Yn,2),jn=mi[0],An=mi[1],wi=at.useState(null),ji=(0,We.Z)(wi,2),Wi=ji[0],dr=ji[1],Mr=!Ne,pi=at.useRef(),ui=at.useRef(),Ci=at.useState(sn),Xi=(0,We.Z)(Ci,2),Ni=Xi[0],io=Xi[1],hr=at.useRef(),De=function(){sn===!0||sn===!1||(clearTimeout(hr.current),io(!0),hr.current=setTimeout(function(){io(!1)},3e3))},Ei=ut-dt||0,Pr=dt-Nt||0,Ln=at.useMemo(function(){if(xe===0||Ei===0)return 0;var vn=xe/Ei;return vn*Pr},[xe,Ei,Pr]),vi=function(cn){cn.stopPropagation(),cn.preventDefault()},Zi=at.useRef({top:Ln,dragging:Vn,pageY:jn,startTop:Wi});Zi.current={top:Ln,dragging:Vn,pageY:jn,startTop:Wi};var er=function(cn){hn(!0),An(qe(cn,Ft)),dr(Zi.current.top),Bt(),cn.stopPropagation(),cn.preventDefault()};at.useEffect(function(){var vn=function(an){an.preventDefault()},cn=pi.current,It=ui.current;return cn.addEventListener("touchstart",vn,{passive:!1}),It.addEventListener("touchstart",er,{passive:!1}),function(){cn.removeEventListener("touchstart",vn),It.removeEventListener("touchstart",er)}},[]);var Gn=at.useRef();Gn.current=Ei;var $t=at.useRef();$t.current=Pr,at.useEffect(function(){if(Vn){var vn,cn=function(an){var dn=Zi.current,ei=dn.dragging,pn=dn.pageY,zt=dn.startTop;Ee.Z.cancel(vn);var In=pi.current.getBoundingClientRect(),Qn=dt/(Ft?In.width:In.height);if(ei){var xi=(qe(an,Ft)-pn)*Qn,tn=zt;!Mr&&Ft?tn-=xi:tn+=xi;var fn=Gn.current,kn=$t.current,zi=kn?tn/kn:0,Di=Math.ceil(zi*fn);Di=Math.max(Di,0),Di=Math.min(Di,fn),vn=(0,Ee.Z)(function(){it(Di,Ft)})}},It=function(){hn(!1),Qe()};return window.addEventListener("mousemove",cn,{passive:!0}),window.addEventListener("touchmove",cn,{passive:!0}),window.addEventListener("mouseup",It,{passive:!0}),window.addEventListener("touchend",It,{passive:!0}),function(){window.removeEventListener("mousemove",cn),window.removeEventListener("touchmove",cn),window.removeEventListener("mouseup",It),window.removeEventListener("touchend",It),Ee.Z.cancel(vn)}}},[Vn]),at.useEffect(function(){return De(),function(){clearTimeout(hr.current)}},[xe]),at.useImperativeHandle(Pe,function(){return{delayHidden:De}});var Gt="".concat(Ae,"-scrollbar"),Zt={position:"absolute",visibility:Ni?null:"hidden"},wt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Ft?(Zt.height=8,Zt.left=0,Zt.right=0,Zt.bottom=0,wt.height="100%",wt.width=Nt,Mr?wt.left=Ln:wt.right=Ln):(Zt.width=8,Zt.top=0,Zt.bottom=0,Mr?Zt.right=0:Zt.left=0,wt.width="100%",wt.height=Nt,wt.top=Ln),at.createElement("div",{ref:pi,className:Ct()(Gt,(0,lt.Z)((0,lt.Z)((0,lt.Z)({},"".concat(Gt,"-horizontal"),Ft),"".concat(Gt,"-vertical"),!Ft),"".concat(Gt,"-visible"),Ni)),style:(0,He.Z)((0,He.Z)({},Zt),Kt),onMouseDown:vi,onMouseMove:De},at.createElement("div",{ref:ui,className:Ct()("".concat(Gt,"-thumb"),(0,lt.Z)({},"".concat(Gt,"-thumb-moving"),Vn)),style:(0,He.Z)((0,He.Z)({},wt),wn),onMouseDown:er}))}),_t=Pn,rn=20;function ln(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ae=be/Pe*be;return isNaN(Ae)&&(Ae=0),Ae=Math.max(Ae,rn),Math.floor(Ae)}var Wn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],un=[],_n={overflowY:"auto",overflowAnchor:"none"};function St(be,Pe){var Ae=be.prefixCls,Ne=Ae===void 0?"rc-virtual-list":Ae,xe=be.className,ut=be.height,Bt=be.itemHeight,Qe=be.fullHeight,it=Qe===void 0?!0:Qe,Ft=be.style,Nt=be.data,dt=be.children,Kt=be.itemKey,wn=be.virtual,sn=be.direction,qt=be.scrollWidth,Rn=be.component,Vn=Rn===void 0?"div":Rn,hn=be.onScroll,Yn=be.onVirtualScroll,mi=be.onVisibleChange,jn=be.innerProps,An=be.extraRender,wi=be.styles,ji=be.showScrollBar,Wi=ji===void 0?"optional":ji,dr=(0,Ve.Z)(be,Wn),Mr=at.useCallback(function(Lo){return typeof Kt=="function"?Kt(Lo):Lo==null?void 0:Lo[Kt]},[Kt]),pi=Pt(Mr,null,null),ui=(0,We.Z)(pi,4),Ci=ui[0],Xi=ui[1],Ni=ui[2],io=ui[3],hr=!!(wn!==!1&&ut&&Bt),De=at.useMemo(function(){return Object.values(Ni.maps).reduce(function(Lo,Po){return Lo+Po},0)},[Ni.id,Ni.maps]),Ei=hr&&Nt&&(Math.max(Bt*Nt.length,De)>ut||!!qt),Pr=sn==="rtl",Ln=Ct()(Ne,(0,lt.Z)({},"".concat(Ne,"-rtl"),Pr),xe),vi=Nt||un,Zi=(0,at.useRef)(),er=(0,at.useRef)(),Gn=(0,at.useRef)(),$t=(0,at.useState)(0),Gt=(0,We.Z)($t,2),Zt=Gt[0],wt=Gt[1],vn=(0,at.useState)(0),cn=(0,We.Z)(vn,2),It=cn[0],ct=cn[1],an=(0,at.useState)(!1),dn=(0,We.Z)(an,2),ei=dn[0],pn=dn[1],zt=function(){pn(!0)},In=function(){pn(!1)},Qn={getKey:Mr};function xi(Lo){wt(function(Po){var Xr;typeof Lo=="function"?Xr=Lo(Po):Xr=Lo;var ha=lo(Xr);return Zi.current.scrollTop=ha,ha})}var tn=(0,at.useRef)({start:0,end:vi.length}),fn=(0,at.useRef)(),kn=ve(vi,Mr),zi=(0,We.Z)(kn,1),Di=zi[0];fn.current=Di;var Si=at.useMemo(function(){if(!hr)return{scrollHeight:void 0,start:0,end:vi.length-1,offset:void 0};if(!Ei){var Lo;return{scrollHeight:((Lo=er.current)===null||Lo===void 0?void 0:Lo.offsetHeight)||0,start:0,end:vi.length-1,offset:void 0}}for(var Po=0,Xr,ha,br,Ur=vi.length,wo=0;wo<Ur;wo+=1){var fi=vi[wo],Ba=Mr(fi),Eo=Ni.get(Ba),es=Po+(Eo===void 0?Bt:Eo);es>=Zt&&Xr===void 0&&(Xr=wo,ha=Po),es>Zt+ut&&br===void 0&&(br=wo),Po=es}return Xr===void 0&&(Xr=0,ha=0,br=Math.ceil(ut/Bt)),br===void 0&&(br=vi.length-1),br=Math.min(br+1,vi.length-1),{scrollHeight:Po,start:Xr,end:br,offset:ha}},[Ei,hr,Zt,vi,io,ut]),Fi=Si.scrollHeight,Ti=Si.start,nr=Si.end,$r=Si.offset;tn.current.start=Ti,tn.current.end=nr,at.useLayoutEffect(function(){var Lo=Ni.getRecord();if(Lo.size===1){var Po=Array.from(Lo)[0],Xr=Mr(vi[Ti]);if(Xr===Po){var ha=Ni.get(Po),br=ha-Bt;xi(function(Ur){return Ur+br})}}Ni.resetRecord()},[Fi]);var ci=at.useState({width:0,height:ut}),Ki=(0,We.Z)(ci,2),Yr=Ki[0],Qr=Ki[1],Cr=function(Po){Qr({width:Po.offsetWidth,height:Po.offsetHeight})},Jt=(0,at.useRef)(),gi=(0,at.useRef)(),mr=at.useMemo(function(){return ln(Yr.width,qt)},[Yr.width,qt]),tr=at.useMemo(function(){return ln(Yr.height,Fi)},[Yr.height,Fi]),Hr=Fi-ut,Lr=(0,at.useRef)(Hr);Lr.current=Hr;function lo(Lo){var Po=Lo;return Number.isNaN(Lr.current)||(Po=Math.min(Po,Lr.current)),Po=Math.max(Po,0),Po}var Wr=Zt<=0,jr=Zt>=Hr,fo=It<=0,$n=It>=qt,aa=je(Wr,jr,fo,$n),Un=function(){return{x:Pr?-It:It,y:Zt}},Do=(0,at.useRef)(Un()),Ko=(0,Ue.useEvent)(function(Lo){if(Yn){var Po=(0,He.Z)((0,He.Z)({},Un()),Lo);(Do.current.x!==Po.x||Do.current.y!==Po.y)&&(Yn(Po),Do.current=Po)}});function Ji(Lo,Po){var Xr=Lo;Po?((0,mt.flushSync)(function(){ct(Xr)}),Ko()):xi(Xr)}function la(Lo){var Po=Lo.currentTarget.scrollTop;Po!==Zt&&xi(Po),hn==null||hn(Lo),Ko()}var Ro=function(Po){var Xr=Po,ha=qt?qt-Yr.width:0;return Xr=Math.max(Xr,0),Xr=Math.min(Xr,ha),Xr},Nr=(0,Ue.useEvent)(function(Lo,Po){Po?((0,mt.flushSync)(function(){ct(function(Xr){var ha=Xr+(Pr?-Lo:Lo);return Ro(ha)})}),Ko()):xi(function(Xr){var ha=Xr+Lo;return ha})}),Ar=_e(hr,Wr,jr,fo,$n,!!qt,Nr),xo=(0,We.Z)(Ar,2),Wo=xo[0],Hi=xo[1];Wt(hr,Zi,function(Lo,Po,Xr,ha){var br=ha;return aa(Lo,Po,Xr)?!1:!br||!br._virtualHandled?(br&&(br._virtualHandled=!0),Wo({preventDefault:function(){},deltaX:Lo?Po:0,deltaY:Lo?0:Po}),!0):!1}),Ke(Ei,Zi,function(Lo){xi(function(Po){return Po+Lo})}),(0,bt.Z)(function(){function Lo(Xr){var ha=Wr&&Xr.detail<0,br=jr&&Xr.detail>0;hr&&!ha&&!br&&Xr.preventDefault()}var Po=Zi.current;return Po.addEventListener("wheel",Wo,{passive:!1}),Po.addEventListener("DOMMouseScroll",Hi,{passive:!0}),Po.addEventListener("MozMousePixelScroll",Lo,{passive:!1}),function(){Po.removeEventListener("wheel",Wo),Po.removeEventListener("DOMMouseScroll",Hi),Po.removeEventListener("MozMousePixelScroll",Lo)}},[hr,Wr,jr]),(0,bt.Z)(function(){if(qt){var Lo=Ro(It);ct(Lo),Ko({x:Lo})}},[Yr.width,qt]);var st=function(){var Po,Xr;(Po=Jt.current)===null||Po===void 0||Po.delayHidden(),(Xr=gi.current)===null||Xr===void 0||Xr.delayHidden()},_o=Sn(Zi,vi,Ni,Bt,Mr,function(){return Xi(!0)},xi,st);at.useImperativeHandle(Pe,function(){return{nativeElement:Gn.current,getScrollInfo:Un,scrollTo:function(Po){function Xr(ha){return ha&&(0,Te.Z)(ha)==="object"&&("left"in ha||"top"in ha)}Xr(Po)?(Po.left!==void 0&&ct(Ro(Po.left)),_o(Po.top)):_o(Po)}}}),(0,bt.Z)(function(){if(mi){var Lo=vi.slice(Ti,nr+1);mi(Lo,vi)}},[Ti,nr,vi]);var Ia=Je(vi,Mr,Ni,Bt),Ma=An==null?void 0:An({start:Ti,end:nr,virtual:Ei,offsetX:It,offsetY:$r,rtl:Pr,getSize:Ia}),xs=de(vi,Ti,nr,qt,It,Ci,dt,Qn),Wa=null;ut&&(Wa=(0,He.Z)((0,lt.Z)({},it?"height":"maxHeight",ut),_n),hr&&(Wa.overflowY="hidden",qt&&(Wa.overflowX="hidden"),ei&&(Wa.pointerEvents="none")));var Ps={};return Pr&&(Ps.dir="rtl"),at.createElement("div",(0,le.Z)({ref:Gn,style:(0,He.Z)((0,He.Z)({},Ft),{},{position:"relative"}),className:Ln},Ps,dr),at.createElement(xt.Z,{onResize:Cr},at.createElement(Vn,{className:"".concat(Ne,"-holder"),style:Wa,ref:Zi,onScroll:la,onMouseEnter:st},at.createElement(te,{prefixCls:Ne,height:Fi,offsetX:It,offsetY:$r,scrollWidth:qt,onInnerResize:Xi,ref:er,innerProps:jn,rtl:Pr,extra:Ma},xs))),Ei&&Fi>ut&&at.createElement(_t,{ref:Jt,prefixCls:Ne,scrollOffset:Zt,scrollRange:Fi,rtl:Pr,onScroll:Ji,onStartMove:zt,onStopMove:In,spinSize:tr,containerSize:Yr.height,style:wi==null?void 0:wi.verticalScrollBar,thumbStyle:wi==null?void 0:wi.verticalScrollBarThumb,showScrollBar:Wi}),Ei&&qt>Yr.width&&at.createElement(_t,{ref:gi,prefixCls:Ne,scrollOffset:It,scrollRange:qt,rtl:Pr,onScroll:Ji,onStartMove:zt,onStopMove:In,spinSize:mr,containerSize:Yr.width,horizontal:!0,style:wi==null?void 0:wi.horizontalScrollBar,thumbStyle:wi==null?void 0:wi.horizontalScrollBarThumb,showScrollBar:Wi}))}var Zn=at.forwardRef(St);Zn.displayName="List";var li=Zn,Ge=li},78113:function(Tn,xn,me){"use strict";me.d(xn,{Z5:function(){return wg},_l:function(){return hu},bK:function(){return Pc}});var le=me(59301),Te=me(2505);function He(Se,Ce){Se.prototype=Object.create(Ce.prototype),Se.prototype.constructor=Se,(0,Te.Z)(Se,Ce)}var lt=me(92413),We=me(59781),Ve=le.createContext(null),Le=null;function Ct(Se){Se()}var xt=Ct,Ue=function(Ce){return xt=Ce},bt=function(){return xt};function at(){var Se=bt(),Ce=null,ke=null;return{clear:function(){Ce=null,ke=null},notify:function(){Se(function(){for(var yt=Ce;yt;)yt.callback(),yt=yt.next})},get:function(){for(var yt=[],vt=Ce;vt;)yt.push(vt),vt=vt.next;return yt},subscribe:function(yt){var vt=!0,kt=ke={callback:yt,next:null,prev:ke};return kt.prev?kt.prev.next=kt:Ce=kt,function(){!vt||Ce===null||(vt=!1,kt.next?kt.next.prev=kt.prev:ke=kt.prev,kt.prev?kt.prev.next=kt.next:Ce=kt.next)}}}}var mt={notify:function(){},get:function(){return[]}};function Oe(Se,Ce){var ke,$e=mt;function yt(Fn){return Cn(),$e.subscribe(Fn)}function vt(){$e.notify()}function kt(){Dn.onStateChange&&Dn.onStateChange()}function Ht(){return!!ke}function Cn(){ke||(ke=Ce?Ce.addNestedSub(kt):Se.subscribe(kt),$e=at())}function Hn(){ke&&(ke(),ke=void 0,$e.clear(),$e=mt)}var Dn={addNestedSub:yt,notifyNestedSubs:vt,handleChangeWrapper:kt,isSubscribed:Ht,trySubscribe:Cn,tryUnsubscribe:Hn,getListeners:function(){return $e}};return Dn}var te=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?le.useLayoutEffect:le.useEffect;function ee(Se){var Ce=Se.store,ke=Se.context,$e=Se.children,yt=(0,le.useMemo)(function(){var Ht=Oe(Ce);return{store:Ce,subscription:Ht}},[Ce]),vt=(0,le.useMemo)(function(){return Ce.getState()},[Ce]);te(function(){var Ht=yt.subscription;return Ht.onStateChange=Ht.notifyNestedSubs,Ht.trySubscribe(),vt!==Ce.getState()&&Ht.notifyNestedSubs(),function(){Ht.tryUnsubscribe(),Ht.onStateChange=null}},[yt,vt]);var kt=ke||Ve;return le.createElement(kt.Provider,{value:yt},$e)}var de=ee,se=me(96529),he=me(94266),ve=me.n(he),Ee=me(53410),Me=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Be=["reactReduxForwardedRef"],je=[],_e=[null,null],Je=function(Ce){try{return JSON.stringify(Ce)}catch(ke){return String(Ce)}};function Xe(Se,Ce){var ke=Se[1];return[Ce.payload,ke+1]}function ht(Se,Ce,ke){te(function(){return Se.apply(void 0,Ce)},ke)}function Ze(Se,Ce,ke,$e,yt,vt,kt){Se.current=$e,Ce.current=yt,ke.current=!1,vt.current&&(vt.current=null,kt())}function Mt(Se,Ce,ke,$e,yt,vt,kt,Ht,Cn,Hn){if(Se){var Dn=!1,Fn=null,bn=function(){if(!Dn){var Kr=Ce.getState(),no,vo;try{no=$e(Kr,yt.current)}catch(ko){vo=ko,Fn=ko}vo||(Fn=null),no===vt.current?kt.current||Cn():(vt.current=no,Ht.current=no,kt.current=!0,Hn({type:"STORE_UPDATED",payload:{error:vo}}))}};ke.onStateChange=bn,ke.trySubscribe(),bn();var ti=function(){if(Dn=!0,ke.tryUnsubscribe(),ke.onStateChange=null,Fn)throw Fn};return ti}}var ot=function(){return[null,0]};function Ot(Se,Ce){Ce===void 0&&(Ce={});var ke=Ce,$e=ke.getDisplayName,yt=$e===void 0?function(ls){return"ConnectAdvanced("+ls+")"}:$e,vt=ke.methodName,kt=vt===void 0?"connectAdvanced":vt,Ht=ke.renderCountProp,Cn=Ht===void 0?void 0:Ht,Hn=ke.shouldHandleStateChanges,Dn=Hn===void 0?!0:Hn,Fn=ke.storeKey,bn=Fn===void 0?"store":Fn,ti=ke.withRef,Oi=ti===void 0?!1:ti,Kr=ke.forwardRef,no=Kr===void 0?!1:Kr,vo=ke.context,ko=vo===void 0?Ve:vo,na=(0,se.Z)(ke,Me);if(0)var qo;var Da=ko;return function(Os){var eu=Os.displayName||Os.name||"Component",As=yt(eu),Gl=(0,lt.Z)({},na,{getDisplayName:yt,methodName:kt,renderCountProp:Cn,shouldHandleStateChanges:Dn,storeKey:bn,displayName:As,wrappedComponentName:eu,WrappedComponent:Os}),_u=na.pure;function Xu(Ol){return Se(Ol.dispatch,Gl)}var hd=_u?le.useMemo:function(Ol){return Ol()};function Lc(Ol){var Nd=(0,le.useMemo)(function(){var Rl=Ol.reactReduxForwardedRef,zc=(0,se.Z)(Ol,Be);return[Ol.context,Rl,zc]},[Ol]),$l=Nd[0],fd=Nd[1],vf=Nd[2],gd=(0,le.useMemo)(function(){return $l&&$l.Consumer&&(0,Ee.isContextConsumer)(le.createElement($l.Consumer,null))?$l:Da},[$l,Da]),da=(0,le.useContext)(gd),Wh=!!Ol.store&&!!Ol.store.getState&&!!Ol.store.dispatch,Lg=!!da&&!!da.store,pd=Wh?Ol.store:da.store,Qd=(0,le.useMemo)(function(){return Xu(pd)},[pd]),Fh=(0,le.useMemo)(function(){if(!Dn)return _e;var Rl=Oe(pd,Wh?null:da.subscription),zc=Rl.notifyNestedSubs.bind(Rl);return[Rl,zc]},[pd,Wh,da]),Cc=Fh[0],Yf=Fh[1],Xf=(0,le.useMemo)(function(){return Wh?da:(0,lt.Z)({},da,{subscription:Cc})},[Wh,da,Cc]),op=(0,le.useReducer)(Xe,je,ot),Wp=op[0],Ng=Wp[0],yf=op[1];if(Ng&&Ng.error)throw Ng.error;var ap=(0,le.useRef)(),Ag=(0,le.useRef)(vf),xf=(0,le.useRef)(),Sf=(0,le.useRef)(!1),Dg=hd(function(){return xf.current&&vf===Ag.current?xf.current:Qd(pd.getState(),vf)},[pd,Ng,vf]);ht(Ze,[Ag,ap,Sf,vf,Dg,xf,Yf]),ht(Mt,[Dn,pd,Cc,Qd,Ag,ap,Sf,xf,Yf,yf],[pd,Cc,Qd]);var Ya=(0,le.useMemo)(function(){return le.createElement(Os,(0,lt.Z)({},Dg,{ref:fd}))},[fd,Os,Dg]),Ju=(0,le.useMemo)(function(){return Dn?le.createElement(gd.Provider,{value:Xf},Ya):Ya},[gd,Ya,Xf]);return Ju}var wc=_u?le.memo(Lc):Lc;if(wc.WrappedComponent=Os,wc.displayName=Lc.displayName=As,no){var gu=le.forwardRef(function(Nd,$l){return le.createElement(wc,(0,lt.Z)({},Nd,{reactReduxForwardedRef:$l}))});return gu.displayName=As,gu.WrappedComponent=Os,ve()(gu,Os)}return ve()(wc,Os)}}function Pt(Se,Ce){return Se===Ce?Se!==0||Ce!==0||1/Se===1/Ce:Se!==Se&&Ce!==Ce}function Dt(Se,Ce){if(Pt(Se,Ce))return!0;if(typeof Se!="object"||Se===null||typeof Ce!="object"||Ce===null)return!1;var ke=Object.keys(Se),$e=Object.keys(Ce);if(ke.length!==$e.length)return!1;for(var yt=0;yt<ke.length;yt++)if(!Object.prototype.hasOwnProperty.call(Ce,ke[yt])||!Pt(Se[ke[yt]],Ce[ke[yt]]))return!1;return!0}function Wt(Se,Ce){var ke={},$e=function(kt){var Ht=Se[kt];typeof Ht=="function"&&(ke[kt]=function(){return Ce(Ht.apply(void 0,arguments))})};for(var yt in Se)$e(yt);return ke}function Lt(Se){return function(ke,$e){var yt=Se(ke,$e);function vt(){return yt}return vt.dependsOnOwnProps=!1,vt}}function qe(Se){return Se.dependsOnOwnProps!==null&&Se.dependsOnOwnProps!==void 0?!!Se.dependsOnOwnProps:Se.length!==1}function Ke(Se,Ce){return function($e,yt){var vt=yt.displayName,kt=function(Cn,Hn){return kt.dependsOnOwnProps?kt.mapToProps(Cn,Hn):kt.mapToProps(Cn)};return kt.dependsOnOwnProps=!0,kt.mapToProps=function(Cn,Hn){kt.mapToProps=Se,kt.dependsOnOwnProps=qe(Se);var Dn=kt(Cn,Hn);return typeof Dn=="function"&&(kt.mapToProps=Dn,kt.dependsOnOwnProps=qe(Dn),Dn=kt(Cn,Hn)),Dn},kt}}function Rt(Se){return typeof Se=="function"?Ke(Se,"mapDispatchToProps"):void 0}function Sn(Se){return Se?void 0:Lt(function(Ce){return{dispatch:Ce}})}function Pn(Se){return Se&&typeof Se=="object"?Lt(function(Ce){return Wt(Se,Ce)}):void 0}var _t=[Rt,Sn,Pn];function rn(Se){return typeof Se=="function"?Ke(Se,"mapStateToProps"):void 0}function ln(Se){return Se?void 0:Lt(function(){return{}})}var Wn=[rn,ln];function un(Se,Ce,ke){return(0,lt.Z)({},ke,Se,Ce)}function _n(Se){return function(ke,$e){var yt=$e.displayName,vt=$e.pure,kt=$e.areMergedPropsEqual,Ht=!1,Cn;return function(Dn,Fn,bn){var ti=Se(Dn,Fn,bn);return Ht?(!vt||!kt(ti,Cn))&&(Cn=ti):(Ht=!0,Cn=ti),Cn}}}function St(Se){return typeof Se=="function"?_n(Se):void 0}function Zn(Se){return Se?void 0:function(){return un}}var li=[St,Zn],Ge=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function be(Se,Ce,ke,$e){return function(vt,kt){return ke(Se(vt,kt),Ce($e,kt),kt)}}function Pe(Se,Ce,ke,$e,yt){var vt=yt.areStatesEqual,kt=yt.areOwnPropsEqual,Ht=yt.areStatePropsEqual,Cn=!1,Hn,Dn,Fn,bn,ti;function Oi(na,qo){return Hn=na,Dn=qo,Fn=Se(Hn,Dn),bn=Ce($e,Dn),ti=ke(Fn,bn,Dn),Cn=!0,ti}function Kr(){return Fn=Se(Hn,Dn),Ce.dependsOnOwnProps&&(bn=Ce($e,Dn)),ti=ke(Fn,bn,Dn),ti}function no(){return Se.dependsOnOwnProps&&(Fn=Se(Hn,Dn)),Ce.dependsOnOwnProps&&(bn=Ce($e,Dn)),ti=ke(Fn,bn,Dn),ti}function vo(){var na=Se(Hn,Dn),qo=!Ht(na,Fn);return Fn=na,qo&&(ti=ke(Fn,bn,Dn)),ti}function ko(na,qo){var Da=!kt(qo,Dn),ls=!vt(na,Hn,qo,Dn);return Hn=na,Dn=qo,Da&&ls?Kr():Da?no():ls?vo():ti}return function(qo,Da){return Cn?ko(qo,Da):Oi(qo,Da)}}function Ae(Se,Ce){var ke=Ce.initMapStateToProps,$e=Ce.initMapDispatchToProps,yt=Ce.initMergeProps,vt=(0,se.Z)(Ce,Ge),kt=ke(Se,vt),Ht=$e(Se,vt),Cn=yt(Se,vt),Hn=vt.pure?Pe:be;return Hn(kt,Ht,Cn,Se,vt)}var Ne=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function xe(Se,Ce,ke){for(var $e=Ce.length-1;$e>=0;$e--){var yt=Ce[$e](Se);if(yt)return yt}return function(vt,kt){throw new Error("Invalid value of type "+typeof Se+" for "+ke+" argument when connecting component "+kt.wrappedComponentName+".")}}function ut(Se,Ce){return Se===Ce}function Bt(Se){var Ce=Se===void 0?{}:Se,ke=Ce.connectHOC,$e=ke===void 0?Ot:ke,yt=Ce.mapStateToPropsFactories,vt=yt===void 0?Wn:yt,kt=Ce.mapDispatchToPropsFactories,Ht=kt===void 0?_t:kt,Cn=Ce.mergePropsFactories,Hn=Cn===void 0?li:Cn,Dn=Ce.selectorFactory,Fn=Dn===void 0?Ae:Dn;return function(ti,Oi,Kr,no){no===void 0&&(no={});var vo=no,ko=vo.pure,na=ko===void 0?!0:ko,qo=vo.areStatesEqual,Da=qo===void 0?ut:qo,ls=vo.areOwnPropsEqual,Os=ls===void 0?Dt:ls,eu=vo.areStatePropsEqual,As=eu===void 0?Dt:eu,Gl=vo.areMergedPropsEqual,_u=Gl===void 0?Dt:Gl,Xu=(0,se.Z)(vo,Ne),hd=xe(ti,vt,"mapStateToProps"),Lc=xe(Oi,Ht,"mapDispatchToProps"),wc=xe(Kr,Hn,"mergeProps");return $e(Fn,(0,lt.Z)({methodName:"connect",getDisplayName:function(Ol){return"Connect("+Ol+")"},shouldHandleStateChanges:!!ti,initMapStateToProps:hd,initMapDispatchToProps:Lc,initMergeProps:wc,pure:na,areStatesEqual:Da,areOwnPropsEqual:Os,areStatePropsEqual:As,areMergedPropsEqual:_u},Xu))}}var Qe=Bt();function it(){var Se=useContext(ReactReduxContext);return Se}function Ft(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(){var $e=Ce(),yt=$e.store;return yt}}var Nt=null;function dt(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultStore:createStoreHook(Se);return function(){var $e=Ce();return $e.dispatch}}var Kt=null,wn=function(Ce,ke){return Ce===ke};function sn(Se,Ce,ke,$e){var yt=useReducer(function(Oi){return Oi+1},0),vt=yt[1],kt=useMemo(function(){return createSubscription(ke,$e)},[ke,$e]),Ht=useRef(),Cn=useRef(),Hn=useRef(),Dn=useRef(),Fn=ke.getState(),bn;try{if(Se!==Cn.current||Fn!==Hn.current||Ht.current){var ti=Se(Fn);Dn.current===void 0||!Ce(ti,Dn.current)?bn=ti:bn=Dn.current}else bn=Dn.current}catch(Oi){throw Ht.current&&(Oi.message+=`
|
|
|
The error may be correlated with this previous error:
|
|
|
`+Ht.current.stack+`
|
|
|
|
|
|
`),Oi}return useIsomorphicLayoutEffect(function(){Cn.current=Se,Hn.current=Fn,Dn.current=bn,Ht.current=void 0}),useIsomorphicLayoutEffect(function(){function Oi(){try{var Kr=ke.getState();if(Kr===Hn.current)return;var no=Cn.current(Kr);if(Ce(no,Dn.current))return;Dn.current=no,Hn.current=Kr}catch(vo){Ht.current=vo}vt()}return kt.onStateChange=Oi,kt.trySubscribe(),Oi(),function(){return kt.tryUnsubscribe()}},[ke,kt]),bn}function qt(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function($e,yt){yt===void 0&&(yt=wn);var vt=Ce(),kt=vt.store,Ht=vt.subscription,Cn=sn($e,yt,kt,Ht);return useDebugValue(Cn),Cn}}var Rn=null,Vn=me(4676);Ue(Vn.unstable_batchedUpdates);function hn(Se,Ce){if(Se.length!==Ce.length)return!1;for(var ke=0;ke<Se.length;ke++)if(Se[ke]!==Ce[ke])return!1;return!0}function Yn(Se,Ce){var ke=(0,le.useState)(function(){return{inputs:Ce,result:Se()}})[0],$e=(0,le.useRef)(!0),yt=(0,le.useRef)(ke),vt=$e.current||!!(Ce&&yt.current.inputs&&hn(Ce,yt.current.inputs)),kt=vt?yt.current:{inputs:Ce,result:Se()};return(0,le.useEffect)(function(){$e.current=!1,yt.current=kt},[kt]),kt.result}function mi(Se,Ce){return Yn(function(){return Se},Ce)}var jn=Yn,An=mi,wi=!0,ji="Invariant failed";function Wi(Se,Ce){if(!Se){if(wi)throw new Error(ji);var ke=typeof Ce=="function"?Ce():Ce,$e=ke?"".concat(ji,": ").concat(ke):ji;throw new Error($e)}}var dr=function(Ce){var ke=Ce.top,$e=Ce.right,yt=Ce.bottom,vt=Ce.left,kt=$e-vt,Ht=yt-ke,Cn={top:ke,right:$e,bottom:yt,left:vt,width:kt,height:Ht,x:vt,y:ke,center:{x:($e+vt)/2,y:(yt+ke)/2}};return Cn},Mr=function(Ce,ke){return{top:Ce.top-ke.top,left:Ce.left-ke.left,bottom:Ce.bottom+ke.bottom,right:Ce.right+ke.right}},pi=function(Ce,ke){return{top:Ce.top+ke.top,left:Ce.left+ke.left,bottom:Ce.bottom-ke.bottom,right:Ce.right-ke.right}},ui=function(Ce,ke){return{top:Ce.top+ke.y,left:Ce.left+ke.x,bottom:Ce.bottom+ke.y,right:Ce.right+ke.x}},Ci={top:0,right:0,bottom:0,left:0},Xi=function(Ce){var ke=Ce.borderBox,$e=Ce.margin,yt=$e===void 0?Ci:$e,vt=Ce.border,kt=vt===void 0?Ci:vt,Ht=Ce.padding,Cn=Ht===void 0?Ci:Ht,Hn=dr(Mr(ke,yt)),Dn=dr(pi(ke,kt)),Fn=dr(pi(Dn,Cn));return{marginBox:Hn,borderBox:dr(ke),paddingBox:Dn,contentBox:Fn,margin:yt,border:kt,padding:Cn}},Ni=function(Ce){var ke=Ce.slice(0,-2),$e=Ce.slice(-2);if($e!=="px")return 0;var yt=Number(ke);return isNaN(yt)&&Wi(!1),yt},io=function(){return{x:window.pageXOffset,y:window.pageYOffset}},hr=function(Ce,ke){var $e=Ce.borderBox,yt=Ce.border,vt=Ce.margin,kt=Ce.padding,Ht=ui($e,ke);return Xi({borderBox:Ht,border:yt,margin:vt,padding:kt})},De=function(Ce,ke){return ke===void 0&&(ke=io()),hr(Ce,ke)},Ei=function(Ce,ke){var $e={top:Ni(ke.marginTop),right:Ni(ke.marginRight),bottom:Ni(ke.marginBottom),left:Ni(ke.marginLeft)},yt={top:Ni(ke.paddingTop),right:Ni(ke.paddingRight),bottom:Ni(ke.paddingBottom),left:Ni(ke.paddingLeft)},vt={top:Ni(ke.borderTopWidth),right:Ni(ke.borderRightWidth),bottom:Ni(ke.borderBottomWidth),left:Ni(ke.borderLeftWidth)};return Xi({borderBox:Ce,margin:$e,padding:yt,border:vt})},Pr=function(Ce){var ke=Ce.getBoundingClientRect(),$e=window.getComputedStyle(Ce);return Ei(ke,$e)},Ln=Number.isNaN||function(Ce){return typeof Ce=="number"&&Ce!==Ce};function vi(Se,Ce){return!!(Se===Ce||Ln(Se)&&Ln(Ce))}function Zi(Se,Ce){if(Se.length!==Ce.length)return!1;for(var ke=0;ke<Se.length;ke++)if(!vi(Se[ke],Ce[ke]))return!1;return!0}function er(Se,Ce){Ce===void 0&&(Ce=Zi);var ke,$e=[],yt,vt=!1;function kt(){for(var Ht=[],Cn=0;Cn<arguments.length;Cn++)Ht[Cn]=arguments[Cn];return vt&&ke===this&&Ce(Ht,$e)||(yt=Se.apply(this,Ht),vt=!0,ke=this,$e=Ht),yt}return kt}var Gn=er,$t=function(Ce){var ke=[],$e=null,yt=function(){for(var kt=arguments.length,Ht=new Array(kt),Cn=0;Cn<kt;Cn++)Ht[Cn]=arguments[Cn];ke=Ht,!$e&&($e=requestAnimationFrame(function(){$e=null,Ce.apply(void 0,ke)}))};return yt.cancel=function(){$e&&(cancelAnimationFrame($e),$e=null)},yt},Gt=$t,Zt=!0,wt=/[ \t]{2,}/g,vn=/^[ \t]*/gm,cn=function(Ce){return Ce.replace(wt," ").replace(vn,"").trim()},It=function(Ce){return cn(`
|
|
|
%creact-beautiful-dnd
|
|
|
|
|
|
%c`+cn(Ce)+`
|
|
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
|
`)},ct=function(Ce){return[It(Ce),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},an="__react-beautiful-dnd-disable-dev-warnings";function dn(Se,Ce){var ke;Zt||typeof window!="undefined"&&window[an]||(ke=console)[Se].apply(ke,ct(Ce))}var ei=dn.bind(null,"warn"),pn=dn.bind(null,"error");function zt(){}function In(Se,Ce){return(0,lt.Z)({},Se,{},Ce)}function Qn(Se,Ce,ke){var $e=Ce.map(function(yt){var vt=In(ke,yt.options);return Se.addEventListener(yt.eventName,yt.fn,vt),function(){Se.removeEventListener(yt.eventName,yt.fn,vt)}});return function(){$e.forEach(function(vt){vt()})}}var xi=!0,tn="Invariant failed";function fn(Se){this.message=Se}fn.prototype.toString=function(){return this.message};function kn(Se,Ce){if(!Se)throw xi?new fn(tn):new fn(tn+": "+(Ce||""))}var zi=function(Se){He(Ce,Se);function Ce(){for(var $e,yt=arguments.length,vt=new Array(yt),kt=0;kt<yt;kt++)vt[kt]=arguments[kt];return $e=Se.call.apply(Se,[this].concat(vt))||this,$e.callbacks=null,$e.unbind=zt,$e.onWindowError=function(Ht){var Cn=$e.getCallbacks();Cn.isDragging()&&Cn.tryAbort();var Hn=Ht.error;Hn instanceof fn&&Ht.preventDefault()},$e.getCallbacks=function(){if(!$e.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return $e.callbacks},$e.setCallbacks=function(Ht){$e.callbacks=Ht},$e}var ke=Ce.prototype;return ke.componentDidMount=function(){this.unbind=Qn(window,[{eventName:"error",fn:this.onWindowError}])},ke.componentWillUnmount=function(){this.unbind()},ke.componentDidCatch=function(yt){if(yt instanceof fn){this.setState({});return}throw yt},ke.render=function(){return this.props.children(this.setCallbacks)},Ce}(le.Component),Di=`
|
|
|
Press space bar to start a drag.
|
|
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
|
`,Si=function(Ce){return Ce+1},Fi=function(Ce){return`
|
|
|
You have lifted an item in position `+Si(Ce.source.index)+`
|
|
|
`},Ti=function(Ce,ke){var $e=Ce.droppableId===ke.droppableId,yt=Si(Ce.index),vt=Si(ke.index);return $e?`
|
|
|
You have moved the item from position `+yt+`
|
|
|
to position `+vt+`
|
|
|
`:`
|
|
|
You have moved the item from position `+yt+`
|
|
|
in list `+Ce.droppableId+`
|
|
|
to list `+ke.droppableId+`
|
|
|
in position `+vt+`
|
|
|
`},nr=function(Ce,ke,$e){var yt=ke.droppableId===$e.droppableId;return yt?`
|
|
|
The item `+Ce+`
|
|
|
has been combined with `+$e.draggableId:`
|
|
|
The item `+Ce+`
|
|
|
in list `+ke.droppableId+`
|
|
|
has been combined with `+$e.draggableId+`
|
|
|
in list `+$e.droppableId+`
|
|
|
`},$r=function(Ce){var ke=Ce.destination;if(ke)return Ti(Ce.source,ke);var $e=Ce.combine;return $e?nr(Ce.draggableId,Ce.source,$e):"You are over an area that cannot be dropped on"},ci=function(Ce){return`
|
|
|
The item has returned to its starting position
|
|
|
of `+Si(Ce.index)+`
|
|
|
`},Ki=function(Ce){if(Ce.reason==="CANCEL")return`
|
|
|
Movement cancelled.
|
|
|
`+ci(Ce.source)+`
|
|
|
`;var ke=Ce.destination,$e=Ce.combine;return ke?`
|
|
|
You have dropped the item.
|
|
|
`+Ti(Ce.source,ke)+`
|
|
|
`:$e?`
|
|
|
You have dropped the item.
|
|
|
`+nr(Ce.draggableId,Ce.source,$e)+`
|
|
|
`:`
|
|
|
The item has been dropped while not over a drop area.
|
|
|
`+ci(Ce.source)+`
|
|
|
`},Yr={dragHandleUsageInstructions:Di,onDragStart:Fi,onDragUpdate:$r,onDragEnd:Ki},Qr={x:0,y:0},Cr=function(Ce,ke){return{x:Ce.x+ke.x,y:Ce.y+ke.y}},Jt=function(Ce,ke){return{x:Ce.x-ke.x,y:Ce.y-ke.y}},gi=function(Ce,ke){return Ce.x===ke.x&&Ce.y===ke.y},mr=function(Ce){return{x:Ce.x!==0?-Ce.x:0,y:Ce.y!==0?-Ce.y:0}},tr=function(Ce,ke,$e){var yt;return $e===void 0&&($e=0),yt={},yt[Ce]=ke,yt[Ce==="x"?"y":"x"]=$e,yt},Hr=function(Ce,ke){return Math.sqrt(Math.pow(ke.x-Ce.x,2)+Math.pow(ke.y-Ce.y,2))},Lr=function(Ce,ke){return Math.min.apply(Math,ke.map(function($e){return Hr(Ce,$e)}))},lo=function(Ce){return function(ke){return{x:Ce(ke.x),y:Ce(ke.y)}}},Wr=function(Se,Ce){var ke=dr({top:Math.max(Ce.top,Se.top),right:Math.min(Ce.right,Se.right),bottom:Math.min(Ce.bottom,Se.bottom),left:Math.max(Ce.left,Se.left)});return ke.width<=0||ke.height<=0?null:ke},jr=function(Ce,ke){return{top:Ce.top+ke.y,left:Ce.left+ke.x,bottom:Ce.bottom+ke.y,right:Ce.right+ke.x}},fo=function(Ce){return[{x:Ce.left,y:Ce.top},{x:Ce.right,y:Ce.top},{x:Ce.left,y:Ce.bottom},{x:Ce.right,y:Ce.bottom}]},$n={top:0,right:0,bottom:0,left:0},aa=function(Ce,ke){return ke?jr(Ce,ke.scroll.diff.displacement):Ce},Un=function(Ce,ke,$e){if($e&&$e.increasedBy){var yt;return(0,lt.Z)({},Ce,(yt={},yt[ke.end]=Ce[ke.end]+$e.increasedBy[ke.line],yt))}return Ce},Do=function(Ce,ke){return ke&&ke.shouldClipSubject?Wr(ke.pageMarginBox,Ce):dr(Ce)},Ko=function(Se){var Ce=Se.page,ke=Se.withPlaceholder,$e=Se.axis,yt=Se.frame,vt=aa(Ce.marginBox,yt),kt=Un(vt,$e,ke),Ht=Do(kt,yt);return{page:Ce,withPlaceholder:ke,active:Ht}},Ji=function(Se,Ce){Se.frame||kn(!1);var ke=Se.frame,$e=Jt(Ce,ke.scroll.initial),yt=mr($e),vt=(0,lt.Z)({},ke,{scroll:{initial:ke.scroll.initial,current:Ce,diff:{value:$e,displacement:yt},max:ke.scroll.max}}),kt=Ko({page:Se.subject.page,withPlaceholder:Se.subject.withPlaceholder,axis:Se.axis,frame:vt}),Ht=(0,lt.Z)({},Se,{frame:vt,subject:kt});return Ht};function la(Se){return Number.isInteger?Number.isInteger(Se):typeof Se=="number"&&isFinite(Se)&&Math.floor(Se)===Se}function Ro(Se){return Object.values?Object.values(Se):Object.keys(Se).map(function(Ce){return Se[Ce]})}function Nr(Se,Ce){if(Se.findIndex)return Se.findIndex(Ce);for(var ke=0;ke<Se.length;ke++)if(Ce(Se[ke]))return ke;return-1}function Ar(Se,Ce){if(Se.find)return Se.find(Ce);var ke=Nr(Se,Ce);if(ke!==-1)return Se[ke]}function xo(Se){return Array.prototype.slice.call(Se)}var Wo=Gn(function(Se){return Se.reduce(function(Ce,ke){return Ce[ke.descriptor.id]=ke,Ce},{})}),Hi=Gn(function(Se){return Se.reduce(function(Ce,ke){return Ce[ke.descriptor.id]=ke,Ce},{})}),st=Gn(function(Se){return Ro(Se)}),_o=Gn(function(Se){return Ro(Se)}),Ia=Gn(function(Se,Ce){var ke=_o(Ce).filter(function($e){return Se===$e.descriptor.droppableId}).sort(function($e,yt){return $e.descriptor.index-yt.descriptor.index});return ke});function Ma(Se){return Se.at&&Se.at.type==="REORDER"?Se.at.destination:null}function xs(Se){return Se.at&&Se.at.type==="COMBINE"?Se.at.combine:null}var Wa=Gn(function(Se,Ce){return Ce.filter(function(ke){return ke.descriptor.id!==Se.descriptor.id})}),Ps=function(Se){var Ce=Se.isMovingForward,ke=Se.draggable,$e=Se.destination,yt=Se.insideDestination,vt=Se.previousImpact;if(!$e.isCombineEnabled)return null;var kt=Ma(vt);if(!kt)return null;function Ht(Kr){var no={type:"COMBINE",combine:{draggableId:Kr,droppableId:$e.descriptor.id}};return(0,lt.Z)({},vt,{at:no})}var Cn=vt.displaced.all,Hn=Cn.length?Cn[0]:null;if(Ce)return Hn?Ht(Hn):null;var Dn=Wa(ke,yt);if(!Hn){if(!Dn.length)return null;var Fn=Dn[Dn.length-1];return Ht(Fn.descriptor.id)}var bn=Nr(Dn,function(Kr){return Kr.descriptor.id===Hn});bn===-1&&kn(!1);var ti=bn-1;if(ti<0)return null;var Oi=Dn[ti];return Ht(Oi.descriptor.id)},Lo=function(Se,Ce){return Se.descriptor.droppableId===Ce.descriptor.id},Po={point:Qr,value:0},Xr={invisible:{},visible:{},all:[]},ha={displaced:Xr,displacedBy:Po,at:null},br=function(Se,Ce){return function(ke){return Se<=ke&&ke<=Ce}},Ur=function(Se){var Ce=br(Se.top,Se.bottom),ke=br(Se.left,Se.right);return function($e){var yt=Ce($e.top)&&Ce($e.bottom)&&ke($e.left)&&ke($e.right);if(yt)return!0;var vt=Ce($e.top)||Ce($e.bottom),kt=ke($e.left)||ke($e.right),Ht=vt&&kt;if(Ht)return!0;var Cn=$e.top<Se.top&&$e.bottom>Se.bottom,Hn=$e.left<Se.left&&$e.right>Se.right,Dn=Cn&&Hn;if(Dn)return!0;var Fn=Cn&&kt||Hn&&vt;return Fn}},wo=function(Se){var Ce=br(Se.top,Se.bottom),ke=br(Se.left,Se.right);return function($e){var yt=Ce($e.top)&&Ce($e.bottom)&&ke($e.left)&&ke($e.right);return yt}},fi={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Ba={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},Eo=function(Se){return function(Ce){var ke=br(Ce.top,Ce.bottom),$e=br(Ce.left,Ce.right);return function(yt){return Se===fi?ke(yt.top)&&ke(yt.bottom):$e(yt.left)&&$e(yt.right)}}},es=function(Ce,ke){var $e=ke.frame?ke.frame.scroll.diff.displacement:Qr;return jr(Ce,$e)},fa=function(Ce,ke,$e){return ke.subject.active?$e(ke.subject.active)(Ce):!1},va=function(Ce,ke,$e){return $e(ke)(Ce)},$a=function(Ce){var ke=Ce.target,$e=Ce.destination,yt=Ce.viewport,vt=Ce.withDroppableDisplacement,kt=Ce.isVisibleThroughFrameFn,Ht=vt?es(ke,$e):ke;return fa(Ht,$e,kt)&&va(Ht,yt,kt)},ms=function(Ce){return $a((0,lt.Z)({},Ce,{isVisibleThroughFrameFn:Ur}))},fs=function(Ce){return $a((0,lt.Z)({},Ce,{isVisibleThroughFrameFn:wo}))},Rs=function(Ce){return $a((0,lt.Z)({},Ce,{isVisibleThroughFrameFn:Eo(Ce.destination.axis)}))},Zs=function(Ce,ke,$e){if(typeof $e=="boolean")return $e;if(!ke)return!0;var yt=ke.invisible,vt=ke.visible;if(yt[Ce])return!1;var kt=vt[Ce];return kt?kt.shouldAnimate:!0};function Bn(Se,Ce){var ke=Se.page.marginBox,$e={top:Ce.point.y,right:0,bottom:0,left:Ce.point.x};return dr(Mr(ke,$e))}function Fs(Se){var Ce=Se.afterDragging,ke=Se.destination,$e=Se.displacedBy,yt=Se.viewport,vt=Se.forceShouldAnimate,kt=Se.last;return Ce.reduce(function(Cn,Hn){var Dn=Bn(Hn,$e),Fn=Hn.descriptor.id;Cn.all.push(Fn);var bn=ms({target:Dn,destination:ke,viewport:yt,withDroppableDisplacement:!0});if(!bn)return Cn.invisible[Hn.descriptor.id]=!0,Cn;var ti=Zs(Fn,kt,vt),Oi={draggableId:Fn,shouldAnimate:ti};return Cn.visible[Fn]=Oi,Cn},{all:[],visible:{},invisible:{}})}function Go(Se,Ce){if(!Se.length)return 0;var ke=Se[Se.length-1].descriptor.index;return Ce.inHomeList?ke:ke+1}function kl(Se){var Ce=Se.insideDestination,ke=Se.inHomeList,$e=Se.displacedBy,yt=Se.destination,vt=Go(Ce,{inHomeList:ke});return{displaced:Xr,displacedBy:$e,at:{type:"REORDER",destination:{droppableId:yt.descriptor.id,index:vt}}}}function _s(Se){var Ce=Se.draggable,ke=Se.insideDestination,$e=Se.destination,yt=Se.viewport,vt=Se.displacedBy,kt=Se.last,Ht=Se.index,Cn=Se.forceShouldAnimate,Hn=Lo(Ce,$e);if(Ht==null)return kl({insideDestination:ke,inHomeList:Hn,displacedBy:vt,destination:$e});var Dn=Ar(ke,function(Kr){return Kr.descriptor.index===Ht});if(!Dn)return kl({insideDestination:ke,inHomeList:Hn,displacedBy:vt,destination:$e});var Fn=Wa(Ce,ke),bn=ke.indexOf(Dn),ti=Fn.slice(bn),Oi=Fs({afterDragging:ti,destination:$e,displacedBy:vt,last:kt,viewport:yt.frame,forceShouldAnimate:Cn});return{displaced:Oi,displacedBy:vt,at:{type:"REORDER",destination:{droppableId:$e.descriptor.id,index:Ht}}}}function sl(Se,Ce){return!!Ce.effected[Se]}var yu=function(Se){var Ce=Se.isMovingForward,ke=Se.destination,$e=Se.draggables,yt=Se.combine,vt=Se.afterCritical;if(!ke.isCombineEnabled)return null;var kt=yt.draggableId,Ht=$e[kt],Cn=Ht.descriptor.index,Hn=sl(kt,vt);return Hn?Ce?Cn:Cn-1:Ce?Cn+1:Cn},Kl=function(Se){var Ce=Se.isMovingForward,ke=Se.isInHomeList,$e=Se.insideDestination,yt=Se.location;if(!$e.length)return null;var vt=yt.index,kt=Ce?vt+1:vt-1,Ht=$e[0].descriptor.index,Cn=$e[$e.length-1].descriptor.index,Hn=ke?Cn:Cn+1;return kt<Ht||kt>Hn?null:kt},gs=function(Se){var Ce=Se.isMovingForward,ke=Se.isInHomeList,$e=Se.draggable,yt=Se.draggables,vt=Se.destination,kt=Se.insideDestination,Ht=Se.previousImpact,Cn=Se.viewport,Hn=Se.afterCritical,Dn=Ht.at;if(Dn||kn(!1),Dn.type==="REORDER"){var Fn=Kl({isMovingForward:Ce,isInHomeList:ke,location:Dn.destination,insideDestination:kt});return Fn==null?null:_s({draggable:$e,insideDestination:kt,destination:vt,viewport:Cn,last:Ht.displaced,displacedBy:Ht.displacedBy,index:Fn})}var bn=yu({isMovingForward:Ce,destination:vt,displaced:Ht.displaced,draggables:yt,combine:Dn.combine,afterCritical:Hn});return bn==null?null:_s({draggable:$e,insideDestination:kt,destination:vt,viewport:Cn,last:Ht.displaced,displacedBy:Ht.displacedBy,index:bn})},ya=function(Se){var Ce=Se.displaced,ke=Se.afterCritical,$e=Se.combineWith,yt=Se.displacedBy,vt=!!(Ce.visible[$e]||Ce.invisible[$e]);return sl($e,ke)?vt?Qr:mr(yt.point):vt?yt.point:Qr},dl=function(Se){var Ce=Se.afterCritical,ke=Se.impact,$e=Se.draggables,yt=xs(ke);yt||kn(!1);var vt=yt.draggableId,kt=$e[vt].page.borderBox.center,Ht=ya({displaced:ke.displaced,afterCritical:Ce,combineWith:vt,displacedBy:ke.displacedBy});return Cr(kt,Ht)},Vo=function(Ce,ke){return ke.margin[Ce.start]+ke.borderBox[Ce.size]/2},Ea=function(Ce,ke){return ke.margin[Ce.end]+ke.borderBox[Ce.size]/2},ua=function(Ce,ke,$e){return ke[Ce.crossAxisStart]+$e.margin[Ce.crossAxisStart]+$e.borderBox[Ce.crossAxisSize]/2},pr=function(Ce){var ke=Ce.axis,$e=Ce.moveRelativeTo,yt=Ce.isMoving;return tr(ke.line,$e.marginBox[ke.end]+Vo(ke,yt),ua(ke,$e.marginBox,yt))},ks=function(Ce){var ke=Ce.axis,$e=Ce.moveRelativeTo,yt=Ce.isMoving;return tr(ke.line,$e.marginBox[ke.start]-Ea(ke,yt),ua(ke,$e.marginBox,yt))},os=function(Ce){var ke=Ce.axis,$e=Ce.moveInto,yt=Ce.isMoving;return tr(ke.line,$e.contentBox[ke.start]+Vo(ke,yt),ua(ke,$e.contentBox,yt))},ll=function(Se){var Ce=Se.impact,ke=Se.draggable,$e=Se.draggables,yt=Se.droppable,vt=Se.afterCritical,kt=Ia(yt.descriptor.id,$e),Ht=ke.page,Cn=yt.axis;if(!kt.length)return os({axis:Cn,moveInto:yt.page,isMoving:Ht});var Hn=Ce.displaced,Dn=Ce.displacedBy,Fn=Hn.all[0];if(Fn){var bn=$e[Fn];if(sl(Fn,vt))return ks({axis:Cn,moveRelativeTo:bn.page,isMoving:Ht});var ti=hr(bn.page,Dn.point);return ks({axis:Cn,moveRelativeTo:ti,isMoving:Ht})}var Oi=kt[kt.length-1];if(Oi.descriptor.id===ke.descriptor.id)return Ht.borderBox.center;if(sl(Oi.descriptor.id,vt)){var Kr=hr(Oi.page,mr(vt.displacedBy.point));return pr({axis:Cn,moveRelativeTo:Kr,isMoving:Ht})}return pr({axis:Cn,moveRelativeTo:Oi.page,isMoving:Ht})},zl=function(Se,Ce){var ke=Se.frame;return ke?Cr(Ce,ke.scroll.diff.displacement):Ce},ou=function(Ce){var ke=Ce.impact,$e=Ce.draggable,yt=Ce.droppable,vt=Ce.draggables,kt=Ce.afterCritical,Ht=$e.page.borderBox.center,Cn=ke.at;return!yt||!Cn?Ht:Cn.type==="REORDER"?ll({impact:ke,draggable:$e,draggables:vt,droppable:yt,afterCritical:kt}):dl({impact:ke,draggables:vt,afterCritical:kt})},Qi=function(Se){var Ce=ou(Se),ke=Se.droppable,$e=ke?zl(ke,Ce):Ce;return $e},Ss=function(Se,Ce){var ke=Jt(Ce,Se.scroll.initial),$e=mr(ke),yt=dr({top:Ce.y,bottom:Ce.y+Se.frame.height,left:Ce.x,right:Ce.x+Se.frame.width}),vt={frame:yt,scroll:{initial:Se.scroll.initial,max:Se.scroll.max,current:Ce,diff:{value:ke,displacement:$e}}};return vt};function Us(Se,Ce){return Se.map(function(ke){return Ce[ke]})}function Vl(Se,Ce){for(var ke=0;ke<Ce.length;ke++){var $e=Ce[ke].visible[Se];if($e)return $e}return null}var Tl=function(Se){var Ce=Se.impact,ke=Se.viewport,$e=Se.destination,yt=Se.draggables,vt=Se.maxScrollChange,kt=Ss(ke,Cr(ke.scroll.current,vt)),Ht=$e.frame?Ji($e,Cr($e.frame.scroll.current,vt)):$e,Cn=Ce.displaced,Hn=Fs({afterDragging:Us(Cn.all,yt),destination:$e,displacedBy:Ce.displacedBy,viewport:kt.frame,last:Cn,forceShouldAnimate:!1}),Dn=Fs({afterDragging:Us(Cn.all,yt),destination:Ht,displacedBy:Ce.displacedBy,viewport:ke.frame,last:Cn,forceShouldAnimate:!1}),Fn={},bn={},ti=[Cn,Hn,Dn];Cn.all.forEach(function(Kr){var no=Vl(Kr,ti);if(no){bn[Kr]=no;return}Fn[Kr]=!0});var Oi=(0,lt.Z)({},Ce,{displaced:{all:Cn.all,invisible:Fn,visible:bn}});return Oi},Ul=function(Se,Ce){return Cr(Se.scroll.diff.displacement,Ce)},Io=function(Se){var Ce=Se.pageBorderBoxCenter,ke=Se.draggable,$e=Se.viewport,yt=Ul($e,Ce),vt=Jt(yt,ke.page.borderBox.center);return Cr(ke.client.borderBox.center,vt)},ic=function(Se){var Ce=Se.draggable,ke=Se.destination,$e=Se.newPageBorderBoxCenter,yt=Se.viewport,vt=Se.withDroppableDisplacement,kt=Se.onlyOnMainAxis,Ht=kt===void 0?!1:kt,Cn=Jt($e,Ce.page.borderBox.center),Hn=jr(Ce.page.borderBox,Cn),Dn={target:Hn,destination:ke,withDroppableDisplacement:vt,viewport:yt};return Ht?Rs(Dn):fs(Dn)},Zl=function(Se){var Ce=Se.isMovingForward,ke=Se.draggable,$e=Se.destination,yt=Se.draggables,vt=Se.previousImpact,kt=Se.viewport,Ht=Se.previousPageBorderBoxCenter,Cn=Se.previousClientSelection,Hn=Se.afterCritical;if(!$e.isEnabled)return null;var Dn=Ia($e.descriptor.id,yt),Fn=Lo(ke,$e),bn=Ps({isMovingForward:Ce,draggable:ke,destination:$e,insideDestination:Dn,previousImpact:vt})||gs({isMovingForward:Ce,isInHomeList:Fn,draggable:ke,draggables:yt,destination:$e,insideDestination:Dn,previousImpact:vt,viewport:kt,afterCritical:Hn});if(!bn)return null;var ti=Qi({impact:bn,draggable:ke,droppable:$e,draggables:yt,afterCritical:Hn}),Oi=ic({draggable:ke,destination:$e,newPageBorderBoxCenter:ti,viewport:kt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(Oi){var Kr=Io({pageBorderBoxCenter:ti,draggable:ke,viewport:kt});return{clientSelection:Kr,impact:bn,scrollJumpRequest:null}}var no=Jt(ti,Ht),vo=Tl({impact:bn,viewport:kt,destination:$e,draggables:yt,maxScrollChange:no});return{clientSelection:Cn,impact:vo,scrollJumpRequest:no}},En=function(Ce){var ke=Ce.subject.active;return ke||kn(!1),ke},Nn=function(Se){var Ce=Se.isMovingForward,ke=Se.pageBorderBoxCenter,$e=Se.source,yt=Se.droppables,vt=Se.viewport,kt=$e.subject.active;if(!kt)return null;var Ht=$e.axis,Cn=br(kt[Ht.start],kt[Ht.end]),Hn=st(yt).filter(function(Fn){return Fn!==$e}).filter(function(Fn){return Fn.isEnabled}).filter(function(Fn){return!!Fn.subject.active}).filter(function(Fn){return Ur(vt.frame)(En(Fn))}).filter(function(Fn){var bn=En(Fn);return Ce?kt[Ht.crossAxisEnd]<bn[Ht.crossAxisEnd]:bn[Ht.crossAxisStart]<kt[Ht.crossAxisStart]}).filter(function(Fn){var bn=En(Fn),ti=br(bn[Ht.start],bn[Ht.end]);return Cn(bn[Ht.start])||Cn(bn[Ht.end])||ti(kt[Ht.start])||ti(kt[Ht.end])}).sort(function(Fn,bn){var ti=En(Fn)[Ht.crossAxisStart],Oi=En(bn)[Ht.crossAxisStart];return Ce?ti-Oi:Oi-ti}).filter(function(Fn,bn,ti){return En(Fn)[Ht.crossAxisStart]===En(ti[0])[Ht.crossAxisStart]});if(!Hn.length)return null;if(Hn.length===1)return Hn[0];var Dn=Hn.filter(function(Fn){var bn=br(En(Fn)[Ht.start],En(Fn)[Ht.end]);return bn(ke[Ht.line])});return Dn.length===1?Dn[0]:Dn.length>1?Dn.sort(function(Fn,bn){return En(Fn)[Ht.start]-En(bn)[Ht.start]})[0]:Hn.sort(function(Fn,bn){var ti=Lr(ke,fo(En(Fn))),Oi=Lr(ke,fo(En(bn)));return ti!==Oi?ti-Oi:En(Fn)[Ht.start]-En(bn)[Ht.start]})[0]},ri=function(Ce,ke){var $e=Ce.page.borderBox.center;return sl(Ce.descriptor.id,ke)?Jt($e,ke.displacedBy.point):$e},qi=function(Ce,ke){var $e=Ce.page.borderBox;return sl(Ce.descriptor.id,ke)?jr($e,mr(ke.displacedBy.point)):$e},$i=function(Se){var Ce=Se.pageBorderBoxCenter,ke=Se.viewport,$e=Se.destination,yt=Se.insideDestination,vt=Se.afterCritical,kt=yt.filter(function(Ht){return fs({target:qi(Ht,vt),destination:$e,viewport:ke.frame,withDroppableDisplacement:!0})}).sort(function(Ht,Cn){var Hn=Hr(Ce,zl($e,ri(Ht,vt))),Dn=Hr(Ce,zl($e,ri(Cn,vt)));return Hn<Dn?-1:Dn<Hn?1:Ht.descriptor.index-Cn.descriptor.index});return kt[0]||null},ki=Gn(function(Ce,ke){var $e=ke[Ce.line];return{value:$e,point:tr(Ce.line,$e)}}),Ri=function(Ce,ke,$e){var yt=Ce.axis;if(Ce.descriptor.mode==="virtual")return tr(yt.line,ke[yt.line]);var vt=Ce.subject.page.contentBox[yt.size],kt=Ia(Ce.descriptor.id,$e),Ht=kt.reduce(function(Dn,Fn){return Dn+Fn.client.marginBox[yt.size]},0),Cn=Ht+ke[yt.line],Hn=Cn-vt;return Hn<=0?null:tr(yt.line,Hn)},ii=function(Ce,ke){return(0,lt.Z)({},Ce,{scroll:(0,lt.Z)({},Ce.scroll,{max:ke})})},Li=function(Ce,ke,$e){var yt=Ce.frame;Lo(ke,Ce)&&kn(!1),Ce.subject.withPlaceholder&&kn(!1);var vt=ki(Ce.axis,ke.displaceBy).point,kt=Ri(Ce,vt,$e),Ht={placeholderSize:vt,increasedBy:kt,oldFrameMaxScroll:Ce.frame?Ce.frame.scroll.max:null};if(!yt){var Cn=Ko({page:Ce.subject.page,withPlaceholder:Ht,axis:Ce.axis,frame:Ce.frame});return(0,lt.Z)({},Ce,{subject:Cn})}var Hn=kt?Cr(yt.scroll.max,kt):yt.scroll.max,Dn=ii(yt,Hn),Fn=Ko({page:Ce.subject.page,withPlaceholder:Ht,axis:Ce.axis,frame:Dn});return(0,lt.Z)({},Ce,{subject:Fn,frame:Dn})},ur=function(Ce){var ke=Ce.subject.withPlaceholder;ke||kn(!1);var $e=Ce.frame;if(!$e){var yt=Ko({page:Ce.subject.page,axis:Ce.axis,frame:null,withPlaceholder:null});return(0,lt.Z)({},Ce,{subject:yt})}var vt=ke.oldFrameMaxScroll;vt||kn(!1);var kt=ii($e,vt),Ht=Ko({page:Ce.subject.page,axis:Ce.axis,frame:kt,withPlaceholder:null});return(0,lt.Z)({},Ce,{subject:Ht,frame:kt})},Zr=function(Se){var Ce=Se.previousPageBorderBoxCenter,ke=Se.moveRelativeTo,$e=Se.insideDestination,yt=Se.draggable,vt=Se.draggables,kt=Se.destination,Ht=Se.viewport,Cn=Se.afterCritical;if(!ke){if($e.length)return null;var Hn={displaced:Xr,displacedBy:Po,at:{type:"REORDER",destination:{droppableId:kt.descriptor.id,index:0}}},Dn=Qi({impact:Hn,draggable:yt,droppable:kt,draggables:vt,afterCritical:Cn}),Fn=Lo(yt,kt)?kt:Li(kt,yt,vt),bn=ic({draggable:yt,destination:Fn,newPageBorderBoxCenter:Dn,viewport:Ht.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return bn?Hn:null}var ti=Ce[kt.axis.line]<=ke.page.borderBox.center[kt.axis.line],Oi=function(){var no=ke.descriptor.index;return ke.descriptor.id===yt.descriptor.id||ti?no:no+1}(),Kr=ki(kt.axis,yt.displaceBy);return _s({draggable:yt,insideDestination:$e,destination:kt,viewport:Ht,displacedBy:Kr,last:Xr,index:Oi})},ga=function(Se){var Ce=Se.isMovingForward,ke=Se.previousPageBorderBoxCenter,$e=Se.draggable,yt=Se.isOver,vt=Se.draggables,kt=Se.droppables,Ht=Se.viewport,Cn=Se.afterCritical,Hn=Nn({isMovingForward:Ce,pageBorderBoxCenter:ke,source:yt,droppables:kt,viewport:Ht});if(!Hn)return null;var Dn=Ia(Hn.descriptor.id,vt),Fn=$i({pageBorderBoxCenter:ke,viewport:Ht,destination:Hn,insideDestination:Dn,afterCritical:Cn}),bn=Zr({previousPageBorderBoxCenter:ke,destination:Hn,draggable:$e,draggables:vt,moveRelativeTo:Fn,insideDestination:Dn,viewport:Ht,afterCritical:Cn});if(!bn)return null;var ti=Qi({impact:bn,draggable:$e,droppable:Hn,draggables:vt,afterCritical:Cn}),Oi=Io({pageBorderBoxCenter:ti,draggable:$e,viewport:Ht});return{clientSelection:Oi,impact:bn,scrollJumpRequest:null}},Uo=function(Se){var Ce=Se.at;return Ce?Ce.type==="REORDER"?Ce.destination.droppableId:Ce.combine.droppableId:null},Ua=function(Ce,ke){var $e=Uo(Ce);return $e?ke[$e]:null},Ka=function(Se){var Ce=Se.state,ke=Se.type,$e=Ua(Ce.impact,Ce.dimensions.droppables),yt=!!$e,vt=Ce.dimensions.droppables[Ce.critical.droppable.id],kt=$e||vt,Ht=kt.axis.direction,Cn=Ht==="vertical"&&(ke==="MOVE_UP"||ke==="MOVE_DOWN")||Ht==="horizontal"&&(ke==="MOVE_LEFT"||ke==="MOVE_RIGHT");if(Cn&&!yt)return null;var Hn=ke==="MOVE_DOWN"||ke==="MOVE_RIGHT",Dn=Ce.dimensions.draggables[Ce.critical.draggable.id],Fn=Ce.current.page.borderBoxCenter,bn=Ce.dimensions,ti=bn.draggables,Oi=bn.droppables;return Cn?Zl({isMovingForward:Hn,previousPageBorderBoxCenter:Fn,draggable:Dn,destination:kt,draggables:ti,viewport:Ce.viewport,previousClientSelection:Ce.current.client.selection,previousImpact:Ce.impact,afterCritical:Ce.afterCritical}):ga({isMovingForward:Hn,previousPageBorderBoxCenter:Fn,draggable:Dn,isOver:kt,draggables:ti,droppables:Oi,viewport:Ce.viewport,afterCritical:Ce.afterCritical})};function No(Se){return Se.phase==="DRAGGING"||Se.phase==="COLLECTING"}function qr(Se){var Ce=br(Se.top,Se.bottom),ke=br(Se.left,Se.right);return function(yt){return Ce(yt.y)&&ke(yt.x)}}function Bi(Se,Ce){return Se.left<Ce.right&&Se.right>Ce.left&&Se.top<Ce.bottom&&Se.bottom>Ce.top}function eo(Se){var Ce=Se.pageBorderBox,ke=Se.draggable,$e=Se.candidates,yt=ke.page.borderBox.center,vt=$e.map(function(kt){var Ht=kt.axis,Cn=tr(kt.axis.line,Ce.center[Ht.line],kt.page.borderBox.center[Ht.crossAxisLine]);return{id:kt.descriptor.id,distance:Hr(yt,Cn)}}).sort(function(kt,Ht){return Ht.distance-kt.distance});return vt[0]?vt[0].id:null}function Yo(Se){var Ce=Se.pageBorderBox,ke=Se.draggable,$e=Se.droppables,yt=st($e).filter(function(vt){if(!vt.isEnabled)return!1;var kt=vt.subject.active;if(!kt||!Bi(Ce,kt))return!1;if(qr(kt)(Ce.center))return!0;var Ht=vt.axis,Cn=kt.center[Ht.crossAxisLine],Hn=Ce[Ht.crossAxisStart],Dn=Ce[Ht.crossAxisEnd],Fn=br(kt[Ht.crossAxisStart],kt[Ht.crossAxisEnd]),bn=Fn(Hn),ti=Fn(Dn);return!bn&&!ti?!0:bn?Hn<Cn:Dn>Cn});return yt.length?yt.length===1?yt[0].descriptor.id:eo({pageBorderBox:Ce,draggable:ke,candidates:yt}):null}var ma=function(Ce,ke){return dr(jr(Ce,ke))},xa=function(Se,Ce){var ke=Se.frame;return ke?ma(Ce,ke.scroll.diff.value):Ce};function bo(Se){var Ce=Se.displaced,ke=Se.id;return!!(Ce.visible[ke]||Ce.invisible[ke])}function ra(Se){var Ce=Se.draggable,ke=Se.closest,$e=Se.inHomeList;return ke?$e&&ke.descriptor.index>Ce.descriptor.index?ke.descriptor.index-1:ke.descriptor.index:null}var Ao=function(Se){var Ce=Se.pageBorderBoxWithDroppableScroll,ke=Se.draggable,$e=Se.destination,yt=Se.insideDestination,vt=Se.last,kt=Se.viewport,Ht=Se.afterCritical,Cn=$e.axis,Hn=ki($e.axis,ke.displaceBy),Dn=Hn.value,Fn=Ce[Cn.start],bn=Ce[Cn.end],ti=Wa(ke,yt),Oi=Ar(ti,function(no){var vo=no.descriptor.id,ko=no.page.borderBox.center[Cn.line],na=sl(vo,Ht),qo=bo({displaced:vt,id:vo});return na?qo?bn<=ko:Fn<ko-Dn:qo?bn<=ko+Dn:Fn<ko}),Kr=ra({draggable:ke,closest:Oi,inHomeList:Lo(ke,$e)});return _s({draggable:ke,insideDestination:yt,destination:$e,viewport:kt,last:vt,displacedBy:Hn,index:Kr})},Or=4,Aa=function(Se){var Ce=Se.draggable,ke=Se.pageBorderBoxWithDroppableScroll,$e=Se.previousImpact,yt=Se.destination,vt=Se.insideDestination,kt=Se.afterCritical;if(!yt.isCombineEnabled)return null;var Ht=yt.axis,Cn=ki(yt.axis,Ce.displaceBy),Hn=Cn.value,Dn=ke[Ht.start],Fn=ke[Ht.end],bn=Wa(Ce,vt),ti=Ar(bn,function(Kr){var no=Kr.descriptor.id,vo=Kr.page.borderBox,ko=vo[Ht.size],na=ko/Or,qo=sl(no,kt),Da=bo({displaced:$e.displaced,id:no});return qo?Da?Fn>vo[Ht.start]+na&&Fn<vo[Ht.end]-na:Dn>vo[Ht.start]-Hn+na&&Dn<vo[Ht.end]-Hn-na:Da?Fn>vo[Ht.start]+Hn+na&&Fn<vo[Ht.end]+Hn-na:Dn>vo[Ht.start]+na&&Dn<vo[Ht.end]-na});if(!ti)return null;var Oi={displacedBy:Cn,displaced:$e.displaced,at:{type:"COMBINE",combine:{draggableId:ti.descriptor.id,droppableId:yt.descriptor.id}}};return Oi},Ha=function(Se){var Ce=Se.pageOffset,ke=Se.draggable,$e=Se.draggables,yt=Se.droppables,vt=Se.previousImpact,kt=Se.viewport,Ht=Se.afterCritical,Cn=ma(ke.page.borderBox,Ce),Hn=Yo({pageBorderBox:Cn,draggable:ke,droppables:yt});if(!Hn)return ha;var Dn=yt[Hn],Fn=Ia(Dn.descriptor.id,$e),bn=xa(Dn,Cn);return Aa({pageBorderBoxWithDroppableScroll:bn,draggable:ke,previousImpact:vt,destination:Dn,insideDestination:Fn,afterCritical:Ht})||Ao({pageBorderBoxWithDroppableScroll:bn,draggable:ke,destination:Dn,insideDestination:Fn,last:vt.displaced,viewport:kt,afterCritical:Ht})},La=function(Se,Ce){var ke;return(0,lt.Z)({},Se,(ke={},ke[Ce.descriptor.id]=Ce,ke))},gl=function(Ce){var ke=Ce.previousImpact,$e=Ce.impact,yt=Ce.droppables,vt=Uo(ke),kt=Uo($e);if(!vt||vt===kt)return yt;var Ht=yt[vt];if(!Ht.subject.withPlaceholder)return yt;var Cn=ur(Ht);return La(yt,Cn)},xu=function(Se){var Ce=Se.draggable,ke=Se.draggables,$e=Se.droppables,yt=Se.previousImpact,vt=Se.impact,kt=gl({previousImpact:yt,impact:vt,droppables:$e}),Ht=Uo(vt);if(!Ht)return kt;var Cn=$e[Ht];if(Lo(Ce,Cn)||Cn.subject.withPlaceholder)return kt;var Hn=Li(Cn,Ce,ke);return La(kt,Hn)},en=function(Se){var Ce=Se.state,ke=Se.clientSelection,$e=Se.dimensions,yt=Se.viewport,vt=Se.impact,kt=Se.scrollJumpRequest,Ht=yt||Ce.viewport,Cn=$e||Ce.dimensions,Hn=ke||Ce.current.client.selection,Dn=Jt(Hn,Ce.initial.client.selection),Fn={offset:Dn,selection:Hn,borderBoxCenter:Cr(Ce.initial.client.borderBoxCenter,Dn)},bn={selection:Cr(Fn.selection,Ht.scroll.current),borderBoxCenter:Cr(Fn.borderBoxCenter,Ht.scroll.current),offset:Cr(Fn.offset,Ht.scroll.diff.value)},ti={client:Fn,page:bn};if(Ce.phase==="COLLECTING")return(0,lt.Z)({phase:"COLLECTING"},Ce,{dimensions:Cn,viewport:Ht,current:ti});var Oi=Cn.draggables[Ce.critical.draggable.id],Kr=vt||Ha({pageOffset:bn.offset,draggable:Oi,draggables:Cn.draggables,droppables:Cn.droppables,previousImpact:Ce.impact,viewport:Ht,afterCritical:Ce.afterCritical}),no=xu({draggable:Oi,impact:Kr,previousImpact:Ce.impact,draggables:Cn.draggables,droppables:Cn.droppables}),vo=(0,lt.Z)({},Ce,{current:ti,dimensions:{draggables:Cn.draggables,droppables:no},impact:Kr,viewport:Ht,scrollJumpRequest:kt||null,forceShouldAnimate:kt?!1:null});return vo};function Xt(Se,Ce){return Se.map(function(ke){return Ce[ke]})}var On=function(Se){var Ce=Se.impact,ke=Se.viewport,$e=Se.draggables,yt=Se.destination,vt=Se.forceShouldAnimate,kt=Ce.displaced,Ht=Xt(kt.all,$e),Cn=Fs({afterDragging:Ht,destination:yt,displacedBy:Ce.displacedBy,viewport:ke.frame,forceShouldAnimate:vt,last:kt});return(0,lt.Z)({},Ce,{displaced:Cn})},tt=function(Se){var Ce=Se.impact,ke=Se.draggable,$e=Se.droppable,yt=Se.draggables,vt=Se.viewport,kt=Se.afterCritical,Ht=Qi({impact:Ce,draggable:ke,draggables:yt,droppable:$e,afterCritical:kt});return Io({pageBorderBoxCenter:Ht,draggable:ke,viewport:vt})},nn=function(Se){var Ce=Se.state,ke=Se.dimensions,$e=Se.viewport;Ce.movementMode!=="SNAP"&&kn(!1);var yt=Ce.impact,vt=$e||Ce.viewport,kt=ke||Ce.dimensions,Ht=kt.draggables,Cn=kt.droppables,Hn=Ht[Ce.critical.draggable.id],Dn=Uo(yt);Dn||kn(!1);var Fn=Cn[Dn],bn=On({impact:yt,viewport:vt,destination:Fn,draggables:Ht}),ti=tt({impact:bn,draggable:Hn,droppable:Fn,draggables:Ht,viewport:vt,afterCritical:Ce.afterCritical});return en({impact:bn,clientSelection:ti,state:Ce,dimensions:kt,viewport:vt})},sr=function(Se){return{index:Se.index,droppableId:Se.droppableId}},kr=function(Se){var Ce=Se.draggable,ke=Se.home,$e=Se.draggables,yt=Se.viewport,vt=ki(ke.axis,Ce.displaceBy),kt=Ia(ke.descriptor.id,$e),Ht=kt.indexOf(Ce);Ht===-1&&kn(!1);var Cn=kt.slice(Ht+1),Hn=Cn.reduce(function(ti,Oi){return ti[Oi.descriptor.id]=!0,ti},{}),Dn={inVirtualList:ke.descriptor.mode==="virtual",displacedBy:vt,effected:Hn},Fn=Fs({afterDragging:Cn,destination:ke,displacedBy:vt,last:null,viewport:yt.frame,forceShouldAnimate:!1}),bn={displaced:Fn,displacedBy:vt,at:{type:"REORDER",destination:sr(Ce.descriptor)}};return{impact:bn,afterCritical:Dn}},yr=function(Se,Ce){return{draggables:Se.draggables,droppables:La(Se.droppables,Ce)}},lr=function(Ce){},Mi=function(Ce){},wr=function(Se){var Ce=Se.draggable,ke=Se.offset,$e=Se.initialWindowScroll,yt=hr(Ce.client,ke),vt=De(yt,$e),kt=(0,lt.Z)({},Ce,{placeholder:(0,lt.Z)({},Ce.placeholder,{client:yt}),client:yt,page:vt});return kt},to=function(Se){var Ce=Se.frame;return Ce||kn(!1),Ce},yo=function(Se){var Ce=Se.additions,ke=Se.updatedDroppables,$e=Se.viewport,yt=$e.scroll.diff.value;return Ce.map(function(vt){var kt=vt.descriptor.droppableId,Ht=ke[kt],Cn=to(Ht),Hn=Cn.scroll.diff.value,Dn=Cr(yt,Hn),Fn=wr({draggable:vt,offset:Dn,initialWindowScroll:$e.scroll.initial});return Fn})},fr=function(Se){var Ce=Se.state,ke=Se.published;lr();var $e=ke.modified.map(function(na){var qo=Ce.dimensions.droppables[na.droppableId],Da=Ji(qo,na.scroll);return Da}),yt=(0,lt.Z)({},Ce.dimensions.droppables,{},Wo($e)),vt=Hi(yo({additions:ke.additions,updatedDroppables:yt,viewport:Ce.viewport})),kt=(0,lt.Z)({},Ce.dimensions.draggables,{},vt);ke.removals.forEach(function(na){delete kt[na]});var Ht={droppables:yt,draggables:kt},Cn=Uo(Ce.impact),Hn=Cn?Ht.droppables[Cn]:null,Dn=Ht.draggables[Ce.critical.draggable.id],Fn=Ht.droppables[Ce.critical.droppable.id],bn=kr({draggable:Dn,home:Fn,draggables:kt,viewport:Ce.viewport}),ti=bn.impact,Oi=bn.afterCritical,Kr=Hn&&Hn.isCombineEnabled?Ce.impact:ti,no=Ha({pageOffset:Ce.current.page.offset,draggable:Ht.draggables[Ce.critical.draggable.id],draggables:Ht.draggables,droppables:Ht.droppables,previousImpact:Kr,viewport:Ce.viewport,afterCritical:Oi});Mi();var vo=(0,lt.Z)({phase:"DRAGGING"},Ce,{phase:"DRAGGING",impact:no,onLiftImpact:ti,dimensions:Ht,afterCritical:Oi,forceShouldAnimate:!1});if(Ce.phase==="COLLECTING")return vo;var ko=(0,lt.Z)({phase:"DROP_PENDING"},vo,{phase:"DROP_PENDING",reason:Ce.reason,isWaiting:!1});return ko},vr=function(Ce){return Ce.movementMode==="SNAP"},xr=function(Ce,ke,$e){var yt=yr(Ce.dimensions,ke);return!vr(Ce)||$e?en({state:Ce,dimensions:yt}):nn({state:Ce,dimensions:yt})};function _i(Se){return Se.isDragging&&Se.movementMode==="SNAP"?(0,lt.Z)({phase:"DRAGGING"},Se,{scrollJumpRequest:null}):Se}var Ii={phase:"IDLE",completed:null,shouldFlush:!1},Gr=function(Se,Ce){if(Se===void 0&&(Se=Ii),Ce.type==="FLUSH")return(0,lt.Z)({},Ii,{shouldFlush:!0});if(Ce.type==="INITIAL_PUBLISH"){Se.phase!=="IDLE"&&kn(!1);var ke=Ce.payload,$e=ke.critical,yt=ke.clientSelection,vt=ke.viewport,kt=ke.dimensions,Ht=ke.movementMode,Cn=kt.draggables[$e.draggable.id],Hn=kt.droppables[$e.droppable.id],Dn={selection:yt,borderBoxCenter:Cn.client.borderBox.center,offset:Qr},Fn={client:Dn,page:{selection:Cr(Dn.selection,vt.scroll.initial),borderBoxCenter:Cr(Dn.selection,vt.scroll.initial),offset:Cr(Dn.selection,vt.scroll.diff.value)}},bn=st(kt.droppables).every(function(Xf){return!Xf.isFixedOnPage}),ti=kr({draggable:Cn,home:Hn,draggables:kt.draggables,viewport:vt}),Oi=ti.impact,Kr=ti.afterCritical,no={phase:"DRAGGING",isDragging:!0,critical:$e,movementMode:Ht,dimensions:kt,initial:Fn,current:Fn,isWindowScrollAllowed:bn,impact:Oi,afterCritical:Kr,onLiftImpact:Oi,viewport:vt,scrollJumpRequest:null,forceShouldAnimate:null};return no}if(Ce.type==="COLLECTION_STARTING"){if(Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING")return Se;Se.phase!=="DRAGGING"&&kn(!1);var vo=(0,lt.Z)({phase:"COLLECTING"},Se,{phase:"COLLECTING"});return vo}if(Ce.type==="PUBLISH_WHILE_DRAGGING")return Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING"||kn(!1),fr({state:Se,published:Ce.payload});if(Ce.type==="MOVE"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||kn(!1);var ko=Ce.payload.client;return gi(ko,Se.current.client.selection)?Se:en({state:Se,clientSelection:ko,impact:vr(Se)?Se.impact:null})}if(Ce.type==="UPDATE_DROPPABLE_SCROLL"){if(Se.phase==="DROP_PENDING"||Se.phase==="COLLECTING")return _i(Se);No(Se)||kn(!1);var na=Ce.payload,qo=na.id,Da=na.newScroll,ls=Se.dimensions.droppables[qo];if(!ls)return Se;var Os=Ji(ls,Da);return xr(Se,Os,!1)}if(Ce.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||kn(!1);var eu=Ce.payload,As=eu.id,Gl=eu.isEnabled,_u=Se.dimensions.droppables[As];_u||kn(!1),_u.isEnabled===Gl&&kn(!1);var Xu=(0,lt.Z)({},_u,{isEnabled:Gl});return xr(Se,Xu,!0)}if(Ce.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||kn(!1);var hd=Ce.payload,Lc=hd.id,wc=hd.isCombineEnabled,gu=Se.dimensions.droppables[Lc];gu||kn(!1),gu.isCombineEnabled===wc&&kn(!1);var Ol=(0,lt.Z)({},gu,{isCombineEnabled:wc});return xr(Se,Ol,!0)}if(Ce.type==="MOVE_BY_WINDOW_SCROLL"){if(Se.phase==="DROP_PENDING"||Se.phase==="DROP_ANIMATING")return Se;No(Se)||kn(!1),Se.isWindowScrollAllowed||kn(!1);var Nd=Ce.payload.newScroll;if(gi(Se.viewport.scroll.current,Nd))return _i(Se);var $l=Ss(Se.viewport,Nd);return vr(Se)?nn({state:Se,viewport:$l}):en({state:Se,viewport:$l})}if(Ce.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!No(Se))return Se;var fd=Ce.payload.maxScroll;if(gi(fd,Se.viewport.scroll.max))return Se;var vf=(0,lt.Z)({},Se.viewport,{scroll:(0,lt.Z)({},Se.viewport.scroll,{max:fd})});return(0,lt.Z)({phase:"DRAGGING"},Se,{viewport:vf})}if(Ce.type==="MOVE_UP"||Ce.type==="MOVE_DOWN"||Ce.type==="MOVE_LEFT"||Ce.type==="MOVE_RIGHT"){if(Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING")return Se;Se.phase!=="DRAGGING"&&kn(!1);var gd=Ka({state:Se,type:Ce.type});return gd?en({state:Se,impact:gd.impact,clientSelection:gd.clientSelection,scrollJumpRequest:gd.scrollJumpRequest}):Se}if(Ce.type==="DROP_PENDING"){var da=Ce.payload.reason;Se.phase!=="COLLECTING"&&kn(!1);var Wh=(0,lt.Z)({phase:"DROP_PENDING"},Se,{phase:"DROP_PENDING",isWaiting:!0,reason:da});return Wh}if(Ce.type==="DROP_ANIMATE"){var Lg=Ce.payload,pd=Lg.completed,Qd=Lg.dropDuration,Fh=Lg.newHomeClientOffset;Se.phase==="DRAGGING"||Se.phase==="DROP_PENDING"||kn(!1);var Cc={phase:"DROP_ANIMATING",completed:pd,dropDuration:Qd,newHomeClientOffset:Fh,dimensions:Se.dimensions};return Cc}if(Ce.type==="DROP_COMPLETE"){var Yf=Ce.payload.completed;return{phase:"IDLE",completed:Yf,shouldFlush:!1}}return Se},Zo=function(Ce){return{type:"BEFORE_INITIAL_CAPTURE",payload:Ce}},Fr=function(Ce){return{type:"LIFT",payload:Ce}},Er=function(Ce){return{type:"INITIAL_PUBLISH",payload:Ce}},Tr=function(Ce){return{type:"PUBLISH_WHILE_DRAGGING",payload:Ce}},Rr=function(){return{type:"COLLECTION_STARTING",payload:null}},gr=function(Ce){return{type:"UPDATE_DROPPABLE_SCROLL",payload:Ce}},Na=function(Ce){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:Ce}},jo=function(Ce){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:Ce}},Sa=function(Ce){return{type:"MOVE",payload:Ce}},Ga=function(Ce){return{type:"MOVE_BY_WINDOW_SCROLL",payload:Ce}},So=function(Ce){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:Ce}},Oa=function(){return{type:"MOVE_UP",payload:null}},bl=function(){return{type:"MOVE_DOWN",payload:null}},Dr=function(){return{type:"MOVE_RIGHT",payload:null}},Ts=function(){return{type:"MOVE_LEFT",payload:null}},zo=function(){return{type:"FLUSH",payload:null}},Hs=function(Ce){return{type:"DROP_ANIMATE",payload:Ce}},pl=function(Ce){return{type:"DROP_COMPLETE",payload:Ce}},rc=function(Ce){return{type:"DROP",payload:Ce}},ad=function(Ce){return{type:"DROP_PENDING",payload:Ce}},Tc=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function oc(Se){if(!(Se.length<=1)){for(var Ce=Se.map(function(Ht){return Ht.descriptor.index}),ke={},$e=1;$e<Ce.length;$e++){var yt=Ce[$e],vt=Ce[$e-1];yt!==vt+1&&(ke[yt]=!0)}if(Object.keys(ke).length)var kt=Ce.map(function(Ht){var Cn=!!ke[Ht];return Cn?"[\u{1F525}"+Ht+"]":""+Ht}).join(", ")}}function vc(Se,Ce){if(0)var ke}var is=function(Se){return function(Ce){var ke=Ce.getState,$e=Ce.dispatch;return function(yt){return function(vt){if(vt.type!=="LIFT"){yt(vt);return}var kt=vt.payload,Ht=kt.id,Cn=kt.clientSelection,Hn=kt.movementMode,Dn=ke();Dn.phase==="DROP_ANIMATING"&&$e(pl({completed:Dn.completed})),ke().phase!=="IDLE"&&kn(!1),$e(zo()),$e(Zo({draggableId:Ht,movementMode:Hn}));var Fn={shouldPublishImmediately:Hn==="SNAP"},bn={draggableId:Ht,scrollOptions:Fn},ti=Se.startPublishing(bn),Oi=ti.critical,Kr=ti.dimensions,no=ti.viewport;vc(Oi,Kr),$e(Er({critical:Oi,dimensions:Kr,clientSelection:Cn,movementMode:Hn,viewport:no}))}}}},du=function(Se){return function(){return function(Ce){return function(ke){ke.type==="INITIAL_PUBLISH"&&Se.dragging(),ke.type==="DROP_ANIMATE"&&Se.dropping(ke.payload.completed.result.reason),(ke.type==="FLUSH"||ke.type==="DROP_COMPLETE")&&Se.resting(),Ce(ke)}}}},Rc={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},ac={opacity:{drop:0,combining:.7},scale:{drop:.75}},Rd={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},au=Rd.outOfTheWay+"s "+Rc.outOfTheWay,su={fluid:"opacity "+au,snap:"transform "+au+", opacity "+au,drop:function(Ce){var ke=Ce+"s "+Rc.drop;return"transform "+ke+", opacity "+ke},outOfTheWay:"transform "+au,placeholder:"height "+au+", width "+au+", margin "+au},Wu=function(Ce){return gi(Ce,Qr)?null:"translate("+Ce.x+"px, "+Ce.y+"px)"},Au={moveTo:Wu,drop:function(Ce,ke){var $e=Wu(Ce);return $e?ke?$e+" scale("+ac.scale.drop+")":$e:null}},yc=Rd.minDropTime,bd=Rd.maxDropTime,_d=bd-yc,Fd=1500,ch=.6,ai=function(Se){var Ce=Se.current,ke=Se.destination,$e=Se.reason,yt=Hr(Ce,ke);if(yt<=0)return yc;if(yt>=Fd)return bd;var vt=yt/Fd,kt=yc+_d*vt,Ht=$e==="CANCEL"?kt*ch:kt;return Number(Ht.toFixed(2))},po=function(Se){var Ce=Se.impact,ke=Se.draggable,$e=Se.dimensions,yt=Se.viewport,vt=Se.afterCritical,kt=$e.draggables,Ht=$e.droppables,Cn=Uo(Ce),Hn=Cn?Ht[Cn]:null,Dn=Ht[ke.descriptor.droppableId],Fn=tt({impact:Ce,draggable:ke,draggables:kt,afterCritical:vt,droppable:Hn||Dn,viewport:yt}),bn=Jt(Fn,ke.client.borderBox.center);return bn},Xa=function(Se){var Ce=Se.draggables,ke=Se.reason,$e=Se.lastImpact,yt=Se.home,vt=Se.viewport,kt=Se.onLiftImpact;if(!$e.at||ke!=="DROP"){var Ht=On({draggables:Ce,impact:kt,destination:yt,viewport:vt,forceShouldAnimate:!0});return{impact:Ht,didDropInsideDroppable:!1}}if($e.at.type==="REORDER")return{impact:$e,didDropInsideDroppable:!0};var Cn=(0,lt.Z)({},$e,{displaced:Xr});return{impact:Cn,didDropInsideDroppable:!0}},rt=function(Se){var Ce=Se.getState,ke=Se.dispatch;return function($e){return function(yt){if(yt.type!=="DROP"){$e(yt);return}var vt=Ce(),kt=yt.payload.reason;if(vt.phase==="COLLECTING"){ke(ad({reason:kt}));return}if(vt.phase!=="IDLE"){var Ht=vt.phase==="DROP_PENDING"&&vt.isWaiting;Ht&&kn(!1),vt.phase==="DRAGGING"||vt.phase==="DROP_PENDING"||kn(!1);var Cn=vt.critical,Hn=vt.dimensions,Dn=Hn.draggables[vt.critical.draggable.id],Fn=Xa({reason:kt,lastImpact:vt.impact,afterCritical:vt.afterCritical,onLiftImpact:vt.onLiftImpact,home:vt.dimensions.droppables[vt.critical.droppable.id],viewport:vt.viewport,draggables:vt.dimensions.draggables}),bn=Fn.impact,ti=Fn.didDropInsideDroppable,Oi=ti?Ma(bn):null,Kr=ti?xs(bn):null,no={index:Cn.draggable.index,droppableId:Cn.droppable.id},vo={draggableId:Dn.descriptor.id,type:Dn.descriptor.type,source:no,reason:kt,mode:vt.movementMode,destination:Oi,combine:Kr},ko=po({impact:bn,draggable:Dn,dimensions:Hn,viewport:vt.viewport,afterCritical:vt.afterCritical}),na={critical:vt.critical,afterCritical:vt.afterCritical,result:vo,impact:bn},qo=!gi(vt.current.client.offset,ko)||!!vo.combine;if(!qo){ke(pl({completed:na}));return}var Da=ai({current:vt.current.client.offset,destination:ko,reason:kt}),ls={newHomeClientOffset:ko,dropDuration:Da,completed:na};ke(Hs(ls))}}}},et=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Yt(Se){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(ke){ke.target!==window&&ke.target!==window.document||Se()}}}function Qt(Se){var Ce=Se.onWindowScroll;function ke(){Ce(et())}var $e=Gt(ke),yt=Yt($e),vt=zt;function kt(){return vt!==zt}function Ht(){kt()&&kn(!1),vt=Qn(window,[yt])}function Cn(){kt()||kn(!1),$e.cancel(),vt(),vt=zt}return{start:Ht,stop:Cn,isActive:kt}}var yn=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},on=function(Se){var Ce=Qt({onWindowScroll:function($e){Se.dispatch(Ga({newScroll:$e}))}});return function(ke){return function($e){!Ce.isActive()&&$e.type==="INITIAL_PUBLISH"&&Ce.start(),Ce.isActive()&&yn($e)&&Ce.stop(),ke($e)}}},Kn=function(Se){var Ce=!1,ke=!1,$e=setTimeout(function(){ke=!0}),yt=function(kt){Ce||ke||(Ce=!0,Se(kt),clearTimeout($e))};return yt.wasCalled=function(){return Ce},yt},zn=function(){var Se=[],Ce=function(vt){var kt=Nr(Se,function(Hn){return Hn.timerId===vt});kt===-1&&kn(!1);var Ht=Se.splice(kt,1),Cn=Ht[0];Cn.callback()},ke=function(vt){var kt=setTimeout(function(){return Ce(kt)}),Ht={timerId:kt,callback:vt};Se.push(Ht)},$e=function(){if(Se.length){var vt=[].concat(Se);Se.length=0,vt.forEach(function(kt){clearTimeout(kt.timerId),kt.callback()})}};return{add:ke,flush:$e}},Xn=function(Ce,ke){return Ce==null&&ke==null?!0:Ce==null||ke==null?!1:Ce.droppableId===ke.droppableId&&Ce.index===ke.index},Pi=function(Ce,ke){return Ce==null&&ke==null?!0:Ce==null||ke==null?!1:Ce.draggableId===ke.draggableId&&Ce.droppableId===ke.droppableId},Jn=function(Ce,ke){if(Ce===ke)return!0;var $e=Ce.draggable.id===ke.draggable.id&&Ce.draggable.droppableId===ke.draggable.droppableId&&Ce.draggable.type===ke.draggable.type&&Ce.draggable.index===ke.draggable.index,yt=Ce.droppable.id===ke.droppable.id&&Ce.droppable.type===ke.droppable.type;return $e&&yt},yi=function(Ce,ke){lr(),ke(),Mi()},or=function(Ce,ke){return{draggableId:Ce.draggable.id,type:Ce.droppable.type,source:{droppableId:Ce.droppable.id,index:Ce.draggable.index},mode:ke}},Vi=function(Ce,ke,$e,yt){if(!Ce){$e(yt(ke));return}var vt=Kn($e),kt={announce:vt};Ce(ke,kt),vt.wasCalled()||$e(yt(ke))},Ui=function(Se,Ce){var ke=zn(),$e=null,yt=function(bn,ti){$e&&kn(!1),yi("onBeforeCapture",function(){var Oi=Se().onBeforeCapture;if(Oi){var Kr={draggableId:bn,mode:ti};Oi(Kr)}})},vt=function(bn,ti){$e&&kn(!1),yi("onBeforeDragStart",function(){var Oi=Se().onBeforeDragStart;Oi&&Oi(or(bn,ti))})},kt=function(bn,ti){$e&&kn(!1);var Oi=or(bn,ti);$e={mode:ti,lastCritical:bn,lastLocation:Oi.source,lastCombine:null},ke.add(function(){yi("onDragStart",function(){return Vi(Se().onDragStart,Oi,Ce,Yr.onDragStart)})})},Ht=function(bn,ti){var Oi=Ma(ti),Kr=xs(ti);$e||kn(!1);var no=!Jn(bn,$e.lastCritical);no&&($e.lastCritical=bn);var vo=!Xn($e.lastLocation,Oi);vo&&($e.lastLocation=Oi);var ko=!Pi($e.lastCombine,Kr);if(ko&&($e.lastCombine=Kr),!(!no&&!vo&&!ko)){var na=(0,lt.Z)({},or(bn,$e.mode),{combine:Kr,destination:Oi});ke.add(function(){yi("onDragUpdate",function(){return Vi(Se().onDragUpdate,na,Ce,Yr.onDragUpdate)})})}},Cn=function(){$e||kn(!1),ke.flush()},Hn=function(bn){$e||kn(!1),$e=null,yi("onDragEnd",function(){return Vi(Se().onDragEnd,bn,Ce,Yr.onDragEnd)})},Dn=function(){if($e){var bn=(0,lt.Z)({},or($e.lastCritical,$e.mode),{combine:null,destination:null,reason:"CANCEL"});Hn(bn)}};return{beforeCapture:yt,beforeStart:vt,start:kt,update:Ht,flush:Cn,drop:Hn,abort:Dn}},Jr=function(Se,Ce){var ke=Ui(Se,Ce);return function($e){return function(yt){return function(vt){if(vt.type==="BEFORE_INITIAL_CAPTURE"){ke.beforeCapture(vt.payload.draggableId,vt.payload.movementMode);return}if(vt.type==="INITIAL_PUBLISH"){var kt=vt.payload.critical;ke.beforeStart(kt,vt.payload.movementMode),yt(vt),ke.start(kt,vt.payload.movementMode);return}if(vt.type==="DROP_COMPLETE"){var Ht=vt.payload.completed.result;ke.flush(),yt(vt),ke.drop(Ht);return}if(yt(vt),vt.type==="FLUSH"){ke.abort();return}var Cn=$e.getState();Cn.phase==="DRAGGING"&&ke.update(Cn.critical,Cn.impact)}}}},rr=function(Se){return function(Ce){return function(ke){if(ke.type!=="DROP_ANIMATION_FINISHED"){Ce(ke);return}var $e=Se.getState();$e.phase!=="DROP_ANIMATING"&&kn(!1),Se.dispatch(pl({completed:$e.completed}))}}},_r=function(Se){var Ce=null,ke=null;function $e(){ke&&(cancelAnimationFrame(ke),ke=null),Ce&&(Ce(),Ce=null)}return function(yt){return function(vt){if((vt.type==="FLUSH"||vt.type==="DROP_COMPLETE"||vt.type==="DROP_ANIMATION_FINISHED")&&$e(),yt(vt),vt.type==="DROP_ANIMATE"){var kt={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Cn=Se.getState();Cn.phase==="DROP_ANIMATING"&&Se.dispatch(Tc())}};ke=requestAnimationFrame(function(){ke=null,Ce=Qn(window,[kt])})}}}},zr=function(Se){return function(){return function(Ce){return function(ke){(ke.type==="DROP_COMPLETE"||ke.type==="FLUSH"||ke.type==="DROP_ANIMATE")&&Se.stopPublishing(),Ce(ke)}}}},mo=function(Se){var Ce=!1;return function(){return function(ke){return function($e){if($e.type==="INITIAL_PUBLISH"){Ce=!0,Se.tryRecordFocus($e.payload.critical.draggable.id),ke($e),Se.tryRestoreFocusRecorded();return}if(ke($e),!!Ce){if($e.type==="FLUSH"){Ce=!1,Se.tryRestoreFocusRecorded();return}if($e.type==="DROP_COMPLETE"){Ce=!1;var yt=$e.payload.completed.result;yt.combine&&Se.tryShiftRecord(yt.draggableId,yt.combine.draggableId),Se.tryRestoreFocusRecorded()}}}}}},Xo=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},sa=function(Se){return function(Ce){return function(ke){return function($e){if(Xo($e)){Se.stop(),ke($e);return}if($e.type==="INITIAL_PUBLISH"){ke($e);var yt=Ce.getState();yt.phase!=="DRAGGING"&&kn(!1),Se.start(yt);return}ke($e),Se.scroll(Ce.getState())}}}},ro=function(Se){return function(Ce){return function(ke){if(Ce(ke),ke.type==="PUBLISH_WHILE_DRAGGING"){var $e=Se.getState();$e.phase==="DROP_PENDING"&&($e.isWaiting||Se.dispatch(rc({reason:$e.reason})))}}}},$o=We.qC,ka=function(Se){var Ce=Se.dimensionMarshal,ke=Se.focusMarshal,$e=Se.styleMarshal,yt=Se.getResponders,vt=Se.announce,kt=Se.autoScroller;return(0,We.MT)(Gr,$o((0,We.md)(du($e),zr(Ce),is(Ce),rt,rr,_r,ro,sa(kt),on,mo(ke),Jr(yt,vt))))},uo=function(){return{additions:{},removals:{},modified:{}}};function Oo(Se){var Ce=Se.registry,ke=Se.callbacks,$e=uo(),yt=null,vt=function(){yt||(ke.collectionStarting(),yt=requestAnimationFrame(function(){yt=null,lr();var Dn=$e,Fn=Dn.additions,bn=Dn.removals,ti=Dn.modified,Oi=Object.keys(Fn).map(function(vo){return Ce.draggable.getById(vo).getDimension(Qr)}).sort(function(vo,ko){return vo.descriptor.index-ko.descriptor.index}),Kr=Object.keys(ti).map(function(vo){var ko=Ce.droppable.getById(vo),na=ko.callbacks.getScrollWhileDragging();return{droppableId:vo,scroll:na}}),no={additions:Oi,removals:Object.keys(bn),modified:Kr};$e=uo(),Mi(),ke.publish(no)}))},kt=function(Dn){var Fn=Dn.descriptor.id;$e.additions[Fn]=Dn,$e.modified[Dn.descriptor.droppableId]=!0,$e.removals[Fn]&&delete $e.removals[Fn],vt()},Ht=function(Dn){var Fn=Dn.descriptor;$e.removals[Fn.id]=!0,$e.modified[Fn.droppableId]=!0,$e.additions[Fn.id]&&delete $e.additions[Fn.id],vt()},Cn=function(){yt&&(cancelAnimationFrame(yt),yt=null,$e=uo())};return{add:kt,remove:Ht,stop:Cn}}var co=function(Se){var Ce=Se.scrollHeight,ke=Se.scrollWidth,$e=Se.height,yt=Se.width,vt=Jt({x:ke,y:Ce},{x:yt,y:$e}),kt={x:Math.max(0,vt.x),y:Math.max(0,vt.y)};return kt},Ir=function(){var Se=document.documentElement;return Se||kn(!1),Se},Fo=function(){var Se=Ir(),Ce=co({scrollHeight:Se.scrollHeight,scrollWidth:Se.scrollWidth,width:Se.clientWidth,height:Se.clientHeight});return Ce},ta=function(){var Se=et(),Ce=Fo(),ke=Se.y,$e=Se.x,yt=Ir(),vt=yt.clientWidth,kt=yt.clientHeight,Ht=$e+vt,Cn=ke+kt,Hn=dr({top:ke,left:$e,right:Ht,bottom:Cn}),Dn={frame:Hn,scroll:{initial:Se,current:Se,max:Ce,diff:{value:Qr,displacement:Qr}}};return Dn},Pa=function(Se){var Ce=Se.critical,ke=Se.scrollOptions,$e=Se.registry;lr();var yt=ta(),vt=yt.scroll.current,kt=Ce.droppable,Ht=$e.droppable.getAllByType(kt.type).map(function(Fn){return Fn.callbacks.getDimensionAndWatchScroll(vt,ke)}),Cn=$e.draggable.getAllByType(Ce.draggable.type).map(function(Fn){return Fn.getDimension(vt)}),Hn={draggables:Hi(Cn),droppables:Wo(Ht)};Mi();var Dn={dimensions:Hn,critical:Ce,viewport:yt};return Dn};function wa(Se,Ce,ke){if(ke.descriptor.id===Ce.id||ke.descriptor.type!==Ce.type)return!1;var $e=Se.droppable.getById(ke.descriptor.droppableId);return $e.descriptor.mode==="virtual"}var oo=function(Se,Ce){var ke=null,$e=Oo({callbacks:{publish:Ce.publishWhileDragging,collectionStarting:Ce.collectionStarting},registry:Se}),yt=function(ti,Oi){Se.droppable.exists(ti)||kn(!1),ke&&Ce.updateDroppableIsEnabled({id:ti,isEnabled:Oi})},vt=function(ti,Oi){ke&&(Se.droppable.exists(ti)||kn(!1),Ce.updateDroppableIsCombineEnabled({id:ti,isCombineEnabled:Oi}))},kt=function(ti,Oi){ke&&(Se.droppable.exists(ti)||kn(!1),Ce.updateDroppableScroll({id:ti,newScroll:Oi}))},Ht=function(ti,Oi){ke&&Se.droppable.getById(ti).callbacks.scroll(Oi)},Cn=function(){if(ke){$e.stop();var ti=ke.critical.droppable;Se.droppable.getAllByType(ti.type).forEach(function(Oi){return Oi.callbacks.dragStopped()}),ke.unsubscribe(),ke=null}},Hn=function(ti){ke||kn(!1);var Oi=ke.critical.draggable;ti.type==="ADDITION"&&wa(Se,Oi,ti.value)&&$e.add(ti.value),ti.type==="REMOVAL"&&wa(Se,Oi,ti.value)&&$e.remove(ti.value)},Dn=function(ti){ke&&kn(!1);var Oi=Se.draggable.getById(ti.draggableId),Kr=Se.droppable.getById(Oi.descriptor.droppableId),no={draggable:Oi.descriptor,droppable:Kr.descriptor},vo=Se.subscribe(Hn);return ke={critical:no,unsubscribe:vo},Pa({critical:no,registry:Se,scrollOptions:ti.scrollOptions})},Fn={updateDroppableIsEnabled:yt,updateDroppableIsCombineEnabled:vt,scrollDroppable:Ht,updateDroppableScroll:kt,startPublishing:Dn,stopPublishing:Cn};return Fn},Ta=function(Se,Ce){return Se.phase==="IDLE"?!0:Se.phase!=="DROP_ANIMATING"||Se.completed.result.draggableId===Ce?!1:Se.completed.result.reason==="DROP"},Va=function(Se){window.scrollBy(Se.x,Se.y)},ws=Gn(function(Se){return st(Se).filter(function(Ce){return!(!Ce.isEnabled||!Ce.frame)})}),as=function(Ce,ke){var $e=Ar(ws(ke),function(yt){return yt.frame||kn(!1),qr(yt.frame.pageMarginBox)(Ce)});return $e},qs=function(Se){var Ce=Se.center,ke=Se.destination,$e=Se.droppables;if(ke){var yt=$e[ke];return yt.frame?yt:null}var vt=as(Ce,$e);return vt},Bs={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(Ce){return Math.pow(Ce,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Za=function(Se,Ce){var ke=Se[Ce.size]*Bs.startFromPercentage,$e=Se[Ce.size]*Bs.maxScrollAtPercentage,yt={startScrollingFrom:ke,maxScrollValueAt:$e};return yt},oa=function(Se){var Ce=Se.startOfRange,ke=Se.endOfRange,$e=Se.current,yt=ke-Ce;if(yt===0)return 0;var vt=$e-Ce,kt=vt/yt;return kt},us=1,el=function(Se,Ce){if(Se>Ce.startScrollingFrom)return 0;if(Se<=Ce.maxScrollValueAt)return Bs.maxPixelScroll;if(Se===Ce.startScrollingFrom)return us;var ke=oa({startOfRange:Ce.maxScrollValueAt,endOfRange:Ce.startScrollingFrom,current:Se}),$e=1-ke,yt=Bs.maxPixelScroll*Bs.ease($e);return Math.ceil(yt)},Ws=Bs.durationDampening.accelerateAt,hl=Bs.durationDampening.stopDampeningAt,ba=function(Se,Ce){var ke=Ce,$e=hl,yt=Date.now(),vt=yt-ke;if(vt>=hl)return Se;if(vt<Ws)return us;var kt=oa({startOfRange:Ws,endOfRange:$e,current:vt}),Ht=Se*Bs.ease(kt);return Math.ceil(Ht)},ca=function(Se){var Ce=Se.distanceToEdge,ke=Se.thresholds,$e=Se.dragStartTime,yt=Se.shouldUseTimeDampening,vt=el(Ce,ke);return vt===0?0:yt?Math.max(ba(vt,$e),us):vt},Ca=function(Se){var Ce=Se.container,ke=Se.distanceToEdges,$e=Se.dragStartTime,yt=Se.axis,vt=Se.shouldUseTimeDampening,kt=Za(Ce,yt),Ht=ke[yt.end]<ke[yt.start];return Ht?ca({distanceToEdge:ke[yt.end],thresholds:kt,dragStartTime:$e,shouldUseTimeDampening:vt}):-1*ca({distanceToEdge:ke[yt.start],thresholds:kt,dragStartTime:$e,shouldUseTimeDampening:vt})},Qo=function(Se){var Ce=Se.container,ke=Se.subject,$e=Se.proposedScroll,yt=ke.height>Ce.height,vt=ke.width>Ce.width;return!vt&&!yt?$e:vt&&yt?null:{x:vt?0:$e.x,y:yt?0:$e.y}},vs=lo(function(Se){return Se===0?0:Se}),Jo=function(Se){var Ce=Se.dragStartTime,ke=Se.container,$e=Se.subject,yt=Se.center,vt=Se.shouldUseTimeDampening,kt={top:yt.y-ke.top,right:ke.right-yt.x,bottom:ke.bottom-yt.y,left:yt.x-ke.left},Ht=Ca({container:ke,distanceToEdges:kt,dragStartTime:Ce,axis:fi,shouldUseTimeDampening:vt}),Cn=Ca({container:ke,distanceToEdges:kt,dragStartTime:Ce,axis:Ba,shouldUseTimeDampening:vt}),Hn=vs({x:Cn,y:Ht});if(gi(Hn,Qr))return null;var Dn=Qo({container:ke,subject:$e,proposedScroll:Hn});return Dn?gi(Dn,Qr)?null:Dn:null},Ra=lo(function(Se){return Se===0?0:Se>0?1:-1}),rs=function(){var Se=function(ke,$e){return ke<0?ke:ke>$e?ke-$e:0};return function(Ce){var ke=Ce.current,$e=Ce.max,yt=Ce.change,vt=Cr(ke,yt),kt={x:Se(vt.x,$e.x),y:Se(vt.y,$e.y)};return gi(kt,Qr)?null:kt}}(),ss=function(Ce){var ke=Ce.max,$e=Ce.current,yt=Ce.change,vt={x:Math.max($e.x,ke.x),y:Math.max($e.y,ke.y)},kt=Ra(yt),Ht=rs({max:vt,current:$e,change:kt});return!Ht||kt.x!==0&&Ht.x===0||kt.y!==0&&Ht.y===0},Dl=function(Ce,ke){return ss({current:Ce.scroll.current,max:Ce.scroll.max,change:ke})},Fl=function(Ce,ke){if(!Dl(Ce,ke))return null;var $e=Ce.scroll.max,yt=Ce.scroll.current;return rs({current:yt,max:$e,change:ke})},Yl=function(Ce,ke){var $e=Ce.frame;return $e?ss({current:$e.scroll.current,max:$e.scroll.max,change:ke}):!1},Cs=function(Ce,ke){var $e=Ce.frame;return!$e||!Yl(Ce,ke)?null:rs({current:$e.scroll.current,max:$e.scroll.max,change:ke})},Hl=function(Se){var Ce=Se.viewport,ke=Se.subject,$e=Se.center,yt=Se.dragStartTime,vt=Se.shouldUseTimeDampening,kt=Jo({dragStartTime:yt,container:Ce.frame,subject:ke,center:$e,shouldUseTimeDampening:vt});return kt&&Dl(Ce,kt)?kt:null},fl=function(Se){var Ce=Se.droppable,ke=Se.subject,$e=Se.center,yt=Se.dragStartTime,vt=Se.shouldUseTimeDampening,kt=Ce.frame;if(!kt)return null;var Ht=Jo({dragStartTime:yt,container:kt.pageMarginBox,subject:ke,center:$e,shouldUseTimeDampening:vt});return Ht&&Yl(Ce,Ht)?Ht:null},Bl=function(Se){var Ce=Se.state,ke=Se.dragStartTime,$e=Se.shouldUseTimeDampening,yt=Se.scrollWindow,vt=Se.scrollDroppable,kt=Ce.current.page.borderBoxCenter,Ht=Ce.dimensions.draggables[Ce.critical.draggable.id],Cn=Ht.page.marginBox;if(Ce.isWindowScrollAllowed){var Hn=Ce.viewport,Dn=Hl({dragStartTime:ke,viewport:Hn,subject:Cn,center:kt,shouldUseTimeDampening:$e});if(Dn){yt(Dn);return}}var Fn=qs({center:kt,destination:Uo(Ce.impact),droppables:Ce.dimensions.droppables});if(Fn){var bn=fl({dragStartTime:ke,droppable:Fn,subject:Cn,center:kt,shouldUseTimeDampening:$e});bn&&vt(Fn.descriptor.id,bn)}},_c=function(Se){var Ce=Se.scrollWindow,ke=Se.scrollDroppable,$e=Gt(Ce),yt=Gt(ke),vt=null,kt=function(Dn){vt||kn(!1);var Fn=vt,bn=Fn.shouldUseTimeDampening,ti=Fn.dragStartTime;Bl({state:Dn,scrollWindow:$e,scrollDroppable:yt,dragStartTime:ti,shouldUseTimeDampening:bn})},Ht=function(Dn){lr(),vt&&kn(!1);var Fn=Date.now(),bn=!1,ti=function(){bn=!0};Bl({state:Dn,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:ti,scrollDroppable:ti}),vt={dragStartTime:Fn,shouldUseTimeDampening:bn},Mi(),bn&&kt(Dn)},Cn=function(){vt&&($e.cancel(),yt.cancel(),vt=null)};return{start:Ht,stop:Cn,scroll:kt}},Es=function(Se){var Ce=Se.move,ke=Se.scrollDroppable,$e=Se.scrollWindow,yt=function(Hn,Dn){var Fn=Cr(Hn.current.client.selection,Dn);Ce({client:Fn})},vt=function(Hn,Dn){if(!Yl(Hn,Dn))return Dn;var Fn=Cs(Hn,Dn);if(!Fn)return ke(Hn.descriptor.id,Dn),null;var bn=Jt(Dn,Fn);ke(Hn.descriptor.id,bn);var ti=Jt(Dn,bn);return ti},kt=function(Hn,Dn,Fn){if(!Hn||!Dl(Dn,Fn))return Fn;var bn=Fl(Dn,Fn);if(!bn)return $e(Fn),null;var ti=Jt(Fn,bn);$e(ti);var Oi=Jt(Fn,ti);return Oi},Ht=function(Hn){var Dn=Hn.scrollJumpRequest;if(Dn){var Fn=Uo(Hn.impact);Fn||kn(!1);var bn=vt(Hn.dimensions.droppables[Fn],Dn);if(bn){var ti=Hn.viewport,Oi=kt(Hn.isWindowScrollAllowed,ti,bn);Oi&&yt(Hn,Oi)}}};return Ht},Is=function(Se){var Ce=Se.scrollDroppable,ke=Se.scrollWindow,$e=Se.move,yt=_c({scrollWindow:ke,scrollDroppable:Ce}),vt=Es({move:$e,scrollWindow:ke,scrollDroppable:Ce}),kt=function(Hn){if(Hn.phase==="DRAGGING"){if(Hn.movementMode==="FLUID"){yt.scroll(Hn);return}Hn.scrollJumpRequest&&vt(Hn)}},Ht={scroll:kt,start:yt.start,stop:yt.stop};return Ht},bs="data-rbd",Gs=function(){var Se=bs+"-drag-handle";return{base:Se,draggableId:Se+"-draggable-id",contextId:Se+"-context-id"}}(),ml=function(){var Se=bs+"-draggable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),ts=function(){var Se=bs+"-droppable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),js={contextId:bs+"-scroll-container-context-id"},Il=function(Ce){return function(ke){return"["+ke+'="'+Ce+'"]'}},Xl=function(Ce,ke){return Ce.map(function($e){var yt=$e.styles[ke];return yt?$e.selector+" { "+yt+" }":""}).join(" ")},Gu="pointer-events: none;",Du=function(Se){var Ce=Il(Se),ke=function(){var Ht=`
|
|
|
cursor: -webkit-grab;
|
|
|
cursor: grab;
|
|
|
`;return{selector:Ce(Gs.contextId),styles:{always:`
|
|
|
-webkit-touch-callout: none;
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
|
touch-action: manipulation;
|
|
|
`,resting:Ht,dragging:Gu,dropAnimating:Ht}}}(),$e=function(){var Ht=`
|
|
|
transition: `+su.outOfTheWay+`;
|
|
|
`;return{selector:Ce(ml.contextId),styles:{dragging:Ht,dropAnimating:Ht,userCancel:Ht}}}(),yt={selector:Ce(ts.contextId),styles:{always:"overflow-anchor: none;"}},vt={selector:"body",styles:{dragging:`
|
|
|
cursor: grabbing;
|
|
|
cursor: -webkit-grabbing;
|
|
|
user-select: none;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
overflow-anchor: none;
|
|
|
`}},kt=[$e,ke,yt,vt];return{always:Xl(kt,"always"),resting:Xl(kt,"resting"),dragging:Xl(kt,"dragging"),dropAnimating:Xl(kt,"dropAnimating"),userCancel:Xl(kt,"userCancel")}},vl=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?le.useLayoutEffect:le.useEffect,Iu=function(){var Ce=document.querySelector("head");return Ce||kn(!1),Ce},Ou=function(Ce){var ke=document.createElement("style");return Ce&&ke.setAttribute("nonce",Ce),ke.type="text/css",ke};function Ms(Se,Ce){var ke=jn(function(){return Du(Se)},[Se]),$e=(0,le.useRef)(null),yt=(0,le.useRef)(null),vt=An(Gn(function(Fn){var bn=yt.current;bn||kn(!1),bn.textContent=Fn}),[]),kt=An(function(Fn){var bn=$e.current;bn||kn(!1),bn.textContent=Fn},[]);vl(function(){!$e.current&&!yt.current||kn(!1);var Fn=Ou(Ce),bn=Ou(Ce);return $e.current=Fn,yt.current=bn,Fn.setAttribute(bs+"-always",Se),bn.setAttribute(bs+"-dynamic",Se),Iu().appendChild(Fn),Iu().appendChild(bn),kt(ke.always),vt(ke.resting),function(){var ti=function(Kr){var no=Kr.current;no||kn(!1),Iu().removeChild(no),Kr.current=null};ti($e),ti(yt)}},[Ce,kt,vt,ke.always,ke.resting,Se]);var Ht=An(function(){return vt(ke.dragging)},[vt,ke.dragging]),Cn=An(function(Fn){if(Fn==="DROP"){vt(ke.dropAnimating);return}vt(ke.userCancel)},[vt,ke.dropAnimating,ke.userCancel]),Hn=An(function(){yt.current&&vt(ke.resting)},[vt,ke.resting]),Dn=jn(function(){return{dragging:Ht,dropping:Cn,resting:Hn}},[Ht,Cn,Hn]);return Dn}var Wl=function(Se){return Se&&Se.ownerDocument?Se.ownerDocument.defaultView:window};function $s(Se){return Se instanceof Wl(Se).HTMLElement}function zs(Se,Ce){var ke="["+Gs.contextId+'="'+Se+'"]',$e=xo(document.querySelectorAll(ke));if(!$e.length)return null;var yt=Ar($e,function(vt){return vt.getAttribute(Gs.draggableId)===Ce});return!yt||!$s(yt)?null:yt}function $u(Se){var Ce=(0,le.useRef)({}),ke=(0,le.useRef)(null),$e=(0,le.useRef)(null),yt=(0,le.useRef)(!1),vt=An(function(bn,ti){var Oi={id:bn,focus:ti};return Ce.current[bn]=Oi,function(){var no=Ce.current,vo=no[bn];vo!==Oi&&delete no[bn]}},[]),kt=An(function(bn){var ti=zs(Se,bn);ti&&ti!==document.activeElement&&ti.focus()},[Se]),Ht=An(function(bn,ti){ke.current===bn&&(ke.current=ti)},[]),Cn=An(function(){$e.current||yt.current&&($e.current=requestAnimationFrame(function(){$e.current=null;var bn=ke.current;bn&&kt(bn)}))},[kt]),Hn=An(function(bn){ke.current=null;var ti=document.activeElement;ti&&ti.getAttribute(Gs.draggableId)===bn&&(ke.current=bn)},[]);vl(function(){return yt.current=!0,function(){yt.current=!1;var bn=$e.current;bn&&cancelAnimationFrame(bn)}},[]);var Dn=jn(function(){return{register:vt,tryRecordFocus:Hn,tryRestoreFocusRecorded:Cn,tryShiftRecord:Ht}},[vt,Hn,Cn,Ht]);return Dn}function Vc(){var Se={draggables:{},droppables:{}},Ce=[];function ke(Fn){return Ce.push(Fn),function(){var ti=Ce.indexOf(Fn);ti!==-1&&Ce.splice(ti,1)}}function $e(Fn){Ce.length&&Ce.forEach(function(bn){return bn(Fn)})}function yt(Fn){return Se.draggables[Fn]||null}function vt(Fn){var bn=yt(Fn);return bn||kn(!1),bn}var kt={register:function(bn){Se.draggables[bn.descriptor.id]=bn,$e({type:"ADDITION",value:bn})},update:function(bn,ti){var Oi=Se.draggables[ti.descriptor.id];Oi&&Oi.uniqueId===bn.uniqueId&&(delete Se.draggables[ti.descriptor.id],Se.draggables[bn.descriptor.id]=bn)},unregister:function(bn){var ti=bn.descriptor.id,Oi=yt(ti);Oi&&bn.uniqueId===Oi.uniqueId&&(delete Se.draggables[ti],$e({type:"REMOVAL",value:bn}))},getById:vt,findById:yt,exists:function(bn){return!!yt(bn)},getAllByType:function(bn){return Ro(Se.draggables).filter(function(ti){return ti.descriptor.type===bn})}};function Ht(Fn){return Se.droppables[Fn]||null}function Cn(Fn){var bn=Ht(Fn);return bn||kn(!1),bn}var Hn={register:function(bn){Se.droppables[bn.descriptor.id]=bn},unregister:function(bn){var ti=Ht(bn.descriptor.id);ti&&bn.uniqueId===ti.uniqueId&&delete Se.droppables[bn.descriptor.id]},getById:Cn,findById:Ht,exists:function(bn){return!!Ht(bn)},getAllByType:function(bn){return Ro(Se.droppables).filter(function(ti){return ti.descriptor.type===bn})}};function Dn(){Se.draggables={},Se.droppables={},Ce.length=0}return{draggable:kt,droppable:Hn,subscribe:ke,clean:Dn}}function sc(){var Se=jn(Vc,[]);return(0,le.useEffect)(function(){return function(){requestAnimationFrame(Se.clean)}},[Se]),Se}var lc=le.createContext(null),Ku=function(){var Se=document.body;return Se||kn(!1),Se},ku={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},ys=function(Ce){return"rbd-announcement-"+Ce};function Ys(Se){var Ce=jn(function(){return ys(Se)},[Se]),ke=(0,le.useRef)(null);(0,le.useEffect)(function(){var vt=document.createElement("div");return ke.current=vt,vt.id=Ce,vt.setAttribute("aria-live","assertive"),vt.setAttribute("aria-atomic","true"),(0,lt.Z)(vt.style,ku),Ku().appendChild(vt),function(){setTimeout(function(){var Cn=Ku();Cn.contains(vt)&&Cn.removeChild(vt),vt===ke.current&&(ke.current=null)})}},[Ce]);var $e=An(function(yt){var vt=ke.current;if(vt){vt.textContent=yt;return}},[]);return $e}var yl=0,Xs={separator:"::"};function ds(){yl=0}function xl(Se,Ce){return Ce===void 0&&(Ce=Xs),jn(function(){return""+Se+Ce.separator+yl++},[Ce.separator,Se])}function Su(Se){var Ce=Se.contextId,ke=Se.uniqueId;return"rbd-hidden-text-"+Ce+"-"+ke}function xc(Se){var Ce=Se.contextId,ke=Se.text,$e=xl("hidden-text",{separator:"-"}),yt=jn(function(){return Su({contextId:Ce,uniqueId:$e})},[$e,Ce]);return(0,le.useEffect)(function(){var kt=document.createElement("div");return kt.id=yt,kt.textContent=ke,kt.style.display="none",Ku().appendChild(kt),function(){var Cn=Ku();Cn.contains(kt)&&Cn.removeChild(kt)}},[yt,ke]),yt}var jd=le.createContext(null),gn={react:"^16.8.5","react-dom":"^16.8.5"},sd=/(\d+)\.(\d+)\.(\d+)/,Bc=function(Ce){var ke=sd.exec(Ce);ke==null&&kn(!1);var $e=Number(ke[1]),yt=Number(ke[2]),vt=Number(ke[3]);return{major:$e,minor:yt,patch:vt,raw:Ce}},df=function(Ce,ke){return ke.major>Ce.major?!0:ke.major<Ce.major?!1:ke.minor>Ce.minor?!0:ke.minor<Ce.minor?!1:ke.patch>=Ce.patch},zd=function(Se,Ce){var ke=Bc(Se),$e=Bc(Ce);df(ke,$e)},Zd=`
|
|
|
We expect a html5 doctype: <!doctype html>
|
|
|
This is to ensure consistent browser layout and measurement
|
|
|
|
|
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
|
`,Rh=function(Se){var Ce=Se.doctype;Ce&&(Ce.name.toLowerCase(),Ce.publicId)};function Qg(Se){}function Ml(Se,Ce){}function dh(){Ml(function(){zd(gn.react,le.version),Rh(document)},[])}function Hd(Se){var Ce=(0,le.useRef)(Se);return(0,le.useEffect)(function(){Ce.current=Se}),Ce}function hh(){var Se=null;function Ce(){return!!Se}function ke(kt){return kt===Se}function $e(kt){Se&&kn(!1);var Ht={abandon:kt};return Se=Ht,Ht}function yt(){Se||kn(!1),Se=null}function vt(){Se&&(Se.abandon(),yt())}return{isClaimed:Ce,isActive:ke,claim:$e,release:yt,tryAbandon:vt}}var hf=9,Hf=13,fh=27,gh=32,Vu=33,Wd=34,ff=35,Mc=36,ld=37,Gd=38,Bd=39,Pu=40,Md,_h=(Md={},Md[Hf]=!0,Md[hf]=!0,Md),Tu=function(Se){_h[Se.keyCode]&&Se.preventDefault()},Uc=function(){var Se="visibilitychange";if(typeof document=="undefined")return Se;var Ce=[Se,"ms"+Se,"webkit"+Se,"moz"+Se,"o"+Se],ke=Ar(Ce,function($e){return"on"+$e in document});return ke||Se}(),ph=0,mh=5;function ud(Se,Ce){return Math.abs(Ce.x-Se.x)>=mh||Math.abs(Ce.y-Se.y)>=mh}var lu={type:"IDLE"};function jh(Se){var Ce=Se.cancel,ke=Se.completed,$e=Se.getPhase,yt=Se.setPhase;return[{eventName:"mousemove",fn:function(kt){var Ht=kt.button,Cn=kt.clientX,Hn=kt.clientY;if(Ht===ph){var Dn={x:Cn,y:Hn},Fn=$e();if(Fn.type==="DRAGGING"){kt.preventDefault(),Fn.actions.move(Dn);return}Fn.type!=="PENDING"&&kn(!1);var bn=Fn.point;if(ud(bn,Dn)){kt.preventDefault();var ti=Fn.actions.fluidLift(Dn);yt({type:"DRAGGING",actions:ti})}}}},{eventName:"mouseup",fn:function(kt){var Ht=$e();if(Ht.type!=="DRAGGING"){Ce();return}kt.preventDefault(),Ht.actions.drop({shouldBlockNextClick:!0}),ke()}},{eventName:"mousedown",fn:function(kt){$e().type==="DRAGGING"&&kt.preventDefault(),Ce()}},{eventName:"keydown",fn:function(kt){var Ht=$e();if(Ht.type==="PENDING"){Ce();return}if(kt.keyCode===fh){kt.preventDefault(),Ce();return}Tu(kt)}},{eventName:"resize",fn:Ce},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){$e().type==="PENDING"&&Ce()}},{eventName:"webkitmouseforcedown",fn:function(kt){var Ht=$e();if(Ht.type==="IDLE"&&kn(!1),Ht.actions.shouldRespectForcePress()){Ce();return}kt.preventDefault()}},{eventName:Uc,fn:Ce}]}function Ll(Se){var Ce=(0,le.useRef)(lu),ke=(0,le.useRef)(zt),$e=jn(function(){return{eventName:"mousedown",fn:function(Fn){if(!Fn.defaultPrevented&&Fn.button===ph&&!(Fn.ctrlKey||Fn.metaKey||Fn.shiftKey||Fn.altKey)){var bn=Se.findClosestDraggableId(Fn);if(bn){var ti=Se.tryGetLock(bn,kt,{sourceEvent:Fn});if(ti){Fn.preventDefault();var Oi={x:Fn.clientX,y:Fn.clientY};ke.current(),Hn(ti,Oi)}}}}}},[Se]),yt=jn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(Fn){if(!Fn.defaultPrevented){var bn=Se.findClosestDraggableId(Fn);if(bn){var ti=Se.findOptionsForDraggable(bn);ti&&(ti.shouldRespectForcePress||Se.canGetLock(bn)&&Fn.preventDefault())}}}}},[Se]),vt=An(function(){var Fn={passive:!1,capture:!0};ke.current=Qn(window,[yt,$e],Fn)},[yt,$e]),kt=An(function(){var Dn=Ce.current;Dn.type!=="IDLE"&&(Ce.current=lu,ke.current(),vt())},[vt]),Ht=An(function(){var Dn=Ce.current;kt(),Dn.type==="DRAGGING"&&Dn.actions.cancel({shouldBlockNextClick:!0}),Dn.type==="PENDING"&&Dn.actions.abort()},[kt]),Cn=An(function(){var Fn={capture:!0,passive:!1},bn=jh({cancel:Ht,completed:kt,getPhase:function(){return Ce.current},setPhase:function(Oi){Ce.current=Oi}});ke.current=Qn(window,bn,Fn)},[Ht,kt]),Hn=An(function(Fn,bn){Ce.current.type!=="IDLE"&&kn(!1),Ce.current={type:"PENDING",point:bn,actions:Fn},Cn()},[Cn]);vl(function(){return vt(),function(){ke.current()}},[vt])}var cs;function Js(){}var nu=(cs={},cs[Wd]=!0,cs[Vu]=!0,cs[Mc]=!0,cs[ff]=!0,cs);function uc(Se,Ce){function ke(){Ce(),Se.cancel()}function $e(){Ce(),Se.drop()}return[{eventName:"keydown",fn:function(vt){if(vt.keyCode===fh){vt.preventDefault(),ke();return}if(vt.keyCode===gh){vt.preventDefault(),$e();return}if(vt.keyCode===Pu){vt.preventDefault(),Se.moveDown();return}if(vt.keyCode===Gd){vt.preventDefault(),Se.moveUp();return}if(vt.keyCode===Bd){vt.preventDefault(),Se.moveRight();return}if(vt.keyCode===ld){vt.preventDefault(),Se.moveLeft();return}if(nu[vt.keyCode]){vt.preventDefault();return}Tu(vt)}},{eventName:"mousedown",fn:ke},{eventName:"mouseup",fn:ke},{eventName:"click",fn:ke},{eventName:"touchstart",fn:ke},{eventName:"resize",fn:ke},{eventName:"wheel",fn:ke,options:{passive:!0}},{eventName:Uc,fn:ke}]}function cc(Se){var Ce=(0,le.useRef)(Js),ke=jn(function(){return{eventName:"keydown",fn:function(vt){if(vt.defaultPrevented||vt.keyCode!==gh)return;var kt=Se.findClosestDraggableId(vt);if(!kt)return;var Ht=Se.tryGetLock(kt,Dn,{sourceEvent:vt});if(!Ht)return;vt.preventDefault();var Cn=!0,Hn=Ht.snapLift();Ce.current();function Dn(){Cn||kn(!1),Cn=!1,Ce.current(),$e()}Ce.current=Qn(window,uc(Hn,Dn),{capture:!0,passive:!1})}}},[Se]),$e=An(function(){var vt={passive:!1,capture:!0};Ce.current=Qn(window,[ke],vt)},[ke]);vl(function(){return $e(),function(){Ce.current()}},[$e])}var $d={type:"IDLE"},cd=120,vh=.15;function Sc(Se){var Ce=Se.cancel,ke=Se.getPhase;return[{eventName:"orientationchange",fn:Ce},{eventName:"resize",fn:Ce},{eventName:"contextmenu",fn:function(yt){yt.preventDefault()}},{eventName:"keydown",fn:function(yt){if(ke().type!=="DRAGGING"){Ce();return}yt.keyCode===fh&&yt.preventDefault(),Ce()}},{eventName:Uc,fn:Ce}]}function Yc(Se){var Ce=Se.cancel,ke=Se.completed,$e=Se.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(vt){var kt=$e();if(kt.type!=="DRAGGING"){Ce();return}kt.hasMoved=!0;var Ht=vt.touches[0],Cn=Ht.clientX,Hn=Ht.clientY,Dn={x:Cn,y:Hn};vt.preventDefault(),kt.actions.move(Dn)}},{eventName:"touchend",fn:function(vt){var kt=$e();if(kt.type!=="DRAGGING"){Ce();return}vt.preventDefault(),kt.actions.drop({shouldBlockNextClick:!0}),ke()}},{eventName:"touchcancel",fn:function(vt){if($e().type!=="DRAGGING"){Ce();return}vt.preventDefault(),Ce()}},{eventName:"touchforcechange",fn:function(vt){var kt=$e();kt.type==="IDLE"&&kn(!1);var Ht=vt.touches[0];if(Ht){var Cn=Ht.force>=vh;if(Cn){var Hn=kt.actions.shouldRespectForcePress();if(kt.type==="PENDING"){Hn&&Ce();return}if(Hn){if(kt.hasMoved){vt.preventDefault();return}Ce();return}vt.preventDefault()}}}},{eventName:Uc,fn:Ce}]}function Wf(Se){var Ce=(0,le.useRef)($d),ke=(0,le.useRef)(zt),$e=An(function(){return Ce.current},[]),yt=An(function(ti){Ce.current=ti},[]),vt=jn(function(){return{eventName:"touchstart",fn:function(ti){if(!ti.defaultPrevented){var Oi=Se.findClosestDraggableId(ti);if(Oi){var Kr=Se.tryGetLock(Oi,Ht,{sourceEvent:ti});if(Kr){var no=ti.touches[0],vo=no.clientX,ko=no.clientY,na={x:vo,y:ko};ke.current(),Fn(Kr,na)}}}}}},[Se]),kt=An(function(){var ti={capture:!0,passive:!1};ke.current=Qn(window,[vt],ti)},[vt]),Ht=An(function(){var bn=Ce.current;bn.type!=="IDLE"&&(bn.type==="PENDING"&&clearTimeout(bn.longPressTimerId),yt($d),ke.current(),kt())},[kt,yt]),Cn=An(function(){var bn=Ce.current;Ht(),bn.type==="DRAGGING"&&bn.actions.cancel({shouldBlockNextClick:!0}),bn.type==="PENDING"&&bn.actions.abort()},[Ht]),Hn=An(function(){var ti={capture:!0,passive:!1},Oi={cancel:Cn,completed:Ht,getPhase:$e},Kr=Qn(window,Yc(Oi),ti),no=Qn(window,Sc(Oi),ti);ke.current=function(){Kr(),no()}},[Cn,$e,Ht]),Dn=An(function(){var ti=$e();ti.type!=="PENDING"&&kn(!1);var Oi=ti.actions.fluidLift(ti.point);yt({type:"DRAGGING",actions:Oi,hasMoved:!1})},[$e,yt]),Fn=An(function(ti,Oi){$e().type!=="IDLE"&&kn(!1);var Kr=setTimeout(Dn,cd);yt({type:"PENDING",point:Oi,actions:ti,longPressTimerId:Kr}),Hn()},[Hn,$e,yt,Dn]);vl(function(){return kt(),function(){ke.current();var Oi=$e();Oi.type==="PENDING"&&(clearTimeout(Oi.longPressTimerId),yt($d))}},[$e,kt,yt]),vl(function(){var ti=Qn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return ti},[])}function Gf(Se){}var $f={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Kd(Se,Ce){if(Ce==null)return!1;var ke=!!$f[Ce.tagName.toLowerCase()];if(ke)return!0;var $e=Ce.getAttribute("contenteditable");return $e==="true"||$e===""?!0:Ce===Se?!1:Kd(Se,Ce.parentElement)}function hg(Se,Ce){var ke=Ce.target;return $s(ke)?Kd(Se,ke):!1}var fg=function(Se){return dr(Se.getBoundingClientRect()).center};function gg(Se){return Se instanceof Wl(Se).Element}var Xc=function(){var Se="matches";if(typeof document=="undefined")return Se;var Ce=[Se,"msMatchesSelector","webkitMatchesSelector"],ke=Ar(Ce,function($e){return $e in Element.prototype});return ke||Se}();function pg(Se,Ce){return Se==null?null:Se[Xc](Ce)?Se:pg(Se.parentElement,Ce)}function mg(Se,Ce){return Se.closest?Se.closest(Ce):pg(Se,Ce)}function zh(Se){return"["+Gs.contextId+'="'+Se+'"]'}function yh(Se,Ce){var ke=Ce.target;if(!gg(ke))return null;var $e=zh(Se),yt=mg(ke,$e);return!yt||!$s(yt)?null:yt}function vg(Se,Ce){var ke=yh(Se,Ce);return ke?ke.getAttribute(Gs.draggableId):null}function Jc(Se,Ce){var ke="["+ml.contextId+'="'+Se+'"]',$e=xo(document.querySelectorAll(ke)),yt=Ar($e,function(vt){return vt.getAttribute(ml.id)===Ce});return!yt||!$s(yt)?null:yt}function yg(Se){Se.preventDefault()}function xh(Se){var Ce=Se.expected,ke=Se.phase,$e=Se.isLockActive,yt=Se.shouldWarn;return!(!$e()||Ce!==ke)}function xg(Se){var Ce=Se.lockAPI,ke=Se.store,$e=Se.registry,yt=Se.draggableId;if(Ce.isClaimed())return!1;var vt=$e.draggable.findById(yt);return!(!vt||!vt.options.isEnabled||!Ta(ke.getState(),yt))}function Sg(Se){var Ce=Se.lockAPI,ke=Se.contextId,$e=Se.store,yt=Se.registry,vt=Se.draggableId,kt=Se.forceSensorStop,Ht=Se.sourceEvent,Cn=xg({lockAPI:Ce,store:$e,registry:yt,draggableId:vt});if(!Cn)return null;var Hn=yt.draggable.getById(vt),Dn=Jc(ke,Hn.descriptor.id);if(!Dn||Ht&&!Hn.options.canDragInteractiveElements&&hg(Dn,Ht))return null;var Fn=Ce.claim(kt||zt),bn="PRE_DRAG";function ti(){return Hn.options.shouldRespectForcePress}function Oi(){return Ce.isActive(Fn)}function Kr(ls,Os){xh({expected:ls,phase:bn,isLockActive:Oi,shouldWarn:!0})&&$e.dispatch(Os())}var no=Kr.bind(null,"DRAGGING");function vo(ls){function Os(){Ce.release(),bn="COMPLETED"}bn!=="PRE_DRAG"&&(Os(),bn!=="PRE_DRAG"&&kn(!1)),$e.dispatch(Fr(ls.liftActionArgs)),bn="DRAGGING";function eu(As,Gl){if(Gl===void 0&&(Gl={shouldBlockNextClick:!1}),ls.cleanup(),Gl.shouldBlockNextClick){var _u=Qn(window,[{eventName:"click",fn:yg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(_u)}Os(),$e.dispatch(rc({reason:As}))}return(0,lt.Z)({isActive:function(){return xh({expected:"DRAGGING",phase:bn,isLockActive:Oi,shouldWarn:!1})},shouldRespectForcePress:ti,drop:function(Gl){return eu("DROP",Gl)},cancel:function(Gl){return eu("CANCEL",Gl)}},ls.actions)}function ko(ls){var Os=Gt(function(As){no(function(){return Sa({client:As})})}),eu=vo({liftActionArgs:{id:vt,clientSelection:ls,movementMode:"FLUID"},cleanup:function(){return Os.cancel()},actions:{move:Os}});return(0,lt.Z)({},eu,{move:Os})}function na(){var ls={moveUp:function(){return no(Oa)},moveRight:function(){return no(Dr)},moveDown:function(){return no(bl)},moveLeft:function(){return no(Ts)}};return vo({liftActionArgs:{id:vt,clientSelection:fg(Dn),movementMode:"SNAP"},cleanup:zt,actions:ls})}function qo(){var ls=xh({expected:"PRE_DRAG",phase:bn,isLockActive:Oi,shouldWarn:!0});ls&&Ce.release()}var Da={isActive:function(){return xh({expected:"PRE_DRAG",phase:bn,isLockActive:Oi,shouldWarn:!1})},shouldRespectForcePress:ti,fluidLift:ko,snapLift:na,abort:qo};return Da}var Pg=[Ll,cc,Wf];function Hp(Se){var Ce=Se.contextId,ke=Se.store,$e=Se.registry,yt=Se.customSensors,vt=Se.enableDefaultSensors,kt=[].concat(vt?Pg:[],yt||[]),Ht=(0,le.useState)(function(){return hh()})[0],Cn=An(function(ko,na){ko.isDragging&&!na.isDragging&&Ht.tryAbandon()},[Ht]);vl(function(){var ko=ke.getState(),na=ke.subscribe(function(){var qo=ke.getState();Cn(ko,qo),ko=qo});return na},[Ht,ke,Cn]),vl(function(){return Ht.tryAbandon},[Ht.tryAbandon]);var Hn=An(function(vo){return xg({lockAPI:Ht,registry:$e,store:ke,draggableId:vo})},[Ht,$e,ke]),Dn=An(function(vo,ko,na){return Sg({lockAPI:Ht,registry:$e,contextId:Ce,store:ke,draggableId:vo,forceSensorStop:ko,sourceEvent:na&&na.sourceEvent?na.sourceEvent:null})},[Ce,Ht,$e,ke]),Fn=An(function(vo){return vg(Ce,vo)},[Ce]),bn=An(function(vo){var ko=$e.draggable.findById(vo);return ko?ko.options:null},[$e.draggable]),ti=An(function(){Ht.isClaimed()&&(Ht.tryAbandon(),ke.getState().phase!=="IDLE"&&ke.dispatch(zo()))},[Ht,ke]),Oi=An(Ht.isClaimed,[Ht]),Kr=jn(function(){return{canGetLock:Hn,tryGetLock:Dn,findClosestDraggableId:Fn,findOptionsForDraggable:bn,tryReleaseLock:ti,isLockClaimed:Oi}},[Hn,Dn,Fn,bn,ti,Oi]);Gf(kt);for(var no=0;no<kt.length;no++)kt[no](Kr)}var qg=function(Ce){return{onBeforeCapture:Ce.onBeforeCapture,onBeforeDragStart:Ce.onBeforeDragStart,onDragStart:Ce.onDragStart,onDragEnd:Ce.onDragEnd,onDragUpdate:Ce.onDragUpdate}};function Vd(Se){return Se.current||kn(!1),Se.current}function Kf(Se){var Ce=Se.contextId,ke=Se.setCallbacks,$e=Se.sensors,yt=Se.nonce,vt=Se.dragHandleUsageInstructions,kt=(0,le.useRef)(null);dh();var Ht=Hd(Se),Cn=An(function(){return qg(Ht.current)},[Ht]),Hn=Ys(Ce),Dn=xc({contextId:Ce,text:vt}),Fn=Ms(Ce,yt),bn=An(function(As){Vd(kt).dispatch(As)},[]),ti=jn(function(){return(0,We.DE)({publishWhileDragging:Tr,updateDroppableScroll:gr,updateDroppableIsEnabled:Na,updateDroppableIsCombineEnabled:jo,collectionStarting:Rr},bn)},[bn]),Oi=sc(),Kr=jn(function(){return oo(Oi,ti)},[Oi,ti]),no=jn(function(){return Is((0,lt.Z)({scrollWindow:Va,scrollDroppable:Kr.scrollDroppable},(0,We.DE)({move:Sa},bn)))},[Kr.scrollDroppable,bn]),vo=$u(Ce),ko=jn(function(){return ka({announce:Hn,autoScroller:no,dimensionMarshal:Kr,focusMarshal:vo,getResponders:Cn,styleMarshal:Fn})},[Hn,no,Kr,vo,Cn,Fn]);kt.current=ko;var na=An(function(){var As=Vd(kt),Gl=As.getState();Gl.phase!=="IDLE"&&As.dispatch(zo())},[]),qo=An(function(){var As=Vd(kt).getState();return As.isDragging||As.phase==="DROP_ANIMATING"},[]),Da=jn(function(){return{isDragging:qo,tryAbort:na}},[qo,na]);ke(Da);var ls=An(function(As){return Ta(Vd(kt).getState(),As)},[]),Os=An(function(){return No(Vd(kt).getState())},[]),eu=jn(function(){return{marshal:Kr,focus:vo,contextId:Ce,canLift:ls,isMovementAllowed:Os,dragHandleUsageInstructionsId:Dn,registry:Oi}},[Ce,Kr,Dn,vo,ls,Os,Oi]);return Hp({contextId:Ce,store:ko,registry:Oi,customSensors:$e,enableDefaultSensors:Se.enableDefaultSensors!==!1}),(0,le.useEffect)(function(){return na},[na]),le.createElement(jd.Provider,{value:eu},le.createElement(de,{context:lc,store:ko},Se.children))}var gf=0;function ep(){gf=0}function Vf(){return jn(function(){return""+gf++},[])}function Sh(){ep(),ds()}function wg(Se){var Ce=Vf(),ke=Se.dragHandleUsageInstructions||Yr.dragHandleUsageInstructions;return le.createElement(zi,null,function($e){return le.createElement(Kf,{nonce:Se.nonce,contextId:Ce,setCallbacks:$e,dragHandleUsageInstructions:ke,enableDefaultSensors:Se.enableDefaultSensors,sensors:Se.sensors,onBeforeCapture:Se.onBeforeCapture,onBeforeDragStart:Se.onBeforeDragStart,onDragStart:Se.onDragStart,onDragUpdate:Se.onDragUpdate,onDragEnd:Se.onDragEnd},Se.children)})}var Ph=function(Ce){return function(ke){return Ce===ke}},tp=Ph("scroll"),Uf=Ph("auto"),np=Ph("visible"),Ls=function(Ce,ke){return ke(Ce.overflowX)||ke(Ce.overflowY)},Zh=function(Ce,ke){return ke(Ce.overflowX)&&ke(Ce.overflowY)},Ud=function(Ce){var ke=window.getComputedStyle(Ce),$e={overflowX:ke.overflowX,overflowY:ke.overflowY};return Ls($e,tp)||Ls($e,Uf)},iu=function(){return!1;var Ce,ke,$e,yt},Ru=function Se(Ce){return Ce==null?null:Ce===document.body?iu()?Ce:null:Ce===document.documentElement?null:Ud(Ce)?Ce:Se(Ce.parentElement)},Hh=function(Se){if(Se)var Ce=Ru(Se.parentElement)},wh=function(Se){return{x:Se.scrollLeft,y:Se.scrollTop}},Cg=function Se(Ce){if(!Ce)return!1;var ke=window.getComputedStyle(Ce);return ke.position==="fixed"?!0:Se(Ce.parentElement)},Eg=function(Se){var Ce=Ru(Se),ke=Cg(Se);return{closestScrollable:Ce,isFixedOnPage:ke}},bg=function(Se){var Ce=Se.descriptor,ke=Se.isEnabled,$e=Se.isCombineEnabled,yt=Se.isFixedOnPage,vt=Se.direction,kt=Se.client,Ht=Se.page,Cn=Se.closest,Hn=function(){if(!Cn)return null;var ti=Cn.scrollSize,Oi=Cn.client,Kr=co({scrollHeight:ti.scrollHeight,scrollWidth:ti.scrollWidth,height:Oi.paddingBox.height,width:Oi.paddingBox.width});return{pageMarginBox:Cn.page.marginBox,frameClient:Oi,scrollSize:ti,shouldClipSubject:Cn.shouldClipSubject,scroll:{initial:Cn.scroll,current:Cn.scroll,max:Kr,diff:{value:Qr,displacement:Qr}}}}(),Dn=vt==="vertical"?fi:Ba,Fn=Ko({page:Ht,withPlaceholder:null,axis:Dn,frame:Hn}),bn={descriptor:Ce,isCombineEnabled:$e,isFixedOnPage:yt,axis:Dn,isEnabled:ke,client:kt,page:Ht,frame:Hn,subject:Fn};return bn},Fg=function(Ce,ke){var $e=Pr(Ce);if(!ke||Ce!==ke)return $e;var yt=$e.paddingBox.top-ke.scrollTop,vt=$e.paddingBox.left-ke.scrollLeft,kt=yt+ke.scrollHeight,Ht=vt+ke.scrollWidth,Cn={top:yt,right:Ht,bottom:kt,left:vt},Hn=Mr(Cn,$e.border),Dn=Xi({borderBox:Hn,margin:$e.margin,border:$e.border,padding:$e.padding});return Dn},Bg=function(Se){var Ce=Se.ref,ke=Se.descriptor,$e=Se.env,yt=Se.windowScroll,vt=Se.direction,kt=Se.isDropDisabled,Ht=Se.isCombineEnabled,Cn=Se.shouldClipSubject,Hn=$e.closestScrollable,Dn=Fg(Ce,Hn),Fn=De(Dn,yt),bn=function(){if(!Hn)return null;var Oi=Pr(Hn),Kr={scrollHeight:Hn.scrollHeight,scrollWidth:Hn.scrollWidth};return{client:Oi,page:De(Oi,yt),scroll:wh(Hn),scrollSize:Kr,shouldClipSubject:Cn}}(),ti=bg({descriptor:ke,isEnabled:!kt,isCombineEnabled:Ht,isFixedOnPage:$e.isFixedOnPage,direction:vt,client:Dn,page:Fn,closest:bn});return ti},Yd={passive:!1},pf={passive:!0},Ld=function(Se){return Se.shouldPublishImmediately?Yd:pf};function Ks(Se){var Ce=(0,le.useContext)(Se);return Ce||kn(!1),Ce}var Ch=function(Ce){return Ce&&Ce.env.closestScrollable||null};function Mg(Se){var Ce=(0,le.useRef)(null),ke=Ks(jd),$e=xl("droppable"),yt=ke.registry,vt=ke.marshal,kt=Hd(Se),Ht=jn(function(){return{id:Se.droppableId,type:Se.type,mode:Se.mode}},[Se.droppableId,Se.mode,Se.type]),Cn=(0,le.useRef)(Ht),Hn=jn(function(){return Gn(function(qo,Da){Ce.current||kn(!1);var ls={x:qo,y:Da};vt.updateDroppableScroll(Ht.id,ls)})},[Ht.id,vt]),Dn=An(function(){var qo=Ce.current;return!qo||!qo.env.closestScrollable?Qr:wh(qo.env.closestScrollable)},[]),Fn=An(function(){var qo=Dn();Hn(qo.x,qo.y)},[Dn,Hn]),bn=jn(function(){return Gt(Fn)},[Fn]),ti=An(function(){var qo=Ce.current,Da=Ch(qo);qo&&Da||kn(!1);var ls=qo.scrollOptions;if(ls.shouldPublishImmediately){Fn();return}bn()},[bn,Fn]),Oi=An(function(qo,Da){Ce.current&&kn(!1);var ls=kt.current,Os=ls.getDroppableRef();Os||kn(!1);var eu=Eg(Os),As={ref:Os,descriptor:Ht,env:eu,scrollOptions:Da};Ce.current=As;var Gl=Bg({ref:Os,descriptor:Ht,env:eu,windowScroll:qo,direction:ls.direction,isDropDisabled:ls.isDropDisabled,isCombineEnabled:ls.isCombineEnabled,shouldClipSubject:!ls.ignoreContainerClipping}),_u=eu.closestScrollable;return _u&&(_u.setAttribute(js.contextId,ke.contextId),_u.addEventListener("scroll",ti,Ld(As.scrollOptions))),Gl},[ke.contextId,Ht,ti,kt]),Kr=An(function(){var qo=Ce.current,Da=Ch(qo);return qo&&Da||kn(!1),wh(Da)},[]),no=An(function(){var qo=Ce.current;qo||kn(!1);var Da=Ch(qo);Ce.current=null,Da&&(bn.cancel(),Da.removeAttribute(js.contextId),Da.removeEventListener("scroll",ti,Ld(qo.scrollOptions)))},[ti,bn]),vo=An(function(qo){var Da=Ce.current;Da||kn(!1);var ls=Ch(Da);ls||kn(!1),ls.scrollTop+=qo.y,ls.scrollLeft+=qo.x},[]),ko=jn(function(){return{getDimensionAndWatchScroll:Oi,getScrollWhileDragging:Kr,dragStopped:no,scroll:vo}},[no,Oi,Kr,vo]),na=jn(function(){return{uniqueId:$e,descriptor:Ht,callbacks:ko}},[ko,Ht,$e]);vl(function(){return Cn.current=na.descriptor,yt.droppable.register(na),function(){Ce.current&&no(),yt.droppable.unregister(na)}},[ko,Ht,no,na,vt,yt.droppable]),vl(function(){Ce.current&&vt.updateDroppableIsEnabled(Cn.current.id,!Se.isDropDisabled)},[Se.isDropDisabled,vt]),vl(function(){Ce.current&&vt.updateDroppableIsCombineEnabled(Cn.current.id,Se.isCombineEnabled)},[Se.isCombineEnabled,vt])}function Xd(){}var Eh={width:0,height:0,margin:$n},mf=function(Ce){var ke=Ce.isAnimatingOpenOnMount,$e=Ce.placeholder,yt=Ce.animate;return ke||yt==="close"?Eh:{height:$e.client.borderBox.height,width:$e.client.borderBox.width,margin:$e.client.margin}},ip=function(Ce){var ke=Ce.isAnimatingOpenOnMount,$e=Ce.placeholder,yt=Ce.animate,vt=mf({isAnimatingOpenOnMount:ke,placeholder:$e,animate:yt});return{display:$e.display,boxSizing:"border-box",width:vt.width,height:vt.height,marginTop:vt.margin.top,marginRight:vt.margin.right,marginBottom:vt.margin.bottom,marginLeft:vt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:yt!=="none"?su.placeholder:null}};function Jl(Se){var Ce=(0,le.useRef)(null),ke=An(function(){Ce.current&&(clearTimeout(Ce.current),Ce.current=null)},[]),$e=Se.animate,yt=Se.onTransitionEnd,vt=Se.onClose,kt=Se.contextId,Ht=(0,le.useState)(Se.animate==="open"),Cn=Ht[0],Hn=Ht[1];(0,le.useEffect)(function(){return Cn?$e!=="open"?(ke(),Hn(!1),Xd):Ce.current?Xd:(Ce.current=setTimeout(function(){Ce.current=null,Hn(!1)}),ke):Xd},[$e,Cn,ke]);var Dn=An(function(bn){bn.propertyName==="height"&&(yt(),$e==="close"&&vt())},[$e,vt,yt]),Fn=ip({isAnimatingOpenOnMount:Cn,animate:Se.animate,placeholder:Se.placeholder});return le.createElement(Se.placeholder.tagName,{style:Fn,"data-rbd-placeholder-context-id":kt,onTransitionEnd:Dn,ref:Se.innerRef})}var rp=le.memo(Jl),Jd=le.createContext(null);function dd(Se){Se&&$s(Se)||kn(!1)}function bh(Se){return typeof Se=="boolean"}function ie(Se,Ce){Ce.forEach(function(ke){return ke(Se)})}var ae=[function(Ce){var ke=Ce.props;ke.droppableId||kn(!1),typeof ke.droppableId!="string"&&kn(!1)},function(Ce){var ke=Ce.props;bh(ke.isDropDisabled)||kn(!1),bh(ke.isCombineEnabled)||kn(!1),bh(ke.ignoreContainerClipping)||kn(!1)},function(Ce){var ke=Ce.getDroppableRef;dd(ke())}],ge=[function(Ce){var ke=Ce.props,$e=Ce.getPlaceholderRef;if(ke.placeholder)var yt=$e()}],fe=[function(Ce){var ke=Ce.props;ke.renderClone||kn(!1)},function(Ce){var ke=Ce.getPlaceholderRef;ke()&&kn(!1)}];function ye(Se){Ml(function(){ie(Se,ae),Se.props.mode==="standard"&&ie(Se,ge),Se.props.mode==="virtual"&&ie(Se,fe)})}var Re=function(Se){He(Ce,Se);function Ce(){for(var $e,yt=arguments.length,vt=new Array(yt),kt=0;kt<yt;kt++)vt[kt]=arguments[kt];return $e=Se.call.apply(Se,[this].concat(vt))||this,$e.state={isVisible:!!$e.props.on,data:$e.props.on,animate:$e.props.shouldAnimate&&$e.props.on?"open":"none"},$e.onClose=function(){$e.state.animate==="close"&&$e.setState({isVisible:!1})},$e}Ce.getDerivedStateFromProps=function(yt,vt){return yt.shouldAnimate?yt.on?{isVisible:!0,data:yt.on,animate:"open"}:vt.isVisible?{isVisible:!0,data:vt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!yt.on,data:yt.on,animate:"none"}};var ke=Ce.prototype;return ke.render=function(){if(!this.state.isVisible)return null;var yt={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(yt)},Ce}(le.PureComponent),Ye={dragging:5e3,dropAnimating:4500},pt=function(Ce,ke){return ke?su.drop(ke.duration):Ce?su.snap:su.fluid},ft=function(Ce,ke){return Ce?ke?ac.opacity.drop:ac.opacity.combining:null},jt=function(Ce){return Ce.forceShouldAnimate!=null?Ce.forceShouldAnimate:Ce.mode==="SNAP"};function Mn(Se){var Ce=Se.dimension,ke=Ce.client,$e=Se.offset,yt=Se.combineWith,vt=Se.dropping,kt=!!yt,Ht=jt(Se),Cn=!!vt,Hn=Cn?Au.drop($e,kt):Au.moveTo($e),Dn={position:"fixed",top:ke.marginBox.top,left:ke.marginBox.left,boxSizing:"border-box",width:ke.borderBox.width,height:ke.borderBox.height,transition:pt(Ht,vt),transform:Hn,opacity:ft(kt,Cn),zIndex:Cn?Ye.dropAnimating:Ye.dragging,pointerEvents:"none"};return Dn}function Ut(Se){return{transform:Au.moveTo(Se.offset),transition:Se.shouldAnimateDisplacement?null:"none"}}function oi(Se){return Se.type==="DRAGGING"?Mn(Se):Ut(Se)}function ni(Se,Ce,ke){ke===void 0&&(ke=Qr);var $e=window.getComputedStyle(Ce),yt=Ce.getBoundingClientRect(),vt=Ei(yt,$e),kt=De(vt,ke),Ht={client:vt,tagName:Ce.tagName.toLowerCase(),display:$e.display},Cn={x:vt.marginBox.width,y:vt.marginBox.height},Hn={descriptor:Se,placeholder:Ht,displaceBy:Cn,client:vt,page:kt};return Hn}function ir(Se){var Ce=xl("draggable"),ke=Se.descriptor,$e=Se.registry,yt=Se.getDraggableRef,vt=Se.canDragInteractiveElements,kt=Se.shouldRespectForcePress,Ht=Se.isEnabled,Cn=jn(function(){return{canDragInteractiveElements:vt,shouldRespectForcePress:kt,isEnabled:Ht}},[vt,Ht,kt]),Hn=An(function(ti){var Oi=yt();return Oi||kn(!1),ni(ke,Oi,ti)},[ke,yt]),Dn=jn(function(){return{uniqueId:Ce,descriptor:ke,options:Cn,getDimension:Hn}},[ke,Hn,Cn,Ce]),Fn=(0,le.useRef)(Dn),bn=(0,le.useRef)(!0);vl(function(){return $e.draggable.register(Fn.current),function(){return $e.draggable.unregister(Fn.current)}},[$e.draggable]),vl(function(){if(bn.current){bn.current=!1;return}var ti=Fn.current;Fn.current=Dn,$e.draggable.update(Dn,ti)},[Dn,$e.draggable])}function cr(Se,Ce,ke){Ml(function(){function $e(vt){return"Draggable[id: "+vt+"]: "}var yt=Se.draggableId;yt||kn(!1),typeof yt!="string"&&kn(!1),la(Se.index)||kn(!1),Se.mapped.type!=="DRAGGING"&&(dd(ke()),Se.isEnabled&&(zs(Ce,yt)||kn(!1)))})}function Br(Se){}function ao(Se){Se.preventDefault()}function Ho(Se){var Ce=(0,le.useRef)(null),ke=An(function(As){Ce.current=As},[]),$e=An(function(){return Ce.current},[]),yt=Ks(jd),vt=yt.contextId,kt=yt.dragHandleUsageInstructionsId,Ht=yt.registry,Cn=Ks(Jd),Hn=Cn.type,Dn=Cn.droppableId,Fn=jn(function(){return{id:Se.draggableId,index:Se.index,type:Hn,droppableId:Dn}},[Se.draggableId,Se.index,Hn,Dn]),bn=Se.children,ti=Se.draggableId,Oi=Se.isEnabled,Kr=Se.shouldRespectForcePress,no=Se.canDragInteractiveElements,vo=Se.isClone,ko=Se.mapped,na=Se.dropAnimationFinished;if(cr(Se,vt,$e),Br(vo),!vo){var qo=jn(function(){return{descriptor:Fn,registry:Ht,getDraggableRef:$e,canDragInteractiveElements:no,shouldRespectForcePress:Kr,isEnabled:Oi}},[Fn,Ht,$e,no,Kr,Oi]);ir(qo)}var Da=jn(function(){return Oi?{tabIndex:0,role:"button","aria-describedby":kt,"data-rbd-drag-handle-draggable-id":ti,"data-rbd-drag-handle-context-id":vt,draggable:!1,onDragStart:ao}:null},[vt,kt,ti,Oi]),ls=An(function(As){ko.type==="DRAGGING"&&ko.dropping&&As.propertyName==="transform"&&na()},[na,ko]),Os=jn(function(){var As=oi(ko),Gl=ko.type==="DRAGGING"&&ko.dropping?ls:null,_u={innerRef:ke,draggableProps:{"data-rbd-draggable-context-id":vt,"data-rbd-draggable-id":ti,style:As,onTransitionEnd:Gl},dragHandleProps:Da};return _u},[vt,Da,ti,ko,ls,ke]),eu=jn(function(){return{draggableId:Fn.id,type:Fn.type,source:{index:Fn.index,droppableId:Fn.droppableId}}},[Fn.droppableId,Fn.id,Fn.index,Fn.type]);return bn(Os,ko.snapshot,eu)}var Bo=function(Se,Ce){return Se===Ce},ea=function(Se){var Ce=Se.combine,ke=Se.destination;return ke?ke.droppableId:Ce?Ce.droppableId:null},_a=function(Ce){return Ce.combine?Ce.combine.draggableId:null},Mo=function(Ce){return Ce.at&&Ce.at.type==="COMBINE"?Ce.at.combine.draggableId:null};function ns(){var Se=Gn(function(yt,vt){return{x:yt,y:vt}}),Ce=Gn(function(yt,vt,kt,Ht,Cn){return{isDragging:!0,isClone:vt,isDropAnimating:!!Cn,dropAnimation:Cn,mode:yt,draggingOver:kt,combineWith:Ht,combineTargetFor:null}}),ke=Gn(function(yt,vt,kt,Ht,Cn,Hn,Dn){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Cn,combineWith:Hn,mode:vt,offset:yt,dimension:kt,forceShouldAnimate:Dn,snapshot:Ce(vt,Ht,Cn,Hn,null)}}}),$e=function(vt,kt){if(vt.isDragging){if(vt.critical.draggable.id!==kt.draggableId)return null;var Ht=vt.current.client.offset,Cn=vt.dimensions.draggables[kt.draggableId],Hn=Uo(vt.impact),Dn=Mo(vt.impact),Fn=vt.forceShouldAnimate;return ke(Se(Ht.x,Ht.y),vt.movementMode,Cn,kt.isClone,Hn,Dn,Fn)}if(vt.phase==="DROP_ANIMATING"){var bn=vt.completed;if(bn.result.draggableId!==kt.draggableId)return null;var ti=kt.isClone,Oi=vt.dimensions.draggables[kt.draggableId],Kr=bn.result,no=Kr.mode,vo=ea(Kr),ko=_a(Kr),na=vt.dropDuration,qo={duration:na,curve:Rc.drop,moveTo:vt.newHomeClientOffset,opacity:ko?ac.opacity.drop:null,scale:ko?ac.scale.drop:null};return{mapped:{type:"DRAGGING",offset:vt.newHomeClientOffset,dimension:Oi,dropping:qo,draggingOver:vo,combineWith:ko,mode:no,forceShouldAnimate:null,snapshot:Ce(no,ti,vo,ko,qo)}}}return null};return $e}function rl(Se){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:Se,combineWith:null}}var ru={mapped:{type:"SECONDARY",offset:Qr,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:rl(null)}};function Sl(){var Se=Gn(function(kt,Ht){return{x:kt,y:Ht}}),Ce=Gn(rl),ke=Gn(function(kt,Ht,Cn){return Ht===void 0&&(Ht=null),{mapped:{type:"SECONDARY",offset:kt,combineTargetFor:Ht,shouldAnimateDisplacement:Cn,snapshot:Ce(Ht)}}}),$e=function(Ht){return Ht?ke(Qr,Ht,!0):null},yt=function(Ht,Cn,Hn,Dn){var Fn=Hn.displaced.visible[Ht],bn=!!(Dn.inVirtualList&&Dn.effected[Ht]),ti=xs(Hn),Oi=ti&&ti.draggableId===Ht?Cn:null;if(!Fn){if(!bn)return $e(Oi);if(Hn.displaced.invisible[Ht])return null;var Kr=mr(Dn.displacedBy.point),no=Se(Kr.x,Kr.y);return ke(no,Oi,!0)}if(bn)return $e(Oi);var vo=Hn.displacedBy.point,ko=Se(vo.x,vo.y);return ke(ko,Oi,Fn.shouldAnimate)},vt=function(Ht,Cn){if(Ht.isDragging)return Ht.critical.draggable.id===Cn.draggableId?null:yt(Cn.draggableId,Ht.critical.draggable.id,Ht.impact,Ht.afterCritical);if(Ht.phase==="DROP_ANIMATING"){var Hn=Ht.completed;return Hn.result.draggableId===Cn.draggableId?null:yt(Cn.draggableId,Hn.result.draggableId,Hn.impact,Hn.afterCritical)}return null};return vt}var Uu=function(){var Ce=ns(),ke=Sl(),$e=function(vt,kt){return Ce(vt,kt)||ke(vt,kt)||ru};return $e},wu={dropAnimationFinished:Tc},Ql=Qe(Uu,wu,null,{context:lc,pure:!0,areStatePropsEqual:Bo})(Ho);function Yu(Se){var Ce=Ks(Jd),ke=Ce.isUsingCloneFor;return ke===Se.draggableId&&!Se.isClone?null:le.createElement(Ql,Se)}function hu(Se){var Ce=typeof Se.isDragDisabled=="boolean"?!Se.isDragDisabled:!0,ke=!!Se.disableInteractiveElementBlocking,$e=!!Se.shouldRespectForcePress;return le.createElement(Yu,(0,lt.Z)({},Se,{isClone:!1,isEnabled:Ce,canDragInteractiveElements:ke,shouldRespectForcePress:$e}))}function ql(Se){var Ce=(0,le.useContext)(jd);Ce||kn(!1);var ke=Ce.contextId,$e=Ce.isMovementAllowed,yt=(0,le.useRef)(null),vt=(0,le.useRef)(null),kt=Se.children,Ht=Se.droppableId,Cn=Se.type,Hn=Se.mode,Dn=Se.direction,Fn=Se.ignoreContainerClipping,bn=Se.isDropDisabled,ti=Se.isCombineEnabled,Oi=Se.snapshot,Kr=Se.useClone,no=Se.updateViewportMaxScroll,vo=Se.getContainerForClone,ko=An(function(){return yt.current},[]),na=An(function(Xu){yt.current=Xu},[]),qo=An(function(){return vt.current},[]),Da=An(function(Xu){vt.current=Xu},[]);ye({props:Se,getDroppableRef:ko,getPlaceholderRef:qo});var ls=An(function(){$e()&&no({maxScroll:Fo()})},[$e,no]);Mg({droppableId:Ht,type:Cn,mode:Hn,direction:Dn,isDropDisabled:bn,isCombineEnabled:ti,ignoreContainerClipping:Fn,getDroppableRef:ko});var Os=le.createElement(Re,{on:Se.placeholder,shouldAnimate:Se.shouldAnimatePlaceholder},function(Xu){var hd=Xu.onClose,Lc=Xu.data,wc=Xu.animate;return le.createElement(rp,{placeholder:Lc,onClose:hd,innerRef:Da,animate:wc,contextId:ke,onTransitionEnd:ls})}),eu=jn(function(){return{innerRef:na,placeholder:Os,droppableProps:{"data-rbd-droppable-id":Ht,"data-rbd-droppable-context-id":ke}}},[ke,Ht,Os,na]),As=Kr?Kr.dragging.draggableId:null,Gl=jn(function(){return{droppableId:Ht,type:Cn,isUsingCloneFor:As}},[Ht,As,Cn]);function _u(){if(!Kr)return null;var Xu=Kr.dragging,hd=Kr.render,Lc=le.createElement(Yu,{draggableId:Xu.draggableId,index:Xu.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(wc,gu){return hd(wc,gu,Xu)});return Vn.createPortal(Lc,vo())}return le.createElement(Jd.Provider,{value:Gl},kt(eu,Oi),_u())}var Ns=function(Ce,ke){return Ce===ke.droppable.type},Pl=function(Ce,ke){return ke.draggables[Ce.draggable.id]},uu=function(){var Ce={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},ke=(0,lt.Z)({},Ce,{shouldAnimatePlaceholder:!1}),$e=Gn(function(kt){return{draggableId:kt.id,type:kt.type,source:{index:kt.index,droppableId:kt.droppableId}}}),yt=Gn(function(kt,Ht,Cn,Hn,Dn,Fn){var bn=Dn.descriptor.id,ti=Dn.descriptor.droppableId===kt;if(ti){var Oi=Fn?{render:Fn,dragging:$e(Dn.descriptor)}:null,Kr={isDraggingOver:Cn,draggingOverWith:Cn?bn:null,draggingFromThisWith:bn,isUsingPlaceholder:!0};return{placeholder:Dn.placeholder,shouldAnimatePlaceholder:!1,snapshot:Kr,useClone:Oi}}if(!Ht)return ke;if(!Hn)return Ce;var no={isDraggingOver:Cn,draggingOverWith:bn,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:Dn.placeholder,shouldAnimatePlaceholder:!0,snapshot:no,useClone:null}}),vt=function(Ht,Cn){var Hn=Cn.droppableId,Dn=Cn.type,Fn=!Cn.isDropDisabled,bn=Cn.renderClone;if(Ht.isDragging){var ti=Ht.critical;if(!Ns(Dn,ti))return ke;var Oi=Pl(ti,Ht.dimensions),Kr=Uo(Ht.impact)===Hn;return yt(Hn,Fn,Kr,Kr,Oi,bn)}if(Ht.phase==="DROP_ANIMATING"){var no=Ht.completed;if(!Ns(Dn,no.critical))return ke;var vo=Pl(no.critical,Ht.dimensions);return yt(Hn,Fn,ea(no.result)===Hn,Uo(no.impact)===Hn,vo,bn)}if(Ht.phase==="IDLE"&&Ht.completed&&!Ht.shouldFlush){var ko=Ht.completed;if(!Ns(Dn,ko.critical))return ke;var na=Uo(ko.impact)===Hn,qo=!!(ko.impact.at&&ko.impact.at.type==="COMBINE"),Da=ko.critical.droppable.id===Hn;return na?qo?Ce:ke:Da?Ce:ke}return ke};return vt},fu={updateViewportMaxScroll:So};function jc(){return document.body||kn(!1),document.body}var wl={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:jc},Pc=Qe(uu,fu,null,{context:lc,pure:!0,areStatePropsEqual:Bo})(ql);Pc.defaultProps=wl},38486:function(Tn,xn){"use strict";var me;var le=60103,Te=60106,He=60107,lt=60108,We=60114,Ve=60109,Le=60110,Ct=60112,xt=60113,Ue=60120,bt=60115,at=60116,mt=60121,Oe=60122,te=60117,ee=60129,de=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;le=se("react.element"),Te=se("react.portal"),He=se("react.fragment"),lt=se("react.strict_mode"),We=se("react.profiler"),Ve=se("react.provider"),Le=se("react.context"),Ct=se("react.forward_ref"),xt=se("react.suspense"),Ue=se("react.suspense_list"),bt=se("react.memo"),at=se("react.lazy"),mt=se("react.block"),Oe=se("react.server.block"),te=se("react.fundamental"),ee=se("react.debug_trace_mode"),de=se("react.legacy_hidden")}function he(Mt){if(typeof Mt=="object"&&Mt!==null){var ot=Mt.$$typeof;switch(ot){case le:switch(Mt=Mt.type,Mt){case He:case We:case lt:case xt:case Ue:return Mt;default:switch(Mt=Mt&&Mt.$$typeof,Mt){case Le:case Ct:case at:case bt:case Ve:return Mt;default:return ot}}case Te:return ot}}}var ve=Ve,Ee=le,Me=Ct,Be=He,je=at,_e=bt,Je=Te,Xe=We,ht=lt,Ze=xt;me=Le,me=ve,me=Ee,me=Me,me=Be,me=je,me=_e,me=Je,me=Xe,me=ht,me=Ze,me=function(){return!1},me=function(){return!1},xn.isContextConsumer=function(Mt){return he(Mt)===Le},me=function(Mt){return he(Mt)===Ve},me=function(Mt){return typeof Mt=="object"&&Mt!==null&&Mt.$$typeof===le},me=function(Mt){return he(Mt)===Ct},me=function(Mt){return he(Mt)===He},me=function(Mt){return he(Mt)===at},me=function(Mt){return he(Mt)===bt},me=function(Mt){return he(Mt)===Te},me=function(Mt){return he(Mt)===We},me=function(Mt){return he(Mt)===lt},me=function(Mt){return he(Mt)===xt},me=function(Mt){return typeof Mt=="string"||typeof Mt=="function"||Mt===He||Mt===We||Mt===ee||Mt===lt||Mt===xt||Mt===Ue||Mt===de||typeof Mt=="object"&&Mt!==null&&(Mt.$$typeof===at||Mt.$$typeof===bt||Mt.$$typeof===Ve||Mt.$$typeof===Le||Mt.$$typeof===Ct||Mt.$$typeof===te||Mt.$$typeof===mt||Mt[0]===Oe)},me=he},53410:function(Tn,xn,me){"use strict";Tn.exports=me(38486)},32637:function(Tn,xn,me){"use strict";Tn.exports=me.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(Tn){"use strict";Tn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},73631:function(Tn){"use strict";Tn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},31328:function(Tn){"use strict";Tn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAodJREFUOBGtU0trFEEQ/qZnM5NsWBCfSEjwQdSggmAieAv4uOnFg5eIXgTvEY+ePJqToDf9AcZDFAUF8SgEQUxAjC6+QlhX4xo0G93ZnRnr697umSyKBCyY/aqqq76q6uoF/rN4lu/BmzSsLGFM7P4kAZQCiBTR64nCw/MHvRnj+fuvI7zxtDWJJD1lQulO5TPHnkAqpuAUFKZUqg8da8xI35+/cMh77AjHJ5cakh/oqHa2ZhGHpSb+STxJZA3lqesFG1CuLAdsqLfbb/dlTwQ7GdmG9VGVBuoNfT/nHGHUSnByeAN2binmmDK1gyM7aGvl6gruPvtadCOfvVlxN0PFjsF4qxMptjl7BflirsPAVxJoQjy5eUMqq6bkMgbWF7C4HGMlsnRmZE82xtEdYSwGnRTuhCvVqG3T8bGhHpweKaFWj3HpzqI7Z16SmHxHmKbcVE7yBs+k1uBm8wh6Q4VQJvrZMkEp98EGBB2h3pFUMWJmPLKniKGtXZhZiLC/L8CLhQbmqhHefmmi3pRYOwInY65gRiiM+ZEP9Ic4c7ik+Ye3dePK/W94/bmpbVNO4u2S2rmrOmRvtkEmlHraC9EUgEzo/optVwZM4IiCLivR1WhywwrT75p4WYlkqhTT7xs4vreIke2h3KWHTaUClC/ZnsR3fOTWMnarZi/QulYhr2l0MMDorhA7NhbwodbC5Xs/9FT5d+s6lJJSzHxWJ9ov9Xw8KceYX9LrQ9+6LF6pgs4luqVIIl+G69gp0id1tk+8/byJ77+AV9UEiRTJMnQMOYycuPZpNuhS+7TF+fgkiBSr55+J9eXOm1E86wjpPzrx8aI8hd3U1yryrOcejQ9cXWveP+N/A79g8eaXNDk4AAAAAElFTkSuQmCC"},96908:function(Tn){"use strict";Tn.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(Tn){"use strict";Tn.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(Tn){"use strict";Tn.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(Tn,xn,me){"use strict";me.d(xn,{Z:function(){return Ct}});const le=xt=>typeof xt=="object"&&xt!=null&&xt.nodeType===1,Te=(xt,Ue)=>(!Ue||xt!=="hidden")&&xt!=="visible"&&xt!=="clip",He=(xt,Ue)=>{if(xt.clientHeight<xt.scrollHeight||xt.clientWidth<xt.scrollWidth){const bt=getComputedStyle(xt,null);return Te(bt.overflowY,Ue)||Te(bt.overflowX,Ue)||(at=>{const mt=(Oe=>{if(!Oe.ownerDocument||!Oe.ownerDocument.defaultView)return null;try{return Oe.ownerDocument.defaultView.frameElement}catch(te){return null}})(at);return!!mt&&(mt.clientHeight<at.scrollHeight||mt.clientWidth<at.scrollWidth)})(xt)}return!1},lt=(xt,Ue,bt,at,mt,Oe,te,ee)=>Oe<xt&&te>Ue||Oe>xt&&te<Ue?0:Oe<=xt&&ee<=bt||te>=Ue&&ee>=bt?Oe-xt-at:te>Ue&&ee<bt||Oe<xt&&ee>bt?te-Ue+mt:0,We=xt=>{const Ue=xt.parentElement;return Ue==null?xt.getRootNode().host||null:Ue},Ve=(xt,Ue)=>{var bt,at,mt,Oe;if(typeof document=="undefined")return[];const{scrollMode:te,block:ee,inline:de,boundary:se,skipOverflowHiddenElements:he}=Ue,ve=typeof se=="function"?se:Pn=>Pn!==se;if(!le(xt))throw new TypeError("Invalid target");const Ee=document.scrollingElement||document.documentElement,Me=[];let Be=xt;for(;le(Be)&&ve(Be);){if(Be=We(Be),Be===Ee){Me.push(Be);break}Be!=null&&Be===document.body&&He(Be)&&!He(document.documentElement)||Be!=null&&He(Be,he)&&Me.push(Be)}const je=(at=(bt=window.visualViewport)==null?void 0:bt.width)!=null?at:innerWidth,_e=(Oe=(mt=window.visualViewport)==null?void 0:mt.height)!=null?Oe:innerHeight,{scrollX:Je,scrollY:Xe}=window,{height:ht,width:Ze,top:Mt,right:ot,bottom:Ot,left:Pt}=xt.getBoundingClientRect(),{top:Dt,right:Wt,bottom:Lt,left:qe}=(Pn=>{const _t=window.getComputedStyle(Pn);return{top:parseFloat(_t.scrollMarginTop)||0,right:parseFloat(_t.scrollMarginRight)||0,bottom:parseFloat(_t.scrollMarginBottom)||0,left:parseFloat(_t.scrollMarginLeft)||0}})(xt);let Ke=ee==="start"||ee==="nearest"?Mt-Dt:ee==="end"?Ot+Lt:Mt+ht/2-Dt+Lt,Rt=de==="center"?Pt+Ze/2-qe+Wt:de==="end"?ot+Wt:Pt-qe;const Sn=[];for(let Pn=0;Pn<Me.length;Pn++){const _t=Me[Pn],{height:rn,width:ln,top:Wn,right:un,bottom:_n,left:St}=_t.getBoundingClientRect();if(te==="if-needed"&&Mt>=0&&Pt>=0&&Ot<=_e&&ot<=je&&(_t===Ee&&!He(_t)||Mt>=Wn&&Ot<=_n&&Pt>=St&&ot<=un))return Sn;const Zn=getComputedStyle(_t),li=parseInt(Zn.borderLeftWidth,10),Ge=parseInt(Zn.borderTopWidth,10),be=parseInt(Zn.borderRightWidth,10),Pe=parseInt(Zn.borderBottomWidth,10);let Ae=0,Ne=0;const xe="offsetWidth"in _t?_t.offsetWidth-_t.clientWidth-li-be:0,ut="offsetHeight"in _t?_t.offsetHeight-_t.clientHeight-Ge-Pe:0,Bt="offsetWidth"in _t?_t.offsetWidth===0?0:ln/_t.offsetWidth:0,Qe="offsetHeight"in _t?_t.offsetHeight===0?0:rn/_t.offsetHeight:0;if(Ee===_t)Ae=ee==="start"?Ke:ee==="end"?Ke-_e:ee==="nearest"?lt(Xe,Xe+_e,_e,Ge,Pe,Xe+Ke,Xe+Ke+ht,ht):Ke-_e/2,Ne=de==="start"?Rt:de==="center"?Rt-je/2:de==="end"?Rt-je:lt(Je,Je+je,je,li,be,Je+Rt,Je+Rt+Ze,Ze),Ae=Math.max(0,Ae+Xe),Ne=Math.max(0,Ne+Je);else{Ae=ee==="start"?Ke-Wn-Ge:ee==="end"?Ke-_n+Pe+ut:ee==="nearest"?lt(Wn,_n,rn,Ge,Pe+ut,Ke,Ke+ht,ht):Ke-(Wn+rn/2)+ut/2,Ne=de==="start"?Rt-St-li:de==="center"?Rt-(St+ln/2)+xe/2:de==="end"?Rt-un+be+xe:lt(St,un,ln,li,be+xe,Rt,Rt+Ze,Ze);const{scrollLeft:it,scrollTop:Ft}=_t;Ae=Qe===0?0:Math.max(0,Math.min(Ft+Ae/Qe,_t.scrollHeight-rn/Qe+ut)),Ne=Bt===0?0:Math.max(0,Math.min(it+Ne/Bt,_t.scrollWidth-ln/Bt+xe)),Ke+=Ft-Ae,Rt+=it-Ne}Sn.push({el:_t,top:Ae,left:Ne})}return Sn},Le=xt=>xt===!1?{block:"end",inline:"nearest"}:(Ue=>Ue===Object(Ue)&&Object.keys(Ue).length!==0)(xt)?xt:{block:"start",inline:"nearest"};function Ct(xt,Ue){if(!xt.isConnected||!(mt=>{let Oe=mt;for(;Oe&&Oe.parentNode;){if(Oe.parentNode===document)return!0;Oe=Oe.parentNode instanceof ShadowRoot?Oe.parentNode.host:Oe.parentNode}return!1})(xt))return;const bt=(mt=>{const Oe=window.getComputedStyle(mt);return{top:parseFloat(Oe.scrollMarginTop)||0,right:parseFloat(Oe.scrollMarginRight)||0,bottom:parseFloat(Oe.scrollMarginBottom)||0,left:parseFloat(Oe.scrollMarginLeft)||0}})(xt);if((mt=>typeof mt=="object"&&typeof mt.behavior=="function")(Ue))return Ue.behavior(Ve(xt,Ue));const at=typeof Ue=="boolean"||Ue==null?void 0:Ue.behavior;for(const{el:mt,top:Oe,left:te}of Ve(xt,Le(Ue))){const ee=Oe-bt.top+bt.bottom,de=te-bt.left+bt.right;mt.scroll({top:ee,left:de,behavior:at})}}}}]);
|