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

1402 lines
2.6 MiB

This file contains ambiguous Unicode characters!

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

(self.webpackChunk=self.webpackChunk||[]).push([[5816],{89489:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},59477:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},40001:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},49198:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},87169:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},73331:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},15277:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},52671:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},8657:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},56082:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},33853:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},12893:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},15075:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},32134:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},43531:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},61485:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},38819:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},47472:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Ge,ut){return Te.createElement(We.Z,(0,le.Z)({},Ge,{ref:ut,icon:st}))},Me=Te.forwardRef(ct),bt=Me},37036:function(){"use strict"},88010:function(_n,yn){"use strict";yn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},43809:function(_n,yn){"use strict";yn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},42678:function(_n,yn,me){"use strict";var le=me(59301),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ct=(Pt,Ge,ut)=>Ge in Pt?Te(Pt,Ge,{enumerable:!0,configurable:!0,writable:!0,value:ut}):Pt[Ge]=ut,Me=(Pt,Ge)=>{for(var ut in Ge||(Ge={}))st.call(Ge,ut)&&ct(Pt,ut,Ge[ut]);if(He)for(var ut of He(Ge))We.call(Ge,ut)&&ct(Pt,ut,Ge[ut]);return Pt};const bt=Pt=>React.createElement("svg",Me({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},Pt),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"})));yn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},74413:function(){"use strict";function _n(De,te,ee,ce){ee===void 0&&(ee=0),ce===void 0&&(ce=1/0),this._name=De,this._defaultValue=te,this._minimum=ee,this._maximum=ce}Object.defineProperty(_n.prototype,"name",{get:function(){return this._name},set:function(De){if(typeof De!="string"||De==="")throw new Error("Shape name must be a valid string.");this._name=De}}),Object.defineProperty(_n.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(De){if(typeof De!="number"||isNaN(De))throw new Error("The default value must be a real number, not: "+De);this._defaultValue=De}}),Object.defineProperty(_n.prototype,"minimum",{get:function(){return this._minimum},set:function(De){if(typeof De!="number"||isNaN(De))throw new Error("Minimum must be a real number, not: "+De);this._minimum=De}}),Object.defineProperty(_n.prototype,"maximum",{get:function(){return this._maximum},set:function(De){if(typeof De!="number"||isNaN(De))throw new Error("Maximum must be a real number, not: "+De);this._maximum=De}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(De,te){var ee=go.Shape._FigureParameters[De];return ee?ee[te]:null},go.Shape.setFigureParameter=function(De,te,ee){if(!(ee instanceof _n))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var ce=go.Shape._FigureParameters[De];ce||(ce=[],go.Shape._FigureParameters[De]=ce),ce[te]=ee};var yn=[];function me(De,te){var ee=yn.pop();return ee===void 0?new go.Point(De,te):(ee.x=De,ee.y=te,ee)}function le(){var De=yn.pop();return De===void 0?new go.Point:De}function Te(De){yn.push(De)}function He(De,te,ee,ce,se,he,ve,Ee,Le){Le||(Le=new go.Point);var Ne=De-ee,je=se-ve,ze=NaN,Ye=NaN;if(Ne===0)if(je===0)De===ee&&(ze=De,Ye=te);else{var Xe=(he-Ee)/je,lt=he-Xe*se;ze=De,Ye=Xe*ze+lt}else if(je===0){var Ze=(te-ce)/Ne,Lt=te-Ze*De;ze=se,Ye=Ze*ze+Lt}else{var Ze=(te-ce)/Ne,Xe=(he-Ee)/je,Lt=te-Ze*De,lt=he-Xe*se;ze=(lt-Lt)/(Ze-Xe),Ye=Ze*ze+Lt}return Le.x=ze,Le.y=Ye,Le}function st(De,te,ee,ce,se,he,ve,Ee,Le,Ne,je,ze,Ye,Xe){var lt=1-Le,Ze=Le,Lt=De*lt+ee*Ze,rt=te*lt+ce*Ze,Ot=ee*lt+se*Ze,wt=ce*lt+he*Ze,Dt=se*lt+ve*Ze,Wt=he*lt+Ee*Ze,Mt=Lt*lt+Ot*Ze,et=rt*lt+wt*Ze,Ue=Ot*lt+Dt*Ze,Rt=wt*lt+Wt*Ze,Pn=Mt*lt+Ue*Ze,xn=et*lt+Rt*Ze;Ne.x=Lt,Ne.y=rt,je.x=Mt,je.y=et,ze.x=Pn,ze.y=xn,Ye.x=Ue,Ye.y=Rt,Xe.x=Dt,Xe.y=Wt}var We=new go.Spot(.156,.156),ct=new go.Spot(.844,.844),Me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new _n("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(De,te,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=5),ce=Math.min(ce,te/3),ce=Math.min(ce,ee/3);var se=ce*Me,he=new go.Geometry().add(new go.PathFigure(ce,0,!0).add(new go.PathSegment(go.PathSegment.Line,te-ce,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,ce,te-se,0,te,se)).add(new go.PathSegment(go.PathSegment.Line,te,ee-ce)).add(new go.PathSegment(go.PathSegment.Bezier,te-ce,ee,te,ee-se,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,ce,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,ce)).add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,se,se,0).close()));return se>1&&(he.spot1=new go.Spot(0,0,se,se),he.spot2=new go.Spot(1,1,-se,-se)),he}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(De,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(De,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(De,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(De,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(De,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(De,te,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=0,ce.startY=ee/2,ce.endX=te,ce.endY=ee/2,ce}),go.Shape.defineFigureGenerator("LineV",function(De,te,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=te/2,ce.startY=0,ce.endX=te/2,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(De,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(De,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(De,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(De,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(De,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(De,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(De,te,ee){var ce=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ce*te,(1-ce)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*te,ce*ee)).add(new go.PathSegment(go.PathSegment.Move,ce*te,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*te,(1-ce)*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(De,te,ee){var ce=te/2,se=new go.Geometry().add(new go.PathFigure(te,te/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ce,ce,ce,ce).close()));return se.spot1=We,se.spot2=ct,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(De,te,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=0,ce.startY=0,ce.endX=te,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("Line2",function(De,te,ee){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=te,ce.startY=0,ce.endX=0,ce.endY=ee,ce}),go.Shape.defineFigureGenerator("Curve1",function(De,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Me*te,0,te,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(De,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,0,Me*ee,(1-Me)*te,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(De,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,Me*ee,Me*te,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(De,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Me)*te,0,0,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(De,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(De,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(De,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(De,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 _n("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=.1:ce<-1?ce=-1:ce>1&&(ce=1);var se=Math.abs(ce)*te;if(ce===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 ce>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 _n("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=10:ce<-te?ce=-te:ce>te&&(ce=te);var se=Math.abs(ce);if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,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 _n("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=.2:ce<.5?ce=-.5:ce>.5&&(ce=.5);var se=Math.abs(ce)*te;if(ce===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 ce>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 _n("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=20:ce<-te?ce=-te/2:ce>te&&(ce=te/2);var se=Math.abs(ce);if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,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 _n("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)?ce=10:ce<-te?ce=-te/2:ce>te&&(ce=te/2);var se=Math.abs(ce);if(ce===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return ce>0?he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,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 bt=[];function Pt(){var De=bt.pop();return De===void 0?[]:De}function Ge(De){De.length=0,bt.push(De)}function ut(De){for(var te=Pt(),ee=.5,ce=.5,se=Math.PI*1.5,he=0,ve=0;ve<De;ve++)he=2*Math.PI/De*ve+se,te[ve]=new go.Point(ce+ee*Math.cos(he),ce+ee*Math.sin(he));return te.push(te[0]),te}function mt(De){var te=yt(De),ee=Pt();ee[0]=te[0];for(var ce=1,se=1;ce<te.length;ce+=2,se+=3)ee[se]=te[ce],ee[se+1]=te[ce],ee[se+2]=te[ce+1];return Ge(te),ee}function yt(De){for(var te=ut(De),ee=Pt(),ce=Math.floor(te.length/2),se=te.length-1,he=De%2===0?2:1,ve=0;ve<se;ve++){var Ee=te[ve],Le=te[ve+1],Ne=te[(ce+ve-1)%se],je=te[(ce+ve+he)%se];ee[ve*2]=Ee,ee[ve*2+1]=He(Ee.x,Ee.y,Ne.x,Ne.y,Le.x,Le.y,je.x,je.y,new go.Point)}return ee[ee.length]=ee[0],Ge(te),ee}go.Shape.defineFigureGenerator("Pentagon",function(De,te,ee){var ce=ut(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<5;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(De,te,ee){var ce=ut(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<6;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(De,te,ee){var ce=ut(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<7;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(De,te,ee){var ce=ut(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<8;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(De,te,ee){var ce=ut(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<9;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(De,te,ee){var ce=ut(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(De,te,ee){var ce=ut(12),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(De,te,ee){var ce=yt(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(De,te,ee){var ce=yt(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(De,te,ee){var ce=yt(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<14;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(De,te,ee){var ce=yt(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<16;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(De,te,ee){var ce=yt(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<18;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(De,te,ee){var ce=yt(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<20;ve++)he.add(new go.PathSegment(go.PathSegment.Line,ce[ve].x*te,ce[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*te,ce[0].y*ee).close()),Ge(ce),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(De,te,ee){var ce=mt(5),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*te,ce[ve+2].y*ee,ce[ve].x*te,ce[ve].y*ee,ce[ve+1].x*te,ce[ve+1].y*ee));return he.segments.last().close(),Ge(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(De,te,ee){var ce=mt(6),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*te,ce[ve+2].y*ee,ce[ve].x*te,ce[ve].y*ee,ce[ve+1].x*te,ce[ve+1].y*ee));return he.segments.last().close(),Ge(ce),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(De,te,ee){var ce=mt(7),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*te,ce[ve+2].y*ee,ce[ve].x*te,ce[ve].y*ee,ce[ve+1].x*te,ce[ve+1].y*ee));return he.segments.last().close(),Ge(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(De,te,ee){var ce=mt(8),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*te,ce[ve+2].y*ee,ce[ve].x*te,ce[ve].y*ee,ce[ve+1].x*te,ce[ve+1].y*ee));return he.segments.last().close(),Ge(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(De,te,ee){var ce=mt(9),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*te,ce[ve+2].y*ee,ce[ve].x*te,ce[ve].y*ee,ce[ve+1].x*te,ce[ve+1].y*ee));return he.segments.last().close(),Ge(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(De,te,ee){var ce=mt(10),se=new go.Geometry,he=new go.PathFigure(ce[0].x*te,ce[0].y*ee,!0);se.add(he);for(var ve=1;ve<ce.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,ce[ve+2].x*te,ce[ve+2].y*ee,ce[ve].x*te,ce[ve].y*ee,ce[ve+1].x*te,ce[ve+1].y*ee));return he.segments.last().close(),Ge(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new _n("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new _n("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(De,te,ee){var ce=De?De.parameter1:NaN,se=De?De.parameter2:NaN;isNaN(ce)&&(ce=8),isNaN(se)&&(se=8);var he=new go.Geometry,ve=new go.PathFigure(0,0,!0);return he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce<te/2&&se<ee/2&&(ve.add(new go.PathSegment(go.PathSegment.Move,ce,se)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-ce,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-ce,se).close())),he.setSpots(0,0,1,1,ce,se,-ce,-se),he}),go.Shape.setFigureParameter("Ring",0,new _n("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(De,te,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=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-ce,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=ct,he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Cloud",function(De,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(De,te,ee){var ce=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ce*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,te,(1-ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*te,ee)).add(new go.PathSegment(go.PathSegment.Line,ce*te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ce*ee).close())).setSpots(ce/2,ce/2,1-ce/2,1-ce/2)}),go.Shape.setFigureParameter("Pie",0,new _n("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new _n("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(De,te,ee){var ce=De?De.parameter1:NaN,se=De?De.parameter2:NaN;isNaN(ce)&&(ce=0),isNaN(se)&&(se=315);var he=ce%360;he<0&&(he+=360);var ve=se%360,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(De,te,ee){var ce=Me/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-ce)*ee,(se+ce)*te,(he+ce)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new _n("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(De,te,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30);var se=Math.min(ce,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 _n("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(De,te,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=Math.min(ce,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 _n("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(De,te,ee){var ce=De?De.parameter1:NaN;if((isNaN(ce)||ce<0)&&(ce=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),Le=ce-Math.min(Math.cos(Ee)*ce/2,he),Ne=ce-Math.min(Math.sin(Ee)*ce/2,ve),se=new go.Geometry,je=new go.PathFigure(Le,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-Le,0)),je.add(new go.PathSegment(go.PathSegment.Line,te,Ne)),je.add(new go.PathSegment(go.PathSegment.Line,.8*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,te,ee-Ne)),je.add(new go.PathSegment(go.PathSegment.Line,te-Le,ee)),je.add(new go.PathSegment(go.PathSegment.Line,he,.8*ee)),je.add(new go.PathSegment(go.PathSegment.Line,Le,ee)),je.add(new go.PathSegment(go.PathSegment.Line,0,ee-Ne)),je.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),je.add(new go.PathSegment(go.PathSegment.Line,0,Ne).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new _n("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(De,te,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=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 _n("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*te,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*te,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,(1-ce)*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-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*te,(1-ce)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*te,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ce*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new _n("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.5);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Math.abs(1-ce)*te,.25*ee,Math.abs(1-ce)*te,.75*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ce*te,.75*ee,ce*te,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(De,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,Me*te,0,te,(.5-Me/2)*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,(.5+Me/2)*ee,Me*te,ee).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(De,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(De,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(De,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(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.4*te,.6*ee,!0);ce.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,Le=he*Me;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Le+Ee)*ee,(.5-Le+ve)*te,(.5+he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+Ee)*ee,(.5+Le+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Le+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve)*te,(.5-Le+Ee)*ee,(.5+Le+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*te,.36771243*ee,(.5-Le+ve)*te,(.5-he+Ee)*ee,(.5-he+ve+.05)*te,(.5-Le+Ee-.02)*ee)),he=.2,ve=0,Ee=-.3,Le=he*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+Ee)*ee,(.5+Le+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Le+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve)*te,(.5-Le+Ee)*ee,(.5+Le+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+Ee)*ee,(.5-Le+ve)*te,(.5-he+Ee)*ee,(.5-he+ve)*te,(.5-Le+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Le+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Le+Ee)*ee,(.5-Le+ve)*te,(.5+he+Ee)*ee)),he=.2,ve=-.3,Ee=0,Le=he*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve-.05)*te,(.5-Le+Ee-.02)*ee,(.5+Le+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+Ee)*ee,(.5-Le+ve)*te,(.5-he+Ee)*ee,(.5-he+ve)*te,(.5-Le+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Le+Ee)*ee,(.5-Le+ve)*te,(.5+he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.6*ee,(.5+Le+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Le+Ee)*ee).close()),ce.setSpots(.06,.33,.93,.68),ce}),go.Shape.defineFigureGenerator("YinYang",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*.5,0,!0);ce.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),ce.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),ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,te*ve,ee*Ee,he*te,he*te).close()),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Peace",function(De,te,ee){var ce=.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-ce)*te,ce*ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,ce*te,ce*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=.5,ve=.5,Ee=.5,Le=new go.PathFigure(ve*te,(Ee-he)*ee);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.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=Me*.4;var Ne=le(),je=le(),ze=le(),Ye=le();st(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.42,Ne,je,ze,Ye,Ye);var Xe=le(),lt=le(),Ze=le();st(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.58,Ye,Ye,Ze,Xe,lt);var Lt=le(),rt=le(),Ot=le();st(ve,Ee+he,ve-se,Ee+he,ve-he,Ee+se,ve-he,Ee,.42,Lt,rt,Ot,Ye,Ye);var wt=le(),Dt=le(),Wt=le();return st(ve,Ee+he,ve-se,Ee+he,ve-he,Ee+se,ve-he,Ee,.58,Ye,Ye,Wt,wt,Dt),Le.add(new go.PathSegment(go.PathSegment.Move,Wt.x*te,Wt.y*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,wt.x*te,wt.y*ee,Dt.x*te,Dt.y*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ze.x*te,ze.y*ee,Ne.x*te,Ne.y*ee,je.x*te,je.y*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,Wt.x*te,Wt.y*ee).close()),Le.add(new go.PathSegment(go.PathSegment.Move,Ot.x*te,Ot.y*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,Ze.x*te,Ze.y*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,Xe.x*te,Xe.y*ee,lt.x*te,lt.y*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ot.x*te,Ot.y*ee,Lt.x*te,Lt.y*ee,rt.x*te,rt.y*ee).close()),Te(Ne),Te(je),Te(ze),Te(Ye),Te(Xe),Te(lt),Te(Ze),Te(Lt),Te(rt),Te(Ot),Te(wt),Te(Dt),Te(Wt),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Fragile",function(De,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 _n("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(De,te,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30),ce>te&&(ce=te);var se=(te-ce)/2,he=se+ce;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(De,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(De,te,ee){var ce=new go.Geometry,se=Me*.4,he=.4,ve=.5,Ee=.5,Le=le(),Ne=le(),je=le(),ze=le(),Ye=new go.PathFigure((ve-he)*te,Ee*ee,!1);ce.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),st(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.44,je,ze,Ne,Le,Le),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Ne.x*te,Ne.y*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee));var Xe=me(Ne.x,Ne.y);st(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.56,Le,Le,Ne,je,ze);var lt=me(Ne.x,Ne.y);Ye.add(new go.PathSegment(go.PathSegment.Line,(Xe.x*.1+.95*.9)*te,Xe.y*.1*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.85*te,Xe.y*.1*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.85*te,0)),Ye.add(new go.PathSegment(go.PathSegment.Line,te,0)),Ye.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,(lt.x*.1+.9)*te,.15*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,(lt.x*.1+.9)*te,(lt.y*.1+.05*.9)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,lt.x*te,lt.y*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Ye.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=Me*.35;var Ze=new go.PathFigure(ve*te,(Ee-he)*ee,!1);ce.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 Lt=new go.PathFigure((ve-he)*te,Ee*ee,!1);return ce.add(Lt),Te(Le),Te(Ne),Te(je),Te(ze),Te(Xe),Te(lt),ce.spot1=new go.Spot(.202,.257),ce.spot2=new go.Spot(.792,.739),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("GenderFemale",function(De,te,ee){var ce=new go.Geometry,se=.375,he=0,ve=-.125,Ee=se*Me,Le=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);ce.add(Le),Le.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)),Le.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)),Le.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)),Le.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)),Le.add(new go.PathSegment(go.PathSegment.Line,.475*te,.85*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.425*te,.85*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.425*te,.9*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.475*te,.9*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.475*te,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.525*te,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.525*te,.9*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.575*te,.9*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.575*te,.85*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee).close()),se=.325,he=0,ve=-.125,Ee=se*Me;var Le=new go.PathFigure((1-.5+se+he)*te,(.5+ve)*ee,!1);ce.add(Le),Le.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)),Le.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)),Le.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)),Le.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 Le=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);return ce.add(Le),ce.spot1=new go.Spot(.232,.136),ce.spot2=new go.Spot(.682,.611),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("LogicImplies",function(De,te,ee){var ce=De?De.parameter1:NaN;return isNaN(ce)&&(ce=.2),new go.Geometry().add(new go.PathFigure((1-ce)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*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(De,te,ee){var ce=De?De.parameter1:NaN;return isNaN(ce)&&(ce=.2),new go.Geometry().add(new go.PathFigure((1-ce)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*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,ce*te,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,ce*te,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(De,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(De,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(De,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(De,te,ee){var ce=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 ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("LogicTruth",function(De,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(De,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(De,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(De,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(De,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(De,te,ee){var ce=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,ce*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ce*te,ce*ee,ce*te,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(De,te,ee){var ce=.5;return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,ce*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ce*te,ce*ee,ce*te,ce*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new _n("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new _n("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=De?De.parameter2:NaN;isNaN(se)&&(se=.3);var he=(1-ce)*te,ve=(.5-se/2)*ee,Ee=(.5+se/2)*ee,Le=new go.Geometry,Ne=new go.PathFigure(0,ve,!0);Le.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Ne.add(new go.PathSegment(go.PathSegment.Line,he,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,he,Ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,Ee).close()),Le.spot1=new go.Spot(0,ve/ee);var je=He(0,Ee/ee,1,Ee/ee,he/te,1,1,.5,le());return Le.spot2=new go.Spot(je.x,je.y),Te(je),Le}),go.Shape.setFigureParameter("Arrow2",0,new _n("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new _n("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=30),ce>te&&(ce=te);var se=De?De.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var he=te-ce,ve=(ee-se)/2,Ee=ve+se,Le=new go.Geometry,Ne=new go.PathFigure(0,ve,!0);Le.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Ne.add(new go.PathSegment(go.PathSegment.Line,he,0)),Ne.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,he,Ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,0,Ee).close()),Le.spot1=new go.Spot(0,ve/ee);var je=He(0,Ee/ee,1,Ee/ee,he/te,1,1,.5,le());return Le.spot2=new go.Spot(je.x,je.y),Te(je),Le}),go.Shape.defineFigureGenerator("Chevron",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*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()),ce}),go.Shape.defineFigureGenerator("DoubleArrow",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*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()),ce}),go.Shape.setFigureParameter("DoubleEndArrow",0,new _n("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,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 Le=He(0,.5,.3,0,0,se/ee,.1,se/ee,le());return ve.spot1=new go.Spot(Le.x,Le.y),Le=He(.7,1,1,.5,0,he/ee,1,he/ee,Le),ve.spot2=new go.Spot(Le.x,Le.y),Te(Le),ve}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new _n("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new _n("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=40);var se=De?De.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-ce)/2,ve=he+ce,Ee=(ee-se)/2,Le=Ee+se;(ce>ee||se>ee)&&(se>ce?(ce=ce*ee/se,he=(ee-ce)/2,ve=he+ce,Ee=0,Le=ee):(he=0,ve=ee,Ee=0,Le=ee));var Ne=new go.Geometry,je=new go.PathFigure(te,.5*ee,!0);Ne.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,Le)),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,Le)),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 ze=He(0,.5,.3,Ee/ee,0,he/ee,1,he/ee,le());return Ne.spot1=new go.Spot(ze.x,ze.y),ze=He(.7,Le/ee,1,.5,0,ve/ee,1,ve/ee,ze),Ne.spot2=new go.Spot(ze.x,ze.y),Te(ze),Ne}),go.Shape.setFigureParameter("IBeamArrow",0,new _n("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,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 Le=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Le.x,Le.y),Te(Le),ve}),go.Shape.setFigureParameter("IBeamArrow2",0,new _n("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new _n("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=40);var se=De?De.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-ce)/2,ve=he+ce,Ee=(ee-se)/2,Le=Ee+se;(ce>ee||se>ee)&&(se>ce?(ce=ce*ee/se,he=(ee-ce)/2,ve=he+ce,Ee=0,Le=ee):(he=0,ve=ee,Ee=0,Le=ee));var Ne=new go.Geometry,je=new go.PathFigure(te,.5*ee,!0);Ne.add(je),je.add(new go.PathSegment(go.PathSegment.Line,.7*te,Le)),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,Le)),je.add(new go.PathSegment(go.PathSegment.Line,0,Le)),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()),Ne.spot1=new go.Spot(0,he/ee);var ze=He(.7,Le/ee,1,.5,0,ve/ee,1,ve/ee,le());return Ne.spot2=new go.Spot(ze.x,ze.y),Te(ze),Ne}),go.Shape.setFigureParameter("Pointer",0,new _n("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.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,ce*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(ce,.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 _n("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.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,ce*te,.75*ee,ce*te,.25*ee).close()),se.spot1=new go.Spot(ce,.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 _n("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.4);var se=(.5-ce/2)*ee,he=(.5+ce/2)*ee,ve=new go.Geometry,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 Le=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Le.x,Le.y),Te(Le),ve}),go.Shape.setFigureParameter("SplitEndArrow2",0,new _n("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=50);var se=(ee-ce)/2,he=se+ce;ce>ee&&(se=0,he=ee);var ve=new go.Geometry,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 Le=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Le.x,Le.y),Te(Le),ve}),go.Shape.setFigureParameter("SquareArrow",0,new _n("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.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,ce*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,ce*te,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(ce,1),se}),go.Shape.defineFigureGenerator("Cone1",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(0,.9*ee,!0);return ce.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()),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.97),ce}),go.Shape.defineFigureGenerator("Cone2",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,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 ce.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,.8*ee,.85/.9*te,.8*ee)),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.82),ce}),go.Shape.defineFigureGenerator("Cube1",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,ee,!0);ce.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 ce.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)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(.5,.85),ce}),go.Shape.defineFigureGenerator("Cube2",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*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 ce.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)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(.7,1),ce}),go.Shape.defineFigureGenerator("Cylinder1",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ee/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(0,ce,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*ce,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,1*te,ce,(.5+he)*te,0,1*te,Me*ce)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,1*ee,1*te,ee-Me*ce,(.5+he)*te,1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,(.5-he)*te,1*ee,0,ee-Me*ce)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ce));var Ee=new go.PathFigure(te,ce,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,2*ce,1*te,2*ce-Me*ce,(.5+he)*te,2*ce)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,ce,(.5-he)*te,2*ce,0,2*ce-Me*ce)),se.spot1=new go.Spot(0,0,0,2*ce),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ee/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(0,ee-ce,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*ce,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,ce,(.5+he)*te,0,te,Me*ce)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-ce)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,ee-Me*ce,(.5+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-ce,(.5-he)*te,ee,0,ee-Me*ce));var Ee=new go.PathFigure(0,ee-ce,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee-2*ce,0,ee-ce-Me*ce,(.5-he)*te,ee-2*ce)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te,ee-ce,(.5+he)*te,ee-2*ce,te,ee-ce-Me*ce)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*ce),se}),go.Shape.defineFigureGenerator("Cylinder3",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,te/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(ce,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te-ce,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*ce,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-ce,ee,te,(.5+he)*ee,te-Me*ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*ce,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-he)*ee,Me*ce,0));var Ee=new go.PathFigure(ce,0,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,2*ce,.5*ee,ce+Me*ce,0,2*ce,(.5-he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ce,ee,2*ce,(.5+he)*ee,ce+Me*ce,ee)),se.spot1=new go.Spot(0,0,2*ce,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,te/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(te-ce,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*ce,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-ce,ee,te,(.5+he)*ee,te-Me*ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,ce,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*ce,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-he)*ee,Me*ce,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te-ce,0));var Ee=new go.PathFigure(te-ce,0,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-2*ce,.5*ee,te-ce-Me*ce,0,te-2*ce,(.5-he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-ce,ee,te-2*ce,(.5+he)*ee,te-ce-Me*ce,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*ce,0),se}),go.Shape.defineFigureGenerator("Prism1",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*te,.25*ee,!0);ce.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 ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),ce.spot1=new go.Spot(.408,.172),ce.spot2=new go.Spot(.833,.662),ce}),go.Shape.defineFigureGenerator("Prism2",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*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 ce.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)),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("Pyramid1",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);ce.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 ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),ce.spot1=new go.Spot(.25,.367),ce.spot2=new go.Spot(.75,.875),ce}),go.Shape.defineFigureGenerator("Pyramid2",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);ce.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 ce.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)),ce.spot1=new go.Spot(.25,.367),ce.spot2=new go.Spot(.75,.875),ce}),go.Shape.defineFigureGenerator("Actor",function(De,te,ee){var ce=new go.Geometry,se=.2,he=.1,ve=Me*se,Ee=Me*he,Le=.5,Ne=.1,je=new go.PathFigure(Le*te,(Ne+he)*ee,!0);ce.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,(Le-se)*te,Ne*ee,(Le-ve)*te,(Ne+he)*ee,(Le-se)*te,(Ne+Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne-he)*ee,(Le-se)*te,(Ne-Ee)*ee,(Le-ve)*te,(Ne-he)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Le+se)*te,Ne*ee,(Le+ve)*te,(Ne-he)*ee,(Le+se)*te,(Ne-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne+he)*ee,(Le+se)*te,(Ne+Ee)*ee,(Le+ve)*te,(Ne+he)*ee));var ze=.05,Ye=Me*ze;Le=.05,Ne=.25;var Xe=new go.PathFigure(.5*te,.2*ee,!0);return ce.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Line,.95*te,.2*ee)),Le=.95,Ne=.25,Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Le+ze)*te,Ne*ee,(Le+Ye)*te,(Ne-ze)*ee,(Le+ze)*te,(Ne-Ye)*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)),ze=.025,Ye=Me*ze,Le=.825,Ne=.35,Xe.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne-ze)*ee,(Le+ze)*te,(Ne-Ye)*ee,(Le+Ye)*te,(Ne-ze)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Le-ze)*te,Ne*ee,(Le-Ye)*te,(Ne-ze)*ee,(Le-ze)*te,(Ne-Ye)*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)),ze=.05,Ye=Me*ze,Le=.5,Ne=.7,Xe.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne-ze)*ee,(Le+ze)*te,(Ne-Ye)*ee,(Le+Ye)*te,(Ne-ze)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Le-ze)*te,Ne*ee,(Le-Ye)*te,(Ne-ze)*ee,(Le-ze)*te,(Ne-Ye)*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)),ze=.025,Ye=Me*ze,Le=.175,Ne=.35,Xe.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne-ze)*ee,(Le+ze)*te,(Ne-Ye)*ee,(Le+Ye)*te,(Ne-ze)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Le-ze)*te,Ne*ee,(Le-Ye)*te,(Ne-ze)*ee,(Le-ze)*te,(Ne-Ye)*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)),ze=.05,Ye=Me*ze,Le=.05,Ne=.25,Xe.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne-ze)*ee,(Le-ze)*te,(Ne-Ye)*ee,(Le-Ye)*te,(Ne-ze)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),ce.spot1=new go.Spot(.2,.2),ce.spot2=new go.Spot(.8,.65),ce}),go.Shape.setFigureParameter("Card",0,new _n("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(De,te,ee){var ce=De?De.parameter1:NaN;isNaN(ce)&&(ce=.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,ce*ee)),he.add(new go.PathSegment(go.PathSegment.Line,ce*te,0).close()),se.spot1=new go.Spot(0,ce),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,.5*ee,!0);ce.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 ce.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)),ce.spot1=new go.Spot(.25,0),ce.spot2=new go.Spot(.75,.25),ce}),go.Shape.defineFigureGenerator("CreateRequest",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,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 ce.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)),ce}),go.Shape.defineFigureGenerator("Database",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(te,.1*ee,!0);ce.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 ce.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)),ce.spot1=new go.Spot(0,.4),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("DataStorage",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*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()),ce.spot1=new go.Spot(.226,0),ce.spot2=new go.Spot(.81,1),ce}),go.Shape.defineFigureGenerator("DiskStorage",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(te,.1*ee,!0);ce.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 ce.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)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("Display",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return ce.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()),ce.spot1=new go.Spot(.25,0),ce.spot2=new go.Spot(.75,1),ce}),go.Shape.defineFigureGenerator("DividedEvent",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var he=Me*.2,ve=new go.PathFigure(0,.2*ee,!0);ce.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 ce.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),ce}),go.Shape.defineFigureGenerator("DividedProcess",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,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 ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),ce}),go.Shape.defineFigureGenerator("Document",function(De,te,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,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()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(1,.6),ce}),go.Shape.defineFigureGenerator("ExternalOrganization",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,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 ce.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)),ce}),go.Shape.defineFigureGenerator("ExternalProcess",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);ce.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 ce.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)),ce.spot1=new go.Spot(.25,.25),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("File",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*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 ce.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)),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Interrupt",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee));var he=new go.PathFigure(te,.5*ee,!1);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee));var ve=new go.PathFigure(te,.5*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("InternalStorage",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN,he=De?De.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.1);var ve=new go.PathFigure(0,0,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,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 ce.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)),ce}),go.Shape.defineFigureGenerator("Junction",function(De,te,ee){var ce=new go.Geometry,se=1/Math.SQRT2,he=(1-1/Math.SQRT2)/2,ve=Me*.5,Ee=.5,Le=new go.PathFigure(te,Ee*ee,!0);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,ee,te,(Ee+ve)*ee,(Ee+ve)*te,ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,0,Ee*ee,(Ee-ve)*te,ee,0,(Ee+ve)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,0,0,(Ee-ve)*ee,(Ee-ve)*te,0)),Le.add(new go.PathSegment(go.PathSegment.Bezier,te,Ee*ee,(Ee+ve)*te,0,te,(Ee-ve)*ee));var Ne=new go.PathFigure((he+se)*te,(he+se)*ee,!1);return ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,he*te,he*ee)),Ne.add(new go.PathSegment(go.PathSegment.Move,he*te,(he+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,(he+se)*te,he*ee)),ce}),go.Shape.defineFigureGenerator("LinedDocument",function(De,te,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,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 ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.75*ee)),ce.spot1=new go.Spot(.1,0),ce.spot2=new go.Spot(1,.6),ce}),go.Shape.defineFigureGenerator("LoopLimit",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*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()),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("MagneticTape",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(.5*te,ee,!0);return ce.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)),ce.spot1=new go.Spot(.15,.15),ce.spot2=new go.Spot(.85,.8),ce}),go.Shape.defineFigureGenerator("ManualInput",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te,0,!0);return ce.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()),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("MessageFromUser",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.7);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,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()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("MicroformProcessing",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*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()),ce}),go.Shape.defineFigureGenerator("MicroformRecording",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*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()),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(1,.75),ce}),go.Shape.defineFigureGenerator("MultiDocument",function(De,te,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(te,0,!0);ce.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 ce.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)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.8,.77),ce}),go.Shape.defineFigureGenerator("MultiProcess",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*te,.1*ee,!0);ce.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 ce.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)),ce.spot1=new go.Spot(0,.2),ce.spot2=new go.Spot(.8,1),ce}),go.Shape.defineFigureGenerator("OfflineStorage",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=1-se,ve=new go.PathFigure(0,0,!0);ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,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 ce.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*te,se*ee)),ce}),go.Shape.defineFigureGenerator("OffPageConnector",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*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()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(.75,1),ce}),go.Shape.defineFigureGenerator("Or",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);ce.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 ce.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)),ce}),go.Shape.defineFigureGenerator("PaperTape",function(De,te,ee){var ce=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,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()),ce.spot1=new go.Spot(0,.49),ce.spot2=new go.Spot(1,.75),ce}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN,he=De?De.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,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()),ce}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN,he=De?De.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*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()),ce}),go.Shape.defineFigureGenerator("Procedure",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,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 ce.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)),ce}),go.Shape.defineFigureGenerator("Process",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,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 ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Sort",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);ce.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 ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),ce.spot1=new go.Spot(.25,.25),ce.spot2=new go.Spot(.75,.5),ce}),go.Shape.defineFigureGenerator("Start",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(se*te,0,!0);ce.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 ce.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)),ce.spot1=new go.Spot(se,0),ce.spot2=new go.Spot(1-se,1),ce}),go.Shape.defineFigureGenerator("Terminator",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return ce.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)),ce.spot1=new go.Spot(.23,0),ce.spot2=new go.Spot(.77,1),ce}),go.Shape.defineFigureGenerator("TransmittalTape",function(De,te,ee){var ce=new go.Geometry,se=De?De.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);return ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,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()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("AndGate",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=new go.PathFigure(0,0,!0);return ce.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()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(.55,1),ce}),go.Shape.defineFigureGenerator("Buffer",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("Clock",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);ce.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);ce.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he*ee));var Le=new go.PathFigure(.8*te,.75*ee,!1);return ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.8*te,.25*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.6*te,.25*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.6*te,.75*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.4*te,.75*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.4*te,.25*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.2*te,.25*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.2*te,.75*ee)),ce}),go.Shape.defineFigureGenerator("Ground",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Inverter",function(De,te,ee){var ce=new go.Geometry,se=Me*.1,he=.1,ve=.9,Ee=.5,Le=new go.PathFigure(.8*te,.5*ee,!0);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,0,0)),Le.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee));var Ne=new go.PathFigure((ve+he)*te,Ee*ee,!0);return ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.4,.75),ce}),go.Shape.defineFigureGenerator("NandGate",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=Me*.4,ve=Me*.1,Ee=.1,Le=.9,Ne=.5,je=new go.PathFigure(.8*te,.5*ee,!0);ce.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 ze=new go.PathFigure((Le+Ee)*te,Ne*ee,!0);return ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne+Ee)*ee,(Le+Ee)*te,(Ne+ve)*ee,(Le+ve)*te,(Ne+Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Le-Ee)*te,Ne*ee,(Le-ve)*te,(Ne+Ee)*ee,(Le-Ee)*te,(Ne+ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne-Ee)*ee,(Le-Ee)*te,(Ne-ve)*ee,(Le-ve)*te,(Ne-Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Le+Ee)*te,Ne*ee,(Le+ve)*te,(Ne-Ee)*ee,(Le+Ee)*te,(Ne-ve)*ee)),ce.spot1=new go.Spot(0,.05),ce.spot2=new go.Spot(.55,.95),ce}),go.Shape.defineFigureGenerator("NorGate",function(De,te,ee){var ce=new go.Geometry,se=.5,he=Me*se,ve=0,Ee=.5,Le=new go.PathFigure(.8*te,.5*ee,!0);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee)),Le.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=Me*.1,ve=.9,Ee=.5;var Ne=new go.PathFigure((ve-se)*te,Ee*ee,!0);return ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.6,.75),ce}),go.Shape.defineFigureGenerator("OrGate",function(De,te,ee){var ce=new go.Geometry,se=.5,he=Me*se,ve=0,Ee=.5,Le=new go.PathFigure(0,0,!0);return ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he+he)*te,(Ee-se)*ee,.8*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*te,(Ee+he)*ee,(ve+he+he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee).close()),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("XnorGate",function(De,te,ee){var ce=new go.Geometry,se=.5,he=Me*se,ve=.2,Ee=.5,Le=new go.PathFigure(.1*te,0,!1);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Ne=new go.PathFigure(.8*te,.5*ee,!0);ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.7*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee)),Ne.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=Me*.1,ve=.9,Ee=.5;var je=new go.PathFigure((ve-se)*te,Ee*ee,!0);return ce.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)),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.65,.75),ce}),go.Shape.defineFigureGenerator("XorGate",function(De,te,ee){var ce=new go.Geometry,se=.5,he=Me*se,ve=.2,Ee=.5,Le=new go.PathFigure(.1*te,0,!1);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Ne=new go.PathFigure(.2*te,0,!0);return ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he)*te,(Ee-se)*ee,.9*te,(Ee-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.9*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee).close()),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.8,.75),ce}),go.Shape.defineFigureGenerator("Capacitor",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ce}),go.Shape.defineFigureGenerator("Resistor",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*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)),ce}),go.Shape.defineFigureGenerator("Inductor",function(De,te,ee){var ce=new go.Geometry,se=Me*.1,he=.1,ve=.1,Ee=.5,Le=new go.PathFigure((ve-se*.5)*te,ee,!1);return ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.3,Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.5,Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.7,Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.9,Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se*.5)*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),ce}),go.Shape.defineFigureGenerator("ACvoltageSource",function(De,te,ee){var ce=new go.Geometry,se=Me*.5,he=.5,ve=.5,Ee=.5,Le=new go.PathFigure((ve-he)*te,Ee*ee,!1);return ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Move,(ve-he+.1)*te,Ee*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he-.1)*te,Ee*ee,ve*te,(Ee-he)*ee,ve*te,(Ee+he)*ee)),ce}),go.Shape.defineFigureGenerator("DCvoltageSource",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ce}),go.Shape.defineFigureGenerator("Diode",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te,0,!1);return ce.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)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("Wifi",function(De,te,ee){var ce=new go.Geometry,se=te,he=ee;te=te*.38,ee=ee*.6;var ve=Me*.8,Ee=.8,Le=0,Ne=.5,je=(se-te)/2,ze=(he-ee)/2,Ye=new go.PathFigure(Le*te+je,(Ne+Ee)*ee+ze,!0);ce.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Le-Ee)*te+je,Ne*ee+ze,(Le-ve)*te+je,(Ne+Ee)*ee+ze,(Le-Ee)*te+je,(Ne+ve)*ee+ze)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne-Ee)*ee+ze,(Le-Ee)*te+je,(Ne-ve)*ee+ze,(Le-ve)*te+je,(Ne-Ee)*ee+ze)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Le-Ee+ve*.5)*te+je,Ne*ee+ze,Le*te+je,(Ne-Ee)*ee+ze,(Le-Ee+ve*.5)*te+je,(Ne-ve)*ee+ze)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne+Ee)*ee+ze,(Le-Ee+ve*.5)*te+je,(Ne+ve)*ee+ze,Le*te+je,(Ne+Ee)*ee+ze).close()),ve=Me*.4,Ee=.4,Le=.2,Ne=.5;var Xe=new go.PathFigure(Le*te+je,(Ne+Ee)*ee+ze,!0);ce.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Le-Ee)*te+je,Ne*ee+ze,(Le-ve)*te+je,(Ne+Ee)*ee+ze,(Le-Ee)*te+je,(Ne+ve)*ee+ze)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne-Ee)*ee+ze,(Le-Ee)*te+je,(Ne-ve)*ee+ze,(Le-ve)*te+je,(Ne-Ee)*ee+ze)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Le-Ee+ve*.5)*te+je,Ne*ee+ze,Le*te+je,(Ne-Ee)*ee+ze,(Le-Ee+ve*.5)*te+je,(Ne-ve)*ee+ze)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne+Ee)*ee+ze,(Le-Ee+ve*.5)*te+je,(Ne+ve)*ee+ze,Le*te+je,(Ne+Ee)*ee+ze).close()),ve=Me*.2,Ee=.2,Le=.5,Ne=.5;var lt=new go.PathFigure((Le-Ee)*te+je,Ne*ee+ze,!0);ce.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne-Ee)*ee+ze,(Le-Ee)*te+je,(Ne-ve)*ee+ze,(Le-ve)*te+je,(Ne-Ee)*ee+ze)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Le+Ee)*te+je,Ne*ee+ze,(Le+ve)*te+je,(Ne-Ee)*ee+ze,(Le+Ee)*te+je,(Ne-ve)*ee+ze)),lt.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne+Ee)*ee+ze,(Le+Ee)*te+je,(Ne+ve)*ee+ze,(Le+ve)*te+je,(Ne+Ee)*ee+ze)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Le-Ee)*te+je,Ne*ee+ze,(Le-ve)*te+je,(Ne+Ee)*ee+ze,(Le-Ee)*te+je,(Ne+ve)*ee+ze)),ve=Me*.4,Ee=.4,Le=.8,Ne=.5;var Ze=new go.PathFigure(Le*te+je,(Ne-Ee)*ee+ze,!0);ce.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Le+Ee)*te+je,Ne*ee+ze,(Le+ve)*te+je,(Ne-Ee)*ee+ze,(Le+Ee)*te+je,(Ne-ve)*ee+ze)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne+Ee)*ee+ze,(Le+Ee)*te+je,(Ne+ve)*ee+ze,(Le+ve)*te+je,(Ne+Ee)*ee+ze)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Le+Ee-ve*.5)*te+je,Ne*ee+ze,Le*te+je,(Ne+Ee)*ee+ze,(Le+Ee-ve*.5)*te+je,(Ne+ve)*ee+ze)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne-Ee)*ee+ze,(Le+Ee-ve*.5)*te+je,(Ne-ve)*ee+ze,Le*te+je,(Ne-Ee)*ee+ze).close()),ve=Me*.8,Ee=.8,Le=1,Ne=.5;var Lt=new go.PathFigure(Le*te+je,(Ne-Ee)*ee+ze,!0);return ce.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(Le+Ee)*te+je,Ne*ee+ze,(Le+ve)*te+je,(Ne-Ee)*ee+ze,(Le+Ee)*te+je,(Ne-ve)*ee+ze)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne+Ee)*ee+ze,(Le+Ee)*te+je,(Ne+ve)*ee+ze,(Le+ve)*te+je,(Ne+Ee)*ee+ze)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(Le+Ee-ve*.5)*te+je,Ne*ee+ze,Le*te+je,(Ne+Ee)*ee+ze,(Le+Ee-ve*.5)*te+je,(Ne+ve)*ee+ze)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,Le*te+je,(Ne-Ee)*ee+ze,(Le+Ee-ve*.5)*te+je,(Ne-ve)*ee+ze,Le*te+je,(Ne-Ee)*ee+ze).close()),ce}),go.Shape.defineFigureGenerator("Email",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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 ce.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)),ce}),go.Shape.defineFigureGenerator("Ethernet",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.35*te,0,!0);ce.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);ce.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);ce.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 ce.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)),ce}),go.Shape.defineFigureGenerator("Power",function(De,te,ee){var ce=new go.Geometry,se=Me*.4,he=.4,ve=.5,Ee=.5,Le=le(),Ne=le(),je=le(),ze=le();st(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.5,Le,Le,Ne,je,ze);var Ye=me(Ne.x,Ne.y),Xe=new go.PathFigure(Ne.x*te,Ne.y*ee,!0);ce.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,je.x*te,je.y*ee,ze.x*te,ze.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)),st(ve-he,Ee,ve-he,Ee-se,ve-se,Ee-he,ve,Ee-he,.5,je,ze,Ne,Le,Le),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Ne.x*te,Ne.y*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee)),se=Me*.3,he=.3,st(ve-he,Ee,ve-he,Ee-se,ve-se,Ee-he,ve,Ee-he,.5,je,ze,Ne,Le,Le),Xe.add(new go.PathSegment(go.PathSegment.Line,Ne.x*te,Ne.y*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,ze.x*te,ze.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)),st(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.5,Le,Le,Ne,je,ze),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Ne.x*te,Ne.y*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee).close());var Xe=new go.PathFigure(.45*te,0,!0);return ce.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(Le),Te(Ne),Te(je),Te(ze),Te(Ye),ce.spot1=new go.Spot(.25,.45),ce.spot2=new go.Spot(.75,.8),ce}),go.Shape.defineFigureGenerator("Fallout",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,te/2,ee/2,te/2,ee/2));function he(ve,Ee,Le){ve.add(new go.PathSegment(go.PathSegment.Move,(.3+Ee)*te,(.8+Le)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.5+Ee)*te,(.5+Le)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.1+Ee)*te,(.5+Le)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.3+Ee)*te,(.8+Le)*ee).close())}return he(se,0,0),he(se,.4,0),he(se,.2,-.3),ce}),go.Shape.defineFigureGenerator("IrritationHazard",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.2*te,0,!0);return ce.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()),ce.spot1=new go.Spot(.3,.3),ce.spot2=new go.Spot(.7,.7),ce}),go.Shape.defineFigureGenerator("ElectricalHazard",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.37*te,0,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("FireHazard",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*te,ee,!0);return ce.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()),ce.spot1=new go.Spot(.07,.445),ce.spot2=new go.Spot(.884,.958),ce}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(De,te,ee){var ce=new go.Geometry,se=.5,he=0,ve=0,Ee=se*Me,Le=.4*Math.SQRT2/2+.5,Ne=.5-.5*Math.SQRT2/2,je=1,ze=.5,Ye=.5,Xe=0,lt=new go.PathFigure(Le*te,(1-Ne)*ee,!1);return ce.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,je*te,ze*ee,je*te,.7*ee,je*te,ze*ee)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Ye+he)*te,(Xe+he)*ee,(.5+se+he)*te,(.5-Ee+he)*ee,(.5+Ee+he)*te,(.5-se+he)*ee)),lt.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)),lt.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)),lt.add(new go.PathSegment(go.PathSegment.Move,(.25+he)*te,.8*ee)),lt.add(new go.PathSegment(go.PathSegment.Line,(.35+he)*te,.9*ee)),lt.add(new go.PathSegment(go.PathSegment.Line,(.2+he)*te,.95*ee)),ce}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*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)),ce}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,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)),ce}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(te,ee,!1);ce.add(he);var ve=new go.PathFigure(0,.5*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*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)),ce}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*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()),ce}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,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 ce.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)),ce}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.7*te,ee,!0);ce.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 ce.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)),ce}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(.335*te,(1-.555)*ee,!0);ce.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,Le=ve,Ne=Math.PI/4,je=4*(1-Math.cos(Ne))/(3*Math.sin(Ne)),ze=je*.5,Ye=ve,Xe=ve,lt=je*Ye,Ze=je*Xe;he.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-Ye)*te,Le*ee,(Ee-(lt+Ye)/2)*te,(Le+(Xe+Ze)/2)*ee,(Ee-Ye)*te,(Le+Ze)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,(Le-Xe)*ee,(Ee-Ye)*te,(Le-Ze)*ee,(Ee-lt)*te,(Le-Xe)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+Ye)*te,Le*ee,(Ee+lt)*te,(Le-Xe)*ee,(Ee+Ye)*te,(Le-Ze)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*te,(1-.595)*ee,(Ee+Ye)*te,(Le+Ze)*ee,(Ee+(lt+Ye)/2)*te,(Le+(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 Lt=new go.PathFigure(.2*te,ee,!1);ce.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*te,.8*ee));var rt=new go.PathFigure(.8*te,ee,!1);return ce.add(rt),rt.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),ce}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*te,0,!0);ce.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 ce.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)),ce}),go.Shape.defineFigureGenerator("BpmnEventError",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*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()),ce}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var he=new go.PathFigure(te,ee,!1);ce.add(he);var ve=new go.PathFigure(.1*te,ee,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Caution",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.05*te,ee,!0);ce.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)),ce}),go.Shape.defineFigureGenerator("Recycle",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.45*te,.95*ee,!1);ce.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);ce.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 ce.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)),ce}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(De,te,ee){var ce=new go.Geometry,se=.5,he=Me*.5,ve=new go.PathFigure(te,se*ee,!0);ce.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 ce.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)),ce}),go.Shape.defineFigureGenerator("Package",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,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 ce.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()),ce.spot1=new go.Spot(0,.1),ce.spot2=new go.Spot(1,1),ce}),go.Shape.defineFigureGenerator("Class",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(0,.5*ee,!1);return ce.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close()),ce}),go.Shape.defineFigureGenerator("Component",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te,ee,!0);ce.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);ce.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 ce.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()),ce}),go.Shape.defineFigureGenerator("Boat Shipment",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.15*te,.6*ee,!0);ce.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 ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),ce}),go.Shape.defineFigureGenerator("Customer/Supplier",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te,ee,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Workcell",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,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()),ce}),go.Shape.defineFigureGenerator("Supermarket",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,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)),ce}),go.Shape.defineFigureGenerator("TruckShipment",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*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);ce.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=Me*.1,Le=.2,Ne=.9,je=new go.PathFigure((Le-ve)*te,Ne*ee,!0);ce.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne-ve)*ee,(Le-ve)*te,(Ne-Ee)*ee,(Le-Ee)*te,(Ne-ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Le+ve)*te,Ne*ee,(Le+Ee)*te,(Ne-ve)*ee,(Le+ve)*te,(Ne-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne+ve)*ee,(Le+ve)*te,(Ne+Ee)*ee,(Le+Ee)*te,(Ne+ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Le-ve)*te,Ne*ee,(Le-Ee)*te,(Ne+ve)*ee,(Le-ve)*te,(Ne+Ee)*ee).close()),ve=.1,Ee=Me*.1,Le=.8,Ne=.9;var ze=new go.PathFigure((Le-ve)*te,Ne*ee,!0);return ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne-ve)*ee,(Le-ve)*te,(Ne-Ee)*ee,(Le-Ee)*te,(Ne-ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Le+ve)*te,Ne*ee,(Le+Ee)*te,(Ne-ve)*ee,(Le+ve)*te,(Ne-Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(Ne+ve)*ee,(Le+ve)*te,(Ne+Ee)*ee,(Le+Ee)*te,(Ne+ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Le-ve)*te,Ne*ee,(Le-Ee)*te,(Ne+ve)*ee,(Le-ve)*te,(Ne+Ee)*ee).close()),ce}),go.Shape.defineFigureGenerator("KanbanPost",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.2*te,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Forklift",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*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);ce.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);ce.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);ce.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee));var Le=.1,Ne=Me*.1,je=.1,ze=.9,Ye=new go.PathFigure((je-Le)*te,ze*ee,!0);ce.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(ze-Le)*ee,(je-Le)*te,(ze-Ne)*ee,(je-Ne)*te,(ze-Le)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(je+Le)*te,ze*ee,(je+Ne)*te,(ze-Le)*ee,(je+Le)*te,(ze-Ne)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(ze+Le)*ee,(je+Le)*te,(ze+Ne)*ee,(je+Ne)*te,(ze+Le)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(je-Le)*te,ze*ee,(je-Ne)*te,(ze+Le)*ee,(je-Le)*te,(ze+Ne)*ee)),Le=.1,Ne=Me*.1,je=.4,ze=.9;var Xe=new go.PathFigure((je-Le)*te,ze*ee,!0);return ce.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(ze-Le)*ee,(je-Le)*te,(ze-Ne)*ee,(je-Ne)*te,(ze-Le)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(je+Le)*te,ze*ee,(je+Ne)*te,(ze-Le)*ee,(je+Le)*te,(ze-Ne)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,je*te,(ze+Le)*ee,(je+Le)*te,(ze+Ne)*ee,(je+Ne)*te,(ze+Le)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(je-Le)*te,ze*ee,(je-Ne)*te,(ze+Le)*ee,(je-Le)*te,(ze+Ne)*ee)),ce}),go.Shape.defineFigureGenerator("RailShipment",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.1*te,.4*ee,!0);ce.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);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee));var ve=new go.PathFigure(.55*te,.4*ee,!0);ce.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,ze=Me*.05,Ye=.175,Xe=.95,Ee=new go.PathFigure((Ye-je)*te,Xe*ee,!0);ce.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Ye*te,(Xe-je)*ee,(Ye-je)*te,(Xe-ze)*ee,(Ye-ze)*te,(Xe-je)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ye+je)*te,Xe*ee,(Ye+ze)*te,(Xe-je)*ee,(Ye+je)*te,(Xe-ze)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Ye*te,(Xe+je)*ee,(Ye+je)*te,(Xe+ze)*ee,(Ye+ze)*te,(Xe+je)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Ye-je)*te,Xe*ee,(Ye-ze)*te,(Xe+je)*ee,(Ye-je)*te,(Xe+ze)*ee));var je=.05,ze=Me*.05,Ye=.375,Xe=.95,Le=new go.PathFigure((Ye-je)*te,Xe*ee,!0);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ye*te,(Xe-je)*ee,(Ye-je)*te,(Xe-ze)*ee,(Ye-ze)*te,(Xe-je)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Ye+je)*te,Xe*ee,(Ye+ze)*te,(Xe-je)*ee,(Ye+je)*te,(Xe-ze)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Ye*te,(Xe+je)*ee,(Ye+je)*te,(Xe+ze)*ee,(Ye+ze)*te,(Xe+je)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Ye-je)*te,Xe*ee,(Ye-ze)*te,(Xe+je)*ee,(Ye-je)*te,(Xe+ze)*ee));var je=.05,ze=Me*.05,Ye=.625,Xe=.95,Ne=new go.PathFigure((Ye-je)*te,Xe*ee,!0);ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ye*te,(Xe-je)*ee,(Ye-je)*te,(Xe-ze)*ee,(Ye-ze)*te,(Xe-je)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ye+je)*te,Xe*ee,(Ye+ze)*te,(Xe-je)*ee,(Ye+je)*te,(Xe-ze)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,Ye*te,(Xe+je)*ee,(Ye+je)*te,(Xe+ze)*ee,(Ye+ze)*te,(Xe+je)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(Ye-je)*te,Xe*ee,(Ye-ze)*te,(Xe+je)*ee,(Ye-je)*te,(Xe+ze)*ee));var je=.05,ze=Me*.05,Ye=.825,Xe=.95,lt=new go.PathFigure((Ye-je)*te,Xe*ee,!0);ce.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,Ye*te,(Xe-je)*ee,(Ye-je)*te,(Xe-ze)*ee,(Ye-ze)*te,(Xe-je)*ee)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Ye+je)*te,Xe*ee,(Ye+ze)*te,(Xe-je)*ee,(Ye+je)*te,(Xe-ze)*ee)),lt.add(new go.PathSegment(go.PathSegment.Bezier,Ye*te,(Xe+je)*ee,(Ye+je)*te,(Xe+ze)*ee,(Ye+ze)*te,(Xe+je)*ee)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Ye-je)*te,Xe*ee,(Ye-ze)*te,(Xe+je)*ee,(Ye-je)*te,(Xe+ze)*ee).close());var Ze=new go.PathFigure(0,ee,!1);return ce.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),ce}),go.Shape.defineFigureGenerator("Warehouse",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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);ce.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(.15*te,ee,!0);ce.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,Le=Me*.05,Ne=.35,je=.775,ze=new go.PathFigure((Ne-Ee)*te,je*ee,!0);return ce.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(je-Ee)*ee,(Ne-Ee)*te,(je-Le)*ee,(Ne-Le)*te,(je-Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ne+Ee)*te,je*ee,(Ne+Le)*te,(je-Ee)*ee,(Ne+Ee)*te,(je-Le)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Ne*te,(je+Ee)*ee,(Ne+Ee)*te,(je+Le)*ee,(Ne+Le)*te,(je+Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Ne-Ee)*te,je*ee,(Ne-Le)*te,(je+Ee)*ee,(Ne-Ee)*te,(je+Le)*ee).close()),ce}),go.Shape.defineFigureGenerator("ControlCenter",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*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()),ce}),go.Shape.defineFigureGenerator("Bluetooth",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,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)),ce}),go.Shape.defineFigureGenerator("Bookmark",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*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)),ce}),go.Shape.defineFigureGenerator("Bookmark",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*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)),ce}),go.Shape.defineFigureGenerator("Globe",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Wave",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*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)),ce}),go.Shape.defineFigureGenerator("Operator",function(De,te,ee){var ce=new go.Geometry,se=.3,he=Me*.3,ve=.5,Ee=.7,Le=new go.PathFigure((ve-se)*te,Ee*ee,!0);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.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 Ne=new go.PathFigure(0,.7*ee,!1);return ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,te,.7*ee,0,0,te,0)),ce}),go.Shape.defineFigureGenerator("TripleFanBlades",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);return ce.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)),ce}),go.Shape.defineFigureGenerator("CentrifugalPump",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te,0,!0);return ce.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)),ce}),go.Shape.defineFigureGenerator("Battery",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,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 ce.add(he),he.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),ce}),go.Shape.defineFigureGenerator("Delete",function(De,te,ee){var ce=new go.Geometry,se=.5,he=Me*.5,ve=.5,Ee=.5,Le=new go.PathFigure((ve-se)*te,Ee*ee,!0);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.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 Ne=new go.PathFigure(.15*te,.5*ee,!1);return ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,.85*te,.5*ee)),ce}),go.Shape.defineFigureGenerator("Flag",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*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()),ce}),go.Shape.defineFigureGenerator("Help",function(De,te,ee){var ce=new go.Geometry,se=.5,he=Me*.5,ve=.5,Ee=.5,Le=new go.PathFigure((ve-se)*te,Ee*ee,!1);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.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=Me*.05,ve=.5,Ee=.8;var Ne=new go.PathFigure((ve-se)*te,Ee*ee,!1);return ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Ne.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()),Ne.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),Ne.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,.75*te,.475*ee,.75*te,.225*ee)),Ne.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.35*ee,.4*te,.2*ee,.3*te,.25*ee)),ce}),go.Shape.defineFigureGenerator("Location",function(De,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(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,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 ce.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)),ce}),go.Shape.defineFigureGenerator("Unlocked",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,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 ce.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)),ce}),go.Shape.defineFigureGenerator("Gear",function(De,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(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*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()),ce}),go.Shape.defineFigureGenerator("Map",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*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)),ce}),go.Shape.defineFigureGenerator("Eject",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee,!0);ce.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 ce.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()),ce}),go.Shape.defineFigureGenerator("Pencil",function(De,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(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*1,ee*1,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*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);ce.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);ce.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);ce.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 Le=new go.PathFigure(.5*te,.1*ee,!1);return ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*te,.3*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*te,.3*ee).close()),ce}),go.Shape.defineFigureGenerator("Staircase",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,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()),ce}),go.Shape.defineFigureGenerator("5Bars",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,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);ce.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);ce.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);ce.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 Le=new go.PathFigure(te*.816,ee,!0);return ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,te*.816,ee*(1-.184*4))),Le.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-.184*5))),Le.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1).close()),ce}),go.Shape.defineFigureGenerator("PC",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,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);ce.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);ce.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);ce.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 Le=new go.PathFigure(te*1,0,!0);return ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,te*.4,0)),Le.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.65)),Le.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.65).close()),ce}),go.Shape.defineFigureGenerator("Plane",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(.55*te,ee,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Key",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*1,ee*.5,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("FilmTape",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,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);ce.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);ce.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);ce.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 Le=new go.PathFigure(te*(.11+.24133333*2+.028*2),ee*.1,!1);return ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.1)),Le.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.8)),Le.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*2),ee*.8).close()),ce}),go.Shape.defineFigureGenerator("FloppyDisk",function(De,te,ee){var ce=new go.Geometry,se=8,he=se*Me,ve=new go.PathFigure(se,0,!1);ce.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);ce.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 Le=new go.PathFigure(te*.83,ee*1,!1);ce.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.5)),Le.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.5)),Le.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*1).close());var Ne=new go.PathFigure(te*.78,ee*.05,!1);return ce.add(Ne),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.05)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.25)),Ne.add(new go.PathSegment(go.PathSegment.Line,te*.78,ee*.25).close()),ce}),go.Shape.defineFigureGenerator("SpeechBubble",function(De,te,ee){var ce=De?De.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=15),ce=Math.min(ce,te/3),ce=Math.min(ce,ee/3);var se=ce*Me,he=ee*.8,ve=new go.Geometry,Ee=new go.PathFigure(ce,0,!0);return ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te-ce,0)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te,ce,te-se,0,te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he-ce)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-ce,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,ce,he)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,he-ce,se,he,0,he-se)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,ce)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,se,se,0).close()),se>1?(ve.spot1=new go.Spot(0,0,se,se),ve.spot2=new go.Spot(1,.8,-se,-se)):(ve.spot1=go.Spot.TopLeft,ve.spot2=new go.Spot(1,.8)),ve}),go.Shape.defineFigureGenerator("Repeat",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*0,ee*.45,!0);ce.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 ce.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()),ce}),go.Shape.defineFigureGenerator("Windows",function(De,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(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*0,ee*.1,!1);ce.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);ce.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 ce.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()),ce}),go.Shape.defineFigureGenerator("Beaker",function(De,te,ee){var ce=new go.Geometry,se=15,he=se*Me,ve=new go.PathFigure(te*.62,ee*.475,!0);return ce.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?(ce.spot1=new go.Spot(0,0,he,he),ce.spot2=new go.Spot(1,1,-he,-he)):(ce.spot1=go.Spot.TopLeft,ce.spot2=go.Spot.BottomRight),ce}),go.Shape.defineFigureGenerator("Download",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);ce.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 ce.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()),ce}),go.Shape.defineFigureGenerator("Bin",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);ce.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()),ce}),go.Shape.defineFigureGenerator("Upload",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);ce.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 ce.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()),ce}),go.Shape.defineFigureGenerator("EmptyDrink",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);return ce.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()),ce}),go.Shape.defineFigureGenerator("Drink",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);ce.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 ce.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()),ce}),go.Shape.defineFigureGenerator("4Arrows",function(De,te,ee){var ce=new go.Geometry,se=new go.PathFigure(te*.5,ee*0,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},80727:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var _n={},yn="5.0",me={},le=null,Te=!1,He=!1,st=null,We=!1,ct=null,Me=null,bt=0;bt<arguments.length;bt++){var Pt=arguments[bt];if(Pt!==null)switch(typeof Pt){case"number":yn=Pt.toFixed(1);break;case"string":Pt.match(new RegExp("^[0-9]\\.[0-9]+$"))?yn=Pt:st=Pt;break;case"object":typeof Pt.is3D!="undefined"?le=Pt:me=Pt;break;case"boolean":Te=Pt,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)),st!==null&&me.id===void 0&&(me.id=st);var Ge="",ut="",mt=!1,yt=null,De=null,te=null,ee=!1,ce=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 Le=function(_t){return parseFloat(_t)>4?parseFloat(_t):5};_n.setHTML5Codebase=function(_t,qt){Me=_t,Rt(_t,qt)},_n.setJavaCodebase=_n.setJavaCodebaseVersion=_n.isCompiledInstalled=_n.setPreCompiledScriptPath=_n.setPreCompiledResourcePath=function(){},_n.setHTML5CodebaseVersion=function(_t,qt){var cn=parseFloat(_t);if(cn!==NaN&&cn<5){console.log("The GeoGebra HTML5 codebase version "+cn+" is deprecated. Using version latest instead.");return}ct=_t,Ue(_t,qt)},_n.getHTML5CodebaseVersion=function(){return De},_n.getParameters=function(){return me},_n.setFontsCSSURL=function(_t){ve=_t},_n.setGiacJSURL=function(_t){},_n.setJNLPFile=function(_t){Ge=_t},_n.setJNLPBaseDir=function(_t){},_n.inject=function(){function _t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var qt="auto",cn=me.id,Gn,gn=!1,Zn=0;Zn<arguments.length;Zn++){var Ct=arguments[Zn];typeof Ct=="string"?(Ct=Ct.toLowerCase(),Ct.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?qt=Ct:cn=arguments[Zn]):typeof Ct=="boolean"?gn=Ct:Ct instanceof HTMLElement&&(Gn=Ct)}Wn();function Wn(){if(!We){setTimeout(Wn,200);return}qt=Mt(qt);var di=Gn||document.getElementById(cn);if(!di){console.log("possibly bug on ajax loading? ");return}if(_n.removeExistingApplet(di,!1),me.width===void 0&&di.clientWidth&&(me.width=di.clientWidth),me.height===void 0&&di.clientHeight&&(me.height=di.clientHeight),!(me.width&&me.height)&&qt==="html5"&&(delete me.width,delete me.height),yt=qt,qt==="screenshot")rt(di,me);else{var Kt=!1;me.hasOwnProperty("playButton")&&me.playButton||me.hasOwnProperty("clickToLoad")&&me.clickToLoad?Kt=!0:me.hasOwnProperty("playButtonAutoDecide")&&me.playButtonAutoDecide&&(Kt=(!Ne()||_t())&&je()),Kt?(yt="screenshot",wt(di,me,gn,qt)):Lt(di,me,gn)}}};function Ne(){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}_n.getViews=function(){return le},_n.isJavaInstalled=function(){return!1};var ze=function(_t){var qt=function(Zn){var Ct=JSON.parse(Zn),Wn=function(ln){return ln.type=="G"||ln.type=="E"},di=Ct.elements?Ct.elements.filter(Wn)[0]:Ct;if(!di||!di.url){cn();return}me.fileName=di.url,Ye(di.settings||{}),le.is3D=!0;var Kt="https://www.geogebra.org/images/";_n.setPreviewImage(ce||di.previewUrl,Kt+"GeoGebra_loading.png",Kt+"applet_play.png"),_t()},cn=function(){me.onError&&me.onError(),Pn("Error: Fetching material (id "+me.material_id+") failed.",me)},Gn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",gn="/materials/"+me.material_id+"?scope=basic";Xe("https://"+Gn+"/api/proxy.php?path="+encodeURIComponent(gn),qt,cn)};function Ye(_t){var qt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(cn){_t[cn]=!!_t[cn]}),qt.forEach(function(cn){me[cn]===void 0&&_t[cn]!==void 0&&(me[cn]=_t[cn])}),me.showToolBarHelp===void 0&&(me.showToolBarHelp=me.showToolBar)}function Xe(_t,qt,cn){var Gn=new XMLHttpRequest;Gn.open("GET",_t),Gn.onload=function(){qt(Gn.responseText)},Gn.onerror=cn,Gn.send()}_n.isHTML5Installed=function(){return!0},_n.getLoadedAppletType=function(){return yt},_n.setPreviewImage=function(_t,qt,cn){ce=_t,se=qt,he=cn},_n.removeExistingApplet=function(_t,qt){var cn;typeof _t=="string"&&(_t=document.getElementById(_t)),yt=null;var Gn=null;for(cn=0;cn<_t.childNodes.length;cn++){var gn=_t.childNodes[cn],Zn=gn.className;Zn==="applet_screenshot"?qt?(gn.style.display="block",yt="screenshot"):gn.style.display="none":Zn!=="applet_scaler prerender"&&(_t.removeChild(gn),Gn=Zn&&Zn.indexOf("appletParameters")!=-1?gn.id:null,cn--)}var Ct=me.id!==void 0?me.id:Gn,Wn=window[Ct];Wn&&typeof Wn.getBase64=="function"&&(Wn.remove(),window[Ct]=null)},_n.refreshHitPoints=function(){if(Le(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var _t=_n.getAppletObject();return _t&&typeof _t.recalculateEnvironments=="function"?(_t.recalculateEnvironments(),!0):!1},_n.startAnimation=function(){var _t=_n.getAppletObject();return _t&&typeof _t.startAnimation=="function"?(_t.startAnimation(),!0):!1},_n.stopAnimation=function(){var _t=_n.getAppletObject();return _t&&typeof _t.stopAnimation=="function"?(_t.stopAnimation(),!0):!1},_n.getAppletObject=function(){var _t=me.id!==void 0?me.id:"ggbApplet";return window[_t]},_n.resize=function(){};var lt=function(_t,qt,cn){var Gn=document.createElement("param");Gn.setAttribute("name",qt),Gn.setAttribute("value",cn),_t.appendChild(Gn)},Ze=function(_t){return _t&&_t!=="false"},Lt=function(_t,qt,cn){Le(De)<=4.2&&(cn=!0);var Gn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==De||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Gn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var gn=document.createElement("div");gn.classList.add("appletParameters","notranslate");var Zn=qt.width,Ct=qt.height;if(qt.disableAutoScale=qt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():qt.disableAutoScale,qt.width!==void 0)if(Le(De)<=4.4)Ze(qt.showToolBar)&&(qt.height-=7),Ze(qt.showAlgebraInput)&&(qt.height-=37),qt.width<605&&Ze(qt.showToolBar)&&(qt.width=605,Zn=605);else{var Wn=100;(Ze(qt.showToolBar)||Ze(qt.showMenuBar))&&(qt.hasOwnProperty("customToolBar")&&(qt.customToolbar=qt.customToolBar),Wn=Ze(qt.showMenuBar)?245:155),Zn<Wn&&(qt.width=Wn,Zn=Wn)}gn.style.border="none",gn.style.display="inline-block";for(var di in qt)qt.hasOwnProperty(di)&&di!=="appletOnLoad"&&gn.setAttribute("data-param-"+di,qt[di]);ve&&gn.setAttribute("data-param-fontscssurl",ve),_n.resize=function(){GGBAppletUtils.responsiveResize(_t,qt)},window.addEventListener("resize",function(ye){_n.resize()});var Kt=typeof qt.appletOnLoad=="function"?qt.appletOnLoad:function(){};if(!cn&&qt.width!==void 0){qt.hasOwnProperty("showSplash")||gn.setAttribute("data-param-showSplash","false");var ln=_t.querySelector(".applet_scaler.prerender"),$t=ln!==null;if($t)var Tt=ln.querySelector(".ggb_preview");else{var Tt=Wt(Zn,Ct,qt.borderColor,!1);ln=document.createElement("div"),ln.className="applet_scaler",ln.style.position="relative",ln.style.display="block",ln.style.width=Zn+"px",ln.style.height=Ct+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(ln,"66%"),Le(De)>=5?(qt.appletOnLoad=function(ye){var Oe=_t.querySelector(".ggb_preview");Oe&&Oe.parentNode.removeChild(Oe),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ln),window.GGBT_wsf_view&&$(window).trigger("resize"),Kt(ye)},$t||ln.appendChild(Tt)):gn.appendChild(Tt),ln.appendChild(gn),$t||_t.appendChild(ln),setTimeout(function(){_n.resize()},1)}else{var ft=document.createElement("div");ft.className="applet_scaler",ft.style.position="relative",ft.style.display="block",ft.appendChild(gn),_t.appendChild(ft),qt.appletOnLoad=function(ye){_n.resize(),Kt(ye)}}function $e(ye,Oe){Oe&&typeof Oe.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ye,Oe.appletOnLoad):renderGGBElement(ye),Pn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Oe)}function Gt(ye,Oe){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ye,params:Oe}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Ke){$e(Ke.article,Ke.params)}),html5AppletsToProcess=null)},Le(De)<5&&(ye.className+=" geogebraweb")):$e(ye,Oe)}if(Gn){scriptLoadStarted=!0;for(var Ht=0;Ht<gn.childNodes.length;Ht++){var ht=gn.childNodes[Ht].tagName;ht==="TABLE"&&(gn.removeChild(gn.childNodes[Ht]),Ht--)}if(ggbHTML5LoadedScript!==null){var at=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');at!=null&&at.parentNode.removeChild(at)}var Re=document.createElement("script"),Pe=function(){Gt(gn,qt)};Re.src=ut+te,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=De,ggbHTML5LoadedScript=Re.src,Pn("GeoGebra HTML5 codebase loaded: '"+ut+"'.",qt),!Me&&(!ct||ct=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Pe()):ut.requirejs?__webpack_require__.e(4184).then(function(){var ye=[__webpack_require__(74620)];Pe.apply(null,ye)}.bind(this)).catch(__webpack_require__.oe):(Re.onload=Pe,_t.appendChild(Re))}else Gt(gn,qt);qt.height=Ct,qt.width=Zn},rt=function(_t,qt,cn){var Gn=Wt(qt.width,qt.height,qt.borderColor,cn),gn=document.createElement("div");gn.style.position="relative",gn.style.display="block",gn.style.width=qt.width+"px",gn.style.height=qt.height+"px",gn.className="applet_screenshot applet_scaler"+(cn?" applet_screenshot_play":""),gn.appendChild(Gn);var Zn=GGBAppletUtils.getScale(qt,_t,cn);cn?(_t.appendChild(Dt()),window.GGBT_wsf_view||(_t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(gn,"66%"),_t.appendChild(gn),Zn!==1&&!isNaN(Zn)&&(GGBAppletUtils.scaleElement(gn,Zn),gn.style.width=qt.width+"px",gn.style.height=qt.height+"px",gn.parentNode.style.width=qt.width*Zn+"px",gn.parentNode.style.height=qt.height*Zn+"px"),_n.resize=function(){Ot(_t,Gn,gn,cn)},window.addEventListener("resize",function(Ct){_n.resize()}),_n.resize()};function Ot(_t,qt,cn,Gn){if(_t.contains(qt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_t.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(_t)}var gn=GGBAppletUtils.getScale(me,_t,Gn);cn.parentNode!==null&&(!isNaN(gn)&&gn!==1?(GGBAppletUtils.scaleElement(cn,gn),cn.parentNode.style.width=me.width*gn+"px",cn.parentNode.style.height=me.height*gn+"px"):(GGBAppletUtils.scaleElement(cn,1),cn.parentNode.style.width=me.width+"px",cn.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()}}_n.onExitFullscreen=function(_t,qt){qt.appendChild(_t)};var wt=function(_t,qt,cn,Gn){rt(_t,qt,!0);for(var gn=function(){var Wn=[];for(Ct=0;Ct<_t.childNodes.length;Ct++)Wn.push(_t.childNodes[Ct]);if(window.GGBT_wsf_view){var di=window.GGBT_wsf_view.renderFullScreen(_t,qt.id),Kt=document.getElementById("fullscreencontainer"),ln=jQuery(_t).find(".fullscreencontent");ln.length>0?(di.remove(),ln.attr("id","fullscreencontent").show(),jQuery(Kt).append(ln),window.dispatchEvent(new Event("resize"))):Lt(di,qt,!1),window.GGBT_wsf_view.launchFullScreen(Kt)}else yt=Gn,Lt(_t,qt,!1);if(!window.GGBT_wsf_view)for(Ct=0;Ct<Wn.length;Ct++)_t.removeChild(Wn[Ct])},Zn=_t.getElementsByClassName("ggb_preview_play"),Ct=0;Ct<Zn.length;Ct++)Zn[Ct].addEventListener("click",gn,!1),Zn[Ct].addEventListener("ontouchstart",gn,!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 qt='.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");}',cn=document.createElement("style");cn.styleSheet?cn.styleSheet.cssText=qt:cn.appendChild(document.createTextNode(qt)),document.getElementsByTagName("head")[0].appendChild(cn)}return _t},Wt=function(_t,qt,cn,Gn){var gn=document.createElement("div");gn.className="ggb_preview",gn.style.position="absolute",gn.style.zIndex="90",gn.style.width=_t-2+"px",gn.style.height=qt-2+"px",gn.style.top="0px",gn.style.left="0px",gn.style.overflow="hidden",gn.style.backgroundColor="white";var Zn="lightgrey";cn!==void 0&&(cn==="none"?Zn="transparent":Zn=cn),gn.style.border="1px solid "+Zn;var Ct=document.createElement("img");if(Ct.style.position="relative",Ct.style.zIndex="1000",Ct.style.top="-1px",Ct.style.left="-1px",ce!==null&&Ct.setAttribute("src",ce),Ct.style.opacity=.7,se!==null){var Wn,di,Kt;if(!Gn){Wn=document.createElement("img"),Wn.style.position="absolute",Wn.style.zIndex="1001",Wn.style.opacity=1,Ct.style.opacity=.3,di=360,di>_t/4*3&&(di=_t/4*3),Kt=di/5.8,Wn.setAttribute("src",se),Wn.setAttribute("width",di),Wn.setAttribute("height",Kt);var ln=(_t-di)/2,$t=(qt-Kt)/2;Wn.style.left=ln+"px",Wn.style.top=$t+"px",gn.appendChild(Wn)}}return gn.appendChild(Ct),gn},Mt=function(_t){return _t=_t.toLowerCase(),_t==="html5"||_t==="screenshot"?_t:"html5"},et=["web","webSimple","web3d","tablet","tablet3d","phone"],Ue=function(_t,qt){if(De=_t,qt){Rt(De,!0);return}var cn=!Te;if(cn){var Gn=Le(De);!isNaN(Gn)&&Gn<4.4&&(cn=!1)}var gn,Zn;window.location.protocol.substr(0,4)==="http"?gn=window.location.protocol:gn="http:";var Ct=De.indexOf("//");Ct>0?Zn=De:Ct===0?Zn=gn+De:Zn="https://www.geogebra.org/apps/5.2.814.0/";for(var Wn in et)if(De.slice(et[Wn].length*-1)===et[Wn]||De.slice((et[Wn].length+1)*-1)===et[Wn]+"/"){Rt(Zn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&cn&&!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")?Zn+="webSimple/":Zn+="web3d/",Rt(Zn,!1)},Rt=function(_t,qt){if(_t.requirejs){ut=_t;return}_t.slice(-1)!=="/"&&(_t+="/"),ut=_t,qt===null&&(qt=_t.indexOf("http")===-1),mt=qt,te="web.nocache.js",ee=!1;var cn=ut.split("/");cn.length>1&&(!qt&&cn[cn.length-2]==="webSimple"?(te="webSimple.nocache.js",ee=!0):et.indexOf(cn[cn.length-2])>=0&&(te=cn[cn.length-2]+".nocache.js")),cn=_t.split("/"),De=cn[cn.length-3],De.substr(0,4)==="test"?De=De.substr(4,1)+"."+De.substr(5,1):(De.substr(0,3)==="war"||De.substr(0,4)==="beta")&&(De="5.0");var Gn=parseFloat(De);Gn!==NaN&&Gn<5&&_t.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Gn+" is deprecated. Using version latest instead."),Ue("5.0",qt))},Pn=function(_t,qt){window.console&&window.console.log&&(!qt||typeof qt.showLogging=="undefined"||qt.showLogging&&qt.showLogging!=="false")&&console.log(_t)};me.material_id!==void 0?ze(xn):xn();function xn(){var _t=yn;ct!==null?_t=ct:parseFloat(_t)<5&&(_t="5.0"),Ue(_t,!1),Me!==null&&Rt(Me,mt),We=!0}return _n},GGBAppletUtils=function(){"use strict";function _n(){return window.GGBT_wsf_edit!==void 0}function yn(We,ct){ct!=1?(We.style.transformOrigin="0% 0% 0px",We.style.webkitTransformOrigin="0% 0% 0px",We.style.transform="scale("+ct+","+ct+")",We.style.webkitTransform="scale("+ct+","+ct+")",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,ct,Me,bt,Pt,Ge){var ut=null;if(Ge!=null&&Ge!="")for(var mt=We.parentNode;mt!=null;)if((" "+mt.className+" ").indexOf(" "+Ge+" ")>-1){ut=mt;break}else mt=mt.parentNode;var yt=0,De=0,te=0,ee=0,ce=0,se=0,he=0;if(ut)yt=ut.offsetWidth,De=Math.max(bt?ut.offsetWidth:0,ut.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(yt=Math.min(window.innerWidth,document.documentElement.clientWidth),De=Math.min(window.innerHeight,document.documentElement.clientHeight),te=yt):(yt=window.innerWidth,De=window.innerHeight,te=window.innerWidth),We){var ve=We.getBoundingClientRect();ve.left>0&&ve.left<=yt&&(Pt===void 0||!Pt)&&(document.dir==="rtl"?(ce=yt-ve.width-ve.left,se=te<=480?10:30):(se=ve.left,ce=te<=480?10:30),ee=se+ce)}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&&((Me===void 0||!Me)&&ct>0&&ct+ee<yt?yt=ct:yt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(De-=he)),{width:yt,height:De}}function le(We,ct,Me,bt,Pt){if(We.isScreenshoGenerator)return 1;var Ge=bt!==void 0&&bt,ut=We.noScaleMargin!=null&&We.noScaleMargin,mt=function(Ee){return Ee&&Ee!=="false"},yt=mt(We.autoHeight),De=me(ct,We.width,Me,yt,Ge&&window.GGBT_wsf_view||ut,Pt),te=parseInt(De.width),ee=We.width,ce=We.height;if(ee===void 0){var se=ct.querySelector(".appletParameters");se&&(ee=se.offsetWidth,ce=se.offsetHeight)}var he=te/ee,ve=Ge?1:De.height/ce;return Me!==void 0&&!Me&&(he=Math.min(1,he),ve=Math.min(1,ve)),Math.min(he,ve)}function Te(We,ct,Me){var bt=1,Pt,Ge=!1;if(We.hasOwnProperty("allowUpscale")&&(Ge=We.allowUpscale),We.hasOwnProperty("scale")&&(bt=parseFloat(We.scale),(isNaN(bt)||bt===null||bt===0)&&(bt=1),bt>1&&(Ge=!0)),ct&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ge=!0),!(We.hasOwnProperty("disableAutoScale")&&We.disableAutoScale))Pt=le(We,ct,Ge,Me,We.scaleContainerClass);else return bt;return Ge&&(!We.hasOwnProperty("scale")||bt===1)?Pt:Math.min(bt,Pt)}function He(We){var ct=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),bt=We.getBoundingClientRect(),Pt=(ct-bt.width)/2,Ge=(Me-bt.height)/2;Ge<0&&(Ge=0),We.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Pt<40?We.style.left="40px":We.style.left=Pt+"px",We.style.top=Ge+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ge<40?We.style.top="40px":We.style.top=Ge+"px",We.style.left=Pt+"px")}function st(We,ct){var Me=We.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ct.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(We)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var bt=Te(ct,We);_n()&&Me.setAttribute("data-param-scale",bt);for(var Pt=null,Ge=0;Ge<We.childNodes.length;Ge++)if(We.childNodes[Ge].className!==void 0&&We.childNodes[Ge].className.match(/^applet_scaler/)){Pt=We.childNodes[Ge];break}if(Pt!==null&&Pt.querySelector(".noscale")!==null)return;var ut=ct.id!==void 0?ct.id:"ggbApplet",mt=window[ut];(mt==null||!mt.recalculateEnvironments)&&Pt!==null&&!Pt.className.match(/fullscreen/)&&(Pt.parentNode.style.transform="",!isNaN(bt)&&bt!==1?(Pt.parentNode.style.width=ct.width*bt+"px",Pt.parentNode.style.height=ct.height*bt+"px",yn(Pt,bt)):(yn(Pt,1),Pt.parentNode.style.width=ct.width+"px",Pt.parentNode.style.height=ct.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($(Me).parents(".content-added-content"))}}return{responsiveResize:st,isFlexibleWorksheetEditor:_n,positionCenter:He,getScale:Te,scaleElement:yn}}();__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 _n=n.location.search;return _n.indexOf(J)!=-1||_n.indexOf(K)!=-1}function q(_n,yn){}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(_n){var yn=s[L].bindings;s[L].bindings=function(){for(var me=yn?yn():{},le=_n[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 _n=o.createElement(Q);if(_n.id=L,_n.style.cssText=R+S,_n.tabIndex=-1,o.body.appendChild(_n),t=_n.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var yn=document.compatMode==U?V:W;t.write(yn+X),t.close()}}}function w(_n){function yn(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 st(){if(!He){if(!Te())return;He=!0,le(),o.removeEventListener&&o.removeEventListener(Z,st,!1),We&&clearInterval(We)}}o.addEventListener&&o.addEventListener(Z,st,!1);var We=setInterval(function(){st()},$)}function me(le){var Te=u(),He=Te.body,st=Te.createElement(_);st.language=ab,st.crossOrigin=W,st.src=le,webModule.__errFn&&(st.onerror=function(){webModule.__errFn(L,new Error(bb+le))}),He.appendChild(st)}yn(function(){me(_n)})}webModule.__startLoadingFragment=function(_n){return C(_n)},webModule.__installRunAsyncCode=function(_n){var yn=u(),me=yn.body,le=yn.createElement(_);le.language=ab,le.text=_n,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(_n){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(_n){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(_n){var yn=c[_n];return yn==null?null:yn},r=d,webModule.__errFn=e}function B(){function _n(We){var ct=We.lastIndexOf(rb);ct==-1&&(ct=We.length);var Me=We.indexOf(sb);Me==-1&&(Me=We.length);var bt=We.lastIndexOf(tb,Math.min(Me,ct));return bt>=O?We.substring(O,bt+P):W}function yn(We){if(!We.match(/^\w+:\/\//)){var ct=o.createElement(ub);ct.src=We+vb,We=_n(ct.src)}return We}function me(){var We=__gwt_getMetaProperty(wb);return We!=null?We:W}function le(){for(var We=o.getElementsByTagName(_),ct=O;ct<We.length;++ct)if(We[ct].src.indexOf(xb)!=-1)return _n(We[ct].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 st=me();return st==W&&(st=le()),st==W&&(st=Te()),st==W&&He()&&(st=_n(o.location.href)),st=yn(st),st}function C(_n){return _n.match(/^\//)||_n.match(/^[a-zA-Z]+:\/\//)?_n:webModule.__moduleBase+_n}function D(){var _n=[],yn=O,me=[],le=[];function Te(We){var ct=le[We](),Me=me[We];if(ct in Me)return ct;var bt=[];for(var Pt in Me)bt[Me[Pt]]=Pt;throw r&&r(We,bt,ct),null}if(__gwt_isKnownPropertyValue=function(We,ct){return ct in me[We]},webModule.__getPropMap=function(){var We={};for(var ct in me)me.hasOwnProperty(ct)&&(We[ct]=Te(ct));return We},webModule.__computePropValue=Te,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var He;try{He=Cb;var st=He.indexOf(Db);st!=-1&&(yn=parseInt(He.substring(st+P),$),He=He.substring(O,st))}catch(We){}return webModule.__softPermutationId=yn,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})()},77903:function(_n,yn,me){"use strict";me.d(yn,{Ax:function(){return st},Ds:function(){return We},KI:function(){return Me},SI:function(){return He},f1:function(){return Te}});var le=me(3294);function Te(bt){let Pt=!0;if(bt.length>0){for(let Ge=0;Ge<bt.length;Ge++)if(bt[Ge].compile_success==0||!bt[Ge].compile_success){Pt=!1;break}}else Pt=!1;return Pt}function He(bt,Pt=""){let Ge=[];for(let ut=0;ut<bt.length;ut++){let mt=bt[ut],yt=Pt?`${Pt}/${mt.name}`:`${mt.name}`;Ge.push({title:mt.name,type:mt.type,isLeaf:mt.type!=="tree",key:yt})}return Ge}function st(bt,Pt,Ge){for(let ut=0;ut<bt.length;ut++){let mt=bt[ut];if(mt.key===Pt){mt.children=Ge;break}mt.children&&st(mt.children,Pt,Ge)}return bt}function We(bt,Pt,Ge){let ut;return function(){let mt=this,yt=arguments,De=function(){ut=null,Ge||bt.apply(mt,yt)},te=Ge&&!ut;clearTimeout(ut),ut=setTimeout(De,Pt),te&&bt.apply(mt,yt)}}const ct=!0,Me=le.Z.API_SERVER},6021:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return De}});var le=me(3113),Te=me(59301),He=Object.defineProperty,st=Object.defineProperties,We=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Pt=(te,ee,ce)=>ee in te?He(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:ce}):te[ee]=ce,Ge=(te,ee)=>{for(var ce in ee||(ee={}))Me.call(ee,ce)&&Pt(te,ce,ee[ce]);if(ct)for(var ce of ct(ee))bt.call(ee,ce)&&Pt(te,ce,ee[ce]);return te},ut=(te,ee)=>st(te,We(ee)),mt=(te,ee)=>{var ce={};for(var se in te)Me.call(te,se)&&ee.indexOf(se)<0&&(ce[se]=te[se]);if(te!=null&&ct)for(var se of ct(te))ee.indexOf(se)<0&&bt.call(te,se)&&(ce[se]=te[se]);return ce},yt=(te,ee,ce)=>new Promise((se,he)=>{var ve=Ne=>{try{Le(ce.next(Ne))}catch(je){he(je)}},Ee=Ne=>{try{Le(ce.throw(Ne))}catch(je){he(je)}},Le=Ne=>Ne.done?se(Ne.value):Promise.resolve(Ne.value).then(ve,Ee);Le((ce=ce.apply(te,ee)).next())});const De=te=>{var ee=te,{children:ce}=ee,se=mt(ee,["children"]);const[he,ve]=(0,Te.useState)(!1);return Te.createElement(le.ZP,ut(Ge({},se),{loading:he,onClick:Ee=>yt(void 0,null,function*(){try{ve(!0),yield se.onClick(Ee),ve(!1)}catch(Le){console.error(Le),ve(!1)}})}),ce)}},59155:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return yt}});var le=me(59301),Te=me(8591),He=me(92832),st={codeBox:"codeBox___WpkVl"},We=me(92310),ct=me.n(We),Me=Object.defineProperty,bt=(De,te,ee)=>te in De?Me(De,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):De[te]=ee,Pt=(De,te,ee)=>bt(De,typeof te!="symbol"?te+"":te,ee),Ge=(De,te,ee)=>new Promise((ce,se)=>{var he=Le=>{try{Ee(ee.next(Le))}catch(Ne){se(Ne)}},ve=Le=>{try{Ee(ee.throw(Le))}catch(Ne){se(Ne)}},Ee=Le=>Le.done?ce(Le.value):Promise.resolve(Le.value).then(he,ve);Ee((ee=ee.apply(De,te)).next())});class ut extends le.Component{constructor(te){super(te),Pt(this,"canvas"),Pt(this,"randomNum",(ee,ce)=>Math.floor(Math.random()*(ce-ee)+ee)),Pt(this,"drawPic",()=>{this.randomCode()}),Pt(this,"reloadPic",()=>{this.drawPic()}),Pt(this,"changeCode",ee=>{console.log(ee.target.value,222),this.setState({value:ee.target.value,showError:!1})}),Pt(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 ce=this.randomNum(te,ee),se=this.randomNum(te,ee),he=this.randomNum(te,ee);return`rgb(${ce}, ${se}, ${he})`}drawText(te,ee,ce){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;ce>0&&(Ee=he+ce*ve);let Le=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(Le=40);const Ne=this.randomNum(-10,10);te.translate(Ee,Le),te.rotate(Ne*Math.PI/180),te.fillText(ee,0,0),te.rotate(-Ne*Math.PI/180),te.translate(-Ee,-Le)}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 ce=0;ce<this.state.codeLength;ce++){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:ct()(st.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 mt=(De,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(ut,{ref:ce=>ee=ce})),onOk:()=>Ge(void 0,null,function*(){if(ee.onVerify())return Promise.reject();De()})})};var yt=ut},10672:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Pt}});var le=me(59301),Te=me(92832),He=me(12563),st=me(8591),We={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},ct=me(62772);const{TextArea:Me}=Te.default;class bt extends le.Component{constructor(ut){super(ut),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:ut,onAnswerChange:mt,addChildAnswer:yt,exerciseIsPublish:De,answers:te,activeOptionErrorIndex:ee,flex:ce="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",ut+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:Le=>{Le.preventDefault(),(te==null?void 0:te.length)===1&&Ee===0?this.props.deleteChildAnswermain(ut,Ee):this.props.deleteChildAnswer(ut,Ee)}},le.createElement("span",{onDoubleClick:Le=>{this.setState({EditInputIndex:Ee}),Le.preventDefault()}},ve)):le.createElement(Te.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Le=>{if(Le.target.value.replaceAll(" ","").length<=0){st.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}mt(ut,Ee,Le.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):le.createElement(Te.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Le=>{if(Le.target.value.replaceAll(" ","").length<=0){st.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}mt(ut,Ee,Le.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&le.createElement(He.default,{className:"site-tag-plus",onClick:()=>{yt(ut),this.setState({inputVisible:!0})}},le.createElement(ct.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var Pt=bt},65158:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return De}});var le=me(59301),Te=me(12290),He=Object.defineProperty,st=Object.defineProperties,We=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Pt=(te,ee,ce)=>ee in te?He(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:ce}):te[ee]=ce,Ge=(te,ee)=>{for(var ce in ee||(ee={}))Me.call(ee,ce)&&Pt(te,ce,ee[ce]);if(ct)for(var ce of ct(ee))bt.call(ee,ce)&&Pt(te,ce,ee[ce]);return te},ut=(te,ee)=>st(te,We(ee)),mt=(te,ee,ce)=>Pt(te,typeof ee!="symbol"?ee+"":ee,ce);const yt="\u2581";class De extends le.Component{constructor(){super(...arguments),mt(this,"getChCountBeforeCursor",(ee,ce)=>{const se=ce.line;let he=0;for(let Ee=0;Ee<se;Ee++)he+=ee.getLine(Ee).split(yt).length-1;const ve=ee.getLine(se).substring(0,ce.ch);return he+=ve.split(yt).length-1,he}),mt(this,"onCMBeforeChange",(ee,ce)=>{const se=ee.getRange(ce.from,ce.to);let he=0;if(ce.text.forEach(ve=>{he+=ve.split(yt).length-1}),se&&se.indexOf(yt)!=-1){const ve=se.split(yt).length-1,Ee=this.getChCountBeforeCursor(ee,ce.from);console.log(`\u5220\u9664${ve}\u4E2A\uFF0C \u4E4B\u524D\u6709${Ee}\u4E2A\uFF0C\u65B0\u589E${he}\u4E2A`),this.props.deleteEmptyDisabled?ce.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(Ee,ve,he)}else if(he){const ve=this.getChCountBeforeCursor(ee,ce.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,ut(Ge({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},23367:function(_n,yn,me){"use strict";me.d(yn,{d4:function(){return yt},VP:function(){return Pt}});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:De,active:te,className:ee})=>le.createElement("div",{className:`${Te.digitalLabel} ${te?Te.active:""} ${ee}`},De);var st=me(6848),We=me(92832),ct=me(8591),Me=me(59301),bt=(De,te,ee)=>new Promise((ce,se)=>{var he=Le=>{try{Ee(ee.next(Le))}catch(Ne){se(Ne)}},ve=Le=>{try{Ee(ee.throw(Le))}catch(Ne){se(Ne)}},Ee=Le=>Le.done?ce(Le.value):Promise.resolve(Le.value).then(he,ve);Ee((ee=ee.apply(De,te)).next())});const Pt=({defaultValue:De,onFinish:te})=>{const[ee,ce]=(0,le.useState)(!1),[se,he]=(0,le.useState)(De);return(0,le.useEffect)(()=>{he(De)},[De]),Me.createElement("div",{className:Te.titleEditor},ee?Me.createElement(We.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:se,onChange:ve=>{he(ve.target.value)},onBlur:()=>bt(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){ct.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&ce(!1)}),onPressEnter:()=>bt(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){ct.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&ce(!1)})}):Me.createElement("div",{className:Te.title,onDoubleClick:()=>ce(!0)},se,Me.createElement(st.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},Me.createElement("i",{className:`${Te.editIcon} iconfont icon-bianji_Hover`,onClick:()=>ce(!0)}))))};var Ge=me(95237),ut=me(43604),mt=(De,te,ee)=>new Promise((ce,se)=>{var he=Le=>{try{Ee(ee.next(Le))}catch(Ne){se(Ne)}},ve=Le=>{try{Ee(ee.throw(Le))}catch(Ne){se(Ne)}},Ee=Le=>Le.done?ce(Le.value):Promise.resolve(Le.value).then(he,ve);Ee((ee=ee.apply(De,te)).next())});const yt=({onChange:De=()=>mt(void 0,null,function*(){}),tabs:te,activeKey:ee,defaultActiveKey:ce,className:se=""})=>{var he,ve,Ee,Le,Ne,je,ze;const[Ye,Xe]=(0,le.useState)(ce===void 0?(he=te[0])==null?void 0:he.key:ce);return(0,le.useEffect)(()=>{ee!==void 0&&Xe(ee)},[ee]),le.createElement(Ge.Z,{justify:"center",align:"middle",className:`${Te.paperTab} ${se}`},le.createElement(ut.Z,{className:`${Te.tabItem} ${Ye===((ve=te[0])==null?void 0:ve.key)?Te.active:""}`,onClick:()=>mt(void 0,null,function*(){var lt;yield De(te[0].key),Xe((lt=te[0])==null?void 0:lt.key)})},le.createElement(He,{number:1,active:Ye===((Ee=te[0])==null?void 0:Ee.key),className:"mr10"}),le.createElement("span",null,(Le=te[0])==null?void 0:Le.label)),le.createElement(ut.Z,{flex:"188px",className:`${Te.dottedLine} ml30 mr30`}),le.createElement(ut.Z,{className:`${Te.tabItem} ${Ye===((Ne=te[1])==null?void 0:Ne.key)?Te.active:""}`,onClick:()=>mt(void 0,null,function*(){var lt,Ze;yield De((lt=te[1])==null?void 0:lt.key),Xe((Ze=te[1])==null?void 0:Ze.key)})},le.createElement(He,{number:2,active:Ye===((je=te[1])==null?void 0:je.key),className:"mr10"}),le.createElement("span",null,(ze=te[1])==null?void 0:ze.label)))}},32570:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return ct}});var le=me(60324),Te={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},He=me(32637),st=me(59301),ct=({type:Me,style:bt})=>{const Pt=st.createElement("div",{className:Te.wrap,onClick:Ge=>{Ge.preventDefault(),Ge.stopPropagation()}},st.createElement("p",null,Me==="shixun"||Me==="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",st.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Me==="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"),st.createElement("div",{className:Te.contact},st.createElement("div",{className:Te.img},st.createElement("img",{src:He,width:"124px",height:"124px"})),st.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return st.createElement(le.Z,{content:Pt},st.createElement("span",{className:Te.text,style:bt},"\u9AD8\u6D88\u8017"))}},16406:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return at}});var le=me(59301),Te={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},He=me(92310),st=me.n(He),We=me(71418);var ct=function(Re,Pe){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,Oe){ye.__proto__=Oe}||function(ye,Oe){for(var Ke in Oe)Object.prototype.hasOwnProperty.call(Oe,Ke)&&(ye[Ke]=Oe[Ke])})(Re,Pe)};function Me(Re,Pe){function ye(){this.constructor=Re}ct(Re,Pe),Re.prototype=Pe===null?Object.create(Pe):(ye.prototype=Pe.prototype,new ye)}function bt(Re,Pe,ye,Oe){return new(ye||(ye=Promise))(function(Ke,Fe){function Et(en){try{pn(Oe.next(en))}catch(wn){Fe(wn)}}function sn(en){try{pn(Oe.throw(en))}catch(wn){Fe(wn)}}function pn(en){var wn;en.done?Ke(en.value):(wn=en.value,wn instanceof ye?wn:new ye(function(hi){hi(wn)})).then(Et,sn)}pn((Oe=Oe.apply(Re,Pe||[])).next())})}function Pt(Re,Pe){var ye,Oe,Ke,Fe,Et={label:0,sent:function(){if(1&Ke[0])throw Ke[1];return Ke[1]},trys:[],ops:[]};return Fe={next:sn(0),throw:sn(1),return:sn(2)},typeof Symbol=="function"&&(Fe[Symbol.iterator]=function(){return this}),Fe;function sn(pn){return function(en){return function(wn){if(ye)throw new TypeError("Generator is already executing.");for(;Et;)try{if(ye=1,Oe&&(Ke=2&wn[0]?Oe.return:wn[0]?Oe.throw||((Ke=Oe.return)&&Ke.call(Oe),0):Oe.next)&&!(Ke=Ke.call(Oe,wn[1])).done)return Ke;switch(Oe=0,Ke&&(wn=[2&wn[0],Ke.value]),wn[0]){case 0:case 1:Ke=wn;break;case 4:return Et.label++,{value:wn[1],done:!1};case 5:Et.label++,Oe=wn[1],wn=[0];continue;case 7:wn=Et.ops.pop(),Et.trys.pop();continue;default:if(Ke=Et.trys,!((Ke=Ke.length>0&&Ke[Ke.length-1])||wn[0]!==6&&wn[0]!==2)){Et=0;continue}if(wn[0]===3&&(!Ke||wn[1]>Ke[0]&&wn[1]<Ke[3])){Et.label=wn[1];break}if(wn[0]===6&&Et.label<Ke[1]){Et.label=Ke[1],Ke=wn;break}if(Ke&&Et.label<Ke[2]){Et.label=Ke[2],Et.ops.push(wn);break}Ke[2]&&Et.ops.pop(),Et.trys.pop();continue}wn=Pe.call(Re,Et)}catch(hi){wn=[6,hi],Oe=0}finally{ye=Ke=0}if(5&wn[0])throw wn[1];return{value:wn[0]?wn[1]:void 0,done:!0}}([pn,en])}}}function Ge(){for(var Re=0,Pe=0,ye=arguments.length;Pe<ye;Pe++)Re+=arguments[Pe].length;var Oe=Array(Re),Ke=0;for(Pe=0;Pe<ye;Pe++)for(var Fe=arguments[Pe],Et=0,sn=Fe.length;Et<sn;Et++,Ke++)Oe[Ke]=Fe[Et];return Oe}var ut=function(){function Re(){}return Re.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Re.setAttributes=function(Pe,ye){for(var Oe=0,Ke=ye;Oe<Ke.length;Oe++){var Fe=Ke[Oe],Et=Fe[0],sn=Fe[1];Pe.setAttribute(Et,sn)}},Re.createRect=function(Pe,ye,Oe){var Ke=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ke.setAttribute("width",Pe.toString()),Ke.setAttribute("height",ye.toString()),Oe&&Re.setAttributes(Ke,Oe),Ke},Re.createLine=function(Pe,ye,Oe,Ke,Fe){var Et=document.createElementNS("http://www.w3.org/2000/svg","line");return Et.setAttribute("x1",Pe.toString()),Et.setAttribute("y1",ye.toString()),Et.setAttribute("x2",Oe.toString()),Et.setAttribute("y2",Ke.toString()),Fe&&Re.setAttributes(Et,Fe),Et},Re.createPolygon=function(Pe,ye){var Oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Oe.setAttribute("points",Pe),ye&&Re.setAttributes(Oe,ye),Oe},Re.createCircle=function(Pe,ye){var Oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return Oe.setAttribute("cx",(Pe/2).toString()),Oe.setAttribute("cy",(Pe/2).toString()),Oe.setAttribute("r",Pe.toString()),ye&&Re.setAttributes(Oe,ye),Oe},Re.createEllipse=function(Pe,ye,Oe){var Ke=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ke.setAttribute("cx",(Pe/2).toString()),Ke.setAttribute("cy",(ye/2).toString()),Ke.setAttribute("rx",(Pe/2).toString()),Ke.setAttribute("ry",(ye/2).toString()),Oe&&Re.setAttributes(Ke,Oe),Ke},Re.createGroup=function(Pe){var ye=document.createElementNS("http://www.w3.org/2000/svg","g");return Pe&&Re.setAttributes(ye,Pe),ye},Re.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Re.createMarker=function(Pe,ye,Oe,Ke,Fe,Et,sn){var pn=document.createElementNS("http://www.w3.org/2000/svg","marker");return Re.setAttributes(pn,[["id",Pe],["orient",ye],["markerWidth",Oe.toString()],["markerHeight",Ke.toString()],["refX",Fe.toString()],["refY",Et.toString()]]),pn.appendChild(sn),pn},Re.createText=function(Pe){var ye=document.createElementNS("http://www.w3.org/2000/svg","text");return ye.setAttribute("x","0"),ye.setAttribute("y","0"),Pe&&Re.setAttributes(ye,Pe),ye},Re.createTSpan=function(Pe,ye){var Oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Oe.textContent=Pe,ye&&Re.setAttributes(Oe,ye),Oe},Re.createImage=function(Pe){var ye=document.createElementNS("http://www.w3.org/2000/svg","image");return Pe&&Re.setAttributes(ye,Pe),ye},Re.createPoint=function(Pe,ye){var Oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Oe.x=Pe,Oe.y=ye,Oe},Re.createPath=function(Pe,ye){var Oe=document.createElementNS("http://www.w3.org/2000/svg","path");return Oe.setAttribute("d",Pe),ye&&Re.setAttributes(Oe,ye),Oe},Re}(),mt=function(){function Re(){}return Re.addKey=function(Pe){Re.key=Pe},Object.defineProperty(Re,"isLicensed",{get:function(){return!!Re.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Re.key)},enumerable:!1,configurable:!0}),Re}(),yt=function(){function Re(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Re.prototype.rasterize=function(Pe,ye,Oe){var Ke=this;return new Promise(function(Fe){var Et=Oe!==void 0?Oe:document.createElement("canvas");Pe===null&&(Ke.markersOnly=!0,Ke.naturalSize=!1);var sn=document.createElementNS("http://www.w3.org/2000/svg","svg");sn.setAttribute("xmlns","http://www.w3.org/2000/svg"),sn.setAttribute("width",ye.width.baseVal.valueAsString),sn.setAttribute("height",ye.height.baseVal.valueAsString),sn.setAttribute("viewBox","0 0 "+ye.viewBox.baseVal.width.toString()+" "+ye.viewBox.baseVal.height.toString()),sn.innerHTML=ye.innerHTML,Ke.naturalSize===!0?(sn.width.baseVal.value=Pe.naturalWidth,sn.height.baseVal.value=Pe.naturalHeight):Ke.width!==void 0&&Ke.height!==void 0&&(sn.width.baseVal.value=Ke.width,sn.height.baseVal.value=Ke.height),Et.width=sn.width.baseVal.value,Et.height=sn.height.baseVal.value;var pn=sn.outerHTML,en=Et.getContext("2d");Ke.markersOnly!==!0&&en.drawImage(Pe,0,0,Et.width,Et.height);var wn=window.URL,hi=new Image(Et.width,Et.height);hi.setAttribute("crossOrigin","anonymous");var Rn=new Blob([pn],{type:"image/svg+xml"}),Sn=wn.createObjectURL(Rn);hi.onload=function(){en.drawImage(hi,0,0),wn.revokeObjectURL(Sn);var Pi=Et.toDataURL(Ke.imageType,Ke.imageQuality);Fe(Pi)},hi.src=Sn})},Re}(),De=function(){},te=function(){function Re(Pe){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Pe+"_"}return Object.defineProperty(Re.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Re.prototype.addClass=function(Pe){return this.styleSheet===void 0&&this.addStyleSheet(),Pe.name=""+this.classNamePrefix+Pe.localName,this.classes.push(Pe),this.styleSheet.sheet.insertRule("."+Pe.name+" {"+Pe.style+"}",this.styleSheet.sheet.cssRules.length),Pe},Re.prototype.addRule=function(Pe){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Pe),this.styleSheet.sheet.insertRule(Pe.selector+" {"+Pe.style+"}",this.styleSheet.sheet.cssRules.length)},Re.prototype.addStyleSheet=function(){var Pe;this.styleSheet=document.createElement("style"),((Pe=this.styleSheetRoot)!==null&&Pe!==void 0?Pe:document.head).appendChild(this.styleSheet),this.addRule(new ee("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new ee("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ce("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ce("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Re.prototype.removeStyleSheet=function(){var Pe;this.styleSheet&&(((Pe=this.styleSheetRoot)!==null&&Pe!==void 0?Pe:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Re}(),ee=function(Re,Pe){this.selector=Re,this.style=Pe},ce=function(Re,Pe){this.localName=Re,this.style=Pe},se=function(){function Re(Pe,ye,Oe,Ke,Fe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Pe,this.displayMode=ye,this.markerItems=Oe,this.uiStyleSettings=Ke,this.styles=Fe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Re.prototype.show=function(Pe){var ye=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Pe,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Oe=document.createElement("div");Oe.className=this.toolbarBlockStyleClass.name,Oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(Oe),this.addActionButton(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Fe){var Et=document.createElement("div");Et.className=""+ye.toolbarButtonStyleClass.name,Et.setAttribute("data-type-name",Fe.typeName),Et.innerHTML=Fe.icon,Et.addEventListener("click",function(){ye.markerToolbarButtonClicked(Et,Fe)}),ye.buttons.push(Et),ye.markerButtons.push(Et)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Ke=document.createElement("div");Ke.className=this.toolbarBlockStyleClass.name,Ke.style.whiteSpace="nowrap",Ke.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ke),this.addActionButton(Ke,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Ke,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Re.prototype.addButtonClickListener=function(Pe){this.buttonClickListeners.push(Pe)},Re.prototype.removeButtonClickListener=function(Pe){this.buttonClickListeners.indexOf(Pe)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Pe),1)},Re.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Re.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Pe=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var ye=0;ye<this.markerButtons.length;ye++)ye<Pe||ye===Pe&&this.markerButtons.length-1===Pe?this.markerButtonBlock.appendChild(this.markerButtons[ye]):(ye===Pe&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[ye]))}},Re.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Re.prototype.resetButtonStyles=function(){var Pe=this;this.buttons.forEach(function(ye){ye.className=ye.className.replace(Pe.uiStyleSettings.toolbarButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarButtonStyleColorsClassName:Pe.toolbarButtonStyleColorsClass.name,"").trim(),ye.className=ye.className.replace(Pe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Pe.toolbarActiveButtonStyleColorsClass.name,"").trim(),ye.className+=" "+(Pe.uiStyleSettings.toolbarButtonStyleColorsClassName?Pe.uiStyleSettings.toolbarButtonStyleColorsClassName:Pe.toolbarButtonStyleColorsClass.name)})},Re.prototype.addActionButton=function(Pe,ye,Oe){var Ke=this,Fe=document.createElement("div");switch(Fe.className=""+this.toolbarButtonStyleClass.name,Fe.innerHTML=ye,Fe.setAttribute("data-action",Oe),Fe.addEventListener("click",function(){Ke.actionToolbarButtonClicked(Fe,Oe)}),Oe){case"select":Fe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Fe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Fe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Fe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Fe.style.fill=this.uiStyleSettings.closeButtonColor}Pe.appendChild(Fe),this.buttons.push(Fe)},Re.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ce("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 ce("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ce("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ce("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 ce("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ce("toolbar_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.toolbarButtonStyleColorsClass=this.styles.addClass(new ce("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ce("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new ee("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Re.prototype.markerToolbarButtonClicked=function(Pe,ye){this.setActiveButton(Pe),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Oe){return Oe("marker",ye)}),this.markerButtonOverflowBlock.style.display="none"},Re.prototype.actionToolbarButtonClicked=function(Pe,ye){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Oe){return Oe("action",ye)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Re.prototype.setActiveButton=function(Pe){this.resetButtonStyles(),Pe.className=Pe.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Re.prototype.setActiveMarkerButton=function(Pe){var ye=this.markerButtons.find(function(Oe){return Oe.getAttribute("data-type-name")===Pe});ye&&this.setActiveButton(ye)},Re.prototype.setCurrentMarker=function(Pe){var ye=this;this.currentMarker=Pe,this.buttons.filter(function(Oe){return/delete|notes/.test(Oe.getAttribute("data-action"))}).forEach(function(Oe){ye.currentMarker===void 0?(Oe.style.fillOpacity="0.4",Oe.style.pointerEvents="none"):(Oe.style.fillOpacity="1",Oe.style.pointerEvents="all")})},Re}(),he=function(){function Re(Pe,ye,Oe,Ke){this.panels=[],this.panelButtons=[],this.markerjsContainer=Pe,this.displayMode=ye,this.uiStyleSettings=Oe,this.styles=Ke,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Re.prototype.addStyles=function(){var Pe;this.toolboxStyleClass=this.styles.addClass(new ce("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 ce("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var ye=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ce("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ce("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ce("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 ce("toolbox-panel-row_colors",`
background-color: `+((Pe=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Pe!==void 0?Pe:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ce("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*ye)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*ye)+`px;
padding: `+ye+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ce("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ce("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new ee("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Re.prototype.show=function(Pe){var ye;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Pe,this.uiContainer.className=this.toolboxStyleClass.name+" "+((ye=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&ye!==void 0?ye:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Re.prototype.setPanelButtons=function(Pe){var ye,Oe,Ke=this;this.panels=Pe,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((ye=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&ye!==void 0?ye:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Oe!==void 0?Oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Fe){var Et;Fe.uiStyleSettings=Ke.uiStyleSettings;var sn=document.createElement("div");sn.className=Ke.toolboxButtonStyleClass.name+" "+((Et=Ke.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Et!==void 0?Et:Ke.toolboxButtonStyleColorsClass.name),sn.innerHTML=Fe.icon,sn.title=Fe.title,sn.addEventListener("click",function(){Ke.panelButtonClick(Fe)}),Ke.panelButtons.push(sn),Ke.buttonRow.appendChild(sn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Re.prototype.panelButtonClick=function(Pe){var ye=this,Oe=-1;if(Pe!==this.activePanel){Oe=this.panels.indexOf(Pe),this.panelRow.innerHTML="";var Ke=Pe.getUi();Ke.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ke),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=Pe}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){ye.displayMode==="inline"?ye.panelRow.style.display="none":ye.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Fe,Et){var sn,pn;Fe.className=ye.toolboxButtonStyleClass.name+" "+(Et===Oe?""+((sn=ye.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&sn!==void 0?sn:ye.toolboxActiveButtonStyleColorsClass.name):""+((pn=ye.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&pn!==void 0?pn:ye.toolboxButtonStyleColorsClass.name))})},Re}(),ve=function(Re,Pe){this.title=Re,this.icon=Pe},Ee=function(Re){function Pe(ye,Oe,Ke,Fe){var Et=Re.call(this,ye,Fe||'<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 Et.colors=[],Et.addTransparent=!1,Et.colorBoxes=[],Et.colors=Oe,Et.currentColor=Ke,Et.setCurrentColor=Et.setCurrentColor.bind(Et),Et.getColorBox=Et.getColorBox.bind(Et),Et}return Me(Pe,Re),Pe.prototype.getUi=function(){var ye=this,Oe=document.createElement("div");return Oe.style.overflow="hidden",Oe.style.whiteSpace="nowrap",this.colors.forEach(function(Ke){var Fe=ye.getColorBox(Ke);Oe.appendChild(Fe),ye.colorBoxes.push(Fe)}),Oe},Pe.prototype.getColorBox=function(ye){var Oe=this,Ke=this.uiStyleSettings.toolbarHeight/4,Fe=this.uiStyleSettings.toolbarHeight-Ke,Et=document.createElement("div");Et.style.display="inline-block",Et.style.boxSizing="content-box",Et.style.width=Fe-2+"px",Et.style.height=Fe-2+"px",Et.style.padding="1px",Et.style.marginRight="2px",Et.style.marginBottom="2px",Et.style.borderWidth="2px",Et.style.borderStyle="solid",Et.style.borderRadius=(Fe+2)/2+"px",Et.style.borderColor=ye===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Et.addEventListener("click",function(){Oe.setCurrentColor(ye,Et)});var sn=document.createElement("div");return sn.style.display="inline-block",sn.style.width=Fe-2+"px",sn.style.height=Fe-2+"px",sn.style.backgroundColor=ye,sn.style.borderRadius=Fe/2+"px",ye==="transparent"&&(sn.style.fill=this.uiStyleSettings.toolboxAccentColor,sn.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>`),Et.appendChild(sn),Et},Pe.prototype.setCurrentColor=function(ye,Oe){var Ke=this;this.currentColor=ye,this.colorBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===Oe?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(ye)},Pe}(ve),Le=function(){function Re(Pe,ye,Oe){this._state="new",this._isSelected=!1,this._container=Pe,this._overlayContainer=ye,this.globalSettings=Oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Re.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Re.prototype.ownsTarget=function(Pe){return!1},Object.defineProperty(Re.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Re.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Re.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Re.prototype.pointerDown=function(Pe,ye){},Re.prototype.dblClick=function(Pe,ye){},Re.prototype.manipulate=function(Pe){},Re.prototype.pointerUp=function(Pe){this.stateChanged()},Re.prototype.dispose=function(){},Re.prototype.addMarkerVisualToContainer=function(Pe){this.container.childNodes.length>0?this.container.insertBefore(Pe,this.container.childNodes[0]):this.container.appendChild(Pe)},Re.prototype.getState=function(){return{typeName:Re.typeName,state:this.state,notes:this.notes}},Re.prototype.restoreState=function(Pe){this._state=Pe.state,this.notes=Pe.notes},Re.prototype.scale=function(Pe,ye){},Re.prototype.colorChanged=function(Pe){this.onColorChanged&&this.onColorChanged(Pe),this.stateChanged()},Re.prototype.fillColorChanged=function(Pe){this.onFillColorChanged&&this.onFillColorChanged(Pe),this.stateChanged()},Re.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Pe=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Pe.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Pe)&&this.onStateChanged(this)}},Re.typeName="MarkerBase",Re}(),Ne=function(){function Re(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Re.prototype.findGripByVisual=function(Pe){return this.topLeft.ownsTarget(Pe)?this.topLeft:this.topCenter.ownsTarget(Pe)?this.topCenter:this.topRight.ownsTarget(Pe)?this.topRight:this.centerLeft.ownsTarget(Pe)?this.centerLeft:this.centerRight.ownsTarget(Pe)?this.centerRight:this.bottomLeft.ownsTarget(Pe)?this.bottomLeft:this.bottomCenter.ownsTarget(Pe)?this.bottomCenter:this.bottomRight.ownsTarget(Pe)?this.bottomRight:void 0},Re}(),je=function(){function Re(){this.GRIP_SIZE=10,this.visual=ut.createGroup(),this.visual.appendChild(ut.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ut.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Re.prototype.ownsTarget=function(Pe){return Pe===this.visual||Pe===this.visual.childNodes[0]||Pe===this.visual.childNodes[1]},Re}(),ze=function(){function Re(){}return Re.toITransformMatrix=function(Pe){return{a:Pe.a,b:Pe.b,c:Pe.c,d:Pe.d,e:Pe.e,f:Pe.f}},Re.toSVGMatrix=function(Pe,ye){return Pe.a=ye.a,Pe.b=ye.b,Pe.c=ye.c,Pe.d=ye.d,Pe.e=ye.e,Pe.f=ye.f,Pe},Re}(),Ye=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.left=0,Fe.top=0,Fe.width=0,Fe.height=0,Fe.defaultSize={x:50,y:20},Fe.offsetX=0,Fe.offsetY=0,Fe.rotationAngle=0,Fe.CB_DISTANCE=10,Fe._suppressMarkerCreateEvent=!1,Fe.container.transform.baseVal.appendItem(ut.createTransform()),Fe.setupControlBox(),Fe}return Me(Pe,Re),Object.defineProperty(Pe.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Pe.prototype,"visual",{get:function(){return this._visual},set:function(ye){this._visual=ye;var Oe=ut.createTransform();this._visual.transform.baseVal.appendItem(Oe)},enumerable:!1,configurable:!0}),Pe.prototype.ownsTarget=function(ye){return!!Re.prototype.ownsTarget.call(this,ye)||!!(this.controlGrips.findGripByVisual(ye)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ye))},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.state==="new"&&(this.left=ye.x,this.top=ye.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ke=this.unrotatePoint(ye);if(this.manipulationStartX=Ke.x,this.manipulationStartY=Ke.y,this.offsetX=Ke.x-this.left,this.offsetY=Ke.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Oe)){this.activeGrip=this.rotatorGrip;var Fe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Fe.x-this.width/2,this.top=Fe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Et=this.container.transform.baseVal.getItem(0);Et.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Et,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Pe.prototype.pointerUp=function(ye){var Oe=this.state;Re.prototype.pointerUp.call(this,ye),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(ye),this._state="select",Oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Pe.prototype.moveVisual=function(ye){this.visual.style.transform="translate("+ye.x+"px, "+ye.y+"px)"},Pe.prototype.manipulate=function(ye){var Oe=this.unrotatePoint(ye);this.state==="creating"?this.resize(ye):this.state==="move"?(this.left=this.manipulationStartLeft+(Oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Oe):this.state==="rotate"&&this.rotate(ye)},Pe.prototype.resize=function(ye){var Oe=this.manipulationStartLeft,Ke=this.manipulationStartWidth,Fe=this.manipulationStartTop,Et=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Oe=this.manipulationStartLeft+ye.x-this.manipulationStartX,Ke=this.manipulationStartWidth+this.manipulationStartLeft-Oe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ke=this.manipulationStartWidth+ye.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Fe=this.manipulationStartTop+ye.y-this.manipulationStartY,Et=this.manipulationStartHeight+this.manipulationStartTop-Fe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Et=this.manipulationStartHeight+ye.y-this.manipulationStartY}Ke>=0?(this.left=Oe,this.width=Ke):(this.left=Oe+Ke,this.width=-Ke),Et>=0?(this.top=Fe,this.height=Et):(this.top=Fe+Et,this.height=-Et),this.setSize()},Pe.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Pe.prototype.rotate=function(ye){if(Math.abs(ye.x-this.centerX)>.1){var Oe=Math.sign(ye.x-this.centerX);this.rotationAngle=180*Math.atan((ye.y-this.centerY)/(ye.x-this.centerX))/Math.PI+90*Oe,this.applyRotation()}},Pe.prototype.applyRotation=function(){var ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0)},Pe.prototype.rotatePoint=function(ye){if(this.rotationAngle===0)return ye;var Oe=this.container.getCTM(),Ke=ut.createPoint(ye.x,ye.y);return{x:(Ke=Ke.matrixTransform(Oe)).x,y:Ke.y}},Pe.prototype.unrotatePoint=function(ye){if(this.rotationAngle===0)return ye;var Oe=this.container.getCTM();Oe=Oe.inverse();var Ke=ut.createPoint(ye.x,ye.y);return{x:(Ke=Ke.matrixTransform(Oe)).x,y:Ke.y}},Pe.prototype.select=function(){Re.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Pe.prototype.deselect=function(){Re.prototype.deselect.call(this),this.controlBox.style.display="none"},Pe.prototype.setupControlBox=function(){this.controlBox=ut.createGroup();var ye=ut.createTransform();ye.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(ye),this.container.appendChild(this.controlBox),this.controlRect=ut.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=ut.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 Ne,this.addControlGrips(),this.controlBox.style.display="none"},Pe.prototype.adjustControlBox=function(){var ye=this.controlBox.transform.baseVal.getItem(0);ye.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(ye,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()},Pe.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()},Pe.prototype.createGrip=function(){var ye=new je;return ye.visual.transform.baseVal.appendItem(ut.createTransform()),this.controlBox.appendChild(ye.visual),ye},Pe.prototype.positionGrips=function(){var ye=this.controlGrips.topLeft.GRIP_SIZE,Oe=-ye/2,Ke=Oe,Fe=(this.width+this.CB_DISTANCE)/2-ye/2,Et=(this.height+this.CB_DISTANCE)/2-ye/2,sn=this.height+this.CB_DISTANCE-ye/2,pn=this.width+this.CB_DISTANCE-ye/2;this.positionGrip(this.controlGrips.topLeft.visual,Oe,Ke),this.positionGrip(this.controlGrips.topCenter.visual,Fe,Ke),this.positionGrip(this.controlGrips.topRight.visual,pn,Ke),this.positionGrip(this.controlGrips.centerLeft.visual,Oe,Et),this.positionGrip(this.controlGrips.centerRight.visual,pn,Et),this.positionGrip(this.controlGrips.bottomLeft.visual,Oe,sn),this.positionGrip(this.controlGrips.bottomCenter.visual,Fe,sn),this.positionGrip(this.controlGrips.bottomRight.visual,pn,sn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Fe,Ke-3*this.CB_DISTANCE)},Pe.prototype.positionGrip=function(ye,Oe,Ke){var Fe=ye.transform.baseVal.getItem(0);Fe.setTranslate(Oe,Ke),ye.transform.baseVal.replaceItem(Fe,0)},Pe.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Pe.prototype.showControlBox=function(){this.controlBox.style.display=""},Pe.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ze.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ze.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Re.prototype.getState.call(this))},Pe.prototype.restoreState=function(ye){Re.prototype.restoreState.call(this,ye);var Oe=ye;this.left=Oe.left,this.top=Oe.top,this.width=Oe.width,this.height=Oe.height,this.rotationAngle=Oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ze.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ze.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Oe.containerTransformMatrix))},Pe.prototype.scale=function(ye,Oe){Re.prototype.scale.call(this,ye,Oe);var Ke=this.rotatePoint({x:this.left,y:this.top}),Fe=this.unrotatePoint({x:Ke.x*ye,y:Ke.y*Oe});this.left=Fe.x,this.top=Fe.y,this.width=this.width*ye,this.height=this.height*Oe,this.adjustControlBox()},Pe}(Le),Xe=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.fillColor="transparent",Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.opacity=1,Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setFillColor=Fe.setFillColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.createVisual=Fe.createVisual.bind(Fe),Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return!(!Re.prototype.ownsTarget.call(this,ye)&&ye!==this.visual)},Pe.prototype.createVisual=function(){this.visual=ut.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)},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ye),this._state="creating")},Pe.prototype.manipulate=function(ye){Re.prototype.manipulate.call(this,ye)},Pe.prototype.resize=function(ye){Re.prototype.resize.call(this,ye),this.setSize()},Pe.prototype.setSize=function(){Re.prototype.setSize.call(this),ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Pe.prototype.pointerUp=function(ye){Re.prototype.pointerUp.call(this,ye),this.setSize()},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.visual&&ut.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ye),this.stateChanged()},Pe.prototype.setFillColor=function(ye){this.fillColor=ye,this.visual&&ut.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.visual&&ut.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.visual&&ut.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Pe.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Re.prototype.getState.call(this))},Pe.prototype.restoreState=function(ye){var Oe=ye;this.fillColor=Oe.fillColor,this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.opacity=Oe.opacity,this.createVisual(),Re.prototype.restoreState.call(this,ye),this.setSize()},Pe.prototype.scale=function(ye,Oe){Re.prototype.scale.call(this,ye,Oe),this.setSize()},Pe.title="Rectangle marker",Pe}(Ye),lt=function(Re){function Pe(ye,Oe,Ke,Fe){var Et=Re.call(this,ye,Fe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Et.widths=[],Et.widthBoxes=[],Et.widths=Oe,Et.currentWidth=Ke,Et.setCurrentWidth=Et.setCurrentWidth.bind(Et),Et}return Me(Pe,Re),Pe.prototype.getUi=function(){var ye=this,Oe=document.createElement("div");return Oe.style.display="flex",Oe.style.overflow="hidden",Oe.style.flexGrow="2",this.widths.forEach(function(Ke){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.flexGrow="2",Fe.style.alignItems="center",Fe.style.justifyContent="space-between",Fe.style.padding="5px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.borderColor=Ke===ye.currentWidth?ye.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){ye.setCurrentWidth(Ke,Fe)}),Oe.appendChild(Fe);var Et=document.createElement("div");Et.innerText=Ke.toString(),Et.style.marginRight="5px",Fe.appendChild(Et);var sn=document.createElement("div");sn.style.minHeight="20px",sn.style.flexGrow="2",sn.style.display="flex",sn.style.alignItems="center";var pn=document.createElement("hr");pn.style.minWidth="20px",pn.style.border="0px",pn.style.borderTop=Ke+"px solid "+ye.uiStyleSettings.toolboxColor,pn.style.flexGrow="2",sn.appendChild(pn),Fe.appendChild(sn),ye.widthBoxes.push(Fe)}),Oe},Pe.prototype.setCurrentWidth=function(ye,Oe){var Ke=this;this.currentWidth=ye,this.widthBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===Oe?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Pe}(ve),Ze=function(Re){function Pe(ye,Oe,Ke,Fe){var Et=Re.call(this,ye,Fe||'<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 Et.styles=[],Et.styleBoxes=[],Et.styles=Oe,Et.currentStyle=Ke,Et.setCurrentStyle=Et.setCurrentStyle.bind(Et),Et}return Me(Pe,Re),Pe.prototype.getUi=function(){var ye=this,Oe=document.createElement("div");return Oe.style.display="flex",Oe.style.overflow="hidden",Oe.style.flexGrow="2",this.styles.forEach(function(Ke){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.justifyContent="space-between",Fe.style.padding="5px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.overflow="hidden",Fe.style.maxWidth=100/ye.styles.length-5+"%",Fe.style.borderColor=Ke===ye.currentStyle?ye.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){ye.setCurrentStyle(Ke,Fe)}),Oe.appendChild(Fe);var Et=document.createElement("div");Et.style.minHeight="20px",Et.style.flexGrow="2",Et.style.overflow="hidden";var sn=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+ye.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ke!==""?'stroke-dasharray="'+Ke+'"':"")+` />
</svg>`;Et.innerHTML=sn,Fe.appendChild(Et),ye.styleBoxes.push(Fe)}),Oe},Pe.prototype.setCurrentStyle=function(ye,Oe){var Ke=this;this.currentStyle=ye,this.styleBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===Oe?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Pe}(ve),Lt=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.strokeColor=Ke.defaultColor,Fe.strokeWidth=Ke.defaultStrokeWidth,Fe.strokeDasharray=Ke.defaultStrokeDasharray,Fe.strokePanel=new Ee("Line color",Ke.defaultColorSet,Ke.defaultColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.strokeWidthPanel=new lt("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Ze("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe}return Me(Pe,Re),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Re.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.typeName="FrameMarker",Pe.title="Frame marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Pe}(Xe),rt=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},Ot=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.x1=0,Fe.y1=0,Fe.x2=0,Fe.y2=0,Fe.defaultLength=50,Fe.manipulationStartX=0,Fe.manipulationStartY=0,Fe.manipulationStartX1=0,Fe.manipulationStartY1=0,Fe.manipulationStartX2=0,Fe.manipulationStartY2=0,Fe.setupControlBox(),Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return!!Re.prototype.ownsTarget.call(this,ye)||!(!this.grip1.ownsTarget(ye)&&!this.grip2.ownsTarget(ye))},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.manipulationStartX=ye.x,this.manipulationStartY=ye.y,this.state==="new"&&(this.x1=ye.x,this.y1=ye.y,this.x2=ye.x,this.y2=ye.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(Oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Pe.prototype.pointerUp=function(ye){var Oe=this.state;Re.prototype.pointerUp.call(this,ye),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(ye),this._state="select",Oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Pe.prototype.adjustVisual=function(){},Pe.prototype.manipulate=function(ye){this.state==="creating"?this.resize(ye):this.state==="move"?(this.x1=this.manipulationStartX1+ye.x-this.manipulationStartX,this.y1=this.manipulationStartY1+ye.y-this.manipulationStartY,this.x2=this.manipulationStartX2+ye.x-this.manipulationStartX,this.y2=this.manipulationStartY2+ye.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(ye)},Pe.prototype.resize=function(ye){switch(this.activeGrip){case this.grip1:this.x1=ye.x,this.y1=ye.y;break;case this.grip2:case void 0:this.x2=ye.x,this.y2=ye.y}this.adjustVisual(),this.adjustControlBox()},Pe.prototype.select=function(){Re.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Pe.prototype.deselect=function(){Re.prototype.deselect.call(this),this.controlBox.style.display="none"},Pe.prototype.setupControlBox=function(){this.controlBox=ut.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Pe.prototype.adjustControlBox=function(){this.positionGrips()},Pe.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Pe.prototype.createGrip=function(){var ye=new je;return ye.visual.transform.baseVal.appendItem(ut.createTransform()),this.controlBox.appendChild(ye.visual),ye},Pe.prototype.positionGrips=function(){var ye=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-ye/2,this.y1-ye/2),this.positionGrip(this.grip2.visual,this.x2-ye/2,this.y2-ye/2)},Pe.prototype.positionGrip=function(ye,Oe,Ke){var Fe=ye.transform.baseVal.getItem(0);Fe.setTranslate(Oe,Ke),ye.transform.baseVal.replaceItem(Fe,0)},Pe.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Re.prototype.getState.call(this))},Pe.prototype.restoreState=function(ye){Re.prototype.restoreState.call(this,ye);var Oe=ye;this.x1=Oe.x1,this.y1=Oe.y1,this.x2=Oe.x2,this.y2=Oe.y2},Pe.prototype.scale=function(ye,Oe){Re.prototype.scale.call(this,ye,Oe),this.x1=this.x1*ye,this.y1=this.y1*Oe,this.x2=this.x2*ye,this.y2=this.y2*Oe,this.adjustVisual(),this.adjustControlBox()},Pe}(Le),wt=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.strokeColor=Ke.defaultColor,Fe.strokeWidth=Ke.defaultStrokeWidth,Fe.strokeDasharray=Ke.defaultStrokeDasharray,Fe.strokePanel=new Ee("Line color",Ke.defaultColorSet,Ke.defaultColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.strokeWidthPanel=new lt("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Ze("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return!(!Re.prototype.ownsTarget.call(this,ye)&&ye!==this.visual&&ye!==this.selectorLine&&ye!==this.visibleLine)},Pe.prototype.createVisual=function(){this.visual=ut.createGroup(),this.selectorLine=ut.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ut.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)},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Pe.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()),ut.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ut.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ut.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.adjustVisual(),this.colorChanged(ye)},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.adjustVisual()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Re.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){Re.prototype.restoreState.call(this,ye);var Oe=ye;this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.createVisual(),this.adjustVisual()},Pe.typeName="LineMarker",Pe.title="Line marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Pe}(Ot),Dt=function(Re){function Pe(ye,Oe,Ke,Fe){var Et=Re.call(this,ye,Fe||'<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 Et.fonts=[],Et.fontBoxes=[],Et.fonts=Oe,Et.currentFont=Ke,Et.setCurrentFont=Et.setCurrentFont.bind(Et),Et}return Me(Pe,Re),Pe.prototype.getUi=function(){var ye=this,Oe=document.createElement("div");return Oe.style.overflow="hidden",Oe.style.flexGrow="2",this.fonts.forEach(function(Ke){var Fe=document.createElement("div");Fe.style.display="inline-block",Fe.style.alignItems="center",Fe.style.justifyContent="space-between",Fe.style.padding="5px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.overflow="hidden",Fe.style.maxWidth=100/ye.fonts.length-5+"%",Fe.style.borderColor=Ke===ye.currentFont?ye.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){ye.setCurrentFont(Ke,Fe)}),Oe.appendChild(Fe);var Et=document.createElement("div");Et.style.display="flex",Et.style.minHeight="20px",Et.style.flexGrow="2",Et.style.fontFamily=Ke,Et.style.overflow="hidden";var sn=document.createElement("div");sn.style.whiteSpace="nowrap",sn.style.overflow="hidden",sn.style.textOverflow="ellipsis",sn.innerHTML="The quick brown fox jumps over the lazy dog",Et.appendChild(sn),Fe.appendChild(Et),ye.fontBoxes.push(Fe)}),Oe},Pe.prototype.setCurrentFont=function(ye,Oe){var Ke=this;this.currentFont=ye,this.fontBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===Oe?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Pe}(ve),Wt=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.color="transparent",Fe.padding=5,Fe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Fe.text=Fe.DEFAULT_TEXT,Fe.isMoved=!1,Fe.color=Ke.defaultColor,Fe.fontFamily=Ke.defaultFontFamily,Fe.defaultSize={x:100,y:30},Fe.setColor=Fe.setColor.bind(Fe),Fe.setFont=Fe.setFont.bind(Fe),Fe.renderText=Fe.renderText.bind(Fe),Fe.sizeText=Fe.sizeText.bind(Fe),Fe.textEditDivClicked=Fe.textEditDivClicked.bind(Fe),Fe.showTextEditor=Fe.showTextEditor.bind(Fe),Fe.setSize=Fe.setSize.bind(Fe),Fe.positionTextEditor=Fe.positionTextEditor.bind(Fe),Fe.colorPanel=new Ee("Color",Ke.defaultColorSet,Ke.defaultColor),Fe.colorPanel.onColorChanged=Fe.setColor,Fe.fontFamilyPanel=new Dt("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Fe.fontFamilyPanel.onFontChanged=Fe.setFont,Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){if(Re.prototype.ownsTarget.call(this,ye)||ye===this.visual||ye===this.textElement||ye===this.bgRectangle)return!0;var Oe=!1;return this.textElement.childNodes.forEach(function(Ke){Ke===ye&&(Oe=!0)}),Oe},Pe.prototype.createVisual=function(){this.visual=ut.createGroup(),this.bgRectangle=ut.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ut.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ut.createTransform()),this.textElement.transform.baseVal.appendItem(ut.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.isMoved=!1,this.pointerDownPoint=ye,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ye),this._state="creating")},Pe.prototype.renderText=function(){var ye=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(Oe){ye.textElement.appendChild(ut.createTSpan(Oe.trim()===""?" ":Oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Pe.prototype.getTextScale=function(){var ye=this.textElement.getBBox(),Oe=1;if(ye.width>0&&ye.height>0){var Ke=(1*this.width-this.width*this.padding*2/100)/ye.width,Fe=(1*this.height-this.height*this.padding*2/100)/ye.height;Oe=Math.min(Ke,Fe)}return Oe},Pe.prototype.getTextPosition=function(ye){var Oe=this.textElement.getBBox(),Ke=0,Fe=0;return Oe.width>0&&Oe.height>0&&(Ke=(this.width-Oe.width*ye)/2,Fe=this.height/2-Oe.height*ye/2),{x:Ke,y:Fe}},Pe.prototype.sizeText=function(){var ye=this.textElement.getBBox(),Oe=this.getTextScale(),Ke=this.getTextPosition(Oe);Ke.y-=ye.y*Oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ke.x+"px, "+Ke.y+"px) scale("+Oe+", "+Oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ke.x,Ke.y),this.textElement.transform.baseVal.getItem(1).setScale(Oe,Oe))},Pe.prototype.manipulate=function(ye){Re.prototype.manipulate.call(this,ye),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ye.x-this.pointerDownPoint.x)>5||Math.abs(ye.y-this.pointerDownPoint.y)>5)},Pe.prototype.resize=function(ye){Re.prototype.resize.call(this,ye),this.isMoved=!0,this.setSize(),this.sizeText()},Pe.prototype.setSize=function(){Re.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ut.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Pe.prototype.pointerUp=function(ye){var Oe=this.state;Oe==="creating"&&(this._suppressMarkerCreateEvent=!0),Re.prototype.pointerUp.call(this,ye),this.setSize(),(Oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Pe.prototype.showTextEditor=function(){var ye=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(Oe){Oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Oe=Number.parseFloat(ye.textEditor.style.fontSize);ye.textEditor.clientWidth>=Number.parseInt(ye.textEditor.style.maxWidth)&&Oe>.9;)Oe-=.1,ye.textEditor.style.fontSize=Math.max(Oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Oe){Oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Oe){if(Oe.clipboardData){var Ke=Oe.clipboardData.getData("text"),Fe=window.getSelection();if(!Fe.rangeCount)return!1;Fe.deleteFromDocument(),Fe.getRangeAt(0).insertNode(document.createTextNode(Ke)),Oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){ye.textEditDivClicked(ye.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Pe.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var ye=this.getTextScale(),Oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ke=this.textElement.getBBox(),Fe={x:Ke.width*ye,y:Ke.height*ye};Oe.x-=Fe.x/2,Oe.y-=Fe.y/2,this.textEditor.style.top=Oe.y+"px",this.textEditor.style.left=Oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Oe.x+"px",this.textEditor.style.fontSize=Math.max(16*ye,12)+"px",this.textElement.style.display="none"}},Pe.prototype.textEditDivClicked=function(ye){this.text=ye.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Pe.prototype.select=function(){Re.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Pe.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Re.prototype.deselect.call(this)},Pe.prototype.dblClick=function(ye,Oe){Re.prototype.dblClick.call(this,ye,Oe),this.showTextEditor()},Pe.prototype.setColor=function(ye){this.textElement&&ut.setAttributes(this.textElement,[["fill",ye]]),this.color=ye,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(ye)},Pe.prototype.setFont=function(ye){this.textElement&&ut.setAttributes(this.textElement,[["font-family",ye]]),this.fontFamily=ye,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Pe.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Pe.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Re.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){var Oe=ye;this.color=Oe.color,this.fontFamily=Oe.fontFamily,this.padding=Oe.padding,this.text=Oe.text,this.createVisual(),Re.prototype.restoreState.call(this,ye),this.setSize()},Pe.prototype.scale=function(ye,Oe){Re.prototype.scale.call(this,ye,Oe),this.setSize(),this.sizeText(),this.positionTextEditor()},Pe.typeName="TextMarker",Pe.title="Text marker",Pe.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>',Pe}(Ye),Mt=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.color="transparent",Fe.lineWidth=3,Fe.drawing=!1,Fe.pixelRatio=1,Fe.color=Ke.defaultColor,Fe.lineWidth=Ke.defaultStrokeWidth,Fe.pixelRatio=Ke.freehandPixelRatio,Fe.setColor=Fe.setColor.bind(Fe),Fe.addCanvas=Fe.addCanvas.bind(Fe),Fe.finishCreation=Fe.finishCreation.bind(Fe),Fe.setLineWidth=Fe.setLineWidth.bind(Fe),Fe.colorPanel=new Ee("Color",Ke.defaultColorSet,Ke.defaultColor),Fe.colorPanel.onColorChanged=Fe.setColor,Fe.lineWidthPanel=new lt("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Fe.lineWidthPanel.onWidthChanged=Fe.setLineWidth,Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return!(!Re.prototype.ownsTarget.call(this,ye)&&ye!==this.visual&&ye!==this.drawingImage)},Pe.prototype.createVisual=function(){this.visual=ut.createGroup(),this.drawingImage=ut.createImage(),this.visual.appendChild(this.drawingImage);var ye=ut.createTransform();this.visual.transform.baseVal.appendItem(ye),this.addMarkerVisualToContainer(this.visual)},Pe.prototype.pointerDown=function(ye,Oe){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(ye.x,ye.y),this.drawing=!0):Re.prototype.pointerDown.call(this,ye,Oe)},Pe.prototype.manipulate=function(ye){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(ye.x,ye.y),this.canvasContext.stroke()):Re.prototype.manipulate.call(this,ye)},Pe.prototype.resize=function(ye){Re.prototype.resize.call(this,ye),ut.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ut.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Pe.prototype.pointerUp=function(ye){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Re.prototype.pointerUp.call(this,ye)},Pe.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)},Pe.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Re.prototype.select.call(this)},Pe.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Re.prototype.deselect.call(this)},Pe.prototype.finishCreation=function(){for(var ye=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ke=Oe[0],Fe=Oe[1],Et=Oe[2],sn=Oe[3],pn=!1,en=0;en<this.canvasElement.height;en++)for(var wn=0;wn<this.canvasElement.width;wn++)ye.data[en*this.canvasElement.width*4+4*wn+3]>0&&(pn=!0,en<Fe&&(Fe=en),wn<Ke&&(Ke=wn),en>sn&&(sn=en),wn>Et&&(Et=wn));if(pn){this.left=Ke/this.pixelRatio,this.top=Fe/this.pixelRatio,this.width=(Et-Ke)/this.pixelRatio,this.height=(sn-Fe)/this.pixelRatio;var hi=document.createElement("canvas");hi.width=Et-Ke,hi.height=sn-Fe,hi.getContext("2d").putImageData(this.canvasContext.getImageData(Ke,Fe,Et-Ke,sn-Fe),0,0),this.drawingImgUrl=hi.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Pe.prototype.setDrawingImage=function(){ut.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ut.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Pe.prototype.setColor=function(ye){this.color=ye,this.colorChanged(ye)},Pe.prototype.setLineWidth=function(ye){this.lineWidth=ye},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({drawingImgUrl:this.drawingImgUrl},Re.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){this.createVisual(),Re.prototype.restoreState.call(this,ye),this.drawingImgUrl=ye.drawingImgUrl,this.setDrawingImage()},Pe.prototype.scale=function(ye,Oe){Re.prototype.scale.call(this,ye,Oe),this.setDrawingImage()},Pe.typeName="FreehandMarker",Pe.title="Freehand marker",Pe.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>',Pe}(Ye),et=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Ke||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Fe.typeBoxes=[],Fe.currentType=Oe,Fe.setCurrentType=Fe.setCurrentType.bind(Fe),Fe}return Me(Pe,Re),Pe.prototype.getUi=function(){var ye=this,Oe=document.createElement("div");Oe.style.display="flex",Oe.style.overflow="hidden",Oe.style.flexGrow="2";for(var Ke=function(sn){var pn="both";switch(sn){case 0:pn="both";break;case 1:pn="start";break;case 2:pn="end";break;case 3:pn="none"}var en=document.createElement("div");if(en.style.display="flex",en.style.flexGrow="2",en.style.alignItems="center",en.style.justifyContent="space-between",en.style.padding="5px",en.style.borderWidth="2px",en.style.borderStyle="solid",en.style.borderColor=pn===Fe.currentType?Fe.uiStyleSettings.toolboxAccentColor:"transparent",en.addEventListener("click",function(){ye.setCurrentType(pn,en)}),Oe.appendChild(en),pn==="both"||pn==="start"){var wn=document.createElement("div");wn.style.display="flex",wn.style.alignItems="center",wn.style.minHeight="20px",wn.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="`+(Fe.uiStyleSettings!==void 0?Fe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,wn.style.marginLeft="5px",en.appendChild(wn)}var hi=document.createElement("div");hi.style.display="flex",hi.style.alignItems="center",hi.style.minHeight="20px",hi.style.flexGrow="2";var Rn=document.createElement("hr");if(Rn.style.minWidth="20px",Rn.style.border="0px",Rn.style.borderTop="3px solid "+(Fe.uiStyleSettings!==void 0?Fe.uiStyleSettings.toolboxColor:"#eeeeee"),Rn.style.flexGrow="2",hi.appendChild(Rn),en.appendChild(hi),pn==="both"||pn==="end"){var Sn=document.createElement("div");Sn.style.display="flex",Sn.style.alignItems="center",Sn.style.minHeight="20px",Sn.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="`+(Fe.uiStyleSettings!==void 0?Fe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Sn.style.marginRight="5px",en.appendChild(Sn)}Fe.typeBoxes.push(en)},Fe=this,Et=0;Et<4;Et++)Ke(Et);return Oe},Pe.prototype.setCurrentType=function(ye,Oe){var Ke=this;this.currentType=ye,this.typeBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===Oe?Ke.uiStyleSettings!==void 0?Ke.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Pe}(ve),Ue=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.arrowType="end",Fe.arrowBaseHeight=10,Fe.arrowBaseWidth=10,Fe.getArrowPoints=Fe.getArrowPoints.bind(Fe),Fe.setArrowType=Fe.setArrowType.bind(Fe),Fe.arrowTypePanel=new et("Arrow type","end"),Fe.arrowTypePanel.onArrowTypeChanged=Fe.setArrowType,Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return!(!Re.prototype.ownsTarget.call(this,ye)&&ye!==this.arrow1&&ye!==this.arrow2)},Pe.prototype.getArrowPoints=function(ye,Oe){var Ke=this.arrowBaseWidth+2*this.strokeWidth,Fe=this.arrowBaseHeight+2*this.strokeWidth;return ye-Ke/2+","+(Oe+Fe/2)+" "+ye+","+(Oe-Fe/2)+" "+(ye+Ke/2)+","+(Oe+Fe/2)},Pe.prototype.createTips=function(){this.arrow1=ut.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ut.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ut.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ut.createTransform()),this.visual.appendChild(this.arrow2)},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.state==="creating"&&this.createTips()},Pe.prototype.adjustVisual=function(){if(Re.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ut.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ut.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var ye=0;Math.abs(this.x1-this.x2)>.1&&(ye=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Oe=this.arrow1.transform.baseVal.getItem(0);Oe.setRotate(ye,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Oe,0);var Ke=this.arrow2.transform.baseVal.getItem(0);Ke.setRotate(ye+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ke,0)}},Pe.prototype.setArrowType=function(ye){this.arrowType=ye,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({arrowType:this.arrowType},Re.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){Re.prototype.restoreState.call(this,ye);var Oe=ye;this.arrowType=Oe.arrowType,this.createTips(),this.adjustVisual()},Pe.typeName="ArrowMarker",Pe.title="Arrow marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Pe}(wt),Rt=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.fillColor=Ke.defaultFillColor,Fe.strokeWidth=0,Fe.fillPanel=new Ee("Color",Ke.defaultColorSet,Ke.defaultFillColor),Fe.fillPanel.onColorChanged=Fe.setFillColor,Fe}return Me(Pe,Re),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Re.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.typeName="CoverMarker",Pe.title="Cover marker",Pe.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Pe}(Xe),Pn=function(Re){function Pe(ye,Oe,Ke,Fe){var Et=Re.call(this,ye,Fe||'<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 Et.opacities=[],Et.opacityBoxes=[],Et.opacities=Oe,Et.currentOpacity=Ke,Et.setCurrentOpacity=Et.setCurrentOpacity.bind(Et),Et}return Me(Pe,Re),Pe.prototype.getUi=function(){var ye=this,Oe=document.createElement("div");return Oe.style.display="flex",Oe.style.overflow="hidden",Oe.style.flexGrow="2",Oe.style.justifyContent="space-between",this.opacities.forEach(function(Ke){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.justifyContent="center",Fe.style.padding="5px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.borderColor=Ke===ye.currentOpacity?ye.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){ye.setCurrentOpacity(Ke,Fe)}),Oe.appendChild(Fe);var Et=document.createElement("div");Et.innerText=100*Ke+"%",Fe.appendChild(Et),ye.opacityBoxes.push(Fe)}),Oe},Pe.prototype.setCurrentOpacity=function(ye,Oe){var Ke=this;this.currentOpacity=ye,this.opacityBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===Oe?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Pe}(ve),xn=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.setOpacity=Fe.setOpacity.bind(Fe),Fe.fillColor=Ke.defaultHighlightColor,Fe.strokeWidth=0,Fe.opacity=Ke.defaultHighlightOpacity,Fe.fillPanel=new Ee("Color",Ke.defaultColorSet,Fe.fillColor),Fe.fillPanel.onColorChanged=Fe.setFillColor,Fe.opacityPanel=new Pn("Opacity",Ke.defaultOpacitySteps,Fe.opacity),Fe.opacityPanel.onOpacityChanged=Fe.setOpacity,Fe}return Me(Pe,Re),Pe.prototype.setOpacity=function(ye){this.opacity=ye,this.visual&&ut.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Re.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.typeName="HighlightMarker",Pe.title="Highlight marker",Pe.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>',Pe}(Rt),_t='<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>',qt='<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>',cn=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.bgColor="transparent",Fe.tipPosition={x:0,y:0},Fe.tipBase1Position={x:0,y:0},Fe.tipBase2Position={x:0,y:0},Fe.tipMoving=!1,Fe.color=Ke.defaultStrokeColor,Fe.bgColor=Ke.defaultFillColor,Fe.fontFamily=Ke.defaultFontFamily,Fe.defaultSize={x:100,y:30},Fe.setBgColor=Fe.setBgColor.bind(Fe),Fe.getTipPoints=Fe.getTipPoints.bind(Fe),Fe.positionTip=Fe.positionTip.bind(Fe),Fe.setTipPoints=Fe.setTipPoints.bind(Fe),Fe.colorPanel=new Ee("Text color",Ke.defaultColorSet,Fe.color,_t),Fe.colorPanel.onColorChanged=Fe.setColor,Fe.bgColorPanel=new Ee("Fill color",Ke.defaultColorSet,Fe.bgColor,qt),Fe.bgColorPanel.onColorChanged=Fe.setBgColor,Fe.fontFamilyPanel=new Dt("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Fe.fontFamilyPanel.onFontChanged=Fe.setFont,Fe.tipGrip=new je,Fe.tipGrip.visual.transform.baseVal.appendItem(ut.createTransform()),Fe.controlBox.appendChild(Fe.tipGrip.visual),Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return Re.prototype.ownsTarget.call(this,ye)||this.tipGrip.ownsTarget(ye)||this.tip===ye},Pe.prototype.createTip=function(){ut.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ut.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Pe.prototype.pointerDown=function(ye,Oe){this.state==="new"&&Re.prototype.pointerDown.call(this,ye,Oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Re.prototype.pointerDown.call(this,ye,Oe)},Pe.prototype.pointerUp=function(ye){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Re.prototype.pointerUp.call(this,ye);else{var Oe=this.state==="creating";Re.prototype.pointerUp.call(this,ye),this.setTipPoints(Oe),this.positionTip()}},Pe.prototype.manipulate=function(ye){if(this.tipMoving){var Oe=this.unrotatePoint(ye);this.tipPosition={x:Oe.x-this.manipulationStartLeft,y:Oe.y-this.manipulationStartTop},this.positionTip()}else Re.prototype.manipulate.call(this,ye)},Pe.prototype.setBgColor=function(ye){this.bgRectangle&&this.tip&&(ut.setAttributes(this.bgRectangle,[["fill",ye]]),ut.setAttributes(this.tip,[["fill",ye]])),this.bgColor=ye,this.fillColorChanged(ye)},Pe.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},Pe.prototype.setTipPoints=function(ye){ye===void 0&&(ye=!1);var Oe=Math.min(this.height/2,15),Ke=this.height/5;ye&&(this.tipPosition={x:Oe+Ke/2,y:this.height+20});var Fe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Fe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ke=this.width/5,Oe=Math.min(this.width/2,15),this.tipBase1Position={x:Oe,y:0},this.tipBase2Position={x:Oe+Ke,y:0}):(this.tipBase1Position={x:0,y:Oe},this.tipBase2Position={x:0,y:Oe+Ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Fe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ke=this.width/5,Oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Oe-Ke,y:0},this.tipBase2Position={x:this.width-Oe,y:0}):(this.tipBase1Position={x:this.width,y:Oe},this.tipBase2Position={x:this.width,y:Oe+Ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Fe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ke=this.width/5,Oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Oe-Ke,y:this.height},this.tipBase2Position={x:this.width-Oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Oe-Ke},this.tipBase2Position={x:this.width,y:this.height-Oe}):Fe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ke=this.width/5,Oe=Math.min(this.width/2,15),this.tipBase1Position={x:Oe,y:this.height},this.tipBase2Position={x:Oe+Ke,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Oe},this.tipBase2Position={x:0,y:this.height-Oe-Ke})},Pe.prototype.resize=function(ye){Re.prototype.resize.call(this,ye),this.positionTip()},Pe.prototype.positionTip=function(){ut.setAttributes(this.tip,[["points",this.getTipPoints()]]);var ye=this.tipGrip.visual.transform.baseVal.getItem(0);ye.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(ye,0)},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Pe.prototype.select=function(){this.positionTip(),Re.prototype.select.call(this)},Pe.prototype.getState=function(){var ye=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Re.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){var Oe=ye;this.bgColor=Oe.bgColor,this.tipPosition=Oe.tipPosition,Re.prototype.restoreState.call(this,ye),this.createTip(),this.setTipPoints()},Pe.prototype.scale=function(ye,Oe){Re.prototype.scale.call(this,ye,Oe),this.tipPosition={x:this.tipPosition.x*ye,y:this.tipPosition.y*Oe},this.positionTip()},Pe.typeName="CalloutMarker",Pe.title="Callout marker",Pe.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>',Pe}(Wt),Gn=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.fillColor="transparent",Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.opacity=1,Fe.strokeColor=Ke.defaultColor,Fe.strokeWidth=Ke.defaultStrokeWidth,Fe.strokeDasharray=Ke.defaultStrokeDasharray,Fe.fillColor=Ke.defaultFillColor,Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setFillColor=Fe.setFillColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.setOpacity=Fe.setOpacity.bind(Fe),Fe.createVisual=Fe.createVisual.bind(Fe),Fe.strokePanel=new Ee("Line color",Ge(Ke.defaultColorSet,["transparent"]),Ke.defaultColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.fillPanel=new Ee("Fill color",Ge(Ke.defaultColorSet,["transparent"]),Fe.fillColor,qt),Fe.fillPanel.onColorChanged=Fe.setFillColor,Fe.strokeWidthPanel=new lt("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Ze("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe.opacityPanel=new Pn("Opacity",Ke.defaultOpacitySteps,Fe.opacity),Fe.opacityPanel.onOpacityChanged=Fe.setOpacity,Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return!(!Re.prototype.ownsTarget.call(this,ye)&&ye!==this.visual)},Pe.prototype.createVisual=function(){this.visual=ut.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)},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.state==="new"&&(this.createVisual(),this.moveVisual(ye),this._state="creating")},Pe.prototype.manipulate=function(ye){Re.prototype.manipulate.call(this,ye)},Pe.prototype.resize=function(ye){Re.prototype.resize.call(this,ye),this.setSize()},Pe.prototype.setSize=function(){Re.prototype.setSize.call(this),ut.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Pe.prototype.pointerUp=function(ye){Re.prototype.pointerUp.call(this,ye),this.setSize()},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.visual&&ut.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(ye),this.stateChanged()},Pe.prototype.setFillColor=function(ye){this.fillColor=ye,this.visual&&ut.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(ye),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.visual&&ut.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.visual&&ut.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Pe.prototype.setOpacity=function(ye){this.opacity=ye,this.visual&&ut.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Re.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){var Oe=ye;this.fillColor=Oe.fillColor,this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.opacity=Oe.opacity,this.createVisual(),Re.prototype.restoreState.call(this,ye),this.setSize()},Pe.prototype.scale=function(ye,Oe){Re.prototype.scale.call(this,ye,Oe),this.setSize()},Pe.typeName="EllipseMarker",Pe.title="Ellipse marker",Pe.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>',Pe}(Ye),gn=function(Re){function Pe(ye,Oe,Ke){return Re.call(this,ye,Oe,Ke)||this}return Me(Pe,Re),Object.defineProperty(Pe.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Pe.prototype.ownsTarget=function(ye){return!(!Re.prototype.ownsTarget.call(this,ye)&&ye!==this.tip1&&ye!==this.tip2)},Pe.prototype.createTips=function(){this.tip1=ut.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(ut.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ut.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(ut.createTransform()),this.visual.appendChild(this.tip2)},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.state==="creating"&&this.createTips()},Pe.prototype.adjustVisual=function(){if(Re.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ut.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()]]),ut.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 ye=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Oe=this.tip1.transform.baseVal.getItem(0);Oe.setRotate(ye,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Oe,0);var Ke=this.tip2.transform.baseVal.getItem(0);Ke.setRotate(ye+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ke,0)}},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Re.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){Re.prototype.restoreState.call(this,ye),this.createTips(),this.adjustVisual()},Pe.typeName="MeasurementMarker",Pe.title="Measurement marker",Pe.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>',Pe}(wt),Zn=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.strokePanel.colors=Ke.defaultColorSet,Fe.fillColor="transparent",Fe}return Me(Pe,Re),Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Re.prototype.getState.call(this);return ye.typeName=Pe.typeName,ye},Pe.typeName="EllipseFrameMarker",Pe.title="Ellipse frame marker",Pe.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>',Pe}(Gn),Ct=function(){function Re(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Re.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Re.prototype.addUndoStep=function(Pe){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Pe)||(this.undoStack.push(Pe),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Pe)&&this.redoStack.splice(0,this.redoStack.length))},Re.prototype.replaceLastUndoStep=function(Pe){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Pe)},Re.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Re.prototype.undo=function(){if(this.undoStack.length>1){var Pe=this.undoStack.pop();return Pe!==void 0&&this.redoStack.push(Pe),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Re.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Re}(),Wn=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.curveX=0,Fe.curveY=0,Fe.manipulationStartCurveX=0,Fe.manipulationStartCurveY=0,Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.positionGrips=Fe.positionGrips.bind(Fe),Fe.addControlGrips=Fe.addControlGrips.bind(Fe),Fe.adjustVisual=Fe.adjustVisual.bind(Fe),Fe.setupControlBox=Fe.setupControlBox.bind(Fe),Fe.resize=Fe.resize.bind(Fe),Fe.strokeColor=Ke.defaultColor,Fe.strokeWidth=Ke.defaultStrokeWidth,Fe.strokeDasharray=Ke.defaultStrokeDasharray,Fe.strokePanel=new Ee("Line color",Ke.defaultColorSet,Ke.defaultColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.strokeWidthPanel=new lt("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Ze("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return!(!Re.prototype.ownsTarget.call(this,ye)&&ye!==this.visual&&ye!==this.selectorCurve&&ye!==this.visibleCurve&&!this.curveGrip.ownsTarget(ye))},Pe.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Pe.prototype.createVisual=function(){this.visual=ut.createGroup(),this.selectorCurve=ut.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ut.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)},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=ye.x,this.curveY=ye.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Oe)&&(this.activeGrip=this.curveGrip,this._state="resize")},Pe.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ut.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ut.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ut.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Pe.prototype.setupControlBox=function(){Re.prototype.setupControlBox.call(this),this.curveControlLine1=ut.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ut.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)},Pe.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Re.prototype.addControlGrips.call(this)},Pe.prototype.positionGrips=function(){Re.prototype.positionGrips.call(this);var ye=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-ye/2,this.curveY-ye/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()))},Pe.prototype.manipulate=function(ye){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+ye.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+ye.y-this.manipulationStartY),Re.prototype.manipulate.call(this,ye)},Pe.prototype.resize=function(ye){this.activeGrip===this.curveGrip&&(this.curveX=ye.x,this.curveY=ye.y),Re.prototype.resize.call(this,ye),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.adjustVisual(),this.colorChanged(ye)},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.adjustVisual()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.adjustVisual()},Pe.prototype.scale=function(ye,Oe){this.curveX=this.curveX*ye,this.curveY=this.curveY*Oe,Re.prototype.scale.call(this,ye,Oe)},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Re.prototype.getState.call(this));return ye.typeName=Pe.typeName,ye},Pe.prototype.restoreState=function(ye){Re.prototype.restoreState.call(this,ye);var Oe=ye;this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.curveX=Oe.curveX,this.curveY=Oe.curveY,this.createVisual(),this.adjustVisual()},Pe.typeName="CurveMarker",Pe.title="Curve marker",Pe.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>',Pe}(Ot),di=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,Oe,Ke)||this;return Fe.fillColor="transparent",Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.textColor="transparent",Fe.fontSize="1rem",Fe.isMoved=!1,Fe.captionText="Caption",Fe.PADDING=5,Fe.captionBoxWidth=0,Fe.captionBoxHeight=0,Fe.strokeColor=Ke.defaultColor,Fe.strokeWidth=Ke.defaultStrokeWidth,Fe.strokeDasharray=Ke.defaultStrokeDasharray,Fe.fillColor=Ke.defaultFillColor,Fe.textColor=Ke.defaultStrokeColor,Fe.fontFamily=Ke.defaultFontFamily,Fe.fontSize=Ke.defaultCaptionFontSize,Fe.captionText=Ke.defaultCaptionText,Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setFillColor=Fe.setFillColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.createVisual=Fe.createVisual.bind(Fe),Fe.sizeCaption=Fe.sizeCaption.bind(Fe),Fe.setCaptionText=Fe.setCaptionText.bind(Fe),Fe.showTextEditor=Fe.showTextEditor.bind(Fe),Fe.positionTextEditor=Fe.positionTextEditor.bind(Fe),Fe.finishTextEditing=Fe.finishTextEditing.bind(Fe),Fe.setFont=Fe.setFont.bind(Fe),Fe.setTextColor=Fe.setTextColor.bind(Fe),Fe.strokePanel=new Ee("Line color",Ge(Ke.defaultColorSet,["transparent"]),Fe.strokeColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.fillPanel=new Ee("Fill color",Ge(Ke.defaultColorSet,["transparent"]),Fe.fillColor,qt),Fe.fillPanel.onColorChanged=Fe.setFillColor,Fe.strokeWidthPanel=new lt("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Ze("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe.fontFamilyPanel=new Dt("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Fe.fontFamilyPanel.onFontChanged=Fe.setFont,Fe.textColorPanel=new Ee("Text color",Ke.defaultColorSet,Fe.textColor,_t),Fe.textColorPanel.onColorChanged=Fe.setTextColor,Fe}return Me(Pe,Re),Pe.prototype.ownsTarget=function(ye){return!(!Re.prototype.ownsTarget.call(this,ye)&&ye!==this.visual&&ye!==this.frame&&ye!==this.captionBg&&ye!==this.captionElement)},Pe.prototype.createVisual=function(){this.visual=ut.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ut.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ut.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=ut.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()},Pe.prototype.setCaptionText=function(ye){this.captionText=ye,this.captionElement.textContent=this.captionText,this.sizeCaption()},Pe.prototype.pointerDown=function(ye,Oe){Re.prototype.pointerDown.call(this,ye,Oe),this.isMoved=!1,this.pointerDownPoint=ye,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(ye),this._state="creating")},Pe.prototype.manipulate=function(ye){Re.prototype.manipulate.call(this,ye),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(ye.x-this.pointerDownPoint.x)>5||Math.abs(ye.y-this.pointerDownPoint.y)>5)},Pe.prototype.resize=function(ye){Re.prototype.resize.call(this,ye),this.setSize()},Pe.prototype.sizeCaption=function(){var ye=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=ye.width+2*this.PADDING,this.captionBoxHeight=ye.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ut.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')"]]),ut.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')"]])},Pe.prototype.showTextEditor=function(){var ye=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(Oe){Oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Oe){Oe.key==="Enter"&&ye.finishTextEditing(ye.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Oe){Oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){ye.finishTextEditing(ye.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){ye.finishTextEditing(ye.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Pe.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"))},Pe.prototype.finishTextEditing=function(ye){this.setCaptionText(ye.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Pe.prototype.setFont=function(ye){this.captionElement&&ut.setAttributes(this.captionElement,[["font-family",ye]]),this.fontFamily=ye,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Pe.prototype.setTextColor=function(ye){this.captionElement&&ut.setAttributes(this.captionElement,[["fill",ye]]),this.textColor=ye,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Pe.prototype.setSize=function(){Re.prototype.setSize.call(this),ut.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Pe.prototype.pointerUp=function(ye){Re.prototype.pointerUp.call(this,ye),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Pe.prototype.dblClick=function(ye,Oe){Re.prototype.dblClick.call(this,ye,Oe),this.showTextEditor()},Pe.prototype.setStrokeColor=function(ye){this.strokeColor=ye,this.frame&&ut.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(ye),this.stateChanged()},Pe.prototype.setFillColor=function(ye){this.fillColor=ye,this.captionBg&&ut.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(ye),this.stateChanged()},Pe.prototype.setStrokeWidth=function(ye){this.strokeWidth=ye,this.frame&&ut.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Pe.prototype.setStrokeDasharray=function(ye){this.strokeDasharray=ye,this.frame&&ut.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Pe.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Pe.prototype.getState=function(){var ye=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Re.prototype.getState.call(this));return ye.typeName=this.typeName,ye},Pe.prototype.restoreState=function(ye){var Oe=ye;this.fillColor=Oe.fillColor,this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.textColor=Oe.textColor,this.fontFamily=Oe.fontFamily,this.captionText=Oe.captionText,this.fontSize=Oe.fontSize,this.createVisual(),Re.prototype.restoreState.call(this,ye),this.setSize()},Pe.prototype.scale=function(ye,Oe){Re.prototype.scale.call(this,ye,Oe),this.setSize()},Pe.typeName="CaptionFrameMarker",Pe.title="Caption frame marker",Pe.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>',Pe}(Ye),Kt=function(){function Re(Pe,ye){ye===void 0&&(ye=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Pe,this.cancelable=ye}return Object.defineProperty(Re.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Re.prototype.preventDefault=function(){this._defaultPrevented=!0},Re}(),ln=function(Re){function Pe(ye,Oe,Ke){var Fe=Re.call(this,ye,!1)||this;return Fe.dataUrl=Oe,Fe.state=Ke,Fe}return Me(Pe,Re),Pe}(Kt),$t=function(Re){function Pe(ye,Oe,Ke){Ke===void 0&&(Ke=!1);var Fe=Re.call(this,ye,Ke)||this;return Fe.marker=Oe,Fe}return Me(Pe,Re),Pe}(Kt),Tt=function(){function Re(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Re.prototype.addEventListener=function(Pe,ye){this[Pe].push(ye)},Re.prototype.removeEventListener=function(Pe,ye){var Oe=this[Pe].indexOf(ye);Oe>-1&&this[Pe].splice(Oe,1)},Re}(),ft=function(){function Re(Pe){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new rt,this._isOpen=!1,this.undoRedoManager=new Ct,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Tt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Re.instanceCounter++,this.styles=new te(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Pe,this.targetRoot=document.body,this.width=Pe.clientWidth,this.height=Pe.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Re.prototype,"ALL_MARKER_TYPES",{get:function(){return[Lt,Mt,Ue,Wt,Zn,Gn,xn,cn,gn,Rt,wt,Wn,di]},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Lt,Mt,Ue,Wt,Gn,xn,cn]},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Lt,Mt,Ue,Wt,xn]},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Pe){var ye=this;this._availableMarkerTypes.splice(0),Pe.forEach(function(Oe){if(typeof Oe=="string"){var Ke=ye.ALL_MARKER_TYPES.find(function(Fe){return Fe.typeName===Oe});Ke!==void 0&&ye._availableMarkerTypes.push(Ke)}else ye._availableMarkerTypes.push(Oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Pe){this._zoomLevel=Pe,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Re.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Re.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),mt.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Re.prototype.show=function(){var Pe=this;this.styles.styleSheetRoot===void 0&&De.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=De.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(ye){return ye(new Kt(Pe))})},Re.prototype.render=function(){return bt(this,void 0,void 0,function(){var Pe;return Pt(this,function(ye){switch(ye.label){case 0:return this.setCurrentMarker(),(Pe=new yt).naturalSize=this.renderAtNaturalSize,Pe.imageType=this.renderImageType,Pe.imageQuality=this.renderImageQuality,Pe.markersOnly=this.renderMarkersOnly,Pe.width=this.renderWidth,Pe.height=this.renderHeight,[4,Pe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return ye.sent(),[4,Pe.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,ye.sent()]}})})},Re.prototype.close=function(Pe){var ye=this;if(Pe===void 0&&(Pe=!1),this.isOpen){var Oe=!1;Pe||this.eventListeners.beforeclose.forEach(function(Ke){var Fe=new Kt(ye,!0);Ke(Fe),Fe.defaultPrevented&&(Oe=!0)}),Oe||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Ke){return Ke(new Kt(ye))}),this.detachEvents(),this._isOpen=!1)}},Re.prototype.addMarkersToToolbar=function(){for(var Pe,ye=[],Oe=0;Oe<arguments.length;Oe++)ye[Oe]=arguments[Oe];(Pe=this._availableMarkerTypes).push.apply(Pe,ye)},Re.prototype.addRenderEventListener=function(Pe){this.addEventListener("render",function(ye){Pe(ye.dataUrl,ye.state)})},Re.prototype.removeRenderEventListener=function(Pe){},Re.prototype.addCloseEventListener=function(Pe){this.addEventListener("close",function(){Pe()})},Re.prototype.removeCloseEventListener=function(Pe){},Re.prototype.setupResizeObserver=function(){var Pe=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Pe.resize(Pe.target.clientWidth,Pe.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Pe.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Re.prototype.onPopupTargetResize=function(){var Pe=1*this.target.clientWidth/this.target.clientHeight,ye=this.editorCanvas.clientWidth/Pe>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Pe:this.editorCanvas.clientWidth,Oe=ye<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Pe;this.resize(ye,Oe)},Re.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Re.prototype.resize=function(Pe,ye){this._isResizing=!0;var Oe=Pe/this.imageWidth,Ke=ye/this.imageHeight;this.imageWidth=Math.round(Pe),this.imageHeight=Math.round(ye),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(Oe,Ke),this._isResizing=!1},Re.prototype.scaleMarkers=function(Pe,ye){var Oe,Ke=this;this._currentMarker&&this._currentMarker instanceof Wt?this._currentMarker.scale(Pe,ye):(Oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Fe){Fe!==Ke._currentMarker&&Fe.scale(Pe,ye)}),Oe!==void 0&&this.setCurrentMarker(Oe)},Re.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Re.prototype.setTopLeft=function(){var Pe=this.editingTarget.getBoundingClientRect(),ye=this.editorCanvas.getBoundingClientRect();this.left=Pe.left-ye.left,this.top=Pe.top-ye.top},Re.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Re.prototype.addDefs=function(){for(var Pe,ye=[],Oe=0;Oe<arguments.length;Oe++)ye[Oe]=arguments[Oe];this.defs=ut.createDefs(),this.addDefsToImage(),(Pe=this.defs).append.apply(Pe,ye)},Re.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Re.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Re.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Re.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Re.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Re.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Re.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Re.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Pe=document.createElement("a");Pe.href="https://markerjs.com/",Pe.target="_blank",Pe.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>',Pe.title="Powered by marker.js",Pe.style.display="grid",Pe.style.alignItems="center",Pe.style.justifyItems="center",Pe.style.padding="3px",Pe.style.width="20px",Pe.style.height="20px",this.logoUI.appendChild(Pe),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Re.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Re.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Re.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Re.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var Pe=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=Pe+"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 se(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 he(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Re.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Re.prototype.removeMarker=function(Pe){this.markerImage.removeChild(Pe.container),this.markers.indexOf(Pe)>-1&&this.markers.splice(this.markers.indexOf(Pe),1),Pe.dispose()},Re.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Re.prototype.toolbarButtonClicked=function(Pe,ye){if(Pe==="marker"&&ye!==void 0)this.createNewMarker(ye);else if(Pe==="action")switch(ye){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Re.prototype.deleteSelectedMarker=function(){var Pe=this;if(this._currentMarker!==void 0){var ye=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Fe=new $t(Pe,Pe._currentMarker,!0);Ke(Fe),Fe.defaultPrevented&&(ye=!0)}),!ye){var Oe=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Ke){return Ke(new $t(Pe,Oe))})}}},Re.prototype.clear=function(){var Pe=this,ye=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Et){var sn=new $t(Pe,void 0,!0);Et(sn),sn.defaultPrevented&&(ye=!0)}),!ye)){this.setCurrentMarker();for(var Oe=function(Et){var sn=Ke.markers[Et];Ke.setCurrentMarker(Ke.markers[Et]),Ke._currentMarker.dispose(),Ke.markerImage.removeChild(Ke._currentMarker.container),Ke.markers.splice(Ke.markers.indexOf(Ke._currentMarker),1),Ke.eventListeners.markerdelete.forEach(function(pn){return pn(new $t(Pe,sn))})},Ke=this,Fe=this.markers.length-1;Fe>=0;Fe--)Oe(Fe);this.addUndoStep()}},Object.defineProperty(Re.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Re.prototype.showNotesEditor=function(){var Pe;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=(Pe=this._currentMarker.notes)!==null&&Pe!==void 0?Pe:"",this.overlayContainer.appendChild(this.notesArea))},Re.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Re.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Re.prototype.addUndoStep=function(){var Pe=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var ye=this.getState(),Oe=this.undoRedoManager.getLastUndoStep();if(!Oe||Oe.width===ye.width&&Oe.height===ye.height){var Ke=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(ye),Ke<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Fe){return Fe(new Kt(Pe))})}else this.undoRedoManager.replaceLastUndoStep(ye),this.eventListeners.statechange.forEach(function(Fe){return Fe(new Kt(Pe))})}},Re.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Re.prototype.undoStep=function(){var Pe=this,ye=this.undoRedoManager.undo();ye!==void 0&&(this.restoreState(ye),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Oe){return Oe(new Kt(Pe))}))},Re.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Re.prototype.redoStep=function(){var Pe=this,ye=this.undoRedoManager.redo();ye!==void 0&&(this.restoreState(ye),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Oe){return Oe(new Kt(Pe))}))},Re.prototype.stepZoom=function(){var Pe=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Pe<this.zoomSteps.length-1?this.zoomSteps[Pe+1]:this.zoomSteps[0]},Re.prototype.panTo=function(Pe){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Pe.x,top:this.prevPanPoint.y-Pe.y}),this.prevPanPoint=Pe},Re.prototype.startRenderAndClose=function(){return bt(this,void 0,void 0,function(){var Pe,ye,Oe=this;return Pt(this,function(Ke){switch(Ke.label){case 0:return[4,this.render()];case 1:return Pe=Ke.sent(),ye=this.getState(),this.eventListeners.render.forEach(function(Fe){return Fe(new ln(Oe,Pe,ye))}),this.close(!0),[2]}})})},Re.prototype.getState=function(Pe){Pe===!0&&this.setCurrentMarker();var ye={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Oe){return ye.markers.push(Oe.getState())}),ye},Re.prototype.restoreState=function(Pe){var ye=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Pe.markers.forEach(function(Oe){var Ke=ye._availableMarkerTypes.find(function(Et){return Et.typeName===Oe.typeName});if(Ke!==void 0){var Fe=ye.addNewMarker(Ke);Fe.restoreState(Oe),ye.markers.push(Fe)}}),Pe.width&&Pe.height&&(Pe.width!==this.imageWidth||Pe.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Pe.width,this.imageHeight/Pe.height),this.eventListeners.restorestate.forEach(function(Oe){return Oe(new Kt(ye))})},Re.prototype.addNewMarker=function(Pe){var ye=ut.createGroup();return this.markerImage.appendChild(ye),new Pe(ye,this.overlayContainer,this.settings)},Re.prototype.createNewMarker=function(Pe){var ye,Oe=this;(ye=typeof Pe=="string"?this._availableMarkerTypes.find(function(Ke){return Ke.typeName===Pe}):Pe)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(ye),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(ye.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ke){return Ke(new $t(Oe,Oe._currentMarker))}))},Re.prototype.markerCreated=function(Pe){var ye=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Pe),this.setCurrentMarker(Pe),Pe instanceof Mt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Mt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Oe){return Oe(new $t(ye,ye._currentMarker))})},Re.prototype.colorChanged=function(Pe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Pe,this.settings.defaultStrokeColor=Pe)},Re.prototype.fillColorChanged=function(Pe){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Pe)},Re.prototype.markerStateChanged=function(Pe){var ye=this;this.eventListeners.markerchange.forEach(function(Oe){return Oe(new $t(ye,Pe))})},Re.prototype.setCurrentMarker=function(Pe){var ye=this;this._currentMarker!==Pe&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Oe){return Oe(new $t(ye,ye._currentMarker))})),this._currentMarker=Pe,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(Oe){return Oe(new $t(ye,ye._currentMarker))}))},Re.prototype.onPointerDown=function(Pe){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Pe.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var ye=this.markers.find(function(Oe){return Oe.ownsTarget(Pe.target)});ye!==void 0?(this.setCurrentMarker(ye),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY),Pe.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Pe.clientX,y:Pe.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY))},Re.prototype.onDblClick=function(Pe){if(this._isFocused||this.focus(),this.mode==="select"){var ye=this.markers.find(function(Oe){return Oe.ownsTarget(Pe.target)});ye!==void 0&&ye!==this._currentMarker&&this.setCurrentMarker(ye),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY),Pe.target):this.setCurrentMarker()}},Re.prototype.onPointerMove=function(Pe){this.touchPoints!==1&&Pe.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Pe.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY)):this.zoomLevel>1&&this.panTo({x:Pe.clientX,y:Pe.clientY}))},Re.prototype.onPointerUp=function(Pe){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Pe.clientX,Pe.clientY)),this.isDragging=!1,this.addUndoStep()},Re.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Re.prototype.onKeyUp=function(Pe){this._currentMarker===void 0||this.notesArea!==void 0||Pe.key!=="Delete"&&Pe.key!=="Backspace"||this.deleteSelectedMarker()},Re.prototype.clientToLocalCoordinates=function(Pe,ye){var Oe=this.markerImage.getBoundingClientRect();return{x:(Pe-Oe.left)/this.zoomLevel,y:(ye-Oe.top)/this.zoomLevel}},Re.prototype.onWindowResize=function(){this.positionUI()},Re.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Pe=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Pe+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Re.prototype.addLicenseKey=function(Pe){mt.addKey(Pe)},Re.prototype.addEventListener=function(Pe,ye){this.eventListeners.addEventListener(Pe,ye)},Re.prototype.removeEventListener=function(Pe,ye){this.eventListeners.removeEventListener(Pe,ye)},Re.prototype.renderState=function(Pe){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Pe),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Re.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Re.prototype.focus=function(){var Pe=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(ye){return ye(new Kt(Pe))}))},Re.prototype.blur=function(){var Pe=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(ye){return ye(new Kt(Pe))}))},Re.instanceCounter=0,Re}(),$e=me(99064),Gt=me(955),Ht=(Re,Pe,ye)=>new Promise((Oe,Ke)=>{var Fe=pn=>{try{sn(ye.next(pn))}catch(en){Ke(en)}},Et=pn=>{try{sn(ye.throw(pn))}catch(en){Ke(en)}},sn=pn=>pn.done?Oe(pn.value):Promise.resolve(pn.value).then(Fe,Et);sn((ye=ye.apply(Re,Pe)).next())}),at=({data:Re,className:Pe,fullWidth:ye,style:Oe={},onClose:Ke,onOk:Fe,showFullTools:Et,noAssociationId:sn})=>{const pn=(0,le.useRef)(null),en=(0,le.useRef)(null),wn=(0,le.useRef)(null),hi=(0,le.useRef)(null),[Rn,Sn]=(0,le.useState)(!1),[Pi,zi]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>(wn.current||(wn.current=document.createElement("style"),document.head.appendChild(wn.current)),Re!=null&&Re.visible?(document.body.setAttribute("data-custom","y-hidden"),wn.current.innerHTML=" html { overflow-y: hidden; }",Re!=null&&Re.src&&Zi()):(document.body.removeAttribute("data-custom"),wn.current&&(document.head.removeChild(wn.current),wn.current=null)),()=>{document.body.removeAttribute("data-custom"),wn.current&&(document.head.removeChild(wn.current),wn.current=null)}),[Re==null?void 0:Re.visible]);const Zi=()=>Ht(void 0,null,function*(){Sn(!0),zi("\u6B63\u5728\u52A0\u8F7D\u4E2D");const li=yield(0,Gt.ZJ)(Re==null?void 0:Re.src);pn.current.src="",pn.current.src=li,pn.current.onload=function(){pi()},Sn(!1),zi("")}),ir=li=>Ht(void 0,null,function*(){Sn(!0),zi("\u6B63\u5728\u4FDD\u5B58\u4E2D");const xi=yield(0,$e.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Re.title,file:li.dataUrl}});xi!=null&&xi.id&&!sn?(yield(0,$e.ZP)(`/api/attachments/${Re.id}/add_subitem.json`,{method:"post",body:{subitem_id:xi==null?void 0:xi.id,settings:JSON.stringify(li.state)}})).status===0&&Fe():xi!=null&&xi.id&&Fe(xi),Sn(!1),zi("")}),Nr=()=>{const li=document.querySelector('a[href="https://markerjs.com/"]');li&&li.parentNode&&(li.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(Gi=>{const Oi=document.querySelector(Gi.name);Oi&&Oi.setAttribute("title",Gi.title)})},pi=()=>{en.current=new ft(pn.current),en.current.targetRoot=hi.current,en.current.addEventListener("render",ir),en.current.addEventListener("beforeclose",Ke),Et&&(en.current.availableMarkerTypes=en.current.ALL_MARKER_TYPES,en.current.uiStyleSettings.redoButtonVisible=!0,en.current.uiStyleSettings.notesButtonVisible=!0,en.current.uiStyleSettings.zoomButtonVisible=!0,en.current.uiStyleSettings.zoomOutButtonVisible=!0,en.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=en.current.uiStyleSettings,en.current.show(),Re!=null&&Re.snapshotData&&en.current.restoreState(Re.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Nr()},300)};return le.createElement(le.Fragment,null,(Re==null?void 0:Re.visible)&&le.createElement(We.Z,{spinning:Rn,tip:Pi,style:{position:"absolute",width:"100vw"}},le.createElement("div",{ref:hi,className:st()(Te.imageDimensions,Pe,ye?Te.fullWidth:""),style:Oe},le.createElement("img",{className:Te.img,ref:pn}))))}},59879:function(_n,yn,me){"use strict";var le=me(59301),Te=me(88010),He=me(48136),st=me(41588),We=me(43418),ct=me(59301);const Me=(0,le.forwardRef)(({callback:bt,width:Pt,onChange:Ge,disabled:ut,readOnly:mt,type:yt="",value:De="",style:te={}},ee)=>{const ce=(0,le.useRef)(),se=(0,le.useRef)(),[he,ve]=(0,le.useState)(0),[Ee,Le]=(0,le.useState)(0),[Ne,je]=(0,le.useState)(!1),ze=()=>{var Ze=document.createElement("div");Ze.innerHTML=ce.current.getValue();var Lt=Ze.innerText;return bt&&bt(Lt),Lt};(0,le.useImperativeHandle)(ee,()=>({getData:ze}));const Ye=Ze=>{Ze.preventDefault();const Lt=Ze.clientX-he,rt=Ze.clientY-Ee;document.body.onmousemove=Ot=>{let wt=Ot.clientX-Lt,Dt=Ot.clientY-rt;const Wt=document.getElementsByClassName("markdown-popup-form")[0],Mt=window.innerWidth-Wt.offsetWidth,et=window.innerHeight-Wt.offsetHeight;wt=Math.max(0,Math.min(wt,Mt)),Dt=Math.max(0,Math.min(Dt,et)),Xe(Ot.clientX,Ot.clientY,Lt,rt)&&(ve(wt),Le(Dt))},document.body.onmouseup=function(){document.body.onmousemove=null}},Xe=(Ze,Lt,rt,Ot)=>{const wt=document.body.clientHeight,Dt=document.body.clientWidth;return Ze<20&&rt>Ze||Ze>Dt-20&&rt<Ze||Lt<20&&Ot>Lt||Lt>wt-20&&Ot<Lt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,le.useEffect)(()=>{Ne&&setTimeout(()=>{const Ze=document.getElementsByClassName("markdown-popup-form")[0],Lt=window.innerWidth/2-Ze.offsetWidth/2,rt=window.innerHeight/2-Ze.offsetHeight/2;ve(Lt),Le(rt)},0)},[Ne]);const lt=()=>{ut||mt||je(!0)};return ct.createElement("div",{style:te},ct.createElement("div",{style:{width:Pt||"100%",position:"relative"},className:`${Te.Z.mathFillWrap} ${ut||mt?"cursorDefault":""}`,onClick:()=>lt()},ct.createElement("math-field",{disabled:ut,locale:"zh_cn",class:`${Te.Z.mathField} ${yt}`,readOnly:mt,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:ce,style:{width:"100%",fontSize:De?18:14},value:De||""})),ct.createElement(We.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:he,top:Ee},title:ct.createElement("div",{style:{cursor:"move"},onMouseDown:Ye},"\u8F93\u5165\u516C\u5F0F"),open:Ne,onOk:()=>{const Ze=se.current.getData();ce.current.setValue(Ze),Ge(Ze),je(!1)},onCancel:()=>{je(!1)},destroyOnClose:!0,className:"markdown-popup-form"},ct.createElement(st.Z,{value:De,ref:se,onChange:Ge,showSaveButton:!1})))});yn.Z=Me},41588:function(_n,yn,me){"use strict";var le=me(59301),Te=me(95237),He=me(43604),st=me(99313),We=me(3113),ct=me(85149),Me=me(88010),bt=me(48136),Pt=me(59301);const Ge=(0,le.forwardRef)(({callback:ut,showSaveButton:mt,value:yt=""},De)=>{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 "}]}]}],ce=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],se=Ee=>{te.current.setValue(te.current.getValue()+" "+Ee.value+" ")},he=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Pt.createElement(Te.Z,{className:Me.Z.lists,gutter:[10,10]},ee.map((Ee,Le)=>Pt.createElement(He.Z,{flex:"110px",className:Me.Z.item},Pt.createElement("div",null,Pt.createElement(ct.Z,{value:`$$${Ee.value}$$`}),Ee.name),Pt.createElement("div",{className:Me.Z.children},Ee.children.map((Ne,je)=>Pt.createElement("div",{key:je},Pt.createElement("h1",null,Ne.name),Pt.createElement(Te.Z,{gutter:[10,10]},Ne.data.map((ze,Ye)=>Pt.createElement(He.Z,{key:Ye,onClick:()=>se(ze),className:Me.Z.diamond},Pt.createElement(ct.Z,{value:"`$$"+ze.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Pt.createElement(Te.Z,{className:Me.Z.lists,gutter:[10,10]},ce.map((Ee,Le)=>Pt.createElement(He.Z,{flex:"110px",className:Me.Z.item},Pt.createElement("div",null,Pt.createElement(ct.Z,{value:"`$$"+Ee.value+"$$`"}),Ee.name),Pt.createElement("div",{className:Me.Z.children},Ee.children.map((Ne,je)=>Pt.createElement("div",{key:je},Ne.name&&Pt.createElement("h1",null,Ne.name),Pt.createElement(Te.Z,{gutter:[10,10]},Ne.data.map((ze,Ye)=>Pt.createElement(He.Z,{key:Ye,onClick:()=>se(ze),className:Me.Z.diamond},Pt.createElement(ct.Z,{value:"`$$"+ze.value+"$$`"}))))))))))}],ve=()=>{var Ee=document.createElement("div");Ee.innerHTML=te.current.getValue();var Le=Ee.innerText;return ut&&ut(Le),Le};return(0,le.useImperativeHandle)(De,()=>({getData:ve})),Pt.createElement("div",{className:Me.Z.mathWrap},Pt.createElement(st.default,{defaultActiveKey:"1",items:he}),Pt.createElement("math-field",{locale:"zh_cn",className:Me.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:te,style:{width:800,marginTop:30,fontSize:18}},yt||""),mt&&Pt.createElement("div",{className:Me.Z.button},Pt.createElement(We.ZP,{size:"large",onClick:ve,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});yn.Z=Ge},8797:function(_n,yn,me){"use strict";var le=me(59301),Te=me(93314),He=me(3113),st=Object.defineProperty,We=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,Ge=(De,te,ee)=>te in De?st(De,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):De[te]=ee,ut=(De,te)=>{for(var ee in te||(te={}))bt.call(te,ee)&&Ge(De,ee,te[ee]);if(Me)for(var ee of Me(te))Pt.call(te,ee)&&Ge(De,ee,te[ee]);return De},mt=(De,te)=>We(De,ct(te));const yt=({img:De,buttonProps:te={},styles:ee={},customText:ce,ButtonText:se,ButtonClick:he,Buttonclass:ve,ButtonTwo:Ee,imgStyles:Le,loading:Ne=!1,className:je=""})=>le.createElement("section",{className:`tc animated fadeIn ${je}`,style:ut({color:"#999",margin:"100px auto",visibility:Ne?"hidden":"visible"},ee)},le.createElement("img",{src:De||Te,style:mt(ut({},Le),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},ce||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&le.createElement(He.ZP,ut({className:ve,onClick:he},te),se),Ee&&Ee);yn.Z=yt},23210:function(_n,yn,me){"use strict";me.d(yn,{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),st=me(70557),We=me(23954),ct=me(6848),Me=me(955),bt=me(94941),Pt=me(8797),Ge=me(3294),ut=me(19381),mt=me(59301),yt=Object.defineProperty,De=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(Ee,Le,Ne)=>Le in Ee?yt(Ee,Le,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):Ee[Le]=Ne,se=(Ee,Le)=>{for(var Ne in Le||(Le={}))te.call(Le,Ne)&&ce(Ee,Ne,Le[Ne]);if(De)for(var Ne of De(Le))ee.call(Le,Ne)&&ce(Ee,Ne,Le[Ne]);return Ee},he=(Ee,Le,Ne)=>new Promise((je,ze)=>{var Ye=Ze=>{try{lt(Ne.next(Ze))}catch(Lt){ze(Lt)}},Xe=Ze=>{try{lt(Ne.throw(Ze))}catch(Lt){ze(Lt)}},lt=Ze=>Ze.done?je(Ze.value):Promise.resolve(Ze.value).then(Ye,Xe);lt((Ne=Ne.apply(Ee,Le)).next())}),ve=({editOffice:Ee="view",data:Le,theme:Ne,type:je,filename:ze,monacoEditor:Ye,className:Xe,style:lt,close:Ze,onClose:Lt,hasMask:rt,disabledDownload:Ot,onImgDimensions:wt,showNodata:Dt,recordInfo:Wt})=>{const[Mt,et]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ue,Rt]=(0,le.useState)(""),[Pn,xn]=(0,le.useState)(),_t=window.ENV==="build"?"/react/build":"",qt=location.host.startsWith("localhost")?Ge.Z.PROXY_SERVER:Ge.Z.API_SERVER,Gn=10*(1024*1024),gn=(0,le.useRef)();Le!=null&&Le.startsWith("/api")&&je!=="txt"&&(Le=Ge.Z.API_SERVER+Le);const Zn=Kt=>Kt.substring(Kt.lastIndexOf("/")+1).split(".").pop();ze&&Ye&&(Ye.filename=ze),(0,le.useEffect)(()=>{var Kt,ln;const $t=(ln=(Kt=document.cookie)==null?void 0:Kt.replace(/\s/g,""))==null?void 0:ln.split(";");$t==null||$t.map(Tt=>{let ft=Tt.split("=");ft[0]==="_educoder_session"&&Rt(ft[1])})},[]),(0,le.useEffect)(()=>{je==="office"&&(Le.indexOf("bigfilescdn.")>-1||Le.indexOf("bigfiles1")>-1?xn({url:Le,fileType:Zn(Le),model:Le.indexOf("model=edit")?"edit":"view"}):Ct())},[je,Le]);const Ct=()=>he(void 0,null,function*(){console.log("data:",Le);let Kt=Le;Le.startsWith("http")||(Kt=location.origin+Kt);let ln=new URL(Kt).pathname.split("/").pop();const $t=yield(0,bt.gJ)({attachment_id:ln});$t.url=qt+$t.url,xn($t)}),Wn=()=>{if(Le.startsWith("http")||Le.startsWith("blob:")){di();return}(0,Me.Sv)(ze||"educoder",Le,ze)},di=()=>{Wt&&(0,ut.fc)({id:Wt==null?void 0:Wt.id,watch_type:1,course_id:Wt==null?void 0:Wt.course_id}),(0,Me.Nd)(ze||"educoder",decodeURIComponent(Le))};return mt.createElement("div",{style:se({},lt||{}),className:`${rt&&Te.bgBlack} ${je?Te.wrp:"hide"}`},Ze&&mt.createElement("div",{className:Te.close,ref:gn},!!wt&&mt.createElement(ct.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>gn.current},mt.createElement("span",{onClick:()=>{Lt(),wt()}},mt.createElement("i",{className:"icon-yulanpizhu"}))),!Ot&&mt.createElement(ct.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>gn.current},mt.createElement("span",{onClick:di},mt.createElement("i",{className:"icon-quxiaozhiding"}))),mt.createElement(ct.Z,{title:"\u5173\u95ED",getPopupContainer:()=>gn.current},mt.createElement("span",{className:"",onClick:Lt},mt.createElement("i",{className:"icon-guanbi1"})))),mt.createElement("div",{className:`${Te[Xe]} ${Xe} ${Te.monaco} ${je==="txt"?"show":"hide"}`},je==="txt"&&mt.createElement(mt.Fragment,null,mt.createElement(We.ZP,se({},Ye)))),je==="audio"&&mt.createElement("audio",{src:`${(Le==null?void 0:Le.indexOf("http://"))>-1||(Le==null?void 0:Le.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Le}`,autoPlay:!0}),je==="video"&&mt.createElement(mt.Fragment,null,(Le==null?void 0:Le.indexOf("http"))>-1?mt.createElement("video",{controls:!0,src:`${Le}`,autoPlay:!0}):mt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Le}`,autoPlay:!0})),je==="office"&&Pn&&mt.createElement("iframe",{src:`${_t}/office.html?key=${Pn.key}&url=${btoa(Pn.url)}&callbackUrl=${qt+(Pn.callbackUrl||"")}&fileType=${Pn.fileType}&title=${Pn.title||""}&model=${Ee}&officeServer=${Ge.Z.ONLYOFFICE}&disabledDownload=${!!Ot}`}),je==="html"&&mt.createElement("iframe",{src:Le+"&disposition=inline"}),je==="pdf"&&mt.createElement("iframe",{src:`${_t}/js/pdfview/index.html?filename=${ze||"educoder.pdf"}&url=${encodeURIComponent(Le)}&disabledDownload=${!!Ot}`}),je==="image"&&mt.createElement("img",{src:`${(Le==null?void 0:Le.indexOf("http://"))>-1||(Le==null?void 0:Le.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Le}`}),(je==="other"||je==="download")&&mt.createElement(mt.Fragment,null,Dt?mt.createElement(Pt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:mt.createElement(He.ZP,{icon:mt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Wn,disabled:Ot},"\u4E0B\u8F7D")}):mt.createElement(He.ZP,{type:"primary",size:"middle",onClick:Wn,disabled:Ot},mt.createElement(st.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},90502:function(_n,yn,me){"use strict";me.d(yn,{t:function(){return $t}});var le=me(59301),Te=me(92832),He=me(78241),st=me(43418),We=me(95237),ct=me(43604),Me=me(5871),bt=me(57809),Pt=me(5112),Ge=me(41984),ut=me(89070),mt=me(43809),yt=me(8591),De=me(3113),te=me(71418),ee=me(24334),ce={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},se=me(99064),he=me(88264),ve=me(12290),Ee=me(56102),Le=me(74440),Ne=me(59301),je=Object.defineProperty,ze=Object.defineProperties,Ye=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Lt=(Tt,ft,$e)=>ft in Tt?je(Tt,ft,{enumerable:!0,configurable:!0,writable:!0,value:$e}):Tt[ft]=$e,rt=(Tt,ft)=>{for(var $e in ft||(ft={}))lt.call(ft,$e)&&Lt(Tt,$e,ft[$e]);if(Xe)for(var $e of Xe(ft))Ze.call(ft,$e)&&Lt(Tt,$e,ft[$e]);return Tt},Ot=(Tt,ft)=>ze(Tt,Ye(ft)),wt=(Tt,ft,$e)=>new Promise((Gt,Ht)=>{var ht=Pe=>{try{Re($e.next(Pe))}catch(ye){Ht(ye)}},at=Pe=>{try{Re($e.throw(Pe))}catch(ye){Ht(ye)}},Re=Pe=>Pe.done?Gt(Pe.value):Promise.resolve(Pe.value).then(ht,at);Re(($e=$e.apply(Tt,ft)).next())}),Wt=({buttonProps:Tt,buttonText:ft,form:$e,hackIdentifier:Gt="",answerKey:Ht,data:ht})=>{const[at,Re]=(0,le.useState)(!1),[Pe,ye]=(0,le.useState)(!1),[Oe,Ke]=(0,le.useState)(!1),[Fe,Et]=(0,le.useState)({}),[sn,pn]=(0,le.useState)(""),[en,wn]=(0,le.useState)(""),hi=(0,le.useRef)(Gt),Rn=(0,le.useRef)(""),Sn=(0,le.useRef)(!1);(0,le.useEffect)(()=>{Oe&&ir()},[Oe]),(0,le.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const Pi=()=>new Date().getTime(),zi=ht==null?void 0:ht.code,Zi=()=>{var li,xi;let Gi=zi?ht==null?void 0:ht.code:(li=$e.getFieldValue("hack_codes"))==null?void 0:li.code,Oi=zi?ht==null?void 0:ht.answer_content:$e.getFieldValue(Ht),to=zi?ht==null?void 0:ht.input:(xi=$e.getFieldValue("hack_sets"))==null?void 0:xi.input;Oi==null||Oi.forEach(eo=>{const Be=eo.value||eo.answer_text||"";Gi=Gi.replace(/(@▁@|@▁▁@)/,Be)}),wn(to),pn(Gi),Et({}),Ke(!0)},ir=()=>wt(void 0,null,function*(){var li,xi,Gi,Oi;const to=Pi(),eo=zi?ht==null?void 0:ht.time_limit:(li=$e.getFieldsValue())==null?void 0:li.hack.time_limit,Be=zi?(xi=ht==null?void 0:ht.answer_content)==null?void 0:xi.length:(Oi=(Gi=$e.getFieldsValue())==null?void 0:Gi.standard_answers)==null?void 0:Oi.length;Re(!0),yield(0,he.bM)(Rn.current,{test_hack_code:sn,test_input:en});function Fi(){return wt(this,null,function*(){const{status:wr,data:Fn}=yield(0,he.rX)(Rn.current,"submit"),$i=Pi()-to>(eo+3)*1e3*Be;if(Sn.current){if($i){yt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Re(!1);return}if(wr===0){Re(!1),Et(Ot(rt({},Fn),{showText:!0}));return}setTimeout(Fi,1e3)}})}Fi()}),Nr=()=>wt(void 0,null,function*(){var li,xi,Gi,Oi,to,eo,Be;if(!ht){try{yield $e.validateFields()}catch(wi){(Gi=(xi=(li=wi==null?void 0:wi.errorFields)==null?void 0:li[0])==null?void 0:xi.name)!=null&&Gi.includes("standard_answers")?yt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):yt.ZP.error(wi.errorFields[0].errors[0]),$e.scrollToField(wi.errorFields[0].name,{behavior:"smooth",block:"center"});return}ye(!0);let wr="";const Fn=$e.getFieldsValue();hi.current?wr=yield(0,se.ZP)(`/api/problems/${hi.current}.json`,{method:"put",body:Ot(rt({},Fn),{hack:Ot(rt({},Fn==null?void 0:Fn.hack),{sub_discipline_id:(Be=(eo=Fn==null?void 0:Fn.hack)==null?void 0:eo.sub_discipline_id)==null?void 0:Be[1],difficult:Fn.difficulty,item_banks_group_id:Fn.item_banks_group_id}),hack_codes:Ot(rt({},Fn.hack_codes),{code:ee.Base64.encode(Fn.hack_codes.code)}),update_hack_sets:[rt({},Fn.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}):(wr=yield(0,se.ZP)("/api/problems.json",{method:"post",body:Ot(rt({},Fn),{hack:Ot(rt({},Fn==null?void 0:Fn.hack),{sub_discipline_id:(to=(Oi=Fn==null?void 0:Fn.hack)==null?void 0:Oi.sub_discipline_id)==null?void 0:to[1],difficult:Fn.difficulty,item_banks_group_id:Fn.item_banks_group_id}),hack_codes:Ot(rt({},Fn.hack_codes),{code:ee.Base64.encode(Fn.hack_codes.code)}),hack_sets:[rt({},Fn.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}),hi.current=wr==null?void 0:wr.identifier,sessionStorage.projectFill=wr==null?void 0:wr.identifier)}const Fi=yield(0,se.ZP)(`/api/problems/${hi.current}/start.json`,{method:"get"});if((Fi==null?void 0:Fi.status)===0){Rn.current=Fi==null?void 0:Fi.identifier,Sn.current=!0,ye(!1),Zi();return}ye(!1)}),pi=li=>{const{status:xi,error_msg:Gi,execute_time:Oi,output:to,input:eo,expected_output:Be}=li;let Fi=null;switch(xi){case Le.h.OK:Fi=Ne.createElement(Ne.Fragment,null,Ne.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Oi/1e3,"\u79D2"),Ne.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Le.h.NOMATCH:Fi=Ne.createElement(Ne.Fragment,null,Ne.createElement("div",null,"\u8F93\u5165\uFF1A"),Ne.createElement("pre",{style:{fontFamily:"initial"}},eo),Ne.createElement("div",null,"\u8F93\u51FA\uFF1A"),Ne.createElement("pre",{style:{fontFamily:"initial"}},to&&ee.Base64.decode(to)),Ne.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Ne.createElement("pre",{style:{fontFamily:"initial"}},Be&&ee.Base64.decode(Be)));break;case Le.h.EXECUTEFAILURE:Fi=Ne.createElement(Ne.Fragment,null,Ne.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Ne.createElement("pre",null,eo)),Ne.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Ne.createElement("pre",{className:"error"},ee.Base64.decode(Gi)));break;case Le.h.COMPILEFAILURE:Fi=Ne.createElement(Ne.Fragment,null,Ne.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Ne.createElement("pre",null,eo)),Ne.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Ne.createElement("pre",{className:"error"},ee.Base64.decode(Gi)));break;case Le.h.PODFAILURE:Fi=Ne.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Le.h.TIMEOUT:Fi=Ne.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Ne.createElement(Ne.Fragment,null," ",Fi," ")};return Ne.createElement("div",null,Ne.createElement(De.ZP,Ot(rt({loading:Pe},Tt),{onClick:Nr}),ft),Ne.createElement(st.default,{open:Oe,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:at,cancelButtonProps:{style:{display:"none"}},onOk:()=>ir(),onCancel:()=>{Sn.current=!1,Ke(!1)}},Ne.createElement("div",{className:ce.result},Ne.createElement("div",{className:ce.left},Ne.createElement("div",{className:"mb20"},Ne.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!ht&&Ne.createElement(Ee.CopyToClipboard,{text:sn,onCopy:()=>yt.ZP.success("\u590D\u5236\u6210\u529F")},Ne.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Ne.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Ne.createElement(ve.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:sn,onChange:li=>pn(li)})),Ne.createElement("div",{className:ce.right},Ne.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Ne.createElement("div",{className:ce.box},Ne.createElement("div",{className:ce.li},Ne.createElement(Te.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:en,onChange:li=>wn(li.target.value),bordered:!1,style:{height:180}}))),Ne.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Ne.createElement("div",{className:ce.box},Ne.createElement(te.Z,{spinning:at,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Ne.createElement("div",{className:ce.li,style:{height:196,overflow:"auto",padding:10}},pi(Fe))))))))},Mt=me(87169),et=me(59301),Ue=Object.defineProperty,Rt=Object.defineProperties,Pn=Object.getOwnPropertyDescriptors,xn=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,cn=(Tt,ft,$e)=>ft in Tt?Ue(Tt,ft,{enumerable:!0,configurable:!0,writable:!0,value:$e}):Tt[ft]=$e,Gn=(Tt,ft)=>{for(var $e in ft||(ft={}))_t.call(ft,$e)&&cn(Tt,$e,ft[$e]);if(xn)for(var $e of xn(ft))qt.call(ft,$e)&&cn(Tt,$e,ft[$e]);return Tt},gn=(Tt,ft)=>Rt(Tt,Pn(ft)),Zn=(Tt,ft)=>{var $e={};for(var Gt in Tt)_t.call(Tt,Gt)&&ft.indexOf(Gt)<0&&($e[Gt]=Tt[Gt]);if(Tt!=null&&xn)for(var Gt of xn(Tt))ft.indexOf(Gt)<0&&qt.call(Tt,Gt)&&($e[Gt]=Tt[Gt]);return $e};const{TextArea:Ct}=Te.default,Wn=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],di=({value:Tt,onChange:ft})=>et.createElement(Switch,{checked:Tt,onChange:$e=>{ft($e)}}),Kt="@\u2581@",ln="@\u2581\u2581@",$t=({questionTitlePlaceholder:Tt,form:ft,scoreByBlank:$e=!1,hackidentifier:Gt,answerKey:Ht})=>{const[ht,at]=(0,le.useState)(!1),[Re,Pe]=(0,le.useState)(!1),Oe=(0,ut.useParams)().type==="edit",Ke=(Rn,Sn)=>{const Pi=Sn.line;let zi=0;for(let ir=0;ir<Pi;ir++)zi+=Rn.getLine(ir).split(Kt).length-1;for(let ir=0;ir<Pi;ir++)zi+=Rn.getLine(ir).split(ln).length-1;const Zi=Rn.getLine(Pi).substring(0,Sn.ch);return zi+=Zi.split(Kt).length-1,zi+=Zi.split(ln).length-1,zi},Fe=(Rn,Sn,Pi,zi)=>{const Zi=Rn.getRange(Sn.from,Sn.to);let ir=0;if(Sn.text.forEach(Nr=>{ir+=Nr.split(Kt).length-1}),Sn.text.forEach(Nr=>{ir+=Nr.split(ln).length-1}),Sn.origin!=="setValue"){if(Zi&&(Zi.indexOf(Kt)!==-1||Zi.indexOf(ln)!==-1)){const Nr=Zi.split(Kt).length-1+Zi.split(ln).length-1,pi=Ke(Rn,Sn.from);if(console.log(`\u5220\u9664${Nr}\u4E2A\uFF0C \u524D\u9762\u6709${pi}\u4E2A\uFF0C\u65B0\u589E${ir}\u4E2A`),Nr>1){const li=Array.from({length:Nr},(xi,Gi)=>pi+Gi);zi(li)}else zi(pi)}else if(ir>0){const Nr=Ke(Rn,Sn.from);console.log(`\u65B0\u589E${ir}\u4E2A\uFF0C\u4E4B\u524D\u6709${Nr}\u4E2A`),Pi(ir,Nr)}}},Et=()=>{const Rn=ft.getFieldValue(Ht);ft.setFieldsValue({[Ht]:Rn==null?void 0:Rn.map((Sn,Pi)=>gn(Gn({},Sn),{position:Pi+1}))})},sn=(0,le.useRef)(),pn=(Rn,Sn)=>{for(let Pi=0;Pi<Rn;Pi++)sn.current({position:null,answer_text:""},Sn+Pi);Et()},en=(0,le.useRef)(),wn=Rn=>{en.current(Rn),Et()},hi=He.default.useWatch(Ht,ft);return et.createElement("div",{className:mt.Z.wrap},et.createElement(He.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},et.createElement(Ge.h,{scrollId:"name",watch:!0,height:140})),et.createElement("div",{className:mt.Z.questionTitleEditorWrap},et.createElement(He.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},et.createElement(Ge.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(Rn,Sn)=>{const Pi=ft.getFieldValue(Ht);console.log("--preAnswerData",Pi,Sn),ft.setFieldsValue({[Ht]:Pi==null?void 0:Pi.map((zi,Zi)=>{var ir;return gn(Gn({},zi),{position:Zi+1,multi_line:(ir=Sn==null?void 0:Sn[Zi])==null?void 0:ir.multiLine})})})},placeholder:Tt,onCMBeforeChange:(Rn,Sn)=>{Fe(Rn,Sn,pn,wn)}}))),et.createElement(He.default.List,{name:Ht,rules:[{validator(Rn,Sn){if(!(Sn!=null&&Sn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Pi of Sn){const{answer_text:zi}=Pi||{};if((zi==null?void 0:zi.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Rn,{add:Sn,remove:Pi},{errors:zi})=>(sn.current=Sn,en.current=Pi,et.createElement(et.Fragment,null,et.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},et.createElement(He.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),et.createElement("div",{onClick:()=>{st.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:et.createElement("div",null,et.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",et.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),et.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"}},et.createElement(Mt.Z,{style:{marginRight:3,color:"#3061D0"}}),et.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),Rn.map((Zi,ir)=>{var Nr=Zi,{key:pi,name:li}=Nr,xi=Zn(Nr,["key","name"]),Gi,Oi;return et.createElement(We.Z,{className:"mb20",key:pi,align:"middle",wrap:!1},et.createElement(ct.Z,{flex:"0 0 auto",className:`${mt.Z.blankIndex}`},"\u586B\u7A7A\u9879",ir+1),et.createElement(ct.Z,{flex:1},et.createElement(We.Z,{align:"top",justify:"space-between",wrap:!1},et.createElement(ct.Z,null,et.createElement(He.default.Item,gn(Gn({},xi),{name:[li,"answer_text"],noStyle:!0}),(Gi=hi==null?void 0:hi[li])!=null&&Gi.multi_line||(Oi=hi==null?void 0:hi[li])!=null&&Oi.multiLine?et.createElement(Ct,{spellCheck:!1,style:{marginLeft:10,width:550}}):et.createElement(Te.default,{style:{marginLeft:10,width:550},className:mt.Z.blankInput,size:"large",maxLength:1e3,onBlur:to=>{}}))),$e&&et.createElement(ct.Z,{flex:"224px"},et.createElement(He.default.Item,gn(Gn({},xi),{name:[li,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),et.createElement(Me.Z,{size:"large",className:mt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),et.createElement("div",{onClick:()=>at(!0)},et.createElement(He.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},et.createElement(Ge.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ht}))),et.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"}]},et.createElement(bt.default,{size:"large"},Wn.map(Rn=>et.createElement(bt.default.Option,{key:Rn.title,value:Rn.key}," ",Rn.title)))),et.createElement(He.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},et.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},et.createElement(Me.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),et.createElement("span",{className:"ml10 font14"},"\u79D2")),et.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"}]},et.createElement(Pt.ZP.Group,{style:{marginTop:-10}},et.createElement(Pt.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),et.createElement(Pt.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),et.createElement(Pt.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),et.createElement(He.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),et.createElement("div",{style:{background:"#F6F7F9",padding:15}},et.createElement(He.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},et.createElement(Ct,{rows:4})),et.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"}]},et.createElement(Ct,{rows:4}))),et.createElement(Wt,{form:ft,answerKey:Ht,hackIdentifier:Gt,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:et.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},65357:function(_n,yn,me){"use strict";me.d(yn,{u:function(){return Ne}});var le=me(59301),Te=me(95237),He=me(43604),st=me(6848),We=me(78241),ct=me(43809),Me=me(32134),bt=me(12893),Pt=me(41984),Ge=me(59301),ut=Object.defineProperty,mt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(je,ze,Ye)=>ze in je?ut(je,ze,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):je[ze]=Ye,se=(je,ze)=>{for(var Ye in ze||(ze={}))te.call(ze,Ye)&&ce(je,Ye,ze[Ye]);if(De)for(var Ye of De(ze))ee.call(ze,Ye)&&ce(je,Ye,ze[Ye]);return je},he=(je,ze)=>mt(je,yt(ze)),ve=(je,ze)=>{var Ye={};for(var Xe in je)te.call(je,Xe)&&ze.indexOf(Xe)<0&&(Ye[Xe]=je[Xe]);if(je!=null&&De)for(var Xe of De(je))ze.indexOf(Xe)<0&&ee.call(je,Xe)&&(Ye[Xe]=je[Xe]);return Ye};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"],Le=({value:je,onChange:ze,choiceTextKey:Ye,answerKey:Xe,index:lt,isEdit:Ze,setInputActive:Lt,form:rt,choiceOptionsPath:Ot,allowChangeMode:wt,showAddIcon:Dt,addItem:Wt,deleteItem:Mt})=>{console.log(je,"value");const et=(je==null?void 0:je[Xe])===1,Ue=()=>{const Pn=rt.getFieldValue(Ot);rt.setFieldValue(Ot,Pn.map(xn=>he(se({},xn),{[Xe]:0})))},Rt=()=>{et?ze(he(se({},je),{[Xe]:0})):(wt||Ue(),ze(he(se({},je),{[Xe]:1})))};return Ge.createElement(Te.Z,{className:ct.Z.choiceWrap,align:"middle",wrap:!1},Ge.createElement(He.Z,{onClick:Rt,className:`${ct.Z.choiceIndex} ${et?ct.Z.activeAnswer:""}`},Ee[lt]),Ge.createElement(He.Z,{flex:1,className:`${ct.Z.editorWrap} ml15`,onClick:Lt},Ge.createElement(Pt.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Ze,value:je==null?void 0:je[Ye],onChange:Pn=>{ze(he(se({},je),{[Ye]:Pn}))}})),Ge.createElement(He.Z,{flex:"0 0 auto",className:"ml15"},Ge.createElement("div",{onClick:Rt,className:`${ct.Z.setAnswerBtn} ${et?ct.Z.activeAnswer:""}`},et?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Ge.createElement(He.Z,{className:ct.Z.actionWrapper},Ge.createElement(st.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Ge.createElement(Me.Z,{className:ct.Z.addIcon,onClick:Wt,style:{visibility:Dt?"visible":"hidden"}})),Ge.createElement(st.Z,{title:"\u5220\u9664"},Ge.createElement(bt.Z,{className:ct.Z.deleteIcon,onClick:Mt,style:{visibility:lt>1?"visible":"hidden"}}))))},Ne=({questionTitlePlaceholder:je,titleKey:ze,choiceKey:Ye,analysisKey:Xe,choiceTextKey:lt,answerKey:Ze,choiceOptionsPath:Lt,allowChangeMode:rt=!0,form:Ot,showAnalysis:wt=!0})=>{const[Dt,Wt]=(0,le.useState)(),[Mt,et]=(0,le.useState)(!1);return Ge.createElement("div",{className:ct.Z.wrap},Ge.createElement("div",{className:ct.Z.questionTitleEditorWrap},Ge.createElement(We.default.Item,{label:"\u9898\u5E72",name:ze,labelCol:{span:24},rules:[{required:!0}]},Ge.createElement(Pt.h,{scrollId:Array.isArray(ze)?ze.join("_"):`${ze}`,watch:!0,height:140,placeholder:je}))),Ge.createElement(We.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Ge.createElement(We.default.List,{name:Ye,rules:[{validator(Ue,Rt){const Pn=Rt.some(_t=>_t[Ze]===1),xn=Rt.findIndex(_t=>{var qt;return((qt=_t[lt])==null?void 0:qt.length)<=0});return xn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ee[xn]}\u9009\u9879\u7684\u5185\u5BB9`)):Pn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ue,{add:Rt,remove:Pn})=>Ge.createElement("div",{id:Array.isArray(Lt)?Lt.join("_"):`${Lt}`},Ue.map((xn,_t)=>{var qt=xn,{key:cn,name:Gn}=qt,gn=ve(qt,["key","name"]);const Zn=Dt===cn,Ct=()=>{Wt(cn)},Wn=_t<7&&_t===Ue.length-1,di=()=>Rt({[lt]:"",[Ze]:0}),Kt=()=>Pn(Gn);return Ge.createElement(We.default.Item,he(se({},gn),{key:cn,name:Gn,className:ct.Z.choiceListWrap,rules:[{validator(ln,$t){return $t!=null&&$t.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ee[_t]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),Ge.createElement(Le,{choiceTextKey:lt,answerKey:Ze,index:_t,isEdit:Zn,setInputActive:Ct,form:Ot,choiceOptionsPath:Lt,allowChangeMode:rt,showAddIcon:Wn,addItem:di,deleteItem:Kt}))}),Ue.length<8&&Ge.createElement("div",{className:`${ct.Z.addBtn} mb30`,onClick:()=>Rt({[lt]:"",[Ze]:0})},"\u6DFB\u52A0\u9009\u9879"))),wt&&Ge.createElement("div",{onClick:()=>et(!0)},Ge.createElement(We.default.Item,{name:Xe,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ge.createElement(Pt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Mt}))))}},70472:function(_n,yn,me){"use strict";me.d(yn,{u:function(){return rt}});var le=me(59301),Te=me(43418),He=me(95237),st=me(43604),We=me(92832),ct=me(6848),Me=me(78673),bt=me(78241),Pt=me(5112),Ge=me(5871),ut=me(41984),mt=me(12893),yt=me(61485),De=me(43809),te=me(59879),ee=me(59301),ce=Object.defineProperty,se=Object.defineProperties,he=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Ne=(Ot,wt,Dt)=>wt in Ot?ce(Ot,wt,{enumerable:!0,configurable:!0,writable:!0,value:Dt}):Ot[wt]=Dt,je=(Ot,wt)=>{for(var Dt in wt||(wt={}))Ee.call(wt,Dt)&&Ne(Ot,Dt,wt[Dt]);if(ve)for(var Dt of ve(wt))Le.call(wt,Dt)&&Ne(Ot,Dt,wt[Dt]);return Ot},ze=(Ot,wt)=>se(Ot,he(wt)),Ye=(Ot,wt)=>{var Dt={};for(var Wt in Ot)Ee.call(Ot,Wt)&&wt.indexOf(Wt)<0&&(Dt[Wt]=Ot[Wt]);if(Ot!=null&&ve)for(var Wt of ve(Ot))wt.indexOf(Wt)<0&&Le.call(Ot,Wt)&&(Dt[Wt]=Ot[Wt]);return Dt};const Xe=({value:Ot,onChange:wt})=>{const Dt=Mt=>{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:De.Z.modal,onOk:()=>{const et=[...Ot];et.splice(Mt,1),wt(et)}})},Wt=()=>{const Mt=[...Ot];Mt.push(""),wt(Mt)};return ee.createElement(He.Z,{className:"ml20"},ee.createElement(st.Z,{flex:1},Ot==null?void 0:Ot.map((Mt,et)=>ee.createElement(He.Z,{key:`${Mt}_${et}`,className:"mb20"},ee.createElement(We.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Mt,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ue=>{const Rt=[...Ot],Pn=Ue.target.value.trim();Rt[et]=Pn,wt(Rt)}}),ee.createElement(ct.Z,{title:"\u5220\u9664"},ee.createElement(mt.Z,{className:De.Z.deleteIcon,style:{marginLeft:15,visibility:et>0?"visible":"hidden"},onClick:()=>Dt(et)}))))),ee.createElement(st.Z,null,ee.createElement("div",{className:`${De.Z.addBtn}`,onClick:()=>{Wt()}},"\u65B0\u589E\u7B54\u6848")))},lt=({value:Ot,onChange:wt})=>{const Dt=Mt=>{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:De.Z.modal,onOk:()=>{const et=[...Ot];et.splice(Mt,1),wt(et)}})},Wt=()=>{const Mt=[...Ot];Mt.push(""),wt(Mt)};return ee.createElement(He.Z,{className:"ml20"},ee.createElement(st.Z,{flex:1},Ot==null?void 0:Ot.map((Mt,et)=>ee.createElement(He.Z,{key:`${Mt}_${et}`,align:"middle",className:"mb20"},ee.createElement(te.Z,{value:Mt,style:{flex:1},onChange:Ue=>{const Rt=[...Ot];Rt[et]=Ue,wt(Rt)}}),ee.createElement(ct.Z,{title:"\u5220\u9664"},ee.createElement(mt.Z,{className:De.Z.deleteIcon,style:{marginLeft:15,visibility:et>0?"visible":"hidden"},onClick:()=>Dt(et)}))))),ee.createElement(st.Z,null,ee.createElement("div",{className:`${De.Z.addBtn}`,onClick:()=>{Wt()}},"\u65B0\u589E\u7B54\u6848")))},Ze=({value:Ot=!0,onChange:wt})=>ee.createElement(Me.Z,{checked:!Ot,onChange:Dt=>{wt(!Dt)}}),Lt="\u2581",rt=({questionTitlePlaceholder:Ot,form:wt,scoreByBlank:Dt=!1,answerKey:Wt})=>{const[Mt,et]=(0,le.useState)(!1),Ue=(gn,Zn)=>{const Ct=Zn.line;let Wn=0;for(let Kt=0;Kt<Ct;Kt++)Wn+=gn.getLine(Kt).split(Lt).length-1;const di=gn.getLine(Ct).substring(0,Zn.ch);return Wn+=di.split(Lt).length-1,Wn},Rt=(gn,Zn,Ct,Wn)=>{const di=gn.getRange(Zn.from,Zn.to);let Kt=0;if(Zn.text.forEach(ln=>{Kt+=ln.split(Lt).length-1}),Zn.origin!=="setValue"){if(di&&di.indexOf(Lt)!==-1){const ln=di.split(Lt).length-1,$t=Ue(gn,Zn.from);if(console.log(`\u5220\u9664${ln}\u4E2A\uFF0C \u524D\u9762\u6709${$t}\u4E2A\uFF0C\u65B0\u589E${Kt}\u4E2A`),ln>1){const Tt=Array.from({length:ln},(ft,$e)=>$t+$e);Wn(Tt)}else Wn($t)}else if(Kt>0){const ln=Ue(gn,Zn.from);console.log(`\u65B0\u589E${Kt}\u4E2A\uFF0C\u4E4B\u524D\u6709${ln}\u4E2A`),Ct(Kt,ln)}}},Pn=()=>{const gn=wt.getFieldValue(Wt);wt.setFieldsValue({[Wt]:gn.map((Zn,Ct)=>ze(je({},Zn),{position:Ct+1}))})},xn=(0,le.useRef)(),_t=(gn,Zn)=>{for(let Ct=0;Ct<gn;Ct++)xn.current({position:null,answer_text:[""],model:1},Zn+Ct);Pn()},qt=(0,le.useRef)(),cn=gn=>{qt.current(gn),Pn()},Gn=bt.default.useWatch(Wt,wt);return ee.createElement("div",{className:De.Z.wrap},ee.createElement("div",{className:De.Z.questionTitleEditorWrap},ee.createElement(bt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(ut.h,{scrollId:"name",watch:!0,height:140,placeholder:Ot,showNullButton:!0,onCMBeforeChange:(gn,Zn)=>{Rt(gn,Zn,_t,cn)}}))),ee.createElement(bt.default.List,{name:Wt,rules:[{validator(gn,Zn){if(!(Zn!=null&&Zn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const Ct of Zn){const{answer_text:Wn}=Ct||{};if(Wn!=null&&Wn.some(di=>(di==null?void 0:di.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(gn,{add:Zn,remove:Ct},{errors:Wn})=>(xn.current=Zn,qt.current=Ct,ee.createElement(ee.Fragment,null,ee.createElement(bt.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(gn!=null&&gn.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}}),gn.map((di,Kt)=>{var ln=di,{key:$t,name:Tt}=ln,ft=Ye(ln,["key","name"]),$e,Gt;return ee.createElement("div",{style:{marginBottom:10},key:$t},ee.createElement(He.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(st.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${De.Z.blankIndex}`},"\u586B\u7A7A\u9879",Kt+1),ee.createElement(bt.default.Item,ze(je({},ft),{name:[Tt,"model"],noStyle:!0}),ee.createElement(Pt.ZP.Group,{onChange:()=>{const Ht=wt.getFieldValue(Wt);wt.setFieldsValue({[Wt]:Ht.map((ht,at)=>ze(je({},ht),{answer_text:Tt===at?[""]:ht.answer_text}))})}},ee.createElement(Pt.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(ct.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(yt.Z,null))),ee.createElement(Pt.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(ct.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(yt.Z,null)))))),ee.createElement(He.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(st.Z,{flex:1},ee.createElement(He.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(st.Z,{flex:1},ee.createElement(bt.default.Item,ze(je({},ft),{name:[Tt,"answer_text"],noStyle:!0}),((Gt=($e=wt.getFieldValue(Wt))==null?void 0:$e[Tt])==null?void 0:Gt.model)===1?ee.createElement(Xe,null):ee.createElement(lt,null))),Dt&&ee.createElement(st.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(bt.default.Item,ze(je({},ft),{name:[Tt,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:De.Z.blankInputNumberWrapper}),ee.createElement(Ge.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(bt.default.Item,ze(je({},ft),{name:[Tt,"position"],noStyle:!0}),ee.createElement(We.default,{type:"hidden"})))))})))),ee.createElement(He.Z,{align:"middle"},ee.createElement(bt.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(st.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(bt.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(st.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Gn==null?void 0:Gn.length)>1&&ee.createElement(He.Z,{align:"middle",className:(Gn==null?void 0:Gn.length)>1?"mb30":`${De.Z.hide}`},ee.createElement(bt.default.Item,{name:"is_ordered"},ee.createElement(Ze,null)),ee.createElement(st.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:()=>et(!0)},ee.createElement(bt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(ut.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Mt}))))}},11832:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return ve}});var le=me(59301),Te=me(95237),He=me(43604),st=me(78241),We=me(43809),ct=me(41984),Me=me(59301),bt=Object.defineProperty,Pt=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,De=(Ee,Le,Ne)=>Le in Ee?bt(Ee,Le,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):Ee[Le]=Ne,te=(Ee,Le)=>{for(var Ne in Le||(Le={}))mt.call(Le,Ne)&&De(Ee,Ne,Le[Ne]);if(ut)for(var Ne of ut(Le))yt.call(Le,Ne)&&De(Ee,Ne,Le[Ne]);return Ee},ee=(Ee,Le)=>Pt(Ee,Ge(Le)),ce=(Ee,Le)=>{var Ne={};for(var je in Ee)mt.call(Ee,je)&&Le.indexOf(je)<0&&(Ne[je]=Ee[je]);if(Ee!=null&&ut)for(var je of ut(Ee))Le.indexOf(je)<0&&yt.call(Ee,je)&&(Ne[je]=Ee[je]);return Ne};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},he=({value:Ee,onChange:Le,form:Ne})=>{const je=(Ee==null?void 0:Ee.is_answer)===1,ze=Ee==null?void 0:Ee.choice_text,Ye=()=>{const Xe=Ne.getFieldsValue().choices.map(lt=>({choice_text:lt.choice_text,is_answer:0}));Ne.setFieldsValue({choices:Xe}),Le(ee(te({},Ee),{is_answer:1}))};return Me.createElement(Te.Z,{className:We.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Me.createElement(He.Z,{onClick:Ye,className:`${We.Z.choiceIndex} ${We.Z.judgementIndex} ${je?We.Z.activeAnswer:""}`},se[ze]),Me.createElement(He.Z,{flex:1,className:`${We.Z.editorWrap} ml15`},Me.createElement("div",{className:`${We.Z.inputBorder} ${We.Z.placeholder} ${je?We.Z.activeJudgementAnswer:""}`},ze)),Me.createElement(He.Z,{flex:"0 0 auto",className:"ml15"},Me.createElement("div",{onClick:Ye,className:`${We.Z.setAnswerBtn} ${je?We.Z.activeAnswer:""}`},je?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ve=({questionTitlePlaceholder:Ee,choiceKey:Le,form:Ne})=>{const[je,ze]=(0,le.useState)(!1);return Me.createElement("div",{className:We.Z.wrap},Me.createElement("div",{className:We.Z.questionTitleEditorWrap},Me.createElement(st.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Me.createElement(ct.h,{scrollId:"name",watch:!0,height:140,placeholder:Ee}))),Me.createElement(st.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Me.createElement(st.default.List,{name:"choices",rules:[{validator(Ye,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"))}}]},Ye=>Me.createElement("div",{id:"choices"},Ye.map(Xe=>{var lt=Xe,{key:Ze,name:Lt}=lt,rt=ce(lt,["key","name"]);return Me.createElement(st.default.Item,ee(te({},rt),{key:Ze,name:Lt,noStyle:!0}),Me.createElement(he,{form:Ne}))})))),Me.createElement("div",{onClick:()=>ze(!0)},Me.createElement(st.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Me.createElement(ct.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:je}))))}},41984:function(_n,yn,me){"use strict";me.d(yn,{h:function(){return te},x:function(){return ee}});var le=me(12290),Te=me(43809),He=me(85149),st=me(59301),We=Object.defineProperty,ct=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,bt=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,ut=(ce,se,he)=>se in ce?We(ce,se,{enumerable:!0,configurable:!0,writable:!0,value:he}):ce[se]=he,mt=(ce,se)=>{for(var he in se||(se={}))Pt.call(se,he)&&ut(ce,he,se[he]);if(bt)for(var he of bt(se))Ge.call(se,he)&&ut(ce,he,se[he]);return ce},yt=(ce,se)=>ct(ce,Me(se)),De=(ce,se)=>{var he={};for(var ve in ce)Pt.call(ce,ve)&&se.indexOf(ve)<0&&(he[ve]=ce[ve]);if(ce!=null&&bt)for(var ve of bt(ce))se.indexOf(ve)<0&&Ge.call(ce,ve)&&(he[ve]=ce[ve]);return he};const te=ce=>{var se=ce,{value:he,onChange:ve,scrollId:Ee}=se,Le=De(se,["value","onChange","scrollId"]);return st.createElement("div",{id:Ee||""},st.createElement(le.Z,yt(mt({},Le),{defaultValue:he,onChange:(Ne,je)=>{je!=null&&je.length?ve(Ne,je):ve(Ne)}})))},ee=({value:ce,onChange:se,placeholder:he,height:ve=140,isEdit:Ee,miniToolbar:Le,watch:Ne=!0})=>Ee?st.createElement(le.Z,{watch:Ne,isFocus:!0,height:ve||void 0,placeholder:he,defaultValue:ce,onChange:se,miniToolbar:Le}):st.createElement("div",{style:{cursor:"pointer"}},ce?st.createElement(He.Z,{className:Te.Z.inputBorder,value:ce}):st.createElement("div",{className:`${Te.Z.inputBorder} ${Te.Z.placeholder} inputBorderError`},he))},35173:function(_n,yn,me){"use strict";me.d(yn,{W:function(){return lt}});var le=me(59301),Te=me(8591),He=me(12563),st=me(78241),We=me(78673),ct=me(95237),Me=me(43604),bt=me(6848),Pt=me(92832),Ge=me(5871),ut=me(43809),mt=me(41984),yt=me(12290),De=me(61485),te=Object.defineProperty,ee=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Ee=(Ze,Lt,rt)=>Lt in Ze?te(Ze,Lt,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Ze[Lt]=rt,Le=(Ze,Lt)=>{for(var rt in Lt||(Lt={}))he.call(Lt,rt)&&Ee(Ze,rt,Lt[rt]);if(se)for(var rt of se(Lt))ve.call(Lt,rt)&&Ee(Ze,rt,Lt[rt]);return Ze},Ne=(Ze,Lt)=>ee(Ze,ce(Lt)),je=(Ze,Lt)=>{var rt={};for(var Ot in Ze)he.call(Ze,Ot)&&Lt.indexOf(Ot)<0&&(rt[Ot]=Ze[Ot]);if(Ze!=null&&se)for(var Ot of se(Ze))Lt.indexOf(Ot)<0&&ve.call(Ze,Ot)&&(rt[Ot]=Ze[Ot]);return rt};const ze=Ze=>{var Lt=Ze,{value:rt,onChange:Ot}=Lt,wt=je(Lt,["value","onChange"]);const Dt=Wt=>{Ot([Wt])};return le.createElement(yt.Z,Ne(Le({},wt),{defaultValue:rt==null?void 0:rt[0],onChange:Dt}))},Ye=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 Lt=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:Lt})=>le.createElement(He.default,{closable:!0,onClose:Lt,className:ut.Z.keywordTag},le.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Ze.join(" \u6216 "))),lt=({questionTitlePlaceholder:Ze,form:Lt,showKeywords:rt,isMustKeyWords:Ot=rt})=>{const[wt,Dt]=(0,le.useState)(!1),[Wt,Mt]=(0,le.useState)(""),et=st.default.useWatch("use_keywords",Lt),Ue=st.default.useWatch("question_score",Lt);return le.createElement("div",{className:ut.Z.wrap},le.createElement("div",{className:ut.Z.questionTitleEditorWrap},le.createElement(st.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},le.createElement(mt.h,{scrollId:"name",watch:!0,height:140,placeholder:Ze}))),le.createElement(st.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},le.createElement(ze,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),rt&&!Ot&&le.createElement(st.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},le.createElement(We.Z,{defaultChecked:!0})),rt&&Ot&&le.createElement(ct.Z,{align:"middle",className:"mb30"},le.createElement(st.default.Item,{name:"use_keywords",valuePropName:"checked"},le.createElement(We.Z,null)),le.createElement(Me.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(Me.Z,null,le.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"},le.createElement(De.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(et||!Ot)&&le.createElement(st.default.List,{name:"keywords",rules:[{validator(Rt,Pn){return Ot?Pn!=null&&Pn.length?(Pn==null?void 0:Pn.reduce((_t,qt)=>_t+qt.score,0))>parseFloat(Ue)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Rt,{add:Pn,remove:xn})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${ut.Z.title} mb10`},Ot?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(ct.Z,{align:"middle",className:"font14 mb30"},le.createElement(Me.Z,{flex:1},le.createElement(Pt.default,{value:Wt,onChange:_t=>{Mt(_t.target.value)},maxLength:50,allowClear:!0,onPressEnter:_t=>{var qt,cn,Gn,gn;const Zn=`${(qt=_t.target)==null?void 0:qt.value}`,Ct=(Gn=(cn=Zn==null?void 0:Zn.split("|"))==null?void 0:cn.filter(Kt=>!!Kt))==null?void 0:Gn.map(Kt=>Kt==null?void 0:Kt.trim()),Wn=Lt.getFieldValue("keywords"),di=((gn=Wn==null?void 0:Wn.map(Kt=>Kt==null?void 0:Kt.keyword))==null?void 0:gn.flat())||[];for(const Kt of Ct)if(di.includes(Kt)){Te.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Ye(Zn)&&(Pn({keyword:Ct,score:1}),Mt(""))},className:ut.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(Me.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Rt.map(_t=>{var qt=_t,{key:cn,name:Gn}=qt,gn=je(qt,["key","name"]);return le.createElement(ct.Z,{key:cn,className:"mb20",style:{marginRight:148}},le.createElement(Me.Z,{flex:1},le.createElement(ct.Z,{align:"middle",justify:"space-between"},le.createElement(st.default.Item,Ne(Le({},gn),{name:[Gn,"keyword"]}),le.createElement(Xe,{onClose:()=>xn(Gn)})),Ot&&le.createElement(st.default.Item,Ne(Le({},gn),{name:[Gn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:ut.Z.blankInputNumberWrapper}),le.createElement(Ge.Z,{className:ut.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(st.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(mt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:wt}))))}},94734:function(_n,yn,me){"use strict";me.d(yn,{tc:function(){return Nr.t},uh:function(){return le.u},rL:function(){return ir},u8:function(){return He.u},ZZ:function(){return Te.Z},Wk:function(){return st.W}});var le=me(65357),Te=me(11832),He=me(70472),st=me(35173),We=me(59301),ct=me(36381),Me=me(78241),bt=me(95237),Pt=me(43604),Ge=me(5871),ut=me(6848),mt=me(38854),yt=me(43809),De=me(12893),te=me(41984),ee=me(43418),ce=me(92832),se=me(78673),he=me(59301),ve=Object.defineProperty,Ee=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Ye=(pi,li,xi)=>li in pi?ve(pi,li,{enumerable:!0,configurable:!0,writable:!0,value:xi}):pi[li]=xi,Xe=(pi,li)=>{for(var xi in li||(li={}))je.call(li,xi)&&Ye(pi,xi,li[xi]);if(Ne)for(var xi of Ne(li))ze.call(li,xi)&&Ye(pi,xi,li[xi]);return pi},lt=(pi,li)=>Ee(pi,Le(li)),Ze=(pi,li)=>{var xi={};for(var Gi in pi)je.call(pi,Gi)&&li.indexOf(Gi)<0&&(xi[Gi]=pi[Gi]);if(pi!=null&&Ne)for(var Gi of Ne(pi))li.indexOf(Gi)<0&&ze.call(pi,Gi)&&(xi[Gi]=pi[Gi]);return xi};const Lt=({value:pi,onChange:li})=>{const xi=Oi=>{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:yt.Z.modal,onOk:()=>{const to=[...pi];to.splice(Oi,1),li(to)}})},Gi=()=>{const Oi=[...pi];Oi.push(""),li(Oi)};return he.createElement(bt.Z,{className:"ml20"},he.createElement(Pt.Z,{flex:1},pi==null?void 0:pi.map((Oi,to)=>he.createElement(bt.Z,{key:`${Oi}_${to}`,align:"middle",className:"mb20"},he.createElement(ce.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Oi,autoSize:{maxRows:3},maxLength:1e3,onBlur:eo=>{const Be=[...pi],Fi=eo.target.value.trim();Be[to]=Fi,li(Be)}}),he.createElement(ut.Z,{title:"\u5220\u9664"},he.createElement(De.Z,{className:yt.Z.deleteIcon,style:{marginLeft:15,visibility:to>0?"visible":"hidden"},onClick:()=>xi(to)}))))),he.createElement(Pt.Z,null,he.createElement("div",{className:`${yt.Z.addBtn}`,onClick:()=>{Gi()}},"\u65B0\u589E\u7B54\u6848")))},rt=({value:pi=!0,onChange:li})=>he.createElement(se.Z,{checked:!pi,onChange:xi=>{li(!xi)}}),Ot="\u2581",wt=({questionTitlePlaceholder:pi,form:li,name:xi,scoreByBlank:Gi=!1,answerKey:Oi,titleKey:to="name",analysisKey:eo="analysis",isOrdered:Be="is_ordered"})=>{var Fi,wr;const[Fn,wi]=(0,We.useState)(!1),$i=(dn,Nt)=>{const dt=Nt.line;let nn=0;for(let zn=0;zn<dt;zn++)nn+=dn.getLine(zn).split(Ot).length-1;const vn=dn.getLine(dt).substring(0,Nt.ch);return nn+=vn.split(Ot).length-1,nn},tr=(dn,Nt,dt,nn)=>{const vn=dn.getRange(Nt.from,Nt.to);let zn=0;if(Nt.text.forEach(qn=>{zn+=qn.split(Ot).length-1}),Nt.origin!=="setValue"){if(vn&&vn.indexOf(Ot)!==-1){const qn=vn.split(Ot).length-1,Ft=$i(dn,Nt.from);if(console.log(`\u5220\u9664${qn}\u4E2A\uFF0C \u524D\u9762\u6709${Ft}\u4E2A\uFF0C\u65B0\u589E${zn}\u4E2A`),qn>1){const Bn=Array.from({length:qn},(Kn,Ci)=>Ft+Ci);nn(Bn)}else nn(Ft)}else if(zn>0){const qn=$i(dn,Nt.from);console.log(`\u65B0\u589E${zn}\u4E2A\uFF0C\u4E4B\u524D\u6709${qn}\u4E2A`),dt(zn,qn)}}},ei=()=>{const dn=li.getFieldValue(["sub_item_banks",...Oi]);li.setFieldValue(["sub_item_banks",...Oi],dn==null?void 0:dn.map((Nt,dt)=>lt(Xe({},Nt),{position:dt+1})))},$n=(0,We.useRef)(),zt=(dn,Nt)=>{for(let dt=0;dt<dn;dt++)$n.current({position:null,answer_text:[""]},Nt+dt);ei()},Vt=(0,We.useRef)(),Qe=dn=>{Vt.current(dn),ei()},an=(wr=(Fi=li.getFieldValue("sub_item_banks"))==null?void 0:Fi[Oi==null?void 0:Oi[0]])==null?void 0:wr[Oi==null?void 0:Oi[1]];return(0,We.useEffect)(()=>{console.log("========",li.getFieldsValue())},[li]),he.createElement("div",{className:yt.Z.wrap},he.createElement("div",{className:yt.Z.questionTitleEditorWrap},he.createElement(Me.default.Item,{label:"\u9898\u5E72",name:to,labelCol:{span:24},rules:[{required:!0}]},he.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:pi,showNullButton:!0,onCMBeforeChange:(dn,Nt)=>{tr(dn,Nt,zt,Qe)}}))),he.createElement(Me.default.List,{name:Oi,rules:[{validator(dn,Nt){if((Nt==null?void 0:Nt.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const dt of Nt){const{answer_text:nn}=dt||{};if(nn!=null&&nn.some(vn=>(vn==null?void 0:vn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(dn,{add:Nt,remove:dt},{errors:nn})=>($n.current=Nt,Vt.current=dt,he.createElement(he.Fragment,null,he.createElement(Me.default.Item,{label:he.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(dn!=null&&dn.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}}),dn.map((vn,zn)=>{var qn=vn,{key:Ft,name:Bn}=qn,Kn=Ze(qn,["key","name"]);return he.createElement(bt.Z,{align:"top",key:Ft},he.createElement(Pt.Z,{className:`${yt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",zn+1),he.createElement(Pt.Z,{flex:1},he.createElement(bt.Z,{align:"top",justify:"space-between"},he.createElement(Pt.Z,{flex:1},he.createElement(Me.default.Item,lt(Xe({},Kn),{name:[Bn,"answer_text"],noStyle:!0}),he.createElement(Lt,null))),Gi&&he.createElement(Pt.Z,{flex:"224px"},he.createElement(Me.default.Item,lt(Xe({},Kn),{name:[Bn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:yt.Z.blankInputNumberWrapper}),he.createElement(Ge.Z,{className:yt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),he.createElement(Me.default.Item,lt(Xe({},Kn),{name:[Bn,"position"],noStyle:!0}),he.createElement(ce.default,{type:"hidden"}))))})))),he.createElement(bt.Z,{align:"middle"},he.createElement(Me.default.Item,{name:[xi,"downcase"],valuePropName:"checked"},he.createElement(se.Z,null)),he.createElement(Pt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),he.createElement(bt.Z,{align:"middle"},he.createElement(Me.default.Item,{name:[xi,"no_space"],valuePropName:"checked"},he.createElement(se.Z,null)),he.createElement(Pt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(an==null?void 0:an.length)>1&&he.createElement(bt.Z,{align:"middle",className:(an==null?void 0:an.length)>1?"mb30":`${yt.Z.hide}`},he.createElement(Me.default.Item,{name:Be},he.createElement(rt,null)),he.createElement(Pt.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:()=>wi(!0)},he.createElement(Me.default.Item,{name:eo,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:Fn}))))};var Dt=me(59301),Wt=Object.defineProperty,Mt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable,xn=(pi,li,xi)=>li in pi?Wt(pi,li,{enumerable:!0,configurable:!0,writable:!0,value:xi}):pi[li]=xi,_t=(pi,li)=>{for(var xi in li||(li={}))Rt.call(li,xi)&&xn(pi,xi,li[xi]);if(Ue)for(var xi of Ue(li))Pn.call(li,xi)&&xn(pi,xi,li[xi]);return pi},qt=(pi,li)=>Mt(pi,et(li)),cn=(pi,li)=>{var xi={};for(var Gi in pi)Rt.call(pi,Gi)&&li.indexOf(Gi)<0&&(xi[Gi]=pi[Gi]);if(pi!=null&&Ue)for(var Gi of Ue(pi))li.indexOf(Gi)<0&&Pn.call(pi,Gi)&&(xi[Gi]=pi[Gi]);return xi};const Gn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},gn=({value:pi,onChange:li,form:xi,choiceKey:Gi})=>{const Oi=(pi==null?void 0:pi.is_answer)===1,to=pi==null?void 0:pi.choice_text,eo=()=>{var Be;const Fi=(Be=xi==null?void 0:xi.getFieldValue(["sub_item_banks",...Gi]))==null?void 0:Be.map(wr=>({choice_text:wr.choice_text,is_answer:0}));xi==null||xi.setFieldValue(["sub_item_banks",...Gi],Fi),li(qt(_t({},pi),{is_answer:1}))};return Dt.createElement(bt.Z,{className:yt.Z.choiceWrap,align:"middle",wrap:!1},Dt.createElement(Pt.Z,{onClick:eo,className:`${yt.Z.choiceIndex} ${yt.Z.judgementIndex} ${Oi?yt.Z.activeAnswer:""}`},Gn[to]),Dt.createElement(Pt.Z,{flex:1,className:`${yt.Z.editorWrap} ml15`},Dt.createElement("div",{className:`${yt.Z.inputBorder} ${yt.Z.placeholder} ${Oi?yt.Z.activeJudgementAnswer:""}`},to)),Dt.createElement(Pt.Z,{flex:"0 0 auto",className:"ml15"},Dt.createElement("div",{onClick:eo,className:`${yt.Z.setAnswerBtn} ${Oi?yt.Z.activeAnswer:""}`},Oi?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},Zn=({questionTitlePlaceholder:pi,choiceKey:li="choices",form:xi,titleKey:Gi="name",analysisKey:Oi="analysis"})=>{const[to,eo]=(0,We.useState)(!1);return Dt.createElement("div",{className:yt.Z.wrap},Dt.createElement("div",{className:yt.Z.questionTitleEditorWrap},Dt.createElement(Me.default.Item,{label:"\u9898\u5E72",name:Gi,labelCol:{span:24},rules:[{required:!0}]},Dt.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),Dt.createElement(Me.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Dt.createElement(Me.default.List,{name:li,rules:[{validator(Be,Fi){return Fi.some(Fn=>(Fn==null?void 0:Fn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Be=>Dt.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},Be.map(Fi=>{var wr=Fi,{key:Fn,name:wi}=wr,$i=cn(wr,["key","name"]);return Dt.createElement(Me.default.Item,qt(_t({},$i),{key:Fn,name:wi,noStyle:!0}),Dt.createElement(gn,{form:xi,choiceKey:li}))})))),Dt.createElement("div",{className:"mt30",onClick:()=>eo(!0)},Dt.createElement(Me.default.Item,{name:Oi,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:to}))))};var Ct=me(8591),Wn=me(12563),di=me(12290),Kt=me(61485),ln=Object.defineProperty,$t=Object.defineProperties,Tt=Object.getOwnPropertyDescriptors,ft=Object.getOwnPropertySymbols,$e=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,Ht=(pi,li,xi)=>li in pi?ln(pi,li,{enumerable:!0,configurable:!0,writable:!0,value:xi}):pi[li]=xi,ht=(pi,li)=>{for(var xi in li||(li={}))$e.call(li,xi)&&Ht(pi,xi,li[xi]);if(ft)for(var xi of ft(li))Gt.call(li,xi)&&Ht(pi,xi,li[xi]);return pi},at=(pi,li)=>$t(pi,Tt(li)),Re=(pi,li)=>{var xi={};for(var Gi in pi)$e.call(pi,Gi)&&li.indexOf(Gi)<0&&(xi[Gi]=pi[Gi]);if(pi!=null&&ft)for(var Gi of ft(pi))li.indexOf(Gi)<0&&Gt.call(pi,Gi)&&(xi[Gi]=pi[Gi]);return xi};const Pe=pi=>{var li=pi,{value:xi,onChange:Gi}=li,Oi=Re(li,["value","onChange"]);const to=eo=>{Gi([eo])};return We.createElement(di.Z,at(ht({},Oi),{defaultValue:xi==null?void 0:xi[0],onChange:to}))},ye=pi=>{if(!pi)return!1;let li=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==="|"?(Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Oe=({value:pi=[],onClose:li})=>We.createElement(Wn.default,{closable:!0,onClose:li,className:yt.Z.keywordTag},We.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},pi.join(" \u6216 "))),Ke=({questionTitlePlaceholder:pi,form:li,showKeywords:xi,isMustKeyWords:Gi=xi,titleKey:Oi="name",analysisKey:to="analysis",answerTexts:eo="answer_texts",keywords:Be="keywords",useKeywords:Fi="use_keywords",indexs:wr})=>{const[Fn,wi]=(0,We.useState)(!1),[$i,tr]=(0,We.useState)(""),[ei,$n]=(0,We.useState)(!1),zt=Me.default.useWatch("question_score",li);return We.createElement("div",{className:yt.Z.wrap},We.createElement("div",{className:yt.Z.questionTitleEditorWrap},We.createElement(Me.default.Item,{label:"\u9898\u5E72",name:Oi,labelCol:{span:24},rules:[{required:!0}]},We.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),We.createElement(Me.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:eo,labelCol:{span:24}},We.createElement(Pe,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),xi&&!Gi&&We.createElement(Me.default.Item,{hidden:!0,name:Fi,valuePropName:"checked"},We.createElement(se.Z,{defaultChecked:!0})),xi&&Gi&&We.createElement(bt.Z,{align:"middle",className:"mb30"},We.createElement(Me.default.Item,{name:Fi,valuePropName:"checked"},We.createElement(se.Z,{onChange:()=>{var Vt,Qe,an,dn,Nt,dt;console.log(li.getFieldsValue()),$n((an=(Qe=(Vt=li.getFieldsValue())==null?void 0:Vt.sub_item_banks)==null?void 0:Qe[wr])==null?void 0:an.use_keywords),console.log((dt=(Nt=(dn=li.getFieldsValue())==null?void 0:dn.sub_item_banks)==null?void 0:Nt[wr])==null?void 0:dt.use_keywords),console.log(ei)}})),We.createElement(Pt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),We.createElement(Pt.Z,null,We.createElement(ut.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(Kt.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(ei||!Gi)&&We.createElement(Me.default.List,{name:Be,rules:[{validator(Vt,Qe){return Gi?Qe!=null&&Qe.length?(Qe==null?void 0:Qe.reduce((dn,Nt)=>dn+Nt.score,0))>parseFloat(zt)?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()}}]},(Vt,{add:Qe,remove:an})=>We.createElement(We.Fragment,null,We.createElement("div",{className:`${yt.Z.title} mb10`},Gi?"\u5173\u952E\u8BCD":We.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),We.createElement(bt.Z,{align:"middle",className:"font14 mb30"},We.createElement(Pt.Z,{flex:1},We.createElement(ce.default,{value:$i,onChange:dn=>{tr(dn.target.value)},maxLength:50,allowClear:!0,onPressEnter:dn=>{var Nt,dt,nn,vn;const zn=`${(Nt=dn.target)==null?void 0:Nt.value}`,qn=(nn=(dt=zn==null?void 0:zn.split("|"))==null?void 0:dt.filter(Kn=>!!Kn))==null?void 0:nn.map(Kn=>Kn==null?void 0:Kn.trim()),Ft=li.getFieldValue(["sub_item_banks",...Be]),Bn=((vn=Ft==null?void 0:Ft.map(Kn=>Kn==null?void 0:Kn.keyword))==null?void 0:vn.flat())||[];for(const Kn of qn)if(Bn.includes(Kn)){Ct.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}ye(zn)&&(Qe({keyword:qn,score:1}),tr(""))},className:yt.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(Pt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Vt.map(dn=>{var Nt=dn,{key:dt,name:nn}=Nt,vn=Re(Nt,["key","name"]);return We.createElement(bt.Z,{key:dt,className:"mb20",style:{marginRight:148}},We.createElement(Pt.Z,{flex:1},We.createElement(bt.Z,{align:"middle",justify:"space-between"},We.createElement(Me.default.Item,at(ht({},vn),{name:[nn,"keyword"]}),We.createElement(Oe,{onClose:()=>an(nn)})),Gi&&We.createElement(Me.default.Item,at(ht({},vn),{name:[nn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:yt.Z.blankInputNumberWrapper}),We.createElement(Ge.Z,{className:yt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),We.createElement("div",{onClick:()=>wi(!0)},We.createElement(Me.default.Item,{name:to,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:Fn}))))};var Fe=me(59301),Et=Object.defineProperty,sn=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,wn=Object.prototype.hasOwnProperty,hi=Object.prototype.propertyIsEnumerable,Rn=(pi,li,xi)=>li in pi?Et(pi,li,{enumerable:!0,configurable:!0,writable:!0,value:xi}):pi[li]=xi,Sn=(pi,li)=>{for(var xi in li||(li={}))wn.call(li,xi)&&Rn(pi,xi,li[xi]);if(en)for(var xi of en(li))hi.call(li,xi)&&Rn(pi,xi,li[xi]);return pi},Pi=(pi,li)=>sn(pi,pn(li)),zi=(pi,li)=>{var xi={};for(var Gi in pi)wn.call(pi,Gi)&&li.indexOf(Gi)<0&&(xi[Gi]=pi[Gi]);if(pi!=null&&en)for(var Gi of en(pi))li.indexOf(Gi)<0&&hi.call(pi,Gi)&&(xi[Gi]=pi[Gi]);return xi};const{Panel:Zi}=ct.default,ir=({questionTitlePlaceholder:pi,choiceKey:li,form:xi,withScore:Gi})=>{const[Oi,to]=(0,We.useState)([]),eo=Be=>{to(Be)};return Fe.createElement("div",{className:yt.Z.wrap},Fe.createElement("div",{className:yt.Z.questionTitleEditorWrap},Fe.createElement(Me.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Fe.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),Fe.createElement(Me.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),Fe.createElement(Me.default.List,{name:"sub_item_banks",rules:[{validator(Be,Fi){return Fi?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Be,{add:Fi,remove:wr,move:Fn})=>{const wi=xi.getFieldValue("sub_item_banks");return Fe.createElement(Fe.Fragment,null,Fe.createElement(ct.default,{className:Be.length>0?yt.Z.collapseWrapper:"",bordered:!1,activeKey:Oi,onChange:eo,expandIcon:({isActive:$i})=>Fe.createElement("i",{className:`iconfont icon-weizhankai ${$i?yt.Z.open:yt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},Be.map(($i,tr)=>{var ei=$i,{key:$n,name:zt}=ei,Vt=zi(ei,["key","name"]),Qe,an,dn,Nt,dt,nn,vn,zn,qn,Ft;return Fe.createElement(Zi,{className:yt.Z.panel,forceRender:!0,header:Fe.createElement("div",{className:yt.Z.panelHeader},"\u7B2C",tr+1,"\u5C0F\u9898",Fe.createElement("span",null,"\uFF08",((Qe=wi==null?void 0:wi[zt])==null?void 0:Qe.item_type)=="SINGLE"?"\u5355\u9009\u9898":((an=wi==null?void 0:wi[zt])==null?void 0:an.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((dn=wi==null?void 0:wi[zt])==null?void 0:dn.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((Nt=wi==null?void 0:wi[zt])==null?void 0:Nt.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:zt,extra:Fe.createElement(bt.Z,{align:"middle",onClick:Bn=>Bn.stopPropagation()},Gi&&Fe.createElement(Pt.Z,null,Fe.createElement(Me.default.Item,Pi(Sn({},Vt),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[zt,"question_score"],className:yt.Z.blankInputNumberWrapper}),Fe.createElement(Ge.Z,{className:yt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),Fe.createElement(Pt.Z,null,Fe.createElement(bt.Z,{align:"middle",className:"pl40",justify:"end"},tr!==0&&Fe.createElement("div",{onClick:()=>{var Bn;Fn(tr,tr-1);const Kn=(Bn=xi.getFieldValue("sub_item_banks"))==null?void 0:Bn.map((Ci,En)=>(Be.map((un,bn)=>{En===bn&&(Ci.q_position=Number(un.name)+1)}),Ci));xi.setFieldValue("sub_item_banks",Kn)}},Fe.createElement(ut.Z,{title:"\u4E0A\u79FB"},Fe.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),tr<Be.length-1&&Fe.createElement("div",{onClick:()=>{var Bn;Fn(tr,tr+1);const Kn=(Bn=xi.getFieldValue("sub_item_banks"))==null?void 0:Bn.map((Ci,En)=>(Be.map((un,bn)=>{En===bn&&(Ci.q_position=Number(un.name)+1)}),Ci));xi.setFieldValue("sub_item_banks",Kn)},className:tr===0?"":"ml15"},Fe.createElement(ut.Z,{title:"\u4E0B\u79FB"},Fe.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),Fe.createElement(Pt.Z,null,Fe.createElement(ut.Z,{title:"\u5220\u9664"},Fe.createElement(De.Z,{className:`${yt.Z.deleteIcon} ml15`,onClick:()=>wr(zt)}))))},Fe.createElement(Me.default.Item,Pi(Sn({},Vt),{name:zt}),(((dt=wi==null?void 0:wi[zt])==null?void 0:dt.item_type)=="SINGLE"||((nn=wi==null?void 0:wi[zt])==null?void 0:nn.item_type)=="MULTIPLE")&&Fe.createElement(le.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((vn=wi==null?void 0:wi[zt])==null?void 0:vn.item_type)=="MULTIPLE",form:xi,choiceKey:[zt,"choices"],titleKey:[zt,"name"],analysisKey:[zt,"analysis"],choiceOptionsPath:["sub_item_banks",zt,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((zn=wi==null?void 0:wi[zt])==null?void 0:zn.item_type)=="COMPLETION"&&Fe.createElement(wt,{form:xi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:zt,titleKey:[zt,"name"],analysisKey:[zt,"analysis"],isOrdered:[zt,"is_ordered"],answerKey:[zt,"standard_answers"]}),((qn=wi==null?void 0:wi[zt])==null?void 0:qn.item_type)=="JUDGMENT"&&Fe.createElement(Zn,{form:xi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[zt,"name"],analysisKey:[zt,"analysis"],choiceKey:[zt,"choices"]}),((Ft=wi==null?void 0:wi[zt])==null?void 0:Ft.item_type)=="SUBJECTIVE"&&Fe.createElement(Ke,{showKeywords:!0,isMustKeyWords:!1,form:xi,titleKey:[zt,"name"],analysisKey:[zt,"analysis"],answerTexts:[zt,"answer_texts"],useKeywords:[zt,"use_keywords"],keywords:[zt,"keywords"],indexs:zt,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),Be.length<20&&Fe.createElement(mt.Z,{menu:{items:[{label:Fe.createElement("div",{onClick:()=>{Fi({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),to([Be==null?void 0:Be.length,...Oi])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:Fe.createElement("div",{onClick:()=>{Fi({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),to([Be==null?void 0:Be.length,...Oi])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:Fe.createElement("div",{onClick:()=>{Fi({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),to([Be==null?void 0:Be.length,...Oi])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:Fe.createElement("div",{onClick:()=>{Fi({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),to([Be==null?void 0:Be.length,...Oi])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:Fe.createElement("div",{onClick:()=>{Fi({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),to([Be==null?void 0:Be.length,...Oi])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter($i=>$i.show).map($i=>({label:$i.label,key:$i.key}))}},Fe.createElement("div",{className:`${yt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var Nr=me(90502)},85149:function(_n,yn,me){"use strict";me.d(yn,{z:function(){return je},Z:function(){return ze}});var le=me(59301),Te=me(50304),He=me(24768),st=me(64018),We=me(65157),ct=me(3294),Me=me(955),bt=me(15342),Pt=me(1012),Ge=me(23210),ut=me(59301),yt=({html:Ye})=>{const Xe=(0,le.useRef)(null),lt=(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 Lt=Xe.current.attachShadow({mode:"open"});lt.current=document.createElement("div"),lt.current.className="markdown-body",lt.current.innerHTML=Ye,Lt.appendChild(lt.current);const rt=document.createElement("style");return rt.textContent=Ze,Lt.appendChild(rt),()=>{Lt.innerHTML=""}},[]),(0,le.useEffect)(()=>{lt.current&&(lt.current.innerHTML=Ye)},[Ye]),ut.createElement("div",{ref:Xe})},De=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,se=(Ye,Xe,lt)=>Xe in Ye?De(Ye,Xe,{enumerable:!0,configurable:!0,writable:!0,value:lt}):Ye[Xe]=lt,he=(Ye,Xe)=>{for(var lt in Xe||(Xe={}))ee.call(Xe,lt)&&se(Ye,lt,Xe[lt]);if(te)for(var lt of te(Xe))ce.call(Xe,lt)&&se(Ye,lt,Xe[lt]);return Ye};const ve="@\u2581\u2581@",Ee="@\u2581@",Le=/<pre[^>]*>/g;function Ne(Ye){let Xe=document.createElement("div");return Xe.innerHTML=Ye,Xe.childNodes.length===0?"":Xe.childNodes[0].nodeValue}const je=(Ye,Xe)=>{Ye=Ye||"";const lt=/(?: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,Lt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,rt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Xe?Ye.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(lt,(Ot,wt,Dt,Wt,Mt,et,Ue)=>{const Rt=wt||Wt||et,Pn=Dt||Mt||Ue||"?";return ct.Z.API_SERVER+"/api/attachments/"+Rt+Pn+"&t="+(0,Me.Jn)(Rt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Ye=Ye.replace(rt,(Ot,wt,Dt,Wt,Mt,et,Ue)=>{const Rt=wt||Wt||et,Pn=Dt||Mt||Ue||"?";return ct.Z.API_SERVER+"/attachments/download/"+Rt+Pn+"&t="+(0,Me.Jn)(Rt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replace(lt,(Ot,wt,Dt,Wt,Mt,et,Ue)=>{const Rt=wt||Wt||et,Pn=Dt||Mt||Ue||"?";return ct.Z.API_SERVER+"/api/attachments/"+Rt+Pn+"&t="+(0,Me.Jn)(Rt,Date.now())+(Ot.indexOf(")")>-1?")":"&")}).replace(Ze,(Ot,wt,Dt,Wt,Mt)=>{const et=wt||Wt,Ue=Dt||Mt||"";return'"'+ct.Z.API_SERVER+"/api/attachments/"+et+Ue+et+Ue+"&t="+(0,Me.Jn)(et,Date.now())}).replace(Lt,(Ot,wt,Dt,Wt,Mt)=>{const et=wt||Wt,Ue=Dt||Mt||"";return"("+ct.Z.API_SERVER+"/files/uploads/"+et+Ue+et+Ue+"&t="+(0,Me.Jn)(et,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Ye)};var ze=({value:Ye="",className:Xe,showTextOnly:lt,showLines:Ze,style:Lt={},stylesPrev:rt={},highlightKeywords:Ot,showProgramFill:wt,isProgramFill:Dt,disabledFill:Wt=!1,programFillValue:Mt,onFillChange:et=Pn=>{},onFillBlur:Ue=()=>{},onFillFocus:Rt=()=>{}})=>{let Pn=String(Ye);const[xn,_t]=(0,le.useState)(""),[qt,cn]=(0,le.useState)("office"),[Gn,gn]=(0,le.useState)([]),Zn=(0,le.useRef)("a"+(0,Pt.Z)()),Ct={},Wn=(Re,Pe,ye)=>{const Oe=document.createElement(Re===Ee?"input":"textarea");Oe.style.width="100%",Oe.style.height=Re===Ee?"40px":"151px",Oe.rows=5,Oe.spellcheck=!1,Oe.name="edu-program-fill",Oe.placeholder="\u8BF7\u8F93\u5165",Oe.dataset.id=Pe;const Ke=Object.keys(Ct).length;return Ct[Ke]=Oe,`<span class="edu-program-fill-wrap ${Re===Ee?"":"show"}" style="width:${Re===Ee?"400px":"100%"}" title=${ye||""}><span>${Oe.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function di(Re){return Re=Re.replace(/!\[.*?\]\(.*?\)/g,""),Re=Re.replace(/\[.*?\]\(.*?\)/g,""),Re=Re.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Re=Re.replace(/<embed.*?>/g,""),Re=Re.replace(/<img.*?>/g,""),Re=Re.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Re=Re.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Re=Re.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Re=Re.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Re}const Kt=Re=>Re.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Pe,ye){let Oe=ye.replace(/(\n|\r)/g,"").split("}"),Ke=[];return Oe.map(Fe=>{Fe!=""&&Ke.push(`.${Zn.current} ${Fe}`)}),`<style>${Ke.join("}")}</style>`}),ln=(0,le.useMemo)(()=>{try{const Oe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ke=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Fe=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Et=/\(\/attachments\/download\//g;Pn=Pn.replace(Et,"("+ct.Z.API_SERVER+"/attachments/download/").replace(Oe,"("+ct.Z.API_SERVER+"/api/attachments/").replace(Ke,'"'+ct.Z.API_SERVER+"/api/attachments/").replace(Fe,'"'+ct.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(Oe){}if(wt){let Oe=-1;return Pn=Pn.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Ke,Fe,Et){var sn;return++Oe,Wn(Ke,Oe,(sn=Mt==null?void 0:Mt[Oe])==null?void 0:sn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Kt(Pn||"")}</pre>`}let Re=Kt(Pn);Re=(0,He.ZP)(Re);const Pe=(0,He.ez)();Pn.match(/\[TOC\]/)&&(Re=Re.replace("<p>[TOC]</p>",(0,He.Qv)()),(0,He.Iy)()),Re=Re.replace(/(__special_katext_id_\d+__)/g,(Oe,Ke)=>{const{type:Fe,expression:Et}=Pe[Ke];return(0,bt.renderToString)(Ne(Et)||"",{displayMode:Fe==="block",throwOnError:!1,output:"html"})}),Re=Re.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,He.AL)();const ye=document.createElement("div");if(ye.innerHTML=Re,lt)return ye.innerText;if(Ot){const Oe=Ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return $e(ye,Oe),ye.innerHTML}return setTimeout(()=>ht(),500),ye.innerHTML},[Pn,Ot]);(0,le.useEffect)(()=>{Gt.current&&Gt.current.querySelectorAll(["input","textarea"]).forEach(Pe=>{Pe.oninput=$t,Pe.onblur=Tt,Pe.onfocus=ft})},[Gn]),(0,le.useEffect)(()=>{var Re,Pe,ye,Oe,Ke;if(Mt!=null&&Mt.length)try{const Fe=Gt.current.querySelectorAll(".edu-program-fill-score"),Et=Gt.current.querySelectorAll('[name="edu-program-fill"]');for(const[sn,pn]of Et.entries())pn.value=((Re=Mt==null?void 0:Mt[sn])==null?void 0:Re.value)||"",((Pe=Mt==null?void 0:Mt[sn])==null?void 0:Pe.type)==="warning"?pn.className="program-fill-warning":((ye=Mt==null?void 0:Mt[sn])==null?void 0:ye.type)==="success"?pn.className="program-fill-success":pn.className="";for(const[sn,pn]of Fe.entries())pn.innerHTML=(Oe=Mt==null?void 0:Mt[sn])!=null&&Oe.score?`${(Ke=Mt==null?void 0:Mt[sn])==null?void 0:Ke.score}\u5206`:"";gn(Mt)}catch(Fe){console.log(Fe,"error")}},[Mt]);const $t=Re=>{Gn[Re.target.dataset.id]=Gn[Re.target.dataset.id]||{},Gn[Re.target.dataset.id].value=Re.target.value,gn([...Gn]),et(Gn,Re.target.dataset.id)},Tt=Re=>{Gn[Re.target.dataset.id]=Gn[Re.target.dataset.id]||{},Gn[Re.target.dataset.id].value=Re.target.value,gn([...Gn]),Ue(Gn,Re.target.dataset.id)},ft=Re=>{Gn[Re.target.dataset.id]=Gn[Re.target.dataset.id]||{},Gn[Re.target.dataset.id].value=Re.target.value,gn([...Gn]),Rt(Gn,Re.target.dataset.id)};function $e(Re,Pe){return Re.childNodes.forEach(ye=>{var Oe;if(ye.childNodes.length>0)$e(ye,Pe);else if(ye.nodeName!=="IMG")if(ye.innerHTML)ye.innerHTML=(Oe=ye.innerHTML)==null?void 0:Oe.replace(new RegExp(Pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ke=document.createElement("span");Ke.innerHTML=ye.textContent.replace(new RegExp(Pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ye.replaceWith(Ke)}})}const Gt=(0,le.useRef)();He.jb.WebkitLineClamp=Ze,Ze&&(Lt=he(he({},Lt),He.jb));function Ht(Re){let Pe=Re.target;if(Pe.tagName.toUpperCase()==="A"){let ye=Pe.getAttribute("href");if(ye.indexOf("office")>-1)Re.preventDefault(),_t(ye),cn("office");else if(ye.indexOf("application/pdf")>-1)Re.preventDefault(),_t(ye),cn("pdf");else if(ye.indexOf("text/html")>-1)Re.preventDefault(),_t(ye),cn("html");else if(ye.startsWith("#")){Re.preventDefault();let Oe=document.getElementById(ye.replace("#",""));Oe&&Oe.scrollIntoView(!0)}}}const ht=()=>{var Re;const Pe=(Re=Gt.current)==null?void 0:Re.querySelectorAll("video");Pe==null||Pe.forEach(ye=>{if(ye.oncontextmenu=()=>!1,ye.src.indexOf(".m3u8")>-1&&!ye.canPlayType("application/vnd.apple.mpegurl")){if(We.ZP.isSupported()){var Oe=new We.ZP;Oe.loadSource(ye.src),Oe.attachMedia(ye)}}})};(0,le.useEffect)(()=>{if(Gt.current&&ln&&ln.match(Le)&&window.PR.prettyPrint(),Gt.current)return Gt.current.addEventListener("click",Ht),()=>{var Re;(Re=Gt.current)==null||Re.removeEventListener("click",Ht),(0,He.AL)(),(0,He.Iy)()}},[ln,Gt.current,Ht]),(0,le.useEffect)(()=>{var Re;const Pe=ye=>{ye.preventDefault(),ye.clipboardData.setData("text",window.getSelection().toString())};return(Re=Gt.current)==null||Re.addEventListener("copy",Pe),()=>{var ye;(ye=Gt.current)==null||ye.removeEventListener("copy",Pe)}},[Gt.current]);const at=Re=>/<style[\s\S]*?>/i.test(Re||"");return le.createElement(le.Fragment,null,lt&&le.createElement("div",{ref:Gt},ln),!lt&&!at(ln)&&le.createElement("div",{ref:Gt,style:he({},Lt),className:`${Xe||""} ${Wt?"disabled-fill":""} markdown-body ${Zn.current}`,dangerouslySetInnerHTML:{__html:ln}}),!lt&&at(ln)&&le.createElement(yt,{html:ln}),le.createElement(Ge.Z,{close:!0,data:xn,type:xn!=null&&xn.length?qt:"",style:he({},rt),onClose:()=>_t("")}))}},68042:function(_n,yn,me){"use strict";me.d(yn,{C:function(){return wt}});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),st=me.n(He),We=me(24905),ct=me(95237),Me=me(8591),bt=me(6848),Pt=me(3113),Ge=me(43418),ut=me(1710),mt=me(5871),yt=me(78241),De=me(71418),te=me(955),ee=me(99064),ce=me(24065),se=me(59155),he=me(85057),ve=Object.defineProperty,Ee=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Ne=Object.getOwnPropertySymbols,je=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Ye=(Dt,Wt,Mt)=>Wt in Dt?ve(Dt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):Dt[Wt]=Mt,Xe=(Dt,Wt)=>{for(var Mt in Wt||(Wt={}))je.call(Wt,Mt)&&Ye(Dt,Mt,Wt[Mt]);if(Ne)for(var Mt of Ne(Wt))ze.call(Wt,Mt)&&Ye(Dt,Mt,Wt[Mt]);return Dt},lt=(Dt,Wt)=>Ee(Dt,Le(Wt)),Ze=(Dt,Wt,Mt)=>new Promise((et,Ue)=>{var Rt=_t=>{try{xn(Mt.next(_t))}catch(qt){Ue(qt)}},Pn=_t=>{try{xn(Mt.throw(_t))}catch(qt){Ue(qt)}},xn=_t=>_t.done?et(_t.value):Promise.resolve(_t.value).then(Rt,Pn);xn((Mt=Mt.apply(Dt,Wt)).next())});const Lt=We.default.Group,rt=({className:Dt,title:Wt,items:Mt=[],value:et,onChange:Ue})=>{const Rt=(Mt==null?void 0:Mt.length)===(et==null?void 0:et.length),Pn=(et==null?void 0:et.length)>0&&(et==null?void 0:et.length)<(Mt==null?void 0:Mt.length),xn=_t=>{const qt=Mt.map(cn=>cn.id);Ue(_t.target.checked?qt:[])};return le.createElement(ct.Z,{align:"middle",className:Dt},!!Wt&&le.createElement("div",{className:"mr20",style:{color:"#5F6368"}},Wt),le.createElement(We.default,{indeterminate:Pn,onChange:xn,checked:Rt},"\u5168\u90E8"),le.createElement(Lt,{value:et,onChange:Ue},Mt.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 wt=({className:Dt,style:Wt,dataSource:Mt})=>{var et,Ue,Rt,Pn,xn,_t,qt;const[cn,Gn]=(0,le.useState)({}),[gn,Zn]=(0,le.useState)(!0),[Ct,Wn]=(0,le.useState)(!1),[di,Kt]=(0,le.useState)(!1),[ln,$t]=(0,le.useState)(null),[Tt,ft]=(0,le.useState)(0),[$e,Gt]=(0,le.useState)({}),[Ht,ht]=(0,le.useState)(!0),[at,Re]=(0,le.useState)(0),[Pe,ye]=(0,le.useState)(0),[Oe,Ke]=(0,le.useState)(!1),Fe=(0,le.useRef)(null),[Et,sn]=(0,le.useState)(!1),[pn,en]=(0,le.useState)(!0),[wn,hi]=(0,le.useState)([]),Rn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[Sn,Pi]=(0,le.useState)(Xe({},Rn));(0,le.useEffect)(()=>{Mt!=null&&Mt.question_id&&Gn(Mt)},[Mt==null?void 0:Mt.question_id]),(0,le.useEffect)(()=>{var Fi;if(((Fi=cn==null?void 0:cn.exercise_question_resubmit)==null?void 0:Fi.status)==="running"){const wr=setInterval(()=>{ir()},3e3);return()=>clearInterval(wr)}},[(et=cn==null?void 0:cn.exercise_question_resubmit)==null?void 0:et.status]),(0,le.useEffect)(()=>{var Fi;di&&(di===1&&(Sn.question_status=Nr.map(wr=>wr.value),Sn.review=pi.map(wr=>wr.value)),di===2&&(Sn.exercise_question_resubmit_id=(Fi=cn==null?void 0:cn.exercise_question_resubmit)==null?void 0:Fi.id,ln===1&&(Sn.success_status=[1]),ln===2&&(Sn.success_status=[0])),Pi(Xe({},Sn)),zi(Sn),ye(cn!=null&&cn.is_mirror?3:10),Re(cn!=null&&cn.is_mirror?1:5))},[di]),(0,le.useEffect)(()=>{Et&&Zi()},[Et]);const zi=Fi=>Ze(void 0,null,function*(){Zn(!0);const wr=yield(0,ee.ZP)(`/api/exercise_questions/${cn==null?void 0:cn.question_id}/resubmit_student_list.json`,{method:"get",params:Fi});(wr==null?void 0:wr.status)==0&&(Gt(wr||[]),ft(wr==null?void 0:wr.count)),Zn(!1)}),Zi=()=>Ze(void 0,null,function*(){en(!0);const Fi=yield(0,ee.ZP)(`/api/exercise_questions/${cn==null?void 0:cn.question_id}/resubmit_history.json`,{method:"get"});(Fi==null?void 0:Fi.status)==0&&hi((Fi==null?void 0:Fi.data)||[]),en(!1)}),ir=()=>Ze(void 0,null,function*(){const Fi=yield(0,ee.ZP)(`/api/exercise_questions/${cn==null?void 0:cn.question_id}/resubmit_status.json`,{method:"get"});(Fi==null?void 0:Fi.status)==0&&Gn(lt(Xe({},cn),{show_resubmit_history:!0,exercise_question_resubmit:(Fi==null?void 0:Fi.data)||{}}))}),Nr=[{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"}],li=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],xi=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(Fi,wr,Fn)=>le.createElement("span",{className:"c-black"},Fn+1+(Sn.page-1)*Sn.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:Fi=>le.createElement("span",{className:"c-black"},Fi)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:Fi=>le.createElement("span",{className:"c-grey-666"},Fi||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:Fi=>le.createElement("span",{className:"c-black"},Fi)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:Fi=>{const{label:wr,color:Fn}=Nr.find(wi=>wi.value===Fi)||{};return le.createElement("span",{style:{color:Fn}},wr)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:Fi=>le.createElement("span",{className:"c-black"},Fi)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:Fi=>le.createElement("span",{className:"c-black"},Fi)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:Fi=>{const{label:wr,color:Fn}=pi.find(wi=>wi.value===Fi)||{};return le.createElement("span",{style:{color:Fn}},wr)}},di===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:Fi=>{const{label:wr,color:Fn}=li.find(wi=>wi.value===Fi)||{};return le.createElement("span",{style:{color:Fn}},wr)}}].filter(Boolean),Gi=(Fi,wr,Fn)=>{Sn.page=Fi==null?void 0:Fi.current,Sn.per_page=Fi==null?void 0:Fi.pageSize,Fn!=null&&Fn.order?(Sn.sort_by=Fn==null?void 0:Fn.field,Sn.direction=(Fn==null?void 0:Fn.order)==="ascend"?"asc":"desc"):(Sn.sort_by=null,Sn.direction=null),Pi(Xe({},Sn)),zi(Sn)},Oi=()=>{if(!at){Me.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}Ke(!0)},to=()=>Ze(void 0,null,function*(){var Fi,wr;if((Fi=Fe.current)!=null&&Fi.onVerify())return;Wn(!0);const Fn=yield(0,ee.ZP)(`/api/exercise_questions/${cn==null?void 0:cn.question_id}/resubmit.json`,{method:"post",body:{keyword:Sn.keyword,question_status:Sn.question_status,review:Sn.review_status,success_status:Sn.success_status,use_max_score:Ht,permits:at,exercise_question_resubmit_id:di===1?null:(wr=cn==null?void 0:cn.exercise_question_resubmit)==null?void 0:wr.id}});(Fn==null?void 0:Fn.status)==0&&(yield ir(),Me.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ke(!1),Kt(!1)),Wn(!1)}),eo=(Fi,wr)=>{Sn.page=1,Sn[wr]=Fi,Pi(Xe({},Sn)),zi(Sn)},Be=["","\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:st()(Te.recalculation,Dt),style:Wt},le.createElement(bt.Z,{title:Be[(cn==null?void 0:cn.disable_resubmit_reason)||0]},le.createElement(Pt.ZP,{disabled:(cn==null?void 0:cn.disable_resubmit)||((Ue=cn==null?void 0:cn.exercise_question_resubmit)==null?void 0:Ue.status)==="running",onClick:()=>Kt(1),icon:le.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(cn==null?void 0:cn.show_resubmit_history)&&le.createElement(le.Fragment,null,((Rt=cn==null?void 0:cn.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"},(Pn=cn==null?void 0:cn.exercise_question_resubmit)==null?void 0:Pn.rate)):le.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{onClick:()=>{Kt(2),$t(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(xn=cn==null?void 0:cn.exercise_question_resubmit)==null?void 0:xn.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{onClick:()=>{Kt(2),$t(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(_t=cn==null?void 0:cn.exercise_question_resubmit)==null?void 0:_t.fail_count),"\u4EBA"),le.createElement(bt.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},le.createElement("i",{onClick:()=>sn(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),le.createElement(Ge.default,{centered:!0,open:!!di,title:`\u91CD\u65B0\u8BC4\u6D4B${di===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>Kt(!1),onOk:Oi,afterClose:()=>{ht(!0),$t(null),Pi(Xe({},Rn))}},le.createElement("div",{className:Te.filter},di===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(rt,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:($e==null?void 0:$e.question_status)||[],value:Sn.question_status,onChange:Fi=>eo(Fi,"question_status")}),le.createElement(rt,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:($e==null?void 0:$e.review_status)||[],value:Sn.review,onChange:Fi=>eo(Fi,"review")})),di===2&&le.createElement(le.Fragment,null,le.createElement(rt,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:($e==null?void 0:$e.success_status)||[],value:Sn.success_status,onChange:Fi=>eo(Fi,"success_status")})),le.createElement(he.t7,{className:Te.input,style:{bottom:di===1?10:-5},value:Sn.keyword,onChange:Fi=>eo(Fi,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),le.createElement(ut.default,{className:"mt20",columns:xi,scroll:((qt=$e==null?void 0:$e.data)==null?void 0:qt.length)>7?{y:300}:{},dataSource:($e==null?void 0:$e.data)||[],loading:gn,onChange:Gi,pagination:{total:Tt,pageSize:Sn.per_page,current:Sn.page,hideOnSinglePage:!Tt,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:te.rU}}),le.createElement(ct.Z,{justify:"space-between",align:"middle",className:"mt10"},le.createElement(We.default,{className:"c-black",checked:Ht,onChange:Fi=>ht(Fi.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,ce.Ny)()&&le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",le.createElement(mt.Z,{className:"ml10 mr10",value:at,max:Pe,min:1,precision:0,onChange:Fi=>Re(Fi)}),"\u4EBA",le.createElement(bt.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(Ge.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:Oe,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:Ct,destroyOnClose:!0,onOk:to,onCancel:()=>Ke(!1)},le.createElement(yt.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:Fi=>Fe.current=Fi}))),le.createElement(Ge.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:Et,width:710,onCancel:()=>sn(!1),footer:null},le.createElement(De.Z,{spinning:pn},le.createElement("div",{className:Te.operating},wn.map((Fi,wr)=>le.createElement("div",{key:wr,className:Te.operatingItem},le.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},Fi==null?void 0:Fi.created_at),le.createElement("div",{className:"c-black"},Fi==null?void 0:Fi.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(Fi==null?void 0:Fi.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"},Fi==null?void 0:Fi.rate)):le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},Fi==null?void 0:Fi.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},Fi==null?void 0:Fi.fail_count),"\u4EBA")))),le.createElement("div",{style:{height:20}}))))}},82438:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});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),st="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",ct=(Pt,Ge,ut)=>new Promise((mt,yt)=>{var De=ce=>{try{ee(ut.next(ce))}catch(se){yt(se)}},te=ce=>{try{ee(ut.throw(ce))}catch(se){yt(se)}},ee=ce=>ce.done?mt(ce.value):Promise.resolve(ce.value).then(De,te);ee((ut=ut.apply(Pt,Ge)).next())}),bt=({type:Pt,resdata:Ge,onok:ut,oktext:mt,okloading:yt})=>{const[De,te]=(0,le.useState)(!1),{can_copy_list:ee,can_copy_num:ce,challenge_type:se,course_data_list:he,no_copy_list:ve,no_copy_num:Ee,no_use_list:Le,no_use_num:Ne,repeat_shixun_num:je,student_count:ze,total_num:Ye,use_num:Xe}=Ge;let lt=ce>0||Pt==="exercise";(0,le.useEffect)(()=>{(Ge==null?void 0:Ge.student_count)>0&&te(!0)},[Ge]),console.log("---11",yt),(0,le.useEffect)(()=>{yt||te(!1)},[yt]);const Ze=()=>{if(Pt==="exercise"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},ze),"\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(Pt==="exercise"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},ze),"\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(Pt==="shixun"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},ze),"\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(Pt==="shixun"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},ze),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",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(Pt==="subject"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},ze),"\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(Pt==="subject"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",le.createElement("span",{className:Te.orangeColor},ze)," \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(Pt==="exercisepush")return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},ze),"\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(Pt==="shixunpush"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},ze),"\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(Pt==="shixunpush"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},ze),"\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"))},Lt=()=>{if(Pt==="exercise"||Pt==="subject"||Pt==="exercisepush"||Pt==="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},Pt==="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"),(Pt==="subject"||Pt==="exercisepush")&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",lt&&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"),Pt==="shixunpush"&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",lt&&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((rt,Ot)=>le.createElement("a",{href:`/shixuns/${rt.identifier}/challenges`,target:"_blank"},"\u300A",rt==null?void 0:rt.name,"\u300B",Ot+1!==Ee&&"\u3001"))))),ce>0&&le.createElement("div",{style:{marginTop:20}},le.createElement("span",{className:Te.flex},le.createElement("img",{src:st,style:{width:14}}),le.createElement("span",{className:Te.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),le.createElement("div",{className:Te.statusbody},Pt==="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"),(Pt==="subject"||Pt==="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"),Pt==="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((rt,Ot)=>le.createElement("a",{href:`/shixuns/${rt.identifier}/challenges`,target:"_blank"},"\u300A",rt==null?void 0:rt.name,"\u300B",Ot+1!==ce&&"\u3001"))))));if(Pt==="shixun")return le.createElement("div",{style:{marginTop:20}},ce>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:De,onCancel:()=>{te(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!lt&&"none"}},zIndex:1003,confirmLoading:yt,okText:lt?mt:"\u6211\u77E5\u9053\u4E86",onOk:()=>ct(void 0,null,function*(){lt?yield ut([...ee,...Le]):te(!1)})},le.createElement("div",{style:{maxHeight:600,overflow:"auto"}},Ze(),Lt()))}},69304:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return ct}});var le=me(59301),Te={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},He=me(92310),st=me.n(He),ct=({className:Me,style:bt,state:Pt,onClick:Ge})=>{var ut,mt;return le.createElement("div",{onClick:Ge,className:st()(Pt?(ut=Te)==null?void 0:ut.redBtn:(mt=Te)==null?void 0:mt.btn,Me),style:bt},Pt?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")))}},53932:function(_n,yn,me){"use strict";me.d(yn,{h:function(){return Ee},Z:function(){return ve}});var le=me(59301),Te=me(57809),He=me(78241),st=me(3113),We=me(89780),ct=me.n(We),Me=me(37036),bt=Object.defineProperty,Pt=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,yt=Object.prototype.propertyIsEnumerable,De=(Le,Ne,je)=>Ne in Le?bt(Le,Ne,{enumerable:!0,configurable:!0,writable:!0,value:je}):Le[Ne]=je,te=(Le,Ne)=>{for(var je in Ne||(Ne={}))mt.call(Ne,je)&&De(Le,je,Ne[je]);if(ut)for(var je of ut(Ne))yt.call(Ne,je)&&De(Le,je,Ne[je]);return Le},ee=(Le,Ne)=>Pt(Le,Ge(Ne));const ce=Te.default.Option,se={labelCol:{span:4},wrapperCol:{span:20}},he={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};var ve=({callback:Le,onCancel:Ne})=>{const[je,ze]=(0,le.useState)("python");function Ye(lt){ze(he[lt][1])}function Xe(lt){Le(lt)}return le.createElement(He.default,ee(te({},se),{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:lt=>lt.parentNode,onChange:Ye},Object.keys(he).map(lt=>le.createElement(ce,{key:lt,value:lt},he[lt][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(st.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(st.ZP,{type:"ghost",onClick:Ne},"\u53D6\u6D88")))};function Ee({value:Le,onChange:Ne,mode:je,options:ze={}}){const Ye=(0,le.useRef)(),[Xe,lt]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Xe){let Ze=function(Lt){const rt=Lt.getValue();Ne&&Ne(rt)};return Xe.on("change",Ze),()=>{Xe.off("change",Ze)}}},[Xe,Ne]),(0,le.useEffect)(()=>{Xe&&Xe.setOption("mode",je)},[Xe,je]),(0,le.useEffect)(()=>{Xe&&(Le!==Xe.getValue()||Le==="")&&setTimeout(()=>{Xe.setValue(Le||"")},300)},[Xe,Le]),(0,le.useEffect)(()=>{if(Ye.current&&!Xe){const Ze=ct().fromTextArea(Ye.current,te({mode:je,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},ze));lt(Ze)}},[Ye.current,Xe]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:Ye}))}},12290:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return $n}});var le=me(59301),Te=me(89780),He=me.n(Te),st=me(76374),We=me(37036),ct=me(6313),Me=me(25717),bt=me(99498),Pt=me(25419),Ge=me(67549),ut=me(85149),mt=({value:zt="",className:Vt,showTextOnly:Qe,showLines:an,style:dn={}})=>{const Nt=(0,le.useMemo)(()=>"",[zt]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:Nt}}))},yt=me(59301),De=Object.defineProperty,te=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(zt,Vt,Qe)=>Vt in zt?De(zt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):zt[Vt]=Qe,Ee=(zt,Vt)=>{for(var Qe in Vt||(Vt={}))se.call(Vt,Qe)&&ve(zt,Qe,Vt[Qe]);if(ce)for(var Qe of ce(Vt))he.call(Vt,Qe)&&ve(zt,Qe,Vt[Qe]);return zt},Le=(zt,Vt)=>te(zt,ee(Vt));let Ne=[{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:zt,title:Vt,icon:Qe,actionName:an,className:dn="",children:Nt}){function dt(){zt(an)}return yt.createElement("a",{title:Vt,className:dn,onClick:dt},yt.createElement("i",{className:`${Qe}`}),Nt)}var ze=({watch:zt,showNullButton:Vt,showNullProgramButton:Qe,onActionCallback:an,fullScreen:dn,insertTemp:Nt,hidetoolBar:dt,extraUse:nn})=>{const vn=[...Ne,{title:`${zt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${zt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return yt.createElement("ul",{className:"markdown-toolbar-container"},!dt&&vn.map((zn,qn)=>yt.createElement("li",{key:qn},zn.actionName?yt.createElement(je,Le(Ee({},zn),{onActionCallback:an})):yt.createElement("span",{className:"v-line"}))),Vt?yt.createElement("li",null,yt.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:an},yt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Qe?yt.createElement(yt.Fragment,null,yt.createElement("li",null,yt.createElement(je,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:an},yt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),yt.createElement("li",null,yt.createElement(je,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:an},yt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Nt&&yt.createElement("li",null,yt.createElement(je,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Nt}`,onActionCallback:an},yt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),nn&&yt.createElement("li",null,nn),yt.createElement("li",{className:"btn-full-screen"},yt.createElement(je,{icon:`${dn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:dn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:an})))},Ye=me(79346),Xe=me(78241),lt=me(92832),Ze=me(3113),Lt=Object.defineProperty,rt=Object.defineProperties,Ot=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Wt=Object.prototype.propertyIsEnumerable,Mt=(zt,Vt,Qe)=>Vt in zt?Lt(zt,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):zt[Vt]=Qe,et=(zt,Vt)=>{for(var Qe in Vt||(Vt={}))Dt.call(Vt,Qe)&&Mt(zt,Qe,Vt[Qe]);if(wt)for(var Qe of wt(Vt))Wt.call(Vt,Qe)&&Mt(zt,Qe,Vt[Qe]);return zt},Ue=(zt,Vt)=>rt(zt,Ot(Vt));const Rt={labelCol:{span:4},wrapperCol:{span:20}};var Pn=({callback:zt,onCancel:Vt})=>{function Qe(an){zt(an)}return le.createElement(Xe.default,Ue(et({},Rt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Qe,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(lt.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(lt.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:Vt},"\u53D6\u6D88")))},xn=me(53932),_t=me(28451),qt=me(43418),cn=me(95237),Gn=me(16406),gn=me(59301),Zn=({callback:zt,onCancel:Vt})=>{const Qe=document.createElement("canvas"),an=Qe.getContext("2d");Qe.width=1e3,Qe.height=800,an.fillStyle="#ffffff",an.fillRect(0,0,Qe.width,Qe.height);const dn=Qe.toDataURL("image/png");return gn.createElement(qt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},gn.createElement(cn.Z,{style:{height:"100vh"}},gn.createElement(Gn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:dn,visible:!0,title:String(Date.now())},onOk:Nt=>{zt({src:Nt.url})},onClose:Vt})))},Ct=me(12378);function Wn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Wn,go.CommandHandler),Wn.prototype.canAlignSelection=function(){var zt=this.diagram;return!(zt===null||zt.isReadOnly||zt.isModelReadOnly||zt.selection.count<2)},Wn.prototype.alignLeft=function(){var zt=this.diagram;zt.startTransaction("aligning left");var Vt=1/0;zt.selection.each(function(Qe){Qe instanceof go.Link||(Vt=Math.min(Qe.position.x,Vt))}),zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Vt,Qe.position.y))}),zt.commitTransaction("aligning left")},Wn.prototype.alignRight=function(){var zt=this.diagram;zt.startTransaction("aligning right");var Vt=-1/0;zt.selection.each(function(Qe){if(!(Qe instanceof go.Link)){var an=Qe.actualBounds.x+Qe.actualBounds.width;Vt=Math.max(an,Vt)}}),zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Vt-Qe.actualBounds.width,Qe.position.y))}),zt.commitTransaction("aligning right")},Wn.prototype.alignTop=function(){var zt=this.diagram;zt.startTransaction("alignTop");var Vt=1/0;zt.selection.each(function(Qe){Qe instanceof go.Link||(Vt=Math.min(Qe.position.y,Vt))}),zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Qe.position.x,Vt))}),zt.commitTransaction("alignTop")},Wn.prototype.alignBottom=function(){var zt=this.diagram;zt.startTransaction("aligning bottom");var Vt=-1/0;zt.selection.each(function(Qe){if(!(Qe instanceof go.Link)){var an=Qe.actualBounds.y+Qe.actualBounds.height;Vt=Math.max(an,Vt)}}),zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Qe.actualBounds.x,Vt-Qe.actualBounds.height))}),zt.commitTransaction("aligning bottom")},Wn.prototype.alignCenterX=function(){var zt=this.diagram,Vt=zt.selection.first();if(Vt){zt.startTransaction("aligning Center X");var Qe=Vt.actualBounds.x+Vt.actualBounds.width/2;zt.selection.each(function(an){an instanceof go.Link||an.move(new go.Point(Qe-an.actualBounds.width/2,an.actualBounds.y))}),zt.commitTransaction("aligning Center X")}},Wn.prototype.alignCenterY=function(){var zt=this.diagram,Vt=zt.selection.first();if(Vt){zt.startTransaction("aligning Center Y");var Qe=Vt.actualBounds.y+Vt.actualBounds.height/2;zt.selection.each(function(an){an instanceof go.Link||an.move(new go.Point(an.actualBounds.x,Qe-an.actualBounds.height/2))}),zt.commitTransaction("aligning Center Y")}},Wn.prototype.alignColumn=function(zt){var Vt=this.diagram;Vt.startTransaction("align Column"),zt===void 0&&(zt=0),zt=parseFloat(zt);var Qe=new Array;Vt.selection.each(function(nn){nn instanceof go.Link||Qe.push(nn)});for(var an=0;an<Qe.length-1;an++){var dn=Qe[an],Nt=dn.actualBounds.y+dn.actualBounds.height+zt,dt=Qe[an+1];dt.move(new go.Point(dn.actualBounds.x,Nt))}Vt.commitTransaction("align Column")},Wn.prototype.alignRow=function(zt){zt===void 0&&(zt=0),zt=parseFloat(zt);var Vt=this.diagram;Vt.startTransaction("align Row");var Qe=new Array;Vt.selection.each(function(nn){nn instanceof go.Link||Qe.push(nn)});for(var an=0;an<Qe.length-1;an++){var dn=Qe[an],Nt=dn.actualBounds.x+dn.actualBounds.width+zt,dt=Qe[an+1];dt.move(new go.Point(Nt,dn.actualBounds.y))}Vt.commitTransaction("align Row")},Wn.prototype.canRotate=function(zt){var Vt=this.diagram;return!(Vt===null||Vt.isReadOnly||Vt.isModelReadOnly||Vt.selection.count<1)},Wn.prototype.rotate=function(zt){zt===void 0&&(zt=90);var Vt=this.diagram;Vt.startTransaction("rotate "+zt.toString());var Vt=this.diagram;Vt.selection.each(function(Qe){Qe instanceof go.Link||Qe instanceof go.Group||(Qe.angle+=zt)}),Vt.commitTransaction("rotate "+zt.toString())},Wn.prototype.pullToFront=function(){var zt=this.diagram;zt.startTransaction("pullToFront");var Vt=new go.Map;zt.selection.each(function(Qe){Vt.set(Qe.layer,0)}),Vt.iteratorKeys.each(function(Qe){var an=0;Qe.parts.each(function(dn){if(!dn.isSelected){var Nt=dn.zOrder;isNaN(Nt)?dn.zOrder=0:an=Math.max(an,Nt)}}),Vt.set(Qe,an)}),zt.selection.each(function(Qe){Wn._assignZOrder(Qe,Vt.get(Qe.layer)+1)}),zt.commitTransaction("pullToFront")},Wn.prototype.pushToBack=function(){var zt=this.diagram;zt.startTransaction("pushToBack");var Vt=new go.Map;zt.selection.each(function(Qe){Vt.set(Qe.layer,0)}),Vt.iteratorKeys.each(function(Qe){var an=0;Qe.parts.each(function(dn){if(!dn.isSelected){var Nt=dn.zOrder;isNaN(Nt)?dn.zOrder=0:an=Math.min(an,Nt)}}),Vt.set(Qe,an)}),zt.selection.each(function(Qe){Wn._assignZOrder(Qe,Vt.get(Qe.layer)-1-Wn._findGroupDepth(Qe))}),zt.commitTransaction("pushToBack")},Wn._assignZOrder=function(zt,Vt,Qe){Qe===void 0&&(Qe=zt),zt.layer===Qe.layer&&(zt.zOrder=Vt),zt instanceof go.Group&&zt.memberParts.each(function(an){Wn._assignZOrder(an,Vt+1,Qe)})},Wn._findGroupDepth=function(zt){if(zt instanceof go.Group){var Vt=0;return zt.memberParts.each(function(Qe){Vt=Math.max(Vt,Wn._findGroupDepth(Qe))}),Vt+1}else return 0},Wn.prototype.doKeyDown=function(){var zt=this.diagram;if(zt!==null){var Vt=zt.lastInput;if(Vt.key==="Up"||Vt.key==="Down"||Vt.key==="Left"||Vt.key==="Right"){var Qe=this.arrowKeyBehavior;if(Qe==="none")return;if(Qe==="select"){this._arrowKeySelect();return}else if(Qe==="move"){this._arrowKeyMove();return}else if(Qe==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Wn.prototype._getAllParts=function(){var zt=new Array;return this.diagram.nodes.each(function(Vt){zt.push(Vt)}),this.diagram.parts.each(function(Vt){zt.push(Vt)}),zt},Wn.prototype._arrowKeyMove=function(){var zt=this.diagram,Vt=zt.lastInput,Qe=0,an=0;if(Vt.control||Vt.meta)Qe=1,an=1;else if(zt.grid!==null){var dn=zt.grid.gridCellSize;an=dn.width,Qe=dn.height}zt.startTransaction("arrowKeyMove"),zt.selection.each(function(Nt){Vt.key==="Up"?Nt.move(new go.Point(Nt.actualBounds.x,Nt.actualBounds.y-Qe)):Vt.key==="Down"?Nt.move(new go.Point(Nt.actualBounds.x,Nt.actualBounds.y+Qe)):Vt.key==="Left"?Nt.move(new go.Point(Nt.actualBounds.x-an,Nt.actualBounds.y)):Vt.key==="Right"&&Nt.move(new go.Point(Nt.actualBounds.x+an,Nt.actualBounds.y))}),zt.commitTransaction("arrowKeyMove")},Wn.prototype._arrowKeySelect=function(){var zt=this.diagram,Vt=zt.lastInput,Qe=null;Vt.key==="Up"?Qe=this._findNearestPartTowards(270):Vt.key==="Down"?Qe=this._findNearestPartTowards(90):Vt.key==="Left"?Qe=this._findNearestPartTowards(180):Vt.key==="Right"&&(Qe=this._findNearestPartTowards(0)),Qe!==null&&(Vt.shift?Qe.isSelected=!0:Vt.control||Vt.meta?Qe.isSelected=!Qe.isSelected:zt.select(Qe))},Wn.prototype._findNearestPartTowards=function(zt){var Vt=this.diagram.selection.first();if(Vt===null)return null;for(var Qe=Vt.actualBounds.center,an=this._getAllParts(),dn=1/0,Nt=Vt,dt=0;dt<an.length;dt++){var nn=an[dt];if(nn!==Vt&&nn.canSelect()){var vn=nn.actualBounds.center,zn=Qe.directionPoint(vn),qn=this._angleCloseness(zn,zt);if(qn<=45){var Ft=Qe.distanceSquaredPoint(vn);Ft*=1+Math.sin(qn*Math.PI/180),Ft<dn&&(dn=Ft,Nt=nn)}}}return Nt},Wn.prototype._angleCloseness=function(zt,Vt){return Math.min(Math.abs(Vt-zt),Math.min(Math.abs(Vt+360-zt),Math.abs(Vt-360-zt)))},Wn.prototype._arrowKeyTree=function(){var zt=this.diagram,Vt=zt.selection.first();if(Vt instanceof go.Node){var Qe=zt.lastInput;if(Qe.key==="Right"){if(!Vt.isTreeLeaf)if(!Vt.isTreeExpanded)zt.commandHandler.canExpandTree(Vt)&&zt.commandHandler.expandTree(Vt);else{var an=this._sortTreeChildrenByY(Vt).first();an!==null&&zt.select(an)}}else if(Qe.key==="Left")if(!Vt.isTreeLeaf&&Vt.isTreeExpanded)zt.commandHandler.canCollapseTree(Vt)&&zt.commandHandler.collapseTree(Vt);else{var dn=Vt.findTreeParentNode();dn!==null&&zt.select(dn)}else if(Qe.key==="Up"){var dn=Vt.findTreeParentNode();if(dn!==null){var Nt=this._sortTreeChildrenByY(dn),dt=Nt.indexOf(Vt);if(dt>0){for(var nn=Nt.elt(dt-1);nn!==null&&nn.isTreeExpanded&&!nn.isTreeLeaf;){var vn=this._sortTreeChildrenByY(nn);nn=vn.last()}nn!==null&&zt.select(nn)}else zt.select(dn)}}else if(Qe.key==="Down")if(Vt.isTreeExpanded&&!Vt.isTreeLeaf){var an=this._sortTreeChildrenByY(Vt).first();an!==null&&zt.select(an)}else for(;Vt!==null;){var dn=Vt.findTreeParentNode();if(dn===null)break;var Nt=this._sortTreeChildrenByY(dn),dt=Nt.indexOf(Vt);if(dt<Nt.length-1){zt.select(Nt.elt(dt+1));break}else Vt=dn}var zn=zt.selection.first();zn!==null&&zt.scrollToRect(zn.actualBounds)}},Wn.prototype._sortTreeChildrenByY=function(zt){var Vt=new go.List().addAll(zt.findTreeChildrenNodes());return Vt.sort(function(Qe,an){var dn=Qe.location,Nt=an.location;return dn.y<Nt.y?-1:dn.y>Nt.y?1:dn.x<Nt.x?-1:dn.x>Nt.x?1:0}),Vt},Wn.prototype.copyToClipboard=function(zt){go.CommandHandler.prototype.copyToClipboard.call(this,zt),this._lastPasteOffset.set(this.pasteOffset)},Wn.prototype.pasteFromClipboard=function(){var zt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(zt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),zt},Object.defineProperty(Wn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(zt){if(zt!=="move"&&zt!=="select"&&zt!=="scroll"&&zt!=="tree"&&zt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+zt);this._arrowKeyBehavior=zt}}),Object.defineProperty(Wn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(zt){if(!(zt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+zt);this._pasteOffset.set(zt)}});var di=Wn,Kt=me(74413),ln=me(43604),$t=me(99064),Tt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},ft=me(24065),$e=me(59301),Gt=(zt,Vt,Qe)=>new Promise((an,dn)=>{var Nt=vn=>{try{nn(Qe.next(vn))}catch(zn){dn(zn)}},dt=vn=>{try{nn(Qe.throw(vn))}catch(zn){dn(zn)}},nn=vn=>vn.done?an(vn.value):Promise.resolve(vn.value).then(Nt,dt);nn((Qe=Qe.apply(zt,Vt)).next())});function Ht({onCancel:zt,callback:Vt}){let Qe=(0,le.useRef)(),an=(0,le.useRef)(),dn=(0,le.useRef)(),Nt=(0,le.useRef)(!1);const dt=(0,le.useRef)(!1),[nn,vn]=(0,le.useState)(0);function zn(){const Ft=Ct.bx.make,Bn={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"};Qe.current=new Ct.S0(an.current,{padding:20,grid:Ft(Ct.s_,"Grid",Ft(Ct.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Ft(Ct.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:ii=>{var Hi=ii.diagram.commandHandler.addTopLevelParts(ii.diagram.selection,!0);Hi||ii.diagram.currentTool.doCancel()},commandHandler:Ft(di),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:ii=>{var Hi=ii.subject;Hi.location=Hi.location.copy().snapToGridPoint(ii.diagram.grid.gridOrigin,ii.diagram.grid.gridCellSize),setTimeout(()=>{ii.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:ii=>{var Hi=ii.subject;setTimeout(()=>{ii.diagram.commandHandler.editTextBlock()})},LinkRelinked:ii=>{var Hi=ii.parameter.part;Hi.invalidateConnectedLinks();var xr=ii.subject;ii.diagram.toolManager.linkingTool.isForwards?xr.toNode.invalidateConnectedLinks():xr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Qe.current.nodeTemplate=Ft(Ct.NB,"Auto",{locationSpot:Ct.z6.Center,locationObjectName:"SHAPE",desiredSize:new Ct.$u(120,60),minSize:new Ct.$u(40,40),resizable:!0,resizeCellSize:new Ct.$u(10,10),rotatable:!0},new Ct.KX("location","loc",Ct.E9.parse).makeTwoWay(Ct.E9.stringify),new Ct.KX("desiredSize","size",Ct.$u.parse).makeTwoWay(Ct.$u.stringify),Ft(Ct.bn,{name:"SHAPE",fill:Bn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ct.z6.AllSides,toSpot:Ct.z6.AllSides},new Ct.KX("figure"),new Ct.KX("fill"),new Ct.KX("stroke","borderColor"),new Ct.KX("strokeWidth","thickness"),new Ct.KX("strokeDashArray","dash")),Ft(Ct.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Ft(Ct.al,{margin:1,textAlign:"center",overflow:Ct.al.OverflowEllipsis,editable:!0},new Ct.KX("text").makeTwoWay(),new Ct.KX("stroke","color"))),Qe.current.nodeTemplate.toolTip=Ft("ToolTip",Ft(Ct.s_,"Vertical",{maxSize:new Ct.$u(200,NaN)},Ft(Ct.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Ct.KX("text")),Ft(Ct.al,{font:"10pt sans-serif",textAlign:"center"},new Ct.KX("text","details"))));function Kn(ii,Hi){var xr=(qi,pr)=>{qi.handled=!0,qi.diagram.model.commit(Vr=>{var jr=pr.part.adornedPart,kr=new Ct.E9().setRectSpot(jr.actualBounds,ii);kr.subtract(jr.location),kr.scale(2,2),kr.x+=Math.sign(kr.x)*130,kr.y+=Math.sign(kr.y)*130,kr.add(jr.location),kr.snapToGridPoint(qi.diagram.grid.gridOrigin,qi.diagram.grid.gridCellSize);var Kr=Vr.copyNodeData(jr.data);Vr.setGroupKeyForNodeData(Kr,Vr.getGroupKeyForNodeData(jr.data)),Vr.addNodeData(Kr);var Yn={from:jr.key,to:Vr.getKeyForNodeData(Kr)};Vr.addLinkData(Yn);var Ho=qi.diagram.findNodeForData(Kr);Ho.location=kr,qi.diagram.select(Ho),setTimeout(()=>{qi.diagram.commandHandler.editTextBlock()},20)})};return Ft(Ct.bn,{figure:Hi,alignment:ii,alignmentFocus:ii.opposite(),width:ii.equals(Ct.z6.Top)||ii.equals(Ct.z6.Bottom)?25:18,height:ii.equals(Ct.z6.Top)||ii.equals(Ct.z6.Bottom)?18:25,fill:"orange",stroke:Bn.white,strokeWidth:4,mouseEnter:(qi,pr)=>pr.fill="dodgerblue",mouseLeave:(qi,pr)=>pr.fill="orange",isActionable:!0,click:xr,contextClick:xr})}function Ci(ii){return Ft(Ct.bn,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:(Hi,xr)=>xr.fill="dodgerblue",mouseLeave:(Hi,xr)=>xr.fill="orange",click:(Hi,xr)=>{Hi.diagram.commandHandler.showContextMenu(xr.part.adornedPart)}},ii||{})}Qe.current.nodeTemplate.selectionAdornmentTemplate=Ft(Ct.uz,"Spot",Ft(Ct.Vm,{padding:10}),Kn(Ct.z6.Top,"TriangleUp"),Kn(Ct.z6.Left,"TriangleLeft"),Kn(Ct.z6.Right,"TriangleRight"),Kn(Ct.z6.Bottom,"TriangleDown"),Ci({alignment:new Ct.z6(.75,0)}));function En(ii,Hi){return(xr,qi)=>{xr.handled=!0,xr.diagram.model.commit(pr=>{pr.set(qi.part.adornedPart.data,ii,Hi)})}}function un(ii,Hi){return Hi||(Hi="color"),Ft(Ct.bn,{width:16,height:16,stroke:"lightgray",fill:ii,margin:1,background:"transparent",mouseEnter:(xr,qi)=>qi.stroke="dodgerblue",mouseLeave:(xr,qi)=>qi.stroke="lightgray",click:En(Hi,ii),contextClick:En(Hi,ii)})}function bn(){return[Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",un(Bn.white,"fill"),un(Bn.beige,"fill"),un(Bn.extralightblue,"fill"),un(Bn.extralightred,"fill"))),Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",un(Bn.lightgray,"fill"),un(Bn.lightgreen,"fill"),un(Bn.lightblue,"fill"),un(Bn.lightred,"fill")))]}function Ei(){return[Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",un(Bn.black),un(Bn.green),un(Bn.blue),un(Bn.red))),Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",un(Bn.white),un(Bn.magenta),un(Bn.purple),un(Bn.orange)))]}function Ni(ii,Hi){return Hi||(Hi="thickness"),Ft(Ct.bn,"LineH",{width:16,height:16,strokeWidth:ii,margin:1,background:"transparent",mouseEnter:(xr,qi)=>qi.background="dodgerblue",mouseLeave:(xr,qi)=>qi.background="transparent",click:En(Hi,ii),contextClick:En(Hi,ii)})}function mi(ii,Hi){return Hi||(Hi="dash"),Ft(Ct.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:ii,margin:1,background:"transparent",mouseEnter:(xr,qi)=>qi.background="dodgerblue",mouseLeave:(xr,qi)=>qi.background="transparent",click:En(Hi,ii),contextClick:En(Hi,ii)})}function Di(){return[Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",Ni(1),Ni(2),Ni(3),Ni(4))),Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",mi(null),mi([2,4]),mi([4,4])))]}function Ai(ii,Hi){return Hi||(Hi="figure"),Ft(Ct.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:ii,margin:1,background:"transparent",mouseEnter:(xr,qi)=>qi.fill="dodgerblue",mouseLeave:(xr,qi)=>qi.fill="lightgray",click:En(Hi,ii),contextClick:En(Hi,ii)})}Qe.current.nodeTemplate.contextMenu=Ft("ContextMenu",Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",Ai("Rectangle"),Ai("RoundedRectangle"),Ai("Ellipse"),Ai("Diamond"))),Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",Ai("Parallelogram2"),Ai("ManualOperation"),Ai("Procedure"),Ai("Cylinder1"))),Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",Ai("Terminator"),Ai("CreateRequest"),Ai("Document"),Ai("TriangleDown"))),bn(),Ei(),Di()),Qe.current.groupTemplate=Ft(Ct.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Ct.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(ii,Hi)=>{var xr=Hi.addMembers(Hi.diagram.selection,!0);xr||Hi.diagram.currentTool.doCancel()},avoidable:!1},new Ct.KX("location","loc",Ct.E9.parse).makeTwoWay(Ct.E9.stringify),Ft(Ct.s_,"Auto",{name:"BODY"},Ft(Ct.bn,{parameter1:10,fill:Bn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Ct.z6.AllSides,toSpot:Ct.z6.AllSides},new Ct.KX("fill"),new Ct.KX("stroke","color"),new Ct.KX("strokeWidth","thickness"),new Ct.KX("strokeDashArray","dash")),Ft(Ct.Vm,{background:"transparent",margin:20})),Ft(Ct.al,{alignment:Ct.z6.Top,alignmentFocus:Ct.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Ct.KX("text"),new Ct.KX("stroke","color"))),Qe.current.groupTemplate.selectionAdornmentTemplate=Ft(Ct.uz,"Spot",Ft(Ct.s_,"Auto",Ft(Ct.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Ft(Ct.Vm,{margin:1.5})),Ci({alignment:Ct.z6.TopRight,alignmentFocus:Ct.z6.BottomRight})),Qe.current.groupTemplate.contextMenu=Ft("ContextMenu",bn(),Ei(),Di()),Qe.current.linkTemplate=Ft(Ct.rU,{layerName:"Foreground",routing:Ct.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Ct.KX("fromSpot","fromSpot",Ct.z6.parse),new Ct.KX("toSpot","toSpot",Ct.z6.parse),new Ct.KX("fromShortLength","dir",ii=>ii>=1?10:0),new Ct.KX("toShortLength","dir",ii=>ii>=1?10:0),new Ct.KX("points").makeTwoWay(),Ft(Ct.bn,{strokeWidth:2},new Ct.KX("stroke","color"),new Ct.KX("strokeWidth","thickness"),new Ct.KX("strokeDashArray","dash")),Ft(Ct.bn,{segmentIndex:0,segmentOffset:new Ct.E9(15,0),segmentOrientation:Ct.rU.OrientAlong,alignmentFocus:Ct.z6.Right,figure:"circle",width:10,strokeWidth:0},new Ct.KX("fill","color"),new Ct.KX("visible","dir",ii=>ii===1)),Ft(Ct.bn,{segmentIndex:-1,segmentOffset:new Ct.E9(-10,6),segmentOrientation:Ct.rU.OrientPlus90,alignmentFocus:Ct.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ct.KX("fill","color"),new Ct.KX("visible","dir",ii=>ii>=1),new Ct.KX("width","thickness",ii=>7+3*ii),new Ct.KX("height","thickness",ii=>7+3*ii),new Ct.KX("segmentOffset","thickness",ii=>new Ct.E9(-15,4+1.5*ii))),Ft(Ct.bn,{segmentIndex:0,segmentOffset:new Ct.E9(15,-6),segmentOrientation:Ct.rU.OrientMinus90,alignmentFocus:Ct.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Ct.KX("fill","color"),new Ct.KX("visible","dir",ii=>ii===2),new Ct.KX("width","thickness",ii=>7+3*ii),new Ct.KX("height","thickness",ii=>7+3*ii),new Ct.KX("segmentOffset","thickness",ii=>new Ct.E9(-15,4+1.5*ii))),Ft(Ct.al,{alignmentFocus:new Ct.z6(0,1,-4,0),editable:!0},new Ct.KX("text").makeTwoWay(),new Ct.KX("stroke","color"))),Qe.current.linkTemplate.selectionAdornmentTemplate=Ft(Ct.uz,Ft(Ct.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:gr(2)},new Ct.KX("pathPattern","thickness",gr)),Ci({alignmentFocus:new Ct.z6(0,0,-6,-4)}));function gr(ii){return Ft(Ct.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(ii+4).toString()+" H3"})}function Or(ii){var Hi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return ii===0?Hi="M0 0 M16 16 M0 8 L16 8":ii===2&&(Hi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Ft(Ct.bn,{geometryString:Hi,margin:2,background:"transparent",mouseEnter:(xr,qi)=>qi.background="dodgerblue",mouseLeave:(xr,qi)=>qi.background="transparent",click:En("dir",ii),contextClick:En("dir",ii)})}function Hr(ii){var Hi=(xr,qi)=>{xr.handled=!0,xr.diagram.model.commit(pr=>{var Vr=qi.part.adornedPart;pr.set(Vr.data,ii?"toSpot":"fromSpot",Ct.z6.stringify(Ct.z6.AllSides)),(ii?Vr.toNode:Vr.fromNode).invalidateConnectedLinks()})};return Ft(Ct.bn,{width:12,height:12,fill:"transparent",mouseEnter:(xr,qi)=>qi.background="dodgerblue",mouseLeave:(xr,qi)=>qi.background="transparent",click:Hi,contextClick:Hi})}function jn(ii,Hi){var xr=0,qi=Ct.z6.RightSide;ii.equals(Ct.z6.Top)?(xr=270,qi=Ct.z6.TopSide):ii.equals(Ct.z6.Left)?(xr=180,qi=Ct.z6.LeftSide):ii.equals(Ct.z6.Bottom)&&(xr=90,qi=Ct.z6.BottomSide),Hi||(xr-=180);var pr=(Vr,jr)=>{Vr.handled=!0,Vr.diagram.model.commit(kr=>{var Kr=jr.part.adornedPart;kr.set(Kr.data,Hi?"toSpot":"fromSpot",Ct.z6.stringify(qi)),(Hi?Kr.toNode:Kr.fromNode).invalidateConnectedLinks()})};return Ft(Ct.bn,{alignment:ii,alignmentFocus:ii.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:xr,background:"transparent",mouseEnter:(Vr,jr)=>jr.background="dodgerblue",mouseLeave:(Vr,jr)=>jr.background="transparent",click:pr,contextClick:pr})}Qe.current.linkTemplate.contextMenu=Ft("ContextMenu",Ei(),Di(),Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",Or(0),Or(1),Or(2))),Ft("ContextMenuButton",Ft(Ct.s_,"Horizontal",Ft(Ct.s_,"Spot",Hr(!1),jn(Ct.z6.Top,!1),jn(Ct.z6.Left,!1),jn(Ct.z6.Right,!1),jn(Ct.z6.Bottom,!1)),Ft(Ct.s_,"Spot",{margin:new Ct.Zt(0,0,0,2)},Hr(!0),jn(Ct.z6.Top,!0),jn(Ct.z6.Left,!0),jn(Ct.z6.Right,!0),jn(Ct.z6.Bottom,!0)))));const Po=`{ "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 Wr=["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 ro(ii){return console.log("shapeName:",ii),Wr.indexOf(ii)>=0}var Mn=new Ct.YI(dn.current,{maxSelectionCount:1,linkTemplate:Ft(Ct.rU,{locationSpot:Ct.z6.Center,selectionAdornmentTemplate:Ft(Ct.uz,"Link",{locationSpot:Ct.z6.Center},Ft(Ct.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Ft(Ct.bn,{toArrow:"Standard",stroke:null}))},{routing:Ct.rU.AvoidsNodes,curve:Ct.rU.JumpOver,corner:5,toShortLength:4},new Ct.KX("points"),Ft(Ct.bn,{isPanelMain:!0,strokeWidth:2}),Ft(Ct.bn,{toArrow:"Standard",stroke:null})),model:new Ct.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Ct.bn.getFigureGenerators().toArray().map(ii=>({text:"\u672A\u547D\u540D",size:"100 100",figure:ii.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Qe.current.addDiagramListener("TextEdited",function(ii){var Hi;const xr=ii.subject.part;var qi=(Hi=document.activeElement)==null?void 0:Hi.value;typeof qi=="string"&&qi.trim()===""&&Qe.current.model.commit(function(pr){pr.set(xr.data,"text","\u672A\u547D\u540D"),Qe.current.commandHandler.stopCommand()},"increment")}),Mn.nodeTemplate=Ft(Ct.NB,"Auto",{locationSpot:Ct.z6.Center},new Ct.KX("location","location",Ct.E9.parse).makeTwoWay(Ct.E9.stringify),Ft(Ct.bn,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new Ct.KX("stroke").makeTwoWay(),new Ct.KX("fill").makeTwoWay(),new Ct.KX("figure")),Ft(Ct.al,{margin:new Ct.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Ct.$u(16,16),maxSize:new Ct.$u(10,NaN),textAlign:"center",editable:!0},new Ct.KX("key").makeTwoWay())),setTimeout(()=>{Qe.current.grid=Ft(Ct.s_,"Grid",Ft(Ct.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Ft(Ct.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Qe.current.grid.visible=!0,Qe.current.grid.gridCellStroke="darkgray",Qe.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Qe.current,Qe.current}const qn=()=>Gt(this,null,function*(){var Ft,Bn=Qe.current.makeImage();const Kn=yield(0,$t.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Bn.src,file_data:JSON.stringify({login:(Ft=(0,ft.eY)())==null?void 0:Ft.login,data:JSON.parse(Qe.current.model.toJson())})}});Vt({src:Kn.url})});return(0,le.useEffect)(()=>(setTimeout(()=>{zn()},500),vn(nn+1),()=>{Qe.current=null}),[]),$e.createElement("div",{ref:dt,className:Nt.current?`${Tt.maxH60} body-overflow-initial`:"body-overflow-initial"},$e.createElement(qt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!nn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:$e.createElement(cn.Z,null,$e.createElement(ln.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),$e.createElement(ln.Z,{onClick:()=>{var Ft,Bn,Kn=Qe.current.selection.first();if(Nt.current=!Nt.current,document.activeElement&&Kn){let Ci=(Bn=(Ft=document.activeElement)==null?void 0:Ft.value)==null?void 0:Bn.trim();typeof Ci=="string"&&Qe.current.model.commit(function(En){En.set(Kn.data,"text",Ci||"\u672A\u547D\u540D"),Qe.current.commandHandler.stopCommand()},"increment")}vn(nn+1)}},$e.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:zt},$e.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Tt.flowChartWrp},$e.createElement("div",{style:{display:"flex",height:"100%"}},$e.createElement("div",{style:{width:"300px",height:"100%"}},$e.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),$e.createElement("div",{style:{height:"calc(100% - 50px)"},className:Tt.myPaletteDiv,ref:dn})),$e.createElement("div",{style:{flex:1,position:"relative"}},$e.createElement("div",{ref:an,style:{height:"80vh"}}))),$e.createElement("div",{className:"tr"},$e.createElement(Ze.ZP,{size:"large",onClick:qn,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var ht=Ht,at=me(5112),Re=me(5871);const Pe=at.ZP.Group,ye={margin:"0 8px"};var Oe=({callback:zt,onCancel:Vt})=>{function Qe(an){zt(an)}return le.createElement(Xe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Qe},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:ye},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:ye},"\u884C\u6570"),le.createElement(Xe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(Re.Z,null)),le.createElement("span",{style:ye},"\u5217\u6570"),le.createElement(Xe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(Re.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:ye},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(Xe.default.Item,{name:"align"},le.createElement(Pe,null,le.createElement(at.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(at.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(at.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(at.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:Vt},"\u53D6\u6D88")))},Ke=me(78673),Fe=me(80727),Et=me.n(Fe),pn=(0,le.forwardRef)(({use3d:zt,width:Vt,height:Qe,callback:an,showSaveButton:dn},Nt)=>{const dt=(0,le.useRef)(),nn=(0,le.useRef)(),[vn,zn]=(0,le.useState)(!1),qn=(0,le.useRef)({id:dt,appName:"graphing",width:Vt||1e3,height:Qe||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)(()=>{nn.current=new(Et())(qn.current,!0),window.onload=function(){nn.current.inject("applet_container")}},[]);const Ft=()=>{var Bn=window.ggbApplet.getPNGBase64(1,!0,72);return an&&an(Bn),Bn};return(0,le.useEffect)(()=>{qn.current.appName=vn?"3D":"graphing",nn.current.inject("applet_container")},[vn]),(0,le.useEffect)(()=>{zn(zt)},[zt]),(0,le.useImperativeHandle)(Nt,()=>({getImgData:Ft})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:dt}),le.createElement(cn.Z,{align:"middle"},le.createElement(ln.Z,{flex:1},le.createElement(Ke.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:vn,onChange:Bn=>zn(Bn)})),le.createElement(ln.Z,null,le.createElement(Ze.ZP,{size:"large",onClick:Ft,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),en=me(41588),wn=me(8591);const hi="link",Rn="upload-image",Sn="add-flowchart",Pi="draw-image",zi="add-flowchart",Zi="code-block",ir="add-table",Nr="------------",pi={default:Nr,left:`:${Nr}`,center:`:${Nr}:`,right:`${Nr}:`};var li=me(58856);function xi(){}let Gi=0;const Oi=1e4,to="\u2581",eo="@\u2581\u2581@",Be="@\u2581@",Fi=`
**\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`,wr=["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 Fn(zt){return/^\d+$/.test(zt)?`${zt}px`:zt}const $i=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",tr={[$i+"-B"]:"bold",[$i+"-I"]:"italic"},ei={[hi]:"\u6DFB\u52A0\u94FE\u63A5",[Zi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Rn]:"\u6DFB\u52A0\u56FE\u7247",[Pi]:"\u6DFB\u52A0\u753B\u56FE",[Sn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ir]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var $n=({defaultValue:zt="",onChange:Vt,width:Qe="100%",height:an=400,miniToolbar:dn=!1,isFocus:Nt=!1,watch:dt,insertTemp:nn,mode:vn="markdown",id:zn="markdown-editor-id",showResizeBar:qn=!1,noStorage:Ft=!1,showNullButton:Bn=!1,showNullProgramButton:Kn=!1,hidetoolBar:Ci=!1,fullScreen:En=!1,onBlur:un,onCMBeforeChange:bn,onFullScreen:Ei,className:Ni="",disablePaste:mi=!1,disabled:Di=!1,disabledFill:Ai=!1,placeholder:gr="",values:Or="",extraUse:Hr})=>{const[jn,Po]=(0,le.useState)(null),[Wr,ro]=(0,le.useState)(zt),[Mn,ii]=(0,le.useState)(dt),[Hi,xr]=(0,le.useState)(En),[qi,pr]=(0,le.useState)(""),[Vr,jr]=(0,le.useState)(0),[kr,Kr]=(0,le.useState)(an),[Yn,Ho]=(0,le.useState)(!1),[Xn,Ao]=(0,le.useState)(0),[Qo,nr]=(0,le.useState)(0),qo=(0,le.useRef)(),Go=(0,le.useRef)(),Br=(0,le.useRef)(),Er=(0,le.useRef)();(0,le.useEffect)(()=>{const xo=window.scrollY||window.pageYOffset;ro(Or),jn==null||jn.setValue(Or),window.scrollTo(0,xo)},[Or]),(0,le.useEffect)(()=>{Ei==null||Ei(Hi)},[Hi]),(0,le.useEffect)(()=>{if(qo.current){let xo=function(vi,no){var io;if(mi){no.preventDefault();return}const Ja=no.clipboardData;if(Ja){const Ca=Ja.types.toString(),fa=Ja.items;if(Ca==="Files"||Ja.types.indexOf("Files")>-1){if(no.preventDefault(),vn=="stex")return;try{let $a=fa[1];((io=fa[0])==null?void 0:io.kind)==="file"&&($a=fa[0]);const Qa=$a.getAsFile(),Es=Qa.name.split(".").pop();(0,_t.I)(Qa,ys=>{var Zs,Dn,Ss;ys.id?((Zs=Qa==null?void 0:Qa.type)==null?void 0:Zs.indexOf("image"))>-1?Yr.replaceSelection(`<img width="100%" src="/api/attachments/${ys.id}?type=${ys.content_type})" alt="" />`):((Dn=Qa==null?void 0:Qa.type)==null?void 0:Dn.indexOf("video"))>-1?Yr.replaceSelection(`<video width="100%" controls src="/api/attachments/${ys.id}"></video>`):((Ss=Qa==null?void 0:Qa.type)==null?void 0:Ss.indexOf("pdf"))>-1?Yr.replaceSelection(`<a href="/api/attachments/${ys.id}?type=${Qa.type}&disposition=inline" target="_blank">${Qa.name}</a>`):wr.includes(Es)?Yr.replaceSelection(`<a href="/api/attachments/${ys.id}?type=office&disposition=inline" target="_blank">${Qa.name}</a>`):Yr.replaceSelection(`[${Qa.name}](/api/attachments/${ys.id}?type=${ys.content_type})`):(ys==null?void 0:ys.status)===401&&(document.location.href="/user/login")})}catch($a){wn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Yr=He().fromTextArea(qo.current,{mode:vn,lineNumbers:!dn,lineWrapping:!0,value:zt,autoCloseTags:!0,autoCloseBrackets:!0});return Yr.on("keyup",function(vi,no){no.keyCode===8&&(vi.getValue()==""?Yr.setOption("placeholder",gr):Yr.setOption("placeholder",null))}),Yr.on("keydown",function(vi,no){if(no.keyCode===8){var io=Yo(vi);io&&no.preventDefault()}}),Nt&&Yr.focus(),Yr.on("paste",xo),Di&&Yr.on("beforeChange",function(vi,no){(no.origin==="paste"||no.origin==="+input")&&no.cancel()}),Po(Yr),()=>{Yr.off("paste",xo)}}},[]);const mo=(0,le.useCallback)(()=>{if(Go.current)try{}catch(xo){console.log(xo,"---- to set md editor body height")}},[kr,Go,Hi]);(0,le.useEffect)(()=>{function xo(){let Yr=new st.Z(vi=>{for(let no of vi)(no.target.offsetHeight>0||no.target.offsetWidth>0)&&(mo(),jn.setSize("100%","100%"),jn.refresh())});return Yr.observe(qo.current.parentElement),Yr}if(jn){const Yr=xo();return()=>{var vi,no;(vi=qo.current)!=null&&vi.parentElement&&Yr.unobserve((no=qo.current)==null?void 0:no.parentElement)}}},[jn,mo]),(0,le.useEffect)(()=>{if(jn){let xo=[];for(const[Yr,vi]of Object.entries(tr)){let no={[Yr]:()=>{Ki(vi)}};xo.push(no),jn.addKeyMap(no)}return()=>{for(let Yr of xo)jn.removeKeyMap(Yr)}}},[jn]),(0,le.useEffect)(()=>{En!==Hi&&xr(En)},[En]),(0,li.Z)(()=>{if(!Ft&&Vr>0){let xo=new Date().getTime(),Yr=window.sessionStorage.getItem(zn);xo>=Vr+Oi&&(!Yr||Yr!==Wr)&&(window.sessionStorage.setItem(zn,Wr),Ho(!0))}},Oi),(0,le.useEffect)(()=>{ii(dt)},[jn,dt]),(0,le.useEffect)(()=>{jn&&Nt&&jn.focus()},[jn,Nt]),(0,le.useEffect)(()=>{if(Mn&&jn){let xo=function(vi){let no=vi.target;if(Er.current){let io=no.scrollTop/no.scrollHeight;Er.current.scrollTop=Er.current.scrollHeight*io}};const Yr=jn.getScrollerElement();return Yr.addEventListener("scroll",xo),()=>{Yr.removeEventListener("scroll",xo)}}},[jn,Mn]),(0,le.useEffect)(()=>{if(jn&&bn){let xo=function(Yr,vi){bn(Yr,vi)};return jn.on("beforeChange",xo),()=>{jn.off("beforeChange",xo)}}},[jn,bn]),(0,le.useEffect)(()=>{if(jn&&un){let xo=function(){un(jn.getValue())};return jn.on("blur",xo),()=>{jn.off("blur",xo)}}},[jn,un]);function Yo(xo,Yr){var vi=xo.getDoc(),no=vi.getCursor(),io=vi.getLine(no.line),Ja=io.charAt(no.ch-1),Ca=io.lastIndexOf("@\u2581@",no.ch),fa=io.lastIndexOf("@\u2581\u2581@",no.ch),$a=Ca>fa?Ca:fa,Qa=Ca>fa?3:4;if(eo.indexOf(Ja)===-1)return null;if(console.log("change1:",Yr,xo,io,no,$a,Ca,fa,Ja),$a>=0&&no.ch-$a<5){var Es=$a+Qa;return vi.replaceRange("",{line:no.line,ch:$a},{line:no.line,ch:Es}),{line:no.line,ch:Es}}return null}(0,le.useEffect)(()=>{if(jn){let xo=function(Yr,vi){const no=Yr.getValue();ro(no),jr(new Date().getTime()),Yr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Vt&&(Kn?Vt(no,po(no)):Vt(no))};return jn.on("change",xo),()=>{jn.off("change",xo)}}},[jn,Vt]),(0,le.useEffect)(()=>{if(jn)if(zt==null)jn.setValue(""),ro("");else{const xo=window.scrollY||window.pageYOffset;zt!==jn.getValue()&&(jn.setValue(zt),ro(zt),jn.setCursor(Di?1:jn.lineCount(),0),window.scrollTo(0,xo))}},[jn,zt]);const Ki=(0,le.useCallback)(xo=>{const Yr=jn.getCursor(),vi=jn.getSelection();let no=vi.split(`
`);switch(xo){case"bold":return jn.replaceSelection("**"+vi+"**"),vi===""&&jn.setCursor(Yr.line,Yr.ch+2),jn.focus();case"italic":return jn.replaceSelection("*"+vi+"*"),vi===""&&jn.setCursor(Yr.line,Yr.ch+1),jn.focus();case"code":return jn.replaceSelection("`"+vi+"`"),vi===""&&jn.setCursor(Yr.line,Yr.ch+1),jn.focus();case"inline-latex":return pr("inline-latex"),jn.focus();case"latex":return jn.replaceSelection("```latex\n"+vi+"\n```"),jn.setCursor(Yr.line+1,vi.length+1),jn.focus();case"line-break":return jn.replaceSelection(`<br/>
`),jn.focus();case"list-ul":return vi===""?jn.replaceSelection("- "+vi):jn.replaceSelection(no.map(io=>io===""?"":`- ${io}`).join(`
`)),jn.focus();case"list-ol":return vi===""?jn.replaceSelection("1. "+vi):jn.replaceSelection(no.map((io,Ja)=>io===""?"":`${Ja+1}. ${io}`).join(`
`)),jn.focus();case"add-null-ch":return vi===""&&jn.setCursor(Yr.line,Yr.ch),jn.replaceSelection(to),jn.focus();case"add-signal":return vi===""&&jn.setCursor(Yr.line,Yr.ch),jn.replaceSelection(Be),jn.focus();case"add-multiple":return vi===""&&jn.setCursor(Yr.line,Yr.ch),jn.replaceSelection(eo),jn.focus();case"inster-template-1":return vi===""&&jn.setCursor(Yr.line,Yr.ch),jn.replaceSelection(Fi),jn.focus();case"eraser":return jn.setValue(""),jn.focus();case"trigger-watch":return ii(!Mn),jn.focus();case"trigger-full-screen":return xr(!Hi),jn.focus();case hi:pr(hi);return;case Zi:pr(Zi);return;case Rn:pr(Rn);return;case Pi:pr(Pi);return;case"maths-latex":pr("maths-latex");return;case Sn:pr(Sn);return;case ir:pr(ir);return;default:throw new Error}},[jn,Mn,Hi]),ot=(0,le.useCallback)((xo,Yr)=>{var vi,no,io,Ja,Ca,fa;switch(pr(""),qi){case hi:const{title:Zs,link:Dn}=xo;return jn.replaceSelection(`[${Zs}](${Dn})`),jn.focus();case Zi:const{language:Ss,content:ra}=xo;return jn.replaceSelection(["```"+Ss,ra,"```"].join(`
`)),jn.focus();case"maths-latex":for(var $a=atob(xo),Qa=new Uint8Array($a.length),Es=0;Es<$a.length;Es++)Qa[Es]=$a.charCodeAt(Es);var ys=new Blob([Qa],{type:"image/png"});(0,_t.I)(ys,Do=>{Do.id?jn.replaceSelection(`![,](/api/attachments/${Do.id}?type=${Do.content_type})`):(Do==null?void 0:Do.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":jn.replaceSelection("`$$"+xo+"$$`");break;case Rn:case Pi:case zi:const{src:hl,alt:Ol}=xo,ns=Yr,yu=(io=(no=(vi=ns==null?void 0:ns.name)==null?void 0:vi.split("."))==null?void 0:no.pop)==null?void 0:io.call(no);return((Ja=ns==null?void 0:ns.type)==null?void 0:Ja.indexOf("image"))>-1||!(ns!=null&&ns.type)?ns!=null&&ns.align||ns!=null&&ns.width?jn.replaceSelection(`<p style="text-align:${ns.align||"initial"}"><img width="${ns.width?ns.width+"%":"initial"}" src="${hl}" alt="${Ol||""}" /></p>`):jn.replaceSelection(`<img width="100%" src="${hl}" alt="${Ol||""}" />`):((Ca=ns==null?void 0:ns.type)==null?void 0:Ca.indexOf("video"))>-1?jn.replaceSelection(`<video width="100%" controls src="${hl}"></video>`):((fa=ns==null?void 0:ns.type)==null?void 0:fa.indexOf("pdf"))>-1?jn.replaceSelection(`<a href="${hl}?type=${ns.type}&disposition=inline" target="_blank">${ns.name}</a>`):wr.includes(yu)?jn.replaceSelection(`<a href="${hl}?type=office&disposition=inline" target="_blank">${ns.name}</a>`):jn.replaceSelection(`[${ns.name}](${hl})`),jn.focus();case ir:const{row:eu,col:ps,align:Ba}=xo;let tu=`
`;for(let Do=0;Do<eu;Do++){let Ea=[],ca=[];for(let dr=0;dr<ps;dr++)Do===1&&ca.push(pi[Ba]),Ea.push(" ");Do===1&&(tu+=`| ${ca.join(" | ")} |
`),tu+=`| ${Ea.join(ps===1?"":" | ")} |
`}return jn.replaceSelection(tu+`
`),jn.focus();default:throw new Error}},[jn,qi]),sa=(0,le.useMemo)(()=>{switch(qi){case hi:return le.createElement(Pn,{callback:ot,onCancel:va});case Zi:return le.createElement(xn.Z,{callback:ot,onCancel:va});case Rn:return le.createElement(_t.Z,{callback:ot,onCancel:va});case Sn:return le.createElement(ht,{callback:ot,onCancel:va});case ir:return le.createElement(Oe,{callback:ot,onCancel:va});case"maths-latex":return le.createElement(pn,{showSaveButton:!0,callback:ot});case"inline-latex":return le.createElement(en.Z,{showSaveButton:!0,callback:ot});default:return null}},[qi]);function va(){pr("")}(0,le.useEffect)(()=>{if(Br.current){let xo=function(Ca){io=!0,Ja=Ca.pageY},Yr=function(){io=!1},vi=function(Ca){if(io){let fa=Ca.pageY-Ja;fa<0&&(fa=0),fa>300&&(fa=300);let $a=an+fa+"px";Kr($a)}},no=Br.current,io=!1,Ja=0;return no.addEventListener("mousedown",xo),document.addEventListener("mousemove",vi),document.addEventListener("mouseup",Yr),()=>{no.removeEventListener("mousedown",xo),document.removeEventListener("mousemove",vi),document.removeEventListener("mouseup",Yr)}}},[jn,Br]),(0,le.useEffect)(()=>{Kr(an)},[an]);const Ma=Fn(Qe),hs=Fn(kr),Ga={width:Ma,height:hs},Lo=(0,le.useMemo)(()=>{if(Vr){let xo=new Date(Vr),Yr=xo.getHours(),vi=xo.getMinutes(),no=xo.getSeconds();return Yr=Yr<10?"0"+Yr:Yr,vi=vi<10?"0"+vi:vi,no=no<10?"0"+no:no,`${Yr}:${vi}:${no}`}return 0},[Vr]),po=xo=>{const Yr=[];if(Kn){let vi=-1;xo=xo.replace(/(@▁▁@|@▁@)/g,function(no,io,Ja){Yr.push({multiLine:no!==Be})})}return Yr};function la(){window.sessionStorage.removeItem(zn),Ho(!1),jr(0)}function Eo(){Ho(!1),jr(0),jn.setValue(window.sessionStorage.getItem(zn))}(0,le.useEffect)(()=>{ei[qi]&&qi!==Pi&&qi!==Sn&&setTimeout(()=>{const xo=document.getElementsByClassName("markdown-popup-form")[0],Yr=window.innerWidth/2-xo.offsetWidth/2,vi=window.innerHeight/2-xo.offsetHeight/2;Ao(Yr),nr(vi)},0)},[qi]);const Na=xo=>{xo.preventDefault();const Yr=xo.clientX-Xn,vi=xo.clientY-Qo;document.body.onmousemove=no=>{let io=no.clientX-Yr,Ja=no.clientY-vi;const Ca=document.getElementsByClassName("markdown-popup-form")[0],fa=window.innerWidth-Ca.offsetWidth,$a=window.innerHeight-Ca.offsetHeight;io=Math.max(0,Math.min(io,fa)),Ja=Math.max(0,Math.min(Ja,$a)),os(no.clientX,no.clientY,Yr,vi)&&(Ao(io),nr(Ja))},document.body.onmouseup=function(){document.body.onmousemove=null}},os=(xo,Yr,vi,no)=>{const io=document.body.clientHeight,Ja=document.body.clientWidth;return xo<20&&vi>xo||xo>Ja-20&&vi<xo||Yr<20&&no>Yr||Yr>io-20&&no<Yr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return le.createElement(le.Fragment,null,le.createElement("div",{className:"markdown-editor-wrapper",ref:Go},le.createElement("div",{className:`markdown-editor-container ${Ni} ${Mn?"on-preview":""} ${dn?"mini":""} ${Hi?"full-screen":""}`,style:Ga},le.createElement(ze,{insertTemp:nn,watch:Mn,fullScreen:Hi,showNullButton:Bn,showNullProgramButton:Kn,onActionCallback:Ki,hidetoolBar:Ci,extraUse:Hr}),le.createElement("div",{className:"markdown-editor-body"},le.createElement("div",{className:"codemirror-container"},le.createElement("textarea",{ref:qo,placeholder:gr})),Mn?le.createElement("div",{ref:Er,className:"preview-container"},vn==="stex"&&le.createElement(mt,{value:Wr}),vn!=="stex"&&le.createElement(ut.Z,{disabledFill:Ai,showProgramFill:Kn,value:Wr})):null))),qn?le.createElement("a",{ref:Br,className:"editor-resize"}):null,qi===Pi&&le.createElement(Zn,{callback:ot,onCancel:va}),qi===Sn&&le.createElement(ht,{callback:ot,onCancel:va}),le.createElement(Ye.Z,null,ei[qi]&&qi!==Pi&&qi!==Sn?le.createElement(qt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Xn,top:Qo},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:Na},ei[qi]),open:!0,onCancel:va,footer:null,destroyOnClose:!0,width:qi===Sn?"1200px":null,height:qi===Sn?"80vh":null,className:"markdown-popup-form"},sa):null))}},28451:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Ne},I:function(){return ze}});var le=me(78241),Te=me(8591),He=me(92832),st=me(81327),We=me(5871),ct=me(5112),Me=me(3113),bt=me(77903),Pt=me(59301),Ge=me(59301),ut=Object.defineProperty,mt=Object.defineProperties,yt=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,ce=(Ye,Xe,lt)=>Xe in Ye?ut(Ye,Xe,{enumerable:!0,configurable:!0,writable:!0,value:lt}):Ye[Xe]=lt,se=(Ye,Xe)=>{for(var lt in Xe||(Xe={}))te.call(Xe,lt)&&ce(Ye,lt,Xe[lt]);if(De)for(var lt of De(Xe))ee.call(Xe,lt)&&ce(Ye,lt,Xe[lt]);return Ye},he=(Ye,Xe)=>mt(Ye,yt(Xe));const{useForm:ve}=le.default,Ee={width:280,marginRight:10},Le={labelCol:{span:5},wrapperCol:{span:19}};var Ne=({callback:Ye,onCancel:Xe})=>{const[lt]=ve();let Ze=(0,Pt.useRef)();function Lt(wt){Ze.current.width=lt.getFieldValue("width"),Ze.current.align=lt.getFieldValue("align"),Ye(wt,Ze.current)}function rt(wt,Dt){if(wt.status===-1){Te.ZP.error(wt.message);return}lt.setFieldsValue({src:`/api/attachments/${wt.id}`,type:Dt.type})}function Ot(wt){let Dt=wt.target.files[0];Ze.current=Dt,ze(Dt,rt)}return Ge.createElement(le.default,he(se({form:lt},Le),{className:"upload-image-panel",onFinish:Lt,style:{width:470,overflow:"hidden"}}),Ge.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Ge.createElement("div",{className:"flex-container"},Ge.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Ge.createElement(He.default,{style:Ee})),Ge.createElement(je,{onFileChange:Ot}))),Ge.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Ge.createElement(He.default,{style:{width:264}})),Ge.createElement(le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Ge.createElement(st.Z,null,Ge.createElement(le.default.Item,{name:"width",style:{margin:0}},Ge.createElement(We.Z,{style:{width:264}})),Ge.createElement("span",{className:"ml8"},"%"))),Ge.createElement(le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Ge.createElement(ct.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),Ge.createElement("aside",null,Ge.createElement(le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Ge.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Ge.createElement(Me.ZP,{type:"default",onClick:Xe},"\u53D6\u6D88"))))};function je({onFileChange:Ye}){return Ge.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Ge.createElement("input",{type:"file",onChange:Ye}))}function ze(Ye,Xe){if(!Ye)throw new String("\u6CA1\u6709\u6587\u4EF6");let lt=new FormData;lt.append("editormd-image-file",Ye),lt.append("file_param_name","editormd-image-file"),lt.append("byxhr","true");var Ze=new window.XMLHttpRequest;Ze.withCredentials=!0,Ze.addEventListener("load",function(Lt){Xe(JSON.parse(Lt.target.responseText),Ye)},!1),Ze.addEventListener("error",function(Lt){console.error(Lt)},!1),Ze.open("POST",`${bt.KI}/api/attachments.json`),Ze.send(lt)}},79346:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return He}});var le=me(59301),Te=me(4676);class He extends le.Component{constructor(We){super(We);const ct=window.document;this.node=ct.createElement("div"),ct.body.appendChild(this.node)}render(){const{children:We}=this.props;return(0,Te.createPortal)(We,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},23954:function(_n,yn,me){"use strict";me.d(yn,{SV:function(){return Gt},ZP:function(){return $e}});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"]},st={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(`
`)}]},ct={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(`
`)}]},Me={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 bt=me(53184),Pt=me.n(bt),Ge=Object.defineProperty,ut=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(Ht,ht,at)=>ht in Ht?Ge(Ht,ht,{enumerable:!0,configurable:!0,writable:!0,value:at}):Ht[ht]=at,ce=(Ht,ht)=>{for(var at in ht||(ht={}))De.call(ht,at)&&ee(Ht,at,ht[at]);if(yt)for(var at of yt(ht))te.call(ht,at)&&ee(Ht,at,ht[at]);return Ht},se=(Ht,ht)=>ut(Ht,mt(ht)),he=(Ht,ht,at)=>new Promise((Re,Pe)=>{var ye=Fe=>{try{Ke(at.next(Fe))}catch(Et){Pe(Et)}},Oe=Fe=>{try{Ke(at.throw(Fe))}catch(Et){Pe(Et)}},Ke=Fe=>Fe.done?Re(Fe.value):Promise.resolve(Fe.value).then(ye,Oe);Ke((at=at.apply(Ht,ht)).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=(Ht,ht)=>ht.map(at=>({label:at,kind:Ht.languages.CompletionItemKind.Keyword,insertText:at})),Le=Ht=>Object.keys(ve.tables).map(ht=>({label:ht,kind:Ht.languages.CompletionItemKind.Variable,insertText:ht})),Ne=(Ht,ht)=>{const at=ve.tables[Ht];return at?at.map(Re=>({label:Re,kind:ht.languages.CompletionItemKind.Field,insertText:Re})):[]};function je(Ht,ht,at,Re,Pe){let ye=ht.getWordUntilPosition(at),Oe={startLineNumber:at.lineNumber,endLineNumber:at.lineNumber,startColumn:ye.startColumn,endColumn:ye.endColumn},Ke=Re.map(Fe=>({label:Fe,kind:Ht.languages.CompletionItemKind.Keyword,insertText:Fe,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}));return Pe.map(Fe=>{Ke.push(se(ce({},Fe),{range:Oe}))}),Ke}var ze=Ht=>{ve.languages.map(Pe=>(Ht.languages.registerDocumentFormattingEditProvider(Pe,{provideDocumentFormattingEdits(ye,Oe,Ke){return he(this,null,function*(){const Fe=Pt()(ye.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:ye.getFullModelRange(),text:Fe}]})}}),Pe));const ht=We.quickKey.map(Pe=>({label:Pe.label,kind:Ht.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet})),at=ct.quickKey.map(Pe=>({label:Pe.label,kind:Ht.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Re=st.quickKey.map(Pe=>({label:Pe.label,kind:Ht.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Ht.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Pe,ye){var Oe=Pe.getWordUntilPosition(ye),Ke={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Fe=Pe.getLineContent(ye.lineNumber).substring(Oe.startColumn-2,Oe.endColumn);return{suggestions:[...We.keywords.map(Et=>({label:Et,kind:Ht.languages.CompletionItemKind.Function,documentation:Et,insertText:Et,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke})),...We.quickKey.map(Et=>({label:Et.label,kind:Ht.languages.CompletionItemKind.Function,documentation:Et.content,insertText:Fe.startsWith("#")?Et.content.replace(/#/,""):Et.content,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}))]}}}),Ht.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Pe,ye){var Oe=Pe.getWordUntilPosition(ye),Ke={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn};return{suggestions:[...He.keywords.map(Fe=>({label:Fe,kind:Ht.languages.CompletionItemKind.Function,documentation:Fe,insertText:Fe,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}))]}}}),Ht.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Pe,ye){var Oe=Pe.getWordUntilPosition(ye),Ke={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Fe=Pe.getLineContent(ye.lineNumber).substring(Oe.startColumn-2,Oe.endColumn);return{suggestions:[...st.keywords.map(Et=>({label:Et,kind:Ht.languages.CompletionItemKind.Function,documentation:Et,insertText:Et,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke})),...st.quickKey.map(Et=>({label:Et.label,kind:Ht.languages.CompletionItemKind.Function,documentation:Et.content,insertText:Fe.startsWith("#")?Et.content.replace(/#/,""):Et.content,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}))]}}}),Ht.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Pe,ye){var Oe=Pe.getWordUntilPosition(ye),Ke={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Fe=Pe.getLineContent(ye.lineNumber).substring(Oe.startColumn-2,Oe.endColumn);return{suggestions:[...Me.keywords.map(Et=>({label:Et,kind:Ht.languages.CompletionItemKind.Function,documentation:Et,insertText:Et,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke})),...Me.quickKey.map(Et=>({label:Et.label,kind:Ht.languages.CompletionItemKind.Function,documentation:Et.content,insertText:Fe.startsWith("#")?Et.content.replace(/#/,""):Et.content,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}))]}}}),Ht.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Pe,ye){var Oe=Pe.getWordUntilPosition(ye),Ke={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Fe=Pe.getLineContent(ye.lineNumber).substring(Oe.startColumn-2,Oe.endColumn);return{suggestions:[...ct.keywords.map(Et=>({label:Et,kind:Ht.languages.CompletionItemKind.Function,documentation:Et,insertText:Et,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke})),...ct.quickKey.map(Et=>({label:Et.label,kind:Ht.languages.CompletionItemKind.Function,documentation:Et.content,insertText:Fe.startsWith("#")?Et.content.replace(/#/,""):Et.content,insertTextRules:Ht.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}))]}}})};const Ye="\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,lt=(Ht,ht,at)=>ht in Ht?Xe(Ht,ht,{enumerable:!0,configurable:!0,writable:!0,value:at}):Ht[ht]=at,Ze=(Ht,ht,at)=>lt(Ht,typeof ht!="symbol"?ht+"":ht,at);const Lt=class mS{constructor(ht,at,Re){this.placeholder=ht,this.editor=at,this.monaco=Re,at.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(Lt,"ID","editor.widget.placeholderHint");var Ot=Lt,wt=me(96236),Dt=me(8591),Wt=me(6848),Mt=me(89392),et=me(34604),Ue=me(56102),Rt=Object.defineProperty,Pn=Object.defineProperties,xn=Object.getOwnPropertyDescriptors,_t=Object.getOwnPropertySymbols,qt=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,Gn=(Ht,ht,at)=>ht in Ht?Rt(Ht,ht,{enumerable:!0,configurable:!0,writable:!0,value:at}):Ht[ht]=at,gn=(Ht,ht)=>{for(var at in ht||(ht={}))qt.call(ht,at)&&Gn(Ht,at,ht[at]);if(_t)for(var at of _t(ht))cn.call(ht,at)&&Gn(Ht,at,ht[at]);return Ht},Zn=(Ht,ht)=>Pn(Ht,xn(ht)),Ct=(Ht,ht)=>{var at={};for(var Re in Ht)qt.call(Ht,Re)&&ht.indexOf(Re)<0&&(at[Re]=Ht[Re]);if(Ht!=null&&_t)for(var Re of _t(Ht))ht.indexOf(Re)<0&&cn.call(Ht,Re)&&(at[Re]=Ht[Re]);return at},Wn=(Ht,ht,at)=>new Promise((Re,Pe)=>{var ye=Fe=>{try{Ke(at.next(Fe))}catch(Et){Pe(Et)}},Oe=Fe=>{try{Ke(at.throw(Fe))}catch(Et){Pe(Et)}},Ke=Fe=>Fe.done?Re(Fe.value):Promise.resolve(Fe.value).then(ye,Oe);Ke((at=at.apply(Ht,ht)).next())});function di(Ht){return/^\d+$/.test(Ht)?`${Ht}px`:Ht}function Kt(){}let ln=!1;const $t={"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 Tt(Ht=[]){let ht=Ht;if(Array.isArray(Ht)){for(let at=0;at<Ht.length;at++){let Re=$t[Ht[at]];if(Re)return Re}return ht[0]}return $t[ht]||ht}let ft=null;var $e=Ht=>{var ht=Ht,{width:at="100%",height:Re="100%",value:Pe,language:ye="javascript",style:Oe={},options:Ke={},overrideServices:Fe={},theme:Et="vs-dark",onEditBlur:sn,isCopy:pn=!1,onSave:en,autoHeight:wn=!1,forbidCopy:hi=!1,onChange:Rn=Kt,editorDidMount:Sn=Kt,onFocus:Pi=Kt,onBreakPoint:zi=Kt,breakPointValue:Zi=[],filename:ir="educoder.txt",errorLine:Nr,errorContent:pi="",highlightLine:li,openBreakPoint:xi=!1,placeholder:Gi="",showMiniMap:Oi=!0}=ht,to=Ct(ht,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const eo=(0,le.useRef)(),Be=(0,le.useRef)({}),Fi=(0,le.useRef)(),wr=(0,le.useRef)(),Fn=(0,le.useRef)([]),wi=(0,le.useRef)(!1),$i=(0,le.useRef)(),tr=(0,le.useRef)(),ei=(0,le.useRef)(!1),[$n,zt]=(0,le.useState)(!1);function Vt(){let un;return eo.current&&(un=new Te.Z(bn=>{for(let Ei of bn)(Ei.target.offsetHeight>0||Ei.target.offsetWidth>0)&&Be.current.instance.layout()}),un.observe(eo.current)),un}function Qe(){Dt.ZP.warning({content:decodeURIComponent(Ye),key:"monaco-editor-tip"})}const an=()=>{let un=Be.current.instance;if(Pe!=null&&un&&$n){const bn=un.getModel();bn&&Pe!==bn.getValue()&&(ln=!0,bn.setValue(Pe),un.layout(),ln=!1)}};(0,le.useEffect)(()=>{const un=et.Z.subscribe("formatDocument",bn=>{var Ei;let Ni=Be.current.instance;(Ei=Ni==null?void 0:Ni.getAction)==null||Ei.call(Ni,"editor.action.formatDocument").run()});return window.updateMonacoValue=bn=>{Rn(bn)},un},[]),(0,le.useEffect)(()=>{var un;let bn=Be.current.instance;wr.current&&clearTimeout(wr.current),wr.current=setTimeout(()=>{an()},500),Pe&&(Pe!=null&&Pe.length)&&((un=bn==null?void 0:bn.updateOptions)==null||un.call(bn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Pe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Pe,$n,Be.current]),(0,le.useEffect)(()=>{if(Nr&&Be.current&&Be.current.instance){let bn=Be.current.instance;bn.changeViewZones(function(Ei){var Ni=document.createElement("div");Ni.style.padding="10px 20px",Ni.style.width="calc(100% - 20px)",Ni.className="my-error-line-wrp",Ni.innerHTML=pi,Ei.addZone({afterLineNumber:Nr||11,heightInLines:3,domNode:Ni})});var un={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}};bn.addOverlayWidget(un),bn.revealPositionInCenter({lineNumber:20,column:1})}},[Nr,Be.current,$n]);const dn=(un="",bn)=>{if(!un||un.trim()==="")return!0;const Ni=Be.current.instance.getModel().getLineTokens(bn);let mi=!1;for(let Di=0;Di<2;Di++)Ni.getStandardTokenType(Di)===1&&(mi=!0);return mi};(0,le.useEffect)(()=>{var un;const bn=(un=Be.current)==null?void 0:un.instance;if(bn&&$n&&hi){const Ei=bn.onDidBlurEditorWidget(()=>{ei.current=!1}),Ni=bn.onDidFocusEditorText(()=>{ei.current=!0});return()=>{Ei.dispose(),Ni.dispose()}}},[Be.current,$n,hi]),(0,le.useEffect)(()=>{var un;if((un=Be.current)!=null&&un.instance&&$n&&xi){let bn=Be.current.instance,Ei=bn.getModel();if(!Ei)return;(()=>{var Mn;let ii=[],Hi=[];const xr=Ei.getAllDecorations();for(let pr of xr)pr.options.className==="highlighted-line"&&(ii.push((Mn=pr==null?void 0:pr.range)==null?void 0:Mn.startLineNumber),Hi.push(pr==null?void 0:pr.id));if(li===ii[0])return;Ei.deltaDecorations(Hi,[]);const qi=Ei.getLineCount();li&&li<=qi&&(bn.deltaDecorations([],[{range:new ft.Range(li,1,li,Ei.getLineMaxColumn(li)),options:{isWholeLine:!0,className:"highlighted-line"}}]),bn.revealLineInCenter(li))})();const mi=(Mn=!1)=>{var ii;let Hi=[],xr=[];const qi=Ei.getAllDecorations();for(let pr of qi)pr.options.linesDecorationsClassName==="breakpoints-select"&&(Hi.push((ii=pr==null?void 0:pr.range)==null?void 0:ii.startLineNumber),xr.push(pr==null?void 0:pr.id));if(Mn)return{lines:Hi,ids:xr};zi(Hi)},Di=Mn=>Wn(void 0,null,function*(){let ii={range:new ft.Range(Mn,1,Mn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ei.deltaDecorations([],[ii]),mi()}),Ai=Mn=>Wn(void 0,null,function*(){let ii=[];const Hi=bn.getLineDecorations(Mn);for(let xr of Hi)xr.options.linesDecorationsClassName==="breakpoints-select"&&ii.push(xr.id);yield Ei.deltaDecorations(ii,[]),mi()}),gr=Mn=>{let ii=bn.getLineDecorations(Mn);for(let Hi of ii)if(Hi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Mt.isEqual)(Zi,mi(!0).lines)){Ei.deltaDecorations(mi(!0).ids,[]);const Mn=Zi.map(ii=>({range:new ft.Range(ii,1,ii,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ei.deltaDecorations([],Mn)}const Or=bn.onDidChangeModelContent(Mn=>{let ii=bn.getPosition();if(ii){let Hi=ii.lineNumber;clearTimeout(tr.current),tr.current=setTimeout(()=>{dn(Ei.getLineContent(Hi),Hi)?Ai(Hi):gr(Hi)?(Ai(Hi),Di(Hi)):mi()},100)}}),Hr=bn.onMouseDown(Mn=>{var ii,Hi,xr;if(Mn.target.detail&&((xr=(Hi=(ii=Mn.target)==null?void 0:ii.element)==null?void 0:Hi.className)!=null&&xr.includes("line-numbers"))){let qi=Mn.target.position.lineNumber;if(dn(Ei.getLineContent(qi),qi))return;gr(qi)?Ai(qi):Di(qi)}}),jn=Mn=>{let ii={range:new ft.Range(Mn,1,Mn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Fn.current=bn.deltaDecorations(Fn.current,[ii])},Po=()=>{Fn.current=bn.deltaDecorations(Fn.current,[])},Wr=bn.onMouseMove(Mn=>{var ii,Hi,xr;if(Po(),Mn.target.detail&&((xr=(Hi=(ii=Mn.target)==null?void 0:ii.element)==null?void 0:Hi.className)!=null&&xr.includes("line-numbers"))){let qi=Mn.target.position.lineNumber;if(dn(Ei.getLineContent(qi),qi))return;jn(qi)}}),ro=bn.onMouseLeave(()=>{Po()});return()=>{Or.dispose(),Hr.dispose(),Wr.dispose(),ro.dispose()}}},[Be.current,$n,Zi,li,xi,ye]),(0,le.useEffect)(()=>{var un;(un=Be.current)!=null&&un.instance&&xi&&Be.current.instance.setPosition({lineNumber:0,column:0})},[li]);function Nt(){let un=Be.current.instance;if(un){const bn=un.getSelection(),Ei=Be.current.pastePos||{},Ni=new ft.Range(Ei.startLineNumber||bn.endLineNumber,Ei.startColumn||bn.endColumn,Ei.endLineNumber||bn.endLineNumber,Ei.endColumn||bn.endColumn);setTimeout(()=>{un.executeEdits("",[{range:Ni,text:""}])},300)}}function dt(un){(window.navigator.platform.match("Mac")?un.metaKey:un.ctrlKey)&&un.keyCode==83&&(un.preventDefault(),en())}const nn=()=>{if(wn&&Be.current.instance){const un=Be.current.instance.getContentHeight();Ci(un<Re?Re:un)}else Ci(Re)};function vn(un){var bn=document.createEvent("MouseEvents");bn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),un.dispatchEvent(bn)}const zn=un=>{if(!ei.current)return;const{keyCode:bn,ctrlKey:Ei,metaKey:Ni,target:mi,type:Di}=un;return(Di==="paste"||(bn===67||bn===86)&&(Ni||Ei))&&mi.nodeName==="TEXTAREA"&&(Qe(),un.preventDefault()),!1};function qn(un,bn){var Ei=window.URL||window.webkitURL||window,Ni=new Blob([bn]),mi=document.createElementNS("http://www.w3.org/1999/xhtml","a");mi.href=Ei.createObjectURL(Ni),mi.download=un,vn(mi)}(0,le.useEffect)(()=>{nn()},[nn]),(0,le.useEffect)(()=>{eo.current&&!$n&&Promise.all([me.e(8909),me.e(3267)]).then(me.bind(me,71448)).then(un=>{try{ft=un,Be.current.instance=ft.editor.create(eo.current,{value:Pe,language:Tt(ye),theme:Et,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Oi||!1}},Fe);const bn=Be.current.instance;let mi=[...wt.BH._menuItems].find(Or=>Or[0]._debugName=="EditorContext")[1],Di=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Ai=(Or,Hr)=>{var jn,Po;let Wr=Or._first;do Hr.includes((Po=(jn=Wr.element)==null?void 0:jn.command)==null?void 0:Po.id)&&Or._remove(Wr);while(Wr=Wr.next)};if(Sn(bn,ft),setTimeout(()=>{nn(),Be.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{qn(ir||"educoder.txt",bn.getValue())}})},500),Be.current.subscription=bn.onDidChangeModelContent(Or=>{wi.current?clearTimeout($i.current):(nn(),Rn(bn.getValue(),Or)),$i.current=setTimeout(()=>{wi.current=!1},500)}),window.Monaco||ze(ft,Tt(ye)),hi&&(Ai(mi,Di),eo.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",zn),window.removeEventListener("paste",zn),window.addEventListener("keydown",zn),window.addEventListener("paste",zn)),window.Monaco=ft,sn&&bn.onDidBlurEditorWidget(()=>{sn(bn.getValue())}),Pi&&bn.onDidFocusEditorText(()=>{Pi(bn.getValue())}),hi)try{bn.onDidPaste(Or=>{const Hr=bn.getSelection(),jn=Be.current.pastePos||{},Po=new ft.Range(jn.startLineNumber||Hr.endLineNumber,jn.startColumn||Hr.endColumn,jn.endLineNumber||Hr.endLineNumber,jn.endColumn||Hr.endColumn);bn.executeEdits("",[{range:Or.range,text:""}])})}catch(Or){}let gr=Vt();return Gi&&typeof Gi=="string"&&new Ot(Gi,bn,ft),zt(!0),()=>{const Or=Be.current.instance;Or.dispose();const Hr=Or.getModel();Hr&&Hr.dispose(),Be.current.subscription&&Be.current.subscription.dispose(),gr.unobserve(eo.current)}}catch(bn){}})},[]),(0,le.useEffect)(()=>{if(Be.current.instance&&$n)return document.addEventListener("keydown",dt,!1),()=>{document.removeEventListener("keydown",dt)}},[en,$n]),(0,le.useEffect)(()=>{let un=Be.current.instance;if(un&&$n){let bn=Tt(ye);ft.editor.setModelLanguage(un.getModel(),bn)}},[ye,$n]),(0,le.useEffect)(()=>{Be.current.instance&&$n&&ft.editor.setTheme(Et)},[Et,$n]),(0,le.useEffect)(()=>{let un=Be.current.instance;Fi.current=Ke,un&&$n&&(un.updateOptions(gn({},Ke)),setTimeout(()=>{un.getModel().updateOptions(gn({},Ke))},200))},[JSON.stringify(Ke),$n]),(0,le.useEffect)(()=>{let un=Be.current.instance;un&&$n&&un.layout()},[at,Re,$n]);const[Ft,Bn]=(0,le.useState)(di(at)),[Kn,Ci]=(0,le.useState)(di(Re)),En=Zn(gn({},Oe),{width:Ft,height:Kn,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:eo,style:En},pn&&le.createElement(Ue.CopyToClipboard,{text:Pe,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 Gt({width:Ht="100%",height:ht="100%",original:at,modified:Re,language:Pe,options:ye={}}){const Oe=(0,le.useRef)(),[Ke,Fe]=(0,le.useState)(null);function Et(wn){let hi;return Oe.current&&(hi=new Te.Z(Rn=>{for(let Sn of Rn)(Sn.target.offsetHeight>0||Sn.target.offsetWidth>0)&&wn.layout()}),hi.observe(Oe.current)),hi}(0,le.useEffect)(()=>(Oe.current&&Promise.all([me.e(8909),me.e(9404)]).then(me.bind(me,2550)).then(wn=>{ft=wn;const hi=ft.editor.createDiffEditor(Oe.current,Zn(gn({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},ye),{wordWrap:!0}));Fe(hi);let Rn=Et(hi);return()=>{hi.dispose();const Sn=hi.getModel();Sn&&Sn.dispose(),Rn.unobserve(Oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{Ke&&Ke.setModel({original:ft.editor.createModel(at,Pe),modified:ft.editor.createModel(Re,Pe)})},[at,Re,Pe,Ke]);const sn=di(Ht),pn=di(ht),en={width:sn,height:pn};return le.createElement("div",{className:"my-diff-editor",ref:Oe,style:en})}},85057:function(_n,yn,me){"use strict";me.d(yn,{jL:function(){return We},w9:function(){return qt},QD:function(){return Rn},cQ:function(){return Ue},op:function(){return Et},O5:function(){return tr},_b:function(){return Nr},t7:function(){return se},Gi:function(){return Wn},YG:function(){return Zn},qp:function(){return ut},vr:function(){return zi},qE:function(){return en},Je:function(){return Ee},wb:function(){return wt},cq:function(){return ft},tp:function(){return De}});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:ei=[],img:$n,imgWidth:zt=346,title:Vt,sunTitle:Qe,bannerExtraContent:an})=>le.createElement("div",{className:Te.banner},le.createElement("div",{className:Te.content},le.createElement("aside",null,le.createElement("p",null,le.createElement("b",null,Vt),le.createElement("span",null,Qe)),ei.length>0&&le.createElement("div",{className:Te.btns},ei.map((dn,Nt)=>le.createElement("div",{key:Nt,onClick:dn.click},dn.name,dn.sign?le.createElement("img",{src:He,width:39}):null))),an),$n&&le.createElement("img",{style:{marginTop:33,marginRight:38},src:$n,width:zt}))),ct={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"},Me=me(92310),bt=me.n(Me),Pt=me(89392),ut=({dataSource:ei=[],value:$n,onChange:zt,onTitleChange:Vt,className:Qe,title:an,titleWidth:dn=41,style:Nt={},fontColor:dt="#6A7283",showCount:nn})=>{const[vn,zn]=(0,le.useState)(0),[qn,Ft]=(0,le.useState)(!1),Bn=(0,le.useRef)(null),Kn=(0,le.useRef)(null);return(0,le.useEffect)(()=>{var Ci;ei.length!==0&&(((Ci=Bn==null?void 0:Bn.current)==null?void 0:Ci.clientHeight)>97?zn(1):zn(0)),ei.length===0&&zn(0),Ft(!1)},[ei]),le.createElement("div",{className:bt()(ct.row,Qe),style:Nt},le.createElement("div",{onClick:(0,Pt.throttle)(()=>Vt==null?void 0:Vt(),2e3),style:{width:dn,marginTop:qn?12:4},className:`${ct.title} ${Vt?"current":""}`},an),le.createElement("div",{className:qn?`${ct.tagsWrap} ${ct.tagsBorderWrap}`:ct.tagsWrap},le.createElement("div",{className:ct.bar,ref:Kn,style:vn>0?{height:vn===1?97:"auto",overflow:vn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},le.createElement("div",{className:ct.tag,ref:Bn},ei==null?void 0:ei.map(Ci=>le.createElement("span",{onClick:()=>zt(Ci.id),key:Ci.id,style:{color:dt},className:$n===Ci.id?ct.active:""},le.createElement("span",{title:Ci.name,className:ct.name},Ci.name),!!nn&&le.createElement("span",{className:ct.num},Ci.count))))),!!vn&&le.createElement(le.Fragment,null,vn===1?le.createElement("div",{onClick:()=>{var Ci;zn(2),((Ci=Bn==null?void 0:Bn.current)==null?void 0:Ci.clientHeight)>245?Ft(!0):Ft(!1)},className:ct.action},"\u5C55\u5F00",le.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):le.createElement("div",{onClick:()=>{Kn.current.scrollTop=0,zn(1),Ft(!1)},className:ct.action},"\u6536\u8D77",le.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},mt={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},De=({dataSource:ei=[],value:$n,onChange:zt,className:Vt,style:Qe={}})=>le.createElement("div",{style:Qe,className:bt()(mt.tabs,Vt)},ei.map(an=>le.createElement("span",{onClick:()=>zt(an.id),className:$n===an.id?mt.active:"",key:an.id},an.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:ei=[],value:$n="",onChange:zt,onInputChange:Vt=()=>{},className:Qe,style:an={},placeholder:dn,allowClear:Nt=!1})=>{var dt;const[nn,vn]=(0,le.useState)(""),[zn,qn]=(0,le.useState)("");(0,le.useEffect)(()=>{var Kn;let Ci=$n;(Kn=JSON.stringify($n))!=null&&Kn.includes("{")&&(vn($n.id),Ci=$n.value||"");try{qn(decodeURIComponent(Ci||""))}catch(En){qn(decodeURIComponent(Ci||""))}},[$n]);const Ft=()=>{zt(encodeURIComponent(zn),nn||null)},Bn=Kn=>{Kn!==nn&&(vn(Kn),zt(encodeURIComponent(zn),Kn))};return le.createElement("div",{className:bt()(te.input,Qe),style:an},!!ei.length&&le.createElement("div",{className:te.dropdown},le.createElement("div",{className:te.text},(dt=ei.find(Kn=>Kn.id===nn))==null?void 0:dt.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},ei.map((Kn,Ci)=>le.createElement("div",{key:Ci,onClick:()=>Bn(Kn.id)},Kn.name)))),le.createElement(ee.default,{onPressEnter:Ft,value:zn,onChange:Kn=>{qn(Kn.target.value),Vt(encodeURIComponent(Kn.target.value),nn||null)},bordered:!1,placeholder:dn}),le.createElement("i",{onClick:Ft,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:ei,onChange:$n,className:zt,total:Vt,pageSize:Qe,style:an={}})=>{const dn=ei<2,Nt=ei>=Math.ceil(Vt/Qe);return Vt<=Qe?le.createElement(le.Fragment,null):le.createElement("div",{className:bt()(he.quickPager,zt),style:an},le.createElement("div",{onClick:()=>{dn||$n(ei-1,"prev")},className:dn?he.disabled:""},"\u4E0A\u4E00\u9875"),le.createElement("div",{onClick:()=>{Nt||$n(ei+1,"next")},className:Nt?he.disabled:""},"\u4E0B\u4E00\u9875"))},Le={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"},Ne=me(71418),je=me(6848),ze=me(13570),Ye=me(3294),Xe=me(955),lt=me(96908),Ze=me(57177),Lt=me(81378),rt=me(8797),wt=({className:ei,dataSource:$n=[],col:zt=4,right:Vt,bottom:Qe=23,precision:an=0,wrapWidth:dn=1200,trackEventItems:Nt,loading:dt})=>{const nn=Math.floor((dn-(zt-1)*Vt)/zt);return le.createElement(Ne.Z,{spinning:dt},le.createElement("div",{className:bt()(Le.list,ei)},!!$n.length&&$n.map((vn,zn)=>{const{name:qn,id:Ft,identifier:Bn,power:Kn,cover_image_id:Ci,pic:En}=vn;return le.createElement("div",{className:Le.wrap,key:Ft,style:{width:nn,marginRight:(1+zn)%zt===0?0:Vt+an,marginBottom:Qe}},le.createElement("a",{target:"_blank",href:`/shixuns/${Bn}/challenges`,className:Le.li,onClick:un=>{un.preventDefault(),Nt&&(0,Xe.L9)([Nt]),Kn&&(0,Xe.xg)(`/shixuns/${Bn}/challenges`)}},le.createElement("div",{className:Le.img},le.createElement("img",{className:Le.cover,src:`${En}`}),vn.is_jupyter&&le.createElement("img",{className:Le.sign,src:lt}),vn.is_jupyter_lab&&le.createElement("img",{className:Le.sign,src:Ze}),vn.is_unity_3d&&le.createElement("img",{className:Le.sign,src:Lt})),le.createElement("div",{className:Le.name},le.createElement(je.Z,{title:qn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},le.createElement("span",{className:Le.e},qn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),le.createElement("div",{className:Le.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,vn.challenges_count))),!!vn.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,vn.myshixuns_count))),le.createElement(je.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},le.createElement("span",null,le.createElement("span",null,vn.level))),le.createElement("div",{className:Le.rate},le.createElement(ze.Z,{allowHalf:!0,disabled:!0,defaultValue:vn.score_info}),le.createElement("span",null,"\xA0",vn.score_info?`${vn.score_info}\u5206`:"5\u5206")))),!Kn&&le.createElement("div",{className:Le.lockWrap},le.createElement("img",{src:`${Ye.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")))}),!$n.length&&le.createElement(rt.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(24065),Mt=me(59301),Ue=({className:ei,dataSource:$n=[],col:zt=4,right:Vt,bottom:Qe=23,precision:an=0,wrapWidth:dn=1200,trackEventItems:Nt,loading:dt,onRemove:nn=()=>{},isCurrent:vn=!0,showAlias:zn=!1})=>{const qn=Math.floor((dn-(zt-1)*Vt)/zt),Ft=[{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 Mt.createElement(Ne.Z,{spinning:dt},Mt.createElement("div",{className:bt()(Dt.list,ei)},!!($n!=null&&$n.length)&&($n==null?void 0:$n.map((Bn,Kn)=>{var Ci;const{name:En,id:un,identifier:bn,featured:Ei,school_name:Ni,image_url:mi,excellent:Di,is_plan:Ai}=Bn;return Mt.createElement("div",{key:un,className:Dt.wrap,style:{width:qn,marginRight:(1+Kn)%zt===0?0:Vt+an,marginBottom:Qe}},Mt.createElement("a",{className:Dt.li,onClick:gr=>{gr.preventDefault(),gr.stopPropagation(),Nt&&(0,Xe.L9)([Nt]),(0,Xe.xg)(`/paths/${bn}`)}},Mt.createElement("div",{className:Dt.img},Mt.createElement("img",{className:Dt.cover,src:`${mi}`}),vn&&(0,Wt.bg)()&&(Bn==null?void 0:Bn.studying)&&Mt.createElement("div",{className:`${Dt.movebq} user-path-items`,onClick:gr=>{gr.stopPropagation(),nn(Bn)}},Mt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Mt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ci=Bn==null?void 0:Bn.subject_tags)==null?void 0:Ci.map((gr,Or)=>{var Hr,jn;if(Or===0){const Wr=(Hr=Ft.find(ro=>ro.name==gr))==null?void 0:Hr.swimg;return Mt.createElement("img",{className:Dt.sign,src:Wr,style:{left:"-4px"}})}const Po=(jn=Ft.find(Wr=>Wr.name==gr))==null?void 0:jn.ptimg;return Mt.createElement("img",{className:Dt.sign,src:Po,style:{left:`${48+52*(Or-1)+2*Or}px`}})}),Mt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Bn==null?void 0:Bn.excellent)&&Mt.createElement("div",{className:Dt.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Mt.createElement("div",{className:Dt.name},Mt.createElement(je.Z,{title:zn&&(Bn!=null&&Bn.excellent_alias_name)?Mt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${En}`,Mt.createElement("br",null),Mt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Bn==null?void 0:Bn.excellent_alias_name}`)):En},Mt.createElement("span",{className:Dt.e},zn&&(Bn==null?void 0:Bn.excellent_alias_name)||En))),Mt.createElement(je.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Ni}`},Mt.createElement("div",{className:Dt.unit},Mt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Ni)),Mt.createElement("div",{className:Dt.tags},Mt.createElement("div",null,Mt.createElement(je.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Mt.createElement("span",null,Mt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Mt.createElement("span",null,Bn.stages_count))),Mt.createElement(je.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Mt.createElement("span",null,Mt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Mt.createElement("span",null,Bn.members_count)))))))})),!$n.length&&Mt.createElement(rt.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"},Pn="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",xn=me(59301),qt=({className:ei,dataSource:$n=[],col:zt=4,right:Vt,bottom:Qe=23,precision:an=0,wrapWidth:dn=1200,trackEventItems:Nt,loading:dt,handleVery:nn=()=>!0})=>{const vn=Math.floor((dn-(zt-1)*Vt)/zt);return xn.createElement(Ne.Z,{spinning:dt},xn.createElement("div",{className:bt()(Rt.list,ei)},!!$n.length&&$n.map((zn,qn)=>{const{subject_identifier:Ft,id:Bn,identifier:Kn,power:Ci}=zn,En=zn.is_public!=0&&zn.is_public;return xn.createElement("div",{className:Rt.wrap,key:Bn,style:{width:vn,marginRight:(1+qn)%zt===0?0:Vt+an,marginBottom:Qe}},xn.createElement("a",{className:Rt.li,onClick:un=>{un.preventDefault(),nn(zn==null?void 0:zn.first_category_url)&&(Nt&&(0,Xe.L9)([Nt]),(0,Xe.xg)(zn.first_category_url))}},xn.createElement("div",{className:Rt.top},xn.createElement(je.Z,{title:zn.name},xn.createElement("div",{className:Rt.name},zn.name)),xn.createElement("img",{className:Rt.img,src:Ye.Z.IMG_SERVER+"/images/"+zn.avatar_url}),xn.createElement("div",{className:Rt.text,title:zn.creator},zn.creator),Ft&&xn.createElement("div",{className:Rt.btns},xn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),xn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),En&&xn.createElement("div",{className:Rt.sign},"\u516C\u5F00")),xn.createElement("div",{className:Rt.bottom},zn.visits>0&&xn.createElement(je.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},xn.createElement("span",null,xn.createElement("i",{className:"iconfont icon-liulanyan"}),xn.createElement("span",null,zn.visits))),zn.course_members_count>0&&xn.createElement(je.Z,{title:"\u6210\u5458",placement:"bottom"},xn.createElement("span",null,xn.createElement("i",{className:"iconfont icon-chengyuan"}),zn.course_members_count)),zn.tasks_count>0&&xn.createElement(je.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},xn.createElement("span",null,xn.createElement("i",{className:"iconfont icon-zuoye"}),zn.tasks_count)),zn.is_end?xn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):xn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!zn.is_accessible&&xn.createElement("div",{className:Rt.lockWrap},xn.createElement("img",{src:`${Ye.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),xn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!$n.length&&xn.createElement(rt.Z,null)))},cn={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"},Gn=me(89070),Zn=({dataSource:ei=[],value:$n,onChange:zt,className:Vt,style:Qe={},tabBarExtraContent:an})=>le.createElement("div",{className:bt()(cn.tabs,Vt),style:Qe},le.createElement("div",{className:cn.tabsWrap},ei.map((dn,Nt)=>!(dn!=null&&dn.hide)&&le.createElement("aside",{className:cn.tab,onClick:()=>{zt(dn.id),dn.link&&Gn.history.push(dn.link)},key:Nt},le.createElement("div",{className:$n===dn.id?cn.active:""},dn.name),(dn==null?void 0:dn.resetCount)==null&&(dn==null?void 0:dn.total)!==void 0&&le.createElement("span",null,"\uFF08",dn==null?void 0:dn.total,"\uFF09"),(dn==null?void 0:dn.resetCount)!==void 0&&(dn==null?void 0:dn.total)!==void 0&&le.createElement(je.Z,{title:(dn==null?void 0:dn.tip)!=null?dn==null?void 0:dn.tip:""},le.createElement("span",{style:{color:"#9096A3"}},"\uFF08",le.createElement("span",{style:{color:"#000"}},dn==null?void 0:dn.resetCount),"/",le.createElement("span",null,dn==null?void 0:dn.total),"\uFF09"))))),le.createElement("div",{className:cn.tabBar},an)),Wn=({className:ei,style:$n={},children:zt})=>le.createElement("div",{className:bt()(ei),style:$n},zt),di={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"},Kt=me(38854),ln=me(20834);const $t=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ft=({sortValue:ei,dropValue:$n,className:zt,onSort:Vt,onDrop:Qe,dataSource:an=$t})=>{var dn;return le.createElement("div",{className:bt()(di.orderWrap,zt)},le.createElement(Kt.Z,{dropdownRender:()=>le.createElement(ln.default,null,an.map((Nt,dt)=>le.createElement(ln.default.Item,{key:dt,onClick:()=>Qe(Nt.id)},Nt.name)))},le.createElement("span",{className:di.orderTextWrap},(dn=an.find(Nt=>$n===Nt.id))==null?void 0:dn.name)),le.createElement("span",{className:di.orderIconWrap},le.createElement("span",{className:di.orderAsc},le.createElement("i",{className:ei==="asc"?`iconfont icon-sanjiaoxing-up font12 ${di.cursorPointer} ${di.active}`:`iconfont icon-sanjiaoxing-up font12 ${di.cursorPointer}`,onClick:()=>Vt(ei==="asc"?"desc":"asc")})),le.createElement("span",{className:di.orderDesc},le.createElement("i",{className:ei==="desc"?`iconfont icon-sanjiaoxing-down font12 ${di.cursorPointer} ${di.active}`:`iconfont icon-sanjiaoxing-down font12 ${di.cursorPointer}`,onClick:()=>Vt(ei==="asc"?"desc":"asc")}))))},$e={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"},Gt=me(3113),Ht=Object.defineProperty,ht=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,Pe=(ei,$n,zt)=>$n in ei?Ht(ei,$n,{enumerable:!0,configurable:!0,writable:!0,value:zt}):ei[$n]=zt,ye=(ei,$n)=>{for(var zt in $n||($n={}))at.call($n,zt)&&Pe(ei,zt,$n[zt]);if(ht)for(var zt of ht($n))Re.call($n,zt)&&Pe(ei,zt,$n[zt]);return ei},Oe=(ei,$n)=>{var zt={};for(var Vt in ei)at.call(ei,Vt)&&$n.indexOf(Vt)<0&&(zt[Vt]=ei[Vt]);if(ei!=null&&ht)for(var Vt of ht(ei))$n.indexOf(Vt)<0&&Re.call(ei,Vt)&&(zt[Vt]=ei[Vt]);return zt},Ke=(ei,$n,zt)=>new Promise((Vt,Qe)=>{var an=dt=>{try{Nt(zt.next(dt))}catch(nn){Qe(nn)}},dn=dt=>{try{Nt(zt.throw(dt))}catch(nn){Qe(nn)}},Nt=dt=>dt.done?Vt(dt.value):Promise.resolve(dt.value).then(an,dn);Nt((zt=zt.apply(ei,$n)).next())}),Et=ei=>{var $n=ei,{className:zt,style:Vt,children:Qe,loading:an=!1,openLoading:dn,onClick:Nt=()=>{},size:dt="middle",shape:nn="round"}=$n,vn=Oe($n,["className","style","children","loading","openLoading","onClick","size","shape"]);const[zn,qn]=(0,le.useState)(!1);return le.createElement(Gt.ZP,ye({onClick:(0,Pt.throttle)(Ft=>Ke(void 0,null,function*(){dn&&qn(!0);try{yield Nt(Ft)}catch(Bn){console.log("error",Bn)}dn&&qn(!1)}),2e3,{leading:!0,trailing:!1}),className:bt()($e.btn,$e[`${dt}-${nn}`],zt),style:Vt,size:dt,shape:nn,loading:zn||an},vn),Qe)},sn={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"},en=({className:ei,style:$n,children:zt=null,onClick:Vt,title:Qe})=>le.createElement("div",{className:bt()(sn.head,ei),style:$n},le.createElement("span",{className:"primary-hover",onClick:Vt},le.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),le.createElement("b",{title:Qe},Qe),le.createElement("div",{className:sn.node},zt)),wn={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"},Rn=({confirmShow:ei=!0,confirmTitle:$n,confirmClick:zt,cancelShow:Vt=!0,cancelTitle:Qe,cancelClick:an,className:dn,style:Nt,confirmLoading:dt=!1})=>le.createElement("div",{className:bt()(wn.btns,dn),style:Nt},ei&&le.createElement(Gt.ZP,{loading:dt,onClick:zt,type:"primary",className:wn.confirm},$n),Vt&&le.createElement(Gt.ZP,{onClick:an,className:wn.cancel},Qe)),Sn={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"},zi=({className:ei,style:$n={},LeftContent:zt,children:Vt,RightContent:Qe})=>le.createElement("div",{className:bt()(Sn.fixedBottom,ei),style:$n},le.createElement("div",{className:Sn.wrap},le.createElement("div",{className:Sn.left},zt),le.createElement("div",{className:Sn.center},Vt),le.createElement("div",{className:Sn.right},Qe))),Zi={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"},Nr=({className:ei,style:$n={},dataSource:zt=[]})=>le.createElement("div",{className:bt()(Zi.crumbs,ei),style:$n},zt.map((Vt,Qe)=>Qe<zt.length-1?le.createElement(le.Fragment,{key:Qe},Vt.path||Vt.onClick?le.createElement("span",{className:Zi.hover,onClick:Vt!=null&&Vt.onClick?Vt.onClick:()=>Gn.history.push(Vt.path)},Vt.name):le.createElement("span",null,Vt.name),le.createElement("span",null,"\xA0",">","\xA0")):le.createElement("span",{key:Qe,style:{color:"#5F6368"}},Vt.name))),pi=me(31797),li=Object.defineProperty,xi=Object.defineProperties,Gi=Object.getOwnPropertyDescriptors,Oi=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,Be=(ei,$n,zt)=>$n in ei?li(ei,$n,{enumerable:!0,configurable:!0,writable:!0,value:zt}):ei[$n]=zt,Fi=(ei,$n)=>{for(var zt in $n||($n={}))to.call($n,zt)&&Be(ei,zt,$n[zt]);if(Oi)for(var zt of Oi($n))eo.call($n,zt)&&Be(ei,zt,$n[zt]);return ei},wr=(ei,$n)=>xi(ei,Gi($n)),Fn=(ei,$n)=>{var zt={};for(var Vt in ei)to.call(ei,Vt)&&$n.indexOf(Vt)<0&&(zt[Vt]=ei[Vt]);if(ei!=null&&Oi)for(var Vt of Oi(ei))$n.indexOf(Vt)<0&&eo.call(ei,Vt)&&(zt[Vt]=ei[Vt]);return zt};const{Countdown:wi}=pi.default;var tr=ei=>{var $n=ei,{onChange:zt}=$n,Vt=Fn($n,["onChange"]);const[Qe,an]=(0,le.useState)(null);(0,le.useEffect)(()=>{typeof Qe=="number"&&Qe>=0&&zt(Qe)},[Qe]);const dn=Nt=>{const dt=Math.floor(Nt/1e3);an(dt)};return le.createElement(wi,wr(Fi({},Vt),{onChange:dn}))}},58856:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Te}});var le=me(59301);function Te(He,st){const We=(0,le.useRef)();(0,le.useEffect)(()=>{We.current=He}),(0,le.useEffect)(()=>{function ct(){We.current()}if(st!==null){let Me=setInterval(ct,st);return()=>clearInterval(Me)}},[st])}},74440:function(_n,yn,me){"use strict";me.d(yn,{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||{})},88264:function(_n,yn,me){"use strict";me.d(yn,{H7:function(){return te},MK:function(){return De},MU:function(){return Ge},X6:function(){return mt},bM:function(){return Pt},fi:function(){return ee},fu:function(){return bt},n4:function(){return ce},rX:function(){return yt},vl:function(){return se},zO:function(){return ut}});var le=me(99064),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ct=(he,ve,Ee)=>ve in he?Te(he,ve,{enumerable:!0,configurable:!0,writable:!0,value:Ee}):he[ve]=Ee,Me=(he,ve)=>{for(var Ee in ve||(ve={}))st.call(ve,Ee)&&ct(he,Ee,ve[Ee]);if(He)for(var Ee of He(ve))We.call(ve,Ee)&&ct(he,Ee,ve[Ee]);return he};function bt(he,ve){return(0,le.U2)(`myproblems/${he}.json`,Me({hidePopLogin:!0},ve||{}))}function Pt(he,ve){return(0,le.v_)(`myproblems/${he}/code_submit.json`,ve)}function Ge(he,ve){return(0,le.v_)(`myproblems/${he}/code_debug.json`,ve)}function ut(he,ve){return ve.language&&(ve.language=encodeURIComponent(ve.language)),(0,le.U2)(`myproblems/${he}/submit_records.json`,ve)}function mt(he){return(0,le.U2)("myproblems/record_detail.json",{id:he})}function yt(he,ve){return(0,le.U2)(`myproblems/${he}/result.json`,{mode:ve})}function De(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 ce(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)}},92744:function(_n,yn,me){"use strict";me.d(yn,{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),st=me(6848),We=me(3113),ct=me(43418),Me=me(5871),bt=me(8591),Pt=me(92832),Ge=me(28103),ut=me(24905),mt=me(95237),yt=me(43604),De=me(58421),te=me(60324),ee=Object.defineProperty,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(tn,Jt,Tn)=>Jt in tn?ee(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,Ee=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))se.call(Jt,Tn)&&ve(tn,Tn,Jt[Tn]);if(ce)for(var Tn of ce(Jt))he.call(Jt,Tn)&&ve(tn,Tn,Jt[Tn]);return tn};const Le=tn=>React.createElement("svg",Ee({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},tn),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 Ne="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",je=me(85149),ze=me(89070),Ye=me(955),Xe=me(99064),lt=Object.defineProperty,Ze=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Ot=(tn,Jt,Tn)=>Jt in tn?lt(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,wt=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))Lt.call(Jt,Tn)&&Ot(tn,Tn,Jt[Tn]);if(Ze)for(var Tn of Ze(Jt))rt.call(Jt,Tn)&&Ot(tn,Tn,Jt[Tn]);return tn};const Dt=tn=>React.createElement("svg",wt({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},tn),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=",Mt=Object.defineProperty,et=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Pn=(tn,Jt,Tn)=>Jt in tn?Mt(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,xn=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))Ue.call(Jt,Tn)&&Pn(tn,Tn,Jt[Tn]);if(et)for(var Tn of et(Jt))Rt.call(Jt,Tn)&&Pn(tn,Tn,Jt[Tn]);return tn};const _t=tn=>React.createElement("svg",xn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},tn),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 qt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",cn=me(42678),Gn=me(12290),gn=me(65158),Zn=me(10672),Ct={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"},Wn=me(59301),di=Object.defineProperty,Kt=Object.defineProperties,ln=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,$e=(tn,Jt,Tn)=>Jt in tn?di(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,Gt=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))Tt.call(Jt,Tn)&&$e(tn,Tn,Jt[Tn]);if($t)for(var Tn of $t(Jt))ft.call(Jt,Tn)&&$e(tn,Tn,Jt[Tn]);return tn},Ht=(tn,Jt)=>Kt(tn,ln(Jt)),ht=(tn,Jt)=>{var Tn={};for(var tt in tn)Tt.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&$t)for(var tt of $t(tn))Jt.indexOf(tt)<0&&ft.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const at=null,Re=(tn,Jt)=>{var Tn=tn,{globalSetting:tt,loading:rn,dispatch:sr,isEdit:Dr,editData:vr}=Tn,lr=ht(Tn,["globalSetting","loading","dispatch","isEdit","editData"]);const[Mi,Pr]=(0,le.useState)(""),[Qr,So]=(0,le.useState)(""),[hr,mr]=(0,le.useState)([]),[yr,ji]=(0,le.useState)(""),[ki,Zr]=(0,le.useState)(),[zo,br]=(0,le.useState)(!1),[Cr,Ir]=(0,le.useState)({}),[Tr,fr]=(0,le.useState)([]);(0,le.useEffect)(()=>{!vr||!Dr||(Pr(vr==null?void 0:vr.name),So(vr==null?void 0:vr.analysis),Zr(vr==null?void 0:vr.is_ordered),Ir(vr),br(!0))},[vr]),(0,le.useEffect)(()=>{if(!zo)return;const Mr=vr==null?void 0:vr.standard_answer.map(jo=>jo==null?void 0:jo.answer_text);mr(Mr);const _s=vr==null?void 0:vr.standard_answer.map(jo=>jo==null?void 0:jo.score);fr(_s),br(!1)},[zo]),(0,le.useImperativeHandle)(Jt,()=>({onSave:Aa,Clear:_o}));const Aa=()=>{let Mr=[],_s=!1;return Mi?(hr.forEach((jo,Hs)=>{Mr.push({position:Hs+1,answer_text:[],score:Tr[Hs]}),jo==null||jo.forEach((gl,rc)=>{Mr[Hs].answer_text.push(gl),(!gl||!(0,Ye.eR)(gl,1e4))&&(ji(`${Hs}-${rc}`),bt.ZP.info(gl?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),_s=!0)})}),_s?!1:(Mr==null?void 0:Mr.length)>20?(bt.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Mi,analysis:Qr,standard_answers:Mr,is_ordered:ki,downcase:Cr==null?void 0:Cr.downcase,no_space:Cr==null?void 0:Cr.no_space,use_blank_score:Cr==null?void 0:Cr.use_blank_score}):(bt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},_o=()=>{Pr(""),So(""),mr([]),Zr(!1)},xa=(Mr,_s,jo)=>{const Hs=hr.slice();if(_s&&Hs.splice(Mr,_s),jo)for(let gl=0;gl<jo;gl++)Hs.splice(Mr+gl,0,[""]);mr(Hs)},Wa=(Mr,_s,jo)=>{ji("");let Hs=hr.slice();Hs[Mr][_s]=jo,mr(Hs)},wo=Mr=>{let _s=hr.slice();_s[Mr]=[..._s[Mr],""],mr(_s)},Oa=(Mr,_s)=>{let jo=hr.slice();if(!jo[Mr][_s]){jo[Mr]=jo[Mr].filter((Hs,gl)=>gl!==_s),mr(jo);return}ct.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:Ct.modal,onOk:()=>{jo[Mr]=jo[Mr].filter((Hs,gl)=>gl!==_s),mr(jo)}})},El=Mr=>{ct.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:Ct.modal,onOk:()=>{let _s=hr.slice();_s=hr.filter((jo,Hs)=>Mr!==Hs),mr(_s)}})};return Wn.createElement("section",{className:Ct.wrap},Wn.createElement("p",{className:Ct.titleWrap},Wn.createElement("span",{className:Ct.required},"*"),Wn.createElement("span",{className:Ct.title},"\u9898\u5E72\uFF1A")),Wn.createElement("div",null,Wn.createElement(gn.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Mi,onChange:Mr=>Pr(Mr),showNullButton:!0,onPlaceholderChange:xa})),Wn.createElement("div",{className:"mt20"},hr.map((Mr,_s)=>Wn.createElement("div",{style:{display:"flex"}},Wn.createElement("div",{style:{flex:1}},Wn.createElement(Zn.Z,{key:_s,answers:Mr,index:_s,flex:1,is_md:!0,activeOptionErrorIndex:yr,onAnswerChange:Wa,addChildAnswer:wo,deleteChildAnswer:Oa,deleteChildAnswermain:El})),Cr.use_blank_score&&Wn.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},Wn.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",Wn.createElement(Me.Z,{style:{width:"100px"},size:"large",defaultValue:Tr[_s],onBlur:jo=>{Tr[_s]=jo.target.value,fr([...Tr])}}))))),Wn.createElement("div",null,Wn.createElement(ut.default,{className:`${Ct.color333} font14 mt20`,checked:Cr.use_blank_score,onChange:Mr=>Ir(Ht(Gt({},Cr),{use_blank_score:Mr.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),Wn.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")),Wn.createElement("div",null,Wn.createElement(ut.default,{className:`${Ct.color333} font14 mt20`,checked:Cr.downcase,onChange:Mr=>Ir(Ht(Gt({},Cr),{downcase:Mr.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Wn.createElement("div",null,Wn.createElement(ut.default,{className:`${Ct.color333} font14 mt20`,checked:Cr.no_space,onChange:Mr=>Ir(Ht(Gt({},Cr),{no_space:Mr.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),Wn.createElement("div",{className:"mt20"},(hr==null?void 0:hr.length)>1&&Wn.createElement("span",null,Wn.createElement(ut.default,{checked:ki,onChange:Mr=>Zr(Mr.target.checked),className:`${Ct.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),Wn.createElement("span",{className:`${Ct.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"))),Wn.createElement("p",{className:Ct.titleWrap},Wn.createElement("span",{className:Ct.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Wn.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Qr,onChange:Mr=>So(Mr)}))};var Pe=(0,ze.connect)(({loading:tn,globalSetting:Jt})=>({globalSetting:Jt,loading:tn.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Re)),ye=me(5112),Oe=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Et=(tn,Jt)=>{var Tn={};for(var tt in tn)Ke.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&Oe)for(var tt of Oe(tn))Jt.indexOf(tt)<0&&Fe.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const sn=null,pn=(tn,Jt)=>{var Tn=tn,{globalSetting:tt,loading:rn,editData:sr,dispatch:Dr,onRef:vr=()=>{},isEdit:lr}=Tn,Mi=Et(Tn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Pr,Qr]=(0,le.useState)(),[So,hr]=(0,le.useState)(""),[mr,yr]=(0,le.useState)("");(0,le.useEffect)(()=>{if(!sr||!lr)return;hr(sr==null?void 0:sr.name),yr(sr==null?void 0:sr.analysis);const Zr=sr==null?void 0:sr.choices.find(zo=>zo.is_answer);Qr(Zr.choice_text==="\u6B63\u786E"?"0":"1")},[sr]),(0,le.useImperativeHandle)(Jt,()=>({onSave:ji,Clear:ki}));const ji=()=>So?Pr?{name:So,choices:[{choice_text:"\u6B63\u786E",is_answer:Pr==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Pr==="1"?1:0}],analysis:mr}:(bt.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(bt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),ki=()=>{hr(""),yr(""),Qr("")};return le.createElement("section",{className:Ct.wrap},le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.required},"*"),le.createElement("span",{className:Ct.title},"\u9898\u5E72\uFF1A")),le.createElement(Gn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:So,onChange:Zr=>hr(Zr)}),le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.required},"*"),le.createElement("span",{className:Ct.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:Ct.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),le.createElement(ye.ZP.Group,{buttonStyle:"solid",value:Pr,onChange:Zr=>Qr(Zr.target.value)},le.createElement(ye.ZP.Button,{value:"0",className:`${Ct.radio} mr40`},"\u6B63\u786E"),le.createElement(ye.ZP.Button,{value:"1",className:Ct.radio},"\u9519\u8BEF")),le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:mr,onChange:Zr=>yr(Zr)}))};var en=(0,ze.connect)(({loading:tn,globalSetting:Jt})=>({globalSetting:Jt,loading:tn.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(pn)),wn=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,Sn=(tn,Jt)=>{var Tn={};for(var tt in tn)hi.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&wn)for(var tt of wn(tn))Jt.indexOf(tt)<0&&Rn.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const Pi=null,zi=(tn,Jt)=>{var Tn=tn,{globalSetting:tt,loading:rn,editData:sr,dispatch:Dr,onRef:vr=()=>{},isEdit:lr}=Tn,Mi=Sn(Tn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Pr,Qr]=(0,le.useState)([]);(0,le.useEffect)(()=>{var yr;if(!sr||!lr)return;const ji=(yr=sr==null?void 0:sr.shixun)==null?void 0:yr.challenges.map(ki=>({id:ki==null?void 0:ki.id,score:ki.score}));Qr(ji)},[sr]),(0,le.useImperativeHandle)(Jt,()=>({onSave:So,Clear:hr}));const So=()=>({challenges:[...Pr]}),hr=()=>{Qr([])};console.log("editData--",sr);const mr=yr=>{var ji,ki;return le.createElement("div",null,(ki=(ji=yr==null?void 0:yr.shixun)==null?void 0:ji.challenges)==null?void 0:ki.map((Zr,zo)=>{var br;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(st.Z,{key:zo,title:Zr==null?void 0:Zr.challenge_name},le.createElement("span",null,(0,Ye.Pq)(Zr==null?void 0:Zr.challenge_name,44)))),le.createElement("p",{style:{marginBottom:0}},le.createElement("span",{className:Ct.required},"*"),le.createElement("span",{className:Ct.title},"\u5206\u503C\uFF1A"),le.createElement(Me.Z,{precision:1,min:1,max:100,className:Ct.baseFormItem,style:{width:176},value:(br=Pr.find(Cr=>Cr.id===Zr.id))==null?void 0:br.score,onChange:Cr=>{Pr.find(Ir=>Ir.id===Zr.id).score=Cr,Qr([...Pr])}})))}),le.createElement("div",{style:{clear:"both"}}))};return le.createElement("section",{className:Ct.wrap},le.createElement(je.Z,{style:{paddingRight:10},className:Ct.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:Ct.required},"*"),le.createElement("span",{className:Ct.title},"\u5173\u5361")),mr(sr))};var Zi=(0,ze.connect)(({loading:tn,globalSetting:Jt})=>({globalSetting:Jt,loading:tn.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(zi)),ir=Object.getOwnPropertySymbols,Nr=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,li=(tn,Jt)=>{var Tn={};for(var tt in tn)Nr.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&ir)for(var tt of ir(tn))Jt.indexOf(tt)<0&&pi.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const xi=["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"],Gi=(tn,Jt)=>{var Tn=tn,{editData:tt,globalSetting:rn,loading:sr,dispatch:Dr,onRef:vr=()=>{},isEdit:lr}=Tn,Mi=li(Tn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Pr,Qr]=(0,le.useState)([]),[So,hr]=(0,le.useState)(),[mr,yr]=(0,le.useState)([]),[ji,ki]=(0,le.useState)(""),[Zr,zo]=(0,le.useState)("");(0,le.useEffect)(()=>{Qr(["","","",""])},[]),(0,le.useEffect)(()=>{if(!tt||!lr)return;ki(tt==null?void 0:tt.name),zo(tt==null?void 0:tt.analysis),Qr(tt==null?void 0:tt.choices.map(Tr=>Tr.choice_text));const Ir=[];tt==null||tt.choices.map((Tr,fr)=>{Tr.is_answer&&Ir.push(fr)}),yr(Ir)},[tt]),(0,le.useImperativeHandle)(Jt,()=>({onSave:br,Clear:Cr}));const br=()=>{if(!ji)return bt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Ir=Pr.findIndex(fr=>!fr);if(Ir>-1)return bt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${xi[Ir]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!mr.length)return bt.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(mr.length<2)return bt.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const Tr=Pr.map((fr,Aa)=>({choice_text:fr,is_answer:mr.includes(Aa)?1:0}));return{name:ji,choices:Tr,analysis:Zr}},Cr=()=>{Qr(["","","",""]),ki(""),zo(""),yr("")};return le.createElement("section",{className:Ct.wrap},le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.required},"*"),le.createElement("span",{className:Ct.title},"\u9898\u5E72\uFF1A")),le.createElement(Gn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:ji,onChange:Ir=>ki(Ir)}),le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.required},"*"),le.createElement("span",{className:Ct.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:Ct.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Pr.map((Ir,Tr)=>le.createElement("div",{className:Ct.choiceWrap,key:Tr},le.createElement(st.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${Ct.answer} ${mr.includes(Tr)?Ct.activeAnswer:""}`,onClick:()=>{mr.includes(Tr)?yr(mr.filter(fr=>fr!==Tr)):yr([...mr,Tr])}},xi[Tr])),le.createElement("div",{className:Ct.editorWrap},So===Tr?le.createElement(Gn.Z,{id:`single-question-option-${Tr}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ir,onChange:fr=>{Pr[Tr]=fr,Qr(Pr)}}):le.createElement("div",{className:Ct.htmlWrap,onClick:()=>hr(Tr)},le.createElement(je.Z,{value:Ir}))),Tr>1&&le.createElement(st.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${Ct.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Qr(Pr.filter((fr,Aa)=>Aa!==Tr)),mr.includes(Tr)?yr(mr.filter(fr=>fr!==Tr)):yr([...mr,Tr])}})),Tr<7&&Tr===Pr.length-1&&le.createElement(st.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${Ct.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Qr([...Pr,""])})))),le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Zr,onChange:Ir=>zo(Ir)}))};var Oi=(0,ze.connect)(({loading:tn,globalSetting:Jt})=>({globalSetting:Jt,loading:tn.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Gi)),to=Object.getOwnPropertySymbols,eo=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Fi=(tn,Jt)=>{var Tn={};for(var tt in tn)eo.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&to)for(var tt of to(tn))Jt.indexOf(tt)<0&&Be.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const wr=["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"],Fn=(tn,Jt)=>{var Tn=tn,{editData:tt,globalSetting:rn,loading:sr,dispatch:Dr,onRef:vr=()=>{},isEdit:lr}=Tn,Mi=Fi(Tn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Pr,Qr]=(0,le.useState)([]),[So,hr]=(0,le.useState)(),[mr,yr]=(0,le.useState)(),[ji,ki]=(0,le.useState)(""),[Zr,zo]=(0,le.useState)("");(0,le.useEffect)(()=>{Qr(["","","",""])},[]),(0,le.useEffect)(()=>{if(!tt||!lr)return;const Ir=[],Tr=[];tt==null||tt.choices.forEach((fr,Aa)=>{Ir.push(fr.choice_text),fr.is_answer&&Tr.push(Aa)}),ki(tt==null?void 0:tt.name),zo(tt==null?void 0:tt.analysis),Qr(Ir),yr(Tr)},[tt]),(0,le.useImperativeHandle)(Jt,()=>({onSave:br,Clear:Cr}));const br=()=>{if(!ji)return bt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Ir=Pr.findIndex(fr=>!fr);if(Ir>-1)return bt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${wr[Ir]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray(mr))return bt.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 Tr=Pr.map((fr,Aa)=>({choice_text:fr,is_answer:mr.includes(Aa)?1:0}));return{name:ji,choices:Tr,analysis:Zr}},Cr=()=>{Qr(["","","",""]),ki(""),zo(""),yr("")};return le.createElement("section",{className:Ct.wrap},le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.required},"*"),le.createElement("span",{className:Ct.title},"\u9898\u5E72\uFF1A")),le.createElement(Gn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:ji,onChange:Ir=>ki(Ir)}),le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.required},"*"),le.createElement("span",{className:Ct.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:Ct.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Pr.map((Ir,Tr)=>le.createElement("div",{className:Ct.choiceWrap,key:Tr},le.createElement(st.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${Ct.answer} ${mr!=null&&mr.includes(Tr)?Ct.activeAnswer:""}`,onClick:()=>yr([Tr])},wr[Tr])),le.createElement("div",{className:Ct.editorWrap},So===Tr?le.createElement(Gn.Z,{id:`single-question-option-${Tr}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Ir,onChange:fr=>{Pr[Tr]=fr,Qr(Pr)}}):le.createElement("div",{className:Ct.htmlWrap,onClick:()=>hr(Tr)},le.createElement(je.Z,{value:Ir}))),Tr>1&&le.createElement(st.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${Ct.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Qr(Pr.filter((fr,Aa)=>Aa!==Tr)),Tr===mr&&yr(null)}})),Tr<7&&Tr===Pr.length-1&&le.createElement(st.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${Ct.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Qr([...Pr,""])})))),le.createElement("p",{className:Ct.titleWrap},le.createElement("span",{className:Ct.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Zr,onChange:Ir=>zo(Ir)}))};var wi=(0,ze.connect)(({loading:tn,globalSetting:Jt})=>({globalSetting:Jt,loading:tn.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Fn)),$i=me(12563),tr=me(78673),ei=me(61485),$n=me(59301),zt=Object.defineProperty,Vt=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,an=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,dt=(tn,Jt,Tn)=>Jt in tn?zt(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,nn=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))dn.call(Jt,Tn)&&dt(tn,Tn,Jt[Tn]);if(an)for(var Tn of an(Jt))Nt.call(Jt,Tn)&&dt(tn,Tn,Jt[Tn]);return tn},vn=(tn,Jt)=>Vt(tn,Qe(Jt)),zn=(tn,Jt)=>{var Tn={};for(var tt in tn)dn.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&an)for(var tt of an(tn))Jt.indexOf(tt)<0&&Nt.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn},qn=(tn,Jt,Tn)=>new Promise((tt,rn)=>{var sr=lr=>{try{vr(Tn.next(lr))}catch(Mi){rn(Mi)}},Dr=lr=>{try{vr(Tn.throw(lr))}catch(Mi){rn(Mi)}},vr=lr=>lr.done?tt(lr.value):Promise.resolve(lr.value).then(sr,Dr);vr((Tn=Tn.apply(tn,Jt)).next())});const Ft=tn=>{if(!tn)return!1;if(/^s*$/.test(tn)||tn.trim()===""){bt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Jt=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 tn==="|"?(bt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Bn=({value:tn=[],onClose:Jt})=>$n.createElement($i.default,{closable:!0,onClose:Jt,className:Ct.keywordTag},$n.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},tn.join(" \u6216 "))),Kn=(tn,Jt)=>{var Tn=tn,{editData:tt,globalSetting:rn,loading:sr,dispatch:Dr,onRef:vr=()=>{},isEdit:lr}=Tn,Mi=zn(Tn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Pr,Qr]=(0,le.useState)(""),[So,hr]=(0,le.useState)(""),[mr,yr]=(0,le.useState)(""),[ji,ki]=(0,le.useState)(""),[Zr]=He.default.useForm(),zo=He.default.useWatch("use_keywords",Zr);(0,le.useEffect)(()=>{var Tr;!tt||!lr||(Qr(tt==null?void 0:tt.name),hr(tt==null?void 0:tt.analysis),yr((Tr=tt==null?void 0:tt.answer_texts)==null?void 0:Tr[0]),Zr.setFieldsValue(nn({},tt)))},[tt]),(0,le.useImperativeHandle)(Jt,()=>({onSave:br,Clear:Cr}));const br=()=>qn(void 0,null,function*(){if(!Pr)return bt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Zr.validateFields()}catch(fr){bt.ZP.error(fr.errorFields[0].errors[0]);return}const Tr=Zr.getFieldsValue();return console.log(Tr,"values"),nn({name:Pr,answer_texts:[mr],analysis:So},Tr)}),Cr=()=>{Qr(""),hr(""),yr(""),Zr.resetFields()},Ir=tt==null?void 0:tt.score;return $n.createElement("section",{className:Ct.wrap},$n.createElement("p",{className:Ct.titleWrap},$n.createElement("span",{className:Ct.required},"*"),$n.createElement("span",{className:Ct.title},"\u9898\u5E72\uFF1A")),$n.createElement(Gn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Pr,onChange:Tr=>Qr(Tr)}),$n.createElement("p",{className:Ct.titleWrap},$n.createElement("span",{className:Ct.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),$n.createElement(Gn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:mr,onChange:Tr=>yr(Tr)}),$n.createElement("p",{className:Ct.titleWrap},$n.createElement("span",{className:Ct.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),$n.createElement(Gn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:So,onChange:Tr=>hr(Tr)}),$n.createElement(He.default,{form:Zr,size:"large",onFinishFailed:Tr=>qn(void 0,null,function*(){var fr,Aa;bt.ZP.error(Tr.errorFields[0].errors[0]),Zr.scrollToField((Aa=(fr=Tr==null?void 0:Tr.errorFields)==null?void 0:fr[0])==null?void 0:Aa.name,{behavior:"smooth",block:"center"})})},$n.createElement(mt.Z,{align:"middle",className:"mb30 mt20"},$n.createElement(He.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},$n.createElement(tr.Z,null)),$n.createElement(yt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),$n.createElement(yt.Z,null,$n.createElement(st.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"},$n.createElement(ei.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),zo&&$n.createElement(He.default.List,{name:"keywords",rules:[{validator(Tr,fr){return fr!=null&&fr.length?(fr==null?void 0:fr.reduce((_o,xa)=>_o+xa.score,0))>parseFloat(Ir)?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"))}}]},(Tr,{add:fr,remove:Aa})=>$n.createElement($n.Fragment,null,$n.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),$n.createElement(mt.Z,{align:"middle",className:"font14 mb30"},$n.createElement(yt.Z,{flex:1},$n.createElement(Pt.default,{value:ji,onChange:_o=>{ki(_o.target.value)},maxLength:50,allowClear:!0,onPressEnter:_o=>{var xa,Wa,wo,Oa;const El=`${(xa=_o.target)==null?void 0:xa.value}`,Mr=(wo=(Wa=El==null?void 0:El.split("|"))==null?void 0:Wa.filter(Hs=>!!Hs))==null?void 0:wo.map(Hs=>Hs==null?void 0:Hs.trim()),_s=Zr.getFieldValue("keywords"),jo=((Oa=_s==null?void 0:_s.map(Hs=>Hs==null?void 0:Hs.keyword))==null?void 0:Oa.flat())||[];for(const Hs of Mr)if(jo.includes(Hs)){bt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Ft(El)&&(fr({keyword:Mr,score:1}),ki(""))},className:Ct.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"})),$n.createElement(yt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Tr.map(_o=>{var xa=_o,{key:Wa,name:wo}=xa,Oa=zn(xa,["key","name"]);return $n.createElement(mt.Z,{key:Wa,style:{marginRight:148}},$n.createElement(yt.Z,{flex:1},$n.createElement(mt.Z,{align:"middle",justify:"space-between"},$n.createElement(He.default.Item,vn(nn({},Oa),{name:[wo,"keyword"]}),$n.createElement(Bn,{onClose:()=>Aa(wo)})),$n.createElement(He.default.Item,vn(nn({},Oa),{name:[wo,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),$n.createElement(Me.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var Ci=(0,ze.connect)(({loading:tn,globalSetting:Jt})=>({globalSetting:Jt,loading:tn.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Kn)),En=me(36381),un={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"},bn=me(32134),Ei=me(12893),Ni=Object.defineProperty,mi=Object.defineProperties,Di=Object.getOwnPropertyDescriptors,Ai=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable,Hr=(tn,Jt,Tn)=>Jt in tn?Ni(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,jn=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))gr.call(Jt,Tn)&&Hr(tn,Tn,Jt[Tn]);if(Ai)for(var Tn of Ai(Jt))Or.call(Jt,Tn)&&Hr(tn,Tn,Jt[Tn]);return tn},Po=(tn,Jt)=>mi(tn,Di(Jt)),Wr=(tn,Jt)=>{var Tn={};for(var tt in tn)gr.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&Ai)for(var tt of Ai(tn))Jt.indexOf(tt)<0&&Or.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const ro=tn=>{var Jt=tn,{value:Tn,onChange:tt,scrollId:rn}=Jt,sr=Wr(Jt,["value","onChange","scrollId"]);return le.createElement("div",{id:rn||""},le.createElement(Gn.Z,Po(jn({},sr),{defaultValue:Tn,onChange:(Dr,vr)=>{vr!=null&&vr.length?tt(Dr,vr):tt(Dr)}})))},Mn=({value:tn,onChange:Jt,placeholder:Tn,height:tt=140,isEdit:rn})=>rn?le.createElement(Gn.Z,{watch:!0,isFocus:!0,height:tt,placeholder:Tn,defaultValue:tn,onChange:Jt}):le.createElement("div",{style:{cursor:"pointer"}},tn?le.createElement(je.Z,{className:un.inputBorder,value:tn}):le.createElement("div",{className:`${un.inputBorder} ${un.placeholder}`},Tn));var ii=me(59301),Hi=Object.defineProperty,xr=Object.defineProperties,qi=Object.getOwnPropertyDescriptors,pr=Object.getOwnPropertySymbols,Vr=Object.prototype.hasOwnProperty,jr=Object.prototype.propertyIsEnumerable,kr=(tn,Jt,Tn)=>Jt in tn?Hi(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,Kr=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))Vr.call(Jt,Tn)&&kr(tn,Tn,Jt[Tn]);if(pr)for(var Tn of pr(Jt))jr.call(Jt,Tn)&&kr(tn,Tn,Jt[Tn]);return tn},Yn=(tn,Jt)=>xr(tn,qi(Jt)),Ho=(tn,Jt)=>{var Tn={};for(var tt in tn)Vr.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&pr)for(var tt of pr(tn))Jt.indexOf(tt)<0&&jr.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const Xn=["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"],Ao=({value:tn,onChange:Jt,choiceTextKey:Tn,answerKey:tt,index:rn,isEdit:sr,setInputActive:Dr,form:vr,choiceOptionsPath:lr,allowChangeMode:Mi,showAddIcon:Pr,addItem:Qr,deleteItem:So})=>{const hr=(tn==null?void 0:tn[tt])===!0,mr=()=>{const ji=vr.getFieldValue(lr);vr.setFieldValue(lr,ji.map(ki=>Yn(Kr({},ki),{[tt]:!1})))},yr=()=>{hr?Jt(Yn(Kr({},tn),{[tt]:!1})):(Mi||mr(),Jt(Yn(Kr({},tn),{[tt]:!0})))};return ii.createElement(mt.Z,{className:un.choiceWrap,align:"middle",wrap:!1},ii.createElement(yt.Z,{onClick:yr,className:`${un.choiceIndex} ${hr?un.activeAnswer:""}`},Xn[rn]),ii.createElement(yt.Z,{flex:1,className:`${un.editorWrap} ml15`,onClick:Dr},ii.createElement(Mn,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:sr,value:tn==null?void 0:tn[Tn],onChange:ji=>{Jt(Yn(Kr({},tn),{[Tn]:ji}))}})),ii.createElement(yt.Z,{flex:"0 0 auto",className:"ml15"},ii.createElement("div",{onClick:yr,className:`${un.setAnswerBtn} ${hr?un.activeAnswer:""}`},hr?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),ii.createElement(yt.Z,{className:un.actionWrapper},ii.createElement(st.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ii.createElement(bn.Z,{className:un.addIcon,onClick:Qr,style:{visibility:Pr?"visible":"hidden"}})),ii.createElement(st.Z,{title:"\u5220\u9664"},ii.createElement(Ei.Z,{className:un.deleteIcon,onClick:So,style:{visibility:rn>1?"visible":"hidden"}}))))},Qo=({questionTitlePlaceholder:tn,titleKey:Jt,choiceKey:Tn,analysisKey:tt,choiceTextKey:rn,answerKey:sr,choiceOptionsPath:Dr,allowChangeMode:vr=!0,form:lr,showAnalysis:Mi=!0})=>{const[Pr,Qr]=(0,le.useState)(),[So,hr]=(0,le.useState)(!1);return ii.createElement("div",{className:un.wrap},ii.createElement("div",{className:un.questionTitleEditorWrap},ii.createElement(He.default.Item,{label:"\u9898\u5E72",name:Jt,labelCol:{span:24},rules:[{required:!0}]},ii.createElement(ro,{scrollId:Array.isArray(Jt)?Jt.join("_"):`${Jt}`,watch:!0,height:140,placeholder:tn}))),ii.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),ii.createElement(He.default.List,{name:Tn,rules:[{validator(mr,yr){const ji=yr.some(Zr=>Zr[sr]),ki=yr.findIndex(Zr=>{var zo;return((zo=Zr[rn])==null?void 0:zo.length)<=0});return ki!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Xn[ki]}\u9009\u9879\u7684\u5185\u5BB9`)):ji?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(mr,{add:yr,remove:ji})=>ii.createElement("div",{id:Array.isArray(Dr)?Dr.join("_"):`${Dr}`},mr.map((ki,Zr)=>{var zo=ki,{key:br,name:Cr}=zo,Ir=Ho(zo,["key","name"]);const Tr=Pr===br,fr=()=>{Qr(br)},Aa=Zr<7&&Zr===mr.length-1,_o=()=>yr({[rn]:"",[sr]:0}),xa=()=>ji(Cr);return ii.createElement(He.default.Item,Yn(Kr({},Ir),{key:br,name:Cr,noStyle:!0}),ii.createElement(Ao,{choiceTextKey:rn,answerKey:sr,index:Zr,isEdit:Tr,setInputActive:fr,form:lr,choiceOptionsPath:Dr,allowChangeMode:vr,showAddIcon:Aa,addItem:_o,deleteItem:xa}))}),mr.length<8&&ii.createElement("div",{className:`${un.addBtn} mb30`,onClick:()=>yr({[rn]:"",[sr]:0})},"\u6DFB\u52A0\u9009\u9879"))),Mi&&ii.createElement("div",{onClick:()=>hr(!0)},ii.createElement(He.default.Item,{name:tt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ii.createElement(Mn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:So}))))};var nr=me(59301),qo=Object.defineProperty,Go=Object.defineProperties,Br=Object.getOwnPropertyDescriptors,Er=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable,Ki=(tn,Jt,Tn)=>Jt in tn?qo(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,ot=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))mo.call(Jt,Tn)&&Ki(tn,Tn,Jt[Tn]);if(Er)for(var Tn of Er(Jt))Yo.call(Jt,Tn)&&Ki(tn,Tn,Jt[Tn]);return tn},sa=(tn,Jt)=>Go(tn,Br(Jt)),va=(tn,Jt)=>{var Tn={};for(var tt in tn)mo.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&Er)for(var tt of Er(tn))Jt.indexOf(tt)<0&&Yo.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const Ma=({value:tn,onChange:Jt})=>{const Tn=rn=>{ct.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:un.modal,onOk:()=>{const sr=[...tn];sr.splice(rn,1),Jt(sr)}})},tt=()=>{const rn=[...tn];rn.push(""),Jt(rn)};return nr.createElement(mt.Z,{align:"middle",className:"ml20",gutter:[40,20]},tn==null?void 0:tn.map((rn,sr)=>nr.createElement(yt.Z,{key:`${rn}_${sr}`,className:un.blankWrapper},nr.createElement(Pt.default,{className:un.blankInput,defaultValue:rn,maxLength:1e3,onBlur:Dr=>{const vr=[...tn],lr=Dr.target.value.trim();vr[sr]=lr,Jt(vr)}}),nr.createElement(st.Z,{title:"\u5220\u9664"},nr.createElement(Ei.Z,{className:un.deleteIcon,style:{marginLeft:15,visibility:sr>0?"visible":"hidden"},onClick:()=>Tn(sr)})))),nr.createElement(yt.Z,null,nr.createElement("div",{className:`${un.addBtn}`,onClick:()=>{tt()}},"\u65B0\u589E\u7B54\u6848")))},hs=({value:tn=!0,onChange:Jt})=>nr.createElement(tr.Z,{checked:!tn,onChange:Tn=>{Jt(!Tn)}}),Ga="\u2581",Lo=({questionTitlePlaceholder:tn,form:Jt,name:Tn,scoreByBlank:tt="use_blank_score",answerKey:rn,titleKey:sr="name",analysisKey:Dr="analysis",isOrdered:vr="is_ordered"})=>{var lr,Mi;const[Pr,Qr]=(0,le.useState)(!1),So=(br,Cr)=>{const Ir=Cr.line;let Tr=0;for(let Aa=0;Aa<Ir;Aa++)Tr+=br.getLine(Aa).split(Ga).length-1;const fr=br.getLine(Ir).substring(0,Cr.ch);return Tr+=fr.split(Ga).length-1,Tr},hr=(br,Cr,Ir,Tr)=>{const fr=br.getRange(Cr.from,Cr.to);let Aa=0;if(Cr.text.forEach(_o=>{Aa+=_o.split(Ga).length-1}),Cr.origin!=="setValue"){if(fr&&fr.indexOf(Ga)!==-1){const _o=fr.split(Ga).length-1,xa=So(br,Cr.from);if(console.log(`\u5220\u9664${_o}\u4E2A\uFF0C \u524D\u9762\u6709${xa}\u4E2A\uFF0C\u65B0\u589E${Aa}\u4E2A`),_o>1){const Wa=Array.from({length:_o},(wo,Oa)=>xa+Oa);Tr(Wa)}else Tr(xa)}else if(Aa>0){const _o=So(br,Cr.from);console.log(`\u65B0\u589E${Aa}\u4E2A\uFF0C\u4E4B\u524D\u6709${_o}\u4E2A`),Ir(Aa,_o)}}},mr=()=>{const br=Jt.getFieldValue(["sub_item_banks",...rn]);Jt.setFieldValue(["sub_item_banks",...rn],br==null?void 0:br.map((Cr,Ir)=>sa(ot({},Cr),{position:Ir+1})))},yr=(0,le.useRef)(),ji=(br,Cr)=>{for(let Ir=0;Ir<br;Ir++)yr.current({position:null,answer_text:[""]},Cr+Ir);mr()},ki=(0,le.useRef)(),Zr=br=>{ki.current(br),mr()},zo=(Mi=(lr=Jt.getFieldValue("sub_item_banks"))==null?void 0:lr[rn==null?void 0:rn[0]])==null?void 0:Mi[rn==null?void 0:rn[1]];return nr.createElement("div",{className:un.wrap},nr.createElement("div",{className:un.questionTitleEditorWrap},nr.createElement(He.default.Item,{label:"\u9898\u5E72",name:sr,labelCol:{span:24},rules:[{required:!0}]},nr.createElement(ro,{scrollId:"name",watch:!0,height:140,placeholder:tn,showNullButton:!0,onCMBeforeChange:(br,Cr)=>{hr(br,Cr,ji,Zr)}}))),nr.createElement(He.default.List,{name:rn,rules:[{validator(br,Cr){if((Cr==null?void 0:Cr.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Ir of Cr){const{answer_text:Tr}=Ir||{};if(Tr!=null&&Tr.some(fr=>(fr==null?void 0:fr.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(br,{add:Cr,remove:Ir},{errors:Tr})=>(yr.current=Cr,ki.current=Ir,nr.createElement(nr.Fragment,null,nr.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),br.map((fr,Aa)=>{var _o=fr,{key:xa,name:Wa}=_o,wo=va(_o,["key","name"]);return nr.createElement(mt.Z,{className:"mb20",key:xa,align:"middle",wrap:!1},nr.createElement(yt.Z,{flex:"0 0 auto",className:`${un.blankIndex}`},"\u586B\u7A7A\u9879",Aa+1),nr.createElement(yt.Z,{flex:1},nr.createElement(mt.Z,{align:"top",justify:"space-between",wrap:!1},nr.createElement(yt.Z,null,nr.createElement(He.default.Item,sa(ot({},wo),{name:[Wa,"answer_text"],noStyle:!0}),nr.createElement(Ma,null))),(Jt==null?void 0:Jt.getFieldValue(["sub_item_banks",...tt]))&&nr.createElement(yt.Z,{flex:"224px"},nr.createElement(He.default.Item,sa(ot({},wo),{name:[Wa,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:un.blankInputNumberWrapper}),nr.createElement(Me.Z,{className:un.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),nr.createElement(He.default.Item,sa(ot({},wo),{name:[Wa,"position"],noStyle:!0}),nr.createElement(Pt.default,{type:"hidden"}))))})))),nr.createElement(mt.Z,{align:"middle"},nr.createElement(He.default.Item,{name:[Tn,"downcase"],valuePropName:"checked"},nr.createElement(tr.Z,null)),nr.createElement(yt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),nr.createElement(mt.Z,{align:"middle"},nr.createElement(He.default.Item,{name:[Tn,"no_space"],valuePropName:"checked"},nr.createElement(tr.Z,null)),nr.createElement(yt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(zo==null?void 0:zo.length)>1&&nr.createElement(mt.Z,{align:"middle",className:(zo==null?void 0:zo.length)>1?"mb30":`${un.hide}`},nr.createElement(He.default.Item,{name:vr},nr.createElement(hs,null)),nr.createElement(yt.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")),nr.createElement("div",{onClick:()=>Qr(!0)},nr.createElement(He.default.Item,{name:Dr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},nr.createElement(Mn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Pr}))))};var po=Object.defineProperty,la=Object.defineProperties,Eo=Object.getOwnPropertyDescriptors,Na=Object.getOwnPropertySymbols,os=Object.prototype.hasOwnProperty,xo=Object.prototype.propertyIsEnumerable,Yr=(tn,Jt,Tn)=>Jt in tn?po(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,vi=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))os.call(Jt,Tn)&&Yr(tn,Tn,Jt[Tn]);if(Na)for(var Tn of Na(Jt))xo.call(Jt,Tn)&&Yr(tn,Tn,Jt[Tn]);return tn},no=(tn,Jt)=>la(tn,Eo(Jt)),io=(tn,Jt)=>{var Tn={};for(var tt in tn)os.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&Na)for(var tt of Na(tn))Jt.indexOf(tt)<0&&xo.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const Ja={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Ca=({value:tn,onChange:Jt,form:Tn,choiceKey:tt})=>{const rn=(tn==null?void 0:tn.is_answer)===!0,sr=tn==null?void 0:tn.choice_text,Dr=()=>{var vr;const lr=(vr=Tn==null?void 0:Tn.getFieldValue(["sub_item_banks",...tt]))==null?void 0:vr.map(Mi=>({choice_text:Mi==null?void 0:Mi.choice_text,is_answer:!1}));Tn==null||Tn.setFieldValue(["sub_item_banks",...tt],lr),Jt(no(vi({},tn),{is_answer:!0}))};return le.createElement(mt.Z,{className:un.choiceWrap,align:"middle",wrap:!1},le.createElement(yt.Z,{onClick:Dr,className:`${un.choiceIndex} ${un.judgementIndex} ${rn?un.activeAnswer:""}`},Ja[sr]),le.createElement(yt.Z,{flex:1,className:`${un.editorWrap} ml15`},le.createElement("div",{className:`${un.inputBorder} ${un.placeholder} ${rn?un.activeJudgementAnswer:""}`},sr)),le.createElement(yt.Z,{flex:"0 0 auto",className:"ml15"},le.createElement("div",{onClick:Dr,className:`${un.setAnswerBtn} ${rn?un.activeAnswer:""}`},rn?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},fa=({questionTitlePlaceholder:tn,choiceKey:Jt="choices",form:Tn,titleKey:tt="name",analysisKey:rn="analysis"})=>{const[sr,Dr]=(0,le.useState)(!1);return le.createElement("div",{className:un.wrap},le.createElement("div",{className:un.questionTitleEditorWrap},le.createElement(He.default.Item,{label:"\u9898\u5E72",name:tt,labelCol:{span:24},rules:[{required:!0}]},le.createElement(ro,{scrollId:"name",watch:!0,height:140,placeholder:tn}))),le.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},le.createElement(He.default.List,{name:Jt,rules:[{validator(vr,lr){return lr.some(Pr=>(Pr==null?void 0:Pr.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},vr=>le.createElement("div",{id:"choices"},vr.map(lr=>{var Mi=lr,{key:Pr,name:Qr}=Mi,So=io(Mi,["key","name"]);return le.createElement(He.default.Item,no(vi({},So),{key:Pr,name:Qr,noStyle:!0}),le.createElement(Ca,{form:Tn,choiceKey:Jt}))})))),le.createElement("div",{onClick:()=>Dr(!0)},le.createElement(He.default.Item,{name:rn,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Mn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:sr}))))};var $a=Object.defineProperty,Qa=Object.defineProperties,Es=Object.getOwnPropertyDescriptors,ys=Object.getOwnPropertySymbols,Zs=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable,Ss=(tn,Jt,Tn)=>Jt in tn?$a(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,ra=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))Zs.call(Jt,Tn)&&Ss(tn,Tn,Jt[Tn]);if(ys)for(var Tn of ys(Jt))Dn.call(Jt,Tn)&&Ss(tn,Tn,Jt[Tn]);return tn},hl=(tn,Jt)=>Qa(tn,Es(Jt)),Ol=(tn,Jt)=>{var Tn={};for(var tt in tn)Zs.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&ys)for(var tt of ys(tn))Jt.indexOf(tt)<0&&Dn.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn};const ns=tn=>{var Jt=tn,{value:Tn,onChange:tt}=Jt,rn=Ol(Jt,["value","onChange"]);const sr=Dr=>{tt([Dr])};return le.createElement(Gn.Z,hl(ra({},rn),{defaultValue:Tn==null?void 0:Tn[0],onChange:sr}))},yu=tn=>{if(!tn)return!1;let Jt=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 tn==="|"?(bt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},eu=({value:tn=[],onClose:Jt})=>le.createElement($i.default,{closable:!0,onClose:Jt,className:un.keywordTag},tn==null?void 0:tn.join(" \u6216 ")),ps=({questionTitlePlaceholder:tn,form:Jt,showKeywords:Tn,isMustKeyWords:tt=Tn,titleKey:rn="name",analysisKey:sr="analysis",answerTexts:Dr="answer_texts",keywords:vr="keywords",useKeywords:lr="use_keywords",indexs:Mi})=>{const[Pr,Qr]=(0,le.useState)(!1),[So,hr]=(0,le.useState)(""),mr=He.default.useWatch("sub_item_banks",Jt),{use_keywords:yr,score:ji}=(mr==null?void 0:mr[Mi])||{};return console.log(yr,ji,"itemValues"),le.createElement("div",{className:un.wrap},le.createElement("div",{className:un.questionTitleEditorWrap},le.createElement(He.default.Item,{label:"\u9898\u5E72",name:rn,labelCol:{span:24},rules:[{required:!0}]},le.createElement(ro,{scrollId:"name",watch:!0,height:140,placeholder:tn}))),le.createElement(He.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:Dr,labelCol:{span:24}},le.createElement(ns,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Tn&&!tt&&le.createElement(He.default.Item,{hidden:!0,name:lr,valuePropName:"checked"},le.createElement(tr.Z,{defaultChecked:!0})),Tn&&tt&&le.createElement(mt.Z,{align:"middle",className:"mb30"},le.createElement(He.default.Item,{name:lr,valuePropName:"checked"},le.createElement(tr.Z,null)),le.createElement(yt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(yt.Z,null,le.createElement(st.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(ei.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(yr||!tt)&&le.createElement(He.default.List,{name:vr,rules:[{validator(ki,Zr){return tt?Zr!=null&&Zr.length?(Zr==null?void 0:Zr.reduce((br,Cr)=>br+Cr.score,0))>parseFloat(ji)?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()}}]},(ki,{add:Zr,remove:zo})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${un.title} mb10`},tt?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(mt.Z,{align:"middle",className:"font14 mb30"},le.createElement(yt.Z,{flex:1},le.createElement(Pt.default,{value:So,onChange:br=>{hr(br.target.value)},maxLength:50,allowClear:!0,onPressEnter:br=>{var Cr,Ir,Tr,fr;const Aa=`${(Cr=br.target)==null?void 0:Cr.value}`,_o=(Tr=(Ir=Aa==null?void 0:Aa.split("|"))==null?void 0:Ir.filter(wo=>!!wo))==null?void 0:Tr.map(wo=>wo==null?void 0:wo.trim()),xa=Jt.getFieldValue(["sub_item_banks",...vr]),Wa=((fr=xa==null?void 0:xa.map(wo=>wo==null?void 0:wo.keyword))==null?void 0:fr.flat())||[];for(const wo of _o)if(Wa.includes(wo)){bt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yu(Aa)&&(Zr({keyword:_o,score:1}),hr(""))},className:un.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(yt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),ki.map(br=>{var Cr=br,{key:Ir,name:Tr}=Cr,fr=Ol(Cr,["key","name"]);return le.createElement(mt.Z,{key:Ir,className:"mb20",style:{marginRight:148}},le.createElement(yt.Z,{flex:1},le.createElement(mt.Z,{align:"middle",justify:"space-between"},le.createElement(He.default.Item,hl(ra({},fr),{name:[Tr,"keyword"]}),le.createElement(eu,{onClose:()=>zo(Tr)})),tt&&le.createElement(He.default.Item,hl(ra({},fr),{name:[Tr,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:un.blankInputNumberWrapper}),le.createElement(Me.Z,{className:un.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>Qr(!0)},le.createElement(He.default.Item,{name:sr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Mn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Pr}))))};var Ba=me(59301),tu=Object.defineProperty,Do=Object.defineProperties,Ea=Object.getOwnPropertyDescriptors,ca=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,Rs=Object.prototype.propertyIsEnumerable,ls=(tn,Jt,Tn)=>Jt in tn?tu(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,sl=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))dr.call(Jt,Tn)&&ls(tn,Tn,Jt[Tn]);if(ca)for(var Tn of ca(Jt))Rs.call(Jt,Tn)&&ls(tn,Tn,Jt[Tn]);return tn},jl=(tn,Jt)=>Do(tn,Ea(Jt)),ou=(tn,Jt)=>{var Tn={};for(var tt in tn)dr.call(tn,tt)&&Jt.indexOf(tt)<0&&(Tn[tt]=tn[tt]);if(tn!=null&&ca)for(var tt of ca(tn))Jt.indexOf(tt)<0&&Rs.call(tn,tt)&&(Tn[tt]=tn[tt]);return Tn},Ji=(tn,Jt,Tn)=>new Promise((tt,rn)=>{var sr=lr=>{try{vr(Tn.next(lr))}catch(Mi){rn(Mi)}},Dr=lr=>{try{vr(Tn.throw(lr))}catch(Mi){rn(Mi)}},vr=lr=>lr.done?tt(lr.value):Promise.resolve(lr.value).then(sr,Dr);vr((Tn=Tn.apply(tn,Jt)).next())});const{Panel:Cs}=En.default,Us=null,$l=(tn,Jt)=>{var Tn=tn,{globalSetting:tt,loading:rn,dispatch:sr,editData:Dr,onRef:vr=()=>{},isEdit:lr}=Tn,Mi=ou(Tn,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[Pr,Qr]=(0,le.useState)(""),[So,hr]=(0,le.useState)([]),[mr]=He.default.useForm();(0,le.useEffect)(()=>{!Dr||!lr||(Qr(Dr==null?void 0:Dr.name),hr(Dr==null?void 0:Dr.sub_item_banks),mr.setFieldsValue(sl({},Dr)))},[Dr]),(0,le.useEffect)(()=>{hr(mr.getFieldValue("sub_item_banks"))},[He.default.useWatch("sub_item_banks",mr)]),(0,le.useImperativeHandle)(Jt,()=>({onSave:yr,Clear:ji}));const yr=()=>Ji(void 0,null,function*(){if(!Pr)return bt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield mr.validateFields()}catch(Ir){return console.log(Ir,"errInfo"),bt.ZP.error(Ir.errorFields[0].errors[0]),!1}const Cr=So.map(Ir=>sl({id:Ir.id>1?Ir.id:null},Ir));return{name:Pr,sub_item_banks:Cr}}),ji=()=>{Qr(""),hr([])},ki={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"},Zr=({value:Cr})=>Ba.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},Cr),[zo,br]=(0,le.useState)();return Ba.createElement("section",{className:Ct.wrap},Ba.createElement("p",{className:Ct.titleWrap},Ba.createElement("span",{className:Ct.required},"*"),Ba.createElement("span",{className:Ct.title},"\u9898\u5E72\uFF1A")),Ba.createElement(Gn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Pr,onChange:Cr=>Qr(Cr)}),Ba.createElement(He.default,{form:mr,autoComplete:"off"},Ba.createElement(He.default.List,{name:"sub_item_banks",rules:[{validator(Cr,Ir){return Ir?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Cr,{add:Ir,remove:Tr})=>{const fr=mr.getFieldValue("sub_item_banks");return Ba.createElement(Ba.Fragment,null,Ba.createElement(En.default,{className:Cr.length>0?Ct.collapseWrapper:"",bordered:!1,expandIcon:({isActive:Aa})=>Ba.createElement("i",{className:`iconfont icon-weizhankai ${Aa?Ct.open:Ct.close}`,style:{fontSize:14,transition:"all .2s"}})},Cr.map((Aa,_o)=>{var xa=Aa,{key:Wa,name:wo}=xa,Oa=ou(xa,["key","name"]),El,Mr,_s,jo,Hs,gl,rc,ad,Tc,oc,vc,as;return Ba.createElement(Cs,{className:Ct.panel,forceRender:!0,header:Ba.createElement("div",{className:Ct.panelHeader},"\u7B2C",_o+1,"\u5C0F\u9898",Ba.createElement("span",null,"\uFF08",ki[(El=fr==null?void 0:fr[wo])==null?void 0:El.item_type],"\uFF09")),extra:Ba.createElement(mt.Z,{align:"middle",onClick:du=>du.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Mr=fr==null?void 0:fr[wo])==null?void 0:Mr.item_type)=="completion"&&Ba.createElement(He.default.Item,jl(sl({},Oa),{name:[wo,"score"],className:Ct.blankInputNumberWrapper,style:{marginBottom:0}}),((_s=fr==null?void 0:fr[wo])==null?void 0:_s.item_type)=="completion"&&Ba.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Ba.createElement(Zr,{value:(jo=fr==null?void 0:fr[wo])==null?void 0:jo.score}),"\u5206")),((Hs=fr==null?void 0:fr[wo])==null?void 0:Hs.item_type)=="completion"&&Ba.createElement(Ba.Fragment,null,Ba.createElement(ye.ZP.Group,{defaultValue:(gl=fr==null?void 0:fr[wo])==null?void 0:gl.use_blank_score,className:Ct.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(mr.getFieldsValue()),mr==null||mr.setFieldValue(["sub_item_banks",wo,"use_blank_score"],(Rc=du==null?void 0:du.target)==null?void 0:Rc.value),br(new Date)}}),Ba.createElement(st.Z,{overlayInnerStyle:{width:460},title:Ba.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",Ba.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")},Ba.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Wa},Ba.createElement(He.default.Item,jl(sl({},Oa),{name:wo}),(((rc=fr==null?void 0:fr[wo])==null?void 0:rc.item_type)=="single"||((ad=fr==null?void 0:fr[wo])==null?void 0:ad.item_type)=="multiple")&&Ba.createElement(Qo,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Tc=fr==null?void 0:fr[wo])==null?void 0:Tc.item_type)!="single",form:mr,choiceKey:[wo,"choices"],titleKey:[wo,"name"],analysisKey:[wo,"analysis"],choiceOptionsPath:["sub_item_banks",wo,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((oc=fr==null?void 0:fr[wo])==null?void 0:oc.item_type)=="completion"&&Ba.createElement(Lo,{form:mr,name:wo,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[wo,"use_blank_score"],titleKey:[wo,"name"],analysisKey:[wo,"analysis"],isOrdered:[wo,"is_ordered"],answerKey:[wo,"standard_answer"],key:zo}),((vc=fr==null?void 0:fr[wo])==null?void 0:vc.item_type)=="judgement"&&Ba.createElement(fa,{form:mr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[wo,"name"],analysisKey:[wo,"analysis"],choiceKey:[wo,"choices"]}),((as=fr==null?void 0:fr[wo])==null?void 0:as.item_type)=="subjective"&&Ba.createElement(ps,{showKeywords:!0,form:mr,titleKey:[wo,"name"],analysisKey:[wo,"analysis"],answerTexts:[wo,"answer_texts"],useKeywords:[wo,"use_keywords"],keywords:[wo,"keywords"],indexs:wo,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var kl=(0,ze.connect)(({loading:tn,globalSetting:Jt})=>({globalSetting:Jt,loading:tn.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)($l)),Vl=me(6021),Oo=me(19842),ic=me(57809),zl=me(1710),Ln={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"},On=me(85057),ai=me(94860),Qi=me(92365),Vi=me(83312),Ri=me(8797),_i=me(32570),Li=({open:tn,onCancel:Jt,onOk:Tn})=>{const tt=(0,ai.g)(),[rn,sr,Dr,vr]=(0,Vi.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)(()=>{tn&&Dr({page:1,limit:10,type:0},!0).then(mr=>{(mr==null?void 0:mr.shixuns_count)===0&&Mi(!0)})},[tn]);const[Pr,Qr]=(0,le.useState)([]),[So,hr]=(0,le.useState)([]);return le.createElement(ct.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:tn,width:948,centered:!0,closable:!0,onCancel:Jt,onOk:()=>Tn(So),destroyOnClose:!0},le.createElement(mt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(yt.Z,null,le.createElement(Oo.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:tt,onChange:mr=>{Dr({page:1,discipline_id:mr==null?void 0:mr[0],sub_discipline_id:mr==null?void 0:mr[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:mr=>Dr({page:1,diff:mr})}),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:mr=>Dr({page:1,shixun_publish_status:mr})})),le.createElement(On.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:mr=>{Dr({keyword:mr,page:1})}})),lr?le.createElement("div",null,le.createElement(Ri.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,Ye.xg)("/shixuns")})):le.createElement(zl.default,{loading:sr,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(mr,yr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:yr!=null&&yr.high_resources_consume?Ln.title:"",title:mr||"--"},le.createElement(je.Z,{key:1,showLines:1,showTextOnly:!0,value:mr||"--"})),(yr==null?void 0:yr.high_resources_consume)&&le.createElement(_i.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(mr,yr,ji)=>le.createElement("span",null,mr||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(st.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement(ei.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(mr,yr,ji)=>le.createElement("span",null,mr||"- -")},{title:"\u64CD\u4F5C",render(mr,yr){const{title:ji,challenge_names:ki,author_name:Zr,identifier:zo,author_school_name:br,study_count:Cr}=yr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{ct.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:ji,style:{marginBottom:18}}),le.createElement("div",{className:Ln.challengeNameWrapper},ki.map((Ir,Tr)=>le.createElement("div",{className:Ln.challengeName,key:Tr},"\u7B2C",(0,Ye.EM)(Tr+1),"\u9898\xA0",Ir))),le.createElement(mt.Z,{className:Ln.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(yt.Z,{className:Ln.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:Ln.shixunInfo},Zr.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:Ln.shixunInfo},br),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:Ln.shixunInfo},Cr)),le.createElement(We.ZP,{type:"primary",className:Ln.btnToDetail,onClick:()=>(0,Ye.xg)(`/shixuns/${zo}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(yr==null?void 0:yr.shixun_tag_num)===1&&le.createElement("a",{target:"_blank",href:`/shixuns/${yr==null?void 0:yr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:vr==null?void 0:vr.items,rowSelection:{type:"radio",selectedRowKeys:Pr,preserveSelectedRowKeys:!0,getCheckboxProps:mr=>({disabled:mr.shixun_tag_num===1}),onChange(mr,yr){var ji,ki,Zr;console.log(mr),Qr(mr);const zo=[];for(const Cr of So)mr.includes(Cr.id)&&zo.push(Cr);const br=zo.map(Cr=>Cr.id);for(const Cr of yr)Cr&&mr.includes(Cr.id)&&!br.includes(Cr.id)&&zo.push({id:Cr.id,difficulty:Cr.level,identifier:Cr.identifier,name:Cr.name,real_name:(ji=Cr==null?void 0:Cr.author_name)==null?void 0:ji.split("\u3001")[0],school_name:Cr.author_school_name,challenge_names:Cr.challenge_names,challenges:(ki=Cr.challenge_names)==null?void 0:ki.map((Ir,Tr)=>({subject:Ir,id:Tr,score:5})),score:((Zr=Cr.challenge_names)==null?void 0:Zr.length)*5,study_count:Cr.study_count,challenges_count:Cr.challenges_count});hr(zo)}},pagination:{current:rn.page,pageSize:rn.limit,total:vr==null?void 0:vr.items_count,showTotal:mr=>le.createElement("span",null,"\u5171\xA0",le.createElement("span",{style:{color:"#165DFF"}},mr),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(mr,yr){Dr({page:mr,limit:yr})},size:"default"},scroll:{y:400}}))},ur=me(82438),zr=me(49692),ga=(tn,Jt,Tn)=>new Promise((tt,rn)=>{var sr=lr=>{try{vr(Tn.next(lr))}catch(Mi){rn(Mi)}},Dr=lr=>{try{vr(Tn.throw(lr))}catch(Mi){rn(Mi)}},vr=lr=>lr.done?tt(lr.value):Promise.resolve(lr.value).then(sr,Dr);vr((Tn=Tn.apply(tn,Jt)).next())}),Ua=({visible:tn,getdata:Jt,onCancel:Tn,onRandomExchange:tt,selectFromProblemSet:rn,questionParams:sr})=>{const[Dr,vr]=(0,le.useState)(!1),[lr,Mi]=(0,le.useState)(!1),[Pr,Qr]=(0,le.useState)({}),So=(0,ze.useParams)(),[hr,mr]=(0,le.useState)(),yr=(ji,ki)=>ga(void 0,null,function*(){Mi(!0);const Zr=yield(0,Xe.ZP)(`/api/exercises/${So.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:sr.id,item_bank_id:ji,shixuns_info:[{id:ji,is_copy:ki!=1,is_use:ki!=1}]}});Mi(!1),Zr!=null&&Zr.status||(bt.ZP.info("\u6362\u9898\u6210\u529F"),Tn(),Jt())});return le.createElement(ct.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:tn,onCancel:Tn,centered:!0,maskClosable:!0,footer:null},le.createElement(mt.Z,{justify:"center",className:"pb20"},le.createElement(Vl.Z,{onClick:tt},"\u968F\u673A\u66F4\u6362"),(sr==null?void 0:sr.type)!=="PRACTICAL"&&le.createElement(We.ZP,{style:{marginLeft:24},onClick:rn},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"),(sr==null?void 0:sr.type)==="PRACTICAL"&&le.createElement(We.ZP,{style:{marginLeft:24},onClick:()=>{vr(!0)}},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9")),le.createElement(Li,{open:Dr,onCancel:()=>vr(!1),onOk:ji=>ga(void 0,null,function*(){if(console.log("----selectedRows",ji,So),(ji==null?void 0:ji.length)<=0){bt.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let ki=ji==null?void 0:ji.map(zo=>zo==null?void 0:zo.id),Zr=yield(0,zr.Tr)({id:[...ki],course_id:So.coursesId,type:"shixun"});(Zr==null?void 0:Zr.student_count)===0?yr(ki==null?void 0:ki[0],1):(mr(ki),Qr(Zr)),vr(!1)})}),le.createElement(ur.Z,{resdata:Pr,type:"shixun",okloading:lr,oktext:(Pr==null?void 0:Pr.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:ji=>ga(void 0,null,function*(){yr(hr==null?void 0:hr[0],2)})}))},Va=me(94734),No=me(24334),Xr=me(69304),Bi=me(68042),Jr=me(14165),Vo=Object.defineProperty,ma=Object.defineProperties,ya=Object.getOwnPropertyDescriptors,bo=Object.getOwnPropertySymbols,oa=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Ar=(tn,Jt,Tn)=>Jt in tn?Vo(tn,Jt,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[Jt]=Tn,Da=(tn,Jt)=>{for(var Tn in Jt||(Jt={}))oa.call(Jt,Tn)&&Ar(tn,Tn,Jt[Tn]);if(bo)for(var Tn of bo(Jt))Io.call(Jt,Tn)&&Ar(tn,Tn,Jt[Tn]);return tn},Ha=(tn,Jt)=>ma(tn,ya(Jt)),La=(tn,Jt,Tn)=>new Promise((tt,rn)=>{var sr=lr=>{try{vr(Tn.next(lr))}catch(Mi){rn(Mi)}},Dr=lr=>{try{vr(Tn.throw(lr))}catch(Mi){rn(Mi)}},vr=lr=>lr.done?tt(lr.value):Promise.resolve(lr.value).then(sr,Dr);vr((Tn=Tn.apply(tn,Jt)).next())}),xu=({data:tn,submit:Jt,goBack:Tn,loading:tt,onTypeScore:rn,editPreview:sr=!1,onSkipExamination:Dr,selectValue:vr,onExchange:lr,getdata:Mi,handleMarkWrongQuestion:Pr})=>{var Qr,So,hr,mr,yr,ji,ki,Zr,zo,br,Cr;const Ir=(0,le.useRef)(),[Tr,fr]=(0,le.useState)(null),[Aa,_o]=(0,le.useState)(!1),[xa,Wa]=(0,le.useState)(!1),wo=(0,le.useRef)(),[Oa]=He.default.useForm(),El=(0,ze.useParams)(),[Mr,_s]=(0,le.useState)(!1);(0,le.useEffect)(()=>{_o(!0)},[]),(0,le.useEffect)(()=>{sr||(0,Ye.Dk)("\u8BD5\u5377\u9884\u89C8")},[sr]);const jo=["\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"},gl={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=ui=>{var fo;const Xa=[];return le.createElement(le.Fragment,null,le.createElement("aside",{className:Te.single},(fo=ui==null?void 0:ui.choices)==null?void 0:fo.map((it,qe)=>(it.is_answer&&Xa.push(Jr.k4[qe]),le.createElement("ul",{key:qe},le.createElement("li",null,Jr.k4[qe],"\u3001"),le.createElement("li",null,le.createElement(je.Z,{value:it.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",jo[ui.difficulty])),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:ui.analysis?ui.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:"),`${(ui==null?void 0:ui.discipline_name)||"--"}/${ui==null?void 0:ui.sub_discipline_name}`),le.createElement(st.Z,{title:ui==null?void 0:ui.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:"),ui==null?void 0:ui.tag_discipline_name)))))},ad=(ui,fo)=>{var Xa;const it=(Xa=ui==null?void 0:ui.standard_answer)==null?void 0:Xa.map((qe,Xt)=>{var Qt;return le.createElement("div",{key:Xt},`\u7B54\u6848\uFF08\u586B\u7A7A${qe==null?void 0:qe.position}\uFF09\uFF1A${(Qt=qe==null?void 0:qe.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,it)),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:ui.analysis?ui.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:"),fo?`${(fo==null?void 0:fo.discipline_name)||"--"}/${fo==null?void 0:fo.sub_discipline_name}`:`${(ui==null?void 0:ui.discipline_name)||"--"}/${ui==null?void 0:ui.sub_discipline_name}`),le.createElement(st.Z,{title:fo?fo==null?void 0:fo.tag_discipline_name:ui==null?void 0:ui.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:"),fo?fo==null?void 0:fo.tag_discipline_name:ui==null?void 0:ui.tag_discipline_name)))))},Tc=ui=>{var fo;const Xa=(fo=ui==null?void 0:ui.standard_answer)==null?void 0:fo.map((it,qe)=>le.createElement("div",{key:qe},`\u7B54\u6848\uFF08\u586B\u7A7A${(it==null?void 0:it.position)||(it==null?void 0:it.exercise_choice_id)}\uFF09\uFF1A${it==null?void 0:it.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:ui.analysis?ui.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:"),`${(ui==null?void 0:ui.discipline_name)||"--"}/${ui==null?void 0:ui.sub_discipline_name}`),le.createElement(st.Z,{title:ui==null?void 0:ui.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:"),ui==null?void 0:ui.tag_discipline_name)))))},oc=(ui,fo)=>{var Xa;return le.createElement("div",{className:Te.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Xa=ui==null?void 0:ui.answer_texts)==null?void 0:Xa[0]),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:ui.analysis?ui.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:"),fo?`${(fo==null?void 0:fo.discipline_name)||"--"}/${fo==null?void 0:fo.sub_discipline_name}`:`${(ui==null?void 0:ui.discipline_name)||"--"}/${ui==null?void 0:ui.sub_discipline_name}`),le.createElement(st.Z,{title:fo?fo==null?void 0:fo.tag_discipline_name:ui==null?void 0:ui.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:"),fo?fo==null?void 0:fo.tag_discipline_name:ui==null?void 0:ui.tag_discipline_name))))},vc=ui=>{var fo,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:(fo=ui==null?void 0:ui.program_attr)==null?void 0:fo.description})),le.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Xa=ui==null?void 0:ui.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:ui.analysis?ui.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:"),`${(ui==null?void 0:ui.discipline_name)||"--"}/${ui==null?void 0:ui.sub_discipline_name}`),le.createElement(st.Z,{title:ui==null?void 0:ui.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:"),ui==null?void 0:ui.tag_discipline_name))))},as=(ui,fo)=>{var Xa;return le.createElement("div",null,(Xa=ui==null?void 0:ui.sub_item_banks)==null?void 0:Xa.map((it,qe)=>{var Xt,Qt;const mn=[];return le.createElement(le.Fragment,null,le.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},fo+1+"."+(qe+1),"\uFF08",Hs[it.item_type]||gl[it.item_type],"\uFF09",it.name),(it.item_type=="SINGLE"||it.item_type=="MULTIPLE"||it.item_type=="JUDGMENT"||it.item_type=="single"||it.item_type=="multiple"||it.item_type=="judgement")&&le.createElement(le.Fragment,null,le.createElement("aside",{className:Te.single},(Xt=it==null?void 0:it.choices)==null?void 0:Xt.map((on,Un)=>(on.is_answer&&mn.push(Jr.k4[Un]),le.createElement("ul",{key:Un},le.createElement("li",null,Jr.k4[Un],"\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",mn.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",jo[it.difficulty])),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(je.Z,{value:it.analysis?it.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:"),`${(ui==null?void 0:ui.discipline_name)||"--"}/${ui==null?void 0:ui.sub_discipline_name}`),le.createElement(st.Z,{title:ui==null?void 0:ui.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:"),ui==null?void 0:ui.tag_discipline_name))))),(it.item_type=="COMPLETION"||it.item_type=="completion")&&ad(it,ui),(it.item_type=="SUBJECTIVE"||it.item_type=="subjective")&&oc(it,ui),((Qt=tn==null?void 0:tn.exam)==null?void 0:Qt.exercise_status)===3&&le.createElement("div",{className:"flex gap-20px mt20"},le.createElement(Xr.Z,{state:it==null?void 0:it.is_wrong,onClick:()=>{Pr==null||Pr({value:Ha(Da({},it),{question_id:it==null?void 0:it.id,question_score:it==null?void 0:it.score})})}}),it.item_type=="single"&&le.createElement(We.ZP,{style:{color:"#3061D0"},onClick:()=>{_d({value:it})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},du=ui=>{var fo,Xa,it;return le.createElement("div",{style:{marginTop:"12px"}},(Xa=(fo=ui==null?void 0:ui.shixun)==null?void 0:fo.challenges)==null?void 0:Xa.map((qe,Xt)=>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",Xt+1,"\u5173"),le.createElement(st.Z,{key:Xt,title:qe==null?void 0:qe.challenge_name},le.createElement("span",null,(0,Ye.Pq)(qe==null?void 0:qe.challenge_name,44)))),sr&&le.createElement("div",null,"\u5206\u503C\uFF1A",qe.score,"\u5206"))),le.createElement(ze.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(it=ui==null?void 0:ui.shixun)==null?void 0:it.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),le.createElement("div",{style:{clear:"both"}}))},Rc=ui=>{let fo=ui.questions_score/ui.questions_count;ct.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,ui==null?void 0:ui.name,"\uFF1A"),le.createElement(Me.Z,{min:0,precision:1,defaultValue:fo,onChange:Xa=>{fo=Xa}}),le.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){var Xa;if(!fo)return bt.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const it={type:ui==null?void 0:ui.type,score:fo,scoreTotal:Number((Xa=fo*ui.questions_count)==null?void 0:Xa.toFixed(1))};rn(it)})})},ac=()=>{let ui="";ct.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:cn.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(Pt.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:ui,onChange:fo=>{ui=fo.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){var fo;if(!ui)return bt.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Xa=[],it=[],qe=[],Xt=[];(fo=tn==null?void 0:tn.questionList)==null||fo.forEach(mn=>{var on;(on=mn.questions)==null||on.forEach(Un=>{let Hn=mn.questions_score/mn.questions_count;Hn=Hn&&Hn.toFixed(1),mn.type==="COMBINATION"&&qe.push({id:Un.id,sub_item_bank_ids:Un.sub_item_banks.map(Jn=>Jn.id)}),mn.type==="PRACTICAL"?Xt.push(Un.id):(Xa.push(Un.id),it.push(Hn))})}),console.log("-----",qe),yield Jt({item_bank_ids:Xa,item_bank_scores:it,name:ui,combination_item_banks:qe,shixun_ids:Xt})})})},Rd=(ui,fo,Xa,it)=>{var qe;const Xt=`${location.pathname}${location.search}`,Qt=(qe=it.questions)==null?void 0:qe.map(mn=>mn==null?void 0:mn.id);if(Xt.includes("exercise"))wo.current={id:ui,ids:Qt,type:fo,index:Xa},Wa(!0);else{let mn=ct.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*(){mn.update({cancelButtonProps:{disabled:!0}}),yield lr({single_question_id:ui,seleted_item_bank_ids:Qt},{type:fo,index:Xa}),mn.update({cancelButtonProps:{disabled:!1}}),bt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},au=ui=>{var fo;const Xa=(fo=ui.questions)==null?void 0:fo.map(Xt=>Xt==null?void 0:Xt.id),it=ui.name;let qe=ct.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${it}\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*(){qe.update({cancelButtonProps:{disabled:!0}}),yield lr({seleted_item_bank_ids:Xa},{type:ui.type}),qe.update({cancelButtonProps:{disabled:!1}}),bt.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${it}\u8BD5\u9898`)})})},su=()=>{let ui=ct.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*(){ui.update({cancelButtonProps:{disabled:!0}}),yield lr(),ui.update({cancelButtonProps:{disabled:!1}}),bt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},Wu=ui=>{console.log(ui,"key"),Dr(ui-1)},Au=(ui,fo)=>{var Xa,it;if(fo==="SINGLE")return le.createElement(le.Fragment,null,le.createElement(wi,{ref:Ir,editData:ui,isEdit:!0}),le.createElement(Ge.Z,null));if(fo==="MULTIPLE")return le.createElement(le.Fragment,null,le.createElement(Oi,{ref:Ir,editData:ui,isEdit:!0}),le.createElement(Ge.Z,null));if(fo==="JUDGMENT")return le.createElement(le.Fragment,null,le.createElement(en,{ref:Ir,editData:ui,isEdit:!0}),le.createElement(Ge.Z,null));if(fo==="COMPLETION")return le.createElement(le.Fragment,null,le.createElement(Pe,{ref:Ir,editData:ui,isEdit:!0}),le.createElement(Ge.Z,null));if(fo==="SUBJECTIVE")return le.createElement(le.Fragment,null,le.createElement(Ci,{ref:Ir,editData:ui,isEdit:!0}),le.createElement(Ge.Z,null));if(fo==="COMBINATION")return le.createElement(le.Fragment,null,le.createElement(kl,{ref:Ir,editData:ui,isEdit:!0}),le.createElement(Ge.Z,null));if(fo==="BPROGRAM")return le.createElement(le.Fragment,null,le.createElement(He.default,{form:Oa,style:{marginTop:20},onFinishFailed:qe=>{var Xt,Qt;qe.errorFields[0].name.includes("standard_answers")?bt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):bt.ZP.error(qe.errorFields[0].errors[0]),Oa.scrollToField((Qt=(Xt=qe==null?void 0:qe.errorFields)==null?void 0:Xt[0])==null?void 0:Qt.name,{behavior:"smooth",block:"center"})},onFinish:qe=>La(void 0,null,function*(){var Xt;let Qt=Ha(Da({question_score:ui.score},qe),{question_type:8,hack:Ha(Da({},qe.hack),{difficult:ui.program_attr.difficult}),hack_codes:Ha(Da({},qe.hack_codes),{code:No.Base64.encode((Xt=qe.hack_codes)==null?void 0:Xt.code)})});Mr&&(Qt.is_cover=1);const mn=yield(0,Xe.ZP)(`/api/exercise_questions/${ui.id}.json`,{method:"put",body:Qt});(mn==null?void 0:mn.status)===0&&(bt.ZP.success("\u7F16\u8F91\u6210\u529F"),Wu(vr+1)),fr(null)})},le.createElement(Va.tc,{form:Oa,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Xa=ui==null?void 0:ui.program_attr)==null?void 0:Xa.identifier,answerKey:"standard_answers"}),le.createElement(Ge.Z,null)));if(fo==="PROGRAM"&&ze.history.push(`/problems/${(it=ui==null?void 0:ui.program_attr)==null?void 0:it.identifier}/edit?type=exercises&express_id=${El.categoryId}&question_id=${ui==null?void 0:ui.id}&score=${ui==null?void 0:ui.score}&callback_url=${location.pathname}&select=${vr}&exercise=true`),fo==="PRACTICAL")return le.createElement(le.Fragment,null,le.createElement(Zi,{ref:Ir,editData:ui,isEdit:!0}),le.createElement(Ge.Z,null))},yc=(ui,fo)=>La(void 0,null,function*(){var Xa,it,qe,Xt,Qt,mn;const on=yield(Xa=Ir.current)==null?void 0:Xa.onSave();if(!on)return;const Un=Qn=>{const yi=Qn.map(Ui=>Ui.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(yi).size!==yi.length},Hn={question_score:fo.score,analysis:on.analysis};if(ui==="SINGLE"||ui==="MULTIPLE"||ui==="JUDGMENT"){if(ui!=="JUDGMENT"&&Un(on==null?void 0:on.choices)){bt.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const Qn=[],yi=[];Hn.question_type=ui==="JUDGMENT"?2:1,Hn.question_title=on==null?void 0:on.name,(it=on==null?void 0:on.choices)==null||it.forEach((or,Ui)=>{Qn.push(or.choice_text),or!=null&&or.is_answer&&yi.push(Ui+1)}),Hn.question_choices=Qn,Hn.standard_answers=yi}if(ui==="COMPLETION"){let Qn=(qe=on==null?void 0:on.standard_answers)==null?void 0:qe.map((Ui,Yi)=>(Ui==null?void 0:Ui.score)<=0?Yi+1:null).filter(Ui=>Ui!==null);if((Qn==null?void 0:Qn.length)>0)return bt.ZP.warning(`\u7B2C${Qn.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let yi=(Xt=on==null?void 0:on.standard_answers)==null?void 0:Xt.reduce((Ui,Yi)=>Ui+(Number(Yi==null?void 0:Yi.score)||0),0);if(parseFloat(yi.toFixed(2))!=(Hn==null?void 0:Hn.question_score))return bt.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;Hn.is_ordered=on.is_ordered,Hn.question_title=on==null?void 0:on.name,Hn.use_blank_score=on==null?void 0:on.use_blank_score,Hn.question_type=3;const or=[];(Qt=on==null?void 0:on.standard_answers)==null||Qt.forEach((Ui,Yi)=>{or.push({choice_id:Ui.position,answer_text:Ui.answer_text,score:Ui.score})}),Hn.standard_answers=or,Hn.downcase=on==null?void 0:on.downcase,Hn.no_space=on==null?void 0:on.no_space}if(ui==="SUBJECTIVE"&&(console.log("editorData"),console.log(on),Hn.question_title=on==null?void 0:on.name,Hn.question_type=4,Hn.answer_texts=on==null?void 0:on.answer_texts,Hn.use_keywords=on==null?void 0:on.use_keywords,Hn.keywords=on==null?void 0:on.keywords),ui==="COMBINATION"){Hn.question_title=on==null?void 0:on.name,Hn.question_type=7;try{Hn.sub_questions=(mn=on==null?void 0:on.sub_item_banks)==null?void 0:mn.map((Qn,yi)=>{var or,Ui,Yi;if((Qn==null?void 0:Qn.item_type)=="single"||(Qn==null?void 0:Qn.item_type)=="multiple"){if(Un(Qn==null?void 0:Qn.choices))throw new Error(`\u7B2C${yi+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const Ur=[],rr=[];return(or=Qn==null?void 0:Qn.choices)==null||or.forEach((Rr,_r)=>{Ur.push(Rr.choice_text),Rr!=null&&Rr.is_answer&&rr.push(_r+1)}),{id:Qn.id,question_id:Qn.id,question_title:Qn.name,difficulty:Qn.difficulty,question_type:(Qn==null?void 0:Qn.item_type)=="single"?0:(Qn==null?void 0:Qn.item_type)=="multiple"?1:2,question_choices:Ur,standard_answers:rr,analysis:Qn.analysis,question_score:Qn==null?void 0:Qn.score}}else if((Qn==null?void 0:Qn.item_type)=="completion"){let Ur=(Ui=Qn==null?void 0:Qn.standard_answer)==null?void 0:Ui.reduce((Rr,_r)=>Rr+(Number(_r==null?void 0:_r.score)||0),0);if(parseFloat(Ur.toFixed(2))!=(Qn==null?void 0:Qn.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(Yi=Qn==null?void 0:Qn.standard_answer)==null||Yi.forEach((Rr,_r)=>{rr.push({choice_id:Rr.position,answer_text:Rr.answer_text,score:Rr.score})}),{id:Qn.id,question_id:Qn.id,is_ordered:Qn.is_ordered,question_title:Qn.name,difficulty:Qn.difficulty,question_type:3,standard_answers:rr,use_blank_score:Qn.use_blank_score,analysis:Qn.analysis,downcase:Qn==null?void 0:Qn.downcase,no_space:Qn==null?void 0:Qn.no_space,question_score:Qn==null?void 0:Qn.score}}else if((Qn==null?void 0:Qn.item_type)=="subjective")return{id:Qn.id,question_id:Qn.id,question_title:Qn.name,question_type:4,difficulty:Qn.difficulty,answer_texts:Qn==null?void 0:Qn.answer_texts,analysis:Qn.analysis,question_score:Qn==null?void 0:Qn.score,use_keywords:Qn.use_keywords,keywords:Qn==null?void 0:Qn.keywords}})}catch(Qn){bt.ZP.warning(Qn.message);return}delete Hn.analysis}let Jn=!1;(fo==null?void 0:fo.is_my)===1&&(Jn=yield new Promise((yi,or)=>{ct.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)}})})),Jn&&(Hn.is_cover=1);const Si=ui!=="PRACTICAL"?yield(0,Xe.ZP)(`/api/exercise_questions/${fo.id}.json`,{method:"put",body:Hn}):yield(0,Xe.ZP)(`/api/exercise_questions/${fo.id}/update_shixun_score.json`,{method:"post",body:Da({},on)});(Si==null?void 0:Si.status)===0&&(bt.ZP.success("\u7F16\u8F91\u6210\u529F"),Wu(vr+1),fr(null))}),bd=()=>La(void 0,null,function*(){(0,ze.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,Xe.ZP)(`/api/exercises/${El.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield Dr(vr),bt.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,ze.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),_d=({value:ui}={})=>{var fo;const Xa=[];let it=[];const qe=(fo=ui==null?void 0:ui.choices)==null?void 0:fo.map((Qt,mn)=>{var on;const Un=mn+1;return Qt!=null&&Qt.is_answer&&(Xa.push(Un),it.push(Un)),{value:Un,label:le.createElement(je.Z,{className:"c-black font14",value:`${(on=Jr.k4)==null?void 0:on[mn]}. ${Qt==null?void 0:Qt.choice_text}`}),disabled:Qt==null?void 0:Qt.origin_standard_answer}}),Xt=ct.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 mn;return(mn=Jr.k4)==null?void 0:mn[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(ut.default.Group,{className:"flex-col mt20",options:qe,defaultValue:it,onChange:Qt=>{it=Qt}})),onOk:()=>La(void 0,null,function*(){const Qt=yield(0,Xe.ZP)(`/api/exercises/${El.categoryId}/questions/${ui==null?void 0:ui.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:it}});(Qt==null?void 0:Qt.status)===0&&(bt.ZP.success("\u4FEE\u6539\u6210\u529F"),Wu(vr+1))})})},Fd=(Qr=tn==null?void 0:tn.questionList)==null?void 0:Qr.reduce((ui,fo)=>ui+Number(fo.questions_score),0),ch=sr&&((So=tn==null?void 0:tn.exam)==null?void 0:So.exercise_status)!==1;return le.createElement("section",{className:Te.wrap},le.createElement("div",{id:"id_left_preview",className:Te.left,onMouseEnter:ui=>{const fo=document.getElementById("id_left_preview");fo.style.overflowY="auto"},onMouseLeave:ui=>{const fo=document.getElementById("id_left_preview");fo.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,tn==null?void 0:tn.all_questions_count)),le.createElement("div",{className:"mr30 ml30"},le.createElement("img",{src:qt}),le.createElement("span",null,"\u603B\u5206(\u5206)"),le.createElement("aside",null,Fd&&Fd.toFixed(1))),le.createElement("div",null,le.createElement("img",{src:Ne}),le.createElement("span",null,"\u65F6\u957F(\u5206)"),le.createElement("aside",null,((hr=tn==null?void 0:tn.exam)==null?void 0:hr.time)===-1||((mr=tn==null?void 0:tn.exam)==null?void 0:mr.time)===null?"\u4E0D\u9650":(yr=tn==null?void 0:tn.exam)==null?void 0:yr.time))),(ji=tn==null?void 0:tn.questionList)==null?void 0:ji.map((ui,fo)=>{var Xa;return le.createElement("div",{className:Te.list,key:fo},le.createElement("div",{className:Te.name},le.createElement("b",null),le.createElement("span",null,ui.name)),le.createElement("aside",null,le.createElement("div",null,"\u5171",le.createElement("span",{className:Te.b},ui.questions_count),"\u9898 ",le.createElement("span",{className:Te.l},"|"),"\u5171",le.createElement("span",{className:Te.r},ui.questions_score),"\u5206"),le.createElement("div",{className:Te.answerSheet},(Xa=ui==null?void 0:ui.questions)==null?void 0:Xa.map((it,qe)=>le.createElement("div",{onClick:()=>{const Xt=`Anchor_${it==null?void 0:it.id}`;let Qt=document.getElementById(Xt);Qt&&setTimeout(()=>Qt.scrollIntoView({block:"center",behavior:"smooth"}))},key:it==null?void 0:it.id,className:Te.tag},qe+1)))))})),le.createElement("div",{className:Te.right},le.createElement("div",{className:Te.examName,id:"examName"},le.createElement("div",{className:Te.name},le.createElement(st.Z,{title:(ki=tn==null?void 0:tn.exam)==null?void 0:ki.name,getPopupContainer:ui=>ui.parentNode},le.createElement("span",{className:Te.t},(Zr=tn==null?void 0:tn.exam)==null?void 0:Zr.name))),sr&&((zo=tn==null?void 0:tn.exam)==null?void 0:zo.exercise_status)===1&&le.createElement(On.op,{openLoading:!0,shape:"default",onClick:()=>{ct.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},(br=tn==null?void 0:tn.questionList)==null?void 0:br.map((ui,fo)=>{var Xa,it;return le.createElement(le.Fragment,{key:fo},le.createElement("div",{className:Te.head,style:fo===0?{border:0,marginTop:-16}:{}},le.createElement("div",{className:Te.name},le.createElement("b",null),le.createElement("span",null,ui.name)),le.createElement("div",{className:Te.so},"\u5171",le.createElement("span",{className:Te.b},ui.questions_count," "),"\u9898 ",ui.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Xa=ui==null?void 0:ui.questions)==null?void 0:Xa.map(qe=>{var Xt;return(Xt=qe==null?void 0:qe.sub_item_banks)==null?void 0:Xt.length}).reduce((qe,Xt)=>qe+Xt)}\u5C0F\u9898\uFF09`,le.createElement("span",{className:Te.l},"|"),"\u5171",le.createElement("span",{className:Te.r},ui.questions_score),"\u5206"),!sr&&le.createElement("div",{className:Te.btn},le.createElement(We.ZP,{onClick:()=>{Rc(ui)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),le.createElement(We.ZP,{onClick:()=>au(ui),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(it=ui==null?void 0:ui.questions)==null?void 0:it.map((qe,Xt)=>{var Qt,mn,on,Un;return Tr===(qe==null?void 0:qe.id)?le.createElement("div",{id:`Anchor_${qe==null?void 0:qe.id}`,className:Te.content,style:{padding:0,marginTop:24},key:qe==null?void 0:qe.id},le.createElement("div",{style:{float:"right",marginTop:`${(ui==null?void 0:ui.type)==="PRACTICAL"?"-2px":"-6px"}`}},le.createElement(We.ZP,{onClick:()=>fr(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),le.createElement(We.ZP,{onClick:()=>{yc(ui==null?void 0:ui.type,qe)},type:"primary"},"\u4FDD\u5B58")),Au(qe,ui.type)):le.createElement("div",{id:`Anchor_${qe==null?void 0:qe.id}`,className:Te.content,key:qe==null?void 0:qe.id},le.createElement("div",{className:Te.titleWrap},(qe==null?void 0:qe.item_type)==="bprogram"?le.createElement(je.Z,{style:{paddingRight:10},value:Xt+1+"\u3001"+((Qt=qe==null?void 0:qe.program_attr)==null?void 0:Qt.description)}):le.createElement(je.Z,{style:{paddingRight:10},className:Te.titleHtml,value:Xt+1+`\u3001${(qe==null?void 0:qe.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(qe==null?void 0:qe.name)}),sr&&le.createElement(We.ZP,{onClick:()=>{var Hn,Jn,Si;if(Tr){bt.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Oa.setFieldsValue({standard_answers:qe==null?void 0:qe.standard_answer,hack:Da(Da({},qe),qe==null?void 0:qe.program_attr),hack_codes:Ha(Da({},qe==null?void 0:qe.program_attr),{code:No.Base64.decode(((Hn=qe==null?void 0:qe.program_attr)==null?void 0:Hn.code)||"")}),hack_sets:Da({},(Jn=qe==null?void 0:qe.hack_sets)==null?void 0:Jn[0])}),(qe==null?void 0:qe.item_type)=="program"?ze.history.push(`/problems/newedit/${(Si=qe==null?void 0:qe.program_attr)==null?void 0:Si.identifier}?type=exercises&express_id=${El.categoryId}&question_id=${qe==null?void 0:qe.id}&score=${qe==null?void 0:qe.score}&exercise=true&callback_url=/classrooms/${El.coursesId}/exercise/${El.categoryId}/detail?random=true`):fr(qe==null?void 0:qe.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!ch&&le.createElement(We.ZP,{disabled:ch,className:"ml20",onClick:()=>Rd(qe==null?void 0:qe.id,ui.type,Xt,ui),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(qe==null?void 0:qe.item_type)==="bprogram"&&le.createElement(je.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:Te.titleHtml,value:No.Base64.decode(((mn=qe==null?void 0:qe.program_attr)==null?void 0:mn.code)||"")}),(ui.type==="SINGLE"||ui.type==="JUDGMENT"||ui.type==="MULTIPLE")&&rc(qe),ui.type==="COMPLETION"&&ad(qe),ui.type==="SUBJECTIVE"&&oc(qe),ui.type==="PROGRAM"&&vc(qe),ui.type==="BPROGRAM"&&Tc(qe),ui.type==="COMBINATION"&&as(qe,Xt),ui.type==="PRACTICAL"&&du(qe),le.createElement(mt.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},((on=tn==null?void 0:tn.exam)==null?void 0:on.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(ui.type)&&le.createElement(yt.Z,null,le.createElement(Xr.Z,{state:qe==null?void 0:qe.is_wrong,onClick:()=>{Pr==null||Pr({value:Ha(Da({},qe),{question_id:qe==null?void 0:qe.id,question_score:qe==null?void 0:qe.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(ui.type)&&(qe==null?void 0:qe.show_resubmit)&&le.createElement(yt.Z,null,le.createElement(Bi.C,{dataSource:Ha(Da({},qe),{question_id:qe==null?void 0:qe.id})})),((Un=tn==null?void 0:tn.exam)==null?void 0:Un.exercise_status)===3&&["SINGLE"].includes(ui.type)&&le.createElement(yt.Z,null,le.createElement(We.ZP,{style:{color:"#3061D0"},onClick:()=>{_d({value:qe})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),sr?le.createElement(On.vr,null,le.createElement(De.Z,{showTotal:Ye.rU,total:(Cr=tn==null?void 0:tn.exam)==null?void 0:Cr.total_num,pageSize:1,current:vr+1,showSizeChanger:!1,onChange:Wu,showQuickJumper:!1,hideOnSinglePage:!1})):le.createElement(On.vr,{LeftContent:le.createElement(On.op,{onClick:Tn,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:le.createElement(mt.Z,{align:"middle"},le.createElement(te.Z,{color:"#55575D",overlayClassName:Te.popover,open:Aa,getPopupContainer:ui=>ui==null?void 0:ui.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(On.op,{onMouseEnter:()=>_o(!0),onMouseLeave:()=>_o(!1),onClick:()=>ac(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),le.createElement(On.op,{shape:"default",type:"primary",onClick:()=>Jt(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),le.createElement(Ua,{visible:xa,questionParams:wo.current,getdata:Mi,onRandomExchange:()=>La(void 0,null,function*(){const ui=wo.current;yield lr({single_question_id:ui.id,seleted_item_bank_ids:ui.ids},{type:ui.type,index:ui.index}),Wa(!1)}),selectFromProblemSet:()=>{const ui=wo.current,fo=`${location.pathname}${location.search}`;fo.includes("exercise")&&ze.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${ui.id}&qtype=${ui.type}&exerciseid=${El.categoryId}&from=${fo}`)},onCancel:()=>{Wa(!1)}}))}},43794:function(_n,yn,me){"use strict";me.r(yn),me.d(yn,{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),st=me(78241),We=me(66104),ct=me(89070),Me=me(23367),bt=me(71418),Pt=me(92832),Ge=me(19842),ut=me(5112),mt=me(95237),yt=me(5871),De=me(3113),te=me(99064),ee=Object.defineProperty,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(Ln,On,ai)=>On in Ln?ee(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,Ee=(Ln,On)=>{for(var ai in On||(On={}))se.call(On,ai)&&ve(Ln,ai,On[ai]);if(ce)for(var ai of ce(On))he.call(On,ai)&&ve(Ln,ai,On[ai]);return Ln},Le=(Ln,On,ai)=>new Promise((Qi,Vi)=>{var Ri=Li=>{try{oi(ai.next(Li))}catch(ur){Vi(ur)}},_i=Li=>{try{oi(ai.throw(Li))}catch(ur){Vi(ur)}},oi=Li=>Li.done?Qi(Li.value):Promise.resolve(Li.value).then(Ri,_i);oi((ai=ai.apply(Ln,On)).next())});function Ne(Ln){return Le(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${Ln}/edit_random_exam_new.json`,{method:"get"})})}function je(Ln,On){return Le(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${Ln}/update_random_exam.json`,{method:"post",body:On})})}function ze(Ln){return Le(this,null,function*(){return(0,te.ZP)("/api/examination_banks/create_random_exam.json",{method:"post",body:Ln})})}function Ye(Ln){return Le(this,null,function*(){return(0,te.ZP)("/api/disciplines.json",{method:"get",params:Ln})})}function Xe(Ln){return Le(this,null,function*(){return(0,te.ZP)("/api/item_banks/item_difficulty_count.json",{method:"get",params:Ln})})}function lt(Ln,On){return Le(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${Ln}/set_item_type_score.json`,{method:"post",body:On})})}function Ze(Ln,On){return Le(this,null,function*(){return(0,te.ZP)(`/api/exercises/${Ln}/set_item_type_score.json`,{method:"post",body:On})})}function Lt(Ln,On){return Le(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${Ln}/delete_item_type.json`,{method:"post",body:On})})}function rt(Ln,On){return Le(this,null,function*(){return(0,te.ZP)(`/api/exercises/${Ln}/delete_item_type.json`,{method:"post",body:On})})}function Ot(Ln){return Le(this,null,function*(){return(0,te.ZP)("/api/examination_banks/preview_random_questions.json",{method:"post",body:Ln})})}function wt(Ln){return Le(this,null,function*(){return(0,te.ZP)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:Ln})})}function Dt(Ln){return Le(this,null,function*(){return(0,te.ZP)("/api/examination_banks/save_question_list.json",{method:"post",body:Ln})})}function Wt(Ln){return Le(this,null,function*(){return(0,te.ZP)(`/api/exercises/${Ln.categoryId}/edit.json`,{method:"get",params:Ee({},Ln)})})}var Mt=(Ln=>(Ln.OnlyFileFolder="1",Ln.OnlyKnowledge="2",Ln.OnlyDifficulty="3",Ln.FileFolderAndDiff="4",Ln.FileFolderAndKnowledge="5",Ln.KnowledgeAndDiff="6",Ln.All="7",Ln.Shixun="8",Ln))(Mt||{}),et=me(89392),Ue=Object.defineProperty,Rt=Object.defineProperties,Pn=Object.getOwnPropertyDescriptors,xn=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,qt=Object.prototype.propertyIsEnumerable,cn=(Ln,On,ai)=>On in Ln?Ue(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,Gn=(Ln,On)=>{for(var ai in On||(On={}))_t.call(On,ai)&&cn(Ln,ai,On[ai]);if(xn)for(var ai of xn(On))qt.call(On,ai)&&cn(Ln,ai,On[ai]);return Ln},gn=(Ln,On)=>Rt(Ln,Pn(On)),Zn=(Ln=>(Ln[Ln.FileFolder=1]="FileFolder",Ln[Ln.Difficulty=2]="Difficulty",Ln[Ln.Knowledge=3]="Knowledge",Ln))(Zn||{});const Ct=(0,le.createContext)(null),Wn={[Mt.OnlyFileFolder]:[1],[Mt.OnlyKnowledge]:[3],[Mt.OnlyDifficulty]:[2],[Mt.FileFolderAndDiff]:[1,2],[Mt.FileFolderAndKnowledge]:[1,3],[Mt.KnowledgeAndDiff]:[3,2],[Mt.All]:[3,2,1]},di=(Ln,On)=>{if(Ln.length!==On.length)return!1;for(const ai of On)if(!Ln.includes(ai))return!1;return!0},Kt=Ln=>{for(const[On,ai]of Object.entries(Wn))if(di(Ln,ai))return On},ln={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"},$t={1:{label:"\u7B80\u5355",color:"#46B70E"},2:{label:"\u9002\u4E2D",color:"#165DFF"},3:{label:"\u56F0\u96BE",color:"#EE6F1A"}},Tt=Ln=>Ln&&parseFloat(Ln.toFixed(1)),ft=(Ln,On)=>{var ai,Qi,Vi;switch(On.type){case"init":return On.payload;case"updateBaseInfo":return gn(Gn({},Ln),{examination_bank:On.payload});case"deleteQuestionType":{const{item_types:Ri}=Ln,_i=Ri.filter(oi=>oi.item_type!==On.payload);return Ln.examination_bank.question_count=Tt(_i.reduce((oi,Li)=>oi+Li.item_bank_count,0)),Ln.examination_bank.total_score=Tt(_i.reduce((oi,Li)=>oi+Li.total_score,0)),gn(Gn({},Ln),{item_types:_i})}case"setQuestionType":{const{item_types:Ri=[]}=Ln,_i=Ri.map(Li=>Li.item_type),oi=Ri.filter(Li=>On.payload.includes(Li.item_type));for(const Li of On.payload)_i.includes(Li)||(Li==="PRACTICAL"?oi.push({item_type:Li,contents:[],item_banks:[],item_bank_count:0,item_bank_num:0,item_type_text:ln[Li],random_rule_type:Mt.Shixun,score:0,total_score:0}):oi.push({item_type:Li,contents:[],item_bank_count:0,item_type_text:ln[Li],score:0,total_score:0}));return gn(Gn({},Ln),{item_types:oi})}case"updateItemTypes":return gn(Gn({},Ln),{item_types:On.payload});case"deleteRule":{const Ri=(0,et.cloneDeep)(Ln),_i=Ri.item_types.find(Li=>Li.item_type===On.payload.itemType),oi=_i.contents.find(Li=>Li.id===On.payload.id&&Li.is_share==On.payload.is_share);return _i.contents=_i.contents.filter(Li=>Li!==oi),((ai=_i.contents)==null?void 0:ai.length)===0&&(_i.random_rule_type=[]),_i.item_bank_count-=oi==null?void 0:oi.quanlity,Ri.examination_bank.question_count-=oi==null?void 0:oi.quanlity,_i.total_score-=(oi==null?void 0:oi.quanlity)*_i.score,Ri.examination_bank.total_score-=(oi==null?void 0:oi.quanlity)*_i.score,_i.total_score=Tt(_i.total_score),Ri.examination_bank.total_score=Tt(Ri.examination_bank.total_score),Ri.contents=_i.contents,Ri}case"changeQuestionNum":{const Ri=(0,et.cloneDeep)(Ln),_i=Ri.item_types.find(ga=>ga.item_type===On.payload.itemType),oi=(Qi=_i==null?void 0:_i.contents)==null?void 0:Qi.find(ga=>ga.id===On.payload.id);if(On.payload.itemType==="PRACTICAL")return On.payload.num&&(Ri.examination_bank.question_count=Ri.examination_bank.question_count-_i.item_bank_count+On.payload.num,Ri.examination_bank.total_score=Tt(Ri.examination_bank.total_score-_i.total_score+On.payload.num*_i.score)),On.payload.score&&(Ri.examination_bank.total_score=Tt(Ri.examination_bank.total_score-_i.total_score+On.payload.num*_i.score)),_i.item_bank_count=On.payload.num,_i.total_score=Tt(_i.item_bank_count*_i.score),Ri;Ri.examination_bank.question_count=Ri.examination_bank.question_count-(oi==null?void 0:oi.quanlity)+On.payload.num;const Li=_i.contents.find(ga=>ga.id===On.payload.id&&ga.teacher_group_id===On.payload.teacher_group_id);Li.quanlity=On.payload.num;let ur=0,zr=0;for(const ga of _i.contents)ur+=ga==null?void 0:ga.quanlity,zr+=(ga==null?void 0:ga.quanlity)*_i.score;return Ri.examination_bank.total_score=Tt(Ri.examination_bank.total_score-_i.total_score+zr),_i.item_bank_count=ur,_i.total_score=Tt(zr),Ri}case"changeQuestionScore":{const Ri=(0,et.cloneDeep)(Ln),_i=Ri.item_types.find(oi=>oi.item_type===On.payload.itemType);return _i.score=On.payload.score,_i.total_score=Tt(_i.item_bank_count*_i.score),Ri.examination_bank.total_score=Tt(Ri.item_types.reduce((oi,Li)=>oi+Li.total_score,0)),Ri}case"editRule":{const Ri=(0,et.cloneDeep)(Ln),_i=Ri.item_types.find(oi=>oi.item_type===On.payload.itemType);return _i.contents=On.payload.tableData.map(oi=>gn(Gn({},oi),{item_type:On.payload.itemType,random_rule_type:On.payload.randomRuleType})),_i.random_rule_type=On.payload.randomRuleType,_i.item_bank_count=_i.contents.reduce((oi,Li)=>oi+(Li==null?void 0:Li.quanlity),0),_i.score=_i.score||1,_i.total_score=Tt(_i.item_bank_count*_i.score),Ri.examination_bank.question_count=Ri.item_types.reduce((oi,Li)=>oi+Li.item_bank_count,0),Ri.examination_bank.total_score=Tt(Ri.item_types.reduce((oi,Li)=>oi+Li.total_score,0)),Ri}case"addShixun":{const Ri=(0,et.cloneDeep)(Ln),_i=Ri.item_types.find(oi=>oi.item_type==="PRACTICAL");return _i.item_banks=On.payload.shixunList,Ri.examination_bank.question_count=Ri.examination_bank.question_count+1,_i.item_bank_num=_i.item_banks.length,_i.item_bank_count=_i.item_bank_count||1,_i.score=_i.score||1,_i.total_score=_i.total_score||_i.score*_i.item_bank_count,Ri.examination_bank.total_score=(Vi=Ri==null?void 0:Ri.item_types)==null?void 0:Vi.map(oi=>oi.total_score).reduce((oi,Li)=>oi+Li),Ri}case"deleteShixunQuestion":{const Ri=(0,et.cloneDeep)(Ln),_i=Ri.item_types.find(oi=>oi.item_type==="PRACTICAL");return _i.item_banks=_i.item_banks.filter(oi=>oi.id!==On.payload.shixunId),_i.item_bank_num-=1,_i.item_bank_count>_i.item_bank_num&&(_i.item_bank_count-=1,_i.total_score-=_i.score,_i.total_score=Tt(_i.total_score)),Ri}}};var $e=me(86918),Gt=Object.defineProperty,Ht=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,ye=(Ln,On,ai)=>On in Ln?Gt(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,Oe=(Ln,On)=>{for(var ai in On||(On={}))Re.call(On,ai)&&ye(Ln,ai,On[ai]);if(at)for(var ai of at(On))Pe.call(On,ai)&&ye(Ln,ai,On[ai]);return Ln},Ke=(Ln,On)=>Ht(Ln,ht(On)),Fe=(Ln,On,ai)=>new Promise((Qi,Vi)=>{var Ri=Li=>{try{oi(ai.next(Li))}catch(ur){Vi(ur)}},_i=Li=>{try{oi(ai.throw(Li))}catch(ur){Vi(ur)}},oi=Li=>Li.done?Qi(Li.value):Promise.resolve(Li.value).then(Ri,_i);oi((ai=ai.apply(Ln,On)).next())}),sn=({courseOptions:Ln,setCurrentKey:On,loading:ai,form:Qi})=>{const{data:Vi,disabled:Ri,dispatch:_i}=(0,le.useContext)(Ct),oi=(0,ct.useParams)(),Li=(0,le.useRef)(!0),[ur,zr]=(0,le.useState)(!1),ga=(0,le.useMemo)(()=>{var $o,Ua,Va,No,Xr;if(!Ln.length||!Vi)return;const Bi=($o=Vi==null?void 0:Vi.examination_bank)==null?void 0:$o.sub_discipline_id,Jr=((Ua=Vi==null?void 0:Vi.examination_bank)==null?void 0:Ua.time)===-1?void 0:Li.current?oi.id?(Va=Vi==null?void 0:Vi.examination_bank)==null?void 0:Va.time:((No=Vi==null?void 0:Vi.examination_bank)==null?void 0:No.time)||60:(Xr=Vi==null?void 0:Vi.examination_bank)==null?void 0:Xr.time;Li.current=!1;let Vo=[];for(const ma of Ln)for(const ya of ma.children)ya.value===Bi&&(Vo=[ma.value,ya.value]);return Ke(Oe({},Vi.examination_bank),{time:Jr,course:Vo})},[Vi,Ln]);return(0,le.useEffect)(()=>{Qi.setFieldsValue(Oe({},ga))},[ga]),le.createElement(bt.Z,{spinning:ai,size:"large",style:{position:"fixed",maxHeight:"100vh"},className:"mt30"},le.createElement("div",{className:Te.formWrap},le.createElement(st.default,{form:Qi,autoComplete:"off",colon:!1,labelCol:{span:4},wrapperCol:{span:20},initialValues:ga||{difficulty:2,time:60},onValuesChange:($o,Ua)=>{const{course:Va=[]}=Ua,No=Ke(Oe({},Ua),{sub_discipline_id:Va[1]||0});_i({type:"updateBaseInfo",payload:No})}},le.createElement(st.default.Item,{name:"name",label:"\u8BD5\u5377\u540D\u79F0",className:Te.baseLineHeight,rules:[{required:!0,validator:($o,Ua)=>{var Va;return((Va=Ua==null?void 0:Ua.replaceAll(" ",""))==null?void 0:Va.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0")}}]},le.createElement(Pt.default,{maxLength:60,className:Te.baseFormItem,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",showCount:!0})),le.createElement(st.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"course",className:Te.baseLineHeight},le.createElement(Ge.Z,{className:Te.baseFormItem,disabled:Ri,size:"large",allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Ln,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(st.default.Item,{label:"\u96BE\u5EA6",name:"difficulty",className:Te.radioBtnWrapper,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},le.createElement(ut.ZP.Group,{disabled:Ri,className:Te.radiogroup},le.createElement(ut.ZP.Button,{className:Te.easy,value:1},"\u7B80\u5355"),le.createElement(ut.ZP.Button,{className:Te.medium,value:2},"\u9002\u4E2D"),le.createElement(ut.ZP.Button,{className:Te.hard,value:3},"\u56F0\u96BE"))),le.createElement(st.default.Item,{label:"\u7B54\u9898\u65F6\u957F",className:Te.baseLineHeight},le.createElement(mt.Z,{align:"middle"},le.createElement(st.default.Item,{name:"time",noStyle:!0},le.createElement(yt.Z,{className:Te.baseFormItem,min:1,disabled:Ri,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(st.default.Item,{label:"\u8BD5\u5377\u987B\u77E5",name:"exam_notes"},le.createElement(Pt.default.TextArea,{rows:6,disabled:Ri,maxLength:65535,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u987B\u77E5"})))),le.createElement("div",{className:Te.fixedBottom},le.createElement(De.ZP,{className:`${Te.cancelBtn} mr5`,onClick:()=>{oi.id||window.location.href.indexOf("randompaper")>-1?ct.history.push("/paperlibrary"):ct.history.push(`/classrooms/${oi.coursesId}/exercise`)}},"\u53D6\u6D88"),le.createElement(De.ZP,{className:`${Te.confirmBtn} ml15`,type:"primary",size:"large",onClick:()=>Fe(void 0,null,function*(){if(yield Qi.validateFields(),!oi.id&&!oi.coursesId){const $o=yield ze(Vi);$o.status===0&&(ct.history.replace(`/randompaper/edit/${$o==null?void 0:$o.examination_bank_id}?type=settings`),On("settings"))}else On("settings")})},"\u4E0B\u4E00\u6B65")),le.createElement($e.Z,{open:ur,onCancel:()=>{zr(!1)}}))},pn=me(43418),en=me(43604),wn={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"},hi=me(8797),Rn=me(85057),Sn=me(24905);const Pi=[{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 Zi=({open:Ln,onCancel:On,onOk:ai})=>{const{data:Qi,dispatch:Vi}=(0,le.useContext)(Ct);(0,le.useEffect)(()=>{if(Ln){const{item_types:oi}=Qi||{};_i(oi==null?void 0:oi.map(Li=>Li.item_type))}},[Ln,Qi]);const[Ri,_i]=(0,le.useState)([]);return le.createElement(pn.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:Ln,onCancel:On,onOk:()=>ai(Ri)},le.createElement(Sn.default.Group,{value:Ri,onChange:oi=>_i(oi)},le.createElement(mt.Z,{gutter:[0,20]},Pi.map(oi=>le.createElement(en.Z,{key:oi.value,span:6},le.createElement(Sn.default,{value:oi.value},oi.label))))))},ir=me(1710),Nr=Object.defineProperty,pi=Object.getOwnPropertySymbols,li=Object.prototype.hasOwnProperty,xi=Object.prototype.propertyIsEnumerable,Gi=(Ln,On,ai)=>On in Ln?Nr(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,Oi=(Ln,On)=>{for(var ai in On||(On={}))li.call(On,ai)&&Gi(Ln,ai,On[ai]);if(pi)for(var ai of pi(On))xi.call(On,ai)&&Gi(Ln,ai,On[ai]);return Ln},eo=({open:Ln,onCancel:On,onOk:ai})=>{const{data:Qi}=(0,le.useContext)(Ct),[Vi,Ri]=(0,le.useState)();console.log("--xxx-",Vi),(0,le.useEffect)(()=>{Ln&&Ri((0,et.cloneDeep)(Qi))},[Ln,Qi]);const _i=(0,le.useMemo)(()=>{var oi;let Li;return Li=(oi=Vi==null?void 0:Vi.item_types)==null?void 0:oi.map(ur=>ur.total_score).reduce((ur,zr)=>parseFloat(ur)+parseFloat(zr)),Li==null?void 0:Li.toFixed(1)},[Vi]);return Ln?le.createElement(pn.default,{title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C",open:Ln,width:640,centered:!0,closable:!0,onCancel:On,onOk:()=>{ai(Vi)}},le.createElement("div",{className:"c-black mb20"},"\u603B\u5206",le.createElement("span",{className:"ml10 c-light-primary"},_i)),le.createElement(ir.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(oi,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(yt.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 $o=Vi,Ua=$o.item_types.find(No=>No.item_type===zr);Ua.score=Number(ga);const Va=ga*Ua.item_bank_count;Ua.total_score=Va&&Number(Va.toFixed(1)),$o.examination_bank.total_score=$o.item_types.reduce((No,Xr)=>Number(No)+Number(Xr.total_score),0),Ri(Oi({},$o))}}),"\u5206")}}],className:wn.setScoreModalTable,dataSource:Vi==null?void 0:Vi.item_types,rowKey:"item_type",pagination:!1})):null},Be=me(99313),Fi=me(57809),wr=me(17574),Fn="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=",wi="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==",$i="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",tr="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==",ei={ruleCheckBox:"ruleCheckBox___Onj2f",folderAreaWrapper:"folderAreaWrapper___ut2mr",folderAreaHeader:"folderAreaHeader___fOIDA",folderWrapper:"folderWrapper___IpJ50",folderIcon:"folderIcon___zBoRM",shareFolderIcon:"shareFolderIcon____5s3p",treeNodeItem:"treeNodeItem___quqla",treeNodeDifficulty:"treeNodeDifficulty___en0gk"},$n=me(16149),zt=Object.defineProperty,Vt=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,an=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,dt=(Ln,On,ai)=>On in Ln?zt(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,nn=(Ln,On)=>{for(var ai in On||(On={}))dn.call(On,ai)&&dt(Ln,ai,On[ai]);if(an)for(var ai of an(On))Nt.call(On,ai)&&dt(Ln,ai,On[ai]);return Ln},vn=(Ln,On)=>Vt(Ln,Qe(On)),zn=(Ln,On,ai)=>new Promise((Qi,Vi)=>{var Ri=Li=>{try{oi(ai.next(Li))}catch(ur){Vi(ur)}},_i=Li=>{try{oi(ai.throw(Li))}catch(ur){Vi(ur)}},oi=Li=>Li.done?Qi(Li.value):Promise.resolve(Li.value).then(Ri,_i);oi((ai=ai.apply(Ln,On)).next())});const qn=(Ln,On,ai)=>Ln.map(Qi=>Qi.key===On?nn(nn({},Qi),ai):Qi.children?vn(nn({},Qi),{children:qn(Qi.children,On,ai)}):Qi),Ft={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3},Bn=(Ln,On,ai)=>Ln.map(Qi=>{var Vi;const Ri=Qi==null?void 0:Qi.tag_disciplines.map(oi=>{const Li=oi==null?void 0:oi.difficulty_count.map(ur=>({label:ur==null?void 0:ur.name,value:Ft[ur.name]}));return{title:Kt(On)===Mt.All&&Li.length>0?le.createElement(mt.Z,{justify:"space-between"},le.createElement(en.Z,null,`${oi.name}\uFF08${oi.child_count}\uFF09`),le.createElement(en.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"diffValue"]},le.createElement(Sn.default.Group,{style:{columnGap:12},options:Li})),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"diffNum"],initialValue:oi==null?void 0:oi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"extra"],initialValue:vn(nn({},Qi),{type:ai})},le.createElement("input",{type:"hidden"})))):`${oi.name}\uFF08${oi.child_count}\uFF09`,key:`${Qi.id}_${oi.id}`,name:oi.name,parentName:Qi.name,item_banks_count:oi.child_count,icon:null,isLeaf:!0,checkable:Kt(On)===Mt.FileFolderAndKnowledge,disableCheckbox:oi.child_count===0}}),_i=Qi==null?void 0:Qi.difficulty_count.map(oi=>({label:oi==null?void 0:oi.name,value:Ft[oi.name]}));return{title:Kt(On)===Mt.FileFolderAndDiff&&_i.length>0?le.createElement(mt.Z,{justify:"space-between"},le.createElement(en.Z,null,`${Qi.name}\uFF08${Qi.item_banks_count}\uFF09`),le.createElement(en.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}`,"diffValue"]},le.createElement(Sn.default.Group,{style:{columnGap:12},options:_i})),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}`,"diffNum"],initialValue:Qi==null?void 0:Qi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}`,"extra"],initialValue:vn(nn({},Qi),{type:ai})},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:oi=>oi.expanded?ai==="0"?le.createElement("img",{src:wi,className:ei.folderIcon}):le.createElement("img",{src:$i,className:ei.shareFolderIcon}):ai==="0"?le.createElement("img",{src:Fn,className:ei.folderIcon}):le.createElement("img",{src:tr,className:ei.shareFolderIcon}),isLeaf:!Qi.have_child&&!((Vi=Qi.tag_disciplines)!=null&&Vi.length),checkable:Kt(On)===Mt.OnlyFileFolder,disableCheckbox:Qi.item_banks_count===0,children:Qi.children.length?Kt(On)===Mt.All||Kt(On)===Mt.FileFolderAndKnowledge?[...Bn(Qi.children,On,ai),...Ri]:Bn(Qi.children,On,ai):[]}}),Kn=(Ln,On,ai)=>Ln.map(Qi=>{var Vi;const Ri=Qi==null?void 0:Qi.tag_disciplines.map(oi=>{console.log("tagItem:",oi);const Li=oi==null?void 0:oi.difficulty_count.map(ur=>({label:ur==null?void 0:ur.name,value:Ft[ur.name]}));return{title:Kt(On)===Mt.All&&Li.length>0?le.createElement(mt.Z,{justify:"space-between"},le.createElement(en.Z,null,`${oi.name}\uFF08${oi.child_count}\uFF09`),le.createElement(en.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"diffValue"]},le.createElement(Sn.default.Group,{style:{columnGap:12},options:Li})),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"diffNum"],initialValue:oi==null?void 0:oi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}_${oi.id}`,"extra"],initialValue:vn(nn({},Qi),{type:ai})},le.createElement("input",{type:"hidden"})))):`${oi.name}\uFF08${oi.child_count}\uFF09`,key:`${Qi.id}_${oi.id}`,name:oi.name,parentName:Qi.name,item_banks_count:oi.child_count,icon:null,isLeaf:!0,checkable:Kt(On)===Mt.FileFolderAndKnowledge,disableCheckbox:oi.child_count===0}}),_i=Qi==null?void 0:Qi.difficulty_count.map(oi=>({label:oi==null?void 0:oi.name,value:Ft[oi.name]}));return{title:Kt(On)===Mt.FileFolderAndDiff&&_i.length>0?le.createElement(mt.Z,{justify:"space-between"},le.createElement(en.Z,null,`${Qi.name}\uFF08${Qi.item_banks_count}\uFF09`),le.createElement(en.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}`,"diffValue"]},le.createElement(Sn.default.Group,{style:{columnGap:12},options:_i})),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}`,"diffNum"],initialValue:Qi==null?void 0:Qi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(st.default.Item,{noStyle:!0,name:[`${Qi.id}`,"extra"],initialValue:vn(nn({},Qi),{type:ai})},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:oi=>oi.expanded?ai==="0"?le.createElement("img",{src:wi,className:ei.folderIcon}):le.createElement("img",{src:$i,className:ei.shareFolderIcon}):ai==="0"?le.createElement("img",{src:Fn,className:ei.folderIcon}):le.createElement("img",{src:tr,className:ei.shareFolderIcon}),isLeaf:!Qi.have_child&&!((Vi=Qi.tag_disciplines)!=null&&Vi.length),checkable:Kt(On)===Mt.OnlyFileFolder,disableCheckbox:Qi.item_banks_count===0,children:[...Kn(Qi.children,On,ai),...Ri]}});var En=({ruleValue:Ln,defaultData:On,setSelectData:ai,currentItemType:Qi,selectData:Vi})=>{const[Ri,_i]=(0,le.useState)("1"),[oi,Li]=(0,le.useState)(!0),[ur]=st.default.useForm(),[zr,ga]=(0,le.useState)([]),[$o,Ua]=(0,le.useState)("all"),Va=(rn,sr,Dr)=>{const{checkedNodes:vr}=sr;console.log("type:",Dr,vr,Vi),Dr==="0"?(Xr(rn),Kt(Ln)===Mt.OnlyFileFolder?(ai(lr=>vn(nn({},lr),{my:vr.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(vr.reduce((lr,Mi)=>lr+Mi.item_banks_count,0))):(console.log(vr),ai(lr=>vn(nn({},lr),{my:vr.map(Mi=>{const[Pr,Qr]=Mi.key.split("_");return{id:Mi.key,tag_discipline_name:Mi.name,group_id:Pr,tag_discipline_id:Qr,folderType:"0",group_name:Mi.parentName,item_bank_num:Mi.item_banks_count,quanlity:1}})})),tt(vr.reduce((lr,Mi)=>lr+Mi.item_banks_count,0)))):(Jr(rn),Kt(Ln)===Mt.OnlyFileFolder?ai(lr=>(console.log("pre:",lr),vn(nn({},lr),{public:vr.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}))}))):ai(lr=>vn(nn({},lr),{public:vr.map(Mi=>{const[Pr,Qr]=Mi.key.split("_");return{id:Mi.key==="0"?"00":Mi.key,tag_discipline_name:Mi.name,teacher_group_id:Pr,tag_discipline_id:Qr,folderType:"3",teacher_group_name:Mi.parentName,item_bank_num:Mi.item_banks_count,quanlity:1}})})),tt(vr.reduce((lr,Mi)=>lr+Mi.item_banks_count,0)))},[No,Xr]=(0,le.useState)([]),[Bi,Jr]=(0,le.useState)([]),[Vo,ma]=(0,le.useState)([]),[ya,bo]=(0,le.useState)([]),[oa,Io]=(0,le.useState)([]),[Ar,Da]=(0,le.useState)([]),[Ha,La]=(0,le.useState)(!1),[fl,xu]=(0,le.useState)(!1);function tn(){return zn(this,null,function*(){let rn=yield(0,te.ZP)("/api/teach_group_shares.json",{method:"get"});rn&&ga(rn==null?void 0:rn.groups)})}(0,le.useEffect)(()=>{tn()},[]);const Jt=rn=>zn(void 0,null,function*(){var sr,Dr,vr,lr,Mi,Pr,Qr,So,hr,mr,yr,ji;rn.type==="0"?La(!0):xu(!0);const ki=yield(0,$n.ex)(rn);rn.type==="0"?La(!1):xu(!1),rn.type==="0"?Io(ki):Da(ki);const Zr=(sr=ki.navigation[0])==null?void 0:sr.difficulty_count.map(br=>({label:br==null?void 0:br.name,value:Ft[br.name]})),zo=(Dr=ki.navigation[0])==null?void 0:Dr.tag_disciplines.map(br=>{const Cr=br==null?void 0:br.difficulty_count.map(Ir=>({label:Ir==null?void 0:Ir.name,value:Ft[Ir.name]}));return{title:Kt(Ln)===Mt.All&&Cr.length>0?le.createElement(mt.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(en.Z,null,`${br.name}\uFF08${br.child_count}\uFF09`),le.createElement(en.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(st.default.Item,{noStyle:!0,name:[`0_${br.id}`,"diffValue"]},le.createElement(Sn.default.Group,{style:{columnGap:12},options:Cr})),le.createElement(st.default.Item,{noStyle:!0,name:[`0_${br.id}`,"diffNum"],initialValue:br==null?void 0:br.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(st.default.Item,{noStyle:!0,name:[`0_${br.id}`,"extra"],initialValue:{tag_discipline_name:br.name,name:"\u6839\u76EE\u5F55",type:rn.type}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},br.name,"\uFF08",br.child_count,"\uFF09"),key:`0_${br.id}`,name:br.name,parentName:"\u6839\u76EE\u5F55",item_banks_count:br.child_count,icon:null,isLeaf:!0,checkable:Kt(Ln)===Mt.FileFolderAndKnowledge,disableCheckbox:br.child_count===0}});if(rn.type==="0"){const br=Bn(ki.data,Ln,"0"),Cr=Kn(ki.data,Ln,"0");console.log("normalChildren2:",Cr),ma([{title:Kt(Ln)===Mt.FileFolderAndDiff?le.createElement(mt.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(en.Z,null,`\u6839\u76EE\u5F55\uFF08${(vr=ki.navigation[0])==null?void 0:vr.child_count}\uFF09`),le.createElement(en.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(st.default.Item,{noStyle:!0,name:["0","diffValue"],initialValue:[]},le.createElement(Sn.default.Group,{style:{columnGap:12},options:Zr})),le.createElement(st.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(lr=ki.navigation[0])==null?void 0:lr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(st.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=ki.navigation[0])==null?void 0:Mi.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(Pr=ki.navigation[0])==null?void 0:Pr.child_count,disabled:!(((Qr=ki.navigation[0])==null?void 0:Qr.child_count)>0),checkable:Kt(Ln)===Mt.OnlyFileFolder,icon:Ir=>Ir.expanded?le.createElement("img",{src:wi,className:ei.folderIcon}):le.createElement("img",{src:Fn,className:ei.folderIcon}),isLeaf:!1,children:Kt(Ln)===Mt.OnlyFileFolder||Kt(Ln)===Mt.FileFolderAndDiff?br:[...Cr,...zo]}])}else{const br=Bn(ki.data,Ln,"3");bo([{title:Kt(Ln)===Mt.FileFolderAndDiff?le.createElement(mt.Z,{justify:"space-between"},le.createElement(en.Z,null,`\u6839\u76EE\u5F55\uFF08${(So=ki.navigation[0])==null?void 0:So.child_count}\uFF09`),le.createElement(en.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(st.default.Item,{noStyle:!0,name:["0","diffValue"]},le.createElement(Sn.default.Group,{style:{columnGap:12},options:Zr})),le.createElement(st.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(hr=ki.navigation[0])==null?void 0:hr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(st.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${(mr=ki.navigation[0])==null?void 0:mr.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(yr=ki.navigation[0])==null?void 0:yr.child_count,checkable:Kt(Ln)===Mt.OnlyFileFolder,icon:Cr=>Cr.expanded?le.createElement("img",{src:$i,className:ei.shareFolderIcon}):le.createElement("img",{src:tr,className:ei.shareFolderIcon}),isLeaf:!1,disabled:!(((ji=ki.navigation[0])==null?void 0:ji.child_count)>0),children:Kt(Ln)===Mt.OnlyFileFolder||Kt(Ln)===Mt.FileFolderAndDiff?br:[...br,...zo]}])}});(0,le.useEffect)(()=>{Ri==="1"?Jt({type:"0",group_id:0,item_type:Qi,show_children:!0}):Ri==="2"&&Jt({type:"3",except_mine:!0,item_type:Qi,show_children:!0,teach_group_id:$o==="all"?"":$o})},[Ln,Ri,$o]),(0,le.useEffect)(()=>{var rn,sr,Dr,vr,lr,Mi,Pr,Qr,So,hr,mr,yr;console.log("selectData-active:",Vi,On,Ri),Ri==="1"?(Xr((rn=Vi==null?void 0:Vi.my)==null?void 0:rn.map(ji=>ji.id)),tt(((Dr=(sr=Vi==null?void 0:Vi.my)==null?void 0:sr.reduce)==null?void 0:Dr.call(sr,(ji,ki)=>ji+ki.item_bank_num,0))||0)):Ri==="2"&&(Jr((vr=Vi==null?void 0:Vi.public)==null?void 0:vr.map(ji=>ji.id)),tt(((Mi=(lr=Vi==null?void 0:Vi.public)==null?void 0:lr.reduce)==null?void 0:Mi.call(lr,(ji,ki)=>ji+ki.item_bank_num,0))||0)),Kt(Ln)===Mt.All&&(Ri==="1"?(Xr((Pr=Vi==null?void 0:Vi.my)==null?void 0:Pr.map(ji=>ji.id)),tt((Vi==null?void 0:Vi.filter(ji=>!ji.is_share).reduce((ji,ki)=>ji+ki.item_bank_num,0))||0),(Qr=Vi==null?void 0:Vi.filter(ji=>!ji.is_share))==null||Qr.forEach(ji=>{const ki=ur.getFieldValue([`${ji.group_id||0}_${ji.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",ki),ki!=null&&ki.includes[ji.difficulty]||ur.setFieldValue([`${ji.group_id||0}_${ji.tag_discipline_id}`,"diffValue"],Array.from(new Set([...ki,ji.difficulty])))})):Ri==="2"&&(Jr((So=Vi==null?void 0:Vi.public)==null?void 0:So.map(ji=>ji.id)),tt((Vi==null?void 0:Vi.filter(ji=>!!ji.is_share).reduce((ji,ki)=>ji+ki.item_bank_num,0))||0),(hr=Vi==null?void 0:Vi.filter(ji=>!!ji.is_share))==null||hr.forEach(ji=>{const ki=ur.getFieldValue([`${ji.teacher_group_id||0}_${ji.tag_discipline_id}`,"diffValue"])||[];ki!=null&&ki.includes[ji.difficulty]||ur.setFieldValue([`${ji.teacher_group_id||0}_${ji.tag_discipline_id}`,"diffValue"],Array.from(new Set([...ki,ji.difficulty])))}))),Kt(Ln)===Mt.FileFolderAndDiff&&(ur.resetFields(),setTimeout(()=>{ai(Vi)},300),Ri==="1"?(tt((Vi==null?void 0:Vi.filter(ji=>!ji.is_share).reduce((ji,ki)=>ji+ki.item_bank_num,0))||0),(mr=Vi==null?void 0:Vi.filter(ji=>!ji.is_share))==null||mr.forEach(ji=>{const ki=ur.getFieldValue([`${ji.group_id}`,"diffValue"])||[];console.log("prev:",ki),ki!=null&&ki.includes[ji.difficulty]||ur.setFieldValue([`${ji.group_id}`,"diffValue"],Array.from(new Set([...ki,ji.difficulty])))})):(tt((Vi==null?void 0:Vi.filter(ji=>!!ji.is_share).reduce((ji,ki)=>ji+ki.item_bank_num,0))||0),(yr=Vi==null?void 0:Vi.filter(ji=>!!ji.is_share))==null||yr.forEach(ji=>{const ki=ur.getFieldValue([`${ji.teacher_group_id}`,"diffValue"])||[];ki!=null&&ki.includes[ji.difficulty]||ur.setFieldValue([`${ji.teacher_group_id}`,"diffValue"],Array.from(new Set([...ki,ji.difficulty])))})))},[Ri]),console.log("1111111111:",No,Bi),(0,le.useEffect)(()=>{setTimeout(()=>{var rn,sr,Dr,vr,lr;switch(Kt(Ln)){case Mt.OnlyFileFolder:{const Mi=[],Pr=[];for(const Qr of Vi.my||[])Mi.push(Qr);for(const Qr of Vi.public||[])Pr.push(Qr);Xr(Mi.map(Qr=>`${Qr.group_id}`)),Jr(Pr.map(Qr=>`${Qr.teacher_group_id}`)),tt(Ri==="1"?Mi.reduce((Qr,So)=>Qr+So.item_bank_num,0):Pr.reduce((Qr,So)=>Qr+So.item_bank_num,0));break}case Mt.FileFolderAndKnowledge:{const Mi=[],Pr=[];for(const Qr of(Vi==null?void 0:Vi.my)||[])Mi.push(Qr);for(const Qr of(Vi==null?void 0:Vi.public)||[])Pr.push(Qr);tt((rn=Ri==="1"?Mi:Pr)==null?void 0:rn.reduce((Qr,So)=>Qr+So.item_bank_num,0)),Xr(Mi.map(Qr=>`${Qr.group_id}_${Qr.tag_discipline_id}`)),Jr(Pr.map(Qr=>`${Qr.teacher_group_id}_${Qr.tag_discipline_id}`));break}case Mt.All:{Ri==="1"?(tt((Vi==null?void 0:Vi.filter(Mi=>!Mi.is_share).reduce((Mi,Pr)=>Mi+Pr.item_bank_num,0))||0),(sr=Vi==null?void 0:Vi.filter(Mi=>!Mi.is_share))==null||sr.forEach(Mi=>{const Pr=ur.getFieldValue([`${Mi.group_id||0}_${Mi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Pr,Mi.difficulty,Mi),Pr!=null&&Pr.includes[Mi.difficulty]||ur.setFieldValue([`${Mi.group_id||0}_${Mi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Pr,Mi.difficulty])))})):(tt((Vi==null?void 0:Vi.filter(Mi=>!!Mi.is_share).reduce((Mi,Pr)=>Mi+Pr.item_bank_num,0))||0),(Dr=Vi==null?void 0:Vi.filter(Mi=>!!Mi.is_share))==null||Dr.forEach(Mi=>{const Pr=ur.getFieldValue([`${Mi.group_id||0}_${Mi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Pr,Mi.difficulty,Mi),Pr!=null&&Pr.includes[Mi.difficulty]||ur.setFieldValue([`${Mi.group_id||0}_${Mi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Pr,Mi.difficulty])))}));break}case Mt.FileFolderAndDiff:{Ri==="1"?(tt((Vi==null?void 0:Vi.filter(Mi=>!Mi.is_share).reduce((Mi,Pr)=>Mi+Pr.item_bank_num,0))||0),(vr=Vi==null?void 0:Vi.filter(Mi=>!Mi.is_share))==null||vr.forEach(Mi=>{const Pr=ur.getFieldValue([`${Mi.group_id}`,"diffValue"])||[];console.log("prev:",Pr,Mi.difficulty),Pr!=null&&Pr.includes[Mi.difficulty]||ur.setFieldValue([`${Mi.group_id}`,"diffValue"],Array.from(new Set([...Pr,Mi.difficulty])))})):(tt((Vi==null?void 0:Vi.filter(Mi=>!!Mi.is_share).reduce((Mi,Pr)=>Mi+Pr.item_bank_num,0))||0),(lr=Vi==null?void 0:Vi.filter(Mi=>!!Mi.is_share))==null||lr.forEach(Mi=>{const Pr=ur.getFieldValue([`${Mi.group_id}`,"diffValue"])||[];Pr!=null&&Pr.includes[Mi.difficulty]||ur.setFieldValue([`${Mi.group_id}`,"diffValue"],Array.from(new Set([...Pr,Mi.difficulty])))}));break}}},800)},[On,Ln,Vo,ya]);const[Tn,tt]=(0,le.useState)(0);return le.createElement(st.default,{form:ur,onValuesChange:(rn,sr)=>zn(void 0,null,function*(){var Dr,vr,lr,Mi;console.log("onValuesChange:",sr,rn);let Pr=0;if(Kt(Ln)===Mt.FileFolderAndDiff){const Qr=yield ur.getFieldValue(),So=[],hr=[];for(const yr of Object.keys(Qr))if((vr=(Dr=Qr[yr])==null?void 0:Dr.diffValue)!=null&&vr.length&&yr!=="null"&&yr!==null){const ji=Qr[yr];So.push(nn({id:yr},ji))}const mr={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"};So.map(yr=>{var ji,ki,Zr,zo,br;yr.id==0&&(yr.diffNum=Ri==="1"?(ki=(ji=oa==null?void 0:oa.navigation)==null?void 0:ji[0])==null?void 0:ki.difficulty_count:(zo=(Zr=Ar==null?void 0:Ar.navigation)==null?void 0:Zr[0])==null?void 0:zo.difficulty_count),(br=yr==null?void 0:yr.diffValue)==null||br.map(Cr=>{var Ir,Tr,fr,Aa,_o;const xa={group_name:((Ir=yr.extra)==null?void 0:Ir.name)||"",teacher_group_name:"",id:`${yr.id}_${Cr}`,group_id:yr.id,difficulty:Cr,item_bank_num:(Aa=(fr=(Tr=yr.diffNum)==null?void 0:Tr.filter(Wa=>Wa.name===mr[Cr]))==null?void 0:fr[0])==null?void 0:Aa.value};Ri==="2"&&(xa.is_share=!0,xa.teacher_group_id=yr.id,xa.teacher_group_name=(_o=yr.extra)==null?void 0:_o.name),hr.push(xa)})}),Pr=hr.reduce((yr,ji)=>yr+ji.item_bank_num,0),ai([...hr,...Vi==null?void 0:Vi.filter(yr=>Ri==="1"?yr.is_share:!yr.is_share)])}else if(Kt(Ln)===Mt.All){const Qr=[];for(const So of Object.keys(sr)){const{diffNum:hr=[],diffValue:mr=[],extra:yr={}}=sr[So];console.log("---",yr);const[ji,ki]=So.split("_");let Zr=(Mi=(lr=yr.tag_disciplines)==null?void 0:lr.filter(zo=>parseInt(zo.id)===parseInt(ki)))==null?void 0:Mi[0];mr.forEach(zo=>{var br;const Cr={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Ir=(br=hr==null?void 0:hr.find(fr=>fr.name===Cr[zo]))==null?void 0:br.value,Tr={group_name:"",teacher_group_name:"",tag_discipline_name:(Zr==null?void 0:Zr.name)||yr.tag_discipline_name,id:`${So}_${zo}`,group_id:ji,is_share:!!(Zr!=null&&Zr.is_share||(yr==null?void 0:yr.type)==="3"),tag_discipline_id:ki,difficulty:zo,item_bank_num:Ir};Pr+=Ir,yr.type==="0"?Tr.group_name=yr.name:Tr.teacher_group_name=yr.name,Ri==="2"&&(Tr.is_share=!0,Tr.teacher_group_id=yr.id||0,Tr.teacher_group_name=yr.name),Ir>0&&Qr.push(Tr)})}ai([...Qr,...Vi==null?void 0:Vi.filter(So=>Ri==="1"?So.is_share:!So.is_share)])}tt(Pr)})},le.createElement(Be.default,{destroyInactiveTabPane:!0,activeKey:Ri,onChange:rn=>_i(rn),style:{minHeight:260},tabBarExtraContent:{right:Ri==="2"&&(zr==null?void 0:zr.length)>0&&le.createElement(Fi.default,{onChange:rn=>{Ua(rn)},value:$o,style:{width:120}},le.createElement(Fi.default.Option,{key:"all",value:"all"},"\u5168\u90E8"),zr==null?void 0:zr.map(rn=>le.createElement(Fi.default.Option,{key:rn==null?void 0:rn.group_id,value:rn==null?void 0:rn.group_id},rn==null?void 0:rn.name)))},items:[{key:"1",label:"\u6211\u521B\u5EFA\u7684",children:(Vo==null?void 0:Vo.length)===0?le.createElement(bt.Z,{spinning:Ha},le.createElement(hi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:ei.folderAreaWrapper},le.createElement(mt.Z,{justify:"space-between",align:"middle",className:ei.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",Tn," "),"\u9898")),le.createElement(bt.Z,{spinning:Ha},le.createElement("div",{style:{minHeight:200}},Vo.length>0&&le.createElement(wr.default,{checkable:!0,className:ei.folderWrapper,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},selectable:!1,onCheck:(rn,sr)=>Va(rn,sr,"0"),checkedKeys:No,checkStrictly:!0,treeData:Vo,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))},{key:"2",label:"\u56E2\u961F\u5171\u4EAB",children:(ya==null?void 0:ya.length)===0?le.createElement(bt.Z,{spinning:fl},le.createElement(hi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:ei.folderAreaWrapper},le.createElement(mt.Z,{justify:"space-between",align:"middle",className:ei.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",Tn||0," "),"\u9898")),le.createElement(bt.Z,{spinning:fl},le.createElement("div",{style:{minHeight:200}},(ya==null?void 0:ya.length)>0&&le.createElement(wr.default,{checkable:!0,className:ei.folderWrapper,selectable:!1,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},onCheck:(rn,sr)=>Va(rn,sr,"3"),checkedKeys:Bi,checkStrictly:!0,treeData:ya,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))}]}))},un=me(26422),bn=me(83312),Ei=Object.defineProperty,Ni=Object.defineProperties,mi=Object.getOwnPropertyDescriptors,Di=Object.getOwnPropertySymbols,Ai=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable,Or=(Ln,On,ai)=>On in Ln?Ei(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,Hr=(Ln,On)=>{for(var ai in On||(On={}))Ai.call(On,ai)&&Or(Ln,ai,On[ai]);if(Di)for(var ai of Di(On))gr.call(On,ai)&&Or(Ln,ai,On[ai]);return Ln},jn=(Ln,On)=>Ni(Ln,mi(On)),Po=(Ln,On,ai)=>new Promise((Qi,Vi)=>{var Ri=Li=>{try{oi(ai.next(Li))}catch(ur){Vi(ur)}},_i=Li=>{try{oi(ai.throw(Li))}catch(ur){Vi(ur)}},oi=Li=>Li.done?Qi(Li.value):Promise.resolve(Li.value).then(Ri,_i);oi((ai=ai.apply(Ln,On)).next())});const Wr={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Mn=({ruleValue:Ln,setSelectData:On,currentItemType:ai,defaultData:Qi,isFirst:Vi})=>{const[Ri,_i]=(0,le.useState)([]),[oi,Li,ur,zr]=(0,bn.U)(Ye,{source:"question",page:1,per_page:10,group_id:0,keyword:"",group_type:0,clazz:"ItemBanksGroup",sub_discipline_id:void 0,item_type:ai,show_children:!0});(0,le.useEffect)(()=>{Po(void 0,null,function*(){const Bi=yield ur({},!0);_i((0,un.L)(Bi.disciplines))})},[]),console.log(Qi),(0,le.useEffect)(()=>{if(Vi)switch(Kt(Ln)){case Mt.OnlyKnowledge:{No(Qi.map(Bi=>Bi.tag_discipline_id));break}case Mt.KnowledgeAndDiff:{const Bi=new Map;Qi.forEach(Jr=>{Jr&&(Bi.has(Jr.tag_discipline_id)?Bi.set(Jr.tag_discipline_id,[...Bi.get(Jr.tag_discipline_id),Jr.difficulty]):Bi.set(Jr.tag_discipline_id,[Jr.difficulty]))});for(const[Jr,Vo]of Bi.entries())ga.setFieldValue([Jr,"diff"],Vo);break}}},[Qi,Ln,Vi]);const[ga]=st.default.useForm(),$o=(0,le.useMemo)(()=>{const Bi=[];let Jr="",Vo="";const ma={};for(const ya of(zr==null?void 0:zr.disciplines)||[]){Jr=ya.name;for(const bo of ya.sub_disciplines){Vo=bo.name;for(const oa of bo.tag_disciplines){const Io={sub_discipline_name:`${Jr}&${Vo}`,sub_discipline_id:bo.id,tag_discipline_name:oa.name,id:oa.id,item_bank_num:oa.total_count,difficulty_count:oa.difficulty_count,tag_discipline_id:oa.id};Bi.push(Io)}}}return Bi},[zr,Qi]),Ua=[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",show:!0,render:(Bi,Jr)=>{const{item_bank_num:Vo}=Jr;return le.createElement("div",null,Bi,`(${Vo})`)}},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",ellipsis:!0,show:!0},{title:"\u96BE\u5EA6",width:"35%",show:Ln.includes(Zn.Difficulty),render:(Bi,Jr)=>{const{id:Vo,difficulty_count:ma,total_count:ya,sub_discipline_name:bo,tag_discipline_name:oa}=Jr;return le.createElement(le.Fragment,null,le.createElement(st.default.Item,{name:[Vo,"diff"],noStyle:!0},le.createElement(Sn.default.Group,{style:{columnGap:12},options:ma.map(Io=>({label:Io.name,value:Wr[Io.name]}))})),le.createElement(st.default.Item,{name:[Vo,"extra"],initialValue:{difficulty_count:ma,total_count:ya,sub_discipline_name:bo,tag_discipline_name:oa},noStyle:!0},le.createElement("input",{type:"hidden"})))}}].filter(Bi=>Bi.show),[Va,No]=(0,le.useState)([]),Xr=(0,le.useRef)(new Map);return le.createElement("div",{style:{marginTop:12}},le.createElement(mt.Z,{className:"mb20",align:"middle",gutter:20},le.createElement(en.Z,null,le.createElement(Ge.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",size:"large",style:{width:240},options:Ri,onChange:Bi=>{ur({sub_discipline_id:Bi==null?void 0:Bi[1]})}})),le.createElement(en.Z,null,le.createElement(Rn.t7,{style:{width:300},placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\u8FDB\u884C\u641C\u7D22",value:oi.keyword,onChange:Bi=>ur({keyword:Bi})}))),le.createElement(st.default,{form:ga,onValuesChange:(Bi,Jr)=>{var Vo;console.log(Jr),Xr.current.clear();for(const ma of Object.keys(Jr)){const ya={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},bo=Jr[ma],{difficulty_count:oa,total_count:Io}=bo.extra||{};(Vo=bo==null?void 0:bo.diff)==null||Vo.forEach(Ar=>{var Da;const Ha=(Da=oa==null?void 0:oa.find(fl=>fl.name===ya[Ar]))==null?void 0:Da.value,La=jn(Hr({},bo.extra),{id:`${ma}_${Ar}`,difficulty:Ar,item_bank_num:Ha,tag_discipline_id:ma});Ha>0&&Xr.current.set(`${ma}_${Ar}`,La)})}On([...Xr.current.values()])}},($o==null?void 0:$o.length)===0?le.createElement(hi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")}):le.createElement(ir.default,{rowSelection:Kt(Ln)===Mt.OnlyKnowledge?{preserveSelectedRowKeys:!0,type:"checkbox",onChange(Bi,Jr){console.log("table-selectedRowKeys:",Bi,Jr),No(Bi),On(Jr)},getCheckboxProps:Bi=>({disabled:Bi.item_bank_num===0}),selectedRowKeys:Va}:void 0,columns:Ua,dataSource:$o,loading:Li,scroll:{y:480},rowKey:"id",pagination:!1})))},ii=Object.defineProperty,Hi=Object.defineProperties,xr=Object.getOwnPropertyDescriptors,qi=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,Vr=Object.prototype.propertyIsEnumerable,jr=(Ln,On,ai)=>On in Ln?ii(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,kr=(Ln,On)=>{for(var ai in On||(On={}))pr.call(On,ai)&&jr(Ln,ai,On[ai]);if(qi)for(var ai of qi(On))Vr.call(On,ai)&&jr(Ln,ai,On[ai]);return Ln},Kr=(Ln,On)=>Hi(Ln,xr(On)),Yn=(Ln,On,ai)=>new Promise((Qi,Vi)=>{var Ri=Li=>{try{oi(ai.next(Li))}catch(ur){Vi(ur)}},_i=Li=>{try{oi(ai.throw(Li))}catch(ur){Vi(ur)}},oi=Li=>Li.done?Qi(Li.value):Promise.resolve(Li.value).then(Ri,_i);oi((ai=ai.apply(Ln,On)).next())});const Ho={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Ao=({open:Ln,onCancel:On,setVisibleModalType:ai,currentItemType:Qi})=>{var Vi;const{data:Ri,dispatch:_i}=(0,le.useContext)(Ct),[oi,Li]=(0,le.useState)([]),[ur,zr]=(0,le.useState)(),ga=(Vi=Ri==null?void 0:Ri.item_types)==null?void 0:Vi.find(Vo=>Vo.item_type===Qi);(0,le.useEffect)(()=>{var Vo,ma,ya;if(Ln){const bo=(Vo=Ri==null?void 0:Ri.item_types)==null?void 0:Vo.find(oa=>oa.item_type===Qi);if((bo==null?void 0:bo.random_rule_type)!==Mt.Shixun){const oa=Wn[bo==null?void 0:bo.random_rule_type]||[];Li(oa);const Io=(ya=(ma=Ri==null?void 0:Ri.item_types)==null?void 0:ma.find(Ar=>Ar.item_type===Qi))==null?void 0:ya.contents;switch(console.log("----xxx",Kt(oa)),Kt(oa)){case Mt.OnlyDifficulty:{No(Io.map(Ar=>Ar.difficulty));break}case Mt.OnlyFileFolder:{No({my:Io==null?void 0:Io.filter(Ar=>parseInt(Ar.teacher_group_id)!=="NaN"&&!Ar.teacher_group_id&&Ar.teacher_group_id!==0),public:Io==null?void 0:Io.filter(Ar=>parseInt(Ar.teacher_group_id)>=0)}),zr({my:Io==null?void 0:Io.filter(Ar=>parseInt(Ar.teacher_group_id)!=="NaN"&&!Ar.teacher_group_id&&Ar.teacher_group_id!==0),public:Io==null?void 0:Io.filter(Ar=>parseInt(Ar.teacher_group_id)>=0)});break}case Mt.FileFolderAndKnowledge:{No({my:Io==null?void 0:Io.filter(Ar=>parseInt(Ar.teacher_group_id)!=="NaN"&&!Ar.teacher_group_id&&Ar.teacher_group_id!==0),public:Io==null?void 0:Io.filter(Ar=>parseInt(Ar.teacher_group_id)>=0)}),zr({my:Io==null?void 0:Io.filter(Ar=>parseInt(Ar.teacher_group_id)!=="NaN"&&!Ar.teacher_group_id&&Ar.teacher_group_id!==0),public:Io==null?void 0:Io.filter(Ar=>parseInt(Ar.teacher_group_id)>=0)});break}case Mt.FileFolderAndDiff:{No(Io),zr(Io);break}case Mt.All:{No(Io),zr(Io);break}default:No(Io)}}}},[Ln]);const[$o,Ua]=(0,le.useState)([]);(0,le.useEffect)(()=>{Ln&&Xe({item_type:Qi}).then(Vo=>{Vo.status===0&&Ua(Vo.data)})},[Ln]),(0,le.useEffect)(()=>{console.log("selectData",ur)},[ur]);const[Va,No]=(0,le.useState)(),[Xr,Bi]=(0,le.useState)(!0);console.log("isFirst:",Xr);const Jr=Vo=>{Li(Vo),zr([]),No([]),Bi(!1)};return le.createElement(pn.default,{title:"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219",width:948,closable:!0,centered:!0,open:Ln,onCancel:On,destroyOnClose:!0,onOk:()=>Yn(void 0,null,function*(){var Vo,ma,ya,bo,oa,Io,Ar;if(ur===void 0){ai("");return}if(Object.prototype.toString.call(ur)==="[object Object]"&&!((Vo=ur.my)!=null&&Vo.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 Da=Kt(oi);switch(Da){case Mt.OnlyFileFolder:{_i({type:"editRule",payload:{itemType:Qi,tableData:[...ur.my||[],...ur.public||[]],randomRuleType:Da}});break}case Mt.OnlyDifficulty:{const Ha=(bo=(ya=Ri==null?void 0:Ri.item_types)==null?void 0:ya.find(fl=>fl.item_type===Qi))==null?void 0:bo.contents;let La=[{},{value:(oa=$o.find(fl=>fl.name==="\u7B80\u5355"))==null?void 0:oa.value},{value:(Io=$o.find(fl=>fl.name==="\u9002\u4E2D"))==null?void 0:Io.value},{value:(Ar=$o.find(fl=>fl.name==="\u56F0\u96BE"))==null?void 0:Ar.value}];_i({type:"editRule",payload:{itemType:Qi,tableData:ur.map((fl,xu)=>{var tn,Jt,Tn,tt;return{difficulty:fl,id:xu,quanlity:((Jt=(tn=Ha==null?void 0:Ha.filter(rn=>rn.id===xu))==null?void 0:tn[0])==null?void 0:Jt.quanlity)||1,item_bank_num:($o==null?void 0:$o.length)===1?(Tn=$o[0])==null?void 0:Tn.value:(tt=La==null?void 0:La[fl])==null?void 0:tt.value}}),randomRuleType:Da}});break}case Mt.OnlyKnowledge:{_i({type:"editRule",payload:{itemType:Qi,tableData:ur.map(Ha=>Kr(kr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Da}});break}case Mt.KnowledgeAndDiff:{_i({type:"editRule",payload:{itemType:Qi,tableData:ur.map(Ha=>Kr(kr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Da}});break}case Mt.FileFolderAndDiff:{_i({type:"editRule",payload:{itemType:Qi,tableData:ur.map(Ha=>Kr(kr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Da}});break}case Mt.FileFolderAndKnowledge:{_i({type:"editRule",payload:{itemType:Qi,tableData:[...ur.my||[],...ur.public||[]],randomRuleType:Da}});break}case Mt.All:{_i({type:"editRule",payload:{itemType:Qi,tableData:ur.map(Ha=>Kr(kr({},Ha),{quanlity:Ha.quanlity||1})),randomRuleType:Da}});break}}ai("")})},le.createElement(Sn.default.Group,{className:`${ei.ruleCheckBox}`,style:{marginBottom:8},value:oi,onChange:Vo=>{var ma;oi!=null&&oi.length&&((ma=ga==null?void 0:ga.contents)==null?void 0:ma.length)>0?pn.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:()=>Jr(Vo)}):Jr(Vo)},options:[{label:"\u6307\u5B9A\u6587\u4EF6\u5939\u62BD\u9898",value:Zn.FileFolder},{label:"\u6307\u5B9A\u96BE\u5EA6\u62BD\u9898",value:Zn.Difficulty},{label:"\u6307\u5B9A\u77E5\u8BC6\u70B9\u62BD\u9898",value:Zn.Knowledge}]}),oi.includes(Zn.FileFolder)?le.createElement(En,{defaultData:Va,selectData:ur,ruleValue:oi,setSelectData:zr,currentItemType:Qi}):oi.includes(Zn.Knowledge)?le.createElement(Mn,{defaultData:Va,isFirst:Xr,ruleValue:oi,setSelectData:zr,currentItemType:Qi}):oi.includes(Zn.Difficulty)?le.createElement("div",{style:{marginTop:12}},le.createElement("span",{className:"mr20",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(Sn.default.Group,{style:{columnGap:12},options:$o.map(Vo=>({label:Vo.name,value:Ho[Vo.name]})),value:ur||Va,onChange:Vo=>zr(Vo)})):null)},nr=({open:Ln,onCancel:On,setVisibleModalType:ai,currentItemType:Qi})=>Ln?le.createElement(Ao,{open:Ln,onCancel:On,setVisibleModalType:ai,currentItemType:Qi}):null,qo=me(6848),Go=me(94860),Br=me(92365),Er=me(85149),mo=me(955),Yo=me(61485),Ki=me(32570),sa=({open:Ln,onCancel:On,onOk:ai})=>{const{data:Qi}=(0,le.useContext)(Ct),Vi=(0,Go.g)(),[Ri,_i,oi,Li]=(0,bn.U)(Br.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(Ln){oi({page:1,limit:10,type:0},!0).then(Xr=>{(Xr==null?void 0:Xr.shixuns_count)===0&&zr(!0)});const No=Qi.item_types.find(Xr=>Xr.item_type==="PRACTICAL");$o(No.item_banks.map(Xr=>Xr.id)),Va(No.item_banks)}},[Ln,Qi]);const[ga,$o]=(0,le.useState)([]),[Ua,Va]=(0,le.useState)([]);return le.createElement(pn.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:Ln,width:948,centered:!0,closable:!0,onCancel:On,onOk:()=>ai(Ua),destroyOnClose:!0},le.createElement(mt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(en.Z,null,le.createElement(Ge.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Vi,onChange:No=>{oi({page:1,discipline_id:No==null?void 0:No[0],sub_discipline_id:No==null?void 0:No[1]})}}),le.createElement(Fi.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=>oi({page:1,diff:No})}),le.createElement(Fi.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=>oi({page:1,shixun_publish_status:No})})),le.createElement(Rn.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:No=>{oi({keyword:No,page:1})}})),ur?le.createElement("div",null,le.createElement(hi.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,mo.xg)("/shixuns")})):le.createElement(ir.default,{loading:_i,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(No,Xr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:Xr!=null&&Xr.high_resources_consume?wn.title:"",title:No||"--"},le.createElement(Er.Z,{key:1,showLines:1,showTextOnly:!0,value:No||"--"})),(Xr==null?void 0:Xr.high_resources_consume)&&le.createElement(Ki.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(No,Xr,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(qo.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement(Yo.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(No,Xr,Bi)=>le.createElement("span",null,No||"- -")},{title:"\u64CD\u4F5C",render(No,Xr){const{title:Bi,challenge_names:Jr,author_name:Vo,identifier:ma,author_school_name:ya,study_count:bo}=Xr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{pn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(Er.Z,{value:Bi,style:{marginBottom:18}}),le.createElement("div",{className:wn.challengeNameWrapper},Jr.map((oa,Io)=>le.createElement("div",{className:wn.challengeName,key:Io},"\u7B2C",(0,mo.EM)(Io+1),"\u9898\xA0",oa))),le.createElement(mt.Z,{className:wn.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(en.Z,{className:wn.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:wn.shixunInfo},Vo.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:wn.shixunInfo},ya),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:wn.shixunInfo},bo)),le.createElement(De.ZP,{type:"primary",className:wn.btnToDetail,onClick:()=>(0,mo.xg)(`/shixuns/${ma}/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:Li==null?void 0:Li.items,rowSelection:{selectedRowKeys:ga,preserveSelectedRowKeys:!0,getCheckboxProps:No=>({disabled:No.shixun_tag_num===1}),onChange(No,Xr){var Bi,Jr,Vo;console.log(No),$o(No);const ma=[];for(const bo of Ua)No.includes(bo.id)&&ma.push(bo);const ya=ma.map(bo=>bo.id);for(const bo of Xr)bo&&No.includes(bo.id)&&!ya.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:(Jr=bo.challenge_names)==null?void 0:Jr.map((oa,Io)=>({subject:oa,id:Io,score:5})),score:((Vo=bo.challenge_names)==null?void 0:Vo.length)*5,study_count:bo.study_count,challenges_count:bo.challenges_count});Va(ma)}},pagination:{current:Ri.page,pageSize:Ri.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,Xr){oi({page:No,limit:Xr})},size:"default"},scroll:{y:400}}))},va=me(12921),Ma=me(59301),hs=Object.defineProperty,Ga=Object.defineProperties,Lo=Object.getOwnPropertyDescriptors,po=Object.getOwnPropertySymbols,la=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,Na=(Ln,On,ai)=>On in Ln?hs(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,os=(Ln,On)=>{for(var ai in On||(On={}))la.call(On,ai)&&Na(Ln,ai,On[ai]);if(po)for(var ai of po(On))Eo.call(On,ai)&&Na(Ln,ai,On[ai]);return Ln},xo=(Ln,On)=>Ga(Ln,Lo(On)),vi=({onDelete:Ln,list:On,onSelect:ai})=>{const[Qi,Vi]=(0,le.useState)(!1),{dispatch:Ri,disabled:_i}=(0,le.useContext)(Ct),oi=($o,Ua,Va)=>{const No=Array.from($o),[Xr]=No.splice(Ua,1);return No.splice(Va,0,Xr),No},[Li,ur]=(0,le.useState)(null),[zr,ga]=(0,le.useState)(!1);return Ma.createElement(va.Z5,{onDragStart:()=>{ga(!0)},onDragEnd:$o=>{if(ga(!1),!$o.destination)return;const Ua=oi(On,$o.source.index,$o.destination.index);Ri({type:"updateItemTypes",payload:Ua})}},Ma.createElement(va.bK,{droppableId:"droppable"},($o,Ua)=>Ma.createElement("div",xo(os({},$o.droppableProps),{ref:$o.innerRef}),Ma.createElement(bt.Z,{spinning:Qi},On.map((Va,No)=>Ma.createElement(va._l,{key:No,draggableId:No.toString(),index:No,isDragDisabled:Li!==Va.item_type},(Xr,Bi)=>Ma.createElement(mt.Z,xo(os(os({align:"middle",wrap:!1,ref:Xr.innerRef},Xr.draggableProps),Xr.dragHandleProps),{className:`${wn.dragItem} ${zr?wn.dragging:""}`}),Ma.createElement(en.Z,{className:wn.contentArea,onClick:()=>{ai(Va.item_type),(0,mo.k3)()}},Ma.createElement("span",{className:wn.blackText},(0,mo.EM)(No+1),"\u3001\u3010",Va.item_type_text,"\u3011"),Ma.createElement(qo.Z,{title:`\uFF08${Va.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(Va.total_score).toFixed(1)}\u5206\uFF09`},Ma.createElement("span",{className:wn.greyText},`\uFF08${Va.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(Va.total_score).toFixed(1)}\u5206\uFF09`))),!_i&&Ma.createElement(Ma.Fragment,null,Ma.createElement(qo.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F",open:Li===Va.item_type&&!zr},Ma.createElement("div",{style:{cursor:"grab"},className:`${wn.iconWrapper} ${zr?wn.hidden:""}`,onMouseEnter:()=>{ur(Va.item_type)},onMouseLeave:()=>ur(null)},Ma.createElement("i",{className:`iconfont icon-tuodong1 ${wn.dragIcon}`}))),Ma.createElement(qo.Z,{title:"\u5220\u9664"},Ma.createElement("div",{className:`${wn.iconWrapper} ${zr?wn.hidden:""}`,style:{cursor:"pointer"},onClick:()=>Ln(Va.item_type)},Ma.createElement("i",{className:`iconfont icon-shanchu12 ${wn.deleteIcon}`})))))))),$o.placeholder)))},no=me(10777),io={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"},Ja=me(73631),Ca=me(31328);const fa=(Ln,On,ai,Qi)=>{const Vi={[Mt.OnlyDifficulty]:[{title:"\u96BE\u5EA6",key:"difficulty",render(Ri,_i){const{difficulty:oi}=_i;return le.createElement("span",{style:{color:$t[oi].color}},$t[oi].label)}}],[Mt.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(Ri,_i){return`${Ri}`}}],[Mt.OnlyFileFolder]:[{title:"\u6587\u4EF6\u5939",render(Ri,_i,oi){const{group_name:Li,teacher_group_name:ur}=_i,zr=Li||ur,ga=ur?Ca:Ja;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:ga,className:io.folderIcon})," ",le.createElement(qo.Z,{title:zr},le.createElement("span",{className:io.titles},zr)))}},{title:"\u7C7B\u578B",render(Ri,_i){const{teacher_group_name:oi}=_i;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[Mt.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(Ri,_i){const{difficulty:oi}=_i;return le.createElement("span",{style:{color:$t[oi].color}},$t[oi].label)}}],[Mt.FileFolderAndKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(Ri,_i){const{group_name:oi,teacher_group_name:Li}=_i,ur=oi||Li,zr=Li?Ca:Ja;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:zr,className:io.folderIcon})," ",le.createElement(qo.Z,{title:ur},le.createElement("span",{className:io.titles},ur)))}},{title:"\u7C7B\u578B",render(Ri,_i){const{teacher_group_name:oi}=_i;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[Mt.FileFolderAndDiff]:[{title:"\u6587\u4EF6\u5939",render(Ri,_i){const{group_name:oi,teacher_group_name:Li}=_i,ur=oi||Li,zr=Li?Ca:Ja;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:zr,className:io.folderIcon})," ",le.createElement(qo.Z,{title:ur},le.createElement("span",{className:io.titles},ur)))}},{title:"\u7C7B\u578B",render(Ri,_i){const{teacher_group_name:oi}=_i;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(Ri,_i){const{difficulty:oi}=_i;return le.createElement("span",{style:{color:$t[oi].color}},$t[oi].label)}}],[Mt.All]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(Ri,_i){const{group_name:oi,teacher_group_name:Li,teacher_group_id:ur}=_i,zr=oi||Li,ga=ur||ur===0?Ca:Ja;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:ga,className:io.folderIcon})," ",le.createElement(qo.Z,{title:zr},le.createElement("span",{className:io.titles},zr)))}},{title:"\u7C7B\u578B",render(Ri,_i){const{teacher_group_id:oi}=_i;return le.createElement("span",null,oi||oi===0?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(Ri,_i){const{difficulty:oi}=_i;return le.createElement("span",{style:{color:$t[oi].color}},$t[oi].label)}}],[Mt.Shixun]:[]};for(const Ri of Object.values(Vi))Ri.push({title:"\u62BD\u9898\u6570\u91CF",key:"quanlity",render(_i,oi){const{item_bank_num:Li,quanlity:ur,id:zr,teacher_group_id:ga}=oi||{};return le.createElement(mt.Z,{align:"middle"},le.createElement(yt.Z,{disabled:Qi,min:1,max:Li,size:"large",precision:0,value:ur,onChange:$o=>{On({type:"changeQuestionNum",payload:{itemType:ai,id:zr,num:$o,teacher_group_id:ga}})}}),le.createElement("span",{className:"ml10 font14",style:{color:"#333333"}},"/",Li))}},{title:"\u64CD\u4F5C",key:"action",align:"right",render(_i,oi){const{id:Li,is_share:ur}=oi;return Qi?le.createElement("span",{className:"cursorNotAllowed c-grey-999"},"\u5220\u9664"):le.createElement("span",{className:io.deleteBtn,onClick:()=>{On({type:"deleteRule",payload:{itemType:ai,id:Li,is_share:ur}})}},"\u5220\u9664")}});return Vi[Ln]},$a=({setVisibleModalType:Ln})=>{var On,ai,Qi,Vi;const{data:Ri,dispatch:_i,disabled:oi}=(0,le.useContext)(Ct),Li=(On=Ri==null?void 0:Ri.item_types)==null?void 0:On.find(ur=>ur.item_type==="PRACTICAL");return le.createElement(no.Z,{className:io.timelineWrapper,items:[{children:le.createElement("div",{style:{transform:"translateY(-4px)"}},le.createElement(mt.Z,{className:"mb20",align:"middle",justify:"space-between"},le.createElement(en.Z,null,le.createElement("span",{className:io.title},"\u9898\u5E93\u9009\u9898"),le.createElement("span",{className:io.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")),!oi&&le.createElement(Rn.op,{style:{width:102},onClick:()=>Ln("selectShixun")},"\u4ECE\u9898\u5E93\u9009\u62E9")),((ai=Li==null?void 0:Li.item_banks)==null?void 0:ai.length)===0?le.createElement(hi.Z,{customText:"\u6682\u65E0\u5F85\u62BD\u8BD5\u9898\uFF0C\u8BF7\u5148\u4ECE\u9898\u5E93\u8FDB\u884C\u9009\u62E9\uFF5E"}):le.createElement(ir.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?io.q_title:"",title:ur||"--"},le.createElement(Er.Z,{key:1,showLines:1,showTextOnly:!0,value:ur})),(zr==null?void 0:zr.high_resources_consume)&&le.createElement(Ki.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:$o,identifier:Ua,name:Va,challenge_names:No=[],real_name:Xr,school_name:Bi,study_count:Jr,challenges:Vo=[]}=zr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer",marginLeft:20},onClick:()=>{pn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(Er.Z,{value:Va,style:{marginBottom:18}}),le.createElement("div",{className:io.challengeNameWrapper},Vo==null?void 0:Vo.map((ma,ya)=>le.createElement("div",{className:io.challengeName,key:ya},"\u7B2C",(0,mo.EM)(ya+1),"\u9898\xA0",ma==null?void 0:ma.subject))),le.createElement(mt.Z,{className:io.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(en.Z,{className:io.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:io.shixunInfo},Xr),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:io.shixunInfo},Bi),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:io.shixunInfo},Jr)),le.createElement(De.ZP,{type:"primary",className:io.btnToDetail,onClick:()=>(0,mo.xg)(`/shixuns/${Ua}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),!oi&&le.createElement("span",{onClick:()=>{_i({type:"deleteShixunQuestion",payload:{shixunId:$o}})},className:`ml20 ${io.deleteBtn}`},"\u5220\u9664"))}}],dataSource:(Li==null?void 0:Li.item_banks)||[],pagination:!1}))},{children:le.createElement(mt.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:io.title},"\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898"),!!((Vi=Li==null?void 0:Li.item_banks)!=null&&Vi.length)&&le.createElement(en.Z,null,le.createElement(mt.Z,{align:"middle"},le.createElement("span",{className:io.normalText},"\u62BD\u9898\u6570\u91CF"),le.createElement(yt.Z,{min:0,disabled:oi,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=>_i({type:"changeQuestionNum",payload:{num:ur||1,itemType:"PRACTICAL"}})}),le.createElement("span",{className:`${io.normalText} mr30`},"/",Li==null?void 0:Li.item_bank_num),le.createElement("span",{className:io.normalText},"\u6BCF\u9898\u5206\u503C"),le.createElement(yt.Z,{disabled:oi,min:0,max:100,size:"large",precision:1,className:"ml10 mr10",value:Li==null?void 0:Li.score,onChange:ur=>_i({type:"changeQuestionScore",payload:{score:ur,itemType:"PRACTICAL"}})}),le.createElement("span",{className:io.normalText},"\u5206"))))}]})};var Es=({setVisibleModalType:Ln,currentItemType:On,onDelete:ai})=>{var Qi,Vi;const Ri=(0,ct.useParams)(),{data:_i,dispatch:oi,disabled:Li}=(0,le.useContext)(Ct),ur=((Qi=_i==null?void 0:_i.item_types)==null?void 0:Qi.findIndex(ga=>ga.item_type===On))+1,zr=(Vi=_i==null?void 0:_i.item_types)==null?void 0:Vi.find(ga=>ga.item_type===On);return le.createElement("div",{className:io.questionDetailWrapper},le.createElement(mt.Z,{justify:"space-between",align:"middle",className:"mb30"},le.createElement(en.Z,null,le.createElement("span",{className:io.questionTitle},`${(0,mo.EM)(ur)}\u3001${zr==null?void 0:zr.item_type_text}`),le.createElement("span",{className:io.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 ${io.deleteIcon}`,onClick:()=>ai(On)})),On==="PRACTICAL"?le.createElement($a,{setVisibleModalType:Ln}):le.createElement(le.Fragment,null,(zr==null?void 0:zr.contents.length)===0?le.createElement(hi.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:(Ri==null?void 0:Ri.id)&&le.createElement(mt.Z,{justify:"center",className:"mt30"},le.createElement(Rn.op,{style:{width:136,marginTop:-10},onClick:()=>Ln("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219"))}):le.createElement(le.Fragment,null,le.createElement(mt.Z,{justify:"space-between",align:"middle",className:"mb20"},le.createElement(en.Z,null,le.createElement(mt.Z,{align:"middle"},le.createElement("span",{className:`${io.normalText}`},"\u6BCF\u9898\u5206\u503C"),le.createElement(yt.Z,{disabled:Li,size:"large",className:"ml10 mr10",min:.1,max:100,value:zr==null?void 0:zr.score,precision:1,onChange:ga=>oi({type:"changeQuestionScore",payload:{score:ga,itemType:On}})}),le.createElement("span",{className:io.normalText},"\u5206"))),(Ri==null?void 0:Ri.id)&&le.createElement(Rn.op,{onClick:()=>Ln("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219")),le.createElement(ir.default,{columns:fa(zr==null?void 0:zr.random_rule_type,oi,On,Li),dataSource:zr==null?void 0:zr.contents,pagination:!1,rowKey:"id"}))))},ys=me(6021),Zs=me(94941),Dn=me(24065),Ss=me(32637),ra=me(59301),hl=Object.defineProperty,Ol=Object.defineProperties,ns=Object.getOwnPropertyDescriptors,yu=Object.getOwnPropertySymbols,eu=Object.prototype.hasOwnProperty,ps=Object.prototype.propertyIsEnumerable,Ba=(Ln,On,ai)=>On in Ln?hl(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,tu=(Ln,On)=>{for(var ai in On||(On={}))eu.call(On,ai)&&Ba(Ln,ai,On[ai]);if(yu)for(var ai of yu(On))ps.call(On,ai)&&Ba(Ln,ai,On[ai]);return Ln},Do=(Ln,On)=>Ol(Ln,ns(On)),Ea=(Ln,On,ai)=>new Promise((Qi,Vi)=>{var Ri=Li=>{try{oi(ai.next(Li))}catch(ur){Vi(ur)}},_i=Li=>{try{oi(ai.throw(Li))}catch(ur){Vi(ur)}},oi=Li=>Li.done?Qi(Li.value):Promise.resolve(Li.value).then(Ri,_i);oi((ai=ai.apply(Ln,On)).next())}),dr=({})=>{var Ln,On,ai,Qi,Vi,Ri,_i,oi,Li,ur,zr,ga,$o,Ua,Va;const[No]=(0,ct.useSearchParams)(),Xr=(0,ct.useParams)(),{data:Bi,dispatch:Jr,setPreview:Vo,getData:ma,handlePreview:ya,disabled:bo}=(0,le.useContext)(Ct),[oa,Io]=(0,le.useState)(""),[Ar,Da]=(0,le.useState)((On=(Ln=Bi==null?void 0:Bi.item_types)==null?void 0:Ln[0])==null?void 0:On.item_type),[Ha,La]=(0,le.useState)(!0),[fl,xu]=(0,le.useState)(!1),tn=(rn,sr)=>Ea(void 0,null,function*(){var Dr,vr,lr,Mi,Pr,Qr;const So=Bi.item_types.map(ki=>ki.item_type_text),hr=(Dr=Bi==null?void 0:Bi.item_types)==null?void 0:Dr.filter(ki=>{var Zr,zo;return((Zr=ki.contents)==null?void 0:Zr.length)>0||((zo=ki==null?void 0:ki.item_banks)==null?void 0:zo.length)>0});if(Bi.sort_by_item_type=So,!((vr=Bi.item_types)!=null&&vr.length)){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((hr==null?void 0:hr.length)===0){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}let mr=()=>Ea(void 0,null,function*(){const ki=(0,et.cloneDeep)(Bi),{item_types:Zr}=ki||{};ki.item_types=Zr.filter(br=>br.item_type===Ar),(yield je(Xr.id||Xr.categoryId,ki)).status===0&&(Da(sr),He.ZP.success("\u4FDD\u5B58\u6210\u529F"),rn||ct.history.push("/paperlibrary"))}),yr=(Mi=(lr=Bi==null?void 0:Bi.item_types)==null?void 0:lr.filter(ki=>ki.item_type_text==="\u5B9E\u8BAD\u9898")[0])==null?void 0:Mi.item_banks,ji=0;yr==null||yr.map(ki=>{ki.high_resources_consume&&(ji=ji+1)}),console.log(ji),ji>0?pn.default.info({centered:!0,icon:null,width:600,okText:"\u6211\u77E5\u9053\u4E86",title:"\u63D0\u793A",content:ra.createElement("div",null,ra.createElement("div",{className:wn.tipcontent},ra.createElement("div",null,ra.createElement("div",{className:wn.name},"\u60A8\u597D\uFF01",(Pr=(0,Dn.eY)())==null?void 0:Pr.username,"\uFF08",(Qr=(0,Dn.eY)())==null?void 0:Qr.login,"\uFF09\uFF1A"),ra.createElement("div",{className:wn.tip},"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",ra.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"),ra.createElement("div",{className:wn.info},ra.createElement("i",{className:"iconfont icon-xunifangzhenti1 mr10 font26"}),ra.createElement("span",{className:"mr10",style:{color:"#6A7283"}},"\u9AD8\u6D88\u8017\u5B9E\u9A8C"),ra.createElement("span",{style:{color:"#232B40"}},`${ji}\u4E2A`))),ra.createElement("div",null,ra.createElement("div",{className:wn.img},ra.createElement("img",{src:Ss,width:"124px",height:"124px"})),ra.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")))),onOk:()=>{mr()}}):mr()}),Jt=(rn,sr,Dr,vr=!1)=>Ea(void 0,null,function*(){console.log(Bi);const lr=Do(tu(tu({},Bi.exercise),Xr),{exerciseId:Xr.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:Ar,item_types:Bi.item_types,sub_discipline_id:Bi.examination_bank.sub_discipline_id});(!rn||sr===1)&&(lr.is_reset=1);const Mi=yield(0,Zs.wy)(lr);return Mi.status===0&&(vr||He.ZP.success("\u4FEE\u6539\u6210\u529F "),Da(Dr),rn||ct.history.push(`/classrooms/${Xr.coursesId}/exercise/${Xr.categoryId}/detail?random=true`)),Mi}),Tn=rn=>{pn.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closable:!0,content:ra.createElement("div",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u9898\u578B\uFF1F"),onOk:()=>Ea(void 0,null,function*(){var sr,Dr,vr,lr;if(Xr.id){if((yield Lt(Xr.id,{item_type:[rn]})).status!==0)return}else{const Mi=yield rt(Xr.categoryId,{item_type:[rn]});if(ma(),Mi.status!==0)return}if(Jr({type:"deleteQuestionType",payload:rn}),rn===Ar){const Mi=ft(Bi,{type:"deleteQuestionType",payload:rn});Da(Mi.item_types.length?Mi.item_types[0].item_type:(Dr=(sr=Bi==null?void 0:Bi.item_types)==null?void 0:sr[0])==null?void 0:Dr.item_type)}else Da((lr=(vr=Bi==null?void 0:Bi.item_types)==null?void 0:vr[0])==null?void 0:lr.item_type)})})};(0,le.useEffect)(()=>{var rn;(rn=Bi==null?void 0:Bi.examination_bank)!=null&&rn.name&&La(!1),(0,mo.Dk)("\u968F\u673A\u7EC4\u5377")},[(ai=Bi==null?void 0:Bi.examination_bank)==null?void 0:ai.name]);const tt=()=>Ea(void 0,null,function*(){var rn;let sr=yield Jt(!0,1,Ar,!0);if((sr==null?void 0:sr.status)===0){const Dr=yield(0,te.ZP)(`/api/exercises/${Xr==null?void 0:Xr.categoryId}/simulate_start_answer.json`,{method:"get",params:{coursesId:Xr==null?void 0:Xr.coursesId,categoryId:Xr==null?void 0:Xr.categoryId}});(Dr==null?void 0:Dr.status)!=-1&&window.open(`/classrooms/${Xr.coursesId}/exercise/${Xr.categoryId}/${(rn=(0,Dn.eY)())==null?void 0:rn.login}/initate_answer`)}});return ra.createElement("div",{className:wn.questionInfo},ra.createElement("div",{className:"tc mb20"},ra.createElement(Me.VP,{defaultValue:(Qi=Bi==null?void 0:Bi.examination_bank)==null?void 0:Qi.name,onFinish:rn=>Ea(void 0,null,function*(){return Jr({type:"updateBaseInfo",payload:Do(tu({},Bi.examination_bank),{name:rn})}),(0,Zs.wy)({exercise_name:rn,exerciseId:Xr==null?void 0:Xr.categoryId}),!0})})),ra.createElement(mt.Z,{justify:"center",className:"mb20"},ra.createElement(en.Z,{className:"mr30"},ra.createElement("span",{className:wn.label},"\u7B54\u9898\u65F6\u957F"),ra.createElement("span",null,((Vi=Bi==null?void 0:Bi.examination_bank)==null?void 0:Vi.time)===-1?"\u4E0D\u9650":((Ri=Bi==null?void 0:Bi.examination_bank)==null?void 0:Ri.time)||"\u4E0D\u9650")),ra.createElement(en.Z,{className:"mr30"},ra.createElement("span",{className:wn.label},"\u96BE\u5EA6"),ra.createElement("span",null,(oi=$t[`${(_i=Bi==null?void 0:Bi.examination_bank)==null?void 0:_i.difficulty}`])==null?void 0:oi.label)),ra.createElement(en.Z,{className:"mr30"},ra.createElement("span",{className:wn.label},"\u8BD5\u9898\u603B\u6570"),ra.createElement("span",null,((Li=Bi==null?void 0:Bi.examination_bank)==null?void 0:Li.question_count)||0)),ra.createElement(en.Z,null,ra.createElement("span",{className:wn.label},"\u603B\u5206"),ra.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))),ra.createElement("div",{className:wn.content,style:{border:((ga=Bi==null?void 0:Bi.item_types)==null?void 0:ga.length)<=0&&"none"}},(($o=Bi==null?void 0:Bi.item_types)==null?void 0:$o.length)>0?ra.createElement(mt.Z,{wrap:!1},ra.createElement(en.Z,{flex:"260px",className:wn.leftPart},!bo&&ra.createElement(mt.Z,{className:"mb20"},ra.createElement(Rn.op,{style:{margin:"0 15px",borderRadius:2},onClick:()=>Io("setScore")},"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C"),(Xr==null?void 0:Xr.id)&&ra.createElement(Rn.op,{shape:"default",onClick:()=>Io("questionType")},"\u6DFB\u52A0\u9898\u578B")),ra.createElement(vi,{list:Bi.item_types,onSelect:rn=>Ea(void 0,null,function*(){if(rn===Ar)return;La(!0);const sr=Bi.item_types.find(Dr=>Dr.item_type===Ar);if(Ar!=="PRACTICAL"&&sr.contents.length>0&&(Xr!=null&&Xr.id)){const Dr=(0,et.cloneDeep)(Bi),{item_types:vr}=Dr||{};Dr.item_types=vr.filter(lr=>lr.item_type===Ar);try{(yield je(Xr.id||Xr.categoryId,Dr)).status===0&&Da(rn)}catch(lr){}}else Xr.categoryId?Jt(!0,2,rn):tn(!0,rn);La(!1)}),onDelete:Tn})),ra.createElement(en.Z,{flex:1,className:wn.rightPart},ra.createElement(bt.Z,{spinning:Ha},ra.createElement(Es,{setVisibleModalType:Io,currentItemType:Ar,onDelete:Tn})))):ra.createElement(hi.Z,{customText:"\u8BF7\u5148\u8BBE\u7F6E\u8BD5\u5377\u9898\u578B",styles:{margin:"70px auto"},ButtonTwo:ra.createElement(mt.Z,{justify:"center",className:"mt20"},(Xr==null?void 0:Xr.id)&&ra.createElement(Rn.op,{style:{width:88},onClick:()=>Io("questionType")},"\u6DFB\u52A0\u9898\u578B"))})),!!(Xr!=null&&Xr.id)&&ra.createElement("div",{className:wn.fixedBottom},ra.createElement(ys.Z,{className:`${wn.previewBtn} mr20`,onClick:()=>Ea(void 0,null,function*(){var rn,sr;const Dr=(rn=Bi==null?void 0:Bi.item_types)==null?void 0:rn.filter(vr=>{var lr,Mi;return((lr=vr.contents)==null?void 0:lr.length)>0||((Mi=vr==null?void 0:vr.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((Dr==null?void 0:Dr.length)===0){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}yield tn(!0,Ar),ya()})},"\u8BD5\u5377\u9884\u89C8"),ra.createElement(ys.Z,{type:"primary",className:wn.confirmBtn,onClick:()=>tn()},ra.createElement("i",{className:"iconfont icon-baocun1 mr5"}),"\u4FDD\u5B58\u8BD5\u5377")),!!(Xr!=null&&Xr.categoryId)&&ra.createElement("div",{className:wn.fixedBottom,style:{justifyContent:((Ua=Bi==null?void 0:Bi.exercise)==null?void 0:Ua.exercise_status)!==1?"end":"center"}},ra.createElement(ys.Z,{className:`${wn.previewBtn} mr20`,onClick:()=>Ea(void 0,null,function*(){var rn,sr;document.body.scrollIntoView(),ct.history.push(`/classrooms/${Xr.coursesId}/exercise/${(rn=Bi==null?void 0:Bi.exercise)==null?void 0:rn.id}/detail?random=${(sr=Bi==null?void 0:Bi.exercise)==null?void 0:sr.is_random}`)})},"\u8FD4\u56DE"),((Va=Bi==null?void 0:Bi.exercise)==null?void 0:Va.exercise_status)===1&&ra.createElement(ys.Z,{className:`${wn.previewBtn} mr20`,onClick:tt},"\u6A21\u62DF\u8003\u8BD5"),(Bi==null?void 0:Bi.exercise.exercise_status)===1&&ra.createElement(ys.Z,{type:"primary",className:wn.confirmBtn,onClick:()=>Jt()},"\u63D0\u4EA4")),ra.createElement(Zi,{open:oa==="questionType",onCancel:()=>Io(""),onOk:rn=>Ea(void 0,null,function*(){var sr,Dr;const vr=[],lr=ft(Bi,{type:"setQuestionType",payload:rn}),Mi=((sr=lr==null?void 0:lr.item_types)==null?void 0:sr.map(Pr=>Pr.item_type))||[];for(const Pr of((Dr=Bi==null?void 0:Bi.item_types)==null?void 0:Dr.map(Qr=>Qr.item_type))||[])Mi.includes(Pr)||vr.push(Pr);Xr.id&&vr.length>0&&(yield Lt(Xr.id,{item_type:vr})).status!==0||(Jr({type:"setQuestionType",payload:rn}),Da(Ar||lr.item_types[0].item_type),Io(""))})}),ra.createElement(eo,{open:oa==="setScore",onCancel:()=>{Io("")},onOk:rn=>Ea(void 0,null,function*(){console.log("---newData",rn);const sr=rn.item_types.map(Dr=>({item_type:Dr.item_type,score:Dr.score}));Xr.id?(yield lt(Xr.id,{score_settings:sr})).status===0&&Jr({type:"init",payload:rn}):(yield Ze(Xr.categoryId,{score_settings:sr})).status===0&&Jr({type:"init",payload:rn}),Io("")})}),ra.createElement(nr,{open:oa==="rule",onCancel:()=>Io(""),currentItemType:Ar,setVisibleModalType:Io}),No.get("type")==="settings"&&ra.createElement(sa,{open:oa==="selectShixun",onCancel:()=>Io(""),onOk:rn=>{if(console.log(rn),(rn==null?void 0:rn.length)<=0){He.ZP.info("\u5B9E\u8BAD\u6570\u4E0D\u80FD\u4E3A0");return}Jr({type:"addShixun",payload:{shixunList:[...rn]}}),Io("")}}))},Rs=me(92744),ls=me(59301),sl=Object.defineProperty,jl=Object.defineProperties,ou=Object.getOwnPropertyDescriptors,Ji=Object.getOwnPropertySymbols,Cs=Object.prototype.hasOwnProperty,Us=Object.prototype.propertyIsEnumerable,$l=(Ln,On,ai)=>On in Ln?sl(Ln,On,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Ln[On]=ai,kl=(Ln,On)=>{for(var ai in On||(On={}))Cs.call(On,ai)&&$l(Ln,ai,On[ai]);if(Ji)for(var ai of Ji(On))Us.call(On,ai)&&$l(Ln,ai,On[ai]);return Ln},Vl=(Ln,On)=>jl(Ln,ou(On)),Oo=(Ln,On,ai)=>new Promise((Qi,Vi)=>{var Ri=Li=>{try{oi(ai.next(Li))}catch(ur){Vi(ur)}},_i=Li=>{try{oi(ai.throw(Li))}catch(ur){Vi(ur)}},oi=Li=>Li.done?Qi(Li.value):Promise.resolve(Li.value).then(Ri,_i);oi((ai=ai.apply(Ln,On)).next())}),zl=()=>{var Ln,On,ai,Qi;const[Vi,Ri]=(0,le.useState)("baseInfo"),_i=(0,ct.useDispatch)();(0,le.useEffect)(()=>{_i({type:"globalSetting/footerToggle",payload:!1})},[]);const oi=(0,ct.useParams)(),Li=!!(oi.id||oi.categoryId),[ur]=(0,ct.useSearchParams)();(0,le.useEffect)(()=>{ur.get("type")==="settings"&&Ri("settings")},[]);const[zr,ga]=(0,le.useReducer)(ft,null),[$o,Ua]=(0,le.useState)(!1),Va=()=>Oo(void 0,null,function*(){Ua(!0);let Ar;oi.categoryId?Ar=yield Wt(oi):Ar=yield Ne(oi.id),Ua(!1),Ar.status===0&&ga({type:"init",payload:Ar})});(0,le.useEffect)(()=>{Li?Va():ga({type:"init",payload:{examination_bank:{difficulty:2}}})},[oi]);const[No,Xr]=(0,le.useState)(""),Bi=(Ar,Da)=>Oo(void 0,null,function*(){var Ha,La,fl,xu;const tn=(Ha=zr==null?void 0:zr.item_types)==null?void 0:Ha.filter(tt=>{var rn;return((rn=tt==null?void 0:tt.item_type)==null?void 0:rn.toUpperCase())===(Da==null?void 0:Da.type)}),Jt={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(Ar!==void 0&&!(Ar!=null&&Ar.single_question_id)){Jt.seleted_item_bank_ids=Ar==null?void 0:Ar.seleted_item_bank_ids,Jt.item_types=tn;const tt=yield wt(Jt);if((tt==null?void 0:tt.status)===0){let rn=(0,et.cloneDeep)(bo.data);rn.questionList=(La=rn==null?void 0:rn.questionList)==null?void 0:La.map(sr=>{var Dr;return sr.type===Da.type?Vl(kl({},sr),{questions:((Dr=tt==null?void 0:tt.questions)==null?void 0:Dr.questions)||[]}):sr}),oa({show:!0,data:rn})}return}if(Ar!==void 0&&(Ar!=null&&Ar.single_question_id)){Jt.seleted_item_bank_ids=Ar==null?void 0:Ar.seleted_item_bank_ids,Jt.single_question_id=Ar==null?void 0:Ar.single_question_id,Jt.item_types=tn;const tt=yield wt(Jt);if((tt==null?void 0:tt.status)===0){let rn=(0,et.cloneDeep)(bo.data);rn.questionList=(fl=rn==null?void 0:rn.questionList)==null?void 0:fl.map(sr=>{var Dr,vr;if(sr.type===Da.type){const lr=(0,et.cloneDeep)(sr==null?void 0:sr.questions);return lr.splice(Da.index,1,(vr=(Dr=tt==null?void 0:tt.questions)==null?void 0:Dr.questions)==null?void 0:vr[0]),console.log(sr==null?void 0:sr.questions,lr,Da.index,"new_questions"),Vl(kl({},sr),{questions:lr})}return sr}),oa({show:!0,data:rn})}return}const Tn=yield Ot(Jt);if((Tn==null?void 0:Tn.status)===0){const tt=(0,mo.ad)(Tn);let rn=[];(xu=zr==null?void 0:zr.item_types)==null||xu.forEach(sr=>{var Dr;const vr=(Dr=tt==null?void 0:tt.questionList)==null?void 0:Dr.find(lr=>sr.item_type===lr.type);rn.push(vr)}),console.log(zr,"sortList"),rn=(0,et.compact)(rn),tt.questionList=rn,oa({show:!0,data:tt}),Xr(new Date)}}),Jr=Ar=>{var Da;let Ha=(0,et.cloneDeep)(bo.data);Ha.questionList=(Da=Ha==null?void 0:Ha.questionList)==null?void 0:Da.map(La=>La.type===Ar.type?Vl(kl({},La),{questions_score:Ar.scoreTotal}):La),ga({type:"changeQuestionScore",payload:{score:Ar.score,itemType:Ar.type}}),oa({show:!0,data:Ha})},Vo=Ar=>Oo(void 0,null,function*(){const Da={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(Ar){(yield Dt(kl(kl({},Da),Ar))).status===0&&He.ZP.success("\u4FDD\u5B58\u6210\u529F");return}(yield je(oi.id,Da)).status===0&&(He.ZP.success("\u63D0\u4EA4\u6210\u529F"),ct.history.push("/paperlibrary?defaultActiveKey=0"))}),ma=(0,Go.g)(),[ya]=st.default.useForm(),[bo,oa]=(0,le.useState)({show:!1,data:{}}),Io=!!((Ln=zr==null?void 0:zr.exercise)!=null&&Ln.exercise_status)&&((On=zr==null?void 0:zr.exercise)==null?void 0:On.exercise_status)!==1;return ls.createElement(Ct.Provider,{value:{data:zr,disabled:Io,dispatch:ga,setPreview:oa,getData:Va,handlePreview:Bi}},bo.show?ls.createElement(Rs.Z,{key:No,data:bo.data,onExchange:Bi,onTypeScore:Jr,submit:Vo,goBack:()=>oa({show:!1,data:{}})}):ls.createElement("div",{className:Te.wrapper},ls.createElement("div",{className:"edu-container"},ls.createElement(We.Z,{className:Te.breadCrumbWrapper,separator:">",items:oi!=null&&oi.categoryId?[{title:ls.createElement(ct.Link,{to:`/classrooms/${oi.coursesId}/exercise`},(Qi=(ai=(0,Dn.eY)())==null?void 0:ai.course)==null?void 0:Qi.course_name)},{title:ls.createElement(ct.Link,{to:`/classrooms/${oi.coursesId}/exercise`},"\u8BD5\u5377\u5217\u8868")},{title:"\u7F16\u8F91\u8BD5\u5377"}]:[{title:ls.createElement(ct.Link,{to:"/paperlibrary"},"\u8BD5\u5377\u5E93")},{title:"\u968F\u673A\u7EC4\u5377"}]}),ls.createElement(Me.d4,{activeKey:Vi,tabs:[{key:"baseInfo",label:"\u8BD5\u5377\u57FA\u7840\u4FE1\u606F"},{key:"settings",label:"\u7EC4\u5377\u914D\u7F6E"}],onChange:Ar=>Oo(void 0,null,function*(){if(Ar==="settings"&&(yield ya.validateFields(),!Li)){const Da=yield ze(zr);Da.status===0&&ct.history.replace(`/randompaper/edit/${Da==null?void 0:Da.examination_bank_id}?type=settings`)}Ri(Ar)})}),Vi==="baseInfo"&&ls.createElement(sn,{courseOptions:ma,setCurrentKey:Ri,loading:$o,form:ya}),ls.createElement("div",{style:{display:Vi==="settings"?"block":"none"}},zr&&ls.createElement(dr,null)))))}},86918:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Ge}});var le=me(43418),Te={ul:"ul___TdfYY"},He=me(32637),st=me(59301),We=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,bt=(ut,mt)=>{var yt={};for(var De in ut)ct.call(ut,De)&&mt.indexOf(De)<0&&(yt[De]=ut[De]);if(ut!=null&&We)for(var De of We(ut))mt.indexOf(De)<0&&Me.call(ut,De)&&(yt[De]=ut[De]);return yt},Ge=ut=>{var mt=ut,{open:yt,onCancel:De}=mt,te=bt(mt,["open","onCancel"]);return st.createElement(le.default,{centered:!0,open:yt,title:st.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:De,footer:null},st.createElement("div",null,st.createElement("div",{className:"tc"},st.createElement("img",{className:"mt10",src:He,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),st.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),st.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),st.createElement("div",{style:{color:"#333"},className:"pt30 font14"},st.createElement("ul",{className:Te.ul},st.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"),st.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"),st.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")))))}},94860:function(_n,yn,me){"use strict";me.d(yn,{g:function(){return We}});var le=me(59301),Te=me(80401),He=me(26422),st=(ct,Me,bt)=>new Promise((Pt,Ge)=>{var ut=De=>{try{yt(bt.next(De))}catch(te){Ge(te)}},mt=De=>{try{yt(bt.throw(De))}catch(te){Ge(te)}},yt=De=>De.done?Pt(De.value):Promise.resolve(De.value).then(ut,mt);yt((bt=bt.apply(ct,Me)).next())});const We=()=>{const[ct,Me]=(0,le.useState)([]);return(0,le.useEffect)(()=>{st(void 0,null,function*(){const Pt=yield(0,Te.d1)({source:"question"});Pt!=null&&Pt.disciplines&&Me((0,He.L)(Pt==null?void 0:Pt.disciplines))})},[]),ct}},83312:function(_n,yn,me){"use strict";me.d(yn,{U:function(){return Pt}});var le=me(59301),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ct=(Ge,ut,mt)=>ut in Ge?Te(Ge,ut,{enumerable:!0,configurable:!0,writable:!0,value:mt}):Ge[ut]=mt,Me=(Ge,ut)=>{for(var mt in ut||(ut={}))st.call(ut,mt)&&ct(Ge,mt,ut[mt]);if(He)for(var mt of He(ut))We.call(ut,mt)&&ct(Ge,mt,ut[mt]);return Ge},bt=(Ge,ut,mt)=>new Promise((yt,De)=>{var te=se=>{try{ce(mt.next(se))}catch(he){De(he)}},ee=se=>{try{ce(mt.throw(se))}catch(he){De(he)}},ce=se=>se.done?yt(se.value):Promise.resolve(se.value).then(te,ee);ce((mt=mt.apply(Ge,ut)).next())});function Pt(Ge,ut){const[mt,yt]=(0,le.useState)(ut),[De,te]=(0,le.useState)(!1),[ee,ce]=(0,le.useState)();return[mt,De,(he,ve=!1)=>bt(this,null,function*(){const Ee=ve?ut:Me(Me({},mt),he);te(!0),yt(Ee);const Le=yield Ge(Ee);return te(!1),ce(Le),Le}),ee,ce]}},24768:function(_n,yn,me){"use strict";me.d(yn,{AL:function(){return Ee},Iy:function(){return ut},Qv:function(){return De},ez:function(){return ve},jb:function(){return mt}});var le=me(32834),Te=me.n(le),He=me(11690),st=me.n(He);let We=1;function ct(Ye,Xe){const lt=Ye.match(/^(\s+)(?:```)/);if(lt===null)return Xe;const Ze=lt[1];return Xe.split(`
`).map(Lt=>{const rt=Lt.match(/^\s+/);if(rt===null)return Lt;const[Ot]=rt;return Ot.length>=Ze.length?Lt.slice(Ze.length):Lt}).join(`
`)}let Me=[],bt=["<ul>"];const Pt=new(Te()).Renderer,Ge=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ut(){Me.length=0,bt=["<ul>"]}const mt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function yt(Ye,Xe,lt,Ze){if(Xe>=Ye.length||Ye[Xe].level<=lt)return Xe;var Lt=Ye[Xe];Ze.push("<li><a href='#"+We+Lt.anchor+"'>"+Lt.text+"</a>"),Xe++;var rt=[];return Xe=yt(Ye,Xe,Lt.level,rt),rt.length>0&&(Ze.push("<ul>"),rt.forEach(function(Ot){Ze.push(Ot)}),Ze.push("</ul>")),Ze.push("</li>"),Xe=yt(Ye,Xe,lt,Ze),Xe}function De(){return yt(Me,0,0,bt),bt.push("</ul>"),bt.join("")}const te={heading(Ye){const Xe=Ge.exec(Ye);if(We+=1,Xe)return{type:"heading",raw:Xe[0],depth:Xe[1].length,text:Xe[2]}},fences(Ye){const Xe=this.rules.block.fences.exec(Ye);if(Xe){const lt=Xe[0];let Ze=ct(lt,Xe[3]||"");const Lt=Xe[2]?Xe[2].trim():Xe[2];if(["latex","katex","math"].indexOf(Lt)>=0){const rt=se(),Ot=Ze;Ze=rt,he[rt]={type:"block",expression:Ot}}return{type:"code",raw:lt,lang:Lt,text:Ze}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ce=0;const se=()=>`__special_katext_id_${ce++}__`;let he={};function ve(){return he}function Ee(){ce=0,he={}}function Le(Ye){return Ye=Ye.replace(ee,(Xe,lt)=>{const Ze=se();return he[Ze]={type:"inline",expression:lt},Ze}),Ye}const Ne=Pt.listitem;Pt.listitem=function(Ye){return Ne(Le(Ye))};const je=Pt.paragraph;Pt.paragraph=function(Ye){return je(Le(Ye))};const ze=Pt.tablecell;Pt.tablecell=function(Ye,Xe){return ze(Le(Ye),Xe)},Pt.code=function(Ye,Xe,lt){const Ze=(Xe||"").match(/\S*/)[0];return Ze?["latex","katex","math"].indexOf(Ze)>=0?`<p class='editormd-tex'>${Ye}</p>`:`<pre class="prettyprint linenums"><code class="language-${Xe}">${lt?Ye:(0,He.escape)(Ye,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(lt?Ye:(0,He.escape)(Ye,!0))+"</code></pre>"},Pt.heading=function(Ye,Xe,lt){let Ze=this.options.headerPrefix+lt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Me.push({anchor:Ze,level:Xe,text:Ye}),"<h"+Xe+' id="'+We+Ze+'">'+Ye+"</h"+Xe+">"},Te().setOptions({silent:!0,gfm:!0,pedantic:!1}),Te().use({tokenizer:te,renderer:Pt}),yn.ZP=Te()},50371:function(_n,yn){"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(st=>{const We=He[st];We!==void 0&&(le[st]=We)})}return le}yn.Z=me},77578:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return le}});const le=Te=>Te?typeof Te=="function"?Te():Te:null},13845:function(_n,yn,me){"use strict";me.d(yn,{F:function(){return le},Z:function(){return Te}});function le(He){return He!=null&&He===He.window}function Te(He,st){var We,ct;if(typeof window=="undefined")return 0;const Me=st?"scrollTop":"scrollLeft";let bt=0;return le(He)?bt=He[st?"pageYOffset":"pageXOffset"]:He instanceof Document?bt=He.documentElement[Me]:(He instanceof HTMLElement||He)&&(bt=He[Me]),He&&!le(He)&&typeof bt!="number"&&(bt=(ct=((We=He.ownerDocument)!==null&&We!==void 0?We:He).documentElement)===null||ct===void 0?void 0:ct[Me]),bt}},56762:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Te}});var le=me(59301);function Te(){const[,He]=le.useReducer(st=>st+1,0);return He}},68031:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return st}});var le=me(16089);function Te(We,ct,Me,bt){const Pt=Me-ct;return We/=bt/2,We<1?Pt/2*We*We*We+ct:Pt/2*((We-=2)*We*We+2)+ct}var He=me(13845);function st(We){let ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Me=()=>window,callback:bt,duration:Pt=450}=ct,Ge=Me(),ut=(0,He.Z)(Ge,!0),mt=Date.now(),yt=()=>{const te=Date.now()-mt,ee=Te(te>Pt?Pt:te,ut,We,Pt);(0,He.F)(Ge)?Ge.scrollTo(window.pageXOffset,ee):Ge instanceof Document||Ge.constructor.name==="HTMLDocument"?Ge.documentElement.scrollTop=ee:Ge.scrollTop=ee,te<Pt?(0,le.Z)(yt):typeof bt=="function"&&bt()};(0,le.Z)(yt)}},66104:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Ot}});var le=me(92310),Te=me.n(le),He=me(11592),st=me(26112),We=me(59301),ct=me(92343),Me=me(36355),bt=me(84105),Pt=me(91857);const Ge=wt=>{let{children:Dt}=wt;const{getPrefixCls:Wt}=We.useContext(Me.E_),Mt=Wt("breadcrumb");return We.createElement("li",{className:`${Mt}-separator`,"aria-hidden":"true"},Dt===""?Dt:Dt||"/")};Ge.__ANT_BREADCRUMB_SEPARATOR=!0;var ut=Ge,mt=function(wt,Dt){var Wt={};for(var Mt in wt)Object.prototype.hasOwnProperty.call(wt,Mt)&&Dt.indexOf(Mt)<0&&(Wt[Mt]=wt[Mt]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Mt=Object.getOwnPropertySymbols(wt);et<Mt.length;et++)Dt.indexOf(Mt[et])<0&&Object.prototype.propertyIsEnumerable.call(wt,Mt[et])&&(Wt[Mt[et]]=wt[Mt[et]]);return Wt};function yt(wt,Dt){if(wt.title===void 0||wt.title===null)return null;const Wt=Object.keys(Dt).join("|");return typeof wt.title=="object"?wt.title:String(wt.title).replace(new RegExp(`:(${Wt})`,"g"),(Mt,et)=>Dt[et]||Mt)}function De(wt,Dt,Wt,Mt){if(Wt==null)return null;const{className:et,onClick:Ue}=Dt,Rt=mt(Dt,["className","onClick"]),Pn=Object.assign(Object.assign({},(0,st.Z)(Rt,{data:!0,aria:!0})),{onClick:Ue});return Mt!==void 0?We.createElement("a",Object.assign({},Pn,{className:Te()(`${wt}-link`,et),href:Mt}),Wt):We.createElement("span",Object.assign({},Pn,{className:Te()(`${wt}-link`,et)}),Wt)}function te(wt,Dt){return(Mt,et,Ue,Rt,Pn)=>{if(Dt)return Dt(Mt,et,Ue,Rt);const xn=yt(Mt,et);return De(wt,Mt,xn,Pn)}}var ee=function(wt,Dt){var Wt={};for(var Mt in wt)Object.prototype.hasOwnProperty.call(wt,Mt)&&Dt.indexOf(Mt)<0&&(Wt[Mt]=wt[Mt]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Mt=Object.getOwnPropertySymbols(wt);et<Mt.length;et++)Dt.indexOf(Mt[et])<0&&Object.prototype.propertyIsEnumerable.call(wt,Mt[et])&&(Wt[Mt[et]]=wt[Mt[et]]);return Wt};const ce=wt=>{const{prefixCls:Dt,separator:Wt="/",children:Mt,menu:et,overlay:Ue,dropdownProps:Rt,href:Pn}=wt,_t=(qt=>{if(et||Ue){const cn=Object.assign({},Rt);if(et){const Gn=et||{},{items:gn}=Gn,Zn=ee(Gn,["items"]);cn.menu=Object.assign(Object.assign({},Zn),{items:gn==null?void 0:gn.map((Ct,Wn)=>{var{key:di,title:Kt,label:ln,path:$t}=Ct,Tt=ee(Ct,["key","title","label","path"]);let ft=ln!=null?ln:Kt;return $t&&(ft=We.createElement("a",{href:`${Pn}${$t}`},ft)),Object.assign(Object.assign({},Tt),{key:di!=null?di:Wn,label:ft})})})}else Ue&&(cn.overlay=Ue);return We.createElement(Pt.Z,Object.assign({placement:"bottom"},cn),We.createElement("span",{className:`${Dt}-overlay-link`},qt,We.createElement(bt.Z,null)))}return qt})(Mt);return _t!=null?We.createElement(We.Fragment,null,We.createElement("li",null,_t),Wt&&We.createElement(ut,null,Wt)):null},se=wt=>{const{prefixCls:Dt,children:Wt,href:Mt}=wt,et=ee(wt,["prefixCls","children","href"]),{getPrefixCls:Ue}=We.useContext(Me.E_),Rt=Ue("breadcrumb",Dt);return We.createElement(ce,Object.assign({},et,{prefixCls:Rt}),De(Rt,et,Wt,Mt))};se.__ANT_BREADCRUMB_ITEM=!0;var he=se,ve=me(17313),Ee=me(83116),Le=me(37613);const Ne=wt=>{const{componentCls:Dt,iconCls:Wt}=wt;return{[Dt]:Object.assign(Object.assign({},(0,ve.Wf)(wt)),{color:wt.itemColor,fontSize:wt.fontSize,[Wt]:{fontSize:wt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:wt.linkColor,transition:`color ${wt.motionDurationMid}`,padding:`0 ${wt.paddingXXS}px`,borderRadius:wt.borderRadiusSM,height:wt.lineHeight*wt.fontSize,display:"inline-block",marginInline:-wt.marginXXS,"&:hover":{color:wt.linkHoverColor,backgroundColor:wt.colorBgTextHover}},(0,ve.Qy)(wt)),"li:last-child":{color:wt.lastItemColor},[`${Dt}-separator`]:{marginInline:wt.separatorMargin,color:wt.separatorColor},[`${Dt}-link`]:{[`
> ${Wt} + span,
> ${Wt} + a
`]:{marginInlineStart:wt.marginXXS}},[`${Dt}-overlay-link`]:{borderRadius:wt.borderRadiusSM,height:wt.lineHeight*wt.fontSize,display:"inline-block",padding:`0 ${wt.paddingXXS}px`,marginInline:-wt.marginXXS,[`> ${Wt}`]:{marginInlineStart:wt.marginXXS,fontSize:wt.fontSizeIcon},"&:hover":{color:wt.linkHoverColor,backgroundColor:wt.colorBgTextHover,a:{color:wt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${wt.componentCls}-rtl`]:{direction:"rtl"}})}};var je=(0,Ee.Z)("Breadcrumb",wt=>{const Dt=(0,Le.TS)(wt,{});return[Ne(Dt)]},wt=>({itemColor:wt.colorTextDescription,lastItemColor:wt.colorText,iconFontSize:wt.fontSize,linkColor:wt.colorTextDescription,linkHoverColor:wt.colorText,separatorColor:wt.colorTextDescription,separatorMargin:wt.marginXS})),ze=function(wt,Dt){var Wt={};for(var Mt in wt)Object.prototype.hasOwnProperty.call(wt,Mt)&&Dt.indexOf(Mt)<0&&(Wt[Mt]=wt[Mt]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Mt=Object.getOwnPropertySymbols(wt);et<Mt.length;et++)Dt.indexOf(Mt[et])<0&&Object.prototype.propertyIsEnumerable.call(wt,Mt[et])&&(Wt[Mt[et]]=wt[Mt[et]]);return Wt};function Ye(wt){const{breadcrumbName:Dt,children:Wt}=wt,Mt=ze(wt,["breadcrumbName","children"]),et=Object.assign({title:Dt},Mt);return Wt&&(et.menu={items:Wt.map(Ue=>{var{breadcrumbName:Rt}=Ue,Pn=ze(Ue,["breadcrumbName"]);return Object.assign(Object.assign({},Pn),{title:Rt})})}),et}function Xe(wt,Dt){return(0,We.useMemo)(()=>wt||(Dt?Dt.map(Ye):null),[wt,Dt])}var lt=function(wt,Dt){var Wt={};for(var Mt in wt)Object.prototype.hasOwnProperty.call(wt,Mt)&&Dt.indexOf(Mt)<0&&(Wt[Mt]=wt[Mt]);if(wt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var et=0,Mt=Object.getOwnPropertySymbols(wt);et<Mt.length;et++)Dt.indexOf(Mt[et])<0&&Object.prototype.propertyIsEnumerable.call(wt,Mt[et])&&(Wt[Mt[et]]=wt[Mt[et]]);return Wt};const Ze=(wt,Dt)=>{if(Dt===void 0)return Dt;let Wt=(Dt||"").replace(/^\//,"");return Object.keys(wt).forEach(Mt=>{Wt=Wt.replace(`:${Mt}`,wt[Mt])}),Wt},Lt=wt=>{const{prefixCls:Dt,separator:Wt="/",style:Mt,className:et,rootClassName:Ue,routes:Rt,items:Pn,children:xn,itemRender:_t,params:qt={}}=wt,cn=lt(wt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Gn,direction:gn,breadcrumb:Zn}=We.useContext(Me.E_);let Ct;const Wn=Gn("breadcrumb",Dt),[di,Kt]=je(Wn),ln=Xe(Pn,Rt),$t=te(Wn,_t);if(ln&&ln.length>0){const $e=[],Gt=Pn||Rt;Ct=ln.map((Ht,ht)=>{const{path:at,key:Re,type:Pe,menu:ye,overlay:Oe,onClick:Ke,className:Fe,separator:Et,dropdownProps:sn}=Ht,pn=Ze(qt,at);pn!==void 0&&$e.push(pn);const en=Re!=null?Re:ht;if(Pe==="separator")return We.createElement(ut,{key:en},Et);const wn={},hi=ht===ln.length-1;ye?wn.menu=ye:Oe&&(wn.overlay=Oe);let{href:Rn}=Ht;return $e.length&&pn!==void 0&&(Rn=`#/${$e.join("/")}`),We.createElement(ce,Object.assign({key:en},wn,(0,st.Z)(Ht,{data:!0,aria:!0}),{className:Fe,dropdownProps:sn,href:Rn,separator:hi?"":Wt,onClick:Ke,prefixCls:Wn}),$t(Ht,qt,Gt,$e,Rn))})}else if(xn){const $e=(0,He.Z)(xn).length;Ct=(0,He.Z)(xn).map((Gt,Ht)=>{if(!Gt)return Gt;const ht=Ht===$e-1;return(0,ct.Tm)(Gt,{separator:ht?"":Wt,key:Ht})})}const Tt=Te()(Wn,Zn==null?void 0:Zn.className,{[`${Wn}-rtl`]:gn==="rtl"},et,Ue,Kt),ft=Object.assign(Object.assign({},Zn==null?void 0:Zn.style),Mt);return di(We.createElement("nav",Object.assign({className:Tt,style:ft},cn),We.createElement("ol",null,Ct)))};Lt.Item=he,Lt.Separator=ut;var rt=Lt,Ot=rt},19842:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return wr}});var le=me(80702),Te=me(59301),He=me(33853),st=me(58617),We=me(38819),ct=me(92310),Me=me.n(ct),bt=me(72308),Pt=me(52487),Ge=me(74416),ut=me(77861),mt=me(17115),yt=me(90782),De=me(6089),te=me(18929),ee=Te.createContext(null),ce=ee,se=me(62853),he=me(49618),ve=me(77321),Ee="__rc_cascader_search_mark__",Le=function(wi,$i,tr){var ei=tr.label;return $i.some(function($n){return String($n[ei]).toLowerCase().includes(wi.toLowerCase())})},Ne=function(wi,$i,tr,ei){return $i.map(function($n){return $n[ei.label]}).join(" / ")},je=function(Fn,wi,$i,tr,ei,$n){var zt=ei.filter,Vt=zt===void 0?Le:zt,Qe=ei.render,an=Qe===void 0?Ne:Qe,dn=ei.limit,Nt=dn===void 0?50:dn,dt=ei.sort;return Te.useMemo(function(){var nn=[];if(!Fn)return[];function vn(zn,qn){var Ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;zn.forEach(function(Bn){if(!(!dt&&Nt!==!1&&Nt>0&&nn.length>=Nt)){var Kn=[].concat((0,le.Z)(qn),[Bn]),Ci=Bn[$i.children],En=Ft||Bn.disabled;if((!Ci||Ci.length===0||$n)&&Vt(Fn,Kn,{label:$i.label})){var un;nn.push((0,ve.Z)((0,ve.Z)({},Bn),{},(un={disabled:En},(0,he.Z)(un,$i.label,an(Fn,Kn,tr,$i)),(0,he.Z)(un,Ee,Kn),(0,he.Z)(un,$i.children,void 0),un)))}Ci&&vn(Bn[$i.children],Kn,En)}})}return vn(wi,[]),dt&&nn.sort(function(zn,qn){return dt(zn[Ee],qn[Ee],Fn,$i)}),Nt!==!1&&Nt>0?nn.slice(0,Nt):nn},[Fn,wi,$i,tr,an,$n,Vt,dt,Nt])},ze="__RC_CASCADER_SPLIT__",Ye="SHOW_PARENT",Xe="SHOW_CHILD";function lt(Fn){return Fn.join(ze)}function Ze(Fn){return Fn.map(lt)}function Lt(Fn){return Fn.split(ze)}function rt(Fn){var wi=Fn||{},$i=wi.label,tr=wi.value,ei=wi.children,$n=tr||"value";return{label:$i||"label",value:$n,key:$n,children:ei||"children"}}function Ot(Fn,wi){var $i,tr;return($i=Fn.isLeaf)!==null&&$i!==void 0?$i:!((tr=Fn[wi.children])!==null&&tr!==void 0&&tr.length)}function wt(Fn){var wi=Fn.parentElement;if(wi){var $i=Fn.offsetTop-wi.offsetTop;$i-wi.scrollTop<0?wi.scrollTo({top:$i}):$i+Fn.offsetHeight-wi.scrollTop>wi.offsetHeight&&wi.scrollTo({top:$i+Fn.offsetHeight-wi.offsetHeight})}}function Dt(Fn,wi){return Fn.map(function($i){var tr;return(tr=$i[Ee])===null||tr===void 0?void 0:tr.map(function(ei){return ei[wi.value]})})}function Wt(Fn,wi,$i){var tr=new Set(Fn),ei=wi();return Fn.filter(function($n){var zt=ei[$n],Vt=zt?zt.parent:null,Qe=zt?zt.children:null;return zt&&zt.node.disabled?!0:$i===Xe?!(Qe&&Qe.some(function(an){return an.key&&tr.has(an.key)})):!(Vt&&!Vt.node.disabled&&tr.has(Vt.key))})}function Mt(Fn,wi,$i){for(var tr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,ei=wi,$n=[],zt=function(){var an,dn,Nt,dt=Fn[Vt],nn=(an=ei)===null||an===void 0?void 0:an.findIndex(function(zn){var qn=zn[$i.value];return tr?String(qn)===String(dt):qn===dt}),vn=nn!==-1?(dn=ei)===null||dn===void 0?void 0:dn[nn]:null;$n.push({value:(Nt=vn==null?void 0:vn[$i.value])!==null&&Nt!==void 0?Nt:dt,index:nn,option:vn}),ei=vn==null?void 0:vn[$i.children]},Vt=0;Vt<Fn.length;Vt+=1)zt();return $n}var et=function(Fn,wi,$i,tr,ei){return Te.useMemo(function(){var $n=ei||function(zt){var Vt=tr?zt.slice(-1):zt,Qe=" / ";return Vt.every(function(an){return["string","number"].includes((0,se.Z)(an))})?Vt.join(Qe):Vt.reduce(function(an,dn,Nt){var dt=Te.isValidElement(dn)?Te.cloneElement(dn,{key:Nt}):dn;return Nt===0?[dt]:[].concat((0,le.Z)(an),[Qe,dt])},[])};return Fn.map(function(zt){var Vt,Qe,an=Mt(zt,wi,$i),dn=$n(an.map(function(dt){var nn,vn=dt.option,zn=dt.value;return(nn=vn==null?void 0:vn[$i.label])!==null&&nn!==void 0?nn:zn}),an.map(function(dt){var nn=dt.option;return nn})),Nt=lt(zt);return{label:dn,value:Nt,key:Nt,valueCells:zt,disabled:(Vt=an[an.length-1])===null||Vt===void 0||(Qe=Vt.option)===null||Qe===void 0?void 0:Qe.disabled}})},[Fn,wi,$i,ei,tr])},Ue=me(71430),Rt=function(Fn,wi){var $i=Te.useRef({options:null,info:null}),tr=Te.useCallback(function(){return $i.current.options!==Fn&&($i.current.options=Fn,$i.current.info=(0,Ue.I8)(Fn,{fieldNames:wi,initWrapper:function($n){return(0,ve.Z)((0,ve.Z)({},$n),{},{pathKeyEntities:{}})},processEntity:function($n,zt){var Vt=$n.nodes.map(function(Qe){return Qe[wi.value]}).join(ze);zt.pathKeyEntities[Vt]=$n,$n.key=Vt}})),$i.current.info.pathKeyEntities},[wi,Fn]);return tr},Pn=function(Fn,wi){return Te.useCallback(function($i){var tr=[],ei=[];return $i.forEach(function($n){var zt=Mt($n,Fn,wi);zt.every(function(Vt){return Vt.option})?ei.push($n):tr.push($n)}),[ei,tr]},[Fn,wi])},xn=me(48736);function _t(Fn){return Te.useMemo(function(){if(!Fn)return[!1,{}];var wi={matchInputWidth:!0,limit:50};return Fn&&(0,se.Z)(Fn)==="object"&&(wi=(0,ve.Z)((0,ve.Z)({},wi),Fn)),wi.limit<=0&&delete wi.limit,[!0,wi]},[Fn])}var qt=Te.memo(function(Fn){var wi=Fn.children;return wi},function(Fn,wi){return!wi.open}),cn=qt;function Gn(Fn){var wi,$i=Fn.prefixCls,tr=Fn.checked,ei=Fn.halfChecked,$n=Fn.disabled,zt=Fn.onClick,Vt=Fn.disableCheckbox,Qe=Te.useContext(ce),an=Qe.checkable,dn=typeof an!="boolean"?an:null;return Te.createElement("span",{className:Me()("".concat($i),(wi={},(0,he.Z)(wi,"".concat($i,"-checked"),tr),(0,he.Z)(wi,"".concat($i,"-indeterminate"),!tr&&ei),(0,he.Z)(wi,"".concat($i,"-disabled"),$n||Vt),wi)),onClick:zt},dn)}var gn="__cascader_fix_label__";function Zn(Fn){var wi=Fn.prefixCls,$i=Fn.multiple,tr=Fn.options,ei=Fn.activeValue,$n=Fn.prevValuePath,zt=Fn.onToggleOpen,Vt=Fn.onSelect,Qe=Fn.onActive,an=Fn.checkedSet,dn=Fn.halfCheckedSet,Nt=Fn.loadingKeys,dt=Fn.isSelectable,nn=Fn.searchValue,vn="".concat(wi,"-menu"),zn="".concat(wi,"-menu-item"),qn=Te.useContext(ce),Ft=qn.fieldNames,Bn=qn.changeOnSelect,Kn=qn.expandTrigger,Ci=qn.expandIcon,En=qn.loadingIcon,un=qn.dropdownMenuColumnStyle,bn=Kn==="hover",Ei=Te.useMemo(function(){return tr.map(function(Ni){var mi,Di=Ni.disabled,Ai=Ni.disableCheckbox,gr=Ni[Ee],Or=(mi=Ni[gn])!==null&&mi!==void 0?mi:Ni[Ft.label],Hr=Ni[Ft.value],jn=Ot(Ni,Ft),Po=gr?gr.map(function(Hi){return Hi[Ft.value]}):[].concat((0,le.Z)($n),[Hr]),Wr=lt(Po),ro=Nt.includes(Wr),Mn=an.has(Wr),ii=dn.has(Wr);return{disabled:Di,label:Or,value:Hr,isLeaf:jn,isLoading:ro,checked:Mn,halfChecked:ii,option:Ni,disableCheckbox:Ai,fullPath:Po,fullPathKey:Wr}})},[tr,an,Ft,dn,Nt,$n]);return Te.createElement("ul",{className:vn,role:"menu"},Ei.map(function(Ni){var mi,Di=Ni.disabled,Ai=Ni.label,gr=Ni.value,Or=Ni.isLeaf,Hr=Ni.isLoading,jn=Ni.checked,Po=Ni.halfChecked,Wr=Ni.option,ro=Ni.fullPath,Mn=Ni.fullPathKey,ii=Ni.disableCheckbox,Hi=function(){if(!(Di||nn)){var Vr=(0,le.Z)(ro);bn&&Or&&Vr.pop(),Qe(Vr)}},xr=function(){dt(Wr)&&Vt(ro,Or)},qi;return typeof Wr.title=="string"?qi=Wr.title:typeof Ai=="string"&&(qi=Ai),Te.createElement("li",{key:Mn,className:Me()(zn,(mi={},(0,he.Z)(mi,"".concat(zn,"-expand"),!Or),(0,he.Z)(mi,"".concat(zn,"-active"),ei===gr||ei===Mn),(0,he.Z)(mi,"".concat(zn,"-disabled"),Di),(0,he.Z)(mi,"".concat(zn,"-loading"),Hr),mi)),style:un,role:"menuitemcheckbox",title:qi,"aria-checked":jn,"data-path-key":Mn,onClick:function(){Hi(),!ii&&(!$i||Or)&&xr()},onDoubleClick:function(){Bn&&zt(!1)},onMouseEnter:function(){bn&&Hi()},onMouseDown:function(Vr){Vr.preventDefault()}},$i&&Te.createElement(Gn,{prefixCls:"".concat(wi,"-checkbox"),checked:jn,halfChecked:Po,disabled:Di||ii,disableCheckbox:ii,onClick:function(Vr){ii||(Vr.stopPropagation(),xr())}}),Te.createElement("div",{className:"".concat(zn,"-content")},Ai),!Hr&&Ci&&!Or&&Te.createElement("div",{className:"".concat(zn,"-expand-icon")},Ci),Hr&&En&&Te.createElement("div",{className:"".concat(zn,"-loading-icon")},En))}))}var Ct=function(){var Fn=(0,ut.lk)(),wi=Fn.multiple,$i=Fn.open,tr=Te.useContext(ce),ei=tr.values,$n=Te.useState([]),zt=(0,Pt.Z)($n,2),Vt=zt[0],Qe=zt[1];return Te.useEffect(function(){if($i&&!wi){var an=ei[0];Qe(an||[])}},[$i]),[Vt,Qe]},Wn=me(10228),di=function(Fn,wi,$i,tr,ei,$n){var zt=(0,ut.lk)(),Vt=zt.direction,Qe=zt.searchValue,an=zt.toggleOpen,dn=zt.open,Nt=Vt==="rtl",dt=Te.useMemo(function(){for(var un=-1,bn=wi,Ei=[],Ni=[],mi=tr.length,Di=Dt(wi,$i),Ai=function(Wr){var ro=bn.findIndex(function(Mn,ii){return(Di[ii]?lt(Di[ii]):Mn[$i.value])===tr[Wr]});if(ro===-1)return"break";un=ro,Ei.push(un),Ni.push(tr[Wr]),bn=bn[un][$i.children]},gr=0;gr<mi&&bn;gr+=1){var Or=Ai(gr);if(Or==="break")break}for(var Hr=wi,jn=0;jn<Ei.length-1;jn+=1)Hr=Hr[Ei[jn]][$i.children];return[Ni,un,Hr,Di]},[tr,$i,wi]),nn=(0,Pt.Z)(dt,4),vn=nn[0],zn=nn[1],qn=nn[2],Ft=nn[3],Bn=function(bn){ei(bn)},Kn=function(bn){var Ei=qn.length,Ni=zn;Ni===-1&&bn<0&&(Ni=Ei);for(var mi=0;mi<Ei;mi+=1){Ni=(Ni+bn+Ei)%Ei;var Di=qn[Ni];if(Di&&!Di.disabled){var Ai=vn.slice(0,-1).concat(Ft[Ni]?lt(Ft[Ni]):Di[$i.value]);Bn(Ai);return}}},Ci=function(){if(vn.length>1){var bn=vn.slice(0,-1);Bn(bn)}else an(!1)},En=function(){var bn,Ei=((bn=qn[zn])===null||bn===void 0?void 0:bn[$i.children])||[],Ni=Ei.find(function(Di){return!Di.disabled});if(Ni){var mi=[].concat((0,le.Z)(vn),[Ni[$i.value]]);Bn(mi)}};Te.useImperativeHandle(Fn,function(){return{onKeyDown:function(bn){var Ei=bn.which;switch(Ei){case Wn.Z.UP:case Wn.Z.DOWN:{var Ni=0;Ei===Wn.Z.UP?Ni=-1:Ei===Wn.Z.DOWN&&(Ni=1),Ni!==0&&Kn(Ni);break}case Wn.Z.LEFT:{if(Qe)break;Nt?En():Ci();break}case Wn.Z.RIGHT:{if(Qe)break;Nt?Ci():En();break}case Wn.Z.BACKSPACE:{Qe||Ci();break}case Wn.Z.ENTER:{if(vn.length){var mi=qn[zn],Di=(mi==null?void 0:mi[Ee])||[];Di.length?$n(Di.map(function(Ai){return Ai[$i.value]}),Di[Di.length-1]):$n(vn,qn[zn])}break}case Wn.Z.ESC:an(!1),dn&&bn.stopPropagation()}},onKeyUp:function(){}}})},Kt=Te.forwardRef(function(Fn,wi){var $i,tr,ei,$n,zt=(0,ut.lk)(),Vt=zt.prefixCls,Qe=zt.multiple,an=zt.searchValue,dn=zt.toggleOpen,Nt=zt.notFoundContent,dt=zt.direction,nn=zt.open,vn=Te.useRef(),zn=dt==="rtl",qn=Te.useContext(ce),Ft=qn.options,Bn=qn.values,Kn=qn.halfValues,Ci=qn.fieldNames,En=qn.changeOnSelect,un=qn.onSelect,bn=qn.searchOptions,Ei=qn.dropdownPrefixCls,Ni=qn.loadData,mi=qn.expandTrigger,Di=Ei||Vt,Ai=Te.useState([]),gr=(0,Pt.Z)(Ai,2),Or=gr[0],Hr=gr[1],jn=function(nr){if(!(!Ni||an)){var qo=Mt(nr,Ft,Ci),Go=qo.map(function(mo){var Yo=mo.option;return Yo}),Br=Go[Go.length-1];if(Br&&!Ot(Br,Ci)){var Er=lt(nr);Hr(function(mo){return[].concat((0,le.Z)(mo),[Er])}),Ni(Go)}}};Te.useEffect(function(){Or.length&&Or.forEach(function(Qo){var nr=Lt(Qo),qo=Mt(nr,Ft,Ci,!0).map(function(Br){var Er=Br.option;return Er}),Go=qo[qo.length-1];(!Go||Go[Ci.children]||Ot(Go,Ci))&&Hr(function(Br){return Br.filter(function(Er){return Er!==Qo})})})},[Ft,Or,Ci]);var Po=Te.useMemo(function(){return new Set(Ze(Bn))},[Bn]),Wr=Te.useMemo(function(){return new Set(Ze(Kn))},[Kn]),ro=Ct(),Mn=(0,Pt.Z)(ro,2),ii=Mn[0],Hi=Mn[1],xr=function(nr){Hi(nr),jn(nr)},qi=function(nr){var qo=nr.disabled,Go=Ot(nr,Ci);return!qo&&(Go||En||Qe)},pr=function(nr,qo){var Go=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;un(nr),!Qe&&(qo||En&&(mi==="hover"||Go))&&dn(!1)},Vr=Te.useMemo(function(){return an?bn:Ft},[an,bn,Ft]),jr=Te.useMemo(function(){for(var Qo=[{options:Vr}],nr=Vr,qo=Dt(nr,Ci),Go=function(){var Yo=ii[Br],Ki=nr.find(function(sa,va){return(qo[va]?lt(qo[va]):sa[Ci.value])===Yo}),ot=Ki==null?void 0:Ki[Ci.children];if(!(ot!=null&&ot.length))return"break";nr=ot,Qo.push({options:ot})},Br=0;Br<ii.length;Br+=1){var Er=Go();if(Er==="break")break}return Qo},[Vr,ii,Ci]),kr=function(nr,qo){qi(qo)&&pr(nr,Ot(qo,Ci),!0)};di(wi,Vr,Ci,ii,xr,kr),Te.useEffect(function(){for(var Qo=0;Qo<ii.length;Qo+=1){var nr,qo=ii.slice(0,Qo+1),Go=lt(qo),Br=(nr=vn.current)===null||nr===void 0?void 0:nr.querySelector('li[data-path-key="'.concat(Go.replace(/\\{0,2}"/g,'\\"'),'"]'));Br&&wt(Br)}},[ii]);var Kr=!(($i=jr[0])!==null&&$i!==void 0&&(tr=$i.options)!==null&&tr!==void 0&&tr.length),Yn=[(ei={},(0,he.Z)(ei,Ci.value,"__EMPTY__"),(0,he.Z)(ei,gn,Nt),(0,he.Z)(ei,"disabled",!0),ei)],Ho=(0,ve.Z)((0,ve.Z)({},Fn),{},{multiple:!Kr&&Qe,onSelect:pr,onActive:xr,onToggleOpen:dn,checkedSet:Po,halfCheckedSet:Wr,loadingKeys:Or,isSelectable:qi}),Xn=Kr?[{options:Yn}]:jr,Ao=Xn.map(function(Qo,nr){var qo=ii.slice(0,nr),Go=ii[nr];return Te.createElement(Zn,(0,bt.Z)({key:nr},Ho,{searchValue:an,prefixCls:Di,options:Qo.options,prevValuePath:qo,activeValue:Go}))});return Te.createElement(cn,{open:nn},Te.createElement("div",{className:Me()("".concat(Di,"-menus"),($n={},(0,he.Z)($n,"".concat(Di,"-menu-empty"),Kr),(0,he.Z)($n,"".concat(Di,"-rtl"),zn),$n)),ref:vn},Ao))}),ln=Kt;function $t(Fn){var wi=Fn.onPopupVisibleChange,$i=Fn.popupVisible,tr=Fn.popupClassName,ei=Fn.popupPlacement;warning(!wi,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning($i===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(tr===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(ei===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Tt(Fn,wi){if(Fn){var $i=function tr(ei){for(var $n=0;$n<ei.length;$n++){var zt=ei[$n];if(zt[wi==null?void 0:wi.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(zt[wi==null?void 0:wi.children])&&tr(zt[wi==null?void 0:wi.children]))return!0}};$i(Fn)}}var ft=null,$e=["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 Gt(Fn){return Array.isArray(Fn)&&Array.isArray(Fn[0])}function Ht(Fn){return Fn?Gt(Fn)?Fn:(Fn.length===0?[]:[Fn]).map(function(wi){return Array.isArray(wi)?wi:[wi]}):[]}var ht=Te.forwardRef(function(Fn,wi){var $i=Fn.id,tr=Fn.prefixCls,ei=tr===void 0?"rc-cascader":tr,$n=Fn.fieldNames,zt=Fn.defaultValue,Vt=Fn.value,Qe=Fn.changeOnSelect,an=Fn.onChange,dn=Fn.displayRender,Nt=Fn.checkable,dt=Fn.autoClearSearchValue,nn=dt===void 0?!0:dt,vn=Fn.searchValue,zn=Fn.onSearch,qn=Fn.showSearch,Ft=Fn.expandTrigger,Bn=Fn.options,Kn=Fn.dropdownPrefixCls,Ci=Fn.loadData,En=Fn.popupVisible,un=Fn.open,bn=Fn.popupClassName,Ei=Fn.dropdownClassName,Ni=Fn.dropdownMenuColumnStyle,mi=Fn.popupPlacement,Di=Fn.placement,Ai=Fn.onDropdownVisibleChange,gr=Fn.onPopupVisibleChange,Or=Fn.expandIcon,Hr=Or===void 0?">":Or,jn=Fn.loadingIcon,Po=Fn.children,Wr=Fn.dropdownMatchSelectWidth,ro=Wr===void 0?!1:Wr,Mn=Fn.showCheckedStrategy,ii=Mn===void 0?Ye:Mn,Hi=(0,Ge.Z)(Fn,$e),xr=(0,mt.ZP)($i),qi=!!Nt,pr=(0,te.Z)(zt,{value:Vt,postState:Ht}),Vr=(0,Pt.Z)(pr,2),jr=Vr[0],kr=Vr[1],Kr=Te.useMemo(function(){return rt($n)},[JSON.stringify($n)]),Yn=Te.useMemo(function(){return Bn||[]},[Bn]),Ho=Rt(Yn,Kr),Xn=Te.useCallback(function(Ca){var fa=Ho();return Ca.map(function($a){var Qa=fa[$a].nodes;return Qa.map(function(Es){return Es[Kr.value]})})},[Ho,Kr]),Ao=(0,te.Z)("",{value:vn,postState:function(fa){return fa||""}}),Qo=(0,Pt.Z)(Ao,2),nr=Qo[0],qo=Qo[1],Go=function(fa,$a){qo(fa),$a.source!=="blur"&&zn&&zn(fa)},Br=_t(qn),Er=(0,Pt.Z)(Br,2),mo=Er[0],Yo=Er[1],Ki=je(nr,Yn,Kr,Kn||ei,Yo,Qe),ot=Pn(Yn,Kr),sa=Te.useMemo(function(){var Ca=ot(jr),fa=(0,Pt.Z)(Ca,2),$a=fa[0],Qa=fa[1];if(!qi||!jr.length)return[$a,[],Qa];var Es=Ze($a),ys=Ho(),Zs=(0,yt.S)(Es,!0,ys),Dn=Zs.checkedKeys,Ss=Zs.halfCheckedKeys;return[Xn(Dn),Xn(Ss),Qa]},[qi,jr,Ho,Xn,ot]),va=(0,Pt.Z)(sa,3),Ma=va[0],hs=va[1],Ga=va[2],Lo=Te.useMemo(function(){var Ca=Ze(Ma),fa=Wt(Ca,Ho,ii);return[].concat((0,le.Z)(Ga),(0,le.Z)(Xn(fa)))},[Ma,Ho,Xn,Ga,ii]),po=et(Lo,Yn,Kr,qi,dn),la=(0,De.Z)(function(Ca){if(kr(Ca),an){var fa=Ht(Ca),$a=fa.map(function(ys){return Mt(ys,Yn,Kr).map(function(Zs){return Zs.option})}),Qa=qi?fa:fa[0],Es=qi?$a:$a[0];an(Qa,Es)}}),Eo=(0,De.Z)(function(Ca){if((!qi||nn)&&qo(""),!qi)la(Ca);else{var fa=lt(Ca),$a=Ze(Ma),Qa=Ze(hs),Es=$a.includes(fa),ys=Ga.some(function(eu){return lt(eu)===fa}),Zs=Ma,Dn=Ga;if(ys&&!Es)Dn=Ga.filter(function(eu){return lt(eu)!==fa});else{var Ss=Es?$a.filter(function(eu){return eu!==fa}):[].concat((0,le.Z)($a),[fa]),ra=Ho(),hl;if(Es){var Ol=(0,yt.S)(Ss,{checked:!1,halfCheckedKeys:Qa},ra);hl=Ol.checkedKeys}else{var ns=(0,yt.S)(Ss,!0,ra);hl=ns.checkedKeys}var yu=Wt(hl,Ho,ii);Zs=Xn(yu)}la([].concat((0,le.Z)(Dn),(0,le.Z)(Zs)))}}),Na=function(fa,$a){if($a.type==="clear"){la([]);return}var Qa=$a.values[0],Es=Qa.valueCells;Eo(Es)},os=un!==void 0?un:En,xo=Ei||bn,Yr=Di||mi,vi=function(fa){Ai==null||Ai(fa),gr==null||gr(fa)},no=Te.useMemo(function(){return{options:Yn,fieldNames:Kr,values:Ma,halfValues:hs,changeOnSelect:Qe,onSelect:Eo,checkable:Nt,searchOptions:Ki,dropdownPrefixCls:Kn,loadData:Ci,expandTrigger:Ft,expandIcon:Hr,loadingIcon:jn,dropdownMenuColumnStyle:Ni}},[Yn,Kr,Ma,hs,Qe,Eo,Nt,Ki,Kn,Ci,Ft,Hr,jn,Ni]),io=!(nr?Ki:Yn).length,Ja=nr&&Yo.matchInputWidth||io?{}:{minWidth:"auto"};return Te.createElement(ce.Provider,{value:no},Te.createElement(ut.Ac,(0,bt.Z)({},Hi,{ref:wi,id:xr,prefixCls:ei,autoClearSearchValue:nn,dropdownMatchSelectWidth:ro,dropdownStyle:Ja,displayValues:po,onDisplayValuesChange:Na,mode:qi?"multiple":void 0,searchValue:nr,onSearch:Go,showSearch:mo,OptionList:ln,emptyOptions:io,open:os,dropdownClassName:xo,placement:Yr,onDropdownVisibleChange:vi,getRawInputElement:function(){return Po}})))});ht.SHOW_PARENT=Ye,ht.SHOW_CHILD=Xe;var at=ht,Re=at,Pe=me(2738),ye=me(62892),Oe=me(53487),Ke=me(19080),Fe=me(36355),Et=me(93891),sn=me(1684),pn=me(19716),en=me(32441),wn=me(14154),hi=me(58582),Rn=me(84443),Sn=me(66339),Pi=me(33234),zi=me(98447),Zi=me(17313),ir=me(74207),Nr=me(83116);const pi=Fn=>{const{prefixCls:wi,componentCls:$i,antCls:tr}=Fn,ei=`${$i}-menu-item`,$n=`
&${ei}-expand ${ei}-expand-icon,
${ei}-loading-icon
`;return[{[$i]:{width:Fn.controlWidth}},{[`${$i}-dropdown`]:[(0,zi.C2)(`${wi}-checkbox`,Fn),{[`&${tr}-select-dropdown`]:{padding:0}},{[$i]:{"&-checkbox":{top:0,marginInlineEnd:Fn.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${$i}-menu-empty`]:{[`${$i}-menu`]:{width:"100%",height:"auto",[ei]:{color:Fn.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:Fn.controlItemWidth,height:Fn.dropdownHeight,margin:0,padding:Fn.menuPadding,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${Fn.lineWidth}px ${Fn.lineType} ${Fn.colorSplit}`},"&-item":Object.assign(Object.assign({},Zi.vS),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:Fn.optionPadding,lineHeight:Fn.lineHeight,cursor:"pointer",transition:`all ${Fn.motionDurationMid}`,borderRadius:Fn.borderRadiusSM,"&:hover":{background:Fn.controlItemBgHover},"&-disabled":{color:Fn.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[$n]:{color:Fn.colorTextDisabled}},[`&-active:not(${ei}-disabled)`]:{"&, &:hover":{fontWeight:Fn.optionSelectedFontWeight,backgroundColor:Fn.optionSelectedBg}},"&-content":{flex:"auto"},[$n]:{marginInlineStart:Fn.paddingXXS,color:Fn.colorTextDescription,fontSize:Fn.fontSizeIcon},"&-keyword":{color:Fn.colorHighlight}})}}}]},{[`${$i}-dropdown-rtl`]:{direction:"rtl"}},(0,ir.c)(Fn)]};var li=(0,Nr.Z)("Cascader",Fn=>[pi(Fn)],Fn=>{const wi=Math.round((Fn.controlHeight-Fn.fontSize*Fn.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:Fn.controlItemBgActive,optionSelectedFontWeight:Fn.fontWeightStrong,optionPadding:`${wi}px ${Fn.paddingSM}px`,menuPadding:Fn.paddingXXS}}),xi=function(Fn,wi){var $i={};for(var tr in Fn)Object.prototype.hasOwnProperty.call(Fn,tr)&&wi.indexOf(tr)<0&&($i[tr]=Fn[tr]);if(Fn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ei=0,tr=Object.getOwnPropertySymbols(Fn);ei<tr.length;ei++)wi.indexOf(tr[ei])<0&&Object.prototype.propertyIsEnumerable.call(Fn,tr[ei])&&($i[tr[ei]]=Fn[tr[ei]]);return $i};const{SHOW_CHILD:Gi,SHOW_PARENT:Oi}=Re;function to(Fn,wi,$i){const tr=Fn.toLowerCase().split(wi).reduce((zt,Vt,Qe)=>Qe===0?[Vt]:[].concat((0,le.Z)(zt),[wi,Vt]),[]),ei=[];let $n=0;return tr.forEach((zt,Vt)=>{const Qe=$n+zt.length;let an=Fn.slice($n,Qe);$n=Qe,Vt%2===1&&(an=Te.createElement("span",{className:`${$i}-menu-item-keyword`,key:`separator-${Vt}`},an)),ei.push(an)}),ei}const eo=(Fn,wi,$i,tr)=>{const ei=[],$n=Fn.toLowerCase();return wi.forEach((zt,Vt)=>{Vt!==0&&ei.push(" / ");let Qe=zt[tr.label];const an=typeof Qe;(an==="string"||an==="number")&&(Qe=to(String(Qe),$n,$i)),ei.push(Qe)}),ei},Be=Te.forwardRef((Fn,wi)=>{const{prefixCls:$i,size:tr,disabled:ei,className:$n,rootClassName:zt,multiple:Vt,bordered:Qe=!0,transitionName:an,choiceTransitionName:dn="",popupClassName:Nt,dropdownClassName:dt,expandIcon:nn,placement:vn,showSearch:zn,allowClear:qn=!0,notFoundContent:Ft,direction:Bn,getPopupContainer:Kn,status:Ci,showArrow:En,builtinPlacements:un,style:bn}=Fn,Ei=xi(Fn,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),Ni=(0,Pe.Z)(Ei,["suffixIcon"]),{getPopupContainer:mi,getPrefixCls:Di,renderEmpty:Ai,direction:gr,popupOverflow:Or,cascader:Hr}=Te.useContext(Fe.E_),jn=Bn||gr,Po=jn==="rtl",{status:Wr,hasFeedback:ro,isFormItemInput:Mn,feedbackIcon:ii}=Te.useContext(en.aM),Hi=(0,Ke.F)(Wr,Ci),xr=Ft||(Ai==null?void 0:Ai("Cascader"))||Te.createElement(Et.Z,{componentName:"Cascader"}),qi=Di(),pr=Di("select",$i),Vr=Di("cascader",$i),[jr,kr]=(0,wn.Z)(pr),[Kr]=li(Vr),{compactSize:Yn,compactItemClassnames:Ho}=(0,Pi.ri)(pr,Bn),Xn=Me()(Nt||dt,`${Vr}-dropdown`,{[`${Vr}-dropdown-rtl`]:jn==="rtl"},zt,kr),Ao=Te.useMemo(()=>{if(!zn)return zn;let Ga={render:eo};return typeof zn=="object"&&(Ga=Object.assign(Object.assign({},Ga),zn)),Ga},[zn]),Qo=(0,pn.Z)(Ga=>{var Lo;return(Lo=tr!=null?tr:Yn)!==null&&Lo!==void 0?Lo:Ga}),nr=Te.useContext(sn.Z),qo=ei!=null?ei:nr;let Go=nn;nn||(Go=Po?Te.createElement(He.Z,null):Te.createElement(We.Z,null));const Br=Te.createElement("span",{className:`${pr}-menu-item-loading-icon`},Te.createElement(st.Z,{spin:!0})),Er=Te.useMemo(()=>Vt?Te.createElement("span",{className:`${Vr}-checkbox-inner`}):!1,[Vt]),mo=(0,Rn.Z)(Fn.suffixIcon,En),{suffixIcon:Yo,removeIcon:Ki,clearIcon:ot}=(0,Sn.Z)(Object.assign(Object.assign({},Fn),{hasFeedback:ro,feedbackIcon:ii,showSuffixIcon:mo,multiple:Vt,prefixCls:pr,componentName:"Cascader"})),sa=Te.useMemo(()=>vn!==void 0?vn:Po?"bottomRight":"bottomLeft",[vn,Po]),va=(0,hi.Z)(un,Or),Ma=qn===!0?{clearIcon:ot}:qn,hs=Te.createElement(Re,Object.assign({prefixCls:pr,className:Me()(!$i&&Vr,{[`${pr}-lg`]:Qo==="large",[`${pr}-sm`]:Qo==="small",[`${pr}-rtl`]:Po,[`${pr}-borderless`]:!Qe,[`${pr}-in-form-item`]:Mn},(0,Ke.Z)(pr,Hi,ro),Ho,Hr==null?void 0:Hr.className,$n,zt,kr),disabled:qo,style:Object.assign(Object.assign({},Hr==null?void 0:Hr.style),bn)},Ni,{builtinPlacements:va,direction:jn,placement:sa,notFoundContent:xr,allowClear:Ma,showSearch:Ao,expandIcon:Go,suffixIcon:Yo,removeIcon:Ki,loadingIcon:Br,checkable:Er,dropdownClassName:Xn,dropdownPrefixCls:$i||Vr,choiceTransitionName:(0,ye.m)(qi,"",dn),transitionName:(0,ye.m)(qi,"slide-up",an),getPopupContainer:Kn||mi,ref:wi}));return Kr(jr(hs))}),Fi=(0,Oe.Z)(Be);Be.SHOW_PARENT=Oi,Be.SHOW_CHILD=Gi,Be._InternalPanelDoNotUseOrYouWillBeFired=Fi;var wr=Be},24905:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return je}});var le=me(92310),Te=me.n(le),He=me(5630),st=me(59301),We=me(36355),ct=me(1684),Me=me(32441),Pt=st.createContext(null),Ge=me(98447),ut=me(14088),mt=me(4572),yt=function(ze,Ye){var Xe={};for(var lt in ze)Object.prototype.hasOwnProperty.call(ze,lt)&&Ye.indexOf(lt)<0&&(Xe[lt]=ze[lt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,lt=Object.getOwnPropertySymbols(ze);Ze<lt.length;Ze++)Ye.indexOf(lt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ze,lt[Ze])&&(Xe[lt[Ze]]=ze[lt[Ze]]);return Xe};const De=(ze,Ye)=>{var Xe;const{prefixCls:lt,className:Ze,rootClassName:Lt,children:rt,indeterminate:Ot=!1,style:wt,onMouseEnter:Dt,onMouseLeave:Wt,skipGroup:Mt=!1,disabled:et}=ze,Ue=yt(ze,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:Rt,direction:Pn,checkbox:xn}=st.useContext(We.E_),_t=st.useContext(Pt),{isFormItemInput:qt}=st.useContext(Me.aM),cn=st.useContext(ct.Z),Gn=(Xe=(_t==null?void 0:_t.disabled)||et)!==null&&Xe!==void 0?Xe:cn,gn=st.useRef(Ue.value);st.useEffect(()=>{_t==null||_t.registerValue(Ue.value)},[]),st.useEffect(()=>{if(!Mt)return Ue.value!==gn.current&&(_t==null||_t.cancelValue(gn.current),_t==null||_t.registerValue(Ue.value),gn.current=Ue.value),()=>_t==null?void 0:_t.cancelValue(Ue.value)},[Ue.value]);const Zn=Rt("checkbox",lt),[Ct,Wn]=(0,Ge.ZP)(Zn),di=Object.assign({},Ue);_t&&!Mt&&(di.onChange=function(){Ue.onChange&&Ue.onChange.apply(Ue,arguments),_t.toggleOption&&_t.toggleOption({label:rt,value:Ue.value})},di.name=_t.name,di.checked=_t.value.includes(Ue.value));const Kt=Te()(`${Zn}-wrapper`,{[`${Zn}-rtl`]:Pn==="rtl",[`${Zn}-wrapper-checked`]:di.checked,[`${Zn}-wrapper-disabled`]:Gn,[`${Zn}-wrapper-in-form-item`]:qt},xn==null?void 0:xn.className,Ze,Lt,Wn),ln=Te()({[`${Zn}-indeterminate`]:Ot},mt.A,Wn),$t=Ot?"mixed":void 0;return Ct(st.createElement(ut.Z,{component:"Checkbox",disabled:Gn},st.createElement("label",{className:Kt,style:Object.assign(Object.assign({},xn==null?void 0:xn.style),wt),onMouseEnter:Dt,onMouseLeave:Wt},st.createElement(He.Z,Object.assign({"aria-checked":$t},di,{prefixCls:Zn,className:ln,disabled:Gn,ref:Ye})),rt!==void 0&&st.createElement("span",null,rt))))};var ee=st.forwardRef(De),ce=me(80702),se=me(2738),he=function(ze,Ye){var Xe={};for(var lt in ze)Object.prototype.hasOwnProperty.call(ze,lt)&&Ye.indexOf(lt)<0&&(Xe[lt]=ze[lt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,lt=Object.getOwnPropertySymbols(ze);Ze<lt.length;Ze++)Ye.indexOf(lt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ze,lt[Ze])&&(Xe[lt[Ze]]=ze[lt[Ze]]);return Xe};const ve=(ze,Ye)=>{const{defaultValue:Xe,children:lt,options:Ze=[],prefixCls:Lt,className:rt,rootClassName:Ot,style:wt,onChange:Dt}=ze,Wt=he(ze,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:Mt,direction:et}=st.useContext(We.E_),[Ue,Rt]=st.useState(Wt.value||Xe||[]),[Pn,xn]=st.useState([]);st.useEffect(()=>{"value"in Wt&&Rt(Wt.value||[])},[Wt.value]);const _t=st.useMemo(()=>Ze.map(Tt=>typeof Tt=="string"||typeof Tt=="number"?{label:Tt,value:Tt}:Tt),[Ze]),qt=Tt=>{xn(ft=>ft.filter($e=>$e!==Tt))},cn=Tt=>{xn(ft=>[].concat((0,ce.Z)(ft),[Tt]))},Gn=Tt=>{const ft=Ue.indexOf(Tt.value),$e=(0,ce.Z)(Ue);ft===-1?$e.push(Tt.value):$e.splice(ft,1),"value"in Wt||Rt($e),Dt==null||Dt($e.filter(Gt=>Pn.includes(Gt)).sort((Gt,Ht)=>{const ht=_t.findIndex(Re=>Re.value===Gt),at=_t.findIndex(Re=>Re.value===Ht);return ht-at}))},gn=Mt("checkbox",Lt),Zn=`${gn}-group`,[Ct,Wn]=(0,Ge.ZP)(gn),di=(0,se.Z)(Wt,["value","disabled"]),Kt=Ze.length?_t.map(Tt=>st.createElement(ee,{prefixCls:gn,key:Tt.value.toString(),disabled:"disabled"in Tt?Tt.disabled:Wt.disabled,value:Tt.value,checked:Ue.includes(Tt.value),onChange:Tt.onChange,className:`${Zn}-item`,style:Tt.style,title:Tt.title},Tt.label)):lt,ln={toggleOption:Gn,value:Ue,disabled:Wt.disabled,name:Wt.name,registerValue:cn,cancelValue:qt},$t=Te()(Zn,{[`${Zn}-rtl`]:et==="rtl"},rt,Ot,Wn);return Ct(st.createElement("div",Object.assign({className:$t,style:wt},di,{ref:Ye}),st.createElement(Pt.Provider,{value:ln},Kt)))},Ee=st.forwardRef(ve);var Le=st.memo(Ee);const Ne=ee;Ne.Group=Le,Ne.__ANT_CHECKBOX=!0;var je=Ne},98447:function(_n,yn,me){"use strict";me.d(yn,{C2:function(){return We}});var le=me(17313),Te=me(37613),He=me(83116);const st=ct=>{const{checkboxCls:Me}=ct,bt=`${Me}-wrapper`;return[{[`${Me}-group`]:Object.assign(Object.assign({},(0,le.Wf)(ct)),{display:"inline-flex",flexWrap:"wrap",columnGap:ct.marginXS,[`> ${ct.antCls}-row`]:{flex:1}}),[bt]:Object.assign(Object.assign({},(0,le.Wf)(ct)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${bt}`]:{marginInlineStart:0},[`&${bt}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Me]:Object.assign(Object.assign({},(0,le.Wf)(ct)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:ct.borderRadiusSM,alignSelf:"center",[`${Me}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Me}-inner`]:Object.assign({},(0,le.oN)(ct))},[`${Me}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:ct.checkboxSize,height:ct.checkboxSize,direction:"ltr",backgroundColor:ct.colorBgContainer,border:`${ct.lineWidth}px ${ct.lineType} ${ct.colorBorder}`,borderRadius:ct.borderRadiusSM,borderCollapse:"separate",transition:`all ${ct.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:ct.checkboxSize/14*5,height:ct.checkboxSize/14*8,border:`${ct.lineWidthBold}px solid ${ct.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${ct.motionDurationFast} ${ct.motionEaseInBack}, opacity ${ct.motionDurationFast}`}},"& + span":{paddingInlineStart:ct.paddingXS,paddingInlineEnd:ct.paddingXS}})},{[`
${bt}:not(${bt}-disabled),
${Me}:not(${Me}-disabled)
`]:{[`&:hover ${Me}-inner`]:{borderColor:ct.colorPrimary}},[`${bt}:not(${bt}-disabled)`]:{[`&:hover ${Me}-checked:not(${Me}-disabled) ${Me}-inner`]:{backgroundColor:ct.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Me}-checked:not(${Me}-disabled):after`]:{borderColor:ct.colorPrimaryHover}}},{[`${Me}-checked`]:{[`${Me}-inner`]:{backgroundColor:ct.colorPrimary,borderColor:ct.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${ct.motionDurationMid} ${ct.motionEaseOutBack} ${ct.motionDurationFast}`}}},[`
${bt}-checked:not(${bt}-disabled),
${Me}-checked:not(${Me}-disabled)
`]:{[`&:hover ${Me}-inner`]:{backgroundColor:ct.colorPrimaryHover,borderColor:"transparent"}}},{[Me]:{"&-indeterminate":{[`${Me}-inner`]:{backgroundColor:ct.colorBgContainer,borderColor:ct.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:ct.fontSizeLG/2,height:ct.fontSizeLG/2,backgroundColor:ct.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${bt}-disabled`]:{cursor:"not-allowed"},[`${Me}-disabled`]:{[`&, ${Me}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Me}-inner`]:{background:ct.colorBgContainerDisabled,borderColor:ct.colorBorder,"&:after":{borderColor:ct.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:ct.colorTextDisabled},[`&${Me}-indeterminate ${Me}-inner::after`]:{background:ct.colorTextDisabled}}}]};function We(ct,Me){const bt=(0,Te.TS)(Me,{checkboxCls:`.${ct}`,checkboxSize:Me.controlInteractiveSize});return[st(bt)]}yn.ZP=(0,He.Z)("Checkbox",(ct,Me)=>{let{prefixCls:bt}=Me;return[We(bt,ct)]})},36381:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return di}});var le=me(38819),Te=me(92310),He=me.n(Te),st=me(72308),We=me(80702),ct=me(52487),Me=me(62853),bt=me(18929),Pt=me(48736),Ge=me(59301),ut=me(74416),mt=me(11592),yt=me(49618),De=me(77900),te=me(10228),ee=Ge.forwardRef(function(Kt,ln){var $t=Kt.prefixCls,Tt=Kt.forceRender,ft=Kt.className,$e=Kt.style,Gt=Kt.children,Ht=Kt.isActive,ht=Kt.role,at=Ge.useState(Ht||Tt),Re=(0,ct.Z)(at,2),Pe=Re[0],ye=Re[1];return Ge.useEffect(function(){(Tt||Ht)&&ye(!0)},[Tt,Ht]),Pe?Ge.createElement("div",{ref:ln,className:He()("".concat($t,"-content"),(0,yt.Z)((0,yt.Z)({},"".concat($t,"-content-active"),Ht),"".concat($t,"-content-inactive"),!Ht),ft),style:$e,role:ht},Ge.createElement("div",{className:"".concat($t,"-content-box")},Gt)):null});ee.displayName="PanelContent";var ce=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],he=Ge.forwardRef(function(Kt,ln){var $t=Kt.showArrow,Tt=$t===void 0?!0:$t,ft=Kt.headerClass,$e=Kt.isActive,Gt=Kt.onItemClick,Ht=Kt.forceRender,ht=Kt.className,at=Kt.prefixCls,Re=Kt.collapsible,Pe=Kt.accordion,ye=Kt.panelKey,Oe=Kt.extra,Ke=Kt.header,Fe=Kt.expandIcon,Et=Kt.openMotion,sn=Kt.destroyInactivePanel,pn=Kt.children,en=(0,ut.Z)(Kt,se),wn=Re==="disabled",hi=Re==="header",Rn=Re==="icon",Sn=Oe!=null&&typeof Oe!="boolean",Pi=function(){Gt==null||Gt(ye)},zi=function(xi){(xi.key==="Enter"||xi.keyCode===te.Z.ENTER||xi.which===te.Z.ENTER)&&Pi()},Zi=typeof Fe=="function"?Fe(Kt):Ge.createElement("i",{className:"arrow"});Zi&&(Zi=Ge.createElement("div",{className:"".concat(at,"-expand-icon"),onClick:["header","icon"].includes(Re)?Pi:void 0},Zi));var ir=He()((0,yt.Z)((0,yt.Z)((0,yt.Z)({},"".concat(at,"-item"),!0),"".concat(at,"-item-active"),$e),"".concat(at,"-item-disabled"),wn),ht),Nr=He()(ft,(0,yt.Z)((0,yt.Z)((0,yt.Z)({},"".concat(at,"-header"),!0),"".concat(at,"-header-collapsible-only"),hi),"".concat(at,"-icon-collapsible-only"),Rn)),pi={className:Nr,"aria-expanded":$e,"aria-disabled":wn,onKeyDown:zi};return!hi&&!Rn&&(pi.onClick=Pi,pi.role=Pe?"tab":"button",pi.tabIndex=wn?-1:0),Ge.createElement("div",(0,st.Z)({},en,{ref:ln,className:ir}),Ge.createElement("div",pi,Tt&&Zi,Ge.createElement("span",{className:"".concat(at,"-header-text"),onClick:Re==="header"?Pi:void 0},Ke),Sn&&Ge.createElement("div",{className:"".concat(at,"-extra")},Oe)),Ge.createElement(De.default,(0,st.Z)({visible:$e,leavedClassName:"".concat(at,"-content-hidden")},Et,{forceRender:Ht,removeOnLeave:sn}),function(li,xi){var Gi=li.className,Oi=li.style;return Ge.createElement(ce,{ref:xi,prefixCls:at,className:Gi,style:Oi,isActive:$e,forceRender:Ht,role:Pe?"tabpanel":void 0},pn)}))}),ve=he,Ee=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Le=function(ln,$t){var Tt=$t.prefixCls,ft=$t.accordion,$e=$t.collapsible,Gt=$t.destroyInactivePanel,Ht=$t.onItemClick,ht=$t.activeKey,at=$t.openMotion,Re=$t.expandIcon;return ln.map(function(Pe,ye){var Oe=Pe.children,Ke=Pe.label,Fe=Pe.key,Et=Pe.collapsible,sn=Pe.onItemClick,pn=Pe.destroyInactivePanel,en=(0,ut.Z)(Pe,Ee),wn=String(Fe!=null?Fe:ye),hi=Et!=null?Et:$e,Rn=pn!=null?pn:Gt,Sn=function(Zi){hi!=="disabled"&&(Ht(Zi),sn==null||sn(Zi))},Pi=!1;return ft?Pi=ht[0]===wn:Pi=ht.indexOf(wn)>-1,Ge.createElement(ve,(0,st.Z)({},en,{prefixCls:Tt,key:wn,panelKey:wn,isActive:Pi,accordion:ft,openMotion:at,expandIcon:Re,header:Ke,collapsible:hi,onItemClick:Sn,destroyInactivePanel:Rn}),Oe)})},Ne=function(ln,$t,Tt){if(!ln)return null;var ft=Tt.prefixCls,$e=Tt.accordion,Gt=Tt.collapsible,Ht=Tt.destroyInactivePanel,ht=Tt.onItemClick,at=Tt.activeKey,Re=Tt.openMotion,Pe=Tt.expandIcon,ye=ln.key||String($t),Oe=ln.props,Ke=Oe.header,Fe=Oe.headerClass,Et=Oe.destroyInactivePanel,sn=Oe.collapsible,pn=Oe.onItemClick,en=!1;$e?en=at[0]===ye:en=at.indexOf(ye)>-1;var wn=sn!=null?sn:Gt,hi=function(Pi){wn!=="disabled"&&(ht(Pi),pn==null||pn(Pi))},Rn={key:ye,panelKey:ye,header:Ke,headerClass:Fe,isActive:en,prefixCls:ft,destroyInactivePanel:Et!=null?Et:Ht,openMotion:Re,accordion:$e,children:ln.props.children,onItemClick:hi,expandIcon:Pe,collapsible:wn};return typeof ln.type=="string"?ln:(Object.keys(Rn).forEach(function(Sn){typeof Rn[Sn]=="undefined"&&delete Rn[Sn]}),Ge.cloneElement(ln,Rn))};function je(Kt,ln,$t){return Array.isArray(Kt)?Le(Kt,$t):(0,mt.Z)(ln).map(function(Tt,ft){return Ne(Tt,ft,$t)})}var ze=je,Ye=me(26112);function Xe(Kt){var ln=Kt;if(!Array.isArray(ln)){var $t=(0,Me.Z)(ln);ln=$t==="number"||$t==="string"?[ln]:[]}return ln.map(function(Tt){return String(Tt)})}var lt=Ge.forwardRef(function(Kt,ln){var $t=Kt.prefixCls,Tt=$t===void 0?"rc-collapse":$t,ft=Kt.destroyInactivePanel,$e=ft===void 0?!1:ft,Gt=Kt.style,Ht=Kt.accordion,ht=Kt.className,at=Kt.children,Re=Kt.collapsible,Pe=Kt.openMotion,ye=Kt.expandIcon,Oe=Kt.activeKey,Ke=Kt.defaultActiveKey,Fe=Kt.onChange,Et=Kt.items,sn=He()(Tt,ht),pn=(0,bt.Z)([],{value:Oe,onChange:function(zi){return Fe==null?void 0:Fe(zi)},defaultValue:Ke,postState:Xe}),en=(0,ct.Z)(pn,2),wn=en[0],hi=en[1],Rn=function(zi){return hi(function(){if(Ht)return wn[0]===zi?[]:[zi];var Zi=wn.indexOf(zi),ir=Zi>-1;return ir?wn.filter(function(Nr){return Nr!==zi}):[].concat((0,We.Z)(wn),[zi])})};(0,Pt.ZP)(!at,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Sn=ze(Et,at,{prefixCls:Tt,accordion:Ht,openMotion:Pe,expandIcon:ye,collapsible:Re,destroyInactivePanel:$e,onItemClick:Rn,activeKey:wn});return Ge.createElement("div",(0,st.Z)({ref:ln,className:sn,style:Gt,role:Ht?"tablist":void 0},(0,Ye.Z)(Kt,{aria:!0,data:!0})),Sn)}),Ze=Object.assign(lt,{Panel:ve}),Lt=Ze,rt=Ze.Panel,Ot=me(2738),wt=me(62892),Dt=me(92343),Wt=me(36355),Mt=me(19716),Ue=Ge.forwardRef((Kt,ln)=>{const{getPrefixCls:$t}=Ge.useContext(Wt.E_),{prefixCls:Tt,className:ft,showArrow:$e=!0}=Kt,Gt=$t("collapse",Tt),Ht=He()({[`${Gt}-no-arrow`]:!$e},ft);return Ge.createElement(Lt.Panel,Object.assign({ref:ln},Kt,{prefixCls:Gt,className:Ht}))}),Rt=me(17313),Pn=me(8378),xn=me(83116),_t=me(37613);const qt=Kt=>{const{componentCls:ln,contentBg:$t,padding:Tt,headerBg:ft,headerPadding:$e,collapseHeaderPaddingSM:Gt,collapseHeaderPaddingLG:Ht,collapsePanelBorderRadius:ht,lineWidth:at,lineType:Re,colorBorder:Pe,colorText:ye,colorTextHeading:Oe,colorTextDisabled:Ke,fontSize:Fe,fontSizeLG:Et,lineHeight:sn,marginSM:pn,paddingSM:en,paddingLG:wn,paddingXS:hi,motionDurationSlow:Rn,fontSizeIcon:Sn,contentPadding:Pi}=Kt,zi=`${at}px ${Re} ${Pe}`;return{[ln]:Object.assign(Object.assign({},(0,Rt.Wf)(Kt)),{backgroundColor:ft,border:zi,borderBottom:0,borderRadius:`${ht}px`,"&-rtl":{direction:"rtl"},[`& > ${ln}-item`]:{borderBottom:zi,"&:last-child":{[`
&,
& > ${ln}-header`]:{borderRadius:`0 0 ${ht}px ${ht}px`}},[`> ${ln}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:$e,color:Oe,lineHeight:sn,cursor:"pointer",transition:`all ${Rn}, visibility 0s`,[`> ${ln}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${ln}-expand-icon`]:{height:Fe*sn,display:"flex",alignItems:"center",paddingInlineEnd:pn},[`${ln}-arrow`]:Object.assign(Object.assign({},(0,Rt.Ro)()),{fontSize:Sn,svg:{transition:`transform ${Rn}`}}),[`${ln}-header-text`]:{marginInlineEnd:"auto"}},[`${ln}-header-collapsible-only`]:{cursor:"default",[`${ln}-header-text`]:{flex:"none",cursor:"pointer"}},[`${ln}-icon-collapsible-only`]:{cursor:"default",[`${ln}-expand-icon`]:{cursor:"pointer"}}},[`${ln}-content`]:{color:ye,backgroundColor:$t,borderTop:zi,[`& > ${ln}-content-box`]:{padding:Pi},"&-hidden":{display:"none"}},"&-small":{[`> ${ln}-item`]:{[`> ${ln}-header`]:{padding:Gt,paddingInlineStart:hi,[`> ${ln}-expand-icon`]:{marginInlineStart:en-hi}},[`> ${ln}-content > ${ln}-content-box`]:{padding:en}}},"&-large":{[`> ${ln}-item`]:{fontSize:Et,[`> ${ln}-header`]:{padding:Ht,paddingInlineStart:Tt,[`> ${ln}-expand-icon`]:{height:Et*sn,marginInlineStart:wn-Tt}},[`> ${ln}-content > ${ln}-content-box`]:{padding:wn}}},[`${ln}-item:last-child`]:{[`> ${ln}-content`]:{borderRadius:`0 0 ${ht}px ${ht}px`}},[`& ${ln}-item-disabled > ${ln}-header`]:{"\n &,\n & > .arrow\n ":{color:Ke,cursor:"not-allowed"}},[`&${ln}-icon-position-end`]:{[`& > ${ln}-item`]:{[`> ${ln}-header`]:{[`${ln}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:pn}}}}})}},cn=Kt=>{const{componentCls:ln}=Kt,$t=`> ${ln}-item > ${ln}-header ${ln}-arrow svg`;return{[`${ln}-rtl`]:{[$t]:{transform:"rotate(180deg)"}}}},Gn=Kt=>{const{componentCls:ln,headerBg:$t,paddingXXS:Tt,colorBorder:ft}=Kt;return{[`${ln}-borderless`]:{backgroundColor:$t,border:0,[`> ${ln}-item`]:{borderBottom:`1px solid ${ft}`},[`
> ${ln}-item:last-child,
> ${ln}-item:last-child ${ln}-header
`]:{borderRadius:0},[`> ${ln}-item:last-child`]:{borderBottom:0},[`> ${ln}-item > ${ln}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${ln}-item > ${ln}-content > ${ln}-content-box`]:{paddingTop:Tt}}}},gn=Kt=>{const{componentCls:ln,paddingSM:$t}=Kt;return{[`${ln}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${ln}-item`]:{borderBottom:0,[`> ${ln}-content`]:{backgroundColor:"transparent",border:0,[`> ${ln}-content-box`]:{paddingBlock:$t}}}}}};var Zn=(0,xn.Z)("Collapse",Kt=>{const ln=(0,_t.TS)(Kt,{collapseHeaderPaddingSM:`${Kt.paddingXS}px ${Kt.paddingSM}px`,collapseHeaderPaddingLG:`${Kt.padding}px ${Kt.paddingLG}px`,collapsePanelBorderRadius:Kt.borderRadiusLG});return[qt(ln),Gn(ln),gn(ln),cn(ln),(0,Pn.Z)(ln)]},Kt=>({headerPadding:`${Kt.paddingSM}px ${Kt.padding}px`,headerBg:Kt.colorFillAlter,contentPadding:`${Kt.padding}px 16px`,contentBg:Kt.colorBgContainer})),Wn=Object.assign(Ge.forwardRef((Kt,ln)=>{const{getPrefixCls:$t,direction:Tt,collapse:ft}=Ge.useContext(Wt.E_),{prefixCls:$e,className:Gt,rootClassName:Ht,style:ht,bordered:at=!0,ghost:Re,size:Pe,expandIconPosition:ye="start",children:Oe,expandIcon:Ke}=Kt,Fe=(0,Mt.Z)(zi=>{var Zi;return(Zi=Pe!=null?Pe:zi)!==null&&Zi!==void 0?Zi:"middle"}),Et=$t("collapse",$e),sn=$t(),[pn,en]=Zn(Et),wn=Ge.useMemo(()=>ye==="left"?"start":ye==="right"?"end":ye,[ye]),hi=function(){let zi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const Zi=Ke?Ke(zi):Ge.createElement(le.Z,{rotate:zi.isActive?90:void 0});return(0,Dt.Tm)(Zi,()=>({className:He()(Zi.props.className,`${Et}-arrow`)}))},Rn=He()(`${Et}-icon-position-${wn}`,{[`${Et}-borderless`]:!at,[`${Et}-rtl`]:Tt==="rtl",[`${Et}-ghost`]:!!Re,[`${Et}-${Fe}`]:Fe!=="middle"},ft==null?void 0:ft.className,Gt,Ht,en),Sn=Object.assign(Object.assign({},(0,wt.Z)(sn)),{motionAppear:!1,leavedClassName:`${Et}-content-hidden`}),Pi=Ge.useMemo(()=>Oe?(0,mt.Z)(Oe).map((zi,Zi)=>{var ir,Nr;if(!((ir=zi.props)===null||ir===void 0)&&ir.disabled){const pi=(Nr=zi.key)!==null&&Nr!==void 0?Nr:String(Zi),{disabled:li,collapsible:xi}=zi.props,Gi=Object.assign(Object.assign({},(0,Ot.Z)(zi.props,["disabled"])),{key:pi,collapsible:xi!=null?xi:li?"disabled":void 0});return(0,Dt.Tm)(zi,Gi)}return zi}):null,[Oe]);return pn(Ge.createElement(Lt,Object.assign({ref:ln,openMotion:Sn},(0,Ot.Z)(Kt,["rootClassName"]),{expandIcon:hi,prefixCls:Et,className:Rn,style:Object.assign(Object.assign({},ft==null?void 0:ft.style),ht)}),Pi))}),{Panel:Ue}),di=Wn},93891:function(_n,yn,me){"use strict";var le=me(59301),Te=me(36355),He=me(64165);const st=We=>{const{componentName:ct}=We,{getPrefixCls:Me}=(0,le.useContext)(Te.E_),bt=Me("empty");switch(ct){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:`${bt}-small`});default:return le.createElement(He.Z,null)}};yn.Z=st},28103:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return mt}});var le=me(92310),Te=me.n(le),He=me(59301),st=me(36355),We=me(17313),ct=me(83116),Me=me(37613);const bt=yt=>{const{componentCls:De,sizePaddingEdgeHorizontal:te,colorSplit:ee,lineWidth:ce,textPaddingInline:se,orientationMargin:he,verticalMarginInline:ve}=yt;return{[De]:Object.assign(Object.assign({},(0,We.Wf)(yt)),{borderBlockStart:`${ce}px solid ${ee}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:ve,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${ce}px solid ${ee}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${yt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${De}-with-text`]:{display:"flex",alignItems:"center",margin:`${yt.dividerHorizontalWithTextGutterMargin}px 0`,color:yt.colorTextHeading,fontWeight:500,fontSize:yt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${ee}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${ce}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${De}-with-text-left`]:{"&::before":{width:`${he*100}%`},"&::after":{width:`${100-he*100}%`}},[`&-horizontal${De}-with-text-right`]:{"&::before":{width:`${100-he*100}%`},"&::after":{width:`${he*100}%`}},[`${De}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:se},"&-dashed":{background:"none",borderColor:ee,borderStyle:"dashed",borderWidth:`${ce}px 0 0`},[`&-horizontal${De}-with-text${De}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${De}-dashed`]:{borderInlineStartWidth:ce,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${De}-with-text`]:{color:yt.colorText,fontWeight:"normal",fontSize:yt.fontSize},[`&-horizontal${De}-with-text-left${De}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${De}-inner-text`]:{paddingInlineStart:te}},[`&-horizontal${De}-with-text-right${De}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${De}-inner-text`]:{paddingInlineEnd:te}}})}};var Pt=(0,ct.Z)("Divider",yt=>{const De=(0,Me.TS)(yt,{dividerHorizontalWithTextGutterMargin:yt.margin,dividerHorizontalGutterMargin:yt.marginLG,sizePaddingEdgeHorizontal:0});return[bt(De)]},yt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:yt.marginXS})),Ge=function(yt,De){var te={};for(var ee in yt)Object.prototype.hasOwnProperty.call(yt,ee)&&De.indexOf(ee)<0&&(te[ee]=yt[ee]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,ee=Object.getOwnPropertySymbols(yt);ce<ee.length;ce++)De.indexOf(ee[ce])<0&&Object.prototype.propertyIsEnumerable.call(yt,ee[ce])&&(te[ee[ce]]=yt[ee[ce]]);return te},mt=yt=>{const{getPrefixCls:De,direction:te,divider:ee}=He.useContext(st.E_),{prefixCls:ce,type:se="horizontal",orientation:he="center",orientationMargin:ve,className:Ee,rootClassName:Le,children:Ne,dashed:je,plain:ze,style:Ye}=yt,Xe=Ge(yt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),lt=De("divider",ce),[Ze,Lt]=Pt(lt),rt=he.length>0?`-${he}`:he,Ot=!!Ne,wt=he==="left"&&ve!=null,Dt=he==="right"&&ve!=null,Wt=Te()(lt,ee==null?void 0:ee.className,Lt,`${lt}-${se}`,{[`${lt}-with-text`]:Ot,[`${lt}-with-text${rt}`]:Ot,[`${lt}-dashed`]:!!je,[`${lt}-plain`]:!!ze,[`${lt}-rtl`]:te==="rtl",[`${lt}-no-default-orientation-margin-left`]:wt,[`${lt}-no-default-orientation-margin-right`]:Dt},Ee,Le),Mt=He.useMemo(()=>typeof ve=="number"?ve:/^\d+$/.test(ve)?Number(ve):ve,[ve]),et=Object.assign(Object.assign({},wt&&{marginLeft:Mt}),Dt&&{marginRight:Mt});return Ze(He.createElement("div",Object.assign({className:Wt,style:Object.assign(Object.assign({},ee==null?void 0:ee.style),Ye)},Xe,{role:"separator"}),Ne&&se!=="vertical"&&He.createElement("span",{className:`${lt}-inner-text`,style:et},Ne)))}},91857:function(_n,yn,me){"use strict";var le=me(59301),Te=me(38819),He=me(92310),st=me.n(He),We=me(31561),ct=me(70425),Me=me(18929),bt=me(2738),Pt=me(79676),Ge=me(53487),ut=me(92343),mt=me(36355),yt=me(20834),De=me(40875),te=me(88088),ee=me(47211);const ce=null,se=Le=>{const{menu:Ne,arrow:je,prefixCls:ze,children:Ye,trigger:Xe,disabled:lt,dropdownRender:Ze,getPopupContainer:Lt,overlayClassName:rt,rootClassName:Ot,open:wt,onOpenChange:Dt,visible:Wt,onVisibleChange:Mt,mouseEnterDelay:et=.15,mouseLeaveDelay:Ue=.1,autoAdjustOverflow:Rt=!0,placement:Pn="",overlay:xn,transitionName:_t}=Le,{getPopupContainer:qt,getPrefixCls:cn,direction:Gn}=le.useContext(mt.E_),gn=le.useMemo(()=>{const ye=cn();return _t!==void 0?_t:Pn.includes("top")?`${ye}-slide-down`:`${ye}-slide-up`},[cn,Pn,_t]),Zn=le.useMemo(()=>Pn?Pn.includes("Center")?Pn.slice(0,Pn.indexOf("Center")):Pn:Gn==="rtl"?"bottomRight":"bottomLeft",[Pn,Gn]),Ct=cn("dropdown",ze),[Wn,di]=(0,ee.Z)(Ct),[,Kt]=(0,te.Z)(),ln=le.Children.only(Ye),$t=(0,ut.Tm)(ln,{className:st()(`${Ct}-trigger`,{[`${Ct}-rtl`]:Gn==="rtl"},ln.props.className),disabled:lt}),Tt=lt?[]:Xe;let ft;Tt&&Tt.includes("contextMenu")&&(ft=!0);const[$e,Gt]=(0,Me.Z)(!1,{value:wt!=null?wt:Wt}),Ht=(0,ct.useEvent)(ye=>{Dt==null||Dt(ye),Mt==null||Mt(ye),Gt(ye)}),ht=st()(rt,Ot,di,{[`${Ct}-rtl`]:Gn==="rtl"}),at=(0,Pt.Z)({arrowPointAtCenter:typeof je=="object"&&je.pointAtCenter,autoAdjustOverflow:Rt,offset:Kt.marginXXS,arrowWidth:je?Kt.sizePopupArrow:0,borderRadius:Kt.borderRadius}),Re=le.useCallback(()=>{Gt(!1)},[]),Pe=()=>{let ye;return Ne!=null&&Ne.items?ye=le.createElement(yt.default,Object.assign({},Ne)):typeof xn=="function"?ye=xn():ye=xn,Ze&&(ye=Ze(ye)),ye=le.Children.only(typeof ye=="string"?le.createElement("span",null,ye):ye),le.createElement(De.J,{prefixCls:`${Ct}-menu`,expandIcon:le.createElement("span",{className:`${Ct}-menu-submenu-arrow`},le.createElement(Te.Z,{className:`${Ct}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Re,validator:Oe=>{let{mode:Ke}=Oe}},ye)};return Wn(le.createElement(We.Z,Object.assign({alignPoint:ft},(0,bt.Z)(Le,["rootClassName"]),{mouseEnterDelay:et,mouseLeaveDelay:Ue,visible:$e,builtinPlacements:at,arrow:!!je,overlayClassName:ht,prefixCls:Ct,getPopupContainer:Lt||qt,transitionName:gn,trigger:Tt,overlay:Pe,placement:Zn,onVisibleChange:Ht}),$t))};function he(Le){return Object.assign(Object.assign({},Le),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ve=(0,Ge.Z)(se,"dropdown",Le=>Le,he),Ee=Le=>le.createElement(ve,Object.assign({},Le),le.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=Ee,yn.Z=se},38854:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return te}});var le=me(91857),Te=me(92310),He=me.n(Te),st=me(59301),We=me(18785),ct=me(3113),Me=me(36355),bt=me(81327),Pt=me(33234),Ge=me(47211),ut=function(ee,ce){var se={};for(var he in ee)Object.prototype.hasOwnProperty.call(ee,he)&&ce.indexOf(he)<0&&(se[he]=ee[he]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,he=Object.getOwnPropertySymbols(ee);ve<he.length;ve++)ce.indexOf(he[ve])<0&&Object.prototype.propertyIsEnumerable.call(ee,he[ve])&&(se[he[ve]]=ee[he[ve]]);return se};const mt=ee=>{const{getPopupContainer:ce,getPrefixCls:se,direction:he}=st.useContext(Me.E_),{prefixCls:ve,type:Ee="default",danger:Le,disabled:Ne,loading:je,onClick:ze,htmlType:Ye,children:Xe,className:lt,menu:Ze,arrow:Lt,autoFocus:rt,overlay:Ot,trigger:wt,align:Dt,open:Wt,onOpenChange:Mt,placement:et,getPopupContainer:Ue,href:Rt,icon:Pn=st.createElement(We.Z,null),title:xn,buttonsRender:_t=Pe=>Pe,mouseEnterDelay:qt,mouseLeaveDelay:cn,overlayClassName:Gn,overlayStyle:gn,destroyPopupOnHide:Zn,dropdownRender:Ct}=ee,Wn=ut(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"]),di=se("dropdown",ve),Kt=`${di}-button`,[ln,$t]=(0,Ge.Z)(di),Tt={menu:Ze,arrow:Lt,autoFocus:rt,align:Dt,disabled:Ne,trigger:Ne?[]:wt,onOpenChange:Mt,getPopupContainer:Ue||ce,mouseEnterDelay:qt,mouseLeaveDelay:cn,overlayClassName:Gn,overlayStyle:gn,destroyPopupOnHide:Zn,dropdownRender:Ct},{compactSize:ft,compactItemClassnames:$e}=(0,Pt.ri)(di,he),Gt=He()(Kt,$e,lt,$t);"overlay"in ee&&(Tt.overlay=Ot),"open"in ee&&(Tt.open=Wt),"placement"in ee?Tt.placement=et:Tt.placement=he==="rtl"?"bottomLeft":"bottomRight";const Ht=st.createElement(ct.ZP,{type:Ee,danger:Le,disabled:Ne,loading:je,onClick:ze,htmlType:Ye,href:Rt,title:xn},Xe),ht=st.createElement(ct.ZP,{type:Ee,danger:Le,icon:Pn}),[at,Re]=_t([Ht,ht]);return ln(st.createElement(bt.Z.Compact,Object.assign({className:Gt,size:ft,block:!0},Wn),at,st.createElement(le.Z,Object.assign({},Tt),Re)))};mt.__ANT_BUTTON=!0;var yt=mt;const De=le.Z;De.Button=yt;var te=De},47211:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return ut}});var le=me(17313),Te=me(13826),He=me(92899),st=me(29878),We=me(19447),ct=me(83116),Me=me(37613),Pt=mt=>{const{componentCls:yt,menuCls:De,colorError:te,colorTextLightSolid:ee}=mt,ce=`${De}-item`;return{[`${yt}, ${yt}-menu-submenu`]:{[`${De} ${ce}`]:{[`&${ce}-danger:not(${ce}-disabled)`]:{color:te,"&:hover":{color:ee,backgroundColor:te}}}}}};const Ge=mt=>{const{componentCls:yt,menuCls:De,zIndexPopup:te,dropdownArrowDistance:ee,sizePopupArrow:ce,antCls:se,iconCls:he,motionDurationMid:ve,dropdownPaddingVertical:Ee,fontSize:Le,dropdownEdgeChildPadding:Ne,colorTextDisabled:je,fontSizeIcon:ze,controlPaddingHorizontal:Ye,colorBgElevated:Xe}=mt;return[{[yt]:Object.assign(Object.assign({},(0,le.Wf)(mt)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te,display:"block","&::before":{position:"absolute",insetBlock:-ee+ce/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${he}-down, & > ${se}-btn-icon > ${he}-down`]:{fontSize:ze}},[`${yt}-wrap`]:{position:"relative",[`${se}-btn > ${he}-down`]:{fontSize:ze},[`${he}-down::before`]:{transition:`transform ${ve}`}},[`${yt}-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${yt}-placement-bottomLeft,
&${se}-slide-down-appear${se}-slide-down-appear-active${yt}-placement-bottomLeft,
&${se}-slide-down-enter${se}-slide-down-enter-active${yt}-placement-bottom,
&${se}-slide-down-appear${se}-slide-down-appear-active${yt}-placement-bottom,
&${se}-slide-down-enter${se}-slide-down-enter-active${yt}-placement-bottomRight,
&${se}-slide-down-appear${se}-slide-down-appear-active${yt}-placement-bottomRight`]:{animationName:Te.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${yt}-placement-topLeft,
&${se}-slide-up-appear${se}-slide-up-appear-active${yt}-placement-topLeft,
&${se}-slide-up-enter${se}-slide-up-enter-active${yt}-placement-top,
&${se}-slide-up-appear${se}-slide-up-appear-active${yt}-placement-top,
&${se}-slide-up-enter${se}-slide-up-enter-active${yt}-placement-topRight,
&${se}-slide-up-appear${se}-slide-up-appear-active${yt}-placement-topRight`]:{animationName:Te.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${yt}-placement-bottomLeft,
&${se}-slide-down-leave${se}-slide-down-leave-active${yt}-placement-bottom,
&${se}-slide-down-leave${se}-slide-down-leave-active${yt}-placement-bottomRight`]:{animationName:Te.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${yt}-placement-topLeft,
&${se}-slide-up-leave${se}-slide-up-leave-active${yt}-placement-top,
&${se}-slide-up-leave${se}-slide-up-leave-active${yt}-placement-topRight`]:{animationName:Te.ly}})},(0,We.ZP)(mt,{colorBg:Xe,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${yt} ${De}`]:{position:"relative",margin:0},[`${De}-submenu-popup`]:{position:"absolute",zIndex:te,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${yt}, ${yt}-menu-submenu`]:{[De]:Object.assign(Object.assign({padding:Ne,listStyleType:"none",backgroundColor:Xe,backgroundClip:"padding-box",borderRadius:mt.borderRadiusLG,outline:"none",boxShadow:mt.boxShadowSecondary},(0,le.Qy)(mt)),{[`${De}-item-group-title`]:{padding:`${Ee}px ${Ye}px`,color:mt.colorTextDescription,transition:`all ${ve}`},[`${De}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${De}-item-icon`]:{minWidth:Le,marginInlineEnd:mt.marginXS,fontSize:mt.fontSizeSM},[`${De}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ve}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${De}-item, ${De}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Ee}px ${Ye}px`,color:mt.colorText,fontWeight:"normal",fontSize:Le,lineHeight:mt.lineHeight,cursor:"pointer",transition:`all ${ve}`,borderRadius:mt.borderRadiusSM,"&:hover, &-active":{backgroundColor:mt.controlItemBgHover}},(0,le.Qy)(mt)),{"&-selected":{color:mt.colorPrimary,backgroundColor:mt.controlItemBgActive,"&:hover, &-active":{backgroundColor:mt.controlItemBgActiveHover}},"&-disabled":{color:je,cursor:"not-allowed","&:hover":{color:je,backgroundColor:Xe,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${mt.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:mt.colorSplit},[`${yt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:mt.paddingXS,[`${yt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:mt.colorTextDescription,fontSize:ze,fontStyle:"normal"}}}),[`${De}-item-group-list`]:{margin:`0 ${mt.marginXS}px`,padding:0,listStyle:"none"},[`${De}-submenu-title`]:{paddingInlineEnd:Ye+mt.fontSizeSM},[`${De}-submenu-vertical`]:{position:"relative"},[`${De}-submenu${De}-submenu-disabled ${yt}-menu-submenu-title`]:{[`&, ${yt}-menu-submenu-arrow-icon`]:{color:je,backgroundColor:Xe,cursor:"not-allowed"}},[`${De}-submenu-selected ${yt}-menu-submenu-title`]:{color:mt.colorPrimary}})}},[(0,Te.oN)(mt,"slide-up"),(0,Te.oN)(mt,"slide-down"),(0,He.Fm)(mt,"move-up"),(0,He.Fm)(mt,"move-down"),(0,st._y)(mt,"zoom-big")]]};var ut=(0,ct.Z)("Dropdown",(mt,yt)=>{let{rootPrefixCls:De}=yt;const{marginXXS:te,sizePopupArrow:ee,controlHeight:ce,fontSize:se,lineHeight:he,paddingXXS:ve,componentCls:Ee,borderRadiusLG:Le}=mt,Ne=(ce-se*he)/2,{dropdownArrowOffset:je}=(0,We.fS)({contentRadius:Le}),ze=(0,Me.TS)(mt,{menuCls:`${Ee}-menu`,rootPrefixCls:De,dropdownArrowDistance:ee/2+te,dropdownArrowOffset:je,dropdownPaddingVertical:Ne,dropdownEdgeChildPadding:ve});return[Ge(ze),Pt(ze)]},mt=>({zIndexPopup:mt.zIndexPopupBase+50}))},64165:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return ve}});var le=me(92310),Te=me.n(le),He=me(59301),st=me(36355),We=me(9763),ct=me(64993),Me=me(88088),Pt=()=>{const[,Ee]=(0,Me.Z)(),Ne=new ct.C(Ee.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return He.createElement("svg",{style:Ne,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"}))))},ut=()=>{const[,Ee]=(0,Me.Z)(),{colorFill:Le,colorFillTertiary:Ne,colorFillQuaternary:je,colorBgContainer:ze}=Ee,{borderColor:Ye,shadowColor:Xe,contentColor:lt}=(0,He.useMemo)(()=>({borderColor:new ct.C(Le).onBackground(ze).toHexShortString(),shadowColor:new ct.C(Ne).onBackground(ze).toHexShortString(),contentColor:new ct.C(je).onBackground(ze).toHexShortString()}),[Le,Ne,je,ze]);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:Ye},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:lt}))))},mt=me(83116),yt=me(37613);const De=Ee=>{const{componentCls:Le,margin:Ne,marginXS:je,marginXL:ze,fontSize:Ye,lineHeight:Xe}=Ee;return{[Le]:{marginInline:je,fontSize:Ye,lineHeight:Xe,textAlign:"center",[`${Le}-image`]:{height:Ee.emptyImgHeight,marginBottom:je,opacity:Ee.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Le}-description`]:{color:Ee.colorText},[`${Le}-footer`]:{marginTop:Ne},"&-normal":{marginBlock:ze,color:Ee.colorTextDisabled,[`${Le}-description`]:{color:Ee.colorTextDisabled},[`${Le}-image`]:{height:Ee.emptyImgHeightMD}},"&-small":{marginBlock:je,color:Ee.colorTextDisabled,[`${Le}-image`]:{height:Ee.emptyImgHeightSM}}}}};var te=(0,mt.Z)("Empty",Ee=>{const{componentCls:Le,controlHeightLG:Ne}=Ee,je=(0,yt.TS)(Ee,{emptyImgCls:`${Le}-img`,emptyImgHeight:Ne*2.5,emptyImgHeightMD:Ne,emptyImgHeightSM:Ne*.875});return[De(je)]}),ee=function(Ee,Le){var Ne={};for(var je in Ee)Object.prototype.hasOwnProperty.call(Ee,je)&&Le.indexOf(je)<0&&(Ne[je]=Ee[je]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,je=Object.getOwnPropertySymbols(Ee);ze<je.length;ze++)Le.indexOf(je[ze])<0&&Object.prototype.propertyIsEnumerable.call(Ee,je[ze])&&(Ne[je[ze]]=Ee[je[ze]]);return Ne};const ce=He.createElement(Pt,null),se=He.createElement(ut,null),he=Ee=>{var{className:Le,rootClassName:Ne,prefixCls:je,image:ze=ce,description:Ye,children:Xe,imageStyle:lt,style:Ze}=Ee,Lt=ee(Ee,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:rt,direction:Ot,empty:wt}=He.useContext(st.E_),Dt=rt("empty",je),[Wt,Mt]=te(Dt),[et]=(0,We.Z)("Empty"),Ue=typeof Ye!="undefined"?Ye:et==null?void 0:et.description,Rt=typeof Ue=="string"?Ue:"empty";let Pn=null;return typeof ze=="string"?Pn=He.createElement("img",{alt:Rt,src:ze}):Pn=ze,Wt(He.createElement("div",Object.assign({className:Te()(Mt,Dt,wt==null?void 0:wt.className,{[`${Dt}-normal`]:ze===se,[`${Dt}-rtl`]:Ot==="rtl"},Le,Ne),style:Object.assign(Object.assign({},wt==null?void 0:wt.style),Ze)},Lt),He.createElement("div",{className:`${Dt}-image`,style:lt},Pn),Ue&&He.createElement("div",{className:`${Dt}-description`},Ue),Xe&&He.createElement("div",{className:`${Dt}-footer`},Xe)))};he.PRESENTED_IMAGE_DEFAULT=ce,he.PRESENTED_IMAGE_SIMPLE=se;var ve=he},78241:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return Vt}});var le=me(80702),Te=me(92310),He=me.n(Te),st=me(77900),We=me(59301),ct=me(62892),Me=me(32441);function bt(Qe){const[an,dn]=We.useState(Qe);return We.useEffect(()=>{const Nt=setTimeout(()=>{dn(Qe)},Qe.length?0:10);return()=>{clearTimeout(Nt)}},[Qe]),an}var Pt=me(17313),Ge=me(29878),ut=me(8378),mt=me(37613),yt=me(83116),te=Qe=>{const{componentCls:an}=Qe,dn=`${an}-show-help`,Nt=`${an}-show-help-item`;return{[dn]:{transition:`opacity ${Qe.motionDurationSlow} ${Qe.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Nt]:{overflow:"hidden",transition:`height ${Qe.motionDurationSlow} ${Qe.motionEaseInOut},
opacity ${Qe.motionDurationSlow} ${Qe.motionEaseInOut},
transform ${Qe.motionDurationSlow} ${Qe.motionEaseInOut} !important`,[`&${Nt}-appear, &${Nt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Nt}-leave-active`]:{transform:"translateY(-5px)"}}}}};const ee=Qe=>({legend:{display:"block",width:"100%",marginBottom:Qe.marginLG,padding:0,color:Qe.colorTextDescription,fontSize:Qe.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Qe.lineWidth}px ${Qe.lineType} ${Qe.colorBorder}`},label:{fontSize:Qe.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 ${Qe.controlOutlineWidth}px ${Qe.controlOutline}`},output:{display:"block",paddingTop:15,color:Qe.colorText,fontSize:Qe.fontSize,lineHeight:Qe.lineHeight}}),ce=(Qe,an)=>{const{formItemCls:dn}=Qe;return{[dn]:{[`${dn}-label > label`]:{height:an},[`${dn}-control-input`]:{minHeight:an}}}},se=Qe=>{const{componentCls:an}=Qe;return{[Qe.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Pt.Wf)(Qe)),ee(Qe)),{[`${an}-text`]:{display:"inline-block",paddingInlineEnd:Qe.paddingSM},"&-small":Object.assign({},ce(Qe,Qe.controlHeightSM)),"&-large":Object.assign({},ce(Qe,Qe.controlHeightLG))})}},he=Qe=>{const{formItemCls:an,iconCls:dn,componentCls:Nt,rootPrefixCls:dt,labelRequiredMarkColor:nn,labelColor:vn,labelFontSize:zn,labelHeight:qn,labelColonMarginInlineStart:Ft,labelColonMarginInlineEnd:Bn,itemMarginBottom:Kn}=Qe;return{[an]:Object.assign(Object.assign({},(0,Pt.Wf)(Qe)),{marginBottom:Kn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${dt}-row`]:{display:"none"},"&-has-warning":{[`${an}-split`]:{color:Qe.colorError}},"&-has-error":{[`${an}-split`]:{color:Qe.colorWarning}},[`${an}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${Qe.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:qn,color:vn,fontSize:zn,[`> ${dn}`]:{fontSize:Qe.fontSize,verticalAlign:"top"},[`&${an}-required:not(${an}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Qe.marginXXS,color:nn,fontSize:Qe.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Nt}-hide-required-mark &`]:{display:"none"}},[`${an}-optional`]:{display:"inline-block",marginInlineStart:Qe.marginXXS,color:Qe.colorTextDescription,[`${Nt}-hide-required-mark &`]:{display:"none"}},[`${an}-tooltip`]:{color:Qe.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Qe.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Ft,marginInlineEnd:Bn},[`&${an}-no-colon::after`]:{content:'"\\a0"'}}},[`${an}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${dt}-col-'"]):not([class*="' ${dt}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Qe.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[an]:{"&-explain, &-extra":{clear:"both",color:Qe.colorTextDescription,fontSize:Qe.fontSize,lineHeight:Qe.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:Qe.controlHeightSM,transition:`color ${Qe.motionDurationMid} ${Qe.motionEaseOut}`},"&-explain":{"&-error":{color:Qe.colorError},"&-warning":{color:Qe.colorWarning}}},[`&-with-help ${an}-explain`]:{height:"auto",opacity:1},[`${an}-feedback-icon`]:{fontSize:Qe.fontSize,textAlign:"center",visibility:"visible",animationName:Ge.kr,animationDuration:Qe.motionDurationMid,animationTimingFunction:Qe.motionEaseOutBack,pointerEvents:"none","&-success":{color:Qe.colorSuccess},"&-error":{color:Qe.colorError},"&-warning":{color:Qe.colorWarning},"&-validating":{color:Qe.colorPrimary}}})}},ve=Qe=>{const{componentCls:an,formItemCls:dn}=Qe;return{[`${an}-horizontal`]:{[`${dn}-label`]:{flexGrow:0},[`${dn}-control`]:{flex:"1 1 0",minWidth:0},[`${dn}-label[class$='-24'], ${dn}-label[class*='-24 ']`]:{[`& + ${dn}-control`]:{minWidth:"unset"}}}}},Ee=Qe=>{const{componentCls:an,formItemCls:dn}=Qe;return{[`${an}-inline`]:{display:"flex",flexWrap:"wrap",[dn]:{flex:"none",marginInlineEnd:Qe.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${dn}-label,
> ${dn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${dn}-label`]:{flex:"none"},[`${an}-text`]:{display:"inline-block"},[`${dn}-has-feedback`]:{display:"inline-block"}}}}},Le=Qe=>({padding:Qe.verticalLabelPadding,margin:Qe.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Ne=Qe=>{const{componentCls:an,formItemCls:dn,rootPrefixCls:Nt}=Qe;return{[`${dn} ${dn}-label`]:Le(Qe),[an]:{[dn]:{flexWrap:"wrap",[`${dn}-label, ${dn}-control`]:{[`&:not([class*=" ${Nt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},je=Qe=>{const{componentCls:an,formItemCls:dn,rootPrefixCls:Nt}=Qe;return{[`${an}-vertical`]:{[dn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${an}-item-control`]:{width:"100%"}}},[`${an}-vertical ${dn}-label,
.${Nt}-col-24${dn}-label,
.${Nt}-col-xl-24${dn}-label`]:Le(Qe),[`@media (max-width: ${Qe.screenXSMax}px)`]:[Ne(Qe),{[an]:{[`.${Nt}-col-xs-24${dn}-label`]:Le(Qe)}}],[`@media (max-width: ${Qe.screenSMMax}px)`]:{[an]:{[`.${Nt}-col-sm-24${dn}-label`]:Le(Qe)}},[`@media (max-width: ${Qe.screenMDMax}px)`]:{[an]:{[`.${Nt}-col-md-24${dn}-label`]:Le(Qe)}},[`@media (max-width: ${Qe.screenLGMax}px)`]:{[an]:{[`.${Nt}-col-lg-24${dn}-label`]:Le(Qe)}}}},ze=(Qe,an)=>(0,mt.TS)(Qe,{formItemCls:`${Qe.componentCls}-item`,rootPrefixCls:an});var Ye=(0,yt.Z)("Form",(Qe,an)=>{let{rootPrefixCls:dn}=an;const Nt=ze(Qe,dn);return[se(Nt),he(Nt),te(Nt),ve(Nt),Ee(Nt),je(Nt),(0,ut.Z)(Nt),Ge.kr]},Qe=>({labelRequiredMarkColor:Qe.colorError,labelColor:Qe.colorTextHeading,labelFontSize:Qe.fontSize,labelHeight:Qe.controlHeight,labelColonMarginInlineStart:Qe.marginXXS/2,labelColonMarginInlineEnd:Qe.marginXS,itemMarginBottom:Qe.marginLG,verticalLabelPadding:`0 0 ${Qe.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Xe=[];function lt(Qe,an,dn){let Nt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Qe=="string"?Qe:`${an}-${Nt}`,error:Qe,errorStatus:dn}}var Lt=Qe=>{let{help:an,helpStatus:dn,errors:Nt=Xe,warnings:dt=Xe,className:nn,fieldId:vn,onVisibleChanged:zn}=Qe;const{prefixCls:qn}=We.useContext(Me.Rk),Ft=`${qn}-item-explain`,[,Bn]=Ye(qn),Kn=(0,We.useMemo)(()=>(0,ct.Z)(qn),[qn]),Ci=bt(Nt),En=bt(dt),un=We.useMemo(()=>an!=null?[lt(an,"help",dn)]:[].concat((0,le.Z)(Ci.map((Ei,Ni)=>lt(Ei,"error","error",Ni))),(0,le.Z)(En.map((Ei,Ni)=>lt(Ei,"warning","warning",Ni)))),[an,dn,Ci,En]),bn={};return vn&&(bn.id=`${vn}_help`),We.createElement(st.default,{motionDeadline:Kn.motionDeadline,motionName:`${qn}-show-help`,visible:!!un.length,onVisibleChanged:zn},Ei=>{const{className:Ni,style:mi}=Ei;return We.createElement("div",Object.assign({},bn,{className:He()(Ft,Ni,nn,Bn),style:mi,role:"alert"}),We.createElement(st.CSSMotionList,Object.assign({keys:un},(0,ct.Z)(qn),{motionName:`${qn}-show-help-item`,component:!1}),Di=>{const{key:Ai,error:gr,errorStatus:Or,className:Hr,style:jn}=Di;return We.createElement("div",{key:Ai,className:He()(Hr,{[`${Ft}-${Or}`]:Or}),style:jn},gr)}))})},rt=me(95013),Ot=me(36355),wt=me(1684),Dt=me(52946),Wt=me(19716),Mt=me(16722);const et=["parentNode"],Ue="form_item";function Rt(Qe){return Qe===void 0||Qe===!1?[]:Array.isArray(Qe)?Qe:[Qe]}function Pn(Qe,an){if(!Qe.length)return;const dn=Qe.join("_");return an?`${an}_${dn}`:et.includes(dn)?`${Ue}_${dn}`:dn}function xn(Qe,an,dn,Nt,dt,nn){let vn=Nt;return nn!==void 0?vn=nn:dn.validating?vn="validating":Qe.length?vn="error":an.length?vn="warning":(dn.touched||dt&&dn.validated)&&(vn="success"),vn}function _t(Qe){return Rt(Qe).join("_")}function qt(Qe){const[an]=(0,rt.useForm)(),dn=We.useRef({}),Nt=We.useMemo(()=>Qe!=null?Qe:Object.assign(Object.assign({},an),{__INTERNAL__:{itemRef:dt=>nn=>{const vn=_t(dt);nn?dn.current[vn]=nn:delete dn.current[vn]}},scrollToField:function(dt){let nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const vn=Rt(dt),zn=Pn(vn,Nt.__INTERNAL__.name),qn=zn?document.getElementById(zn):null;qn&&(0,Mt.Z)(qn,Object.assign({scrollMode:"if-needed",block:"nearest"},nn))},getFieldInstance:dt=>{const nn=_t(dt);return dn.current[nn]}}),[Qe,an]);return[Nt]}var cn=me(28726),Gn=function(Qe,an){var dn={};for(var Nt in Qe)Object.prototype.hasOwnProperty.call(Qe,Nt)&&an.indexOf(Nt)<0&&(dn[Nt]=Qe[Nt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Nt=Object.getOwnPropertySymbols(Qe);dt<Nt.length;dt++)an.indexOf(Nt[dt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Nt[dt])&&(dn[Nt[dt]]=Qe[Nt[dt]]);return dn};const gn=(Qe,an)=>{const dn=We.useContext(wt.Z),{getPrefixCls:Nt,direction:dt,form:nn}=We.useContext(Ot.E_),{prefixCls:vn,className:zn,rootClassName:qn,size:Ft,disabled:Bn=dn,form:Kn,colon:Ci,labelAlign:En,labelWrap:un,labelCol:bn,wrapperCol:Ei,hideRequiredMark:Ni,layout:mi="horizontal",scrollToFirstError:Di,requiredMark:Ai,onFinishFailed:gr,name:Or,style:Hr,feedbackIcons:jn}=Qe,Po=Gn(Qe,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Wr=(0,Wt.Z)(Ft),ro=We.useContext(cn.Z),Mn=(0,We.useMemo)(()=>Ai!==void 0?Ai:nn&&nn.requiredMark!==void 0?nn.requiredMark:!Ni,[Ni,Ai,nn]),ii=Ci!=null?Ci:nn==null?void 0:nn.colon,Hi=Nt("form",vn),[xr,qi]=Ye(Hi),pr=He()(Hi,`${Hi}-${mi}`,{[`${Hi}-hide-required-mark`]:Mn===!1,[`${Hi}-rtl`]:dt==="rtl",[`${Hi}-${Wr}`]:Wr},qi,nn==null?void 0:nn.className,zn,qn),[Vr]=qt(Kn),{__INTERNAL__:jr}=Vr;jr.name=Or;const kr=(0,We.useMemo)(()=>({name:Or,labelAlign:En,labelCol:bn,labelWrap:un,wrapperCol:Ei,vertical:mi==="vertical",colon:ii,requiredMark:Mn,itemRef:jr.itemRef,form:Vr,feedbackIcons:jn}),[Or,En,bn,Ei,mi,ii,Mn,Vr,jn]);We.useImperativeHandle(an,()=>Vr);const Kr=(Ho,Xn)=>{if(Ho){let Ao={block:"nearest"};typeof Ho=="object"&&(Ao=Ho),Vr.scrollToField(Xn,Ao)}},Yn=Ho=>{if(gr==null||gr(Ho),Ho.errorFields.length){const Xn=Ho.errorFields[0].name;if(Di!==void 0){Kr(Di,Xn);return}nn&&nn.scrollToFirstError!==void 0&&Kr(nn.scrollToFirstError,Xn)}};return xr(We.createElement(wt.n,{disabled:Bn},We.createElement(Dt.q,{size:Wr},We.createElement(Me.RV,Object.assign({},{validateMessages:ro}),We.createElement(Me.q3.Provider,{value:kr},We.createElement(rt.default,Object.assign({id:Or},Po,{name:Or,onFinishFailed:Yn,form:Vr,style:Object.assign(Object.assign({},nn==null?void 0:nn.style),Hr),className:pr})))))))};var Ct=We.forwardRef(gn),Wn=me(41799),di=me(8654),Kt=me(92343),ln=me(11592);function $t(Qe){if(typeof Qe=="function")return Qe;const an=(0,ln.Z)(Qe);return an.length<=1?an[0]:an}const Tt=()=>{const{status:Qe,errors:an=[],warnings:dn=[]}=(0,We.useContext)(Me.aM);return{status:Qe,errors:an,warnings:dn}};Tt.Context=Me.aM;var ft=Tt,$e=me(16089);function Gt(Qe){const[an,dn]=We.useState(Qe),Nt=(0,We.useRef)(null),dt=(0,We.useRef)([]),nn=(0,We.useRef)(!1);We.useEffect(()=>(nn.current=!1,()=>{nn.current=!0,$e.Z.cancel(Nt.current),Nt.current=null}),[]);function vn(zn){nn.current||(Nt.current===null&&(dt.current=[],Nt.current=(0,$e.Z)(()=>{Nt.current=null,dn(qn=>{let Ft=qn;return dt.current.forEach(Bn=>{Ft=Bn(Ft)}),Ft})})),dt.current.push(zn))}return[an,vn]}function Ht(){const{itemRef:Qe}=We.useContext(Me.q3),an=We.useRef({});function dn(Nt,dt){const nn=dt&&typeof dt=="object"&&dt.ref,vn=Nt.join("_");return(an.current.name!==vn||an.current.originRef!==nn)&&(an.current.name=vn,an.current.originRef=nn,an.current.ref=(0,di.sQ)(Qe(Nt),nn)),an.current.ref}return dn}var ht=me(29194),at=me(34280),Re=me(2738),Pe=me(27382),ye=me(37028);const Oe=Qe=>{const{formItemCls:an}=Qe;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${an}-control`]:{display:"flex"}}}};var Ke=(0,yt.b)(["Form","item-item"],(Qe,an)=>{let{rootPrefixCls:dn}=an;const Nt=ze(Qe,dn);return[Oe(Nt)]}),Et=Qe=>{const{prefixCls:an,status:dn,wrapperCol:Nt,children:dt,errors:nn,warnings:vn,_internalItemRender:zn,extra:qn,help:Ft,fieldId:Bn,marginBottom:Kn,onErrorVisibleChanged:Ci}=Qe,En=`${an}-item`,un=We.useContext(Me.q3),bn=Nt||un.wrapperCol||{},Ei=He()(`${En}-control`,bn.className),Ni=We.useMemo(()=>Object.assign({},un),[un]);delete Ni.labelCol,delete Ni.wrapperCol;const mi=We.createElement("div",{className:`${En}-control-input`},We.createElement("div",{className:`${En}-control-input-content`},dt)),Di=We.useMemo(()=>({prefixCls:an,status:dn}),[an,dn]),Ai=Kn!==null||nn.length||vn.length?We.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},We.createElement(Me.Rk.Provider,{value:Di},We.createElement(Lt,{fieldId:Bn,errors:nn,warnings:vn,help:Ft,helpStatus:dn,className:`${En}-explain-connected`,onVisibleChanged:Ci})),!!Kn&&We.createElement("div",{style:{width:0,height:Kn}})):null,gr={};Bn&&(gr.id=`${Bn}_extra`);const Or=qn?We.createElement("div",Object.assign({},gr,{className:`${En}-extra`}),qn):null,Hr=zn&&zn.mark==="pro_table_render"&&zn.render?zn.render(Qe,{input:mi,errorList:Ai,extra:Or}):We.createElement(We.Fragment,null,mi,Ai,Or);return We.createElement(Me.q3.Provider,{value:Ni},We.createElement(ye.Z,Object.assign({},bn,{className:Ei}),Hr),We.createElement(Ke,{prefixCls:an}))},sn=me(61485),pn=me(31724),en=me(9763),wn=me(6848),hi=function(Qe,an){var dn={};for(var Nt in Qe)Object.prototype.hasOwnProperty.call(Qe,Nt)&&an.indexOf(Nt)<0&&(dn[Nt]=Qe[Nt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Nt=Object.getOwnPropertySymbols(Qe);dt<Nt.length;dt++)an.indexOf(Nt[dt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Nt[dt])&&(dn[Nt[dt]]=Qe[Nt[dt]]);return dn};function Rn(Qe){return Qe?typeof Qe=="object"&&!We.isValidElement(Qe)?Qe:{title:Qe}:null}var Pi=Qe=>{let{prefixCls:an,label:dn,htmlFor:Nt,labelCol:dt,labelAlign:nn,colon:vn,required:zn,requiredMark:qn,tooltip:Ft}=Qe;var Bn;const[Kn]=(0,en.Z)("Form"),{vertical:Ci,labelAlign:En,labelCol:un,labelWrap:bn,colon:Ei}=We.useContext(Me.q3);if(!dn)return null;const Ni=dt||un||{},mi=nn||En,Di=`${an}-item-label`,Ai=He()(Di,mi==="left"&&`${Di}-left`,Ni.className,{[`${Di}-wrap`]:!!bn});let gr=dn;const Or=vn===!0||Ei!==!1&&vn!==!1;Or&&!Ci&&typeof dn=="string"&&dn.trim()!==""&&(gr=dn.replace(/[:|]\s*$/,""));const jn=Rn(Ft);if(jn){const{icon:Mn=We.createElement(sn.Z,null)}=jn,ii=hi(jn,["icon"]),Hi=We.createElement(wn.Z,Object.assign({},ii),We.cloneElement(Mn,{className:`${an}-item-tooltip`,title:""}));gr=We.createElement(We.Fragment,null,gr,Hi)}const Po=qn==="optional",Wr=typeof qn=="function";Wr?gr=qn(gr,{required:!!zn}):Po&&!zn&&(gr=We.createElement(We.Fragment,null,gr,We.createElement("span",{className:`${an}-item-optional`,title:""},(Kn==null?void 0:Kn.optional)||((Bn=pn.Z.Form)===null||Bn===void 0?void 0:Bn.optional))));const ro=He()({[`${an}-item-required`]:zn,[`${an}-item-required-mark-optional`]:Po||Wr,[`${an}-item-no-colon`]:!Or});return We.createElement(ye.Z,Object.assign({},Ni,{className:Ai}),We.createElement("label",{htmlFor:Nt,className:ro,title:typeof dn=="string"?dn:""},gr))},zi=me(29679),Zi=me(19248),ir=me(96512),Nr=me(58617);const pi={success:zi.Z,warning:ir.Z,error:Zi.Z,validating:Nr.Z};function li(Qe){let{children:an,errors:dn,warnings:Nt,hasFeedback:dt,validateStatus:nn,prefixCls:vn,meta:zn,noStyle:qn}=Qe;const Ft=`${vn}-item`,{feedbackIcons:Bn}=We.useContext(Me.q3),Kn=xn(dn,Nt,zn,null,!!dt,nn),{isFormItemInput:Ci,status:En}=We.useContext(Me.aM),un=We.useMemo(()=>{var bn;let Ei;if(dt){const Di=dt!==!0&&dt.icons||Bn,Ai=Kn&&((bn=Di==null?void 0:Di({status:Kn,errors:dn,warnings:Nt}))===null||bn===void 0?void 0:bn[Kn]),gr=Kn&&pi[Kn];Ei=Ai!==!1&&gr?We.createElement("span",{className:He()(`${Ft}-feedback-icon`,`${Ft}-feedback-icon-${Kn}`)},Ai||We.createElement(gr,null)):null}let Ni=!0,mi=Kn||"";return qn&&(Ni=Ci,mi=(Kn!=null?Kn:En)||""),{status:mi,errors:dn,warnings:Nt,hasFeedback:!!dt,feedbackIcon:Ei,isFormItemInput:Ni}},[Kn,dt,qn,Ci,En]);return We.createElement(Me.aM.Provider,{value:un},an)}var xi=function(Qe,an){var dn={};for(var Nt in Qe)Object.prototype.hasOwnProperty.call(Qe,Nt)&&an.indexOf(Nt)<0&&(dn[Nt]=Qe[Nt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Nt=Object.getOwnPropertySymbols(Qe);dt<Nt.length;dt++)an.indexOf(Nt[dt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Nt[dt])&&(dn[Nt[dt]]=Qe[Nt[dt]]);return dn};function Gi(Qe){const{prefixCls:an,className:dn,rootClassName:Nt,style:dt,help:nn,errors:vn,warnings:zn,validateStatus:qn,meta:Ft,hasFeedback:Bn,hidden:Kn,children:Ci,fieldId:En,required:un,isRequired:bn,onSubItemMetaChange:Ei}=Qe,Ni=xi(Qe,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),mi=`${an}-item`,{requiredMark:Di}=We.useContext(Me.q3),Ai=We.useRef(null),gr=bt(vn),Or=bt(zn),Hr=nn!=null,jn=!!(Hr||vn.length||zn.length),Po=!!Ai.current&&(0,ht.Z)(Ai.current),[Wr,ro]=We.useState(null);(0,at.Z)(()=>{if(jn&&Ai.current){const qi=getComputedStyle(Ai.current);ro(parseInt(qi.marginBottom,10))}},[jn,Po]);const Mn=qi=>{qi||ro(null)},Hi=function(){let qi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const pr=qi?gr:Ft.errors,Vr=qi?Or:Ft.warnings;return xn(pr,Vr,Ft,"",!!Bn,qn)}(),xr=He()(mi,dn,Nt,{[`${mi}-with-help`]:Hr||gr.length||Or.length,[`${mi}-has-feedback`]:Hi&&Bn,[`${mi}-has-success`]:Hi==="success",[`${mi}-has-warning`]:Hi==="warning",[`${mi}-has-error`]:Hi==="error",[`${mi}-is-validating`]:Hi==="validating",[`${mi}-hidden`]:Kn});return We.createElement("div",{className:xr,style:dt,ref:Ai},We.createElement(Pe.Z,Object.assign({className:`${mi}-row`},(0,Re.Z)(Ni,["_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(Pi,Object.assign({htmlFor:En},Qe,{requiredMark:Di,required:un!=null?un:bn,prefixCls:an})),We.createElement(Et,Object.assign({},Qe,Ft,{errors:gr,warnings:Or,prefixCls:an,status:Hi,help:nn,marginBottom:Wr,onErrorVisibleChanged:Mn}),We.createElement(Me.qI.Provider,{value:Ei},We.createElement(li,{prefixCls:an,meta:Ft,errors:Ft.errors,warnings:Ft.warnings,hasFeedback:Bn,validateStatus:Hi},Ci)))),!!Wr&&We.createElement("div",{className:`${mi}-margin-offset`,style:{marginBottom:-Wr}}))}const Oi="__SPLIT__",to=null,eo=We.memo(Qe=>{let{children:an}=Qe;return an},(Qe,an)=>Qe.value===an.value&&Qe.update===an.update&&Qe.childProps.length===an.childProps.length&&Qe.childProps.every((dn,Nt)=>dn===an.childProps[Nt]));function Be(Qe){return Qe!=null}function Fi(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function wr(Qe){const{name:an,noStyle:dn,className:Nt,dependencies:dt,prefixCls:nn,shouldUpdate:vn,rules:zn,children:qn,required:Ft,label:Bn,messageVariables:Kn,trigger:Ci="onChange",validateTrigger:En,hidden:un,help:bn}=Qe,{getPrefixCls:Ei}=We.useContext(Ot.E_),{name:Ni}=We.useContext(Me.q3),mi=$t(qn),Di=typeof mi=="function",Ai=We.useContext(Me.qI),{validateTrigger:gr}=We.useContext(rt.FieldContext),Or=En!==void 0?En:gr,Hr=Be(an),jn=Ei("form",nn),[Po,Wr]=Ye(jn),ro=We.useContext(rt.ListContext),Mn=We.useRef(),[ii,Hi]=Gt({}),[xr,qi]=(0,Wn.Z)(()=>Fi()),pr=Xn=>{const Ao=ro==null?void 0:ro.getKey(Xn.name);if(qi(Xn.destroy?Fi():Xn,!0),dn&&bn!==!1&&Ai){let Qo=Xn.name;if(Xn.destroy)Qo=Mn.current||Qo;else if(Ao!==void 0){const[nr,qo]=Ao;Qo=[nr].concat((0,le.Z)(qo)),Mn.current=Qo}Ai(Xn,Qo)}},Vr=(Xn,Ao)=>{Hi(Qo=>{const nr=Object.assign({},Qo),Go=[].concat((0,le.Z)(Xn.name.slice(0,-1)),(0,le.Z)(Ao)).join(Oi);return Xn.destroy?delete nr[Go]:nr[Go]=Xn,nr})},[jr,kr]=We.useMemo(()=>{const Xn=(0,le.Z)(xr.errors),Ao=(0,le.Z)(xr.warnings);return Object.values(ii).forEach(Qo=>{Xn.push.apply(Xn,(0,le.Z)(Qo.errors||[])),Ao.push.apply(Ao,(0,le.Z)(Qo.warnings||[]))}),[Xn,Ao]},[ii,xr.errors,xr.warnings]),Kr=Ht();function Yn(Xn,Ao,Qo){return dn&&!un?We.createElement(li,{prefixCls:jn,hasFeedback:Qe.hasFeedback,validateStatus:Qe.validateStatus,meta:xr,errors:jr,warnings:kr,noStyle:!0},Xn):We.createElement(Gi,Object.assign({key:"row"},Qe,{className:He()(Nt,Wr),prefixCls:jn,fieldId:Ao,isRequired:Qo,errors:jr,warnings:kr,meta:xr,onSubItemMetaChange:Vr}),Xn)}if(!Hr&&!Di&&!dt)return Po(Yn(mi));let Ho={};return typeof Bn=="string"?Ho.label=Bn:an&&(Ho.label=String(an)),Kn&&(Ho=Object.assign(Object.assign({},Ho),Kn)),Po(We.createElement(rt.Field,Object.assign({},Qe,{messageVariables:Ho,trigger:Ci,validateTrigger:Or,onMetaChange:pr}),(Xn,Ao,Qo)=>{const nr=Rt(an).length&&Ao?Ao.name:[],qo=Pn(nr,Ni),Go=Ft!==void 0?Ft:!!(zn&&zn.some(mo=>{if(mo&&typeof mo=="object"&&mo.required&&!mo.warningOnly)return!0;if(typeof mo=="function"){const Yo=mo(Qo);return Yo&&Yo.required&&!Yo.warningOnly}return!1})),Br=Object.assign({},Xn);let Er=null;if(Array.isArray(mi)&&Hr)Er=mi;else if(!(Di&&(!(vn||dt)||Hr))){if(!(dt&&!Di&&!Hr))if((0,Kt.l$)(mi)){const mo=Object.assign(Object.assign({},mi.props),Br);if(mo.id||(mo.id=qo),bn||jr.length>0||kr.length>0||Qe.extra){const ot=[];(bn||jr.length>0)&&ot.push(`${qo}_help`),Qe.extra&&ot.push(`${qo}_extra`),mo["aria-describedby"]=ot.join(" ")}jr.length>0&&(mo["aria-invalid"]="true"),Go&&(mo["aria-required"]="true"),(0,di.Yr)(mi)&&(mo.ref=Kr(nr,mi)),new Set([].concat((0,le.Z)(Rt(Ci)),(0,le.Z)(Rt(Or)))).forEach(ot=>{mo[ot]=function(){for(var sa,va,Ma,hs,Ga,Lo=arguments.length,po=new Array(Lo),la=0;la<Lo;la++)po[la]=arguments[la];(Ma=Br[ot])===null||Ma===void 0||(sa=Ma).call.apply(sa,[Br].concat(po)),(Ga=(hs=mi.props)[ot])===null||Ga===void 0||(va=Ga).call.apply(va,[hs].concat(po))}});const Ki=[mo["aria-required"],mo["aria-invalid"],mo["aria-describedby"]];Er=We.createElement(eo,{value:Br[Qe.valuePropName||"value"],update:mi,childProps:Ki},(0,Kt.Tm)(mi,mo))}else Di&&(vn||dt)&&!Hr?Er=mi(Qo):Er=mi}return Yn(Er,qo,Go)}))}const Fn=wr;Fn.useStatus=ft;var wi=Fn,$i=function(Qe,an){var dn={};for(var Nt in Qe)Object.prototype.hasOwnProperty.call(Qe,Nt)&&an.indexOf(Nt)<0&&(dn[Nt]=Qe[Nt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Nt=Object.getOwnPropertySymbols(Qe);dt<Nt.length;dt++)an.indexOf(Nt[dt])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Nt[dt])&&(dn[Nt[dt]]=Qe[Nt[dt]]);return dn},ei=Qe=>{var{prefixCls:an,children:dn}=Qe,Nt=$i(Qe,["prefixCls","children"]);const{getPrefixCls:dt}=We.useContext(Ot.E_),nn=dt("form",an),vn=We.useMemo(()=>({prefixCls:nn,status:"error"}),[nn]);return We.createElement(rt.List,Object.assign({},Nt),(zn,qn,Ft)=>We.createElement(Me.Rk.Provider,{value:vn},dn(zn.map(Bn=>Object.assign(Object.assign({},Bn),{fieldKey:Bn.key})),qn,{errors:Ft.errors,warnings:Ft.warnings})))};function $n(){const{form:Qe}=(0,We.useContext)(Me.q3);return Qe}const zt=Ct;zt.Item=wi,zt.List=ei,zt.ErrorList=Lt,zt.useForm=qt,zt.useFormInstance=$n,zt.useWatch=rt.useWatch,zt.Provider=Me.RV,zt.create=()=>{};var Vt=zt},8628:function(_n,yn,me){"use strict";var le=me(59301),Te=me(34280),He=me(56762),st=me(69507);function We(){let ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Me=(0,le.useRef)({}),bt=(0,He.Z)(),Pt=(0,st.ZP)();return(0,Te.Z)(()=>{const Ge=Pt.subscribe(ut=>{Me.current=ut,ct&&bt()});return()=>Pt.unsubscribe(Ge)},[]),Me.current}yn.Z=We},9432:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return he},n:function(){return ce}});var le=me(19248),Te=me(92310),He=me.n(Te),st=me(93681),We=me(8654),ct=me(59301),Me=me(19080),bt=me(36355),Pt=me(1684),Ge=me(19716),ut=me(32441),mt=me(33234),yt=me(59412),De=me(9937);function te(ve){return!!(ve.prefix||ve.suffix||ve.allowClear)}var ee=function(ve,Ee){var Le={};for(var Ne in ve)Object.prototype.hasOwnProperty.call(ve,Ne)&&Ee.indexOf(Ne)<0&&(Le[Ne]=ve[Ne]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ne=Object.getOwnPropertySymbols(ve);je<Ne.length;je++)Ee.indexOf(Ne[je])<0&&Object.prototype.propertyIsEnumerable.call(ve,Ne[je])&&(Le[Ne[je]]=ve[Ne[je]]);return Le};function ce(ve,Ee){if(!ve)return;ve.focus(Ee);const{cursor:Le}=Ee||{};if(Le){const Ne=ve.value.length;switch(Le){case"start":ve.setSelectionRange(0,0);break;case"end":ve.setSelectionRange(Ne,Ne);break;default:ve.setSelectionRange(0,Ne);break}}}var he=(0,ct.forwardRef)((ve,Ee)=>{var Le;const{prefixCls:Ne,bordered:je=!0,status:ze,size:Ye,disabled:Xe,onBlur:lt,onFocus:Ze,suffix:Lt,allowClear:rt,addonAfter:Ot,addonBefore:wt,className:Dt,style:Wt,styles:Mt,rootClassName:et,onChange:Ue,classNames:Rt}=ve,Pn=ee(ve,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:xn,direction:_t,input:qt}=ct.useContext(bt.E_),cn=xn("input",Ne),Gn=(0,ct.useRef)(null),[gn,Zn]=(0,De.ZP)(cn),{compactSize:Ct,compactItemClassnames:Wn}=(0,mt.ri)(cn,_t),di=(0,Ge.Z)(Ke=>{var Fe;return(Fe=Ye!=null?Ye:Ct)!==null&&Fe!==void 0?Fe:Ke}),Kt=ct.useContext(Pt.Z),ln=Xe!=null?Xe:Kt,{status:$t,hasFeedback:Tt,feedbackIcon:ft}=(0,ct.useContext)(ut.aM),$e=(0,Me.F)($t,ze),Gt=te(ve)||!!Tt,Ht=(0,ct.useRef)(Gt);(0,ct.useEffect)(()=>{var Ke;Gt&&Ht.current,Ht.current=Gt},[Gt]);const ht=(0,yt.Z)(Gn,!0),at=Ke=>{ht(),lt==null||lt(Ke)},Re=Ke=>{ht(),Ze==null||Ze(Ke)},Pe=Ke=>{ht(),Ue==null||Ue(Ke)},ye=(Tt||Lt)&&ct.createElement(ct.Fragment,null,Lt,Tt&&ft);let Oe;return typeof rt=="object"&&(rt!=null&&rt.clearIcon)?Oe=rt:rt&&(Oe={clearIcon:ct.createElement(le.Z,null)}),gn(ct.createElement(st.default,Object.assign({ref:(0,We.sQ)(Ee,Gn),prefixCls:cn,autoComplete:qt==null?void 0:qt.autoComplete},Pn,{disabled:ln,onBlur:at,onFocus:Re,style:Object.assign(Object.assign({},qt==null?void 0:qt.style),Wt),styles:Object.assign(Object.assign({},qt==null?void 0:qt.styles),Mt),suffix:ye,allowClear:Oe,className:He()(Dt,et,Wn,qt==null?void 0:qt.className),onChange:Pe,addonAfter:Ot&&ct.createElement(mt.BR,null,ct.createElement(ut.Ux,{override:!0,status:!0},Ot)),addonBefore:wt&&ct.createElement(mt.BR,null,ct.createElement(ut.Ux,{override:!0,status:!0},wt)),classNames:Object.assign(Object.assign(Object.assign({},Rt),qt==null?void 0:qt.classNames),{input:He()({[`${cn}-sm`]:di==="small",[`${cn}-lg`]:di==="large",[`${cn}-rtl`]:_t==="rtl",[`${cn}-borderless`]:!je},!Gt&&(0,Me.Z)(cn,$e),Rt==null?void 0:Rt.input,(Le=qt==null?void 0:qt.classNames)===null||Le===void 0?void 0:Le.input,Zn)}),classes:{affixWrapper:He()({[`${cn}-affix-wrapper-sm`]:di==="small",[`${cn}-affix-wrapper-lg`]:di==="large",[`${cn}-affix-wrapper-rtl`]:_t==="rtl",[`${cn}-affix-wrapper-borderless`]:!je},(0,Me.Z)(`${cn}-affix-wrapper`,$e,Tt),Zn),wrapper:He()({[`${cn}-group-rtl`]:_t==="rtl"},Zn),group:He()({[`${cn}-group-wrapper-sm`]:di==="small",[`${cn}-group-wrapper-lg`]:di==="large",[`${cn}-group-wrapper-rtl`]:_t==="rtl",[`${cn}-group-wrapper-disabled`]:ln},(0,Me.Z)(`${cn}-group-wrapper`,$e,Tt),Zn)}})))})},1643:function(_n,yn,me){"use strict";var le=me(19248),Te=me(92310),He=me.n(Te),st=me(9296),We=me(59301),ct=me(19080),Me=me(36355),bt=me(1684),Pt=me(19716),Ge=me(32441),ut=me(9432),mt=me(9937),yt=function(te,ee){var ce={};for(var se in te)Object.prototype.hasOwnProperty.call(te,se)&&ee.indexOf(se)<0&&(ce[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])&&(ce[se[he]]=te[se[he]]);return ce};const De=(0,We.forwardRef)((te,ee)=>{const{prefixCls:ce,bordered:se=!0,size:he,disabled:ve,status:Ee,allowClear:Le,showCount:Ne,classNames:je,rootClassName:ze,className:Ye}=te,Xe=yt(te,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:lt,direction:Ze}=We.useContext(Me.E_),Lt=(0,Pt.Z)(he),rt=We.useContext(bt.Z),Ot=ve!=null?ve:rt,{status:wt,hasFeedback:Dt,feedbackIcon:Wt}=We.useContext(Ge.aM),Mt=(0,ct.F)(wt,Ee),et=We.useRef(null);We.useImperativeHandle(ee,()=>{var _t;return{resizableTextArea:(_t=et.current)===null||_t===void 0?void 0:_t.resizableTextArea,focus:qt=>{var cn,Gn;(0,ut.n)((Gn=(cn=et.current)===null||cn===void 0?void 0:cn.resizableTextArea)===null||Gn===void 0?void 0:Gn.textArea,qt)},blur:()=>{var qt;return(qt=et.current)===null||qt===void 0?void 0:qt.blur()}}});const Ue=lt("input",ce);let Rt;typeof Le=="object"&&(Le!=null&&Le.clearIcon)?Rt=Le:Le&&(Rt={clearIcon:We.createElement(le.Z,null)});const[Pn,xn]=(0,mt.ZP)(Ue);return Pn(We.createElement(st.default,Object.assign({},Xe,{disabled:Ot,allowClear:Rt,className:He()(Ye,ze),classes:{affixWrapper:He()(`${Ue}-textarea-affix-wrapper`,{[`${Ue}-affix-wrapper-rtl`]:Ze==="rtl",[`${Ue}-affix-wrapper-borderless`]:!se,[`${Ue}-affix-wrapper-sm`]:Lt==="small",[`${Ue}-affix-wrapper-lg`]:Lt==="large",[`${Ue}-textarea-show-count`]:Ne},(0,ct.Z)(`${Ue}-affix-wrapper`,Mt),xn)},classNames:Object.assign(Object.assign({},je),{textarea:He()({[`${Ue}-borderless`]:!se,[`${Ue}-sm`]:Lt==="small",[`${Ue}-lg`]:Lt==="large"},(0,ct.Z)(Ue,Mt),xn,je==null?void 0:je.textarea)}),prefixCls:Ue,suffix:Dt&&We.createElement("span",{className:`${Ue}-textarea-suffix`},Wt),showCount:Ne,ref:et})))});yn.Z=De},59412:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Te}});var le=me(59301);function Te(He,st){const We=(0,le.useRef)([]),ct=()=>{We.current.push(setTimeout(()=>{var Me,bt,Pt,Ge;!((Me=He.current)===null||Me===void 0)&&Me.input&&((bt=He.current)===null||bt===void 0?void 0:bt.input.getAttribute("type"))==="password"&&(!((Pt=He.current)===null||Pt===void 0)&&Pt.input.hasAttribute("value"))&&((Ge=He.current)===null||Ge===void 0||Ge.input.removeAttribute("value"))}))};return(0,le.useEffect)(()=>(st&&ct(),()=>We.current.forEach(Me=>{Me&&clearTimeout(Me)})),[]),ct}},92832:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return Lt}});var le=me(92310),Te=me.n(le),He=me(59301),st=me(36355),We=me(32441),ct=me(9937),bt=rt=>{const{getPrefixCls:Ot,direction:wt}=(0,He.useContext)(st.E_),{prefixCls:Dt,className:Wt}=rt,Mt=Ot("input-group",Dt),et=Ot("input"),[Ue,Rt]=(0,ct.ZP)(et),Pn=Te()(Mt,{[`${Mt}-lg`]:rt.size==="large",[`${Mt}-sm`]:rt.size==="small",[`${Mt}-compact`]:rt.compact,[`${Mt}-rtl`]:wt==="rtl"},Rt,Wt),xn=(0,He.useContext)(We.aM),_t=(0,He.useMemo)(()=>Object.assign(Object.assign({},xn),{isFormItemInput:!1}),[xn]);return Ue(He.createElement("span",{className:Pn,style:rt.style,onMouseEnter:rt.onMouseEnter,onMouseLeave:rt.onMouseLeave,onFocus:rt.onFocus,onBlur:rt.onBlur},He.createElement(We.aM.Provider,{value:_t},rt.children)))},Pt=me(9432),Ge=me(73331),ut=me(15277),mt=me(2738),yt=me(8654),De=me(59412),te=function(rt,Ot){var wt={};for(var Dt in rt)Object.prototype.hasOwnProperty.call(rt,Dt)&&Ot.indexOf(Dt)<0&&(wt[Dt]=rt[Dt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Dt=Object.getOwnPropertySymbols(rt);Wt<Dt.length;Wt++)Ot.indexOf(Dt[Wt])<0&&Object.prototype.propertyIsEnumerable.call(rt,Dt[Wt])&&(wt[Dt[Wt]]=rt[Dt[Wt]]);return wt};const ee=rt=>rt?He.createElement(ut.Z,null):He.createElement(Ge.Z,null),ce={click:"onClick",hover:"onMouseOver"};var he=He.forwardRef((rt,Ot)=>{const{visibilityToggle:wt=!0}=rt,Dt=typeof wt=="object"&&wt.visible!==void 0,[Wt,Mt]=(0,He.useState)(()=>Dt?wt.visible:!1),et=(0,He.useRef)(null);He.useEffect(()=>{Dt&&Mt(wt.visible)},[Dt,wt]);const Ue=(0,De.Z)(et),Rt=()=>{const{disabled:ln}=rt;ln||(Wt&&Ue(),Mt($t=>{var Tt;const ft=!$t;return typeof wt=="object"&&((Tt=wt.onVisibleChange)===null||Tt===void 0||Tt.call(wt,ft)),ft}))},Pn=ln=>{const{action:$t="click",iconRender:Tt=ee}=rt,ft=ce[$t]||"",$e=Tt(Wt),Gt={[ft]:Rt,className:`${ln}-icon`,key:"passwordIcon",onMouseDown:Ht=>{Ht.preventDefault()},onMouseUp:Ht=>{Ht.preventDefault()}};return He.cloneElement(He.isValidElement($e)?$e:He.createElement("span",null,$e),Gt)},{className:xn,prefixCls:_t,inputPrefixCls:qt,size:cn}=rt,Gn=te(rt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:gn}=He.useContext(st.E_),Zn=gn("input",qt),Ct=gn("input-password",_t),Wn=wt&&Pn(Ct),di=Te()(Ct,xn,{[`${Ct}-${cn}`]:!!cn}),Kt=Object.assign(Object.assign({},(0,mt.Z)(Gn,["suffix","iconRender","visibilityToggle"])),{type:Wt?"text":"password",className:di,prefixCls:Zn,suffix:Wn});return cn&&(Kt.size=cn),He.createElement(Pt.Z,Object.assign({ref:(0,yt.sQ)(Ot,et)},Kt))}),ve=me(47472),Ee=me(92343),Le=me(3113),Ne=me(19716),je=me(33234),ze=function(rt,Ot){var wt={};for(var Dt in rt)Object.prototype.hasOwnProperty.call(rt,Dt)&&Ot.indexOf(Dt)<0&&(wt[Dt]=rt[Dt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Dt=Object.getOwnPropertySymbols(rt);Wt<Dt.length;Wt++)Ot.indexOf(Dt[Wt])<0&&Object.prototype.propertyIsEnumerable.call(rt,Dt[Wt])&&(wt[Dt[Wt]]=rt[Dt[Wt]]);return wt},Xe=He.forwardRef((rt,Ot)=>{const{prefixCls:wt,inputPrefixCls:Dt,className:Wt,size:Mt,suffix:et,enterButton:Ue=!1,addonAfter:Rt,loading:Pn,disabled:xn,onSearch:_t,onChange:qt,onCompositionStart:cn,onCompositionEnd:Gn}=rt,gn=ze(rt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:Zn,direction:Ct}=He.useContext(st.E_),Wn=He.useRef(!1),di=Zn("input-search",wt),Kt=Zn("input",Dt),{compactSize:ln}=(0,je.ri)(di,Ct),$t=(0,Ne.Z)(Et=>{var sn;return(sn=Mt!=null?Mt:ln)!==null&&sn!==void 0?sn:Et}),Tt=He.useRef(null),ft=Et=>{Et&&Et.target&&Et.type==="click"&&_t&&_t(Et.target.value,Et,{source:"clear"}),qt&&qt(Et)},$e=Et=>{var sn;document.activeElement===((sn=Tt.current)===null||sn===void 0?void 0:sn.input)&&Et.preventDefault()},Gt=Et=>{var sn,pn;_t&&_t((pn=(sn=Tt.current)===null||sn===void 0?void 0:sn.input)===null||pn===void 0?void 0:pn.value,Et,{source:"input"})},Ht=Et=>{Wn.current||Pn||Gt(Et)},ht=typeof Ue=="boolean"?He.createElement(ve.Z,null):null,at=`${di}-button`;let Re;const Pe=Ue||{},ye=Pe.type&&Pe.type.__ANT_BUTTON===!0;ye||Pe.type==="button"?Re=(0,Ee.Tm)(Pe,Object.assign({onMouseDown:$e,onClick:Et=>{var sn,pn;(pn=(sn=Pe==null?void 0:Pe.props)===null||sn===void 0?void 0:sn.onClick)===null||pn===void 0||pn.call(sn,Et),Gt(Et)},key:"enterButton"},ye?{className:at,size:$t}:{})):Re=He.createElement(Le.ZP,{className:at,type:Ue?"primary":void 0,size:$t,disabled:xn,key:"enterButton",onMouseDown:$e,onClick:Gt,loading:Pn,icon:ht},Ue),Rt&&(Re=[Re,(0,Ee.Tm)(Rt,{key:"addonAfter"})]);const Oe=Te()(di,{[`${di}-rtl`]:Ct==="rtl",[`${di}-${$t}`]:!!$t,[`${di}-with-button`]:!!Ue},Wt),Ke=Et=>{Wn.current=!0,cn==null||cn(Et)},Fe=Et=>{Wn.current=!1,Gn==null||Gn(Et)};return He.createElement(Pt.Z,Object.assign({ref:(0,yt.sQ)(Tt,Ot),onPressEnter:Ht},gn,{size:$t,onCompositionStart:Ke,onCompositionEnd:Fe,prefixCls:Kt,addonAfter:Re,suffix:et,onChange:ft,className:Oe,disabled:xn}))}),lt=me(1643);const Ze=Pt.Z;Ze.Group=bt,Ze.Search=Xe,Ze.TextArea=lt.Z,Ze.Password=he;var Lt=Ze},45818:function(_n,yn,me){"use strict";me.d(yn,{D:function(){return ve},Z:function(){return Ne}});var le=me(72308),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"},st=He,We=me(7657),ct=function(ze,Ye){return Te.createElement(We.Z,(0,le.Z)({},ze,{ref:Ye,icon:st}))},Me=Te.forwardRef(ct),bt=Me,Pt=me(33853),Ge=me(38819),ut=me(92310),mt=me.n(ut),yt=me(2738),te=je=>!isNaN(parseFloat(je))&&isFinite(je),ee=me(36355),ce=me(84966),se=function(je,ze){var Ye={};for(var Xe in je)Object.prototype.hasOwnProperty.call(je,Xe)&&ze.indexOf(Xe)<0&&(Ye[Xe]=je[Xe]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,Xe=Object.getOwnPropertySymbols(je);lt<Xe.length;lt++)ze.indexOf(Xe[lt])<0&&Object.prototype.propertyIsEnumerable.call(je,Xe[lt])&&(Ye[Xe[lt]]=je[Xe[lt]]);return Ye};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 ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return je+=1,`${ze}${je}`}})();var Ne=Te.forwardRef((je,ze)=>{const{prefixCls:Ye,className:Xe,trigger:lt,children:Ze,defaultCollapsed:Lt=!1,theme:rt="dark",style:Ot={},collapsible:wt=!1,reverseArrow:Dt=!1,width:Wt=200,collapsedWidth:Mt=80,zeroWidthTriggerStyle:et,breakpoint:Ue,onCollapse:Rt,onBreakpoint:Pn}=je,xn=se(je,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:_t}=(0,Te.useContext)(ce.Gs),[qt,cn]=(0,Te.useState)("collapsed"in je?je.collapsed:Lt),[Gn,gn]=(0,Te.useState)(!1);(0,Te.useEffect)(()=>{"collapsed"in je&&cn(je.collapsed)},[je.collapsed]);const Zn=($t,Tt)=>{"collapsed"in je||cn($t),Rt==null||Rt($t,Tt)},Ct=(0,Te.useRef)();Ct.current=$t=>{gn($t.matches),Pn==null||Pn($t.matches),qt!==$t.matches&&Zn($t.matches,"responsive")},(0,Te.useEffect)(()=>{function $t(ft){return Ct.current(ft)}let Tt;if(typeof window!="undefined"){const{matchMedia:ft}=window;if(ft&&Ue&&Ue in he){Tt=ft(`(max-width: ${he[Ue]})`);try{Tt.addEventListener("change",$t)}catch($e){Tt.addListener($t)}$t(Tt)}}return()=>{try{Tt==null||Tt.removeEventListener("change",$t)}catch(ft){Tt==null||Tt.removeListener($t)}}},[Ue]),(0,Te.useEffect)(()=>{const $t=Ee("ant-sider-");return _t.addSider($t),()=>_t.removeSider($t)},[]);const Wn=()=>{Zn(!qt,"clickTrigger")},{getPrefixCls:di}=(0,Te.useContext)(ee.E_),Kt=()=>{const $t=di("layout-sider",Ye),Tt=(0,yt.Z)(xn,["collapsed"]),ft=qt?Mt:Wt,$e=te(ft)?`${ft}px`:String(ft),Gt=parseFloat(String(Mt||0))===0?Te.createElement("span",{onClick:Wn,className:mt()(`${$t}-zero-width-trigger`,`${$t}-zero-width-trigger-${Dt?"right":"left"}`),style:et},lt||Te.createElement(bt,null)):null,at={expanded:Dt?Te.createElement(Ge.Z,null):Te.createElement(Pt.Z,null),collapsed:Dt?Te.createElement(Pt.Z,null):Te.createElement(Ge.Z,null)}[qt?"collapsed":"expanded"],Re=lt!==null?Gt||Te.createElement("div",{className:`${$t}-trigger`,onClick:Wn,style:{width:$e}},lt||at):null,Pe=Object.assign(Object.assign({},Ot),{flex:`0 0 ${$e}`,maxWidth:$e,minWidth:$e,width:$e}),ye=mt()($t,`${$t}-${rt}`,{[`${$t}-collapsed`]:!!qt,[`${$t}-has-trigger`]:wt&&lt!==null&&!Gt,[`${$t}-below`]:!!Gn,[`${$t}-zero-width`]:parseFloat($e)===0},Xe);return Te.createElement("aside",Object.assign({className:ye},Tt,{style:Pe,ref:ze}),Te.createElement("div",{className:`${$t}-children`},Ze),wt||Gn&&Gt?Re:null)},ln=Te.useMemo(()=>({siderCollapsed:qt}),[qt]);return Te.createElement(ve.Provider,{value:ln},Kt())})},84966:function(_n,yn,me){"use strict";me.d(yn,{VY:function(){return ve},$_:function(){return he},h4:function(){return se},Gs:function(){return yt},ZP:function(){return Ee}});var le=me(80702),Te=me(92310),He=me.n(Te),st=me(2738),We=me(59301),ct=me(36355),Me=me(83116),Pt=Le=>{const{componentCls:Ne,bodyBg:je,lightSiderBg:ze,lightTriggerBg:Ye,lightTriggerColor:Xe}=Le;return{[`${Ne}-sider-light`]:{background:ze,[`${Ne}-sider-trigger`]:{color:Xe,background:Ye},[`${Ne}-sider-zero-width-trigger`]:{color:Xe,background:Ye,border:`1px solid ${je}`,borderInlineStart:0}}}};const Ge=Le=>{const{antCls:Ne,componentCls:je,colorText:ze,triggerColor:Ye,footerBg:Xe,triggerBg:lt,headerHeight:Ze,headerPadding:Lt,headerColor:rt,footerPadding:Ot,triggerHeight:wt,zeroTriggerHeight:Dt,zeroTriggerWidth:Wt,motionDurationMid:Mt,motionDurationSlow:et,fontSize:Ue,borderRadius:Rt,bodyBg:Pn,headerBg:xn,siderBg:_t}=Le;return{[je]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Pn,"&, *":{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 ${Mt}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Ne}-menu${Ne}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:wt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:wt,color:Ye,lineHeight:`${wt}px`,textAlign:"center",background:lt,cursor:"pointer",transition:`all ${Mt}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ze,insetInlineEnd:-Wt,zIndex:1,width:Wt,height:Dt,color:Ye,fontSize:Le.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:_t,borderStartStartRadius:0,borderStartEndRadius:Rt,borderEndEndRadius:Rt,borderEndStartRadius:0,cursor:"pointer",transition:`background ${et} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${et}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Wt,borderStartStartRadius:Rt,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:Rt}}}}},Pt(Le)),{"&-rtl":{direction:"rtl"}}),[`${je}-header`]:{height:Ze,padding:Lt,color:rt,lineHeight:`${Ze}px`,background:xn,[`${Ne}-menu`]:{lineHeight:"inherit"}},[`${je}-footer`]:{padding:Ot,color:ze,fontSize:Ue,background:Xe},[`${je}-content`]:{flex:"auto",minHeight:0}}};var ut=(0,Me.Z)("Layout",Le=>[Ge(Le)],Le=>{const{colorBgLayout:Ne,controlHeight:je,controlHeightLG:ze,colorText:Ye,controlHeightSM:Xe,marginXXS:lt,colorTextLightSolid:Ze,colorBgContainer:Lt}=Le,rt=ze*1.25;return{colorBgHeader:"#001529",colorBgBody:Ne,colorBgTrigger:"#002140",bodyBg:Ne,headerBg:"#001529",headerHeight:je*2,headerPadding:`0 ${rt}px`,headerColor:Ye,footerPadding:`${Xe}px ${rt}px`,footerBg:Ne,siderBg:"#001529",triggerHeight:ze+lt*2,triggerBg:"#002140",triggerColor:Ze,zeroTriggerWidth:ze,zeroTriggerHeight:ze,lightSiderBg:Lt,lightTriggerBg:Lt,lightTriggerColor:Ye}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),mt=function(Le,Ne){var je={};for(var ze in Le)Object.prototype.hasOwnProperty.call(Le,ze)&&Ne.indexOf(ze)<0&&(je[ze]=Le[ze]);if(Le!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ye=0,ze=Object.getOwnPropertySymbols(Le);Ye<ze.length;Ye++)Ne.indexOf(ze[Ye])<0&&Object.prototype.propertyIsEnumerable.call(Le,ze[Ye])&&(je[ze[Ye]]=Le[ze[Ye]]);return je};const yt=We.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function De(Le){let{suffixCls:Ne,tagName:je,displayName:ze}=Le;return Ye=>We.forwardRef((lt,Ze)=>We.createElement(Ye,Object.assign({ref:Ze,suffixCls:Ne,tagName:je},lt)))}const te=We.forwardRef((Le,Ne)=>{const{prefixCls:je,suffixCls:ze,className:Ye,tagName:Xe}=Le,lt=mt(Le,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ze}=We.useContext(ct.E_),Lt=Ze("layout",je),[rt,Ot]=ut(Lt),wt=ze?`${Lt}-${ze}`:Lt;return rt(We.createElement(Xe,Object.assign({className:He()(je||wt,Ye,Ot),ref:Ne},lt)))}),ee=We.forwardRef((Le,Ne)=>{const{direction:je}=We.useContext(ct.E_),[ze,Ye]=We.useState([]),{prefixCls:Xe,className:lt,rootClassName:Ze,children:Lt,hasSider:rt,tagName:Ot,style:wt}=Le,Dt=mt(Le,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Wt=(0,st.Z)(Dt,["suffixCls"]),{getPrefixCls:Mt,layout:et}=We.useContext(ct.E_),Ue=Mt("layout",Xe),[Rt,Pn]=ut(Ue),xn=He()(Ue,{[`${Ue}-has-sider`]:typeof rt=="boolean"?rt:ze.length>0,[`${Ue}-rtl`]:je==="rtl"},et==null?void 0:et.className,lt,Ze,Pn),_t=We.useMemo(()=>({siderHook:{addSider:qt=>{Ye(cn=>[].concat((0,le.Z)(cn),[qt]))},removeSider:qt=>{Ye(cn=>cn.filter(Gn=>Gn!==qt))}}}),[]);return Rt(We.createElement(yt.Provider,{value:_t},We.createElement(Ot,Object.assign({ref:Ne,className:xn,style:Object.assign(Object.assign({},et==null?void 0:et.style),wt)},Wt),Lt)))}),ce=De({tagName:"div",displayName:"Layout"})(ee),se=De({suffixCls:"header",tagName:"header",displayName:"Header"})(te),he=De({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(te),ve=De({suffixCls:"content",tagName:"main",displayName:"Content"})(te);var Ee=ce},40875:function(_n,yn,me){"use strict";me.d(yn,{J:function(){return ct}});var le=me(59301),Te=me(33234),He=me(70425),st=function(Me,bt){var Pt={};for(var Ge in Me)Object.prototype.hasOwnProperty.call(Me,Ge)&&bt.indexOf(Ge)<0&&(Pt[Ge]=Me[Ge]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ut=0,Ge=Object.getOwnPropertySymbols(Me);ut<Ge.length;ut++)bt.indexOf(Ge[ut])<0&&Object.prototype.propertyIsEnumerable.call(Me,Ge[ut])&&(Pt[Ge[ut]]=Me[Ge[ut]]);return Pt};const We=le.createContext(null),ct=le.forwardRef((Me,bt)=>{const{children:Pt}=Me,Ge=st(Me,["children"]),ut=le.useContext(We),mt=le.useMemo(()=>Object.assign(Object.assign({},ut),Ge),[ut,Ge.prefixCls,Ge.mode,Ge.selectable]);return le.createElement(We.Provider,{value:mt},le.createElement(Te.BR,null,(0,He.supportNodeRef)(Pt)?le.cloneElement(Pt,{ref:bt}):Pt))});yn.Z=We},20834:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return ln}});var le=me(15285),Te=me(59301),He=me(45818),st=me(92310),We=me.n(st),ct=me(36355),Me=function($t,Tt){var ft={};for(var $e in $t)Object.prototype.hasOwnProperty.call($t,$e)&&Tt.indexOf($e)<0&&(ft[$e]=$t[$e]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,$e=Object.getOwnPropertySymbols($t);Gt<$e.length;Gt++)Tt.indexOf($e[Gt])<0&&Object.prototype.propertyIsEnumerable.call($t,$e[Gt])&&(ft[$e[Gt]]=$t[$e[Gt]]);return ft},Pt=$t=>{const{prefixCls:Tt,className:ft,dashed:$e}=$t,Gt=Me($t,["prefixCls","className","dashed"]),{getPrefixCls:Ht}=Te.useContext(ct.E_),ht=Ht("menu",Tt),at=We()({[`${ht}-item-divider-dashed`]:!!$e},ft);return Te.createElement(le.iz,Object.assign({className:at},Gt))},Ge=me(11592),ut=me(2738),mt=me(6848),yt=me(92343),te=(0,Te.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),ce=$t=>{var Tt;const{className:ft,children:$e,icon:Gt,title:Ht,danger:ht}=$t,{prefixCls:at,firstLevel:Re,direction:Pe,disableMenuItemTitleTooltip:ye,inlineCollapsed:Oe}=Te.useContext(te),Ke=wn=>{const hi=Te.createElement("span",{className:`${at}-title-content`},$e);return(!Gt||(0,yt.l$)($e)&&$e.type==="span")&&$e&&wn&&Re&&typeof $e=="string"?Te.createElement("div",{className:`${at}-inline-collapsed-noicon`},$e.charAt(0)):hi},{siderCollapsed:Fe}=Te.useContext(He.D);let Et=Ht;typeof Ht=="undefined"?Et=Re?$e:"":Ht===!1&&(Et="");const sn={title:Et};!Fe&&!Oe&&(sn.title=null,sn.open=!1);const pn=(0,Ge.Z)($e).length;let en=Te.createElement(le.ck,Object.assign({},(0,ut.Z)($t,["title","icon","danger"]),{className:We()({[`${at}-item-danger`]:ht,[`${at}-item-only-child`]:(Gt?pn+1:pn)===1},ft),title:typeof Ht=="string"?Ht:void 0}),(0,yt.Tm)(Gt,{className:We()((0,yt.l$)(Gt)?(Tt=Gt.props)===null||Tt===void 0?void 0:Tt.className:"",`${at}-item-icon`)}),Ke(Oe));return ye||(en=Te.createElement(mt.Z,Object.assign({},sn,{placement:Pe==="rtl"?"left":"right",overlayClassName:`${at}-inline-collapsed-tooltip`}),en)),en},he=$t=>{var Tt;const{popupClassName:ft,icon:$e,title:Gt,theme:Ht}=$t,ht=Te.useContext(te),{prefixCls:at,inlineCollapsed:Re,theme:Pe}=ht,ye=(0,le.Xl)();let Oe;if(!$e)Oe=Re&&!ye.length&&Gt&&typeof Gt=="string"?Te.createElement("div",{className:`${at}-inline-collapsed-noicon`},Gt.charAt(0)):Te.createElement("span",{className:`${at}-title-content`},Gt);else{const Fe=(0,yt.l$)(Gt)&&Gt.type==="span";Oe=Te.createElement(Te.Fragment,null,(0,yt.Tm)($e,{className:We()((0,yt.l$)($e)?(Tt=$e.props)===null||Tt===void 0?void 0:Tt.className:"",`${at}-item-icon`)}),Fe?Gt:Te.createElement("span",{className:`${at}-title-content`},Gt))}const Ke=Te.useMemo(()=>Object.assign(Object.assign({},ht),{firstLevel:!1}),[ht]);return Te.createElement(te.Provider,{value:Ke},Te.createElement(le.Wd,Object.assign({},(0,ut.Z)($t,["icon"]),{title:Oe,popupClassName:We()(at,ft,`${at}-${Ht||Pe}`)})))},ve=me(18785),Ee=me(70425),Le=me(62892),Ne=me(40875),je=function($t,Tt){var ft={};for(var $e in $t)Object.prototype.hasOwnProperty.call($t,$e)&&Tt.indexOf($e)<0&&(ft[$e]=$t[$e]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,$e=Object.getOwnPropertySymbols($t);Gt<$e.length;Gt++)Tt.indexOf($e[Gt])<0&&Object.prototype.propertyIsEnumerable.call($t,$e[Gt])&&(ft[$e[Gt]]=$t[$e[Gt]]);return ft};function ze($t){return($t||[]).map((Tt,ft)=>{if(Tt&&typeof Tt=="object"){const $e=Tt,{label:Gt,children:Ht,key:ht,type:at}=$e,Re=je($e,["label","children","key","type"]),Pe=ht!=null?ht:`tmp-${ft}`;return Ht||at==="group"?at==="group"?Te.createElement(le.BW,Object.assign({key:Pe},Re,{title:Gt}),ze(Ht)):Te.createElement(he,Object.assign({key:Pe},Re,{title:Gt}),ze(Ht)):at==="divider"?Te.createElement(Pt,Object.assign({key:Pe},Re)):Te.createElement(ce,Object.assign({key:Pe},Re),Gt)}return null}).filter(Tt=>Tt)}function Ye($t){return Te.useMemo(()=>$t&&ze($t),[$t])}var Xe=me(64993),lt=me(17313),Ze=me(8378),Lt=me(13826),rt=me(29878),Ot=me(83116),wt=me(37613),Wt=$t=>{const{componentCls:Tt,motionDurationSlow:ft,horizontalLineHeight:$e,colorSplit:Gt,lineWidth:Ht,lineType:ht,itemPaddingInline:at}=$t;return{[`${Tt}-horizontal`]:{lineHeight:$e,border:0,borderBottom:`${Ht}px ${ht} ${Gt}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Tt}-item, ${Tt}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:at},[`> ${Tt}-item:hover,
> ${Tt}-item-active,
> ${Tt}-submenu ${Tt}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Tt}-item, ${Tt}-submenu-title`]:{transition:[`border-color ${ft}`,`background ${ft}`].join(",")},[`${Tt}-submenu-arrow`]:{display:"none"}}}},et=$t=>{let{componentCls:Tt,menuArrowOffset:ft}=$t;return{[`${Tt}-rtl`]:{direction:"rtl"},[`${Tt}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Tt}-rtl${Tt}-vertical,
${Tt}-submenu-rtl ${Tt}-vertical`]:{[`${Tt}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${ft})`},"&::after":{transform:`rotate(45deg) translateY(${ft})`}}}}};const Ue=$t=>Object.assign({},(0,lt.oN)($t));var Pn=($t,Tt)=>{const{componentCls:ft,itemColor:$e,itemSelectedColor:Gt,groupTitleColor:Ht,itemBg:ht,subMenuItemBg:at,itemSelectedBg:Re,activeBarHeight:Pe,activeBarWidth:ye,activeBarBorderWidth:Oe,motionDurationSlow:Ke,motionEaseInOut:Fe,motionEaseOut:Et,itemPaddingInline:sn,motionDurationMid:pn,itemHoverColor:en,lineType:wn,colorSplit:hi,itemDisabledColor:Rn,dangerItemColor:Sn,dangerItemHoverColor:Pi,dangerItemSelectedColor:zi,dangerItemActiveBg:Zi,dangerItemSelectedBg:ir,itemHoverBg:Nr,itemActiveBg:pi,menuSubMenuBg:li,horizontalItemSelectedColor:xi,horizontalItemSelectedBg:Gi,horizontalItemBorderRadius:Oi,horizontalItemHoverBg:to,popupBg:eo}=$t;return{[`${ft}-${Tt}, ${ft}-${Tt} > ${ft}`]:{color:$e,background:ht,[`&${ft}-root:focus-visible`]:Object.assign({},Ue($t)),[`${ft}-item-group-title`]:{color:Ht},[`${ft}-submenu-selected`]:{[`> ${ft}-submenu-title`]:{color:Gt}},[`${ft}-item-disabled, ${ft}-submenu-disabled`]:{color:`${Rn} !important`},[`${ft}-item:not(${ft}-item-selected):not(${ft}-submenu-selected)`]:{[`&:hover, > ${ft}-submenu-title:hover`]:{color:en}},[`&:not(${ft}-horizontal)`]:{[`${ft}-item:not(${ft}-item-selected)`]:{"&:hover":{backgroundColor:Nr},"&:active":{backgroundColor:pi}},[`${ft}-submenu-title`]:{"&:hover":{backgroundColor:Nr},"&:active":{backgroundColor:pi}}},[`${ft}-item-danger`]:{color:Sn,[`&${ft}-item:hover`]:{[`&:not(${ft}-item-selected):not(${ft}-submenu-selected)`]:{color:Pi}},[`&${ft}-item:active`]:{background:Zi}},[`${ft}-item a`]:{"&, &:hover":{color:"inherit"}},[`${ft}-item-selected`]:{color:Gt,[`&${ft}-item-danger`]:{color:zi},"a, a:hover":{color:"inherit"}},[`& ${ft}-item-selected`]:{backgroundColor:Re,[`&${ft}-item-danger`]:{backgroundColor:ir}},[`${ft}-item, ${ft}-submenu-title`]:{[`&:not(${ft}-item-disabled):focus-visible`]:Object.assign({},Ue($t))},[`&${ft}-submenu > ${ft}`]:{backgroundColor:li},[`&${ft}-popup > ${ft}`]:{backgroundColor:eo},[`&${ft}-horizontal`]:Object.assign(Object.assign({},Tt==="dark"?{borderBottom:0}:{}),{[`> ${ft}-item, > ${ft}-submenu`]:{top:Oe,marginTop:-Oe,marginBottom:0,borderRadius:Oi,"&::after":{position:"absolute",insetInline:sn,bottom:0,borderBottom:`${Pe}px solid transparent`,transition:`border-color ${Ke} ${Fe}`,content:'""'},"&:hover, &-active, &-open":{background:to,"&::after":{borderBottomWidth:Pe,borderBottomColor:xi}},"&-selected":{color:xi,backgroundColor:Gi,"&:hover":{backgroundColor:Gi},"&::after":{borderBottomWidth:Pe,borderBottomColor:xi}}}}),[`&${ft}-root`]:{[`&${ft}-inline, &${ft}-vertical`]:{borderInlineEnd:`${Oe}px ${wn} ${hi}`}},[`&${ft}-inline`]:{[`${ft}-sub${ft}-inline`]:{background:at},[`${ft}-item, ${ft}-submenu-title`]:Oe&&ye?{width:`calc(100% + ${Oe}px)`}:{},[`${ft}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ye}px solid ${Gt}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${pn} ${Et}`,`opacity ${pn} ${Et}`].join(","),content:'""'},[`&${ft}-item-danger`]:{"&::after":{borderInlineEndColor:zi}}},[`${ft}-selected, ${ft}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${pn} ${Fe}`,`opacity ${pn} ${Fe}`].join(",")}}}}}};const xn=$t=>{const{componentCls:Tt,itemHeight:ft,itemMarginInline:$e,padding:Gt,menuArrowSize:Ht,marginXS:ht,itemMarginBlock:at}=$t,Re=Gt+Ht+ht;return{[`${Tt}-item`]:{position:"relative",overflow:"hidden"},[`${Tt}-item, ${Tt}-submenu-title`]:{height:ft,lineHeight:`${ft}px`,paddingInline:Gt,overflow:"hidden",textOverflow:"ellipsis",marginInline:$e,marginBlock:at,width:`calc(100% - ${$e*2}px)`},[`> ${Tt}-item,
> ${Tt}-submenu > ${Tt}-submenu-title`]:{height:ft,lineHeight:`${ft}px`},[`${Tt}-item-group-list ${Tt}-submenu-title,
${Tt}-submenu-title`]:{paddingInlineEnd:Re}}};var qt=$t=>{const{componentCls:Tt,iconCls:ft,itemHeight:$e,colorTextLightSolid:Gt,dropdownWidth:Ht,controlHeightLG:ht,motionDurationMid:at,motionEaseOut:Re,paddingXL:Pe,itemMarginInline:ye,fontSizeLG:Oe,motionDurationSlow:Ke,paddingXS:Fe,boxShadowSecondary:Et,collapsedWidth:sn,collapsedIconSize:pn}=$t,en={height:$e,lineHeight:`${$e}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Tt]:{"&-inline, &-vertical":Object.assign({[`&${Tt}-root`]:{boxShadow:"none"}},xn($t))},[`${Tt}-submenu-popup`]:{[`${Tt}-vertical`]:Object.assign(Object.assign({},xn($t)),{boxShadow:Et})}},{[`${Tt}-submenu-popup ${Tt}-vertical${Tt}-sub`]:{minWidth:Ht,maxHeight:`calc(100vh - ${ht*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Tt}-inline`]:{width:"100%",[`&${Tt}-root`]:{[`${Tt}-item, ${Tt}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${Ke}`,`background ${Ke}`,`padding ${at} ${Re}`].join(","),[`> ${Tt}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Tt}-sub${Tt}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Tt}-submenu > ${Tt}-submenu-title`]:en,[`& ${Tt}-item-group-title`]:{paddingInlineStart:Pe}},[`${Tt}-item`]:en}},{[`${Tt}-inline-collapsed`]:{width:sn,[`&${Tt}-root`]:{[`${Tt}-item, ${Tt}-submenu ${Tt}-submenu-title`]:{[`> ${Tt}-inline-collapsed-noicon`]:{fontSize:Oe,textAlign:"center"}}},[`> ${Tt}-item,
> ${Tt}-item-group > ${Tt}-item-group-list > ${Tt}-item,
> ${Tt}-item-group > ${Tt}-item-group-list > ${Tt}-submenu > ${Tt}-submenu-title,
> ${Tt}-submenu > ${Tt}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Oe/2}px - ${ye}px)`,textOverflow:"clip",[`
${Tt}-submenu-arrow,
${Tt}-submenu-expand-icon
`]:{opacity:0},[`${Tt}-item-icon, ${ft}`]:{margin:0,fontSize:pn,lineHeight:`${$e}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Tt}-item-icon, ${ft}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Tt}-item-icon, ${ft}`]:{display:"none"},"a, a:hover":{color:Gt}},[`${Tt}-item-group-title`]:Object.assign(Object.assign({},lt.vS),{paddingInline:Fe})}}]};const cn=$t=>{const{componentCls:Tt,motionDurationSlow:ft,motionDurationMid:$e,motionEaseInOut:Gt,motionEaseOut:Ht,iconCls:ht,iconSize:at,iconMarginInlineEnd:Re}=$t;return{[`${Tt}-item, ${Tt}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${ft}`,`background ${ft}`,`padding ${ft} ${Gt}`].join(","),[`${Tt}-item-icon, ${ht}`]:{minWidth:at,fontSize:at,transition:[`font-size ${$e} ${Ht}`,`margin ${ft} ${Gt}`,`color ${ft}`].join(","),"+ span":{marginInlineStart:Re,opacity:1,transition:[`opacity ${ft} ${Gt}`,`margin ${ft}`,`color ${ft}`].join(",")}},[`${Tt}-item-icon`]:Object.assign({},(0,lt.Ro)()),[`&${Tt}-item-only-child`]:{[`> ${ht}, > ${Tt}-item-icon`]:{marginInlineEnd:0}}},[`${Tt}-item-disabled, ${Tt}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Tt}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Gn=$t=>{const{componentCls:Tt,motionDurationSlow:ft,motionEaseInOut:$e,borderRadius:Gt,menuArrowSize:Ht,menuArrowOffset:ht}=$t;return{[`${Tt}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:$t.margin,width:Ht,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${ft} ${$e}, opacity ${ft}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Ht*.6,height:Ht*.15,backgroundColor:"currentcolor",borderRadius:Gt,transition:[`background ${ft} ${$e}`,`transform ${ft} ${$e}`,`top ${ft} ${$e}`,`color ${ft} ${$e}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${ht})`},"&::after":{transform:`rotate(-45deg) translateY(${ht})`}}}}},gn=$t=>{const{antCls:Tt,componentCls:ft,fontSize:$e,motionDurationSlow:Gt,motionDurationMid:Ht,motionEaseInOut:ht,paddingXS:at,padding:Re,colorSplit:Pe,lineWidth:ye,zIndexPopup:Oe,borderRadiusLG:Ke,subMenuItemBorderRadius:Fe,menuArrowSize:Et,menuArrowOffset:sn,lineType:pn,menuPanelMaskInset:en,groupTitleLineHeight:wn,groupTitleFontSize:hi}=$t;return[{"":{[`${ft}`]:Object.assign(Object.assign({},(0,lt.dF)()),{"&-hidden":{display:"none"}})},[`${ft}-submenu-hidden`]:{display:"none"}},{[ft]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,lt.Wf)($t)),(0,lt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:$e,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${Gt} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${ft}-item`]:{flex:"none"}},[`${ft}-item, ${ft}-submenu, ${ft}-submenu-title`]:{borderRadius:$t.itemBorderRadius},[`${ft}-item-group-title`]:{padding:`${at}px ${Re}px`,fontSize:hi,lineHeight:wn,transition:`all ${Gt}`},[`&-horizontal ${ft}-submenu`]:{transition:[`border-color ${Gt} ${ht}`,`background ${Gt} ${ht}`].join(",")},[`${ft}-submenu, ${ft}-submenu-inline`]:{transition:[`border-color ${Gt} ${ht}`,`background ${Gt} ${ht}`,`padding ${Ht} ${ht}`].join(",")},[`${ft}-submenu ${ft}-sub`]:{cursor:"initial",transition:[`background ${Gt} ${ht}`,`padding ${Gt} ${ht}`].join(",")},[`${ft}-title-content`]:{transition:`color ${Gt}`},[`${ft}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${ft}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Pe,borderStyle:pn,borderWidth:0,borderTopWidth:ye,marginBlock:ye,padding:0,"&-dashed":{borderStyle:"dashed"}}}),cn($t)),{[`${ft}-item-group`]:{[`${ft}-item-group-list`]:{margin:0,padding:0,[`${ft}-item, ${ft}-submenu-title`]:{paddingInline:`${$e*2}px ${Re}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Oe,borderRadius:Ke,boxShadow:"none",transformOrigin:"0 0",[`&${ft}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${en}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:en},"\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:$t.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:$t.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:$t.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:$t.paddingXS},[`> ${ft}`]:Object.assign(Object.assign(Object.assign({borderRadius:Ke},cn($t)),Gn($t)),{[`${ft}-item, ${ft}-submenu > ${ft}-submenu-title`]:{borderRadius:Fe},[`${ft}-submenu-title::after`]:{transition:`transform ${Gt} ${ht}`}})}}),Gn($t)),{[`&-inline-collapsed ${ft}-submenu-arrow,
&-inline ${ft}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${sn})`},"&::after":{transform:`rotate(45deg) translateX(-${sn})`}},[`${ft}-submenu-open${ft}-submenu-inline > ${ft}-submenu-title > ${ft}-submenu-arrow`]:{transform:`translateY(-${Et*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${sn})`},"&::before":{transform:`rotate(45deg) translateX(${sn})`}}})},{[`${Tt}-layout-header`]:{[ft]:{lineHeight:"inherit"}}}]};var Zn=($t,Tt)=>(0,Ot.Z)("Menu",$e=>{if(Tt===!1)return[];const{colorBgElevated:Gt,colorPrimary:Ht,colorTextLightSolid:ht,controlHeightLG:at,fontSize:Re,darkItemColor:Pe,darkDangerItemColor:ye,darkItemBg:Oe,darkSubMenuItemBg:Ke,darkItemSelectedColor:Fe,darkItemSelectedBg:Et,darkDangerItemSelectedBg:sn,darkItemHoverBg:pn,darkGroupTitleColor:en,darkItemHoverColor:wn,darkItemDisabledColor:hi,darkDangerItemHoverColor:Rn,darkDangerItemSelectedColor:Sn,darkDangerItemActiveBg:Pi}=$e,zi=Re/7*5,Zi=(0,wt.TS)($e,{menuArrowSize:zi,menuHorizontalHeight:at*1.15,menuArrowOffset:`${zi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:Gt}),ir=(0,wt.TS)(Zi,{itemColor:Pe,itemHoverColor:wn,groupTitleColor:en,itemSelectedColor:Fe,itemBg:Oe,popupBg:Oe,subMenuItemBg:Ke,itemActiveBg:"transparent",itemSelectedBg:Et,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:pn,itemDisabledColor:hi,dangerItemColor:ye,dangerItemHoverColor:Rn,dangerItemSelectedColor:Sn,dangerItemActiveBg:Pi,dangerItemSelectedBg:sn,menuSubMenuBg:Ke,horizontalItemSelectedColor:ht,horizontalItemSelectedBg:Ht});return[gn(Zi),Wt(Zi),qt(Zi),Pn(Zi,"light"),Pn(ir,"dark"),et(Zi),(0,Ze.Z)(Zi),(0,Lt.oN)(Zi,"slide-up"),(0,Lt.oN)(Zi,"slide-down"),(0,rt._y)(Zi,"zoom-big")]},$e=>{const{colorPrimary:Gt,colorError:Ht,colorTextDisabled:ht,colorErrorBg:at,colorText:Re,colorTextDescription:Pe,colorBgContainer:ye,colorFillAlter:Oe,colorFillContent:Ke,lineWidth:Fe,lineWidthBold:Et,controlItemBgActive:sn,colorBgTextHover:pn,controlHeightLG:en,lineHeight:wn,colorBgElevated:hi,marginXXS:Rn,padding:Sn,fontSize:Pi,controlHeightSM:zi,fontSizeLG:Zi,colorTextLightSolid:ir,colorErrorHover:Nr}=$e,pi=new Xe.C(ir).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:$e.zIndexPopupBase+50,radiusItem:$e.borderRadiusLG,itemBorderRadius:$e.borderRadiusLG,radiusSubMenuItem:$e.borderRadiusSM,subMenuItemBorderRadius:$e.borderRadiusSM,colorItemText:Re,itemColor:Re,colorItemTextHover:Re,itemHoverColor:Re,colorItemTextHoverHorizontal:Gt,horizontalItemHoverColor:Gt,colorGroupTitle:Pe,groupTitleColor:Pe,colorItemTextSelected:Gt,itemSelectedColor:Gt,colorItemTextSelectedHorizontal:Gt,horizontalItemSelectedColor:Gt,colorItemBg:ye,itemBg:ye,colorItemBgHover:pn,itemHoverBg:pn,colorItemBgActive:Ke,itemActiveBg:sn,colorSubItemBg:Oe,subMenuItemBg:Oe,colorItemBgSelected:sn,itemSelectedBg:sn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Et,activeBarHeight:Et,colorActiveBarBorderSize:Fe,activeBarBorderWidth:Fe,colorItemTextDisabled:ht,itemDisabledColor:ht,colorDangerItemText:Ht,dangerItemColor:Ht,colorDangerItemTextHover:Ht,dangerItemHoverColor:Ht,colorDangerItemTextSelected:Ht,dangerItemSelectedColor:Ht,colorDangerItemBgActive:at,dangerItemActiveBg:at,colorDangerItemBgSelected:at,dangerItemSelectedBg:at,itemMarginInline:$e.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:en,groupTitleLineHeight:wn,collapsedWidth:en*2,popupBg:hi,itemMarginBlock:Rn,itemPaddingInline:Sn,horizontalLineHeight:`${en*1.15}px`,iconSize:Pi,iconMarginInlineEnd:zi-Pi,collapsedIconSize:Zi,groupTitleFontSize:Pi,darkItemDisabledColor:new Xe.C(ir).setAlpha(.25).toRgbString(),darkItemColor:pi,darkDangerItemColor:Ht,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:ir,darkItemSelectedBg:Gt,darkDangerItemSelectedBg:Ht,darkItemHoverBg:"transparent",darkGroupTitleColor:pi,darkItemHoverColor:ir,darkDangerItemHoverColor:Nr,darkDangerItemSelectedColor:ir,darkDangerItemActiveBg:Ht}},{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"]]})($t),Ct=function($t,Tt){var ft={};for(var $e in $t)Object.prototype.hasOwnProperty.call($t,$e)&&Tt.indexOf($e)<0&&(ft[$e]=$t[$e]);if($t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,$e=Object.getOwnPropertySymbols($t);Gt<$e.length;Gt++)Tt.indexOf($e[Gt])<0&&Object.prototype.propertyIsEnumerable.call($t,$e[Gt])&&(ft[$e[Gt]]=$t[$e[Gt]]);return ft},di=(0,Te.forwardRef)(($t,Tt)=>{var ft,$e;const Gt=Te.useContext(Ne.Z),Ht=Gt||{},{getPrefixCls:ht,getPopupContainer:at,direction:Re,menu:Pe}=Te.useContext(ct.E_),ye=ht(),{prefixCls:Oe,className:Ke,style:Fe,theme:Et="light",expandIcon:sn,_internalDisableMenuItemTitleTooltip:pn,inlineCollapsed:en,siderCollapsed:wn,items:hi,children:Rn,rootClassName:Sn,mode:Pi,selectable:zi,onClick:Zi,overflowedIndicatorPopupClassName:ir}=$t,Nr=Ct($t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),pi=(0,ut.Z)(Nr,["collapsedWidth"]),li=Ye(hi)||Rn;(ft=Ht.validator)===null||ft===void 0||ft.call(Ht,{mode:Pi});const xi=(0,Ee.useEvent)(function(){var tr;Zi==null||Zi.apply(void 0,arguments),(tr=Ht.onClick)===null||tr===void 0||tr.call(Ht)}),Gi=Ht.mode||Pi,Oi=zi!=null?zi:Ht.selectable,to=Te.useMemo(()=>wn!==void 0?wn:en,[en,wn]),eo={horizontal:{motionName:`${ye}-slide-up`},inline:(0,Le.Z)(ye),other:{motionName:`${ye}-zoom-big`}},Be=ht("menu",Oe||Ht.prefixCls),[Fi,wr]=Zn(Be,!Gt),Fn=We()(`${Be}-${Et}`,Pe==null?void 0:Pe.className,Ke);let wi;if(typeof sn=="function")wi=sn;else if(sn===null||sn===!1)wi=null;else if(Ht.expandIcon===null||Ht.expandIcon===!1)wi=null;else{const tr=sn!=null?sn:Ht.expandIcon;wi=(0,yt.Tm)(tr,{className:We()(`${Be}-submenu-expand-icon`,(0,yt.l$)(tr)?($e=tr.props)===null||$e===void 0?void 0:$e.className:"")})}const $i=Te.useMemo(()=>({prefixCls:Be,inlineCollapsed:to||!1,direction:Re,firstLevel:!0,theme:Et,mode:Gi,disableMenuItemTitleTooltip:pn}),[Be,to,Re,pn,Et]);return Fi(Te.createElement(Ne.Z.Provider,{value:null},Te.createElement(te.Provider,{value:$i},Te.createElement(le.ZP,Object.assign({getPopupContainer:at,overflowedIndicator:Te.createElement(ve.Z,null),overflowedIndicatorPopupClassName:We()(Be,`${Be}-${Et}`,ir),mode:Gi,selectable:Oi,onClick:xi},pi,{inlineCollapsed:to,style:Object.assign(Object.assign({},Pe==null?void 0:Pe.style),Fe),className:Fn,prefixCls:Be,direction:Re,defaultMotions:eo,expandIcon:wi,ref:Tt,rootClassName:We()(Sn,wr)}),li))))});const Kt=(0,Te.forwardRef)(($t,Tt)=>{const ft=(0,Te.useRef)(null),$e=Te.useContext(He.D);return(0,Te.useImperativeHandle)(Tt,()=>({menu:ft.current,focus:Gt=>{var Ht;(Ht=ft.current)===null||Ht===void 0||Ht.focus(Gt)}})),Te.createElement(di,Object.assign({ref:ft},$t,$e))});Kt.Item=ce,Kt.SubMenu=he,Kt.Divider=Pt,Kt.ItemGroup=le.BW;var ln=Kt},58421:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Ht}});var le=me(72308),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"},st=He,We=me(7657),ct=function(at,Re){return Te.createElement(We.Z,(0,le.Z)({},at,{ref:Re,icon:st}))},Me=Te.forwardRef(ct),bt=Me,Pt=me(49198),Ge=me(33853),ut=me(38819),mt=me(92310),yt=me.n(mt),De=me(49618),te=me(77321),ee=me(96949),ce=me(55090),se=me(77205),he=me(38793),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},Le=Ee,Ne=me(91735),je=function(ht){(0,se.Z)(Re,ht);var at=(0,he.Z)(Re);function Re(){var Pe;(0,ee.Z)(this,Re);for(var ye=arguments.length,Oe=new Array(ye),Ke=0;Ke<ye;Ke++)Oe[Ke]=arguments[Ke];return Pe=at.call.apply(at,[this].concat(Oe)),Pe.state={goInputText:""},Pe.getValidValue=function(){var Fe=Pe.state.goInputText;return!Fe||Number.isNaN(Fe)?void 0:Number(Fe)},Pe.buildOptionText=function(Fe){return"".concat(Fe," ").concat(Pe.props.locale.items_per_page)},Pe.changeSize=function(Fe){Pe.props.changeSize(Number(Fe))},Pe.handleChange=function(Fe){Pe.setState({goInputText:Fe.target.value})},Pe.handleBlur=function(Fe){var Et=Pe.props,sn=Et.goButton,pn=Et.quickGo,en=Et.rootPrefixCls,wn=Pe.state.goInputText;sn||wn===""||(Pe.setState({goInputText:""}),!(Fe.relatedTarget&&(Fe.relatedTarget.className.indexOf("".concat(en,"-item-link"))>=0||Fe.relatedTarget.className.indexOf("".concat(en,"-item"))>=0))&&pn(Pe.getValidValue()))},Pe.go=function(Fe){var Et=Pe.state.goInputText;Et!==""&&(Fe.keyCode===Le.ENTER||Fe.type==="click")&&(Pe.setState({goInputText:""}),Pe.props.quickGo(Pe.getValidValue()))},Pe}return(0,ce.Z)(Re,[{key:"getPageSizeOptions",value:function(){var ye=this.props,Oe=ye.pageSize,Ke=ye.pageSizeOptions;return Ke.some(function(Fe){return Fe.toString()===Oe.toString()})?Ke:Ke.concat([Oe.toString()]).sort(function(Fe,Et){var sn=Number.isNaN(Number(Fe))?0:Number(Fe),pn=Number.isNaN(Number(Et))?0:Number(Et);return sn-pn})}},{key:"render",value:function(){var ye=this,Oe=this.props,Ke=Oe.pageSize,Fe=Oe.locale,Et=Oe.rootPrefixCls,sn=Oe.changeSize,pn=Oe.quickGo,en=Oe.goButton,wn=Oe.selectComponentClass,hi=Oe.buildOptionText,Rn=Oe.selectPrefixCls,Sn=Oe.disabled,Pi=this.state.goInputText,zi="".concat(Et,"-options"),Zi=wn,ir=null,Nr=null,pi=null;if(!sn&&!pn)return null;var li=this.getPageSizeOptions();if(sn&&Zi){var xi=li.map(function(Gi,Oi){return Te.createElement(Zi.Option,{key:Oi,value:Gi.toString()},(hi||ye.buildOptionText)(Gi))});ir=Te.createElement(Zi,{disabled:Sn,prefixCls:Rn,showSearch:!1,className:"".concat(zi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(Ke||li[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Oi){return Oi.parentNode},"aria-label":Fe.page_size,defaultOpen:!1},xi)}return pn&&(en&&(pi=typeof en=="boolean"?Te.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Sn,className:"".concat(zi,"-quick-jumper-button")},Fe.jump_to_confirm):Te.createElement("span",{onClick:this.go,onKeyUp:this.go},en)),Nr=Te.createElement("div",{className:"".concat(zi,"-quick-jumper")},Fe.jump_to,Te.createElement("input",{disabled:Sn,type:"text",value:Pi,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":Fe.page}),Fe.page,pi)),Te.createElement("li",{className:"".concat(zi)},ir,Nr)}}]),Re}(Te.Component);je.defaultProps={pageSizeOptions:["10","20","50","100"]};var ze=je,Ye=function(at){var Re,Pe=at.rootPrefixCls,ye=at.page,Oe=at.active,Ke=at.className,Fe=at.showTitle,Et=at.onClick,sn=at.onKeyPress,pn=at.itemRender,en="".concat(Pe,"-item"),wn=yt()(en,"".concat(en,"-").concat(ye),(Re={},(0,De.Z)(Re,"".concat(en,"-active"),Oe),(0,De.Z)(Re,"".concat(en,"-disabled"),!ye),(0,De.Z)(Re,at.className,Ke),Re)),hi=function(){Et(ye)},Rn=function(zi){sn(zi,Et,ye)},Sn=pn(ye,"page",Te.createElement("a",{rel:"nofollow"},ye));return Sn?Te.createElement("li",{title:Fe?ye.toString():null,className:wn,onClick:hi,onKeyPress:Rn,tabIndex:0},Sn):null},Xe=Ye;function lt(){}function Ze(ht){var at=Number(ht);return typeof at=="number"&&!Number.isNaN(at)&&isFinite(at)&&Math.floor(at)===at}var Lt=function(at,Re,Pe){return Pe};function rt(ht,at,Re){var Pe=typeof ht=="undefined"?at.pageSize:ht;return Math.floor((Re.total-1)/Pe)+1}var Ot=function(ht){(0,se.Z)(Re,ht);var at=(0,he.Z)(Re);function Re(Pe){var ye;(0,ee.Z)(this,Re),ye=at.call(this,Pe),ye.paginationNode=Te.createRef(),ye.getJumpPrevPage=function(){return Math.max(1,ye.state.current-(ye.props.showLessItems?3:5))},ye.getJumpNextPage=function(){return Math.min(rt(void 0,ye.state,ye.props),ye.state.current+(ye.props.showLessItems?3:5))},ye.getItemIcon=function(sn,pn){var en=ye.props.prefixCls,wn=sn||Te.createElement("button",{type:"button","aria-label":pn,className:"".concat(en,"-item-link")});return typeof sn=="function"&&(wn=Te.createElement(sn,(0,te.Z)({},ye.props))),wn},ye.isValid=function(sn){var pn=ye.props.total;return Ze(sn)&&sn!==ye.state.current&&Ze(pn)&&pn>0},ye.shouldDisplayQuickJumper=function(){var sn=ye.props,pn=sn.showQuickJumper,en=sn.total,wn=ye.state.pageSize;return en<=wn?!1:pn},ye.handleKeyDown=function(sn){(sn.keyCode===Le.ARROW_UP||sn.keyCode===Le.ARROW_DOWN)&&sn.preventDefault()},ye.handleKeyUp=function(sn){var pn=ye.getValidValue(sn),en=ye.state.currentInputValue;pn!==en&&ye.setState({currentInputValue:pn}),sn.keyCode===Le.ENTER?ye.handleChange(pn):sn.keyCode===Le.ARROW_UP?ye.handleChange(pn-1):sn.keyCode===Le.ARROW_DOWN&&ye.handleChange(pn+1)},ye.handleBlur=function(sn){var pn=ye.getValidValue(sn);ye.handleChange(pn)},ye.changePageSize=function(sn){var pn=ye.state.current,en=rt(sn,ye.state,ye.props);pn=pn>en?en:pn,en===0&&(pn=ye.state.current),typeof sn=="number"&&("pageSize"in ye.props||ye.setState({pageSize:sn}),"current"in ye.props||ye.setState({current:pn,currentInputValue:pn})),ye.props.onShowSizeChange(pn,sn),"onChange"in ye.props&&ye.props.onChange&&ye.props.onChange(pn,sn)},ye.handleChange=function(sn){var pn=ye.props,en=pn.disabled,wn=pn.onChange,hi=ye.state,Rn=hi.pageSize,Sn=hi.current,Pi=hi.currentInputValue;if(ye.isValid(sn)&&!en){var zi=rt(void 0,ye.state,ye.props),Zi=sn;return sn>zi?Zi=zi:sn<1&&(Zi=1),"current"in ye.props||ye.setState({current:Zi}),Zi!==Pi&&ye.setState({currentInputValue:Zi}),wn(Zi,Rn),Zi}return Sn},ye.prev=function(){ye.hasPrev()&&ye.handleChange(ye.state.current-1)},ye.next=function(){ye.hasNext()&&ye.handleChange(ye.state.current+1)},ye.jumpPrev=function(){ye.handleChange(ye.getJumpPrevPage())},ye.jumpNext=function(){ye.handleChange(ye.getJumpNextPage())},ye.hasPrev=function(){return ye.state.current>1},ye.hasNext=function(){return ye.state.current<rt(void 0,ye.state,ye.props)},ye.runIfEnter=function(sn,pn){if(sn.key==="Enter"||sn.charCode===13){for(var en=arguments.length,wn=new Array(en>2?en-2:0),hi=2;hi<en;hi++)wn[hi-2]=arguments[hi];pn.apply(void 0,wn)}},ye.runIfEnterPrev=function(sn){ye.runIfEnter(sn,ye.prev)},ye.runIfEnterNext=function(sn){ye.runIfEnter(sn,ye.next)},ye.runIfEnterJumpPrev=function(sn){ye.runIfEnter(sn,ye.jumpPrev)},ye.runIfEnterJumpNext=function(sn){ye.runIfEnter(sn,ye.jumpNext)},ye.handleGoTO=function(sn){(sn.keyCode===Le.ENTER||sn.type==="click")&&ye.handleChange(ye.state.currentInputValue)},ye.renderPrev=function(sn){var pn=ye.props,en=pn.prevIcon,wn=pn.itemRender,hi=wn(sn,"prev",ye.getItemIcon(en,"prev page")),Rn=!ye.hasPrev();return(0,Te.isValidElement)(hi)?(0,Te.cloneElement)(hi,{disabled:Rn}):hi},ye.renderNext=function(sn){var pn=ye.props,en=pn.nextIcon,wn=pn.itemRender,hi=wn(sn,"next",ye.getItemIcon(en,"next page")),Rn=!ye.hasNext();return(0,Te.isValidElement)(hi)?(0,Te.cloneElement)(hi,{disabled:Rn}):hi};var Oe=Pe.onChange!==lt,Ke="current"in Pe;Ke&&!Oe&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var Fe=Pe.defaultCurrent;"current"in Pe&&(Fe=Pe.current);var Et=Pe.defaultPageSize;return"pageSize"in Pe&&(Et=Pe.pageSize),Fe=Math.min(Fe,rt(Et,void 0,Pe)),ye.state={current:Fe,currentInputValue:Fe,pageSize:Et},ye}return(0,ce.Z)(Re,[{key:"componentDidUpdate",value:function(ye,Oe){var Ke=this.props.prefixCls;if(Oe.current!==this.state.current&&this.paginationNode.current){var Fe=this.paginationNode.current.querySelector(".".concat(Ke,"-item-").concat(Oe.current));if(Fe&&document.activeElement===Fe){var Et;Fe==null||(Et=Fe.blur)===null||Et===void 0||Et.call(Fe)}}}},{key:"getValidValue",value:function(ye){var Oe=ye.target.value,Ke=rt(void 0,this.state,this.props),Fe=this.state.currentInputValue,Et;return Oe===""?Et=Oe:Number.isNaN(Number(Oe))?Et=Fe:Oe>=Ke?Et=Ke:Et=Number(Oe),Et}},{key:"getShowSizeChanger",value:function(){var ye=this.props,Oe=ye.showSizeChanger,Ke=ye.total,Fe=ye.totalBoundaryShowSizeChanger;return typeof Oe!="undefined"?Oe:Ke>Fe}},{key:"render",value:function(){var ye=this.props,Oe=ye.prefixCls,Ke=ye.className,Fe=ye.style,Et=ye.disabled,sn=ye.hideOnSinglePage,pn=ye.total,en=ye.locale,wn=ye.showQuickJumper,hi=ye.showLessItems,Rn=ye.showTitle,Sn=ye.showTotal,Pi=ye.simple,zi=ye.itemRender,Zi=ye.showPrevNextJumpers,ir=ye.jumpPrevIcon,Nr=ye.jumpNextIcon,pi=ye.selectComponentClass,li=ye.selectPrefixCls,xi=ye.pageSizeOptions,Gi=this.state,Oi=Gi.current,to=Gi.pageSize,eo=Gi.currentInputValue;if(sn===!0&&pn<=to)return null;var Be=rt(void 0,this.state,this.props),Fi=[],wr=null,Fn=null,wi=null,$i=null,tr=null,ei=wn&&wn.goButton,$n=hi?1:2,zt=Oi-1>0?Oi-1:0,Vt=Oi+1<Be?Oi+1:Be,Qe=(0,ve.Z)(this.props,{aria:!0,data:!0}),an=Sn&&Te.createElement("li",{className:"".concat(Oe,"-total-text")},Sn(pn,[pn===0?0:(Oi-1)*to+1,Oi*to>pn?pn:Oi*to]));if(Pi){ei&&(typeof ei=="boolean"?tr=Te.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},en.jump_to_confirm):tr=Te.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ei),tr=Te.createElement("li",{title:Rn?"".concat(en.jump_to).concat(Oi,"/").concat(Be):null,className:"".concat(Oe,"-simple-pager")},tr));var dn=this.renderPrev(zt);return Te.createElement("ul",(0,le.Z)({className:yt()(Oe,"".concat(Oe,"-simple"),(0,De.Z)({},"".concat(Oe,"-disabled"),Et),Ke),style:Fe,ref:this.paginationNode},Qe),an,dn?Te.createElement("li",{title:Rn?en.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:yt()("".concat(Oe,"-prev"),(0,De.Z)({},"".concat(Oe,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},dn):null,Te.createElement("li",{title:Rn?"".concat(Oi,"/").concat(Be):null,className:"".concat(Oe,"-simple-pager")},Te.createElement("input",{type:"text",value:eo,disabled:Et,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Te.createElement("span",{className:"".concat(Oe,"-slash")},"/"),Be),Te.createElement("li",{title:Rn?en.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:yt()("".concat(Oe,"-next"),(0,De.Z)({},"".concat(Oe,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Vt)),tr)}if(Be<=3+$n*2){var Nt={locale:en,rootPrefixCls:Oe,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Rn,itemRender:zi};Be||Fi.push(Te.createElement(Xe,(0,le.Z)({},Nt,{key:"noPager",page:1,className:"".concat(Oe,"-item-disabled")})));for(var dt=1;dt<=Be;dt+=1){var nn=Oi===dt;Fi.push(Te.createElement(Xe,(0,le.Z)({},Nt,{key:dt,page:dt,active:nn})))}}else{var vn=hi?en.prev_3:en.prev_5,zn=hi?en.next_3:en.next_5,qn=zi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ir,"prev page")),Ft=zi(this.getJumpNextPage(),"jump-next",this.getItemIcon(Nr,"next page"));Zi&&(wr=qn?Te.createElement("li",{title:Rn?vn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:yt()("".concat(Oe,"-jump-prev"),(0,De.Z)({},"".concat(Oe,"-jump-prev-custom-icon"),!!ir))},qn):null,Fn=Ft?Te.createElement("li",{title:Rn?zn:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:yt()("".concat(Oe,"-jump-next"),(0,De.Z)({},"".concat(Oe,"-jump-next-custom-icon"),!!Nr))},Ft):null),$i=Te.createElement(Xe,{locale:en,last:!0,rootPrefixCls:Oe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Be,page:Be,active:!1,showTitle:Rn,itemRender:zi}),wi=Te.createElement(Xe,{locale:en,rootPrefixCls:Oe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Rn,itemRender:zi});var Bn=Math.max(1,Oi-$n),Kn=Math.min(Oi+$n,Be);Oi-1<=$n&&(Kn=1+$n*2),Be-Oi<=$n&&(Bn=Be-$n*2);for(var Ci=Bn;Ci<=Kn;Ci+=1){var En=Oi===Ci;Fi.push(Te.createElement(Xe,{locale:en,rootPrefixCls:Oe,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ci,page:Ci,active:En,showTitle:Rn,itemRender:zi}))}Oi-1>=$n*2&&Oi!==3&&(Fi[0]=(0,Te.cloneElement)(Fi[0],{className:"".concat(Oe,"-item-after-jump-prev")}),Fi.unshift(wr)),Be-Oi>=$n*2&&Oi!==Be-2&&(Fi[Fi.length-1]=(0,Te.cloneElement)(Fi[Fi.length-1],{className:"".concat(Oe,"-item-before-jump-next")}),Fi.push(Fn)),Bn!==1&&Fi.unshift(wi),Kn!==Be&&Fi.push($i)}var un=!this.hasPrev()||!Be,bn=!this.hasNext()||!Be,Ei=this.renderPrev(zt),Ni=this.renderNext(Vt);return Te.createElement("ul",(0,le.Z)({className:yt()(Oe,Ke,(0,De.Z)({},"".concat(Oe,"-disabled"),Et)),style:Fe,ref:this.paginationNode},Qe),an,Ei?Te.createElement("li",{title:Rn?en.prev_page:null,onClick:this.prev,tabIndex:un?null:0,onKeyPress:this.runIfEnterPrev,className:yt()("".concat(Oe,"-prev"),(0,De.Z)({},"".concat(Oe,"-disabled"),un)),"aria-disabled":un},Ei):null,Fi,Ni?Te.createElement("li",{title:Rn?en.next_page:null,onClick:this.next,tabIndex:bn?null:0,onKeyPress:this.runIfEnterNext,className:yt()("".concat(Oe,"-next"),(0,De.Z)({},"".concat(Oe,"-disabled"),bn)),"aria-disabled":bn},Ni):null,Te.createElement(ze,{disabled:Et,locale:en,rootPrefixCls:Oe,selectComponentClass:pi,selectPrefixCls:li,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Oi,pageSize:to,pageSizeOptions:xi,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ei}))}}],[{key:"getDerivedStateFromProps",value:function(ye,Oe){var Ke={};if("current"in ye&&(Ke.current=ye.current,ye.current!==Oe.current&&(Ke.currentInputValue=Ke.current)),"pageSize"in ye&&ye.pageSize!==Oe.pageSize){var Fe=Oe.current,Et=rt(ye.pageSize,Oe,ye);Fe=Fe>Et?Et:Fe,"current"in ye||(Ke.current=Fe,Ke.currentInputValue=Fe),Ke.pageSize=ye.pageSize}return Ke}}]),Re}(Te.Component);Ot.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:lt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:lt,locale:Ne.Z,style:{},itemRender:Lt,totalBoundaryShowSizeChanger:50};var wt=Ot,Dt=me(22075),Wt=me(36355),Mt=me(19716),et=me(8628),Ue=me(9763),Rt=me(57809);const Pn=ht=>Te.createElement(Rt.default,Object.assign({},ht,{showSearch:!0,size:"small"})),xn=ht=>Te.createElement(Rt.default,Object.assign({},ht,{showSearch:!0,size:"middle"}));Pn.Option=Rt.default.Option,xn.Option=Rt.default.Option;var _t=me(9937),qt=me(17313),cn=me(83116),Gn=me(37613);const gn=ht=>{const{componentCls:at}=ht;return{[`${at}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${at}-item-link`]:{color:ht.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${at}-item-link`]:{color:ht.colorTextDisabled,cursor:"not-allowed"}}},[`&${at}-disabled`]:{cursor:"not-allowed",[`${at}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:ht.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:ht.colorBorder,backgroundColor:ht.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:ht.itemActiveBgDisabled},a:{color:ht.itemActiveColorDisabled}}},[`${at}-item-link`]:{color:ht.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${at}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${at}-simple-pager`]:{color:ht.colorTextDisabled},[`${at}-jump-prev, ${at}-jump-next`]:{[`${at}-item-link-icon`]:{opacity:0},[`${at}-item-ellipsis`]:{opacity:1}}},[`&${at}-simple`]:{[`${at}-prev, ${at}-next`]:{[`&${at}-disabled ${at}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},Zn=ht=>{const{componentCls:at}=ht;return{[`&${at}-mini ${at}-total-text, &${at}-mini ${at}-simple-pager`]:{height:ht.itemSizeSM,lineHeight:`${ht.itemSizeSM}px`},[`&${at}-mini ${at}-item`]:{minWidth:ht.itemSizeSM,height:ht.itemSizeSM,margin:0,lineHeight:`${ht.itemSizeSM-2}px`},[`&${at}-mini:not(${at}-disabled) ${at}-item:not(${at}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:ht.colorBgTextHover},"&:active":{backgroundColor:ht.colorBgTextActive}},[`&${at}-mini ${at}-prev, &${at}-mini ${at}-next`]:{minWidth:ht.itemSizeSM,height:ht.itemSizeSM,margin:0,lineHeight:`${ht.itemSizeSM}px`},[`&${at}-mini:not(${at}-disabled)`]:{[`${at}-prev, ${at}-next`]:{[`&:hover ${at}-item-link`]:{backgroundColor:ht.colorBgTextHover},[`&:active ${at}-item-link`]:{backgroundColor:ht.colorBgTextActive},[`&${at}-disabled:hover ${at}-item-link`]:{backgroundColor:"transparent"}}},[`
&${at}-mini ${at}-prev ${at}-item-link,
&${at}-mini ${at}-next ${at}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:ht.itemSizeSM,lineHeight:`${ht.itemSizeSM}px`}},[`&${at}-mini ${at}-jump-prev, &${at}-mini ${at}-jump-next`]:{height:ht.itemSizeSM,marginInlineEnd:0,lineHeight:`${ht.itemSizeSM}px`},[`&${at}-mini ${at}-options`]:{marginInlineStart:ht.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:ht.miniOptionsSizeChangerTop},"&-quick-jumper":{height:ht.itemSizeSM,lineHeight:`${ht.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,_t.x0)(ht)),{width:ht.paginationMiniQuickJumperInputWidth,height:ht.controlHeightSM})}}}},Ct=ht=>{const{componentCls:at}=ht;return{[`
&${at}-simple ${at}-prev,
&${at}-simple ${at}-next
`]:{height:ht.itemSizeSM,lineHeight:`${ht.itemSizeSM}px`,verticalAlign:"top",[`${at}-item-link`]:{height:ht.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:ht.colorBgTextHover},"&:active":{backgroundColor:ht.colorBgTextActive},"&::after":{height:ht.itemSizeSM,lineHeight:`${ht.itemSizeSM}px`}}},[`&${at}-simple ${at}-simple-pager`]:{display:"inline-block",height:ht.itemSizeSM,marginInlineEnd:ht.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:ht.marginXS,padding:`0 ${ht.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:ht.itemInputBg,border:`${ht.lineWidth}px ${ht.lineType} ${ht.colorBorder}`,borderRadius:ht.borderRadius,outline:"none",transition:`border-color ${ht.motionDurationMid}`,color:"inherit","&:hover":{borderColor:ht.colorPrimary},"&:focus":{borderColor:ht.colorPrimaryHover,boxShadow:`${ht.inputOutlineOffset}px 0 ${ht.controlOutlineWidth}px ${ht.controlOutline}`},"&[disabled]":{color:ht.colorTextDisabled,backgroundColor:ht.colorBgContainerDisabled,borderColor:ht.colorBorder,cursor:"not-allowed"}}}}},Wn=ht=>{const{componentCls:at}=ht;return{[`${at}-jump-prev, ${at}-jump-next`]:{outline:0,[`${at}-item-container`]:{position:"relative",[`${at}-item-link-icon`]:{color:ht.colorPrimary,fontSize:ht.fontSizeSM,opacity:0,transition:`all ${ht.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${at}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:ht.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:ht.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:ht.paginationEllipsisTextIndent,opacity:1,transition:`all ${ht.motionDurationMid}`}},"&:hover":{[`${at}-item-link-icon`]:{opacity:1},[`${at}-item-ellipsis`]:{opacity:0}}},[`
${at}-prev,
${at}-jump-prev,
${at}-jump-next
`]:{marginInlineEnd:ht.marginXS},[`
${at}-prev,
${at}-next,
${at}-jump-prev,
${at}-jump-next
`]:{display:"inline-block",minWidth:ht.itemSize,height:ht.itemSize,color:ht.colorText,fontFamily:ht.fontFamily,lineHeight:`${ht.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:ht.borderRadius,cursor:"pointer",transition:`all ${ht.motionDurationMid}`},[`${at}-prev, ${at}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:ht.colorText,cursor:"pointer",userSelect:"none"},[`${at}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:ht.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${ht.lineWidth}px ${ht.lineType} transparent`,borderRadius:ht.borderRadius,outline:"none",transition:`all ${ht.motionDurationMid}`},[`&:hover ${at}-item-link`]:{backgroundColor:ht.colorBgTextHover},[`&:active ${at}-item-link`]:{backgroundColor:ht.colorBgTextActive},[`&${at}-disabled:hover`]:{[`${at}-item-link`]:{backgroundColor:"transparent"}}},[`${at}-slash`]:{marginInlineEnd:ht.paginationSlashMarginInlineEnd,marginInlineStart:ht.paginationSlashMarginInlineStart},[`${at}-options`]:{display:"inline-block",marginInlineStart:ht.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:ht.controlHeight,marginInlineStart:ht.marginXS,lineHeight:`${ht.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,_t.ik)(ht)),{width:ht.controlHeightLG*1.25,height:ht.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:ht.marginXS,marginInlineEnd:ht.marginXS})}}}},di=ht=>{const{componentCls:at}=ht;return{[`${at}-item`]:{display:"inline-block",minWidth:ht.itemSize,height:ht.itemSize,marginInlineEnd:ht.marginXS,fontFamily:ht.fontFamily,lineHeight:`${ht.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${ht.lineWidth}px ${ht.lineType} transparent`,borderRadius:ht.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${ht.paginationItemPaddingInline}px`,color:ht.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${at}-item-active)`]:{"&:hover":{transition:`all ${ht.motionDurationMid}`,backgroundColor:ht.colorBgTextHover},"&:active":{backgroundColor:ht.colorBgTextActive}},"&-active":{fontWeight:ht.fontWeightStrong,backgroundColor:ht.itemActiveBg,borderColor:ht.colorPrimary,a:{color:ht.colorPrimary},"&:hover":{borderColor:ht.colorPrimaryHover},"&:hover a":{color:ht.colorPrimaryHover}}}}},Kt=ht=>{const{componentCls:at}=ht;return{[at]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,qt.Wf)(ht)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${at}-total-text`]:{display:"inline-block",height:ht.itemSize,marginInlineEnd:ht.marginXS,lineHeight:`${ht.itemSize-2}px`,verticalAlign:"middle"}}),di(ht)),Wn(ht)),Ct(ht)),Zn(ht)),gn(ht)),{[`@media only screen and (max-width: ${ht.screenLG}px)`]:{[`${at}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${ht.screenSM}px)`]:{[`${at}-options`]:{display:"none"}}}),[`&${ht.componentCls}-rtl`]:{direction:"rtl"}}},ln=ht=>{const{componentCls:at}=ht;return{[`${at}${at}-disabled:not(${at}-mini)`]:{"&, &:hover":{[`${at}-item-link`]:{borderColor:ht.colorBorder}},"&:focus-visible":{[`${at}-item-link`]:{borderColor:ht.colorBorder}},[`${at}-item, ${at}-item-link`]:{backgroundColor:ht.colorBgContainerDisabled,borderColor:ht.colorBorder,[`&:hover:not(${at}-item-active)`]:{backgroundColor:ht.colorBgContainerDisabled,borderColor:ht.colorBorder,a:{color:ht.colorTextDisabled}},[`&${at}-item-active`]:{backgroundColor:ht.itemActiveBgDisabled}},[`${at}-prev, ${at}-next`]:{"&:hover button":{backgroundColor:ht.colorBgContainerDisabled,borderColor:ht.colorBorder,color:ht.colorTextDisabled},[`${at}-item-link`]:{backgroundColor:ht.colorBgContainerDisabled,borderColor:ht.colorBorder}}},[`${at}:not(${at}-mini)`]:{[`${at}-prev, ${at}-next`]:{"&:hover button":{borderColor:ht.colorPrimaryHover,backgroundColor:ht.itemBg},[`${at}-item-link`]:{backgroundColor:ht.itemLinkBg,borderColor:ht.colorBorder},[`&:hover ${at}-item-link`]:{borderColor:ht.colorPrimary,backgroundColor:ht.itemBg,color:ht.colorPrimary},[`&${at}-disabled`]:{[`${at}-item-link`]:{borderColor:ht.colorBorder,color:ht.colorTextDisabled}}},[`${at}-item`]:{backgroundColor:ht.itemBg,border:`${ht.lineWidth}px ${ht.lineType} ${ht.colorBorder}`,[`&:hover:not(${at}-item-active)`]:{borderColor:ht.colorPrimary,backgroundColor:ht.itemBg,a:{color:ht.colorPrimary}},"&-active":{borderColor:ht.colorPrimary}}}}},$t=ht=>{const{componentCls:at}=ht;return{[`${at}:not(${at}-disabled)`]:{[`${at}-item`]:Object.assign({},(0,qt.Qy)(ht)),[`${at}-jump-prev, ${at}-jump-next`]:{"&:focus-visible":Object.assign({[`${at}-item-link-icon`]:{opacity:1},[`${at}-item-ellipsis`]:{opacity:0}},(0,qt.oN)(ht))},[`${at}-prev, ${at}-next`]:{[`&:focus-visible ${at}-item-link`]:Object.assign({},(0,qt.oN)(ht))}}}};var Tt=(0,cn.Z)("Pagination",ht=>{const at=(0,Gn.TS)(ht,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:ht.marginXXS/2,paginationMiniQuickJumperInputWidth:ht.controlHeightLG*1.1,paginationItemPaddingInline:ht.marginXXS*1.5,paginationEllipsisLetterSpacing:ht.marginXXS/2,paginationSlashMarginInlineStart:ht.marginXXS,paginationSlashMarginInlineEnd:ht.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,_t.e5)(ht),(0,_t.TM)(ht));return[Kt(at),$t(at),ht.wireframe&&ln(at)]},ht=>({itemBg:ht.colorBgContainer,itemSize:ht.controlHeight,itemSizeSM:ht.controlHeightSM,itemActiveBg:ht.colorBgContainer,itemLinkBg:ht.colorBgContainer,itemActiveColorDisabled:ht.colorTextDisabled,itemActiveBgDisabled:ht.controlItemBgActiveDisabled,itemInputBg:ht.colorBgContainer,miniOptionsSizeChangerTop:0})),ft=function(ht,at){var Re={};for(var Pe in ht)Object.prototype.hasOwnProperty.call(ht,Pe)&&at.indexOf(Pe)<0&&(Re[Pe]=ht[Pe]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ye=0,Pe=Object.getOwnPropertySymbols(ht);ye<Pe.length;ye++)at.indexOf(Pe[ye])<0&&Object.prototype.propertyIsEnumerable.call(ht,Pe[ye])&&(Re[Pe[ye]]=ht[Pe[ye]]);return Re},Gt=ht=>{const{prefixCls:at,selectPrefixCls:Re,className:Pe,rootClassName:ye,style:Oe,size:Ke,locale:Fe,selectComponentClass:Et,responsive:sn,showSizeChanger:pn}=ht,en=ft(ht,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:wn}=(0,et.Z)(sn),{getPrefixCls:hi,direction:Rn,pagination:Sn={}}=Te.useContext(Wt.E_),Pi=hi("pagination",at),[zi,Zi]=Tt(Pi),ir=pn!=null?pn:Sn.showSizeChanger,Nr=Te.useMemo(()=>{const Be=Te.createElement("span",{className:`${Pi}-item-ellipsis`},"\u2022\u2022\u2022"),Fi=Te.createElement("button",{className:`${Pi}-item-link`,type:"button",tabIndex:-1},Rn==="rtl"?Te.createElement(ut.Z,null):Te.createElement(Ge.Z,null)),wr=Te.createElement("button",{className:`${Pi}-item-link`,type:"button",tabIndex:-1},Rn==="rtl"?Te.createElement(Ge.Z,null):Te.createElement(ut.Z,null)),Fn=Te.createElement("a",{className:`${Pi}-item-link`},Te.createElement("div",{className:`${Pi}-item-container`},Rn==="rtl"?Te.createElement(Pt.Z,{className:`${Pi}-item-link-icon`}):Te.createElement(bt,{className:`${Pi}-item-link-icon`}),Be)),wi=Te.createElement("a",{className:`${Pi}-item-link`},Te.createElement("div",{className:`${Pi}-item-container`},Rn==="rtl"?Te.createElement(bt,{className:`${Pi}-item-link-icon`}):Te.createElement(Pt.Z,{className:`${Pi}-item-link-icon`}),Be));return{prevIcon:Fi,nextIcon:wr,jumpPrevIcon:Fn,jumpNextIcon:wi}},[Rn,Pi]),[pi]=(0,Ue.Z)("Pagination",Dt.Z),li=Object.assign(Object.assign({},pi),Fe),xi=(0,Mt.Z)(Ke),Gi=xi==="small"||!!(wn&&!xi&&sn),Oi=hi("select",Re),to=yt()({[`${Pi}-mini`]:Gi,[`${Pi}-rtl`]:Rn==="rtl"},Sn==null?void 0:Sn.className,Pe,ye,Zi),eo=Object.assign(Object.assign({},Sn==null?void 0:Sn.style),Oe);return zi(Te.createElement(wt,Object.assign({},Nr,en,{style:eo,prefixCls:Pi,selectPrefixCls:Oi,className:to,selectComponentClass:Et||(Gi?Pn:xn),locale:li,showSizeChanger:ir})))},Ht=Gt},39722:function(_n,yn,me){"use strict";me.d(yn,{t5:function(){return Ge}});var le=me(92310),Te=me.n(le),He=me(55477),st=me(59301),We=me(36355),ct=me(77578),Me=me(17356),bt=function(mt,yt){var De={};for(var te in mt)Object.prototype.hasOwnProperty.call(mt,te)&&yt.indexOf(te)<0&&(De[te]=mt[te]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,te=Object.getOwnPropertySymbols(mt);ee<te.length;ee++)yt.indexOf(te[ee])<0&&Object.prototype.propertyIsEnumerable.call(mt,te[ee])&&(De[te[ee]]=mt[te[ee]]);return De};const Pt=(mt,yt,De)=>{if(!(!yt&&!De))return st.createElement(st.Fragment,null,yt&&st.createElement("div",{className:`${mt}-title`},(0,ct.Z)(yt)),st.createElement("div",{className:`${mt}-inner-content`},(0,ct.Z)(De)))},Ge=mt=>{const{hashId:yt,prefixCls:De,className:te,style:ee,placement:ce="top",title:se,content:he,children:ve}=mt;return st.createElement("div",{className:Te()(yt,De,`${De}-pure`,`${De}-placement-${ce}`,te),style:ee},st.createElement("div",{className:`${De}-arrow`}),st.createElement(He.G,Object.assign({},mt,{className:yt,prefixCls:De}),ve||Pt(De,se,he)))},ut=mt=>{const{prefixCls:yt}=mt,De=bt(mt,["prefixCls"]),{getPrefixCls:te}=st.useContext(We.E_),ee=te("popover",yt),[ce,se]=(0,Me.Z)(ee);return ce(st.createElement(Ge,Object.assign({},De,{prefixCls:ee,hashId:se})))};yn.ZP=ut},60324:function(_n,yn,me){"use strict";var le=me(92310),Te=me.n(le),He=me(59301),st=me(77578),We=me(62892),ct=me(36355),Me=me(6848),bt=me(39722),Pt=me(17356),Ge=function(yt,De){var te={};for(var ee in yt)Object.prototype.hasOwnProperty.call(yt,ee)&&De.indexOf(ee)<0&&(te[ee]=yt[ee]);if(yt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,ee=Object.getOwnPropertySymbols(yt);ce<ee.length;ce++)De.indexOf(ee[ce])<0&&Object.prototype.propertyIsEnumerable.call(yt,ee[ce])&&(te[ee[ce]]=yt[ee[ce]]);return te};const ut=yt=>{let{title:De,content:te,prefixCls:ee}=yt;return He.createElement(He.Fragment,null,De&&He.createElement("div",{className:`${ee}-title`},(0,st.Z)(De)),He.createElement("div",{className:`${ee}-inner-content`},(0,st.Z)(te)))},mt=He.forwardRef((yt,De)=>{const{prefixCls:te,title:ee,content:ce,overlayClassName:se,placement:he="top",trigger:ve="hover",mouseEnterDelay:Ee=.1,mouseLeaveDelay:Le=.1,overlayStyle:Ne={}}=yt,je=Ge(yt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:ze}=He.useContext(ct.E_),Ye=ze("popover",te),[Xe,lt]=(0,Pt.Z)(Ye),Ze=ze(),Lt=Te()(se,lt);return Xe(He.createElement(Me.Z,Object.assign({placement:he,trigger:ve,mouseEnterDelay:Ee,mouseLeaveDelay:Le,overlayStyle:Ne},je,{prefixCls:Ye,overlayClassName:Lt,ref:De,overlay:ee||ce?He.createElement(ut,{prefixCls:Ye,title:ee,content:ce}):null,transitionName:(0,We.m)(Ze,"zoom-big",je.transitionName),"data-popover-inject":!0})))});mt._InternalPanelDoNotUseOrYouWillBeFired=bt.ZP,yn.Z=mt},17356:function(_n,yn,me){"use strict";var le=me(17313),Te=me(29878),He=me(19447),st=me(33166),We=me(83116),ct=me(37613);const Me=Ge=>{const{componentCls:ut,popoverColor:mt,minWidth:yt,fontWeightStrong:De,popoverPadding:te,boxShadowSecondary:ee,colorTextHeading:ce,borderRadiusLG:se,zIndexPopup:he,marginXS:ve,colorBgElevated:Ee,popoverBg:Le}=Ge;return[{[ut]:Object.assign(Object.assign({},(0,le.Wf)(Ge)),{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"},[`${ut}-content`]:{position:"relative"},[`${ut}-inner`]:{backgroundColor:Le,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:te},[`${ut}-title`]:{minWidth:yt,marginBottom:ve,color:ce,fontWeight:De},[`${ut}-inner-content`]:{color:mt}})},(0,He.ZP)(Ge,{colorBg:"var(--antd-arrow-background-color)"}),{[`${ut}-pure`]:{position:"relative",maxWidth:"none",margin:Ge.sizePopupArrow,display:"inline-block",[`${ut}-content`]:{display:"inline-block"}}}]},bt=Ge=>{const{componentCls:ut}=Ge;return{[ut]:st.i.map(mt=>{const yt=Ge[`${mt}6`];return{[`&${ut}-${mt}`]:{"--antd-arrow-background-color":yt,[`${ut}-inner`]:{backgroundColor:yt},[`${ut}-arrow`]:{background:"transparent"}}}})}},Pt=Ge=>{const{componentCls:ut,lineWidth:mt,lineType:yt,colorSplit:De,paddingSM:te,controlHeight:ee,fontSize:ce,lineHeight:se,padding:he}=Ge,ve=ee-Math.round(ce*se),Ee=ve/2,Le=ve/2-mt,Ne=he;return{[ut]:{[`${ut}-inner`]:{padding:0},[`${ut}-title`]:{margin:0,padding:`${Ee}px ${Ne}px ${Le}px`,borderBottom:`${mt}px ${yt} ${De}`},[`${ut}-inner-content`]:{padding:`${te}px ${Ne}px`}}}};yn.Z=(0,We.Z)("Popover",Ge=>{const{colorBgElevated:ut,colorText:mt,wireframe:yt}=Ge,De=(0,ct.TS)(Ge,{popoverPadding:12,popoverBg:ut,popoverColor:mt});return[Me(De),bt(De),yt&&Pt(De),(0,Te._y)(De,"zoom-big")]},Ge=>({width:177,minWidth:177,zIndexPopup:Ge.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},13570:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Ue}});var le=me(72308),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"},st=He,We=me(7657),ct=function(Pn,xn){return Te.createElement(We.Z,(0,le.Z)({},Pn,{ref:xn,icon:st}))},Me=Te.forwardRef(ct),bt=Me,Pt=me(92310),Ge=me.n(Pt),ut=me(49618),mt=me(52487),yt=me(74416),De=me(18929),te=me(10228),ee=me(26112);function ce(Rt,Pn){var xn=Rt.disabled,_t=Rt.prefixCls,qt=Rt.character,cn=Rt.characterRender,Gn=Rt.index,gn=Rt.count,Zn=Rt.value,Ct=Rt.allowHalf,Wn=Rt.focused,di=Rt.onHover,Kt=Rt.onClick,ln=function(at){di(at,Gn)},$t=function(at){Kt(at,Gn)},Tt=function(at){at.keyCode===te.Z.ENTER&&Kt(at,Gn)},ft=Gn+1,$e=new Set([_t]);Zn===0&&Gn===0&&Wn?$e.add("".concat(_t,"-focused")):Ct&&Zn+.5>=ft&&Zn<ft?($e.add("".concat(_t,"-half")),$e.add("".concat(_t,"-active")),Wn&&$e.add("".concat(_t,"-focused"))):(ft<=Zn?$e.add("".concat(_t,"-full")):$e.add("".concat(_t,"-zero")),ft===Zn&&Wn&&$e.add("".concat(_t,"-focused")));var Gt=typeof qt=="function"?qt(Rt):qt,Ht=Te.createElement("li",{className:Ge()(Array.from($e)),ref:Pn},Te.createElement("div",{onClick:xn?null:$t,onKeyDown:xn?null:Tt,onMouseMove:xn?null:ln,role:"radio","aria-checked":Zn>Gn?"true":"false","aria-posinset":Gn+1,"aria-setsize":gn,tabIndex:xn?-1:0},Te.createElement("div",{className:"".concat(_t,"-first")},Gt),Te.createElement("div",{className:"".concat(_t,"-second")},Gt)));return cn&&(Ht=cn(Ht,Rt)),Ht}var se=Te.forwardRef(ce);function he(){var Rt=Te.useRef({});function Pn(_t){return Rt.current[_t]}function xn(_t){return function(qt){Rt.current[_t]=qt}}return[Pn,xn]}function ve(Rt){var Pn=Rt.pageXOffset,xn="scrollLeft";if(typeof Pn!="number"){var _t=Rt.document;Pn=_t.documentElement[xn],typeof Pn!="number"&&(Pn=_t.body[xn])}return Pn}function Ee(Rt){var Pn,xn,_t=Rt.ownerDocument,qt=_t.body,cn=_t&&_t.documentElement,Gn=Rt.getBoundingClientRect();return Pn=Gn.left,xn=Gn.top,Pn-=cn.clientLeft||qt.clientLeft||0,xn-=cn.clientTop||qt.clientTop||0,{left:Pn,top:xn}}function Le(Rt){var Pn=Ee(Rt),xn=Rt.ownerDocument,_t=xn.defaultView||xn.parentWindow;return Pn.left+=ve(_t),Pn.left}var Ne=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function je(Rt,Pn){var xn,_t=Rt.prefixCls,qt=_t===void 0?"rc-rate":_t,cn=Rt.className,Gn=Rt.defaultValue,gn=Rt.value,Zn=Rt.count,Ct=Zn===void 0?5:Zn,Wn=Rt.allowHalf,di=Wn===void 0?!1:Wn,Kt=Rt.allowClear,ln=Kt===void 0?!0:Kt,$t=Rt.character,Tt=$t===void 0?"\u2605":$t,ft=Rt.characterRender,$e=Rt.disabled,Gt=Rt.direction,Ht=Gt===void 0?"ltr":Gt,ht=Rt.tabIndex,at=ht===void 0?0:ht,Re=Rt.autoFocus,Pe=Rt.onHoverChange,ye=Rt.onChange,Oe=Rt.onFocus,Ke=Rt.onBlur,Fe=Rt.onKeyDown,Et=Rt.onMouseLeave,sn=(0,yt.Z)(Rt,Ne),pn=he(),en=(0,mt.Z)(pn,2),wn=en[0],hi=en[1],Rn=Te.useRef(null),Sn=function(){if(!$e){var dt;(dt=Rn.current)===null||dt===void 0||dt.focus()}};Te.useImperativeHandle(Pn,function(){return{focus:Sn,blur:function(){if(!$e){var dt;(dt=Rn.current)===null||dt===void 0||dt.blur()}}}});var Pi=(0,De.Z)(Gn||0,{value:gn}),zi=(0,mt.Z)(Pi,2),Zi=zi[0],ir=zi[1],Nr=(0,De.Z)(null),pi=(0,mt.Z)(Nr,2),li=pi[0],xi=pi[1],Gi=function(dt,nn){var vn=Ht==="rtl",zn=dt+1;if(di){var qn=wn(dt),Ft=Le(qn),Bn=qn.clientWidth;(vn&&nn-Ft>Bn/2||!vn&&nn-Ft<Bn/2)&&(zn-=.5)}return zn},Oi=function(dt){ir(dt),ye==null||ye(dt)},to=Te.useState(!1),eo=(0,mt.Z)(to,2),Be=eo[0],Fi=eo[1],wr=function(){Fi(!0),Oe==null||Oe()},Fn=function(){Fi(!1),Ke==null||Ke()},wi=Te.useState(null),$i=(0,mt.Z)(wi,2),tr=$i[0],ei=$i[1],$n=function(dt,nn){var vn=Gi(nn,dt.pageX);vn!==li&&(ei(vn),xi(null)),Pe==null||Pe(vn)},zt=function(dt){$e||(ei(null),xi(null),Pe==null||Pe(void 0)),dt&&(Et==null||Et(dt))},Vt=function(dt,nn){var vn=Gi(nn,dt.pageX),zn=!1;ln&&(zn=vn===Zi),zt(),Oi(zn?0:vn),xi(zn?vn:null)},Qe=function(dt){var nn=dt.keyCode,vn=Ht==="rtl",zn=Zi;nn===te.Z.RIGHT&&zn<Ct&&!vn?(di?zn+=.5:zn+=1,Oi(zn),dt.preventDefault()):nn===te.Z.LEFT&&zn>0&&!vn||nn===te.Z.RIGHT&&zn>0&&vn?(di?zn-=.5:zn-=1,Oi(zn),dt.preventDefault()):nn===te.Z.LEFT&&zn<Ct&&vn&&(di?zn+=.5:zn+=1,Oi(zn),dt.preventDefault()),Fe==null||Fe(dt)};Te.useEffect(function(){Re&&!$e&&Sn()},[]);var an=new Array(Ct).fill(0).map(function(Nt,dt){return Te.createElement(se,{ref:hi(dt),index:dt,count:Ct,disabled:$e,prefixCls:"".concat(qt,"-star"),allowHalf:di,value:tr===null?Zi:tr,onClick:Vt,onHover:$n,key:Nt||dt,character:Tt,characterRender:ft,focused:Be})}),dn=Ge()(qt,cn,(xn={},(0,ut.Z)(xn,"".concat(qt,"-disabled"),$e),(0,ut.Z)(xn,"".concat(qt,"-rtl"),Ht==="rtl"),xn));return Te.createElement("ul",(0,le.Z)({className:dn,onMouseLeave:zt,tabIndex:$e?-1:at,onFocus:$e?null:wr,onBlur:$e?null:Fn,onKeyDown:$e?null:Qe,ref:Rn,role:"radiogroup"},(0,ee.Z)(sn,{aria:!0,data:!0,attr:!0})),an)}var ze=Te.forwardRef(je),Ye=ze,Xe=me(36355),lt=me(6848),Ze=me(17313),Lt=me(83116),rt=me(37613);const Ot=Rt=>{const{componentCls:Pn}=Rt;return{[`${Pn}-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 ${Pn}-star-first, &-half ${Pn}-star-second`]:{opacity:1},[`&-half ${Pn}-star-first, &-full ${Pn}-star-second`]:{color:"inherit"}}}},wt=Rt=>({[`&-rtl${Rt.componentCls}`]:{direction:"rtl"}}),Dt=Rt=>{const{componentCls:Pn}=Rt;return{[Pn]: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${Pn} ${Pn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),Ot(Rt)),{[`+ ${Pn}-text`]:{display:"inline-block",marginInlineStart:Rt.marginXS,fontSize:Rt.fontSize}}),wt(Rt))}};var Wt=(0,Lt.Z)("Rate",Rt=>{const Pn=(0,rt.TS)(Rt,{});return[Dt(Pn)]},Rt=>({starColor:Rt.yellow6,starSize:Rt.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:Rt.colorFillContent})),Mt=function(Rt,Pn){var xn={};for(var _t in Rt)Object.prototype.hasOwnProperty.call(Rt,_t)&&Pn.indexOf(_t)<0&&(xn[_t]=Rt[_t]);if(Rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qt=0,_t=Object.getOwnPropertySymbols(Rt);qt<_t.length;qt++)Pn.indexOf(_t[qt])<0&&Object.prototype.propertyIsEnumerable.call(Rt,_t[qt])&&(xn[_t[qt]]=Rt[_t[qt]]);return xn},Ue=Te.forwardRef((Rt,Pn)=>{const{prefixCls:xn,className:_t,rootClassName:qt,style:cn,tooltips:Gn,character:gn=Te.createElement(bt,null)}=Rt,Zn=Mt(Rt,["prefixCls","className","rootClassName","style","tooltips","character"]),Ct=($e,Gt)=>{let{index:Ht}=Gt;return Gn?Te.createElement(lt.Z,{title:Gn[Ht]},$e):$e},{getPrefixCls:Wn,direction:di,rate:Kt}=Te.useContext(Xe.E_),ln=Wn("rate",xn),[$t,Tt]=Wt(ln),ft=Object.assign(Object.assign({},Kt==null?void 0:Kt.style),cn);return $t(Te.createElement(Ye,Object.assign({ref:Pn,character:gn,characterRender:Ct},Zn,{className:Ge()(_t,qt,Tt,Kt==null?void 0:Kt.className),style:ft,prefixCls:ln,direction:di})))})},57809:function(_n,yn,me){"use strict";var le=me(92310),Te=me.n(le),He=me(77861),st=me(2738),We=me(59301),ct=me(53487),Me=me(62892),bt=me(19080),Pt=me(36355),Ge=me(1684),ut=me(93891),mt=me(19716),yt=me(32441),De=me(33234),te=me(14154),ee=me(58582),ce=me(84443),se=me(66339),he=function(je,ze){var Ye={};for(var Xe in je)Object.prototype.hasOwnProperty.call(je,Xe)&&ze.indexOf(Xe)<0&&(Ye[Xe]=je[Xe]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var lt=0,Xe=Object.getOwnPropertySymbols(je);lt<Xe.length;lt++)ze.indexOf(Xe[lt])<0&&Object.prototype.propertyIsEnumerable.call(je,Xe[lt])&&(Ye[Xe[lt]]=je[Xe[lt]]);return Ye};const ve="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ee=(je,ze)=>{var Ye,{prefixCls:Xe,bordered:lt=!0,className:Ze,rootClassName:Lt,getPopupContainer:rt,popupClassName:Ot,dropdownClassName:wt,listHeight:Dt=256,placement:Wt,listItemHeight:Mt=24,size:et,disabled:Ue,notFoundContent:Rt,status:Pn,builtinPlacements:xn,dropdownMatchSelectWidth:_t,popupMatchSelectWidth:qt,direction:cn,style:Gn,allowClear:gn}=je,Zn=he(je,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Ct,getPrefixCls:Wn,renderEmpty:di,direction:Kt,virtual:ln,popupMatchSelectWidth:$t,popupOverflow:Tt,select:ft}=We.useContext(Pt.E_),$e=Wn("select",Xe),Gt=Wn(),Ht=cn!=null?cn:Kt,{compactSize:ht,compactItemClassnames:at}=(0,De.ri)($e,Ht),[Re,Pe]=(0,te.Z)($e),ye=We.useMemo(()=>{const{mode:eo}=Zn;if(eo!=="combobox")return eo===ve?"combobox":eo},[Zn.mode]),Oe=ye==="multiple"||ye==="tags",Ke=(0,ce.Z)(Zn.suffixIcon,Zn.showArrow),Fe=(Ye=qt!=null?qt:_t)!==null&&Ye!==void 0?Ye:$t,{status:Et,hasFeedback:sn,isFormItemInput:pn,feedbackIcon:en}=We.useContext(yt.aM),wn=(0,bt.F)(Et,Pn);let hi;Rt!==void 0?hi=Rt:ye==="combobox"?hi=null:hi=(di==null?void 0:di("Select"))||We.createElement(ut.Z,{componentName:"Select"});const{suffixIcon:Rn,itemIcon:Sn,removeIcon:Pi,clearIcon:zi}=(0,se.Z)(Object.assign(Object.assign({},Zn),{multiple:Oe,hasFeedback:sn,feedbackIcon:en,showSuffixIcon:Ke,prefixCls:$e,showArrow:Zn.showArrow,componentName:"Select"})),Zi=gn===!0?{clearIcon:zi}:gn,ir=(0,st.Z)(Zn,["suffixIcon","itemIcon"]),Nr=Te()(Ot||wt,{[`${$e}-dropdown-${Ht}`]:Ht==="rtl"},Lt,Pe),pi=(0,mt.Z)(eo=>{var Be;return(Be=et!=null?et:ht)!==null&&Be!==void 0?Be:eo}),li=We.useContext(Ge.Z),xi=Ue!=null?Ue:li,Gi=Te()({[`${$e}-lg`]:pi==="large",[`${$e}-sm`]:pi==="small",[`${$e}-rtl`]:Ht==="rtl",[`${$e}-borderless`]:!lt,[`${$e}-in-form-item`]:pn},(0,bt.Z)($e,wn,sn),at,ft==null?void 0:ft.className,Ze,Lt,Pe),Oi=We.useMemo(()=>Wt!==void 0?Wt:Ht==="rtl"?"bottomRight":"bottomLeft",[Wt,Ht]),to=(0,ee.Z)(xn,Tt);return Re(We.createElement(He.ZP,Object.assign({ref:ze,virtual:ln,showSearch:ft==null?void 0:ft.showSearch},ir,{style:Object.assign(Object.assign({},ft==null?void 0:ft.style),Gn),dropdownMatchSelectWidth:Fe,builtinPlacements:to,transitionName:(0,Me.m)(Gt,"slide-up",Zn.transitionName),listHeight:Dt,listItemHeight:Mt,mode:ye,prefixCls:$e,placement:Oi,direction:Ht,suffixIcon:Rn,menuItemSelectedIcon:Sn,removeIcon:Pi,allowClear:Zi,notFoundContent:hi,className:Gi,getPopupContainer:rt||Ct,dropdownClassName:Nr,disabled:xi})))},Le=We.forwardRef(Ee),Ne=(0,ct.Z)(Le);Le.SECRET_COMBOBOX_MODE_DO_NOT_USE=ve,Le.Option=He.Wx,Le.OptGroup=He.Xo,Le._InternalPanelDoNotUseOrYouWillBeFired=Ne,yn.default=Le},14154:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Le}});var le=me(17313),Te=me(74207),He=me(37613),st=me(83116),We=me(13826),ct=me(92899);const Me=Ne=>{const{optionHeight:je,optionFontSize:ze,optionLineHeight:Ye,optionPadding:Xe}=Ne;return{position:"relative",display:"block",minHeight:je,padding:Xe,color:Ne.colorText,fontWeight:"normal",fontSize:ze,lineHeight:Ye,boxSizing:"border-box"}};var Pt=Ne=>{const{antCls:je,componentCls:ze}=Ne,Ye=`${ze}-item`,Xe=`&${je}-slide-up-enter${je}-slide-up-enter-active`,lt=`&${je}-slide-up-appear${je}-slide-up-appear-active`,Ze=`&${je}-slide-up-leave${je}-slide-up-leave-active`,Lt=`${ze}-dropdown-placement-`;return[{[`${ze}-dropdown`]:Object.assign(Object.assign({},(0,le.Wf)(Ne)),{position:"absolute",top:-9999,zIndex:Ne.zIndexPopup,boxSizing:"border-box",padding:Ne.paddingXXS,overflow:"hidden",fontSize:Ne.fontSize,fontVariant:"initial",backgroundColor:Ne.colorBgElevated,borderRadius:Ne.borderRadiusLG,outline:"none",boxShadow:Ne.boxShadowSecondary,[`
${Xe}${Lt}bottomLeft,
${lt}${Lt}bottomLeft
`]:{animationName:We.fJ},[`
${Xe}${Lt}topLeft,
${lt}${Lt}topLeft,
${Xe}${Lt}topRight,
${lt}${Lt}topRight
`]:{animationName:We.Qt},[`${Ze}${Lt}bottomLeft`]:{animationName:We.Uw},[`
${Ze}${Lt}topLeft,
${Ze}${Lt}topRight
`]:{animationName:We.ly},"&-hidden":{display:"none"},[`${Ye}`]:Object.assign(Object.assign({},Me(Ne)),{cursor:"pointer",transition:`background ${Ne.motionDurationSlow} ease`,borderRadius:Ne.borderRadiusSM,"&-group":{color:Ne.colorTextDescription,fontSize:Ne.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},le.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Ye}-option-disabled)`]:{backgroundColor:Ne.optionActiveBg},[`&-selected:not(${Ye}-option-disabled)`]:{color:Ne.optionSelectedColor,fontWeight:Ne.optionSelectedFontWeight,backgroundColor:Ne.optionSelectedBg,[`${Ye}-option-state`]:{color:Ne.colorPrimary}},"&-disabled":{[`&${Ye}-option-selected`]:{backgroundColor:Ne.colorBgContainerDisabled},color:Ne.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Ne.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,We.oN)(Ne,"slide-up"),(0,We.oN)(Ne,"slide-down"),(0,ct.Fm)(Ne,"move-up"),(0,ct.Fm)(Ne,"move-down")]};const Ge=2,ut=Ne=>{let{controlHeightSM:je,controlHeight:ze,lineWidth:Ye}=Ne;const Xe=(ze-je)/2-Ye,lt=Math.ceil(Xe/2);return[Xe,lt]};function mt(Ne,je){const{componentCls:ze,iconCls:Ye}=Ne,Xe=`${ze}-selection-overflow`,lt=Ne.multipleSelectItemHeight,[Ze]=ut(Ne),Lt=je?`${ze}-${je}`:"";return{[`${ze}-multiple${Lt}`]:{fontSize:Ne.fontSize,[Xe]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${ze}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ze-Ge}px ${Ge*2}px`,borderRadius:Ne.borderRadius,[`${ze}-show-search&`]:{cursor:"text"},[`${ze}-disabled&`]:{background:Ne.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${Ge}px 0`,lineHeight:`${lt}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${ze}-show-arrow ${ze}-selector,
&${ze}-allow-clear ${ze}-selector
`]:{paddingInlineEnd:Ne.fontSizeIcon+Ne.controlPaddingHorizontal},[`${ze}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:lt,marginTop:Ge,marginBottom:Ge,lineHeight:`${lt-Ne.lineWidth*2}px`,background:Ne.multipleItemBg,border:`${Ne.lineWidth}px ${Ne.lineType} ${Ne.multipleItemBorderColor}`,borderRadius:Ne.borderRadiusSM,cursor:"default",transition:`font-size ${Ne.motionDurationSlow}, line-height ${Ne.motionDurationSlow}, height ${Ne.motionDurationSlow}`,userSelect:"none",marginInlineEnd:Ge*2,paddingInlineStart:Ne.paddingXS,paddingInlineEnd:Ne.paddingXS/2,[`${ze}-disabled&`]:{color:Ne.multipleItemColorDisabled,borderColor:Ne.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Ne.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,le.Ro)()),{display:"inline-flex",alignItems:"center",color:Ne.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Ye}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Ne.colorIconHover}})},[`${Xe}-item + ${Xe}-item`]:{[`${ze}-selection-search`]:{marginInlineStart:0}},[`${ze}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Ne.inputPaddingHorizontalBase-Ze,"\n &-input,\n &-mirror\n ":{height:lt,fontFamily:Ne.fontFamily,lineHeight:`${lt}px`,transition:`all ${Ne.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${ze}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Ne.inputPaddingHorizontalBase,insetInlineEnd:Ne.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Ne.motionDurationSlow}`}}}}var De=Ne=>{const{componentCls:je}=Ne,ze=(0,He.TS)(Ne,{controlHeight:Ne.controlHeightSM,multipleSelectItemHeight:Ne.controlHeightXS,borderRadius:Ne.borderRadiusSM,borderRadiusSM:Ne.borderRadiusXS}),Ye=(0,He.TS)(Ne,{fontSize:Ne.fontSizeLG,controlHeight:Ne.controlHeightLG,multipleSelectItemHeight:Ne.multipleItemHeightLG,borderRadius:Ne.borderRadiusLG,borderRadiusSM:Ne.borderRadius}),[,Xe]=ut(Ne);return[mt(Ne),mt(ze,"sm"),{[`${je}-multiple${je}-sm`]:{[`${je}-selection-placeholder`]:{insetInline:Ne.controlPaddingHorizontalSM-Ne.lineWidth},[`${je}-selection-search`]:{marginInlineStart:Xe}}},mt(Ye,"lg")]};function te(Ne,je){const{componentCls:ze,inputPaddingHorizontalBase:Ye,borderRadius:Xe}=Ne,lt=Ne.controlHeight-Ne.lineWidth*2,Ze=Math.ceil(Ne.fontSize*1.25),Lt=je?`${ze}-${je}`:"";return{[`${ze}-single${Lt}`]:{fontSize:Ne.fontSize,[`${ze}-selector`]:Object.assign(Object.assign({},(0,le.Wf)(Ne)),{display:"flex",borderRadius:Xe,[`${ze}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Ye,insetInlineEnd:Ye,bottom:0,"&-input":{width:"100%"}},[`
${ze}-selection-item,
${ze}-selection-placeholder
`]:{padding:0,lineHeight:`${lt}px`,transition:`all ${Ne.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${lt}px`}},[`${ze}-selection-item`]:{position:"relative",userSelect:"none"},[`${ze}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${ze}-selection-item:after`,`${ze}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${ze}-show-arrow ${ze}-selection-item,
&${ze}-show-arrow ${ze}-selection-placeholder
`]:{paddingInlineEnd:Ze},[`&${ze}-open ${ze}-selection-item`]:{color:Ne.colorTextPlaceholder},[`&:not(${ze}-customize-input)`]:{[`${ze}-selector`]:{width:"100%",height:Ne.controlHeight,padding:`0 ${Ye}px`,[`${ze}-selection-search-input`]:{height:lt},"&:after":{lineHeight:`${lt}px`}}},[`&${ze}-customize-input`]:{[`${ze}-selector`]:{"&:after":{display:"none"},[`${ze}-selection-search`]:{position:"static",width:"100%"},[`${ze}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Ye}px`,"&:after":{display:"none"}}}}}}}function ee(Ne){const{componentCls:je}=Ne,ze=Ne.controlPaddingHorizontalSM-Ne.lineWidth;return[te(Ne),te((0,He.TS)(Ne,{controlHeight:Ne.controlHeightSM,borderRadius:Ne.borderRadiusSM}),"sm"),{[`${je}-single${je}-sm`]:{[`&:not(${je}-customize-input)`]:{[`${je}-selection-search`]:{insetInlineStart:ze,insetInlineEnd:ze},[`${je}-selector`]:{padding:`0 ${ze}px`},[`&${je}-show-arrow ${je}-selection-search`]:{insetInlineEnd:ze+Ne.fontSize*1.5},[`
&${je}-show-arrow ${je}-selection-item,
&${je}-show-arrow ${je}-selection-placeholder
`]:{paddingInlineEnd:Ne.fontSize*1.5}}}},te((0,He.TS)(Ne,{controlHeight:Ne.singleItemHeightLG,fontSize:Ne.fontSizeLG,borderRadius:Ne.borderRadiusLG}),"lg")]}const ce=Ne=>{const{componentCls:je,selectorBg:ze}=Ne;return{position:"relative",backgroundColor:ze,border:`${Ne.lineWidth}px ${Ne.lineType} ${Ne.colorBorder}`,transition:`all ${Ne.motionDurationMid} ${Ne.motionEaseInOut}`,input:{cursor:"pointer"},[`${je}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${je}-disabled&`]:{color:Ne.colorTextDisabled,background:Ne.colorBgContainerDisabled,cursor:"not-allowed",[`${je}-multiple&`]:{background:Ne.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Ne,je){let ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Ye,borderHoverColor:Xe,outlineColor:lt,antCls:Ze}=je,Lt=ze?{[`${Ye}-selector`]:{borderColor:Xe}}:{};return{[Ne]:{[`&:not(${Ye}-disabled):not(${Ye}-customize-input):not(${Ze}-pagination-size-changer)`]:Object.assign(Object.assign({},Lt),{[`${Ye}-focused& ${Ye}-selector`]:{borderColor:Xe,boxShadow:`0 0 0 ${je.controlOutlineWidth}px ${lt}`,outline:0},[`&:hover ${Ye}-selector`]:{borderColor:Xe}})}}},he=Ne=>{const{componentCls:je}=Ne;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=Ne=>{const{componentCls:je,inputPaddingHorizontalBase:ze,iconCls:Ye}=Ne;return{[je]:Object.assign(Object.assign({},(0,le.Wf)(Ne)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${je}-customize-input) ${je}-selector`]:Object.assign(Object.assign({},ce(Ne)),he(Ne)),[`${je}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},le.vS),[`${je}-selection-placeholder`]:Object.assign(Object.assign({},le.vS),{flex:1,color:Ne.colorTextPlaceholder,pointerEvents:"none"}),[`${je}-arrow`]:Object.assign(Object.assign({},(0,le.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:ze,height:Ne.fontSizeIcon,marginTop:-Ne.fontSizeIcon/2,color:Ne.colorTextQuaternary,fontSize:Ne.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Ye]:{verticalAlign:"top",transition:`transform ${Ne.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:ze,zIndex:1,display:"inline-block",width:Ne.fontSizeIcon,height:Ne.fontSizeIcon,marginTop:-Ne.fontSizeIcon/2,color:Ne.colorTextQuaternary,fontSize:Ne.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Ne.clearBg,cursor:"pointer",opacity:0,transition:`color ${Ne.motionDurationMid} ease, opacity ${Ne.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Ne.colorTextTertiary}},"&:hover":{[`${je}-clear`]:{opacity:1}}}),[`${je}-has-feedback`]:{[`${je}-clear`]:{insetInlineEnd:ze+Ne.fontSize+Ne.paddingXS}}}},Ee=Ne=>{const{componentCls:je}=Ne;return[{[je]:{[`&-borderless ${je}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${je}-in-form-item`]:{width:"100%"}}},ve(Ne),ee(Ne),De(Ne),Pt(Ne),{[`${je}-rtl`]:{direction:"rtl"}},se(je,(0,He.TS)(Ne,{borderHoverColor:Ne.colorPrimaryHover,outlineColor:Ne.controlOutline})),se(`${je}-status-error`,(0,He.TS)(Ne,{borderHoverColor:Ne.colorErrorHover,outlineColor:Ne.colorErrorOutline}),!0),se(`${je}-status-warning`,(0,He.TS)(Ne,{borderHoverColor:Ne.colorWarningHover,outlineColor:Ne.colorWarningOutline}),!0),(0,Te.c)(Ne,{borderElCls:`${je}-selector`,focusElCls:`${je}-focused`})]};var Le=(0,st.Z)("Select",(Ne,je)=>{let{rootPrefixCls:ze}=je;const Ye=(0,He.TS)(Ne,{rootPrefixCls:ze,inputPaddingHorizontalBase:Ne.paddingSM-1,multipleSelectItemHeight:Ne.multipleItemHeight});return[Ee(Ye)]},Ne=>{const{fontSize:je,lineHeight:ze,controlHeight:Ye,controlPaddingHorizontal:Xe,zIndexPopupBase:lt,colorText:Ze,fontWeightStrong:Lt,controlItemBgActive:rt,controlItemBgHover:Ot,colorBgContainer:wt,colorFillSecondary:Dt,controlHeightLG:Wt,controlHeightSM:Mt,colorBgContainerDisabled:et,colorTextDisabled:Ue}=Ne;return{zIndexPopup:lt+50,optionSelectedColor:Ze,optionSelectedFontWeight:Lt,optionSelectedBg:rt,optionActiveBg:Ot,optionPadding:`${(Ye-je*ze)/2}px ${Xe}px`,optionFontSize:je,optionLineHeight:ze,optionHeight:Ye,selectorBg:wt,clearBg:wt,singleItemHeightLG:Wt,multipleItemBg:Dt,multipleItemBorderColor:"transparent",multipleItemHeight:Mt,multipleItemHeightLG:Ye,multipleSelectorBgDisabled:et,multipleItemColorDisabled:Ue,multipleItemBorderColorDisabled:"transparent"}})},58582:function(_n,yn,me){"use strict";me.d(yn,{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,st){return He||le(st)}},84443:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return le}});function le(Te,He){return He!==void 0?He:Te!==null}},66339:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});var le=me(40001),Te=me(19248),He=me(99267),st=me(84105),We=me(58617),ct=me(47472),Me=me(59301);function bt(Pt){let{suffixIcon:Ge,clearIcon:ut,menuItemSelectedIcon:mt,removeIcon:yt,loading:De,multiple:te,hasFeedback:ee,prefixCls:ce,showSuffixIcon:se,feedbackIcon:he,showArrow:ve,componentName:Ee}=Pt;const Le=ut!=null?ut:Me.createElement(Te.Z,null),Ne=Xe=>Ge===null&&!ee&&!ve?null:Me.createElement(Me.Fragment,null,se!==!1&&Xe,ee&&he);let je=null;if(Ge!==void 0)je=Ne(Ge);else if(De)je=Ne(Me.createElement(We.Z,{spin:!0}));else{const Xe=`${ce}-suffix`;je=lt=>{let{open:Ze,showSearch:Lt}=lt;return Ne(Ze&&Lt?Me.createElement(ct.Z,{className:Xe}):Me.createElement(st.Z,{className:Xe}))}}let ze=null;mt!==void 0?ze=mt:te?ze=Me.createElement(le.Z,null):ze=null;let Ye=null;return yt!==void 0?Ye=yt:Ye=Me.createElement(He.Z,null),{clearIcon:Le,suffixIcon:je,itemIcon:ze,removeIcon:Ye}}},61621:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Tt}});var le=me(92310),Te=me.n(le),He=me(59301),st=me(36355),We=me(2738),Me=ft=>{const{prefixCls:$e,className:Gt,style:Ht,size:ht,shape:at}=ft,Re=Te()({[`${$e}-lg`]:ht==="large",[`${$e}-sm`]:ht==="small"}),Pe=Te()({[`${$e}-circle`]:at==="circle",[`${$e}-square`]:at==="square",[`${$e}-round`]:at==="round"}),ye=He.useMemo(()=>typeof ht=="number"?{width:ht,height:ht,lineHeight:`${ht}px`}:{},[ht]);return He.createElement("span",{className:Te()($e,Re,Pe,Gt),style:Object.assign(Object.assign({},ye),Ht)})},bt=me(93083),Pt=me(83116),Ge=me(37613);const ut=new bt.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),mt=ft=>({height:ft,lineHeight:`${ft}px`}),yt=ft=>Object.assign({width:ft},mt(ft)),De=ft=>({background:ft.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:ut,animationDuration:ft.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),te=ft=>Object.assign({width:ft*5,minWidth:ft*5},mt(ft)),ee=ft=>{const{skeletonAvatarCls:$e,gradientFromColor:Gt,controlHeight:Ht,controlHeightLG:ht,controlHeightSM:at}=ft;return{[`${$e}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Gt},yt(Ht)),[`${$e}${$e}-circle`]:{borderRadius:"50%"},[`${$e}${$e}-lg`]:Object.assign({},yt(ht)),[`${$e}${$e}-sm`]:Object.assign({},yt(at))}},ce=ft=>{const{controlHeight:$e,borderRadiusSM:Gt,skeletonInputCls:Ht,controlHeightLG:ht,controlHeightSM:at,gradientFromColor:Re}=ft;return{[`${Ht}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Re,borderRadius:Gt},te($e)),[`${Ht}-lg`]:Object.assign({},te(ht)),[`${Ht}-sm`]:Object.assign({},te(at))}},se=ft=>Object.assign({width:ft},mt(ft)),he=ft=>{const{skeletonImageCls:$e,imageSizeBase:Gt,gradientFromColor:Ht,borderRadiusSM:ht}=ft;return{[`${$e}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Ht,borderRadius:ht},se(Gt*2)),{[`${$e}-path`]:{fill:"#bfbfbf"},[`${$e}-svg`]:Object.assign(Object.assign({},se(Gt)),{maxWidth:Gt*4,maxHeight:Gt*4}),[`${$e}-svg${$e}-svg-circle`]:{borderRadius:"50%"}}),[`${$e}${$e}-circle`]:{borderRadius:"50%"}}},ve=(ft,$e,Gt)=>{const{skeletonButtonCls:Ht}=ft;return{[`${Gt}${Ht}-circle`]:{width:$e,minWidth:$e,borderRadius:"50%"},[`${Gt}${Ht}-round`]:{borderRadius:$e}}},Ee=ft=>Object.assign({width:ft*2,minWidth:ft*2},mt(ft)),Le=ft=>{const{borderRadiusSM:$e,skeletonButtonCls:Gt,controlHeight:Ht,controlHeightLG:ht,controlHeightSM:at,gradientFromColor:Re}=ft;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Gt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Re,borderRadius:$e,width:Ht*2,minWidth:Ht*2},Ee(Ht))},ve(ft,Ht,Gt)),{[`${Gt}-lg`]:Object.assign({},Ee(ht))}),ve(ft,ht,`${Gt}-lg`)),{[`${Gt}-sm`]:Object.assign({},Ee(at))}),ve(ft,at,`${Gt}-sm`))},Ne=ft=>{const{componentCls:$e,skeletonAvatarCls:Gt,skeletonTitleCls:Ht,skeletonParagraphCls:ht,skeletonButtonCls:at,skeletonInputCls:Re,skeletonImageCls:Pe,controlHeight:ye,controlHeightLG:Oe,controlHeightSM:Ke,gradientFromColor:Fe,padding:Et,marginSM:sn,borderRadius:pn,titleHeight:en,blockRadius:wn,paragraphLiHeight:hi,controlHeightXS:Rn,paragraphMarginTop:Sn}=ft;return{[`${$e}`]:{display:"table",width:"100%",[`${$e}-header`]:{display:"table-cell",paddingInlineEnd:Et,verticalAlign:"top",[`${Gt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Fe},yt(ye)),[`${Gt}-circle`]:{borderRadius:"50%"},[`${Gt}-lg`]:Object.assign({},yt(Oe)),[`${Gt}-sm`]:Object.assign({},yt(Ke))},[`${$e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Ht}`]:{width:"100%",height:en,background:Fe,borderRadius:wn,[`+ ${ht}`]:{marginBlockStart:Ke}},[`${ht}`]:{padding:0,"> li":{width:"100%",height:hi,listStyle:"none",background:Fe,borderRadius:wn,"+ li":{marginBlockStart:Rn}}},[`${ht}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${$e}-content`]:{[`${Ht}, ${ht} > li`]:{borderRadius:pn}}},[`${$e}-with-avatar ${$e}-content`]:{[`${Ht}`]:{marginBlockStart:sn,[`+ ${ht}`]:{marginBlockStart:Sn}}},[`${$e}${$e}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Le(ft)),ee(ft)),ce(ft)),he(ft)),[`${$e}${$e}-block`]:{width:"100%",[`${at}`]:{width:"100%"},[`${Re}`]:{width:"100%"}},[`${$e}${$e}-active`]:{[`
${Ht},
${ht} > li,
${Gt},
${at},
${Re},
${Pe}
`]:Object.assign({},De(ft))}}};var je=(0,Pt.Z)("Skeleton",ft=>{const{componentCls:$e}=ft,Gt=(0,Ge.TS)(ft,{skeletonAvatarCls:`${$e}-avatar`,skeletonTitleCls:`${$e}-title`,skeletonParagraphCls:`${$e}-paragraph`,skeletonButtonCls:`${$e}-button`,skeletonInputCls:`${$e}-input`,skeletonImageCls:`${$e}-image`,imageSizeBase:ft.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${ft.gradientFromColor} 25%, ${ft.gradientToColor} 37%, ${ft.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Ne(Gt)]},ft=>{const{colorFillContent:$e,colorFill:Gt}=ft,Ht=$e,ht=Gt;return{color:Ht,colorGradientEnd:ht,gradientFromColor:Ht,gradientToColor:ht,titleHeight:ft.controlHeight/2,blockRadius:ft.borderRadiusSM,paragraphMarginTop:ft.marginLG+ft.marginXXS,paragraphLiHeight:ft.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Ye=ft=>{const{prefixCls:$e,className:Gt,rootClassName:Ht,active:ht,shape:at="circle",size:Re="default"}=ft,{getPrefixCls:Pe}=He.useContext(st.E_),ye=Pe("skeleton",$e),[Oe,Ke]=je(ye),Fe=(0,We.Z)(ft,["prefixCls","className"]),Et=Te()(ye,`${ye}-element`,{[`${ye}-active`]:ht},Gt,Ht,Ke);return Oe(He.createElement("div",{className:Et},He.createElement(Me,Object.assign({prefixCls:`${ye}-avatar`,shape:at,size:Re},Fe))))},lt=ft=>{const{prefixCls:$e,className:Gt,rootClassName:Ht,active:ht,block:at=!1,size:Re="default"}=ft,{getPrefixCls:Pe}=He.useContext(st.E_),ye=Pe("skeleton",$e),[Oe,Ke]=je(ye),Fe=(0,We.Z)(ft,["prefixCls"]),Et=Te()(ye,`${ye}-element`,{[`${ye}-active`]:ht,[`${ye}-block`]:at},Gt,Ht,Ke);return Oe(He.createElement("div",{className:Et},He.createElement(Me,Object.assign({prefixCls:`${ye}-button`,size:Re},Fe))))};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 rt=ft=>{const{prefixCls:$e,className:Gt,rootClassName:Ht,style:ht,active:at}=ft,{getPrefixCls:Re}=He.useContext(st.E_),Pe=Re("skeleton",$e),[ye,Oe]=je(Pe),Ke=Te()(Pe,`${Pe}-element`,{[`${Pe}-active`]:at},Gt,Ht,Oe);return ye(He.createElement("div",{className:Ke},He.createElement("div",{className:Te()(`${Pe}-image`,Gt),style:ht},He.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Pe}-image-svg`},He.createElement("path",{d:Ze,className:`${Pe}-image-path`})))))},wt=ft=>{const{prefixCls:$e,className:Gt,rootClassName:Ht,active:ht,block:at,size:Re="default"}=ft,{getPrefixCls:Pe}=He.useContext(st.E_),ye=Pe("skeleton",$e),[Oe,Ke]=je(ye),Fe=(0,We.Z)(ft,["prefixCls"]),Et=Te()(ye,`${ye}-element`,{[`${ye}-active`]:ht,[`${ye}-block`]:at},Gt,Ht,Ke);return Oe(He.createElement("div",{className:Et},He.createElement(Me,Object.assign({prefixCls:`${ye}-input`,size:Re},Fe))))},Dt=me(72308),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"},Mt=Wt,et=me(7657),Ue=function($e,Gt){return He.createElement(et.Z,(0,Dt.Z)({},$e,{ref:Gt,icon:Mt}))},Rt=He.forwardRef(Ue),Pn=Rt,_t=ft=>{const{prefixCls:$e,className:Gt,rootClassName:Ht,style:ht,active:at,children:Re}=ft,{getPrefixCls:Pe}=He.useContext(st.E_),ye=Pe("skeleton",$e),[Oe,Ke]=je(ye),Fe=Te()(ye,`${ye}-element`,{[`${ye}-active`]:at},Ke,Gt,Ht),Et=Re!=null?Re:He.createElement(Pn,null);return Oe(He.createElement("div",{className:Fe},He.createElement("div",{className:Te()(`${ye}-image`,Gt),style:ht},Et)))},qt=me(80702),Gn=ft=>{const $e=Pe=>{const{width:ye,rows:Oe=2}=ft;if(Array.isArray(ye))return ye[Pe];if(Oe-1===Pe)return ye},{prefixCls:Gt,className:Ht,style:ht,rows:at}=ft,Re=(0,qt.Z)(Array(at)).map((Pe,ye)=>He.createElement("li",{key:ye,style:{width:$e(ye)}}));return He.createElement("ul",{className:Te()(Gt,Ht),style:ht},Re)},Zn=ft=>{let{prefixCls:$e,className:Gt,width:Ht,style:ht}=ft;return He.createElement("h3",{className:Te()($e,Gt),style:Object.assign({width:Ht},ht)})};function Ct(ft){return ft&&typeof ft=="object"?ft:{}}function Wn(ft,$e){return ft&&!$e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function di(ft,$e){return!ft&&$e?{width:"38%"}:ft&&$e?{width:"50%"}:{}}function Kt(ft,$e){const Gt={};return(!ft||!$e)&&(Gt.width="61%"),!ft&&$e?Gt.rows=3:Gt.rows=2,Gt}const ln=ft=>{const{prefixCls:$e,loading:Gt,className:Ht,rootClassName:ht,style:at,children:Re,avatar:Pe=!1,title:ye=!0,paragraph:Oe=!0,active:Ke,round:Fe}=ft,{getPrefixCls:Et,direction:sn,skeleton:pn}=He.useContext(st.E_),en=Et("skeleton",$e),[wn,hi]=je(en);if(Gt||!("loading"in ft)){const Rn=!!Pe,Sn=!!ye,Pi=!!Oe;let zi;if(Rn){const Nr=Object.assign(Object.assign({prefixCls:`${en}-avatar`},Wn(Sn,Pi)),Ct(Pe));zi=He.createElement("div",{className:`${en}-header`},He.createElement(Me,Object.assign({},Nr)))}let Zi;if(Sn||Pi){let Nr;if(Sn){const li=Object.assign(Object.assign({prefixCls:`${en}-title`},di(Rn,Pi)),Ct(ye));Nr=He.createElement(Zn,Object.assign({},li))}let pi;if(Pi){const li=Object.assign(Object.assign({prefixCls:`${en}-paragraph`},Kt(Rn,Sn)),Ct(Oe));pi=He.createElement(Gn,Object.assign({},li))}Zi=He.createElement("div",{className:`${en}-content`},Nr,pi)}const ir=Te()(en,{[`${en}-with-avatar`]:Rn,[`${en}-active`]:Ke,[`${en}-rtl`]:sn==="rtl",[`${en}-round`]:Fe},pn==null?void 0:pn.className,Ht,ht,hi);return wn(He.createElement("div",{className:ir,style:Object.assign(Object.assign({},pn==null?void 0:pn.style),at)},zi,Zi))}return typeof Re!="undefined"?Re:null};ln.Button=lt,ln.Avatar=Ye,ln.Input=wt,ln.Image=rt,ln.Node=_t;var $t=ln,Tt=$t},81327:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return ce}});var le=me(59301),Te=me(92310),He=me.n(Te),st=me(11592),We=me(36355),ct=me(33234);const Me=le.createContext({latestIndex:0}),bt=Me.Provider;var Ge=se=>{let{className:he,index:ve,children:Ee,split:Le,style:Ne}=se;const{latestIndex:je}=le.useContext(Me);return Ee==null?null:le.createElement(le.Fragment,null,le.createElement("div",{className:he,style:Ne},Ee),ve<je&&Le&&le.createElement("span",{className:`${he}-split`},Le))},ut=me(2856);function mt(se){return["small","middle","large"].includes(se)}function yt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var De=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 Le=0,Ee=Object.getOwnPropertySymbols(se);Le<Ee.length;Le++)he.indexOf(Ee[Le])<0&&Object.prototype.propertyIsEnumerable.call(se,Ee[Le])&&(ve[Ee[Le]]=se[Ee[Le]]);return ve};const ee=le.forwardRef((se,he)=>{var ve,Ee;const{getPrefixCls:Le,space:Ne,direction:je}=le.useContext(We.E_),{size:ze=(Ne==null?void 0:Ne.size)||"small",align:Ye,className:Xe,rootClassName:lt,children:Ze,direction:Lt="horizontal",prefixCls:rt,split:Ot,style:wt,wrap:Dt=!1,classNames:Wt,styles:Mt}=se,et=De(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ue,Rt]=Array.isArray(ze)?ze:[ze,ze],Pn=mt(Rt),xn=mt(Ue),_t=yt(Rt),qt=yt(Ue),cn=(0,st.Z)(Ze,{keepEmpty:!0}),Gn=Ye===void 0&&Lt==="horizontal"?"center":Ye,gn=Le("space",rt),[Zn,Ct]=(0,ut.Z)(gn),Wn=He()(gn,Ne==null?void 0:Ne.className,Ct,`${gn}-${Lt}`,{[`${gn}-rtl`]:je==="rtl",[`${gn}-align-${Gn}`]:Gn,[`${gn}-gap-row-${Rt}`]:Pn,[`${gn}-gap-col-${Ue}`]:xn},Xe,lt),di=He()(`${gn}-item`,(ve=Wt==null?void 0:Wt.item)!==null&&ve!==void 0?ve:(Ee=Ne==null?void 0:Ne.classNames)===null||Ee===void 0?void 0:Ee.item);let Kt=0;const ln=cn.map((ft,$e)=>{var Gt,Ht;ft!=null&&(Kt=$e);const ht=ft&&ft.key||`${di}-${$e}`;return le.createElement(Ge,{className:di,key:ht,index:$e,split:Ot,style:(Gt=Mt==null?void 0:Mt.item)!==null&&Gt!==void 0?Gt:(Ht=Ne==null?void 0:Ne.styles)===null||Ht===void 0?void 0:Ht.item},ft)}),$t=le.useMemo(()=>({latestIndex:Kt}),[Kt]);if(cn.length===0)return null;const Tt={};return Dt&&(Tt.flexWrap="wrap"),!xn&&qt&&(Tt.columnGap=Ue),!Pn&&_t&&(Tt.rowGap=Rt),Zn(le.createElement("div",Object.assign({ref:he,className:Wn,style:Object.assign(Object.assign(Object.assign({},Tt),Ne==null?void 0:Ne.style),wt)},et),le.createElement(bt,{value:$t},ln)))});ee.Compact=ct.ZP;var ce=ee},31797:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return je}});var le=me(59301),Te=me(56762),He=me(92343),st=me(92310),We=me.n(st),ct=me(36355),Me=me(61621),Pt=ze=>{const{value:Ye,formatter:Xe,precision:lt,decimalSeparator:Ze,groupSeparator:Lt="",prefixCls:rt}=ze;let Ot;if(typeof Xe=="function")Ot=Xe(Ye);else{const wt=String(Ye),Dt=wt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Dt||wt==="-")Ot=wt;else{const Wt=Dt[1];let Mt=Dt[2]||"0",et=Dt[4]||"";Mt=Mt.replace(/\B(?=(\d{3})+(?!\d))/g,Lt),typeof lt=="number"&&(et=et.padEnd(lt,"0").slice(0,lt>0?lt:0)),et&&(et=`${Ze}${et}`),Ot=[le.createElement("span",{key:"int",className:`${rt}-content-value-int`},Wt,Mt),et&&le.createElement("span",{key:"decimal",className:`${rt}-content-value-decimal`},et)]}}return le.createElement("span",{className:`${rt}-content-value`},Ot)},Ge=me(17313),ut=me(83116),mt=me(37613);const yt=ze=>{const{componentCls:Ye,marginXXS:Xe,padding:lt,colorTextDescription:Ze,titleFontSize:Lt,colorTextHeading:rt,contentFontSize:Ot,fontFamily:wt}=ze;return{[`${Ye}`]:Object.assign(Object.assign({},(0,Ge.Wf)(ze)),{[`${Ye}-title`]:{marginBottom:Xe,color:Ze,fontSize:Lt},[`${Ye}-skeleton`]:{paddingTop:lt},[`${Ye}-content`]:{color:rt,fontSize:Ot,fontFamily:wt,[`${Ye}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Ye}-content-prefix, ${Ye}-content-suffix`]:{display:"inline-block"},[`${Ye}-content-prefix`]:{marginInlineEnd:Xe},[`${Ye}-content-suffix`]:{marginInlineStart:Xe}}})}};var De=(0,ut.Z)("Statistic",ze=>{const Ye=(0,mt.TS)(ze,{});return[yt(Ye)]},ze=>{const{fontSizeHeading3:Ye,fontSize:Xe}=ze;return{titleFontSize:Xe,contentFontSize:Ye}}),ee=ze=>{const{prefixCls:Ye,className:Xe,rootClassName:lt,style:Ze,valueStyle:Lt,value:rt=0,title:Ot,valueRender:wt,prefix:Dt,suffix:Wt,loading:Mt=!1,onMouseEnter:et,onMouseLeave:Ue,decimalSeparator:Rt=".",groupSeparator:Pn=","}=ze,{getPrefixCls:xn,direction:_t,statistic:qt}=le.useContext(ct.E_),cn=xn("statistic",Ye),[Gn,gn]=De(cn),Zn=le.createElement(Pt,Object.assign({decimalSeparator:Rt,groupSeparator:Pn,prefixCls:cn},ze,{value:rt})),Ct=We()(cn,{[`${cn}-rtl`]:_t==="rtl"},qt==null?void 0:qt.className,Xe,lt,gn);return Gn(le.createElement("div",{className:Ct,style:Object.assign(Object.assign({},qt==null?void 0:qt.style),Ze),onMouseEnter:et,onMouseLeave:Ue},Ot&&le.createElement("div",{className:`${cn}-title`},Ot),le.createElement(Me.Z,{paragraph:!1,loading:Mt,className:`${cn}-skeleton`},le.createElement("div",{style:Lt,className:`${cn}-content`},Dt&&le.createElement("span",{className:`${cn}-content-prefix`},Dt),wt?wt(Zn):Zn,Wt&&le.createElement("span",{className:`${cn}-content-suffix`},Wt)))))};const ce=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function se(ze,Ye){let Xe=ze;const lt=/\[[^\]]*]/g,Ze=(Ye.match(lt)||[]).map(wt=>wt.slice(1,-1)),Lt=Ye.replace(lt,"[]"),rt=ce.reduce((wt,Dt)=>{let[Wt,Mt]=Dt;if(wt.includes(Wt)){const et=Math.floor(Xe/Mt);return Xe-=et*Mt,wt.replace(new RegExp(`${Wt}+`,"g"),Ue=>{const Rt=Ue.length;return et.toString().padStart(Rt,"0")})}return wt},Lt);let Ot=0;return rt.replace(lt,()=>{const wt=Ze[Ot];return Ot+=1,wt})}function he(ze,Ye){const{format:Xe=""}=Ye,lt=new Date(ze).getTime(),Ze=Date.now(),Lt=Math.max(lt-Ze,0);return se(Lt,Xe)}const ve=1e3/30;function Ee(ze){return new Date(ze).getTime()}const Le=ze=>{const{value:Ye,format:Xe="HH:mm:ss",onChange:lt,onFinish:Ze}=ze,Lt=(0,Te.Z)(),rt=le.useRef(null),Ot=()=>{Ze==null||Ze(),rt.current&&(clearInterval(rt.current),rt.current=null)},wt=()=>{const Mt=Ee(Ye);Mt>=Date.now()&&(rt.current=setInterval(()=>{Lt(),lt==null||lt(Mt-Date.now()),Mt<Date.now()&&Ot()},ve))};le.useEffect(()=>(wt(),()=>{rt.current&&(clearInterval(rt.current),rt.current=null)}),[Ye]);const Dt=(Mt,et)=>he(Mt,Object.assign(Object.assign({},et),{format:Xe})),Wt=Mt=>(0,He.Tm)(Mt,{title:void 0});return le.createElement(ee,Object.assign({},ze,{valueRender:Wt,formatter:Dt}))};var Ne=le.memo(Le);ee.Countdown=Ne;var je=ee},15969:function(_n,yn,me){"use strict";me.d(yn,{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(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Lt}});var le=me(58617),Te=me(92310),He=me.n(Te),st=me(72308),We=me(49618),ct=me(52487),Me=me(74416),bt=me(59301),Pt=me(18929),Ge=me(10228),ut=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],mt=bt.forwardRef(function(rt,Ot){var wt,Dt=rt.prefixCls,Wt=Dt===void 0?"rc-switch":Dt,Mt=rt.className,et=rt.checked,Ue=rt.defaultChecked,Rt=rt.disabled,Pn=rt.loadingIcon,xn=rt.checkedChildren,_t=rt.unCheckedChildren,qt=rt.onClick,cn=rt.onChange,Gn=rt.onKeyDown,gn=(0,Me.Z)(rt,ut),Zn=(0,Pt.Z)(!1,{value:et,defaultValue:Ue}),Ct=(0,ct.Z)(Zn,2),Wn=Ct[0],di=Ct[1];function Kt(ft,$e){var Gt=Wn;return Rt||(Gt=ft,di(Gt),cn==null||cn(Gt,$e)),Gt}function ln(ft){ft.which===Ge.Z.LEFT?Kt(!1,ft):ft.which===Ge.Z.RIGHT&&Kt(!0,ft),Gn==null||Gn(ft)}function $t(ft){var $e=Kt(!Wn,ft);qt==null||qt($e,ft)}var Tt=He()(Wt,Mt,(wt={},(0,We.Z)(wt,"".concat(Wt,"-checked"),Wn),(0,We.Z)(wt,"".concat(Wt,"-disabled"),Rt),wt));return bt.createElement("button",(0,st.Z)({},gn,{type:"button",role:"switch","aria-checked":Wn,disabled:Rt,className:Tt,ref:Ot,onKeyDown:ln,onClick:$t}),Pn,bt.createElement("span",{className:"".concat(Wt,"-inner")},bt.createElement("span",{className:"".concat(Wt,"-inner-checked")},xn),bt.createElement("span",{className:"".concat(Wt,"-inner-unchecked")},_t)))});mt.displayName="Switch";var yt=mt,De=me(14088),te=me(36355),ee=me(1684),ce=me(19716),se=me(64993),he=me(17313),ve=me(83116),Ee=me(37613);const Le=rt=>{const{componentCls:Ot,trackHeightSM:wt,trackPadding:Dt,trackMinWidthSM:Wt,innerMinMarginSM:Mt,innerMaxMarginSM:et,handleSizeSM:Ue}=rt,Rt=`${Ot}-inner`;return{[Ot]:{[`&${Ot}-small`]:{minWidth:Wt,height:wt,lineHeight:`${wt}px`,[`${Ot}-inner`]:{paddingInlineStart:et,paddingInlineEnd:Mt,[`${Rt}-checked`]:{marginInlineStart:`calc(-100% + ${Ue+Dt*2}px - ${et*2}px)`,marginInlineEnd:`calc(100% - ${Ue+Dt*2}px + ${et*2}px)`},[`${Rt}-unchecked`]:{marginTop:-wt,marginInlineStart:0,marginInlineEnd:0}},[`${Ot}-handle`]:{width:Ue,height:Ue},[`${Ot}-loading-icon`]:{top:(Ue-rt.switchLoadingIconSize)/2,fontSize:rt.switchLoadingIconSize},[`&${Ot}-checked`]:{[`${Ot}-inner`]:{paddingInlineStart:Mt,paddingInlineEnd:et,[`${Rt}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Rt}-unchecked`]:{marginInlineStart:`calc(100% - ${Ue+Dt*2}px + ${et*2}px)`,marginInlineEnd:`calc(-100% + ${Ue+Dt*2}px - ${et*2}px)`}},[`${Ot}-handle`]:{insetInlineStart:`calc(100% - ${Ue+Dt}px)`}},[`&:not(${Ot}-disabled):active`]:{[`&:not(${Ot}-checked) ${Rt}`]:{[`${Rt}-unchecked`]:{marginInlineStart:rt.marginXXS/2,marginInlineEnd:-rt.marginXXS/2}},[`&${Ot}-checked ${Rt}`]:{[`${Rt}-checked`]:{marginInlineStart:-rt.marginXXS/2,marginInlineEnd:rt.marginXXS/2}}}}}}},Ne=rt=>{const{componentCls:Ot,handleSize:wt}=rt;return{[Ot]:{[`${Ot}-loading-icon${rt.iconCls}`]:{position:"relative",top:(wt-rt.fontSize)/2,color:rt.switchLoadingIconColor,verticalAlign:"top"},[`&${Ot}-checked ${Ot}-loading-icon`]:{color:rt.switchColor}}}},je=rt=>{const{componentCls:Ot,motion:wt,trackPadding:Dt,handleBg:Wt,handleShadow:Mt,handleSize:et}=rt,Ue=`${Ot}-handle`;return{[Ot]:{[Ue]:{position:"absolute",top:Dt,insetInlineStart:Dt,width:et,height:et,transition:`all ${rt.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Wt,borderRadius:et/2,boxShadow:Mt,transition:`all ${rt.switchDuration} ease-in-out`,content:'""'}},[`&${Ot}-checked ${Ue}`]:{insetInlineStart:`calc(100% - ${et+Dt}px)`},[`&:not(${Ot}-disabled):active`]:wt?{[`${Ue}::before`]:{insetInlineEnd:rt.switchHandleActiveInset,insetInlineStart:0},[`&${Ot}-checked ${Ue}::before`]:{insetInlineEnd:0,insetInlineStart:rt.switchHandleActiveInset}}:{}}}},ze=rt=>{const{componentCls:Ot,trackHeight:wt,trackPadding:Dt,innerMinMargin:Wt,innerMaxMargin:Mt,handleSize:et}=rt,Ue=`${Ot}-inner`;return{[Ot]:{[Ue]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:Mt,paddingInlineEnd:Wt,transition:`padding-inline-start ${rt.switchDuration} ease-in-out, padding-inline-end ${rt.switchDuration} ease-in-out`,[`${Ue}-checked, ${Ue}-unchecked`]:{display:"block",color:rt.colorTextLightSolid,fontSize:rt.fontSizeSM,transition:`margin-inline-start ${rt.switchDuration} ease-in-out, margin-inline-end ${rt.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ue}-checked`]:{marginInlineStart:`calc(-100% + ${et+Dt*2}px - ${Mt*2}px)`,marginInlineEnd:`calc(100% - ${et+Dt*2}px + ${Mt*2}px)`},[`${Ue}-unchecked`]:{marginTop:-wt,marginInlineStart:0,marginInlineEnd:0}},[`&${Ot}-checked ${Ue}`]:{paddingInlineStart:Wt,paddingInlineEnd:Mt,[`${Ue}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ue}-unchecked`]:{marginInlineStart:`calc(100% - ${et+Dt*2}px + ${Mt*2}px)`,marginInlineEnd:`calc(-100% + ${et+Dt*2}px - ${Mt*2}px)`}},[`&:not(${Ot}-disabled):active`]:{[`&:not(${Ot}-checked) ${Ue}`]:{[`${Ue}-unchecked`]:{marginInlineStart:Dt*2,marginInlineEnd:-Dt*2}},[`&${Ot}-checked ${Ue}`]:{[`${Ue}-checked`]:{marginInlineStart:-Dt*2,marginInlineEnd:Dt*2}}}}}},Ye=rt=>{const{componentCls:Ot,trackHeight:wt,trackMinWidth:Dt}=rt;return{[Ot]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(rt)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Dt,height:wt,lineHeight:`${wt}px`,verticalAlign:"middle",background:rt.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${rt.motionDurationMid}`,userSelect:"none",[`&:hover:not(${Ot}-disabled)`]:{background:rt.colorTextTertiary}}),(0,he.Qy)(rt)),{[`&${Ot}-checked`]:{background:rt.switchColor,[`&:hover:not(${Ot}-disabled)`]:{background:rt.colorPrimaryHover}},[`&${Ot}-loading, &${Ot}-disabled`]:{cursor:"not-allowed",opacity:rt.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${Ot}-rtl`]:{direction:"rtl"}})}};var Xe=(0,ve.Z)("Switch",rt=>{const Ot=(0,Ee.TS)(rt,{switchDuration:rt.motionDurationMid,switchColor:rt.colorPrimary,switchDisabledOpacity:rt.opacityLoading,switchLoadingIconSize:rt.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${rt.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Ye(Ot),ze(Ot),je(Ot),Ne(Ot),Le(Ot)]},rt=>{const{fontSize:Ot,lineHeight:wt,controlHeight:Dt,colorWhite:Wt}=rt,Mt=Ot*wt,et=Dt/2,Ue=2,Rt=Mt-Ue*2,Pn=et-Ue*2;return{trackHeight:Mt,trackHeightSM:et,trackMinWidth:Rt*2+Ue*4,trackMinWidthSM:Pn*2+Ue*2,trackPadding:Ue,handleBg:Wt,handleSize:Rt,handleSizeSM:Pn,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:Rt/2,innerMaxMargin:Rt+Ue+Ue*2,innerMinMarginSM:Pn/2,innerMaxMarginSM:Pn+Ue+Ue*2}}),lt=function(rt,Ot){var wt={};for(var Dt in rt)Object.prototype.hasOwnProperty.call(rt,Dt)&&Ot.indexOf(Dt)<0&&(wt[Dt]=rt[Dt]);if(rt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Wt=0,Dt=Object.getOwnPropertySymbols(rt);Wt<Dt.length;Wt++)Ot.indexOf(Dt[Wt])<0&&Object.prototype.propertyIsEnumerable.call(rt,Dt[Wt])&&(wt[Dt[Wt]]=rt[Dt[Wt]]);return wt};const Ze=bt.forwardRef((rt,Ot)=>{const{prefixCls:wt,size:Dt,disabled:Wt,loading:Mt,className:et,rootClassName:Ue,style:Rt}=rt,Pn=lt(rt,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:xn,direction:_t,switch:qt}=bt.useContext(te.E_),cn=bt.useContext(ee.Z),Gn=(Wt!=null?Wt:cn)||Mt,gn=xn("switch",wt),Zn=bt.createElement("div",{className:`${gn}-handle`},Mt&&bt.createElement(le.Z,{className:`${gn}-loading-icon`})),[Ct,Wn]=Xe(gn),di=(0,ce.Z)(Dt),Kt=He()(qt==null?void 0:qt.className,{[`${gn}-small`]:di==="small",[`${gn}-loading`]:Mt,[`${gn}-rtl`]:_t==="rtl"},et,Ue,Wn),ln=Object.assign(Object.assign({},qt==null?void 0:qt.style),Rt);return Ct(bt.createElement(De.Z,{component:"Switch"},bt.createElement(yt,Object.assign({},Pn,{prefixCls:gn,className:Kt,style:ln,disabled:Gn,ref:Ot,loadingIcon:Zn}))))});Ze.__ANT_SWITCH=!0;var Lt=Ze},1710:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return Xa}});var le={},Te="rc-table-internal-hook",He=me(52487),st=me(6089),We=me(34280),ct=me(13697),Me=me(59301),bt=me(4676);function Pt(it){var qe=Me.createContext(void 0),Xt=function(mn){var on=mn.value,Un=mn.children,Hn=Me.useRef(on);Hn.current=on;var Jn=Me.useState(function(){return{getValue:function(){return Hn.current},listeners:new Set}}),Si=(0,He.Z)(Jn,1),Qn=Si[0];return(0,We.Z)(function(){(0,bt.unstable_batchedUpdates)(function(){Qn.listeners.forEach(function(yi){yi(on)})})},[on]),Me.createElement(qe.Provider,{value:Qn},Un)};return{Context:qe,Provider:Xt,defaultValue:it}}function Ge(it,qe){var Xt=(0,st.Z)(typeof qe=="function"?qe:function(yi){if(qe===void 0)return yi;if(!Array.isArray(qe))return yi[qe];var or={};return qe.forEach(function(Ui){or[Ui]=yi[Ui]}),or}),Qt=Me.useContext(it==null?void 0:it.Context),mn=Qt||{},on=mn.listeners,Un=mn.getValue,Hn=Me.useRef();Hn.current=Xt(Qt?Un():it==null?void 0:it.defaultValue);var Jn=Me.useState({}),Si=(0,He.Z)(Jn,2),Qn=Si[1];return(0,We.Z)(function(){if(!Qt)return;function yi(or){var Ui=Xt(or);(0,ct.Z)(Hn.current,Ui,!0)||Qn({})}return on.add(yi),function(){on.delete(yi)}},[Qt]),Hn.current}var ut=me(72308),mt=me(8654);function yt(){var it=Me.createContext(null);function qe(){return Me.useContext(it)}function Xt(mn,on){var Un=(0,mt.Yr)(mn),Hn=function(Si,Qn){var yi=Un?{ref:Qn}:{},or=Me.useRef(0),Ui=Me.useRef(Si),Yi=qe();return Yi!==null?Me.createElement(mn,(0,ut.Z)({},Si,yi)):((!on||on(Ui.current,Si))&&(or.current+=1),Ui.current=Si,Me.createElement(it.Provider,{value:or.current},Me.createElement(mn,(0,ut.Z)({},Si,yi))))};return Un?Me.forwardRef(Hn):Hn}function Qt(mn,on){var Un=(0,mt.Yr)(mn),Hn=function(Si,Qn){var yi=Un?{ref:Qn}:{};return qe(),Me.createElement(mn,(0,ut.Z)({},Si,yi))};return Un?Me.memo(Me.forwardRef(Hn),on):Me.memo(Hn,on)}return{makeImmutable:Xt,responseImmutable:Qt,useImmutableMark:qe}}var De=yt(),te=De.makeImmutable,ee=De.responseImmutable,ce=De.useImmutableMark,se=yt(),he=se.makeImmutable,ve=se.responseImmutable,Ee=se.useImmutableMark,Le=Pt(),Ne=Le;function je(it,qe){var Xt=Me.useRef(0);Xt.current+=1;var Qt=Me.useRef(it),mn=[];Object.keys(it||{}).map(function(Un){var Hn;(it==null?void 0:it[Un])!==((Hn=Qt.current)===null||Hn===void 0?void 0:Hn[Un])&&mn.push(Un)}),Qt.current=it;var on=Me.useRef([]);return mn.length&&(on.current=mn),Me.useDebugValue(Xt.current),Me.useDebugValue(on.current.join(", ")),qe&&console.log("".concat(qe,":"),Xt.current,on.current),Xt.current}var ze=null,Ye=Me.memo(function(){var it=je();return Me.createElement("h1",null,"Render Times: ",it)});Ye.displayName="RenderBlock";var Xe=me(62853),lt=me(77321),Ze=me(49618),Lt=me(92310),rt=me.n(Lt),Ot=me(80547),wt=me(97938),Dt=me(48736),Wt=Me.createContext({renderWithProps:!1}),Mt=Wt,et="RC_TABLE_KEY";function Ue(it){return it==null?[]:Array.isArray(it)?it:[it]}function Rt(it){var qe=[],Xt={};return it.forEach(function(Qt){for(var mn=Qt||{},on=mn.key,Un=mn.dataIndex,Hn=on||Ue(Un).join("-")||et;Xt[Hn];)Hn="".concat(Hn,"_next");Xt[Hn]=!0,qe.push(Hn)}),qe}function Pn(it){return it!=null}function xn(it){return it&&(0,Xe.Z)(it)==="object"&&!Array.isArray(it)&&!Me.isValidElement(it)}function _t(it,qe,Xt,Qt,mn,on){var Un=Me.useContext(Mt),Hn=Ee(),Jn=(0,Ot.Z)(function(){if(Pn(Qt))return[Qt];var Si=qe==null||qe===""?[]:Array.isArray(qe)?qe:[qe],Qn=(0,wt.Z)(it,Si),yi=Qn,or=void 0;if(mn){var Ui=mn(Qn,it,Xt);xn(Ui)?(yi=Ui.children,or=Ui.props,Un.renderWithProps=!0):yi=Ui}return[yi,or]},[Hn,it,Qt,qe,mn,Xt],function(Si,Qn){if(on){var yi=(0,He.Z)(Si,2),or=yi[1],Ui=(0,He.Z)(Qn,2),Yi=Ui[1];return on(Yi,or)}return Un.renderWithProps?!0:!(0,ct.Z)(Si,Qn,!0)});return Jn}function qt(it,qe,Xt,Qt){var mn=it+qe-1;return it<=Qt&&mn>=Xt}function cn(it,qe){return Ge(Ne,function(Xt){var Qt=qt(it,qe||1,Xt.hoverStartRow,Xt.hoverEndRow);return[Qt,Xt.onHover]})}var Gn=function(qe){var Xt=qe.ellipsis,Qt=qe.rowType,mn=qe.children,on,Un=Xt===!0?{showTitle:!0}:Xt;return Un&&(Un.showTitle||Qt==="header")&&(typeof mn=="string"||typeof mn=="number"?on=mn.toString():Me.isValidElement(mn)&&typeof mn.props.children=="string"&&(on=mn.props.children)),on};function gn(it){var qe,Xt,Qt,mn,on,Un,Hn,Jn,Si=it.component,Qn=it.children,yi=it.ellipsis,or=it.scope,Ui=it.prefixCls,Yi=it.className,Ur=it.align,rr=it.record,Rr=it.render,_r=it.dataIndex,vo=it.renderIndex,Ko=it.shouldCellUpdate,ua=it.index,oo=it.rowType,Wo=it.colSpan,ka=it.rowSpan,uo=it.fixLeft,ko=it.fixRight,co=it.firstFixLeft,Lr=it.lastFixLeft,Fo=it.firstFixRight,ta=it.lastFixRight,Sa=it.appendNode,Pa=it.additionalProps,ao=Pa===void 0?{}:Pa,Ta=it.isSticky,Ka="".concat(Ui,"-cell"),bs=Ge(Ne,["supportSticky","allColumnsFixedLeft"]),us=bs.supportSticky,qs=bs.allColumnsFixedLeft,Ls=_t(rr,_r,vo,Qn,Rr,Ko),Za=(0,He.Z)(Ls,2),aa=Za[0],fs=Za[1],el={},Ws=typeof uo=="number"&&us,cl=typeof ko=="number"&&us;Ws&&(el.position="sticky",el.left=uo),cl&&(el.position="sticky",el.right=ko);var ba=(qe=(Xt=(Qt=fs==null?void 0:fs.colSpan)!==null&&Qt!==void 0?Qt:ao.colSpan)!==null&&Xt!==void 0?Xt:Wo)!==null&&qe!==void 0?qe:1,da=(mn=(on=(Un=fs==null?void 0:fs.rowSpan)!==null&&Un!==void 0?Un:ao.rowSpan)!==null&&on!==void 0?on:ka)!==null&&mn!==void 0?mn:1,wa=cn(ua,da),Xo=(0,He.Z)(wa,2),Ps=Xo[0],Uo=Xo[1],Ra=function(dl){var Fl;rr&&Uo(ua,ua+da-1),ao==null||(Fl=ao.onMouseEnter)===null||Fl===void 0||Fl.call(ao,dl)},ss=function(dl){var Fl;rr&&Uo(-1,-1),ao==null||(Fl=ao.onMouseLeave)===null||Fl===void 0||Fl.call(ao,dl)};if(ba===0||da===0)return null;var cs=(Hn=ao.title)!==null&&Hn!==void 0?Hn:Gn({rowType:oo,ellipsis:yi,children:aa}),Al=rt()(Ka,Yi,(Jn={},(0,Ze.Z)(Jn,"".concat(Ka,"-fix-left"),Ws&&us),(0,Ze.Z)(Jn,"".concat(Ka,"-fix-left-first"),co&&us),(0,Ze.Z)(Jn,"".concat(Ka,"-fix-left-last"),Lr&&us),(0,Ze.Z)(Jn,"".concat(Ka,"-fix-left-all"),Lr&&qs&&us),(0,Ze.Z)(Jn,"".concat(Ka,"-fix-right"),cl&&us),(0,Ze.Z)(Jn,"".concat(Ka,"-fix-right-first"),Fo&&us),(0,Ze.Z)(Jn,"".concat(Ka,"-fix-right-last"),ta&&us),(0,Ze.Z)(Jn,"".concat(Ka,"-ellipsis"),yi),(0,Ze.Z)(Jn,"".concat(Ka,"-with-append"),Sa),(0,Ze.Z)(Jn,"".concat(Ka,"-fix-sticky"),(Ws||cl)&&Ta&&us),(0,Ze.Z)(Jn,"".concat(Ka,"-row-hover"),!fs&&Ps),Jn),ao.className,fs==null?void 0:fs.className),bl={};Ur&&(bl.textAlign=Ur);var Kl=(0,lt.Z)((0,lt.Z)((0,lt.Z)((0,lt.Z)({},el),ao.style),bl),fs==null?void 0:fs.style),Fs=aa;return(0,Xe.Z)(Fs)==="object"&&!Array.isArray(Fs)&&!Me.isValidElement(Fs)&&(Fs=null),yi&&(Lr||Fo)&&(Fs=Me.createElement("span",{className:"".concat(Ka,"-content")},Fs)),Me.createElement(Si,(0,ut.Z)({},fs,ao,{className:Al,style:Kl,title:cs,scope:or,onMouseEnter:Ra,onMouseLeave:ss,colSpan:ba!==1?ba:null,rowSpan:da!==1?da:null}),Sa,Fs)}var Zn=Me.memo(gn);function Ct(it,qe,Xt,Qt,mn,on){var Un=Xt[it]||{},Hn=Xt[qe]||{},Jn,Si;Un.fixed==="left"?Jn=Qt.left[mn==="rtl"?qe:it]:Hn.fixed==="right"&&(Si=Qt.right[mn==="rtl"?it:qe]);var Qn=!1,yi=!1,or=!1,Ui=!1,Yi=Xt[qe+1],Ur=Xt[it-1],rr=!(on!=null&&on.children);if(mn==="rtl"){if(Jn!==void 0){var Rr=Ur&&Ur.fixed==="left";Ui=!Rr&&rr}else if(Si!==void 0){var _r=Yi&&Yi.fixed==="right";or=!_r&&rr}}else if(Jn!==void 0){var vo=Yi&&Yi.fixed==="left";Qn=!vo&&rr}else if(Si!==void 0){var Ko=Ur&&Ur.fixed==="right";yi=!Ko&&rr}return{fixLeft:Jn,fixRight:Si,lastFixLeft:Qn,firstFixRight:yi,lastFixRight:or,firstFixLeft:Ui,isSticky:Qt.isSticky}}var Wn=Me.createContext({}),di=Wn;function Kt(it){var qe=it.className,Xt=it.index,Qt=it.children,mn=it.colSpan,on=mn===void 0?1:mn,Un=it.rowSpan,Hn=it.align,Jn=Ge(Ne,["prefixCls","direction"]),Si=Jn.prefixCls,Qn=Jn.direction,yi=Me.useContext(di),or=yi.scrollColumnIndex,Ui=yi.stickyOffsets,Yi=yi.flattenColumns,Ur=yi.columns,rr=Xt+on-1,Rr=rr+1===or?on+1:on,_r=Ct(Xt,Xt+Rr-1,Yi,Ui,Qn,Ur==null?void 0:Ur[Xt]);return Me.createElement(Zn,(0,ut.Z)({className:qe,index:Xt,component:"td",prefixCls:Si,record:null,dataIndex:null,align:Hn,colSpan:Rr,rowSpan:Un,render:function(){return Qt}},_r))}var ln=me(74416),$t=["children"];function Tt(it){var qe=it.children,Xt=(0,ln.Z)(it,$t);return Me.createElement("tr",Xt,qe)}function ft(it){var qe=it.children;return qe}ft.Row=Tt,ft.Cell=Kt;var $e=ft;function Gt(it){var qe=it.children,Xt=it.stickyOffsets,Qt=it.flattenColumns,mn=it.columns,on=Ge(Ne,"prefixCls"),Un=Qt.length-1,Hn=Qt[Un],Jn=Me.useMemo(function(){return{stickyOffsets:Xt,flattenColumns:Qt,scrollColumnIndex:Hn!=null&&Hn.scrollbar?Un:null,columns:mn}},[Hn,Qt,Un,Xt,mn]);return Me.createElement(di.Provider,{value:Jn},Me.createElement("tfoot",{className:"".concat(on,"-summary")},qe))}var Ht=ve(Gt),ht=$e,at=me(70425),Re=me(29301),Pe=me(29194),ye=me(24514),Oe=me(75152),Ke=me(26112);function Fe(it,qe,Xt,Qt,mn,on,Un){it.push({record:qe,indent:Xt,index:Un});var Hn=on(qe),Jn=mn==null?void 0:mn.has(Hn);if(qe&&Array.isArray(qe[Qt])&&Jn)for(var Si=0;Si<qe[Qt].length;Si+=1)Fe(it,qe[Qt][Si],Xt+1,Qt,mn,on,Si)}function Et(it,qe,Xt,Qt){var mn=Me.useMemo(function(){if(Xt!=null&&Xt.size){for(var on=[],Un=0;Un<(it==null?void 0:it.length);Un+=1){var Hn=it[Un];Fe(on,Hn,0,qe,Xt,Qt,Un)}return on}return it==null?void 0:it.map(function(Jn,Si){return{record:Jn,indent:0,index:Si}})},[it,qe,Xt,Qt]);return mn}function sn(it){var qe=it.prefixCls,Xt=it.children,Qt=it.component,mn=it.cellComponent,on=it.className,Un=it.expanded,Hn=it.colSpan,Jn=it.isEmpty,Si=Ge(Ne,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Qn=Si.scrollbarSize,yi=Si.fixHeader,or=Si.fixColumn,Ui=Si.componentWidth,Yi=Si.horizonScroll,Ur=Xt;return(Jn?Yi&&Ui:or)&&(Ur=Me.createElement("div",{style:{width:Ui-(yi?Qn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(qe,"-expanded-row-fixed")},Ur)),Me.createElement(Qt,{className:on,style:{display:Un?null:"none"}},Me.createElement(Zn,{component:mn,prefixCls:qe,colSpan:Hn},Ur))}var pn=sn;function en(it,qe,Xt,Qt){var mn=Ge(Ne,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),on=mn.flattenColumns,Un=mn.expandableType,Hn=mn.expandedKeys,Jn=mn.childrenColumnName,Si=mn.onTriggerExpand,Qn=mn.rowExpandable,yi=mn.onRow,or=mn.expandRowByClick,Ui=mn.rowClassName,Yi=Un==="nest",Ur=Un==="row"&&(!Qn||Qn(it)),rr=Ur||Yi,Rr=Hn&&Hn.has(qe),_r=Jn&&it&&it[Jn],vo=(0,at.useEvent)(Si),Ko=yi==null?void 0:yi(it,Xt),ua=Ko==null?void 0:Ko.onClick,oo=function(ko){or&&rr&&Si(it,ko);for(var co=arguments.length,Lr=new Array(co>1?co-1:0),Fo=1;Fo<co;Fo++)Lr[Fo-1]=arguments[Fo];ua==null||ua.apply(void 0,[ko].concat(Lr))},Wo;typeof Ui=="string"?Wo=Ui:typeof Ui=="function"&&(Wo=Ui(it,Xt,Qt));var ka=Rt(on);return(0,lt.Z)((0,lt.Z)({},mn),{},{columnsKey:ka,nestExpandable:Yi,expanded:Rr,hasNestChildren:_r,record:it,onTriggerExpand:vo,rowSupportExpand:Ur,expandable:rr,rowProps:(0,lt.Z)((0,lt.Z)({},Ko),{},{className:rt()(Wo,Ko==null?void 0:Ko.className),onClick:oo})})}function wn(it,qe,Xt,Qt,mn){var on=it.record,Un=it.prefixCls,Hn=it.columnsKey,Jn=it.fixedInfoList,Si=it.expandIconColumnIndex,Qn=it.nestExpandable,yi=it.indentSize,or=it.expandIcon,Ui=it.expanded,Yi=it.hasNestChildren,Ur=it.onTriggerExpand,rr=Hn[Xt],Rr=Jn[Xt],_r;Xt===(Si||0)&&Qn&&(_r=Me.createElement(Me.Fragment,null,Me.createElement("span",{style:{paddingLeft:"".concat(yi*Qt,"px")},className:"".concat(Un,"-row-indent indent-level-").concat(Qt)}),or({prefixCls:Un,expanded:Ui,expandable:Yi,record:on,onExpand:Ur})));var vo;return qe.onCell&&(vo=qe.onCell(on,mn)),{key:rr,fixedInfo:Rr,appendCellNode:_r,additionalCellProps:vo||{}}}function hi(it){var qe=it.className,Xt=it.style,Qt=it.record,mn=it.index,on=it.renderIndex,Un=it.rowKey,Hn=it.indent,Jn=Hn===void 0?0:Hn,Si=it.rowComponent,Qn=it.cellComponent,yi=it.scopeCellComponent,or=en(Qt,Un,mn,Jn),Ui=or.prefixCls,Yi=or.flattenColumns,Ur=or.expandedRowClassName,rr=or.expandedRowRender,Rr=or.rowProps,_r=or.expanded,vo=or.rowSupportExpand,Ko=Me.useState(!1),ua=(0,He.Z)(Ko,2),oo=ua[0],Wo=ua[1];Me.useEffect(function(){_r&&Wo(!0)},[_r]);var ka=Me.createElement(Si,(0,ut.Z)({},Rr,{"data-row-key":Un,className:rt()(qe,"".concat(Ui,"-row"),"".concat(Ui,"-row-level-").concat(Jn),Rr==null?void 0:Rr.className),style:(0,lt.Z)((0,lt.Z)({},Xt),Rr==null?void 0:Rr.style)}),Yi.map(function(Lr,Fo){var ta=Lr.render,Sa=Lr.dataIndex,Pa=Lr.className,ao=wn(or,Lr,Fo,Jn,mn),Ta=ao.key,Ka=ao.fixedInfo,bs=ao.appendCellNode,us=ao.additionalCellProps;return Me.createElement(Zn,(0,ut.Z)({className:Pa,ellipsis:Lr.ellipsis,align:Lr.align,scope:Lr.rowScope,component:Lr.rowScope?yi:Qn,prefixCls:Ui,key:Ta,record:Qt,index:mn,renderIndex:on,dataIndex:Sa,render:ta,shouldCellUpdate:Lr.shouldCellUpdate},Ka,{appendNode:bs,additionalProps:us}))})),uo;if(vo&&(oo||_r)){var ko=rr(Qt,mn,Jn+1,_r),co=Ur&&Ur(Qt,mn,Jn);uo=Me.createElement(pn,{expanded:_r,className:rt()("".concat(Ui,"-expanded-row"),"".concat(Ui,"-expanded-row-level-").concat(Jn+1),co),prefixCls:Ui,component:Si,cellComponent:Qn,colSpan:Yi.length,isEmpty:!1},ko)}return Me.createElement(Me.Fragment,null,ka,uo)}hi.displayName="BodyRow";var Rn=ve(hi);function Sn(it){var qe=it.columnKey,Xt=it.onColumnResize,Qt=Me.useRef();return Me.useEffect(function(){Qt.current&&Xt(qe,Qt.current.offsetWidth)},[]),Me.createElement(Re.Z,{data:qe},Me.createElement("td",{ref:Qt,style:{padding:0,border:0,height:0}},Me.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Pi(it){var qe=it.prefixCls,Xt=it.columnsKey,Qt=it.onColumnResize;return Me.createElement("tr",{"aria-hidden":"true",className:"".concat(qe,"-measure-row"),style:{height:0,fontSize:0}},Me.createElement(Re.Z.Collection,{onBatchResize:function(on){on.forEach(function(Un){var Hn=Un.data,Jn=Un.size;Qt(Hn,Jn.offsetWidth)})}},Xt.map(function(mn){return Me.createElement(Sn,{key:mn,columnKey:mn,onColumnResize:Qt})})))}function zi(it){var qe=it.data,Xt=it.measureColumnWidth,Qt=Ge(Ne,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),mn=Qt.prefixCls,on=Qt.getComponent,Un=Qt.onColumnResize,Hn=Qt.flattenColumns,Jn=Qt.getRowKey,Si=Qt.expandedKeys,Qn=Qt.childrenColumnName,yi=Qt.emptyNode,or=Et(qe,Qn,Si,Jn),Ui=Me.useRef({renderWithProps:!1}),Yi=on(["body","wrapper"],"tbody"),Ur=on(["body","row"],"tr"),rr=on(["body","cell"],"td"),Rr=on(["body","cell"],"th"),_r;qe.length?_r=or.map(function(Ko,ua){var oo=Ko.record,Wo=Ko.indent,ka=Ko.index,uo=Jn(oo,ua);return Me.createElement(Rn,{key:uo,rowKey:uo,record:oo,index:ua,renderIndex:ka,rowComponent:Ur,cellComponent:rr,scopeCellComponent:Rr,getRowKey:Jn,indent:Wo})}):_r=Me.createElement(pn,{expanded:!0,className:"".concat(mn,"-placeholder"),prefixCls:mn,component:Ur,cellComponent:rr,colSpan:Hn.length,isEmpty:!0},yi);var vo=Rt(Hn);return Me.createElement(Mt.Provider,{value:Ui.current},Me.createElement(Yi,{className:"".concat(mn,"-tbody")},Xt&&Me.createElement(Pi,{prefixCls:mn,columnsKey:vo,onColumnResize:Un}),_r))}zi.displayName="Body";var Zi=ve(zi),ir=["expandable"],Nr="RC_TABLE_INTERNAL_COL_DEFINE";function pi(it){var qe=it.expandable,Xt=(0,ln.Z)(it,ir),Qt;return"expandable"in it?Qt=(0,lt.Z)((0,lt.Z)({},Xt),qe):Qt=Xt,Qt.showExpandColumn===!1&&(Qt.expandIconColumnIndex=-1),Qt}var li=["columnType"];function xi(it){for(var qe=it.colWidths,Xt=it.columns,Qt=it.columCount,mn=[],on=Qt||Xt.length,Un=!1,Hn=on-1;Hn>=0;Hn-=1){var Jn=qe[Hn],Si=Xt&&Xt[Hn],Qn=Si&&Si[Nr];if(Jn||Qn||Un){var yi=Qn||{},or=yi.columnType,Ui=(0,ln.Z)(yi,li);mn.unshift(Me.createElement("col",(0,ut.Z)({key:Hn,style:{width:Jn}},Ui))),Un=!0}}return Me.createElement("colgroup",null,mn)}var Gi=xi,Oi=me(80702),to=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function eo(it,qe){return(0,Me.useMemo)(function(){for(var Xt=[],Qt=0;Qt<qe;Qt+=1){var mn=it[Qt];if(mn!==void 0)Xt[Qt]=mn;else return null}return Xt},[it.join("_"),qe])}var Be=Me.forwardRef(function(it,qe){var Xt=it.className,Qt=it.noData,mn=it.columns,on=it.flattenColumns,Un=it.colWidths,Hn=it.columCount,Jn=it.stickyOffsets,Si=it.direction,Qn=it.fixHeader,yi=it.stickyTopOffset,or=it.stickyBottomOffset,Ui=it.stickyClassName,Yi=it.onScroll,Ur=it.maxContentScroll,rr=it.children,Rr=(0,ln.Z)(it,to),_r=Ge(Ne,["prefixCls","scrollbarSize","isSticky"]),vo=_r.prefixCls,Ko=_r.scrollbarSize,ua=_r.isSticky,oo=ua&&!Qn?0:Ko,Wo=Me.useRef(null),ka=Me.useCallback(function(Pa){(0,mt.mH)(qe,Pa),(0,mt.mH)(Wo,Pa)},[]);Me.useEffect(function(){var Pa;function ao(Ta){var Ka=Ta,bs=Ka.currentTarget,us=Ka.deltaX;us&&(Yi({currentTarget:bs,scrollLeft:bs.scrollLeft+us}),Ta.preventDefault())}return(Pa=Wo.current)===null||Pa===void 0||Pa.addEventListener("wheel",ao),function(){var Ta;(Ta=Wo.current)===null||Ta===void 0||Ta.removeEventListener("wheel",ao)}},[]);var uo=Me.useMemo(function(){return on.every(function(Pa){return Pa.width})},[on]),ko=on[on.length-1],co={fixed:ko?ko.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(vo,"-cell-scrollbar")}}},Lr=(0,Me.useMemo)(function(){return oo?[].concat((0,Oi.Z)(mn),[co]):mn},[oo,mn]),Fo=(0,Me.useMemo)(function(){return oo?[].concat((0,Oi.Z)(on),[co]):on},[oo,on]),ta=(0,Me.useMemo)(function(){var Pa=Jn.right,ao=Jn.left;return(0,lt.Z)((0,lt.Z)({},Jn),{},{left:Si==="rtl"?[].concat((0,Oi.Z)(ao.map(function(Ta){return Ta+oo})),[0]):ao,right:Si==="rtl"?Pa:[].concat((0,Oi.Z)(Pa.map(function(Ta){return Ta+oo})),[0]),isSticky:ua})},[oo,Jn,ua]),Sa=eo(Un,Hn);return Me.createElement("div",{style:(0,lt.Z)({overflow:"hidden"},ua?{top:yi,bottom:or}:{}),ref:ka,className:rt()(Xt,(0,Ze.Z)({},Ui,!!Ui))},Me.createElement("table",{style:{tableLayout:"fixed",visibility:Qt||Sa?null:"hidden"}},(!Qt||!Ur||uo)&&Me.createElement(Gi,{colWidths:Sa?[].concat((0,Oi.Z)(Sa),[oo]):[],columCount:Hn+1,columns:Fo}),rr((0,lt.Z)((0,lt.Z)({},Rr),{},{stickyOffsets:ta,columns:Lr,flattenColumns:Fo}))))});Be.displayName="FixedHolder";var Fi=Me.memo(Be);function wr(it){var qe=it.cells,Xt=it.stickyOffsets,Qt=it.flattenColumns,mn=it.rowComponent,on=it.cellComponent,Un=it.tdCellComponent,Hn=it.onHeaderRow,Jn=it.index,Si=Ge(Ne,["prefixCls","direction"]),Qn=Si.prefixCls,yi=Si.direction,or;Hn&&(or=Hn(qe.map(function(Yi){return Yi.column}),Jn));var Ui=Rt(qe.map(function(Yi){return Yi.column}));return Me.createElement(mn,or,qe.map(function(Yi,Ur){var rr=Yi.column,Rr=Ct(Yi.colStart,Yi.colEnd,Qt,Xt,yi,rr),_r;return rr&&rr.onHeaderCell&&(_r=Yi.column.onHeaderCell(rr)),Me.createElement(Zn,(0,ut.Z)({},Yi,{scope:rr.title?Yi.colSpan>1?"colgroup":"col":null,ellipsis:rr.ellipsis,align:rr.align,component:rr.title?on:Un,prefixCls:Qn,key:Ui[Ur]},Rr,{additionalProps:_r,rowType:"header"}))}))}wr.displayName="HeaderRow";var Fn=wr;function wi(it){var qe=[];function Xt(Un,Hn){var Jn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;qe[Jn]=qe[Jn]||[];var Si=Hn,Qn=Un.filter(Boolean).map(function(yi){var or={key:yi.key,className:yi.className||"",children:yi.title,column:yi,colStart:Si},Ui=1,Yi=yi.children;return Yi&&Yi.length>0&&(Ui=Xt(Yi,Si,Jn+1).reduce(function(Ur,rr){return Ur+rr},0),or.hasSubColumns=!0),"colSpan"in yi&&(Ui=yi.colSpan),"rowSpan"in yi&&(or.rowSpan=yi.rowSpan),or.colSpan=Ui,or.colEnd=or.colStart+Ui-1,qe[Jn].push(or),Si+=Ui,Ui});return Qn}Xt(it,0);for(var Qt=qe.length,mn=function(Hn){qe[Hn].forEach(function(Jn){!("rowSpan"in Jn)&&!Jn.hasSubColumns&&(Jn.rowSpan=Qt-Hn)})},on=0;on<Qt;on+=1)mn(on);return qe}function $i(it){var qe=it.stickyOffsets,Xt=it.columns,Qt=it.flattenColumns,mn=it.onHeaderRow,on=Ge(Ne,["prefixCls","getComponent"]),Un=on.prefixCls,Hn=on.getComponent,Jn=Me.useMemo(function(){return wi(Xt)},[Xt]),Si=Hn(["header","wrapper"],"thead"),Qn=Hn(["header","row"],"tr"),yi=Hn(["header","cell"],"th"),or=Hn(["header","cell"],"td");return Me.createElement(Si,{className:"".concat(Un,"-thead")},Jn.map(function(Ui,Yi){var Ur=Me.createElement(Fn,{key:Yi,flattenColumns:Qt,cells:Ui,stickyOffsets:qe,rowComponent:Qn,cellComponent:yi,tdCellComponent:or,onHeaderRow:mn,index:Yi});return Ur}))}var tr=ve($i),ei=me(11592);function $n(it){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof qe=="number"?qe:qe.endsWith("%")?it*parseFloat(qe)/100:null}function zt(it,qe){return Me.useMemo(function(){if(qe&&qe>0){var Xt=0,Qt=0;it.forEach(function(Si){var Qn=$n(qe,Si.width);Qn?Xt+=Qn:Qt+=1});var mn=qe-Xt,on=Qt,Un=mn/Qt,Hn=0,Jn=it.map(function(Si){var Qn=(0,lt.Z)({},Si),yi=$n(qe,Qn.width);if(yi)Qn.width=yi;else{var or=Math.floor(Un);Qn.width=on===1?mn:or,mn-=or,on-=1}return Hn+=Qn.width,Qn});return[Jn,Hn]}return[it,qe]},[it,qe])}var Vt=["children"],Qe=["fixed"];function an(it){return(0,ei.Z)(it).filter(function(qe){return Me.isValidElement(qe)}).map(function(qe){var Xt=qe.key,Qt=qe.props,mn=Qt.children,on=(0,ln.Z)(Qt,Vt),Un=(0,lt.Z)({key:Xt},on);return mn&&(Un.children=an(mn)),Un})}function dn(it){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return it.filter(function(Xt){return Xt&&(0,Xe.Z)(Xt)==="object"}).reduce(function(Xt,Qt,mn){var on=Qt.fixed,Un=on===!0?"left":on,Hn="".concat(qe,"-").concat(mn),Jn=Qt.children;return Jn&&Jn.length>0?[].concat((0,Oi.Z)(Xt),(0,Oi.Z)(dn(Jn,Hn).map(function(Si){return(0,lt.Z)({fixed:Un},Si)}))):[].concat((0,Oi.Z)(Xt),[(0,lt.Z)((0,lt.Z)({key:Hn},Qt),{},{fixed:Un})])},[])}function Nt(it){for(var qe=!0,Xt=0;Xt<it.length;Xt+=1){var Qt=it[Xt];if(qe&&Qt.fixed!=="left")qe=!1;else if(!qe&&Qt.fixed==="left"){warning(!1,"Index ".concat(Xt-1," of `columns` missing `fixed='left'` prop."));break}}for(var mn=!0,on=it.length-1;on>=0;on-=1){var Un=it[on];if(mn&&Un.fixed!=="right")mn=!1;else if(!mn&&Un.fixed==="right"){warning(!1,"Index ".concat(on+1," of `columns` missing `fixed='right'` prop."));break}}}function dt(it){return it.map(function(qe){var Xt=qe.fixed,Qt=(0,ln.Z)(qe,Qe),mn=Xt;return Xt==="left"?mn="right":Xt==="right"&&(mn="left"),(0,lt.Z)({fixed:mn},Qt)})}function nn(it,qe){var Xt=it.prefixCls,Qt=it.columns,mn=it.children,on=it.expandable,Un=it.expandedKeys,Hn=it.columnTitle,Jn=it.getRowKey,Si=it.onTriggerExpand,Qn=it.expandIcon,yi=it.rowExpandable,or=it.expandIconColumnIndex,Ui=it.direction,Yi=it.expandRowByClick,Ur=it.columnWidth,rr=it.fixed,Rr=it.scrollWidth,_r=Me.useMemo(function(){return Qt||an(mn)},[Qt,mn]),vo=Me.useMemo(function(){if(on){var ko,co=_r.slice();if(!co.includes(le)){var Lr=or||0;Lr>=0&&co.splice(Lr,0,le)}var Fo=co.indexOf(le);co=co.filter(function(ao,Ta){return ao!==le||Ta===Fo});var ta=_r[Fo],Sa;(rr==="left"||rr)&&!or?Sa="left":(rr==="right"||rr)&&or===_r.length?Sa="right":Sa=ta?ta.fixed:null;var Pa=(ko={},(0,Ze.Z)(ko,Nr,{className:"".concat(Xt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ze.Z)(ko,"title",Hn),(0,Ze.Z)(ko,"fixed",Sa),(0,Ze.Z)(ko,"className","".concat(Xt,"-row-expand-icon-cell")),(0,Ze.Z)(ko,"width",Ur),(0,Ze.Z)(ko,"render",function(Ta,Ka,bs){var us=Jn(Ka,bs),qs=Un.has(us),Ls=yi?yi(Ka):!0,Za=Qn({prefixCls:Xt,expanded:qs,expandable:Ls,record:Ka,onExpand:Si});return Yi?Me.createElement("span",{onClick:function(fs){return fs.stopPropagation()}},Za):Za}),ko);return co.map(function(ao){return ao===le?Pa:ao})}return _r.filter(function(ao){return ao!==le})},[on,_r,Jn,Un,Qn,Ui]),Ko=Me.useMemo(function(){var ko=vo;return qe&&(ko=qe(ko)),ko.length||(ko=[{render:function(){return null}}]),ko},[qe,vo,Ui]),ua=Me.useMemo(function(){return Ui==="rtl"?dt(dn(Ko)):dn(Ko)},[Ko,Ui,Rr]),oo=zt(ua,Rr),Wo=(0,He.Z)(oo,2),ka=Wo[0],uo=Wo[1];return[Ko,ka,uo]}var vn=nn;function zn(it){var qe,Xt=it.prefixCls,Qt=it.record,mn=it.onExpand,on=it.expanded,Un=it.expandable,Hn="".concat(Xt,"-row-expand-icon");if(!Un)return Me.createElement("span",{className:rt()(Hn,"".concat(Xt,"-row-spaced"))});var Jn=function(Qn){mn(Qt,Qn),Qn.stopPropagation()};return Me.createElement("span",{className:rt()(Hn,(qe={},(0,Ze.Z)(qe,"".concat(Xt,"-row-expanded"),on),(0,Ze.Z)(qe,"".concat(Xt,"-row-collapsed"),!on),qe)),onClick:Jn})}function qn(it,qe,Xt){var Qt=[];function mn(on){(on||[]).forEach(function(Un,Hn){Qt.push(qe(Un,Hn)),mn(Un[Xt])})}return mn(it),Qt}function Ft(it,qe,Xt){var Qt=pi(it),mn=Qt.expandIcon,on=Qt.expandedRowKeys,Un=Qt.defaultExpandedRowKeys,Hn=Qt.defaultExpandAllRows,Jn=Qt.expandedRowRender,Si=Qt.onExpand,Qn=Qt.onExpandedRowsChange,yi=Qt.childrenColumnName,or=mn||zn,Ui=yi||"children",Yi=Me.useMemo(function(){return Jn?"row":it.expandable&&it.internalHooks===Te&&it.expandable.__PARENT_RENDER_ICON__||qe.some(function(ua){return ua&&(0,Xe.Z)(ua)==="object"&&ua[Ui]})?"nest":!1},[!!Jn,qe]),Ur=Me.useState(function(){return Un||(Hn?qn(qe,Xt,Ui):[])}),rr=(0,He.Z)(Ur,2),Rr=rr[0],_r=rr[1],vo=Me.useMemo(function(){return new Set(on||Rr||[])},[on,Rr]),Ko=Me.useCallback(function(ua){var oo=Xt(ua,qe.indexOf(ua)),Wo,ka=vo.has(oo);ka?(vo.delete(oo),Wo=(0,Oi.Z)(vo)):Wo=[].concat((0,Oi.Z)(vo),[oo]),_r(Wo),Si&&Si(!ka,ua),Qn&&Qn(Wo)},[Xt,vo,qe,Si,Qn]);return[Qt,Yi,vo,or,Ui,Ko]}function Bn(it,qe,Xt,Qt){var mn=it.map(function(on,Un){return Ct(Un,Un,it,qe,Xt,Qt==null?void 0:Qt[Un])});return(0,Ot.Z)(function(){return mn},[mn],function(on,Un){return!(0,ct.Z)(on,Un)})}function Kn(it){var qe=(0,Me.useRef)(it),Xt=(0,Me.useState)({}),Qt=(0,He.Z)(Xt,2),mn=Qt[1],on=(0,Me.useRef)(null),Un=(0,Me.useRef)([]);function Hn(Jn){Un.current.push(Jn);var Si=Promise.resolve();on.current=Si,Si.then(function(){if(on.current===Si){var Qn=Un.current,yi=qe.current;Un.current=[],Qn.forEach(function(or){qe.current=or(qe.current)}),on.current=null,yi!==qe.current&&mn({})}})}return(0,Me.useEffect)(function(){return function(){on.current=null}},[]),[qe.current,Hn]}function Ci(it){var qe=(0,Me.useRef)(it||null),Xt=(0,Me.useRef)();function Qt(){window.clearTimeout(Xt.current)}function mn(Un){qe.current=Un,Qt(),Xt.current=window.setTimeout(function(){qe.current=null,Xt.current=void 0},100)}function on(){return qe.current}return(0,Me.useEffect)(function(){return Qt},[]),[mn,on]}function En(){var it=Me.useState(-1),qe=(0,He.Z)(it,2),Xt=qe[0],Qt=qe[1],mn=Me.useState(-1),on=(0,He.Z)(mn,2),Un=on[0],Hn=on[1],Jn=Me.useCallback(function(Si,Qn){Qt(Si),Hn(Qn)},[]);return[Xt,Un,Jn]}var un=me(47273),bn=(0,un.Z)()?window:null;function Ei(it,qe){var Xt=(0,Xe.Z)(it)==="object"?it:{},Qt=Xt.offsetHeader,mn=Qt===void 0?0:Qt,on=Xt.offsetSummary,Un=on===void 0?0:on,Hn=Xt.offsetScroll,Jn=Hn===void 0?0:Hn,Si=Xt.getContainer,Qn=Si===void 0?function(){return bn}:Si,yi=Qn()||bn;return Me.useMemo(function(){var or=!!it;return{isSticky:or,stickyClassName:or?"".concat(qe,"-sticky-holder"):"",offsetHeader:mn,offsetSummary:Un,offsetScroll:Jn,container:yi}},[Jn,mn,Un,qe,yi])}function Ni(it,qe,Xt){var Qt=(0,Me.useMemo)(function(){for(var mn=[],on=[],Un=0,Hn=0,Jn=0;Jn<qe;Jn+=1)if(Xt==="rtl"){on[Jn]=Hn,Hn+=it[Jn]||0;var Si=qe-Jn-1;mn[Si]=Un,Un+=it[Si]||0}else{mn[Jn]=Un,Un+=it[Jn]||0;var Qn=qe-Jn-1;on[Qn]=Hn,Hn+=it[Qn]||0}return{left:mn,right:on}},[it,qe,Xt]);return Qt}var mi=Ni;function Di(it){var qe=it.className,Xt=it.children;return Me.createElement("div",{className:qe},Xt)}var Ai=Di,gr=me(8224),Or=me(55468),Hr=function(qe,Xt){var Qt,mn,on=qe.scrollBodyRef,Un=qe.onScroll,Hn=qe.offsetScroll,Jn=qe.container,Si=Ge(Ne,"prefixCls"),Qn=((Qt=on.current)===null||Qt===void 0?void 0:Qt.scrollWidth)||0,yi=((mn=on.current)===null||mn===void 0?void 0:mn.clientWidth)||0,or=Qn&&yi*(yi/Qn),Ui=Me.useRef(),Yi=Kn({scrollLeft:0,isHiddenScrollBar:!1}),Ur=(0,He.Z)(Yi,2),rr=Ur[0],Rr=Ur[1],_r=Me.useRef({delta:0,x:0}),vo=Me.useState(!1),Ko=(0,He.Z)(vo,2),ua=Ko[0],oo=Ko[1],Wo=function(){oo(!1)},ka=function(Fo){Fo.persist(),_r.current.delta=Fo.pageX-rr.scrollLeft,_r.current.x=0,oo(!0),Fo.preventDefault()},uo=function(Fo){var ta,Sa=Fo||((ta=window)===null||ta===void 0?void 0:ta.event),Pa=Sa.buttons;if(!ua||Pa===0){ua&&oo(!1);return}var ao=_r.current.x+Fo.pageX-_r.current.x-_r.current.delta;ao<=0&&(ao=0),ao+or>=yi&&(ao=yi-or),Un({scrollLeft:ao/yi*(Qn+2)}),_r.current.x=Fo.pageX},ko=function(){if(on.current){var Fo=(0,Or.os)(on.current).top,ta=Fo+on.current.offsetHeight,Sa=Jn===window?document.documentElement.scrollTop+window.innerHeight:(0,Or.os)(Jn).top+Jn.clientHeight;ta-(0,Oe.Z)()<=Sa||Fo>=Sa-Hn?Rr(function(Pa){return(0,lt.Z)((0,lt.Z)({},Pa),{},{isHiddenScrollBar:!0})}):Rr(function(Pa){return(0,lt.Z)((0,lt.Z)({},Pa),{},{isHiddenScrollBar:!1})})}},co=function(Fo){Rr(function(ta){return(0,lt.Z)((0,lt.Z)({},ta),{},{scrollLeft:Fo/Qn*yi||0})})};return Me.useImperativeHandle(Xt,function(){return{setScrollLeft:co}}),Me.useEffect(function(){var Lr=(0,gr.Z)(document.body,"mouseup",Wo,!1),Fo=(0,gr.Z)(document.body,"mousemove",uo,!1);return ko(),function(){Lr.remove(),Fo.remove()}},[or,ua]),Me.useEffect(function(){var Lr=(0,gr.Z)(Jn,"scroll",ko,!1),Fo=(0,gr.Z)(window,"resize",ko,!1);return function(){Lr.remove(),Fo.remove()}},[Jn]),Me.useEffect(function(){rr.isHiddenScrollBar||Rr(function(Lr){var Fo=on.current;return Fo?(0,lt.Z)((0,lt.Z)({},Lr),{},{scrollLeft:Fo.scrollLeft/Fo.scrollWidth*Fo.clientWidth}):Lr})},[rr.isHiddenScrollBar]),Qn<=yi||!or||rr.isHiddenScrollBar?null:Me.createElement("div",{style:{height:(0,Oe.Z)(),width:yi,bottom:Hn},className:"".concat(Si,"-sticky-scroll")},Me.createElement("div",{onMouseDown:ka,ref:Ui,className:rt()("".concat(Si,"-sticky-scroll-bar"),(0,Ze.Z)({},"".concat(Si,"-sticky-scroll-bar-active"),ua)),style:{width:"".concat(or,"px"),transform:"translate3d(".concat(rr.scrollLeft,"px, 0, 0)")}}))},jn=Me.forwardRef(Hr);function Po(it){return null}var Wr=Po;function ro(it){return null}var Mn=ro,ii="rc-table",Hi=[],xr={};function qi(){return"No Data"}function pr(it){var qe,Xt=(0,lt.Z)({rowKey:"key",prefixCls:ii,emptyText:qi},it),Qt=Xt.prefixCls,mn=Xt.className,on=Xt.rowClassName,Un=Xt.style,Hn=Xt.data,Jn=Xt.rowKey,Si=Xt.scroll,Qn=Xt.tableLayout,yi=Xt.direction,or=Xt.title,Ui=Xt.footer,Yi=Xt.summary,Ur=Xt.caption,rr=Xt.id,Rr=Xt.showHeader,_r=Xt.components,vo=Xt.emptyText,Ko=Xt.onRow,ua=Xt.onHeaderRow,oo=Xt.internalHooks,Wo=Xt.transformColumns,ka=Xt.internalRefs,uo=Xt.tailor,ko=Xt.sticky,co=Hn||Hi,Lr=!!co.length,Fo=oo===Te,ta=Me.useCallback(function(gs,Js){return(0,wt.Z)(_r,gs)||Js},[_r]),Sa=Me.useMemo(function(){return typeof Jn=="function"?Jn:function(gs){var Js=gs&&gs[Jn];return Js}},[Jn]),Pa=ta(["body"]),ao=En(),Ta=(0,He.Z)(ao,3),Ka=Ta[0],bs=Ta[1],us=Ta[2],qs=Ft(Xt,co,Sa),Ls=(0,He.Z)(qs,6),Za=Ls[0],aa=Ls[1],fs=Ls[2],el=Ls[3],Ws=Ls[4],cl=Ls[5],ba=Si==null?void 0:Si.x,da=Me.useState(0),wa=(0,He.Z)(da,2),Xo=wa[0],Ps=wa[1],Uo=vn((0,lt.Z)((0,lt.Z)((0,lt.Z)({},Xt),Za),{},{expandable:!!Za.expandedRowRender,columnTitle:Za.columnTitle,expandedKeys:fs,getRowKey:Sa,onTriggerExpand:cl,expandIcon:el,expandIconColumnIndex:Za.expandIconColumnIndex,direction:yi,scrollWidth:Fo&&uo&&typeof ba=="number"?ba:null}),Fo?Wo:null),Ra=(0,He.Z)(Uo,3),ss=Ra[0],cs=Ra[1],Al=Ra[2],bl=Al!=null?Al:ba,Kl=Me.useMemo(function(){return{columns:ss,flattenColumns:cs}},[ss,cs]),Fs=Me.useRef(),Zl=Me.useRef(),dl=Me.useRef(),Fl=Me.useRef(),_c=Me.useRef(),Bs=Me.useState(!1),ks=(0,He.Z)(Bs,2),Ms=ks[0],Gs=ks[1],pl=Me.useState(!1),is=(0,He.Z)(pl,2),js=is[0],Dl=is[1],Ul=Kn(new Map),Gu=(0,He.Z)(Ul,2),Du=Gu[0],ml=Gu[1],Iu=Rt(cs),Ou=Iu.map(function(gs){return Du.get(gs)}),Ns=Me.useMemo(function(){return Ou},[Ou.join("_")]),Hl=mi(Ns,cs.length,yi),$s=Si&&Pn(Si.y),zs=Si&&Pn(bl)||!!Za.fixed,$u=zs&&cs.some(function(gs){var Js=gs.fixed;return Js}),Kc=Me.useRef(),sc=Ei(ko,Qt),lc=sc.isSticky,Vu=sc.offsetHeader,ku=sc.offsetSummary,ws=sc.offsetScroll,Ys=sc.stickyClassName,vl=sc.container,Xs=Me.useMemo(function(){return Yi==null?void 0:Yi(co)},[Yi,co]),ms=($s||lc)&&Me.isValidElement(Xs)&&Xs.type===$e&&Xs.props.fixed,yl,Su,xc;$s&&(Su={overflowY:"scroll",maxHeight:Si.y}),zs&&(yl={overflowX:"auto"},$s||(Su={overflowY:"hidden"}),xc={width:bl===!0?"auto":bl,minWidth:"100%"});var jd=Me.useCallback(function(gs,Js){(0,Pe.Z)(Fs.current)&&ml(function(nu){if(nu.get(gs)!==Js){var uc=new Map(nu);return uc.set(gs,Js),uc}return nu})},[]),hn=Ci(null),sd=(0,He.Z)(hn,2),Bc=sd[0],df=sd[1];function zd(gs,Js){Js&&(typeof Js=="function"?Js(gs):Js.scrollLeft!==gs&&(Js.scrollLeft=gs,Js.scrollLeft!==gs&&setTimeout(function(){Js.scrollLeft=gs},0)))}var Zd=(0,st.Z)(function(gs){var Js=gs.currentTarget,nu=gs.scrollLeft,uc=yi==="rtl",cc=typeof nu=="number"?nu:Js.scrollLeft,$d=Js||xr;if(!df()||df()===$d){var cd;Bc($d),zd(cc,Zl.current),zd(cc,dl.current),zd(cc,_c.current),zd(cc,(cd=Kc.current)===null||cd===void 0?void 0:cd.setScrollLeft)}var vh=Js||Zl.current;if(vh){var Sc=vh.scrollWidth,Yc=vh.clientWidth;if(Sc===Yc){Gs(!1),Dl(!1);return}uc?(Gs(-cc<Sc-Yc),Dl(-cc>0)):(Gs(cc>0),Dl(cc<Sc-Yc))}}),Rh=function(){zs&&dl.current?Zd({currentTarget:dl.current}):(Gs(!1),Dl(!1))},Qg=function(Js){var nu=Js.width;nu!==Xo&&(Rh(),Ps(Fs.current?Fs.current.offsetWidth:nu))},Bl=Me.useRef(!1);Me.useEffect(function(){Bl.current&&Rh()},[zs,Hn,ss.length]),Me.useEffect(function(){Bl.current=!0},[]);var dh=Me.useState(0),Hd=(0,He.Z)(dh,2),hh=Hd[0],hf=Hd[1],Hf=Me.useState(!0),fh=(0,He.Z)(Hf,2),gh=fh[0],Ku=fh[1];Me.useEffect(function(){(!uo||!Fo)&&(dl.current instanceof Element?hf((0,Oe.o)(dl.current).width):hf((0,Oe.o)(Fl.current).width)),Ku((0,ye.G)("position","sticky"))},[]),Me.useEffect(function(){Fo&&ka&&(ka.body.current=dl.current)});var Wd=Me.useCallback(function(gs){return Me.createElement(Me.Fragment,null,Me.createElement(tr,gs),ms==="top"&&Me.createElement(Ht,gs,Xs))},[ms,Xs]),ff=Me.useCallback(function(gs){return Me.createElement(Ht,gs,Xs)},[Xs]),Mc=ta(["table"],"table"),ld=Me.useMemo(function(){return Qn||($u?bl==="max-content"?"auto":"fixed":$s||lc||cs.some(function(gs){var Js=gs.ellipsis;return Js})?"fixed":"auto")},[$s,$u,cs,Qn,lc]),Gd,Bd={colWidths:Ns,columCount:cs.length,stickyOffsets:Hl,onHeaderRow:ua,fixHeader:$s,scroll:Si},Pu=Me.useMemo(function(){return Lr?null:typeof vo=="function"?vo():vo},[Lr,vo]),Md=Me.createElement(Zi,{data:co,measureColumnWidth:$s||zs||lc}),_h=Me.createElement(Gi,{colWidths:cs.map(function(gs){var Js=gs.width;return Js}),columns:cs}),Tu=Ur!=null?Me.createElement("caption",{className:"".concat(Qt,"-caption")},Ur):void 0,Uc=(0,Ke.Z)(Xt,{data:!0}),ph=(0,Ke.Z)(Xt,{aria:!0});if($s||lc){var mh;typeof Pa=="function"?(mh=Pa(co,{scrollbarSize:hh,ref:dl,onScroll:Zd}),Bd.colWidths=cs.map(function(gs,Js){var nu=gs.width,uc=Js===cs.length-1?nu-hh:nu;return typeof uc=="number"&&!Number.isNaN(uc)?uc:0})):mh=Me.createElement("div",{style:(0,lt.Z)((0,lt.Z)({},yl),Su),onScroll:Zd,ref:dl,className:rt()("".concat(Qt,"-body"))},Me.createElement(Mc,(0,ut.Z)({style:(0,lt.Z)((0,lt.Z)({},xc),{},{tableLayout:ld})},ph),Tu,_h,Md,!ms&&Xs&&Me.createElement(Ht,{stickyOffsets:Hl,flattenColumns:cs,columns:ss},Xs)));var ud=(0,lt.Z)((0,lt.Z)((0,lt.Z)({noData:!co.length,maxContentScroll:zs&&bl==="max-content"},Bd),Kl),{},{direction:yi,stickyClassName:Ys,onScroll:Zd});Gd=Me.createElement(Me.Fragment,null,Rr!==!1&&Me.createElement(Fi,(0,ut.Z)({},ud,{stickyTopOffset:Vu,className:"".concat(Qt,"-header"),ref:Zl}),Wd),mh,ms&&ms!=="top"&&Me.createElement(Fi,(0,ut.Z)({},ud,{stickyBottomOffset:ku,className:"".concat(Qt,"-summary"),ref:_c}),ff),lc&&Me.createElement(jn,{ref:Kc,offsetScroll:ws,scrollBodyRef:dl,onScroll:Zd,container:vl}))}else Gd=Me.createElement("div",{style:(0,lt.Z)((0,lt.Z)({},yl),Su),className:rt()("".concat(Qt,"-content")),onScroll:Zd,ref:dl},Me.createElement(Mc,(0,ut.Z)({style:(0,lt.Z)((0,lt.Z)({},xc),{},{tableLayout:ld})},ph),Tu,_h,Rr!==!1&&Me.createElement(tr,(0,ut.Z)({},Bd,Kl)),Md,Xs&&Me.createElement(Ht,{stickyOffsets:Hl,flattenColumns:cs,columns:ss},Xs)));var lu=Me.createElement("div",(0,ut.Z)({className:rt()(Qt,mn,(qe={},(0,Ze.Z)(qe,"".concat(Qt,"-rtl"),yi==="rtl"),(0,Ze.Z)(qe,"".concat(Qt,"-ping-left"),Ms),(0,Ze.Z)(qe,"".concat(Qt,"-ping-right"),js),(0,Ze.Z)(qe,"".concat(Qt,"-layout-fixed"),Qn==="fixed"),(0,Ze.Z)(qe,"".concat(Qt,"-fixed-header"),$s),(0,Ze.Z)(qe,"".concat(Qt,"-fixed-column"),$u),(0,Ze.Z)(qe,"".concat(Qt,"-scroll-horizontal"),zs),(0,Ze.Z)(qe,"".concat(Qt,"-has-fix-left"),cs[0]&&cs[0].fixed),(0,Ze.Z)(qe,"".concat(Qt,"-has-fix-right"),cs[cs.length-1]&&cs[cs.length-1].fixed==="right"),qe)),style:Un,id:rr,ref:Fs},Uc),or&&Me.createElement(Ai,{className:"".concat(Qt,"-title")},or(co)),Me.createElement("div",{ref:Fl,className:"".concat(Qt,"-container")},Gd),Ui&&Me.createElement(Ai,{className:"".concat(Qt,"-footer")},Ui(co)));zs&&(lu=Me.createElement(Re.Z,{onResize:Qg},lu));var jh=Bn(cs,Hl,yi,ss),Ml=Me.useMemo(function(){return{scrollX:bl,prefixCls:Qt,getComponent:ta,scrollbarSize:hh,direction:yi,fixedInfoList:jh,isSticky:lc,supportSticky:gh,componentWidth:Xo,fixHeader:$s,fixColumn:$u,horizonScroll:zs,tableLayout:ld,rowClassName:on,expandedRowClassName:Za.expandedRowClassName,expandIcon:el,expandableType:aa,expandRowByClick:Za.expandRowByClick,expandedRowRender:Za.expandedRowRender,onTriggerExpand:cl,expandIconColumnIndex:Za.expandIconColumnIndex,indentSize:Za.indentSize,allColumnsFixedLeft:cs.every(function(gs){return gs.fixed==="left"}),emptyNode:Pu,columns:ss,flattenColumns:cs,onColumnResize:jd,hoverStartRow:Ka,hoverEndRow:bs,onHover:us,rowExpandable:Za.rowExpandable,onRow:Ko,getRowKey:Sa,expandedKeys:fs,childrenColumnName:Ws}},[bl,Qt,ta,hh,yi,jh,lc,gh,Xo,$s,$u,zs,ld,on,Za.expandedRowClassName,el,aa,Za.expandRowByClick,Za.expandedRowRender,cl,Za.expandIconColumnIndex,Za.indentSize,Pu,ss,cs,jd,Ka,bs,us,Za.rowExpandable,Ko,Sa,fs,Ws]);return Me.createElement(Ne.Provider,{value:Ml},lu)}function Vr(it){return he(pr,it)}var jr=Vr();jr.EXPAND_COLUMN=le,jr.INTERNAL_HOOKS=Te,jr.Column=Wr,jr.ColumnGroup=Mn,jr.Summary=ht;var kr=jr,Kr=me(45680),Yn=Pt(null),Ho=Pt(null);function Xn(it,qe,Xt){var Qt=qe||1;return Xt[it+Qt]-(Xt[it]||0)}function Ao(it){var qe=it.rowInfo,Xt=it.column,Qt=it.colIndex,mn=it.indent,on=it.index,Un=it.renderIndex,Hn=it.record,Jn=it.style,Si=it.className,Qn=it.inverse,yi=it.getHeight,or=Xt.render,Ui=Xt.dataIndex,Yi=Xt.className,Ur=Xt.width,rr=Ge(Ho,["columnsOffset"]),Rr=rr.columnsOffset,_r=wn(qe,Xt,Qt,mn,on),vo=_r.key,Ko=_r.fixedInfo,ua=_r.appendCellNode,oo=_r.additionalCellProps,Wo=oo.style,ka=oo.colSpan,uo=ka===void 0?1:ka,ko=oo.rowSpan,co=ko===void 0?1:ko,Lr=Qt-1,Fo=Xn(Lr,uo,Rr),ta=uo>1?Ur-Fo:0,Sa=(0,lt.Z)((0,lt.Z)((0,lt.Z)({},Wo),Jn),{},{flex:"0 0 ".concat(Fo,"px"),width:"".concat(Fo,"px"),marginRight:ta,pointerEvents:"auto"}),Pa=Me.useMemo(function(){return Qn?co<=1:uo===0||co===0||co>1},[co,uo,Qn]);Pa?Sa.visibility="hidden":Qn&&(Sa.height=yi==null?void 0:yi(co));var ao=Pa?function(){return null}:or,Ta={};return(co===0||uo===0)&&(Ta.rowSpan=1,Ta.colSpan=1),Me.createElement(Zn,(0,ut.Z)({className:rt()(Yi,Si),ellipsis:Xt.ellipsis,align:Xt.align,scope:Xt.rowScope,component:"div",prefixCls:qe.prefixCls,key:vo,record:Hn,index:on,renderIndex:Un,dataIndex:Ui,render:ao,shouldCellUpdate:Xt.shouldCellUpdate},Ko,{appendNode:ua,additionalProps:(0,lt.Z)((0,lt.Z)({},oo),{},{style:Sa},Ta)}))}var Qo=Ao,nr=["data","index","className","rowKey","style","extra","getHeight"],qo=Me.forwardRef(function(it,qe){var Xt=it.data,Qt=it.index,mn=it.className,on=it.rowKey,Un=it.style,Hn=it.extra,Jn=it.getHeight,Si=(0,ln.Z)(it,nr),Qn=Xt.record,yi=Xt.indent,or=Xt.index,Ui=Ge(Ne,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Yi=Ui.scrollX,Ur=Ui.flattenColumns,rr=Ui.prefixCls,Rr=Ui.fixColumn,_r=Ui.componentWidth,vo=en(Qn,on,Qt,yi),Ko=vo.rowSupportExpand,ua=vo.expanded,oo=vo.rowProps,Wo=vo.expandedRowRender,ka=vo.expandedRowClassName,uo;if(Ko&&ua){var ko=Wo(Qn,Qt,yi+1,ua),co=ka==null?void 0:ka(Qn,Qt,yi),Lr={};Rr&&(Lr={style:(0,Ze.Z)({},"--virtual-width","".concat(_r,"px"))});var Fo="".concat(rr,"-expanded-row-cell");uo=Me.createElement("div",{className:rt()("".concat(rr,"-expanded-row"),"".concat(rr,"-expanded-row-level-").concat(yi+1),co)},Me.createElement(Zn,{component:"div",prefixCls:rr,className:rt()(Fo,(0,Ze.Z)({},"".concat(Fo,"-fixed"),Rr)),additionalProps:Lr},ko))}var ta=(0,lt.Z)((0,lt.Z)({},Un),{},{width:Yi});Hn&&(ta.position="absolute",ta.pointerEvents="none");var Sa=Me.createElement("div",(0,ut.Z)({},oo,Si,{ref:Ko?null:qe,className:rt()(mn,"".concat(rr,"-row"),oo==null?void 0:oo.className,(0,Ze.Z)({},"".concat(rr,"-row-extra"),Hn)),style:(0,lt.Z)((0,lt.Z)({},ta),oo==null?void 0:oo.style)}),Ur.map(function(Pa,ao){return Me.createElement(Qo,{key:ao,rowInfo:vo,column:Pa,colIndex:ao,indent:yi,index:Qt,renderIndex:or,record:Qn,inverse:Hn,getHeight:Jn})}));return Ko?Me.createElement("div",{ref:qe},Sa,uo):Sa}),Go=ve(qo),Br=Go,Er=Me.forwardRef(function(it,qe){var Xt=it.data,Qt=it.onScroll,mn=Ge(Ne,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),on=mn.flattenColumns,Un=mn.onColumnResize,Hn=mn.getRowKey,Jn=mn.expandedKeys,Si=mn.prefixCls,Qn=mn.childrenColumnName,yi=mn.emptyNode,or=mn.scrollX,Ui=Ge(Yn),Yi=Ui.scrollY,Ur=Ui.listItemHeight,rr=Me.useRef(),Rr=Et(Xt,Qn,Jn,Hn),_r=Me.useMemo(function(){var uo=0;return on.map(function(ko){var co=ko.width,Lr=ko.key;return uo+=co,[Lr,co,uo]})},[on]),vo=Me.useMemo(function(){return _r.map(function(uo){return uo[2]})},[_r]);Me.useEffect(function(){_r.forEach(function(uo){var ko=(0,He.Z)(uo,2),co=ko[0],Lr=ko[1];Un(co,Lr)})},[_r]),Me.useImperativeHandle(qe,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 Lr;(Lr=rr.current)===null||Lr===void 0||Lr.scrollTo({left:co})}}),uo});var Ko=function(ko,co){var Lr,Fo=(Lr=Rr[co])===null||Lr===void 0?void 0:Lr.record,ta=ko.onCell;if(ta){var Sa,Pa=ta(Fo,co);return(Sa=Pa==null?void 0:Pa.rowSpan)!==null&&Sa!==void 0?Sa:1}return 1},ua=function(ko){var co=ko.start,Lr=ko.end,Fo=ko.getSize,ta=ko.offsetY;if(Lr<0)return null;for(var Sa=on.filter(function(ba){return Ko(ba,co)===0}),Pa=co,ao=function(da){if(Sa=Sa.filter(function(wa){return Ko(wa,da)===0}),!Sa.length)return Pa=da,"break"},Ta=co;Ta>=0;Ta-=1){var Ka=ao(Ta);if(Ka==="break")break}for(var bs=on.filter(function(ba){return Ko(ba,Lr)!==1}),us=Lr,qs=function(da){if(bs=bs.filter(function(wa){return Ko(wa,da)!==1}),!bs.length)return us=Math.max(da-1,Lr),"break"},Ls=Lr;Ls<Rr.length;Ls+=1){var Za=qs(Ls);if(Za==="break")break}for(var aa=[],fs=function(da){var wa=Rr[da];if(!wa)return"continue";on.some(function(Xo){return Ko(Xo,da)>1})&&aa.push(da)},el=Pa;el<=us;el+=1)var Ws=fs(el);var cl=aa.map(function(ba){var da=Rr[ba],wa=Hn(da.record,ba),Xo=function(Ra){var ss=ba+Ra-1,cs=Hn(Rr[ss].record,ss),Al=Fo(wa,cs);return Al.bottom-Al.top},Ps=Fo(wa);return Me.createElement(Br,{key:ba,data:da,rowKey:wa,index:ba,style:{top:-ta+Ps.top},extra:!0,getHeight:Xo})});return cl},oo=Me.useMemo(function(){return{columnsOffset:vo}},[vo]),Wo="".concat(Si,"-tbody"),ka;return Rr.length?ka=Me.createElement(Kr.Z,{fullHeight:!1,ref:rr,className:rt()(Wo,"".concat(Wo,"-virtual")),height:Yi,itemHeight:Ur||24,data:Rr,itemKey:function(ko){return Hn(ko.record)},scrollWidth:or,onVirtualScroll:function(ko){var co=ko.x;Qt({scrollLeft:co})},extraRender:ua},function(uo,ko,co){var Lr=Hn(uo.record,ko);return Me.createElement(Br,(0,ut.Z)({data:uo,rowKey:Lr,index:ko},co))}):ka=Me.createElement("div",{className:rt()("".concat(Si,"-placeholder"))},Me.createElement(Zn,{component:"div",prefixCls:Si},yi)),Me.createElement(Ho.Provider,{value:oo},ka)}),mo=ve(Er),Yo=mo,Ki=function(qe,Xt){var Qt=Xt.ref,mn=Xt.onScroll;return Me.createElement(Yo,{ref:Qt,data:qe,onScroll:mn})},ot=100;function sa(it){var qe=it.columns,Xt=it.scroll,Qt=it.prefixCls,mn=Qt===void 0?ii:Qt,on=it.className,Un=it.listItemHeight,Hn=Xt||{},Jn=Hn.x,Si=Hn.y;typeof Jn!="number"&&(Jn=((qe||[]).length+1)*ot),typeof Si!="number"&&(Si=500);var Qn=Me.useMemo(function(){return{scrollY:Si,listItemHeight:Un}},[Si,Un]);return Me.createElement(Yn.Provider,{value:Qn},Me.createElement(kr,(0,ut.Z)({},it,{className:rt()(on,"".concat(mn,"-virtual")),scroll:(0,lt.Z)((0,lt.Z)({},Xt),{},{x:Jn}),components:{body:Ki},columns:qe,internalHooks:Te,tailor:!0})))}function va(it){return he(sa,it)}var Ma=va(),hs=null;function Ga(it){return null}var Lo=Ga;function po(it){return null}var la=po,Eo=me(2738),Na=me(68031),os=me(36355),xo=me(93891),Yr=me(19716),vi=me(8628),no=me(31724),io=me(58421),Ja=me(71418),Ca=me(88088);function fa(it){return function(Xt){let{prefixCls:Qt,onExpand:mn,record:on,expanded:Un,expandable:Hn}=Xt;const Jn=`${Qt}-row-expand-icon`;return Me.createElement("button",{type:"button",onClick:Si=>{mn(on,Si),Si.stopPropagation()},className:rt()(Jn,{[`${Jn}-spaced`]:!Hn,[`${Jn}-expanded`]:Hn&&Un,[`${Jn}-collapsed`]:Hn&&!Un}),"aria-label":Un?it.collapse:it.expand,"aria-expanded":Un})}}var $a=fa;function Qa(it,qe){return"key"in it&&it.key!==void 0&&it.key!==null?it.key:it.dataIndex?Array.isArray(it.dataIndex)?it.dataIndex.join("."):it.dataIndex:qe}function Es(it,qe){return qe?`${qe}-${it}`:`${it}`}function ys(it,qe){return typeof it=="function"?it(qe):it}function Zs(it,qe){const Xt=ys(it,qe);return Object.prototype.toString.call(Xt)==="[object Object]"?"":Xt}var Dn={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"},Ss=Dn,ra=me(7657),hl=function(qe,Xt){return Me.createElement(ra.Z,(0,ut.Z)({},qe,{ref:Xt,icon:Ss}))},Ol=Me.forwardRef(hl),ns=Ol,yu=me(56762);function eu(it){const qe=Me.useRef(it),Xt=(0,yu.Z)();return[()=>qe.current,Qt=>{qe.current=Qt,Xt()}]}var ps=me(3113),Ba=me(24905),tu=me(38854),Do=me(64165),Ea=me(20834),ca=me(40875),dr=me(5112),Rs=me(17574),ls=me(47472),sl=me(92832);function jl(it){let{value:qe,onChange:Xt,filterSearch:Qt,tablePrefixCls:mn,locale:on}=it;return Qt?Me.createElement("div",{className:`${mn}-filter-dropdown-search`},Me.createElement(sl.default,{prefix:Me.createElement(ls.Z,null),placeholder:on.filterSearchPlaceholder,onChange:Xt,value:qe,htmlSize:1,className:`${mn}-filter-dropdown-search-input`})):null}var ou=jl,Ji=me(10228);const Cs=it=>{const{keyCode:qe}=it;qe===Ji.Z.ENTER&&it.stopPropagation()};var $l=Me.forwardRef((it,qe)=>Me.createElement("div",{className:it.className,onClick:Xt=>Xt.stopPropagation(),onKeyDown:Cs,ref:qe},it.children));function kl(it){let qe=[];return(it||[]).forEach(Xt=>{let{value:Qt,children:mn}=Xt;qe.push(Qt),mn&&(qe=[].concat((0,Oi.Z)(qe),(0,Oi.Z)(kl(mn))))}),qe}function Vl(it){return it.some(qe=>{let{children:Xt}=qe;return Xt})}function Oo(it,qe){return typeof qe=="string"||typeof qe=="number"?qe==null?void 0:qe.toString().toLowerCase().includes(it.trim().toLowerCase()):!1}function ic(it){let{filters:qe,prefixCls:Xt,filteredKeys:Qt,filterMultiple:mn,searchValue:on,filterSearch:Un}=it;return qe.map((Hn,Jn)=>{const Si=String(Hn.value);if(Hn.children)return{key:Si||Jn,label:Hn.text,popupClassName:`${Xt}-dropdown-submenu`,children:ic({filters:Hn.children,prefixCls:Xt,filteredKeys:Qt,filterMultiple:mn,searchValue:on,filterSearch:Un})};const Qn=mn?Ba.default:dr.ZP,yi={key:Hn.value!==void 0?Si:Jn,label:Me.createElement(Me.Fragment,null,Me.createElement(Qn,{checked:Qt.includes(Si)}),Me.createElement("span",null,Hn.text))};return on.trim()?typeof Un=="function"?Un(on,Hn)?yi:null:Oo(on,Hn.text)?yi:null:yi})}function zl(it){var qe,Xt;const{tablePrefixCls:Qt,prefixCls:mn,column:on,dropdownPrefixCls:Un,columnKey:Hn,filterMultiple:Jn,filterMode:Si="menu",filterSearch:Qn=!1,filterState:yi,triggerFilter:or,locale:Ui,children:Yi,getPopupContainer:Ur}=it,{filterDropdownOpen:rr,onFilterDropdownOpenChange:Rr,filterResetToDefaultFilteredValue:_r,defaultFilteredValue:vo,filterDropdownVisible:Ko,onFilterDropdownVisibleChange:ua}=on,[oo,Wo]=Me.useState(!1),ka=!!(yi&&(!((qe=yi.filteredKeys)===null||qe===void 0)&&qe.length||yi.forceFiltered)),uo=Uo=>{Wo(Uo),Rr==null||Rr(Uo),ua==null||ua(Uo)},ko=(Xt=rr!=null?rr:Ko)!==null&&Xt!==void 0?Xt:oo,co=yi==null?void 0:yi.filteredKeys,[Lr,Fo]=eu(co||[]),ta=Uo=>{let{selectedKeys:Ra}=Uo;Fo(Ra)},Sa=(Uo,Ra)=>{let{node:ss,checked:cs}=Ra;ta(Jn?{selectedKeys:Uo}:{selectedKeys:cs&&ss.key?[ss.key]:[]})};Me.useEffect(()=>{oo&&ta({selectedKeys:co||[]})},[co]);const[Pa,ao]=Me.useState([]),Ta=Uo=>{ao(Uo)},[Ka,bs]=Me.useState(""),us=Uo=>{const{value:Ra}=Uo.target;bs(Ra)};Me.useEffect(()=>{oo||bs("")},[oo]);const qs=Uo=>{const Ra=Uo&&Uo.length?Uo:null;if(Ra===null&&(!yi||!yi.filteredKeys)||(0,ct.Z)(Ra,yi==null?void 0:yi.filteredKeys,!0))return null;or({column:on,key:Hn,filteredKeys:Ra})},Ls=()=>{uo(!1),qs(Lr())},Za=function(){let{confirm:Uo,closeDropdown:Ra}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Uo&&qs([]),Ra&&uo(!1),bs(""),Fo(_r?(vo||[]).map(ss=>String(ss)):[])},aa=function(){let{closeDropdown:Uo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Uo&&uo(!1),qs(Lr())},fs=Uo=>{Uo&&co!==void 0&&Fo(co||[]),uo(Uo),!Uo&&!on.filterDropdown&&Ls()},el=rt()({[`${Un}-menu-without-submenu`]:!Vl(on.filters||[])}),Ws=Uo=>{if(Uo.target.checked){const Ra=kl(on==null?void 0:on.filters).map(ss=>String(ss));Fo(Ra)}else Fo([])},cl=Uo=>{let{filters:Ra}=Uo;return(Ra||[]).map((ss,cs)=>{const Al=String(ss.value),bl={title:ss.text,key:ss.value!==void 0?Al:cs};return ss.children&&(bl.children=cl({filters:ss.children})),bl})},ba=Uo=>{var Ra;return Object.assign(Object.assign({},Uo),{text:Uo.title,value:Uo.key,children:((Ra=Uo.children)===null||Ra===void 0?void 0:Ra.map(ss=>ba(ss)))||[]})};let da;if(typeof on.filterDropdown=="function")da=on.filterDropdown({prefixCls:`${Un}-custom`,setSelectedKeys:Uo=>ta({selectedKeys:Uo}),selectedKeys:Lr(),confirm:aa,clearFilters:Za,filters:on.filters,visible:ko,close:()=>{uo(!1)}});else if(on.filterDropdown)da=on.filterDropdown;else{const Uo=Lr()||[],Ra=()=>(on.filters||[]).length===0?Me.createElement(Do.Z,{image:Do.Z.PRESENTED_IMAGE_SIMPLE,description:Ui.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Si==="tree"?Me.createElement(Me.Fragment,null,Me.createElement(ou,{filterSearch:Qn,value:Ka,onChange:us,tablePrefixCls:Qt,locale:Ui}),Me.createElement("div",{className:`${Qt}-filter-dropdown-tree`},Jn?Me.createElement(Ba.default,{checked:Uo.length===kl(on.filters).length,indeterminate:Uo.length>0&&Uo.length<kl(on.filters).length,className:`${Qt}-filter-dropdown-checkall`,onChange:Ws},Ui.filterCheckall):null,Me.createElement(Rs.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Jn,checkStrictly:!Jn,className:`${Un}-menu`,onCheck:Sa,checkedKeys:Uo,selectedKeys:Uo,showIcon:!1,treeData:cl({filters:on.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Ka.trim()?cs=>typeof Qn=="function"?Qn(Ka,ba(cs)):Oo(Ka,cs.title):void 0}))):Me.createElement(Me.Fragment,null,Me.createElement(ou,{filterSearch:Qn,value:Ka,onChange:us,tablePrefixCls:Qt,locale:Ui}),Me.createElement(Ea.default,{selectable:!0,multiple:Jn,prefixCls:`${Un}-menu`,className:el,onSelect:ta,onDeselect:ta,selectedKeys:Uo,getPopupContainer:Ur,openKeys:Pa,onOpenChange:Ta,items:ic({filters:on.filters||[],filterSearch:Qn,prefixCls:mn,filteredKeys:Lr(),filterMultiple:Jn,searchValue:Ka})})),ss=()=>_r?(0,ct.Z)((vo||[]).map(cs=>String(cs)),Uo,!0):Uo.length===0;da=Me.createElement(Me.Fragment,null,Ra(),Me.createElement("div",{className:`${mn}-dropdown-btns`},Me.createElement(ps.ZP,{type:"link",size:"small",disabled:ss(),onClick:()=>Za()},Ui.filterReset),Me.createElement(ps.ZP,{type:"primary",size:"small",onClick:Ls},Ui.filterConfirm)))}on.filterDropdown&&(da=Me.createElement(ca.J,{selectable:void 0},da));const wa=()=>Me.createElement($l,{className:`${mn}-dropdown`},da);let Xo;typeof on.filterIcon=="function"?Xo=on.filterIcon(ka):on.filterIcon?Xo=on.filterIcon:Xo=Me.createElement(ns,null);const{direction:Ps}=Me.useContext(os.E_);return Me.createElement("div",{className:`${mn}-column`},Me.createElement("span",{className:`${Qt}-column-title`},Yi),Me.createElement(tu.Z,{dropdownRender:wa,trigger:["click"],open:ko,onOpenChange:fs,getPopupContainer:Ur,placement:Ps==="rtl"?"bottomLeft":"bottomRight"},Me.createElement("span",{role:"button",tabIndex:-1,className:rt()(`${mn}-trigger`,{active:ka}),onClick:Uo=>{Uo.stopPropagation()}},Xo)))}var Ln=zl;function On(it,qe,Xt){let Qt=[];return(it||[]).forEach((mn,on)=>{var Un;const Hn=Es(on,Xt);if(mn.filters||"filterDropdown"in mn||"onFilter"in mn)if("filteredValue"in mn){let Jn=mn.filteredValue;"filterDropdown"in mn||(Jn=(Un=Jn==null?void 0:Jn.map(String))!==null&&Un!==void 0?Un:Jn),Qt.push({column:mn,key:Qa(mn,Hn),filteredKeys:Jn,forceFiltered:mn.filtered})}else Qt.push({column:mn,key:Qa(mn,Hn),filteredKeys:qe&&mn.defaultFilteredValue?mn.defaultFilteredValue:void 0,forceFiltered:mn.filtered});"children"in mn&&(Qt=[].concat((0,Oi.Z)(Qt),(0,Oi.Z)(On(mn.children,qe,Hn))))}),Qt}function ai(it,qe,Xt,Qt,mn,on,Un,Hn){return Xt.map((Jn,Si)=>{const Qn=Es(Si,Hn),{filterMultiple:yi=!0,filterMode:or,filterSearch:Ui}=Jn;let Yi=Jn;if(Yi.filters||Yi.filterDropdown){const Ur=Qa(Yi,Qn),rr=Qt.find(Rr=>{let{key:_r}=Rr;return Ur===_r});Yi=Object.assign(Object.assign({},Yi),{title:Rr=>Me.createElement(Ln,{tablePrefixCls:it,prefixCls:`${it}-filter`,dropdownPrefixCls:qe,column:Yi,columnKey:Ur,filterState:rr,filterMultiple:yi,filterMode:or,filterSearch:Ui,triggerFilter:on,locale:mn,getPopupContainer:Un},ys(Jn.title,Rr))})}return"children"in Yi&&(Yi=Object.assign(Object.assign({},Yi),{children:ai(it,qe,Yi.children,Qt,mn,on,Un,Qn)})),Yi})}function Qi(it){const qe={};return it.forEach(Xt=>{let{key:Qt,filteredKeys:mn,column:on}=Xt;const{filters:Un,filterDropdown:Hn}=on;if(Hn)qe[Qt]=mn||null;else if(Array.isArray(mn)){const Jn=kl(Un);qe[Qt]=Jn.filter(Si=>mn.includes(String(Si)))}else qe[Qt]=null}),qe}function Vi(it,qe){return qe.reduce((Xt,Qt)=>{const{column:{onFilter:mn,filters:on},filteredKeys:Un}=Qt;return mn&&Un&&Un.length?Xt.filter(Hn=>Un.some(Jn=>{const Si=kl(on),Qn=Si.findIndex(or=>String(or)===String(Jn)),yi=Qn!==-1?Si[Qn]:Jn;return mn(yi,Hn)})):Xt},it)}const Ri=it=>it.flatMap(qe=>"children"in qe?[qe].concat((0,Oi.Z)(Ri(qe.children||[]))):[qe]);function _i(it){let{prefixCls:qe,dropdownPrefixCls:Xt,mergedColumns:Qt,onFilterChange:mn,getPopupContainer:on,locale:Un}=it;const Hn=Me.useMemo(()=>Ri(Qt||[]),[Qt]),[Jn,Si]=Me.useState(()=>On(Hn,!0)),Qn=Me.useMemo(()=>{const Yi=On(Hn,!1);if(Yi.length===0)return Yi;let Ur=!0,rr=!0;if(Yi.forEach(Rr=>{let{filteredKeys:_r}=Rr;_r!==void 0?Ur=!1:rr=!1}),Ur){const Rr=(Hn||[]).map((_r,vo)=>Qa(_r,Es(vo)));return Jn.filter(_r=>{let{key:vo}=_r;return Rr.includes(vo)}).map(_r=>{const vo=Hn[Rr.findIndex(Ko=>Ko===_r.key)];return Object.assign(Object.assign({},_r),{column:Object.assign(Object.assign({},_r.column),vo),forceFiltered:vo.filtered})})}return Yi},[Hn,Jn]),yi=Me.useMemo(()=>Qi(Qn),[Qn]),or=Yi=>{const Ur=Qn.filter(rr=>{let{key:Rr}=rr;return Rr!==Yi.key});Ur.push(Yi),Si(Ur),mn(Qi(Ur),Ur)};return[Yi=>ai(qe,Xt,Yi,Qn,Un,or,on),Qn,yi]}var oi=_i;function Li(it,qe,Xt){const Qt=Me.useRef({});function mn(on){if(!Qt.current||Qt.current.data!==it||Qt.current.childrenColumnName!==qe||Qt.current.getRowKey!==Xt){let Hn=function(Jn){Jn.forEach((Si,Qn)=>{const yi=Xt(Si,Qn);Un.set(yi,Si),Si&&typeof Si=="object"&&qe in Si&&Hn(Si[qe]||[])})};const Un=new Map;Hn(it),Qt.current={data:it,childrenColumnName:qe,kvMap:Un,getRowKey:Xt}}return Qt.current.kvMap.get(on)}return[mn]}var ur=me(50371),zr=function(it,qe){var Xt={};for(var Qt in it)Object.prototype.hasOwnProperty.call(it,Qt)&&qe.indexOf(Qt)<0&&(Xt[Qt]=it[Qt]);if(it!=null&&typeof Object.getOwnPropertySymbols=="function")for(var mn=0,Qt=Object.getOwnPropertySymbols(it);mn<Qt.length;mn++)qe.indexOf(Qt[mn])<0&&Object.prototype.propertyIsEnumerable.call(it,Qt[mn])&&(Xt[Qt[mn]]=it[Qt[mn]]);return Xt};const ga=10;function $o(it,qe){const Xt={current:it.current,pageSize:it.pageSize};return Object.keys(qe&&typeof qe=="object"?qe:{}).forEach(mn=>{const on=it[mn];typeof on!="function"&&(Xt[mn]=on)}),Xt}function Ua(it,qe,Xt){const Qt=Xt&&typeof Xt=="object"?Xt:{},{total:mn=0}=Qt,on=zr(Qt,["total"]),[Un,Hn]=(0,Me.useState)(()=>({current:"defaultCurrent"in on?on.defaultCurrent:1,pageSize:"defaultPageSize"in on?on.defaultPageSize:ga})),Jn=(0,ur.Z)(Un,on,{total:mn>0?mn:it}),Si=Math.ceil((mn||it)/Jn.pageSize);Jn.current>Si&&(Jn.current=Si||1);const Qn=(or,Ui)=>{Hn({current:or!=null?or:1,pageSize:Ui||Jn.pageSize})},yi=(or,Ui)=>{var Yi;Xt&&((Yi=Xt.onChange)===null||Yi===void 0||Yi.call(Xt,or,Ui)),Qn(or,Ui),qe(or,Ui||(Jn==null?void 0:Jn.pageSize))};return Xt===!1?[{},()=>{}]:[Object.assign(Object.assign({},Jn),{onChange:yi}),Qn]}var Va=Ua,No=me(84105),Xr=me(35654),Bi=me(90782),Jr=me(71430),Vo=me(18929);const ma={},ya="SELECT_ALL",bo="SELECT_INVERT",oa="SELECT_NONE",Io=[],Ar=(it,qe)=>{let Xt=[];return(qe||[]).forEach(Qt=>{Xt.push(Qt),Qt&&typeof Qt=="object"&&it in Qt&&(Xt=[].concat((0,Oi.Z)(Xt),(0,Oi.Z)(Ar(it,Qt[it]))))}),Xt};var Ha=(it,qe)=>{const{preserveSelectedRowKeys:Xt,selectedRowKeys:Qt,defaultSelectedRowKeys:mn,getCheckboxProps:on,onChange:Un,onSelect:Hn,onSelectAll:Jn,onSelectInvert:Si,onSelectNone:Qn,onSelectMultiple:yi,columnWidth:or,type:Ui,selections:Yi,fixed:Ur,renderCell:rr,hideSelectAll:Rr,checkStrictly:_r=!0}=qe||{},{prefixCls:vo,data:Ko,pageData:ua,getRecordByKey:oo,getRowKey:Wo,expandType:ka,childrenColumnName:uo,locale:ko,getPopupContainer:co}=it,[Lr,Fo]=(0,Vo.Z)(Qt||mn||Io,{value:Qt}),ta=Me.useRef(new Map),Sa=(0,Me.useCallback)(ba=>{if(Xt){const da=new Map;ba.forEach(wa=>{let Xo=oo(wa);!Xo&&ta.current.has(wa)&&(Xo=ta.current.get(wa)),da.set(wa,Xo)}),ta.current=da}},[oo,Xt]);Me.useEffect(()=>{Sa(Lr)},[Lr]);const{keyEntities:Pa}=(0,Me.useMemo)(()=>{if(_r)return{keyEntities:null};let ba=Ko;if(Xt){const da=new Set(Ko.map((Xo,Ps)=>Wo(Xo,Ps))),wa=Array.from(ta.current).reduce((Xo,Ps)=>{let[Uo,Ra]=Ps;return da.has(Uo)?Xo:Xo.concat(Ra)},[]);ba=[].concat((0,Oi.Z)(ba),(0,Oi.Z)(wa))}return(0,Jr.I8)(ba,{externalGetKey:Wo,childrenPropName:uo})},[Ko,Wo,_r,uo,Xt]),ao=(0,Me.useMemo)(()=>Ar(uo,ua),[uo,ua]),Ta=(0,Me.useMemo)(()=>{const ba=new Map;return ao.forEach((da,wa)=>{const Xo=Wo(da,wa),Ps=(on?on(da):null)||{};ba.set(Xo,Ps)}),ba},[ao,Wo,on]),Ka=(0,Me.useCallback)(ba=>{var da;return!!(!((da=Ta.get(Wo(ba)))===null||da===void 0)&&da.disabled)},[Ta,Wo]),[bs,us]=(0,Me.useMemo)(()=>{if(_r)return[Lr||[],[]];const{checkedKeys:ba,halfCheckedKeys:da}=(0,Bi.S)(Lr,!0,Pa,Ka);return[ba||[],da]},[Lr,_r,Pa,Ka]),qs=(0,Me.useMemo)(()=>{const ba=Ui==="radio"?bs.slice(0,1):bs;return new Set(ba)},[bs,Ui]),Ls=(0,Me.useMemo)(()=>Ui==="radio"?new Set:new Set(us),[us,Ui]),[Za,aa]=(0,Me.useState)(null);Me.useEffect(()=>{qe||Fo(Io)},[!!qe]);const fs=(0,Me.useCallback)((ba,da)=>{let wa,Xo;Sa(ba),Xt?(wa=ba,Xo=ba.map(Ps=>ta.current.get(Ps))):(wa=[],Xo=[],ba.forEach(Ps=>{const Uo=oo(Ps);Uo!==void 0&&(wa.push(Ps),Xo.push(Uo))})),Fo(wa),Un==null||Un(wa,Xo,{type:da})},[Fo,oo,Un,Xt]),el=(0,Me.useCallback)((ba,da,wa,Xo)=>{if(Hn){const Ps=wa.map(Uo=>oo(Uo));Hn(oo(ba),da,Ps,Xo)}fs(wa,"single")},[Hn,oo,fs]),Ws=(0,Me.useMemo)(()=>!Yi||Rr?null:(Yi===!0?[ya,bo,oa]:Yi).map(da=>da===ya?{key:"all",text:ko.selectionAll,onSelect(){fs(Ko.map((wa,Xo)=>Wo(wa,Xo)).filter(wa=>{const Xo=Ta.get(wa);return!(Xo!=null&&Xo.disabled)||qs.has(wa)}),"all")}}:da===bo?{key:"invert",text:ko.selectInvert,onSelect(){const wa=new Set(qs);ua.forEach((Ps,Uo)=>{const Ra=Wo(Ps,Uo),ss=Ta.get(Ra);ss!=null&&ss.disabled||(wa.has(Ra)?wa.delete(Ra):wa.add(Ra))});const Xo=Array.from(wa);Si&&Si(Xo),fs(Xo,"invert")}}:da===oa?{key:"none",text:ko.selectNone,onSelect(){Qn==null||Qn(),fs(Array.from(qs).filter(wa=>{const Xo=Ta.get(wa);return Xo==null?void 0:Xo.disabled}),"none")}}:da).map(da=>Object.assign(Object.assign({},da),{onSelect:function(){for(var wa,Xo,Ps=arguments.length,Uo=new Array(Ps),Ra=0;Ra<Ps;Ra++)Uo[Ra]=arguments[Ra];(Xo=da.onSelect)===null||Xo===void 0||(wa=Xo).call.apply(wa,[da].concat(Uo)),aa(null)}})),[Yi,qs,ua,Wo,Si,fs]);return[(0,Me.useCallback)(ba=>{var da;if(!qe)return ba.filter(Bs=>Bs!==ma);let wa=(0,Oi.Z)(ba);const Xo=new Set(qs),Ps=ao.map(Wo).filter(Bs=>!Ta.get(Bs).disabled),Uo=Ps.every(Bs=>Xo.has(Bs)),Ra=Ps.some(Bs=>Xo.has(Bs)),ss=()=>{const Bs=[];Uo?Ps.forEach(Ms=>{Xo.delete(Ms),Bs.push(Ms)}):Ps.forEach(Ms=>{Xo.has(Ms)||(Xo.add(Ms),Bs.push(Ms))});const ks=Array.from(Xo);Jn==null||Jn(!Uo,ks.map(Ms=>oo(Ms)),Bs.map(Ms=>oo(Ms))),fs(ks,"all"),aa(null)};let cs;if(Ui!=="radio"){let Bs;if(Ws){const is={getPopupContainer:co,items:Ws.map((js,Dl)=>{const{key:Ul,text:Gu,onSelect:Du}=js;return{key:Ul!=null?Ul:Dl,onClick:()=>{Du==null||Du(Ps)},label:Gu}})};Bs=Me.createElement("div",{className:`${vo}-selection-extra`},Me.createElement(tu.Z,{menu:is,getPopupContainer:co},Me.createElement("span",null,Me.createElement(No.Z,null))))}const ks=ao.map((is,js)=>{const Dl=Wo(is,js),Ul=Ta.get(Dl)||{};return Object.assign({checked:Xo.has(Dl)},Ul)}).filter(is=>{let{disabled:js}=is;return js}),Ms=!!ks.length&&ks.length===ao.length,Gs=Ms&&ks.every(is=>{let{checked:js}=is;return js}),pl=Ms&&ks.some(is=>{let{checked:js}=is;return js});cs=!Rr&&Me.createElement("div",{className:`${vo}-selection`},Me.createElement(Ba.default,{checked:Ms?Gs:!!ao.length&&Uo,indeterminate:Ms?!Gs&&pl:!Uo&&Ra,onChange:ss,disabled:ao.length===0||Ms,"aria-label":Bs?"Custom selection":"Select all",skipGroup:!0}),Bs)}let Al;Ui==="radio"?Al=(Bs,ks,Ms)=>{const Gs=Wo(ks,Ms),pl=Xo.has(Gs);return{node:Me.createElement(dr.ZP,Object.assign({},Ta.get(Gs),{checked:pl,onClick:is=>is.stopPropagation(),onChange:is=>{Xo.has(Gs)||el(Gs,!0,[Gs],is.nativeEvent)}})),checked:pl}}:Al=(Bs,ks,Ms)=>{var Gs;const pl=Wo(ks,Ms),is=Xo.has(pl),js=Ls.has(pl),Dl=Ta.get(pl);let Ul;return ka==="nest"?Ul=js:Ul=(Gs=Dl==null?void 0:Dl.indeterminate)!==null&&Gs!==void 0?Gs:js,{node:Me.createElement(Ba.default,Object.assign({},Dl,{indeterminate:Ul,checked:is,skipGroup:!0,onClick:Gu=>Gu.stopPropagation(),onChange:Gu=>{let{nativeEvent:Du}=Gu;const{shiftKey:ml}=Du;let Iu=-1,Ou=-1;if(ml&&_r){const Ns=new Set([Za,pl]);Ps.some((Hl,$s)=>{if(Ns.has(Hl))if(Iu===-1)Iu=$s;else return Ou=$s,!0;return!1})}if(Ou!==-1&&Iu!==Ou&&_r){const Ns=Ps.slice(Iu,Ou+1),Hl=[];is?Ns.forEach(zs=>{Xo.has(zs)&&(Hl.push(zs),Xo.delete(zs))}):Ns.forEach(zs=>{Xo.has(zs)||(Hl.push(zs),Xo.add(zs))});const $s=Array.from(Xo);yi==null||yi(!is,$s.map(zs=>oo(zs)),Hl.map(zs=>oo(zs))),fs($s,"multiple")}else{const Ns=bs;if(_r){const Hl=is?(0,Xr._5)(Ns,pl):(0,Xr.L0)(Ns,pl);el(pl,!is,Hl,Du)}else{const Hl=(0,Bi.S)([].concat((0,Oi.Z)(Ns),[pl]),!0,Pa,Ka),{checkedKeys:$s,halfCheckedKeys:zs}=Hl;let $u=$s;if(is){const Kc=new Set($s);Kc.delete(pl),$u=(0,Bi.S)(Array.from(Kc),{checked:!1,halfCheckedKeys:zs},Pa,Ka).checkedKeys}el(pl,!is,$u,Du)}}aa(is?null:pl)}})),checked:is}};const bl=(Bs,ks,Ms)=>{const{node:Gs,checked:pl}=Al(Bs,ks,Ms);return rr?rr(pl,ks,Ms,Gs):Gs};if(!wa.includes(ma))if(wa.findIndex(Bs=>{var ks;return((ks=Bs[Nr])===null||ks===void 0?void 0:ks.columnType)==="EXPAND_COLUMN"})===0){const[Bs,...ks]=wa;wa=[Bs,ma].concat((0,Oi.Z)(ks))}else wa=[ma].concat((0,Oi.Z)(wa));const Kl=wa.indexOf(ma);wa=wa.filter((Bs,ks)=>Bs!==ma||ks===Kl);const Fs=wa[Kl-1],Zl=wa[Kl+1];let dl=Ur;dl===void 0&&((Zl==null?void 0:Zl.fixed)!==void 0?dl=Zl.fixed:(Fs==null?void 0:Fs.fixed)!==void 0&&(dl=Fs.fixed)),dl&&Fs&&((da=Fs[Nr])===null||da===void 0?void 0:da.columnType)==="EXPAND_COLUMN"&&Fs.fixed===void 0&&(Fs.fixed=dl);const Fl=rt()(`${vo}-selection-col`,{[`${vo}-selection-col-with-dropdown`]:Yi&&Ui==="checkbox"}),_c={fixed:dl,width:or,className:`${vo}-selection-column`,title:qe.columnTitle||cs,render:bl,onCell:qe.onCell,[Nr]:{className:Fl}};return wa.map(Bs=>Bs===ma?_c:Bs)},[Wo,ao,qe,bs,qs,Ls,or,Ws,ka,Za,Ta,yi,el,Ka]),qs]},La=me(89489),fl=me(59477),xu=me(6848);const tn="ascend",Jt="descend";function Tn(it){return typeof it.sorter=="object"&&typeof it.sorter.multiple=="number"?it.sorter.multiple:!1}function tt(it){return typeof it=="function"?it:it&&typeof it=="object"&&it.compare?it.compare:!1}function rn(it,qe){return qe?it[it.indexOf(qe)+1]:it[0]}function sr(it,qe,Xt){let Qt=[];function mn(on,Un){Qt.push({column:on,key:Qa(on,Un),multiplePriority:Tn(on),sortOrder:on.sortOrder})}return(it||[]).forEach((on,Un)=>{const Hn=Es(Un,Xt);on.children?("sortOrder"in on&&mn(on,Hn),Qt=[].concat((0,Oi.Z)(Qt),(0,Oi.Z)(sr(on.children,qe,Hn)))):on.sorter&&("sortOrder"in on?mn(on,Hn):qe&&on.defaultSortOrder&&Qt.push({column:on,key:Qa(on,Hn),multiplePriority:Tn(on),sortOrder:on.defaultSortOrder}))}),Qt}function Dr(it,qe,Xt,Qt,mn,on,Un,Hn){return(qe||[]).map((Jn,Si)=>{const Qn=Es(Si,Hn);let yi=Jn;if(yi.sorter){const or=yi.sortDirections||mn,Ui=yi.showSorterTooltip===void 0?Un:yi.showSorterTooltip,Yi=Qa(yi,Qn),Ur=Xt.find(ka=>{let{key:uo}=ka;return uo===Yi}),rr=Ur?Ur.sortOrder:null,Rr=rn(or,rr);let _r;if(Jn.sortIcon)_r=Jn.sortIcon({sortOrder:rr});else{const ka=or.includes(tn)&&Me.createElement(fl.Z,{className:rt()(`${it}-column-sorter-up`,{active:rr===tn})}),uo=or.includes(Jt)&&Me.createElement(La.Z,{className:rt()(`${it}-column-sorter-down`,{active:rr===Jt})});_r=Me.createElement("span",{className:rt()(`${it}-column-sorter`,{[`${it}-column-sorter-full`]:!!(ka&&uo)})},Me.createElement("span",{className:`${it}-column-sorter-inner`,"aria-hidden":"true"},ka,uo))}const{cancelSort:vo,triggerAsc:Ko,triggerDesc:ua}=on||{};let oo=vo;Rr===Jt?oo=ua:Rr===tn&&(oo=Ko);const Wo=typeof Ui=="object"?Ui:{title:oo};yi=Object.assign(Object.assign({},yi),{className:rt()(yi.className,{[`${it}-column-sort`]:rr}),title:ka=>{const uo=Me.createElement("div",{className:`${it}-column-sorters`},Me.createElement("span",{className:`${it}-column-title`},ys(Jn.title,ka)),_r);return Ui?Me.createElement(xu.Z,Object.assign({},Wo),uo):uo},onHeaderCell:ka=>{const uo=Jn.onHeaderCell&&Jn.onHeaderCell(ka)||{},ko=uo.onClick,co=uo.onKeyDown;uo.onClick=ta=>{Qt({column:Jn,key:Yi,sortOrder:Rr,multiplePriority:Tn(Jn)}),ko==null||ko(ta)},uo.onKeyDown=ta=>{ta.keyCode===Ji.Z.ENTER&&(Qt({column:Jn,key:Yi,sortOrder:Rr,multiplePriority:Tn(Jn)}),co==null||co(ta))};const Lr=Zs(Jn.title,{}),Fo=Lr==null?void 0:Lr.toString();return rr?uo["aria-sort"]=rr==="ascend"?"ascending":"descending":uo["aria-label"]=Fo||"",uo.className=rt()(uo.className,`${it}-column-has-sorters`),uo.tabIndex=0,Jn.ellipsis&&(uo.title=(Lr!=null?Lr:"").toString()),uo}})}return"children"in yi&&(yi=Object.assign(Object.assign({},yi),{children:Dr(it,yi.children,Xt,Qt,mn,on,Un,Qn)})),yi})}function vr(it){const{column:qe,sortOrder:Xt}=it;return{column:qe,order:Xt,field:qe.dataIndex,columnKey:qe.key}}function lr(it){const qe=it.filter(Xt=>{let{sortOrder:Qt}=Xt;return Qt}).map(vr);return qe.length===0&&it.length?Object.assign(Object.assign({},vr(it[it.length-1])),{column:void 0}):qe.length<=1?qe[0]||{}:qe}function Mi(it,qe,Xt){const Qt=qe.slice().sort((Un,Hn)=>Hn.multiplePriority-Un.multiplePriority),mn=it.slice(),on=Qt.filter(Un=>{let{column:{sorter:Hn},sortOrder:Jn}=Un;return tt(Hn)&&Jn});return on.length?mn.sort((Un,Hn)=>{for(let Jn=0;Jn<on.length;Jn+=1){const Si=on[Jn],{column:{sorter:Qn},sortOrder:yi}=Si,or=tt(Qn);if(or&&yi){const Ui=or(Un,Hn,yi);if(Ui!==0)return yi===tn?Ui:-Ui}}return 0}).map(Un=>{const Hn=Un[Xt];return Hn?Object.assign(Object.assign({},Un),{[Xt]:Mi(Hn,qe,Xt)}):Un}):mn}function Pr(it){let{prefixCls:qe,mergedColumns:Xt,onSorterChange:Qt,sortDirections:mn,tableLocale:on,showSorterTooltip:Un}=it;const[Hn,Jn]=Me.useState(sr(Xt,!0)),Si=Me.useMemo(()=>{let Yi=!0;const Ur=sr(Xt,!1);if(!Ur.length)return Hn;const rr=[];function Rr(vo){Yi?rr.push(vo):rr.push(Object.assign(Object.assign({},vo),{sortOrder:null}))}let _r=null;return Ur.forEach(vo=>{_r===null?(Rr(vo),vo.sortOrder&&(vo.multiplePriority===!1?Yi=!1:_r=!0)):(_r&&vo.multiplePriority!==!1||(Yi=!1),Rr(vo))}),rr},[Xt,Hn]),Qn=Me.useMemo(()=>{const Yi=Si.map(Ur=>{let{column:rr,sortOrder:Rr}=Ur;return{column:rr,order:Rr}});return{sortColumns:Yi,sortColumn:Yi[0]&&Yi[0].column,sortOrder:Yi[0]&&Yi[0].order}},[Si]);function yi(Yi){let Ur;Yi.multiplePriority===!1||!Si.length||Si[0].multiplePriority===!1?Ur=[Yi]:Ur=[].concat((0,Oi.Z)(Si.filter(rr=>{let{key:Rr}=rr;return Rr!==Yi.key})),[Yi]),Jn(Ur),Qt(lr(Ur),Ur)}return[Yi=>Dr(qe,Yi,Si,yi,mn,on,Un),Si,Qn,()=>lr(Si)]}function Qr(it,qe){return it.map(Xt=>{const Qt=Object.assign({},Xt);return Qt.title=ys(Xt.title,qe),"children"in Qt&&(Qt.children=Qr(Qt.children,qe)),Qt})}function So(it){return[Me.useCallback(Xt=>Qr(Xt,it),[it])]}var hr=Vr((it,qe)=>{const{_renderTimes:Xt}=it,{_renderTimes:Qt}=qe;return Xt!==Qt}),mr=va((it,qe)=>{const{_renderTimes:Xt}=it,{_renderTimes:Qt}=qe;return Xt!==Qt}),yr=me(64993),ji=me(17313),ki=me(83116),Zr=me(37613),br=it=>{const{componentCls:qe}=it,Xt=`${it.lineWidth}px ${it.lineType} ${it.tableBorderColor}`,Qt=(mn,on,Un)=>({[`&${qe}-${mn}`]:{[`> ${qe}-container`]:{[`> ${qe}-content, > ${qe}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${qe}-expanded-row-fixed`]:{margin:`-${on}px -${Un+it.lineWidth}px`}}}}}});return{[`${qe}-wrapper`]:{[`${qe}${qe}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${qe}-title`]:{border:Xt,borderBottom:0},[`> ${qe}-container`]:{borderInlineStart:Xt,borderTop:Xt,[`
> ${qe}-content,
> ${qe}-header,
> ${qe}-body,
> ${qe}-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:Xt},"> thead":{"> tr:not(:last-child) > th":{borderBottom:Xt},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${qe}-cell-fix-right-first::after`]:{borderInlineEnd:Xt}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${qe}-expanded-row-fixed`]:{margin:`-${it.tablePaddingVertical}px -${it.tablePaddingHorizontal+it.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:it.lineWidth,bottom:0,borderInlineEnd:Xt,content:'""'}}}}}},[`&${qe}-scroll-horizontal`]:{[`> ${qe}-container > ${qe}-body`]:{"> table > tbody":{[`
> tr${qe}-expanded-row,
> tr${qe}-placeholder
`]:{"> th, > td":{borderInlineEnd:0}}}}}},Qt("middle",it.tablePaddingVerticalMiddle,it.tablePaddingHorizontalMiddle)),Qt("small",it.tablePaddingVerticalSmall,it.tablePaddingHorizontalSmall)),{[`> ${qe}-footer`]:{border:Xt,borderTop:0}}),[`${qe}-cell`]:{[`${qe}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${it.lineWidth}px 0 ${it.lineWidth}px ${it.tableHeaderBg}`}},[`${qe}-bordered ${qe}-cell-scrollbar`]:{borderInlineEnd:Xt}}}},Ir=it=>{const{componentCls:qe}=it;return{[`${qe}-wrapper`]:{[`${qe}-cell-ellipsis`]:Object.assign(Object.assign({},ji.vS),{wordBreak:"keep-all",[`
&${qe}-cell-fix-left-last,
&${qe}-cell-fix-right-first
`]:{overflow:"visible",[`${qe}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${qe}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},fr=it=>{const{componentCls:qe}=it;return{[`${qe}-wrapper`]:{[`${qe}-tbody > tr${qe}-placeholder`]:{textAlign:"center",color:it.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:it.colorBgContainer}}}}},Aa=me(15969),xa=it=>{const{componentCls:qe,antCls:Xt,controlInteractiveSize:Qt,motionDurationSlow:mn,lineWidth:on,paddingXS:Un,lineType:Hn,tableBorderColor:Jn,tableExpandIconBg:Si,tableExpandColumnWidth:Qn,borderRadius:yi,fontSize:or,fontSizeSM:Ui,lineHeight:Yi,tablePaddingVertical:Ur,tablePaddingHorizontal:rr,tableExpandedRowBg:Rr,paddingXXS:_r}=it,vo=Qt/2-on,Ko=vo*2+on*3,ua=`${on}px ${Hn} ${Jn}`,oo=_r-on;return{[`${qe}-wrapper`]:{[`${qe}-expand-icon-col`]:{width:Qn},[`${qe}-row-expand-icon-cell`]:{textAlign:"center",[`${qe}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${qe}-row-indent`]:{height:1,float:"left"},[`${qe}-row-expand-icon`]:Object.assign(Object.assign({},(0,Aa.N)(it)),{position:"relative",float:"left",boxSizing:"border-box",width:Ko,height:Ko,padding:0,color:"inherit",lineHeight:`${Ko}px`,background:Si,border:ua,borderRadius:yi,transform:`scale(${Qt/Ko})`,transition:`all ${mn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${mn} ease-out`,content:'""'},"&::before":{top:vo,insetInlineEnd:oo,insetInlineStart:oo,height:on},"&::after":{top:oo,bottom:oo,insetInlineStart:vo,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"}}),[`${qe}-row-indent + ${qe}-row-expand-icon`]:{marginTop:(or*Yi-on*3)/2-Math.ceil((Ui*1.4-on*3)/2),marginInlineEnd:Un},[`tr${qe}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:Rr}},[`${Xt}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${qe}-expanded-row-fixed`]:{position:"relative",margin:`-${Ur}px -${rr}px`,padding:`${Ur}px ${rr}px`}}}},wo=it=>{const{componentCls:qe,antCls:Xt,iconCls:Qt,tableFilterDropdownWidth:mn,tableFilterDropdownSearchWidth:on,paddingXXS:Un,paddingXS:Hn,colorText:Jn,lineWidth:Si,lineType:Qn,tableBorderColor:yi,tableHeaderIconColor:or,fontSizeSM:Ui,tablePaddingHorizontal:Yi,borderRadius:Ur,motionDurationSlow:rr,colorTextDescription:Rr,colorPrimary:_r,tableHeaderFilterActiveBg:vo,colorTextDisabled:Ko,tableFilterDropdownBg:ua,tableFilterDropdownHeight:oo,controlItemBgHover:Wo,controlItemBgActive:ka,boxShadowSecondary:uo,filterDropdownMenuBg:ko}=it,co=`${Xt}-dropdown`,Lr=`${qe}-filter-dropdown`,Fo=`${Xt}-tree`,ta=`${Si}px ${Qn} ${yi}`;return[{[`${qe}-wrapper`]:{[`${qe}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${qe}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-Un,marginInline:`${Un}px ${-Yi/2}px`,padding:`0 ${Un}px`,color:or,fontSize:Ui,borderRadius:Ur,cursor:"pointer",transition:`all ${rr}`,"&:hover":{color:Rr,background:vo},"&.active":{color:_r}}}},{[`${Xt}-dropdown`]:{[Lr]:Object.assign(Object.assign({},(0,ji.Wf)(it)),{minWidth:mn,backgroundColor:ua,borderRadius:Ur,boxShadow:uo,overflow:"hidden",[`${co}-menu`]:{maxHeight:oo,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:ko,"&:empty::after":{display:"block",padding:`${Hn}px 0`,color:Ko,fontSize:Ui,textAlign:"center",content:'"Not Found"'}},[`${Lr}-tree`]:{paddingBlock:`${Hn}px 0`,paddingInline:Hn,[Fo]:{padding:0},[`${Fo}-treenode ${Fo}-node-content-wrapper:hover`]:{backgroundColor:Wo},[`${Fo}-treenode-checkbox-checked ${Fo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:ka}}},[`${Lr}-search`]:{padding:Hn,borderBottom:ta,"&-input":{input:{minWidth:on},[Qt]:{color:Ko}}},[`${Lr}-checkall`]:{width:"100%",marginBottom:Un,marginInlineStart:Un},[`${Lr}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Hn-Si}px ${Hn}px`,overflow:"hidden",borderTop:ta}})}},{[`${Xt}-dropdown ${Lr}, ${Lr}-submenu`]:{[`${Xt}-checkbox-wrapper + span`]:{paddingInlineStart:Hn,color:Jn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},El=it=>{const{componentCls:qe,lineWidth:Xt,colorSplit:Qt,motionDurationSlow:mn,zIndexTableFixed:on,tableBg:Un,zIndexTableSticky:Hn}=it,Jn=Qt;return{[`${qe}-wrapper`]:{[`
${qe}-cell-fix-left,
${qe}-cell-fix-right
`]:{position:"sticky !important",zIndex:on,background:Un},[`
${qe}-cell-fix-left-first::after,
${qe}-cell-fix-left-last::after
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-Xt,width:30,transform:"translateX(100%)",transition:`box-shadow ${mn}`,content:'""',pointerEvents:"none"},[`${qe}-cell-fix-left-all::after`]:{display:"none"},[`
${qe}-cell-fix-right-first::after,
${qe}-cell-fix-right-last::after
`]:{position:"absolute",top:0,bottom:-Xt,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${mn}`,content:'""',pointerEvents:"none"},[`${qe}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:Hn+1,width:30,transition:`box-shadow ${mn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${qe}-ping-left`]:{[`&:not(${qe}-has-fix-left) ${qe}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Jn}`}},[`
${qe}-cell-fix-left-first::after,
${qe}-cell-fix-left-last::after
`]:{boxShadow:`inset 10px 0 8px -8px ${Jn}`},[`${qe}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${qe}-ping-right`]:{[`&:not(${qe}-has-fix-right) ${qe}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Jn}`}},[`
${qe}-cell-fix-right-first::after,
${qe}-cell-fix-right-last::after
`]:{boxShadow:`inset -10px 0 8px -8px ${Jn}`}}}}},_s=it=>{const{componentCls:qe,antCls:Xt}=it;return{[`${qe}-wrapper`]:{[`${qe}-pagination${Xt}-pagination`]:{margin:`${it.margin}px 0`},[`${qe}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:it.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Hs=it=>{const{componentCls:qe,tableRadius:Xt}=it;return{[`${qe}-wrapper`]:{[qe]:{[`${qe}-title, ${qe}-header`]:{borderRadius:`${Xt}px ${Xt}px 0 0`},[`${qe}-title + ${qe}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${qe}-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:Xt,borderStartEndRadius:Xt,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:Xt},"> *:last-child":{borderStartEndRadius:Xt}}},"&-footer":{borderRadius:`0 0 ${Xt}px ${Xt}px`}}}}},rc=it=>{const{componentCls:qe}=it;return{[`${qe}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${qe}-pagination-left`]:{justifyContent:"flex-end"},[`${qe}-pagination-right`]:{justifyContent:"flex-start"},[`${qe}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${qe}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${qe}-row-indent`]:{float:"right"}}}}},Tc=it=>{const{componentCls:qe,antCls:Xt,iconCls:Qt,fontSizeIcon:mn,padding:on,paddingXS:Un,tableHeaderIconColor:Hn,tableHeaderIconColorHover:Jn,tableSelectionColumnWidth:Si}=it;return{[`${qe}-wrapper`]:{[`${qe}-selection-col`]:{width:Si,[`&${qe}-selection-col-with-dropdown`]:{width:Si+mn+on/4}},[`${qe}-bordered ${qe}-selection-col`]:{width:Si+Un*2,[`&${qe}-selection-col-with-dropdown`]:{width:Si+mn+on/4+Un*2}},[`
table tr th${qe}-selection-column,
table tr td${qe}-selection-column
`]:{paddingInlineEnd:it.paddingXS,paddingInlineStart:it.paddingXS,textAlign:"center",[`${Xt}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${qe}-selection-column${qe}-cell-fix-left`]:{zIndex:it.zIndexTableFixed+1},[`table tr th${qe}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${qe}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${qe}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${it.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${it.tablePaddingHorizontal/4}px`,[Qt]:{color:Hn,fontSize:mn,verticalAlign:"baseline","&:hover":{color:Jn}}}}}},vc=it=>{const{componentCls:qe}=it,Xt=(Qt,mn,on,Un)=>({[`${qe}${qe}-${Qt}`]:{fontSize:Un,[`
${qe}-title,
${qe}-footer,
${qe}-cell,
${qe}-thead > tr > th,
${qe}-tbody > tr > th,
${qe}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{padding:`${mn}px ${on}px`},[`${qe}-filter-trigger`]:{marginInlineEnd:`-${on/2}px`},[`${qe}-expanded-row-fixed`]:{margin:`-${mn}px -${on}px`},[`${qe}-tbody`]:{[`${qe}-wrapper:only-child ${qe}`]:{marginBlock:`-${mn}px`,marginInline:`${it.tableExpandColumnWidth-on}px -${on}px`}},[`${qe}-selection-column`]:{paddingInlineStart:`${on/4}px`}}});return{[`${qe}-wrapper`]:Object.assign(Object.assign({},Xt("middle",it.tablePaddingVerticalMiddle,it.tablePaddingHorizontalMiddle,it.tableFontSizeMiddle)),Xt("small",it.tablePaddingVerticalSmall,it.tablePaddingHorizontalSmall,it.tableFontSizeSmall))}},du=it=>{const{componentCls:qe,marginXXS:Xt,fontSizeIcon:Qt,tableHeaderIconColor:mn,tableHeaderIconColorHover:on}=it;return{[`${qe}-wrapper`]:{[`${qe}-thead th${qe}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${it.motionDurationSlow}`,"&:hover":{background:it.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:it.colorPrimary},[`
&${qe}-cell-fix-left:hover,
&${qe}-cell-fix-right:hover
`]:{background:it.tableFixedHeaderSortActiveBg}},[`${qe}-thead th${qe}-column-sort`]:{background:it.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${qe}-column-sort`]:{background:it.tableBodySortBg},[`${qe}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${qe}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${qe}-column-sorter`]:{marginInlineStart:Xt,color:mn,fontSize:0,transition:`color ${it.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Qt,"&.active":{color:it.colorPrimary}},[`${qe}-column-sorter-up + ${qe}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${qe}-column-sorters:hover ${qe}-column-sorter`]:{color:on}}}},ac=it=>{const{componentCls:qe,opacityLoading:Xt,tableScrollThumbBg:Qt,tableScrollThumbBgHover:mn,tableScrollThumbSize:on,tableScrollBg:Un,zIndexTableSticky:Hn,stickyScrollBarBorderRadius:Jn}=it,Si=`${it.lineWidth}px ${it.lineType} ${it.tableBorderColor}`;return{[`${qe}-wrapper`]:{[`${qe}-sticky`]:{"&-holder":{position:"sticky",zIndex:Hn,background:it.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${on}px !important`,zIndex:Hn,display:"flex",alignItems:"center",background:Un,borderTop:Si,opacity:Xt,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:on,backgroundColor:Qt,borderRadius:Jn,transition:`all ${it.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:mn}}}}}}},au=it=>{const{componentCls:qe,lineWidth:Xt,tableBorderColor:Qt}=it,mn=`${Xt}px ${it.lineType} ${Qt}`;return{[`${qe}-wrapper`]:{[`${qe}-summary`]:{position:"relative",zIndex:it.zIndexTableFixed,background:it.tableBg,"> tr":{"> th, > td":{borderBottom:mn}}},[`div${qe}-summary`]:{boxShadow:`0 -${Xt}px 0 ${Qt}`}}}},Wu=it=>{const{componentCls:qe}=it,Xt=`${it.lineWidth}px ${it.lineType} ${it.tableBorderColor}`,Qt=`${qe}-expanded-row-cell`;return{[`${qe}-wrapper`]:{[`${qe}-tbody-virtual`]:{[`${qe}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${qe}-cell`]:{borderBottom:Xt},[`${qe}-expanded-row`]:{[`${Qt}${Qt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${it.lineWidth}px)`,borderInlineEnd:"none"}}},[`${qe}-bordered`]:{[`${qe}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:Xt,position:"absolute"},[`${qe}-cell`]:{borderInlineEnd:Xt,[`&${qe}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-it.lineWidth,borderInlineStart:Xt}}}}}}};const Au=it=>{const{componentCls:qe,fontWeightStrong:Xt,tablePaddingVertical:Qt,tablePaddingHorizontal:mn,lineWidth:on,lineType:Un,tableBorderColor:Hn,tableFontSize:Jn,tableBg:Si,tableRadius:Qn,tableHeaderTextColor:yi,motionDurationMid:or,tableHeaderBg:Ui,tableHeaderCellSplitColor:Yi,tableRowHoverBg:Ur,tableSelectedRowBg:rr,tableSelectedRowHoverBg:Rr,tableFooterTextColor:_r,tableFooterBg:vo,paddingContentVerticalLG:Ko}=it,ua=`${on}px ${Un} ${Hn}`;return{[`${qe}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,ji.dF)()),{[qe]:Object.assign(Object.assign({},(0,ji.Wf)(it)),{fontSize:Jn,background:Si,borderRadius:`${Qn}px ${Qn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Qn}px ${Qn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
${qe}-cell,
${qe}-thead > tr > th,
${qe}-tbody > tr > th,
${qe}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{position:"relative",padding:`${Ko}px ${mn}px`,overflowWrap:"break-word"},[`${qe}-title`]:{padding:`${Qt}px ${mn}px`},[`${qe}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:yi,fontWeight:Xt,textAlign:"start",background:Ui,borderBottom:ua,transition:`background ${or} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${qe}-selection-column):not(${qe}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Yi,transform:"translateY(-50%)",transition:`background-color ${or}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${qe}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${or}, border-color ${or}`,borderBottom:ua,[`
> ${qe}-wrapper:only-child,
> ${qe}-expanded-row-fixed > ${qe}-wrapper:only-child
`]:{[qe]:{marginBlock:`-${Qt}px`,marginInline:`${it.tableExpandColumnWidth-mn}px -${mn}px`,[`${qe}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:yi,fontWeight:Xt,textAlign:"start",background:Ui,borderBottom:ua,transition:`background ${or} ease`},[`
&${qe}-row:hover > th,
&${qe}-row:hover > td,
> th${qe}-cell-row-hover,
> td${qe}-cell-row-hover
`]:{background:Ur},[`&${qe}-row-selected`]:{"> th, > td":{background:rr},"&:hover > th, &:hover > td":{background:Rr}}}},[`${qe}-footer`]:{padding:`${Qt}px ${mn}px`,color:_r,background:vo}})}};var yc=(0,ki.Z)("Table",it=>{const{colorTextHeading:qe,colorSplit:Xt,colorIcon:Qt,colorIconHover:mn,opacityLoading:on,colorBgContainer:Un,controlInteractiveSize:Hn,headerBg:Jn,headerColor:Si,headerSortActiveBg:Qn,headerSortHoverBg:yi,bodySortBg:or,rowHoverBg:Ui,rowSelectedBg:Yi,rowSelectedHoverBg:Ur,rowExpandedBg:rr,cellPaddingBlock:Rr,cellPaddingInline:_r,cellPaddingBlockMD:vo,cellPaddingInlineMD:Ko,cellPaddingBlockSM:ua,cellPaddingInlineSM:oo,borderColor:Wo,footerBg:ka,footerColor:uo,headerBorderRadius:ko,cellFontSize:co,cellFontSizeMD:Lr,cellFontSizeSM:Fo,headerSplitColor:ta,fixedHeaderSortActiveBg:Sa,headerFilterHoverBg:Pa,filterDropdownBg:ao,expandIconBg:Ta,selectionColumnWidth:Ka,stickyScrollBarBg:bs}=it,us=new yr.C(Qt),qs=new yr.C(mn),Ls=2,Za=(0,Zr.TS)(it,{tableFontSize:co,tableBg:Un,tableRadius:ko,tablePaddingVertical:Rr,tablePaddingHorizontal:_r,tablePaddingVerticalMiddle:vo,tablePaddingHorizontalMiddle:Ko,tablePaddingVerticalSmall:ua,tablePaddingHorizontalSmall:oo,tableBorderColor:Wo,tableHeaderTextColor:Si,tableHeaderBg:Jn,tableFooterTextColor:uo,tableFooterBg:ka,tableHeaderCellSplitColor:ta,tableHeaderSortBg:Qn,tableHeaderSortHoverBg:yi,tableHeaderIconColor:us.clone().setAlpha(us.getAlpha()*on).toRgbString(),tableHeaderIconColorHover:qs.clone().setAlpha(qs.getAlpha()*on).toRgbString(),tableBodySortBg:or,tableFixedHeaderSortActiveBg:Sa,tableHeaderFilterActiveBg:Pa,tableFilterDropdownBg:ao,tableRowHoverBg:Ui,tableSelectedRowBg:Yi,tableSelectedRowHoverBg:Ur,zIndexTableFixed:Ls,zIndexTableSticky:Ls+1,tableFontSizeMiddle:Lr,tableFontSizeSmall:Fo,tableSelectionColumnWidth:Ka,tableExpandIconBg:Ta,tableExpandColumnWidth:Hn+2*it.padding,tableExpandedRowBg:rr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:bs,tableScrollThumbBgHover:qe,tableScrollBg:Xt});return[Au(Za),_s(Za),au(Za),du(Za),wo(Za),br(Za),Hs(Za),xa(Za),au(Za),fr(Za),Tc(Za),El(Za),ac(Za),Ir(Za),vc(Za),rc(Za),Wu(Za)]},it=>{const{colorFillAlter:qe,colorBgContainer:Xt,colorTextHeading:Qt,colorFillSecondary:mn,colorFillContent:on,controlItemBgActive:Un,controlItemBgActiveHover:Hn,padding:Jn,paddingSM:Si,paddingXS:Qn,colorBorderSecondary:yi,borderRadiusLG:or,fontSize:Ui,controlHeight:Yi,colorTextPlaceholder:Ur}=it,rr=new yr.C(mn).onBackground(Xt).toHexShortString(),Rr=new yr.C(on).onBackground(Xt).toHexShortString(),_r=new yr.C(qe).onBackground(Xt).toHexShortString();return{headerBg:_r,headerColor:Qt,headerSortActiveBg:rr,headerSortHoverBg:Rr,bodySortBg:_r,rowHoverBg:_r,rowSelectedBg:Un,rowSelectedHoverBg:Hn,rowExpandedBg:qe,cellPaddingBlock:Jn,cellPaddingInline:Jn,cellPaddingBlockMD:Si,cellPaddingInlineMD:Qn,cellPaddingBlockSM:Qn,cellPaddingInlineSM:Qn,borderColor:yi,headerBorderRadius:or,footerBg:_r,footerColor:Qt,cellFontSize:Ui,cellFontSizeMD:Ui,cellFontSizeSM:Ui,headerSplitColor:yi,fixedHeaderSortActiveBg:rr,headerFilterHoverBg:on,filterDropdownMenuBg:Xt,filterDropdownBg:Xt,expandIconBg:Xt,selectionColumnWidth:Yi,stickyScrollBarBg:Ur,stickyScrollBarBorderRadius:100}});const bd=[],_d=(it,qe)=>{const{prefixCls:Xt,className:Qt,rootClassName:mn,style:on,size:Un,bordered:Hn,dropdownPrefixCls:Jn,dataSource:Si,pagination:Qn,rowSelection:yi,rowKey:or="key",rowClassName:Ui,columns:Yi,children:Ur,childrenColumnName:rr,onChange:Rr,getPopupContainer:_r,loading:vo,expandIcon:Ko,expandable:ua,expandedRowRender:oo,expandIconColumnIndex:Wo,indentSize:ka,scroll:uo,sortDirections:ko,locale:co,showSorterTooltip:Lr=!0,virtual:Fo}=it,ta=Me.useMemo(()=>Yi||an(Ur),[Yi,Ur]),Sa=Me.useMemo(()=>ta.some(ws=>ws.responsive),[ta]),Pa=(0,vi.Z)(Sa),ao=Me.useMemo(()=>{const ws=new Set(Object.keys(Pa).filter(Ys=>Pa[Ys]));return ta.filter(Ys=>!Ys.responsive||Ys.responsive.some(vl=>ws.has(vl)))},[ta,Pa]),Ta=(0,Eo.Z)(it,["className","style","columns"]),{locale:Ka=no.Z,direction:bs,table:us,renderEmpty:qs,getPrefixCls:Ls,getPopupContainer:Za}=Me.useContext(os.E_),aa=(0,Yr.Z)(Un),fs=Object.assign(Object.assign({},Ka.Table),co),el=Si||bd,Ws=Ls("table",Xt),cl=Ls("dropdown",Jn),ba=Object.assign({childrenColumnName:rr,expandIconColumnIndex:Wo},ua),{childrenColumnName:da="children"}=ba,wa=Me.useMemo(()=>el.some(ws=>ws==null?void 0:ws[da])?"nest":oo||ua&&ua.expandedRowRender?"row":null,[el]),Xo={body:Me.useRef()},Ps=Me.useMemo(()=>typeof or=="function"?or:ws=>ws==null?void 0:ws[or],[or]),[Uo]=Li(el,da,Ps),Ra={},ss=function(ws,Ys){let vl=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Xs,ms,yl;const Su=Object.assign(Object.assign({},Ra),ws);vl&&((Xs=Ra.resetPagination)===null||Xs===void 0||Xs.call(Ra),!((ms=Su.pagination)===null||ms===void 0)&&ms.current&&(Su.pagination.current=1),Qn&&Qn.onChange&&Qn.onChange(1,(yl=Su.pagination)===null||yl===void 0?void 0:yl.pageSize)),uo&&uo.scrollToFirstRowOnChange!==!1&&Xo.body.current&&(0,Na.Z)(0,{getContainer:()=>Xo.body.current}),Rr==null||Rr(Su.pagination,Su.filters,Su.sorter,{currentDataSource:Vi(Mi(el,Su.sorterStates,da),Su.filterStates),action:Ys})},cs=(ws,Ys)=>{ss({sorter:ws,sorterStates:Ys},"sort",!1)},[Al,bl,Kl,Fs]=Pr({prefixCls:Ws,mergedColumns:ao,onSorterChange:cs,sortDirections:ko||["ascend","descend"],tableLocale:fs,showSorterTooltip:Lr}),Zl=Me.useMemo(()=>Mi(el,bl,da),[el,bl]);Ra.sorter=Fs(),Ra.sorterStates=bl;const dl=(ws,Ys)=>{ss({filters:ws,filterStates:Ys},"filter",!0)},[Fl,_c,Bs]=oi({prefixCls:Ws,locale:fs,dropdownPrefixCls:cl,mergedColumns:ao,onFilterChange:dl,getPopupContainer:_r||Za}),ks=Vi(Zl,_c);Ra.filters=Bs,Ra.filterStates=_c;const Ms=Me.useMemo(()=>{const ws={};return Object.keys(Bs).forEach(Ys=>{Bs[Ys]!==null&&(ws[Ys]=Bs[Ys])}),Object.assign(Object.assign({},Kl),{filters:ws})},[Kl,Bs]),[Gs]=So(Ms),pl=(ws,Ys)=>{ss({pagination:Object.assign(Object.assign({},Ra.pagination),{current:ws,pageSize:Ys})},"paginate")},[is,js]=Va(ks.length,pl,Qn);Ra.pagination=Qn===!1?{}:$o(is,Qn),Ra.resetPagination=js;const Dl=Me.useMemo(()=>{if(Qn===!1||!is.pageSize)return ks;const{current:ws=1,total:Ys,pageSize:vl=ga}=is;return ks.length<Ys?ks.length>vl?ks.slice((ws-1)*vl,ws*vl):ks:ks.slice((ws-1)*vl,ws*vl)},[!!Qn,ks,is&&is.current,is&&is.pageSize,is&&is.total]),[Ul,Gu]=Ha({prefixCls:Ws,data:ks,pageData:Dl,getRowKey:Ps,getRecordByKey:Uo,expandType:wa,childrenColumnName:da,locale:fs,getPopupContainer:_r||Za},yi),Du=(ws,Ys,vl)=>{let Xs;return typeof Ui=="function"?Xs=rt()(Ui(ws,Ys,vl)):Xs=rt()(Ui),rt()({[`${Ws}-row-selected`]:Gu.has(Ps(ws,Ys))},Xs)};ba.__PARENT_RENDER_ICON__=ba.expandIcon,ba.expandIcon=ba.expandIcon||Ko||$a(fs),wa==="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 ml=Me.useCallback(ws=>Gs(Ul(Fl(Al(ws)))),[Al,Fl,Ul]);let Iu,Ou;if(Qn!==!1&&(is!=null&&is.total)){let ws;is.size?ws=is.size:ws=aa==="small"||aa==="middle"?"small":void 0;const Ys=ms=>Me.createElement(io.Z,Object.assign({},is,{className:rt()(`${Ws}-pagination ${Ws}-pagination-${ms}`,is.className),size:ws})),vl=bs==="rtl"?"left":"right",{position:Xs}=is;if(Xs!==null&&Array.isArray(Xs)){const ms=Xs.find(xc=>xc.includes("top")),yl=Xs.find(xc=>xc.includes("bottom")),Su=Xs.every(xc=>`${xc}`=="none");!ms&&!yl&&!Su&&(Ou=Ys(vl)),ms&&(Iu=Ys(ms.toLowerCase().replace("top",""))),yl&&(Ou=Ys(yl.toLowerCase().replace("bottom","")))}else Ou=Ys(vl)}let Ns;typeof vo=="boolean"?Ns={spinning:vo}:typeof vo=="object"&&(Ns=Object.assign({spinning:!0},vo));const[Hl,$s]=yc(Ws),[,zs]=(0,Ca.Z)(),$u=rt()(`${Ws}-wrapper`,us==null?void 0:us.className,{[`${Ws}-wrapper-rtl`]:bs==="rtl"},Qt,mn,$s),Kc=Object.assign(Object.assign({},us==null?void 0:us.style),on),sc=co&&co.emptyText||(qs==null?void 0:qs("Table"))||Me.createElement(xo.Z,{componentName:"Table"}),lc=Fo?mr:hr,Vu={},ku=Me.useMemo(()=>{const{fontSize:ws,lineHeight:Ys,padding:vl,paddingXS:Xs,paddingSM:ms}=zs,yl=Math.floor(ws*Ys);switch(aa){case"large":return vl*2+yl;case"small":return Xs*2+yl;default:return ms*2+yl}},[zs,aa]);return Fo&&(Vu.listItemHeight=ku),Hl(Me.createElement("div",{ref:qe,className:$u,style:Kc},Me.createElement(Ja.Z,Object.assign({spinning:!1},Ns),Iu,Me.createElement(lc,Object.assign({},Vu,Ta,{columns:ao,direction:bs,expandable:ba,prefixCls:Ws,className:rt()({[`${Ws}-middle`]:aa==="middle",[`${Ws}-small`]:aa==="small",[`${Ws}-bordered`]:Hn,[`${Ws}-empty`]:el.length===0}),data:Dl,rowKey:Ps,rowClassName:Du,emptyText:sc,internalHooks:Te,internalRefs:Xo,transformColumns:ml})),Ou)))};var Fd=Me.forwardRef(_d);const ch=(it,qe)=>{const Xt=Me.useRef(0);return Xt.current+=1,Me.createElement(Fd,Object.assign({},it,{ref:qe,_renderTimes:Xt.current}))},ui=Me.forwardRef(ch);ui.SELECTION_COLUMN=ma,ui.EXPAND_COLUMN=le,ui.SELECTION_ALL=ya,ui.SELECTION_INVERT=bo,ui.SELECTION_NONE=oa,ui.Column=Lo,ui.ColumnGroup=la,ui.Summary=ht;var fo=ui,Xa=fo},12563:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return lt}});var le=me(59301),Te=me(99267),He=me(92310),st=me.n(He),We=me(36785),ct=me(47729),Me=me(14088),bt=me(36355),Pt=me(17313),Ge=me(37613),ut=me(83116);const mt=Ze=>{const{paddingXXS:Lt,lineWidth:rt,tagPaddingHorizontal:Ot,componentCls:wt}=Ze,Dt=Ot-rt,Wt=Lt-rt;return{[wt]:Object.assign(Object.assign({},(0,Pt.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",[`&${wt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ze.defaultColor},[`${wt}-close-icon`]:{marginInlineStart:Wt,color:Ze.colorTextDescription,fontSize:Ze.tagIconSize,cursor:"pointer",transition:`all ${Ze.motionDurationMid}`,"&:hover":{color:Ze.colorTextHeading}},[`&${wt}-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(${wt}-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}}),[`${wt}-borderless`]:{borderColor:"transparent",background:Ze.tagBorderlessBg}}},yt=Ze=>{const{lineWidth:Lt,fontSizeIcon:rt}=Ze,Ot=Ze.fontSizeSM,wt=`${Ze.lineHeightSM*Ot}px`;return(0,Ge.TS)(Ze,{tagFontSize:Ot,tagLineHeight:wt,tagIconSize:rt-2*Lt,tagPaddingHorizontal:8,tagBorderlessBg:Ze.colorFillTertiary})},De=Ze=>({defaultBg:Ze.colorFillQuaternary,defaultColor:Ze.colorText});var te=(0,ut.Z)("Tag",Ze=>{const Lt=yt(Ze);return mt(Lt)},De),ee=function(Ze,Lt){var rt={};for(var Ot in Ze)Object.prototype.hasOwnProperty.call(Ze,Ot)&&Lt.indexOf(Ot)<0&&(rt[Ot]=Ze[Ot]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var wt=0,Ot=Object.getOwnPropertySymbols(Ze);wt<Ot.length;wt++)Lt.indexOf(Ot[wt])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Ot[wt])&&(rt[Ot[wt]]=Ze[Ot[wt]]);return rt},se=Ze=>{const{prefixCls:Lt,style:rt,className:Ot,checked:wt,onChange:Dt,onClick:Wt}=Ze,Mt=ee(Ze,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:et,tag:Ue}=le.useContext(bt.E_),Rt=cn=>{Dt==null||Dt(!wt),Wt==null||Wt(cn)},Pn=et("tag",Lt),[xn,_t]=te(Pn),qt=st()(Pn,`${Pn}-checkable`,{[`${Pn}-checkable-checked`]:wt},Ue==null?void 0:Ue.className,Ot,_t);return xn(le.createElement("span",Object.assign({},Mt,{style:Object.assign(Object.assign({},rt),Ue==null?void 0:Ue.style),className:qt,onClick:Rt})))},he=me(45157);const ve=Ze=>(0,he.Z)(Ze,(Lt,rt)=>{let{textColor:Ot,lightBorderColor:wt,lightColor:Dt,darkColor:Wt}=rt;return{[`${Ze.componentCls}-${Lt}`]:{color:Ot,background:Dt,borderColor:wt,"&-inverse":{color:Ze.colorTextLightSolid,background:Wt,borderColor:Wt},[`&${Ze.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Ee=(0,ut.b)(["Tag","preset"],Ze=>{const Lt=yt(Ze);return ve(Lt)},De);function Le(Ze){return typeof Ze!="string"?Ze:Ze.charAt(0).toUpperCase()+Ze.slice(1)}const Ne=(Ze,Lt,rt)=>{const Ot=Le(rt);return{[`${Ze.componentCls}-${Lt}`]:{color:Ze[`color${rt}`],background:Ze[`color${Ot}Bg`],borderColor:Ze[`color${Ot}Border`],[`&${Ze.componentCls}-borderless`]:{borderColor:"transparent"}}}};var je=(0,ut.b)(["Tag","status"],Ze=>{const Lt=yt(Ze);return[Ne(Lt,"success","Success"),Ne(Lt,"processing","Info"),Ne(Lt,"error","Error"),Ne(Lt,"warning","Warning")]},De),ze=function(Ze,Lt){var rt={};for(var Ot in Ze)Object.prototype.hasOwnProperty.call(Ze,Ot)&&Lt.indexOf(Ot)<0&&(rt[Ot]=Ze[Ot]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var wt=0,Ot=Object.getOwnPropertySymbols(Ze);wt<Ot.length;wt++)Lt.indexOf(Ot[wt])<0&&Object.prototype.propertyIsEnumerable.call(Ze,Ot[wt])&&(rt[Ot[wt]]=Ze[Ot[wt]]);return rt};const Ye=(Ze,Lt)=>{const{prefixCls:rt,className:Ot,rootClassName:wt,style:Dt,children:Wt,icon:Mt,color:et,onClose:Ue,closeIcon:Rt,closable:Pn,bordered:xn=!0}=Ze,_t=ze(Ze,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:qt,direction:cn,tag:Gn}=le.useContext(bt.E_),[gn,Zn]=le.useState(!0);le.useEffect(()=>{"visible"in _t&&Zn(_t.visible)},[_t.visible]);const Ct=(0,We.o2)(et),Wn=(0,We.yT)(et),di=Ct||Wn,Kt=Object.assign(Object.assign({backgroundColor:et&&!di?et:void 0},Gn==null?void 0:Gn.style),Dt),ln=qt("tag",rt),[$t,Tt]=te(ln),ft=st()(ln,Gn==null?void 0:Gn.className,{[`${ln}-${et}`]:di,[`${ln}-has-color`]:et&&!di,[`${ln}-hidden`]:!gn,[`${ln}-rtl`]:cn==="rtl",[`${ln}-borderless`]:!xn},Ot,wt,Tt),$e=Pe=>{Pe.stopPropagation(),Ue==null||Ue(Pe),!Pe.defaultPrevented&&Zn(!1)},[,Gt]=(0,ct.Z)(Pn,Rt,Pe=>Pe===null?le.createElement(Te.Z,{className:`${ln}-close-icon`,onClick:$e}):le.createElement("span",{className:`${ln}-close-icon`,onClick:$e},Pe),null,!1),Ht=typeof _t.onClick=="function"||Wt&&Wt.type==="a",ht=Mt||null,at=ht?le.createElement(le.Fragment,null,ht,Wt&&le.createElement("span",null,Wt)):Wt,Re=le.createElement("span",Object.assign({},_t,{ref:Lt,className:ft,style:Kt}),at,Gt,Ct&&le.createElement(Ee,{key:"preset",prefixCls:ln}),Wn&&le.createElement(je,{key:"status",prefixCls:ln}));return $t(Ht?le.createElement(Me.Z,{component:"Tag"},Re):Re)},Xe=le.forwardRef(Ye);Xe.CheckableTag=se;var lt=Xe},10777:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return je}});var le=me(92310),Te=me.n(le),He=me(59301),st=me(36355),We=function(ze,Ye){var Xe={};for(var lt in ze)Object.prototype.hasOwnProperty.call(ze,lt)&&Ye.indexOf(lt)<0&&(Xe[lt]=ze[lt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,lt=Object.getOwnPropertySymbols(ze);Ze<lt.length;Ze++)Ye.indexOf(lt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ze,lt[Ze])&&(Xe[lt[Ze]]=ze[lt[Ze]]);return Xe},Me=ze=>{var{prefixCls:Ye,className:Xe,color:lt="blue",dot:Ze,pending:Lt=!1,position:rt,label:Ot,children:wt}=ze,Dt=We(ze,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:Wt}=He.useContext(st.E_),Mt=Wt("timeline",Ye),et=Te()(`${Mt}-item`,{[`${Mt}-item-pending`]:Lt},Xe),Ue=/blue|red|green|gray/.test(lt||"")?void 0:lt,Rt=Te()(`${Mt}-item-head`,{[`${Mt}-item-head-custom`]:!!Ze,[`${Mt}-item-head-${lt}`]:!Ue});return He.createElement("li",Object.assign({},Dt,{className:et}),Ot&&He.createElement("div",{className:`${Mt}-item-label`},Ot),He.createElement("div",{className:`${Mt}-item-tail`}),He.createElement("div",{className:Rt,style:{borderColor:Ue,color:Ue}},Ze),He.createElement("div",{className:`${Mt}-item-content`},wt))},bt=me(80702),Pt=me(58617),Ge=function(ze,Ye){var Xe={};for(var lt in ze)Object.prototype.hasOwnProperty.call(ze,lt)&&Ye.indexOf(lt)<0&&(Xe[lt]=ze[lt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,lt=Object.getOwnPropertySymbols(ze);Ze<lt.length;Ze++)Ye.indexOf(lt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ze,lt[Ze])&&(Xe[lt[Ze]]=ze[lt[Ze]]);return Xe},mt=ze=>{var{prefixCls:Ye,className:Xe,pending:lt=!1,children:Ze,items:Lt,rootClassName:rt,reverse:Ot=!1,direction:wt,hashId:Dt,pendingDot:Wt,mode:Mt=""}=ze,et=Ge(ze,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const Ue=(gn,Zn)=>Mt==="alternate"?gn==="right"?`${Ye}-item-right`:gn==="left"?`${Ye}-item-left`:Zn%2===0?`${Ye}-item-left`:`${Ye}-item-right`:Mt==="left"?`${Ye}-item-left`:Mt==="right"?`${Ye}-item-right`:gn==="right"?`${Ye}-item-right`:"",Rt=(0,bt.Z)(Lt||[]),Pn=typeof lt=="boolean"?null:lt;lt&&Rt.push({pending:!!lt,dot:Wt||He.createElement(Pt.Z,null),children:Pn}),Ot&&Rt.reverse();const xn=Rt.length,_t=`${Ye}-item-last`,qt=Rt.filter(gn=>!!gn).map((gn,Zn)=>{var Ct;const Wn=Zn===xn-2?_t:"",di=Zn===xn-1?_t:"",{className:Kt}=gn,ln=Ge(gn,["className"]);return He.createElement(Me,Object.assign({},ln,{className:Te()([Kt,!Ot&&lt?Wn:di,Ue((Ct=gn==null?void 0:gn.position)!==null&&Ct!==void 0?Ct:"",Zn)]),key:(gn==null?void 0:gn.key)||Zn}))}),cn=Rt.some(gn=>!!(gn!=null&&gn.label)),Gn=Te()(Ye,{[`${Ye}-pending`]:!!lt,[`${Ye}-reverse`]:!!Ot,[`${Ye}-${Mt}`]:!!Mt&&!cn,[`${Ye}-label`]:cn,[`${Ye}-rtl`]:wt==="rtl"},Xe,rt,Dt);return He.createElement("ul",Object.assign({},et,{className:Gn}),qt)},yt=me(11592);function De(ze,Ye){return ze&&Array.isArray(ze)?ze:(0,yt.Z)(Ye).map(Xe=>{var lt,Ze;return Object.assign({children:(Ze=(lt=Xe==null?void 0:Xe.props)===null||lt===void 0?void 0:lt.children)!==null&&Ze!==void 0?Ze:""},Xe.props)})}var te=De,ee=me(17313),ce=me(83116),se=me(37613);const he=ze=>{const{componentCls:Ye}=ze;return{[Ye]:Object.assign(Object.assign({},(0,ee.Wf)(ze)),{margin:0,padding:0,listStyle:"none",[`${Ye}-item`]:{position:"relative",margin:0,paddingBottom:ze.itemPaddingBottom,fontSize:ze.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:ze.itemHeadSize,insetInlineStart:(ze.itemHeadSize-ze.tailWidth)/2,height:`calc(100% - ${ze.itemHeadSize}px)`,borderInlineStart:`${ze.tailWidth}px ${ze.lineType} ${ze.tailColor}`},"&-pending":{[`${Ye}-item-head`]:{fontSize:ze.fontSizeSM,backgroundColor:"transparent"},[`${Ye}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:ze.itemHeadSize,height:ze.itemHeadSize,backgroundColor:ze.dotBg,border:`${ze.dotBorderWidth}px ${ze.lineType} transparent`,borderRadius:"50%","&-blue":{color:ze.colorPrimary,borderColor:ze.colorPrimary},"&-red":{color:ze.colorError,borderColor:ze.colorError},"&-green":{color:ze.colorSuccess,borderColor:ze.colorSuccess},"&-gray":{color:ze.colorTextDisabled,borderColor:ze.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:ze.itemHeadSize/2,insetInlineStart:ze.itemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:ze.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(ze.fontSize*ze.lineHeight-ze.fontSize)+ze.lineWidth,marginInlineStart:ze.margin+ze.itemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${Ye}-item-tail`]:{display:"none"},[`> ${Ye}-item-content`]:{minHeight:ze.controlHeightLG*1.2}}},[`&${Ye}-alternate,
&${Ye}-right,
&${Ye}-label`]:{[`${Ye}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${ze.marginXXS}px`,"&-custom":{marginInlineStart:ze.tailWidth/2}},"&-left":{[`${Ye}-item-content`]:{insetInlineStart:`calc(50% - ${ze.marginXXS}px)`,width:`calc(50% - ${ze.marginSM}px)`,textAlign:"start"}},"&-right":{[`${Ye}-item-content`]:{width:`calc(50% - ${ze.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${Ye}-right`]:{[`${Ye}-item-right`]:{[`${Ye}-item-tail,
${Ye}-item-head,
${Ye}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(ze.itemHeadSize+ze.tailWidth)/2}px)`},[`${Ye}-item-content`]:{width:`calc(100% - ${ze.itemHeadSize+ze.marginXS}px)`}}},[`&${Ye}-pending
${Ye}-item-last
${Ye}-item-tail`]:{display:"block",height:`calc(100% - ${ze.margin}px)`,borderInlineStart:`${ze.tailWidth}px dotted ${ze.tailColor}`},[`&${Ye}-reverse
${Ye}-item-last
${Ye}-item-tail`]:{display:"none"},[`&${Ye}-reverse ${Ye}-item-pending`]:{[`${Ye}-item-tail`]:{insetBlockStart:ze.margin,display:"block",height:`calc(100% - ${ze.margin}px)`,borderInlineStart:`${ze.tailWidth}px dotted ${ze.tailColor}`},[`${Ye}-item-content`]:{minHeight:ze.controlHeightLG*1.2}},[`&${Ye}-label`]:{[`${Ye}-item-label`]:{position:"absolute",insetBlockStart:-(ze.fontSize*ze.lineHeight-ze.fontSize)+ze.tailWidth,width:`calc(50% - ${ze.marginSM}px)`,textAlign:"end"},[`${Ye}-item-right`]:{[`${Ye}-item-label`]:{insetInlineStart:`calc(50% + ${ze.marginSM}px)`,width:`calc(50% - ${ze.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${Ye}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var ve=(0,ce.Z)("Timeline",ze=>{const Ye=(0,se.TS)(ze,{itemHeadSize:10,customHeadPaddingVertical:ze.paddingXXS,paddingInlineEnd:2});return[he(Ye)]},ze=>({tailColor:ze.colorSplit,tailWidth:ze.lineWidthBold,dotBorderWidth:ze.wireframe?ze.lineWidthBold:ze.lineWidth*3,dotBg:ze.colorBgContainer,itemPaddingBottom:ze.padding*1.25})),Ee=function(ze,Ye){var Xe={};for(var lt in ze)Object.prototype.hasOwnProperty.call(ze,lt)&&Ye.indexOf(lt)<0&&(Xe[lt]=ze[lt]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,lt=Object.getOwnPropertySymbols(ze);Ze<lt.length;Ze++)Ye.indexOf(lt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(ze,lt[Ze])&&(Xe[lt[Ze]]=ze[lt[Ze]]);return Xe};const Le=ze=>{const{getPrefixCls:Ye,direction:Xe,timeline:lt}=He.useContext(st.E_),{prefixCls:Ze,children:Lt,items:rt,className:Ot,style:wt}=ze,Dt=Ee(ze,["prefixCls","children","items","className","style"]),Wt=Ye("timeline",Ze),[Mt,et]=ve(Wt),Ue=te(rt,Lt);return Mt(He.createElement(mt,Object.assign({},Dt,{className:Te()(lt==null?void 0:lt.className,Ot),style:Object.assign(Object.assign({},lt==null?void 0:lt.style),wt),prefixCls:Wt,direction:Xe,items:Ue,hashId:et})))};Le.Item=Me;var Ne=Le,je=Ne},17574:function(_n,yn,me){"use strict";me.d(yn,{default:function(){return et}});var le=me(54844),Te=me(80702),He=me(52671),st=me(8657),We=me(72308),ct=me(59301),Me={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"},bt=Me,Pt=me(7657),Ge=function(Rt,Pn){return ct.createElement(Pt.Z,(0,We.Z)({},Rt,{ref:Pn,icon:bt}))},ut=ct.forwardRef(Ge),mt=ut,yt=me(92310),De=me.n(yt),te=me(35654),ee=me(71430),ce=me(36355),se=me(56082),he=me(62892),ve=me(20648);const Ee=4;function Le(Ue){const{dropPosition:Rt,dropLevelOffset:Pn,prefixCls:xn,indent:_t,direction:qt="ltr"}=Ue,cn=qt==="ltr"?"left":"right",Gn=qt==="ltr"?"right":"left",gn={[cn]:-Pn*_t+Ee,[Gn]:0};switch(Rt){case-1:gn.top=-3;break;case 1:gn.bottom=-3;break;default:gn.bottom=-3,gn[cn]=_t+Ee;break}return ct.createElement("div",{style:gn,className:`${xn}-drop-indicator`})}var Ne=me(71997),ze=ct.forwardRef((Ue,Rt)=>{const{getPrefixCls:Pn,direction:xn,virtual:_t,tree:qt}=ct.useContext(ce.E_),{prefixCls:cn,className:Gn,showIcon:gn=!1,showLine:Zn,switcherIcon:Ct,blockNode:Wn=!1,children:di,checkable:Kt=!1,selectable:ln=!0,draggable:$t,motion:Tt,style:ft}=Ue,$e=Pn("tree",cn),Gt=Pn(),Ht=Tt!=null?Tt:Object.assign(Object.assign({},(0,he.Z)(Gt)),{motionAppear:!1}),ht=Object.assign(Object.assign({},Ue),{checkable:Kt,selectable:ln,showIcon:gn,motion:Ht,blockNode:Wn,showLine:!!Zn,dropIndicatorRender:Le}),[at,Re]=(0,ve.ZP)($e),Pe=ct.useMemo(()=>{if(!$t)return!1;let Oe={};switch(typeof $t){case"function":Oe.nodeDraggable=$t;break;case"object":Oe=Object.assign({},$t);break;default:break}return Oe.icon!==!1&&(Oe.icon=Oe.icon||ct.createElement(se.Z,null)),Oe},[$t]),ye=Oe=>ct.createElement(Ne.Z,{prefixCls:$e,switcherIcon:Ct,treeNodeProps:Oe,showLine:Zn});return at(ct.createElement(le.Z,Object.assign({itemHeight:20,ref:Rt,virtual:_t},ht,{style:Object.assign(Object.assign({},qt==null?void 0:qt.style),ft),prefixCls:$e,className:De()({[`${$e}-icon-hide`]:!gn,[`${$e}-block-node`]:Wn,[`${$e}-unselectable`]:!ln,[`${$e}-rtl`]:xn==="rtl"},qt==null?void 0:qt.className,Gn,Re),direction:xn,checkable:Kt&&ct.createElement("span",{className:`${$e}-checkbox-inner`}),selectable:ln,switcherIcon:ye,draggable:Pe}),di))}),Ye;(function(Ue){Ue[Ue.None=0]="None",Ue[Ue.Start=1]="Start",Ue[Ue.End=2]="End"})(Ye||(Ye={}));function Xe(Ue,Rt){function Pn(xn){const{key:_t,children:qt}=xn;Rt(_t,xn)!==!1&&Xe(qt||[],Rt)}Ue.forEach(Pn)}function lt(Ue){let{treeData:Rt,expandedKeys:Pn,startKey:xn,endKey:_t}=Ue;const qt=[];let cn=Ye.None;if(xn&&xn===_t)return[xn];if(!xn||!_t)return[];function Gn(gn){return gn===xn||gn===_t}return Xe(Rt,gn=>{if(cn===Ye.End)return!1;if(Gn(gn)){if(qt.push(gn),cn===Ye.None)cn=Ye.Start;else if(cn===Ye.Start)return cn=Ye.End,!1}else cn===Ye.Start&&qt.push(gn);return Pn.includes(gn)}),qt}function Ze(Ue,Rt){const Pn=(0,Te.Z)(Rt),xn=[];return Xe(Ue,(_t,qt)=>{const cn=Pn.indexOf(_t);return cn!==-1&&(xn.push(qt),Pn.splice(cn,1)),!!Pn.length}),xn}var Lt=function(Ue,Rt){var Pn={};for(var xn in Ue)Object.prototype.hasOwnProperty.call(Ue,xn)&&Rt.indexOf(xn)<0&&(Pn[xn]=Ue[xn]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _t=0,xn=Object.getOwnPropertySymbols(Ue);_t<xn.length;_t++)Rt.indexOf(xn[_t])<0&&Object.prototype.propertyIsEnumerable.call(Ue,xn[_t])&&(Pn[xn[_t]]=Ue[xn[_t]]);return Pn};function rt(Ue){const{isLeaf:Rt,expanded:Pn}=Ue;return Rt?ct.createElement(He.Z,null):Pn?ct.createElement(st.Z,null):ct.createElement(mt,null)}function Ot(Ue){let{treeData:Rt,children:Pn}=Ue;return Rt||(0,ee.zn)(Pn)}const wt=(Ue,Rt)=>{var{defaultExpandAll:Pn,defaultExpandParent:xn,defaultExpandedKeys:_t}=Ue,qt=Lt(Ue,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const cn=ct.useRef(),Gn=ct.useRef(),gn=()=>{const{keyEntities:Pe}=(0,ee.I8)(Ot(qt));let ye;return Pn?ye=Object.keys(Pe):xn?ye=(0,te.r7)(qt.expandedKeys||_t||[],Pe):ye=qt.expandedKeys||_t,ye},[Zn,Ct]=ct.useState(qt.selectedKeys||qt.defaultSelectedKeys||[]),[Wn,di]=ct.useState(()=>gn());ct.useEffect(()=>{"selectedKeys"in qt&&Ct(qt.selectedKeys)},[qt.selectedKeys]),ct.useEffect(()=>{"expandedKeys"in qt&&di(qt.expandedKeys)},[qt.expandedKeys]);const Kt=(Pe,ye)=>{var Oe;return"expandedKeys"in qt||di(Pe),(Oe=qt.onExpand)===null||Oe===void 0?void 0:Oe.call(qt,Pe,ye)},ln=(Pe,ye)=>{var Oe;const{multiple:Ke}=qt,{node:Fe,nativeEvent:Et}=ye,{key:sn=""}=Fe,pn=Ot(qt),en=Object.assign(Object.assign({},ye),{selected:!0}),wn=(Et==null?void 0:Et.ctrlKey)||(Et==null?void 0:Et.metaKey),hi=Et==null?void 0:Et.shiftKey;let Rn;Ke&&wn?(Rn=Pe,cn.current=sn,Gn.current=Rn,en.selectedNodes=Ze(pn,Rn)):Ke&&hi?(Rn=Array.from(new Set([].concat((0,Te.Z)(Gn.current||[]),(0,Te.Z)(lt({treeData:pn,expandedKeys:Wn,startKey:sn,endKey:cn.current}))))),en.selectedNodes=Ze(pn,Rn)):(Rn=[sn],cn.current=sn,Gn.current=Rn,en.selectedNodes=Ze(pn,Rn)),(Oe=qt.onSelect)===null||Oe===void 0||Oe.call(qt,Rn,en),"selectedKeys"in qt||Ct(Rn)},{getPrefixCls:$t,direction:Tt}=ct.useContext(ce.E_),{prefixCls:ft,className:$e,showIcon:Gt=!0,expandAction:Ht="click"}=qt,ht=Lt(qt,["prefixCls","className","showIcon","expandAction"]),at=$t("tree",ft),Re=De()(`${at}-directory`,{[`${at}-directory-rtl`]:Tt==="rtl"},$e);return ct.createElement(ze,Object.assign({icon:rt,ref:Rt,blockNode:!0},ht,{showIcon:Gt,expandAction:Ht,prefixCls:at,className:Re,expandedKeys:Wn,selectedKeys:Zn,onSelect:ln,onExpand:Kt}))};var Wt=ct.forwardRef(wt);const Mt=ze;Mt.DirectoryTree=Wt,Mt.TreeNode=le.O;var et=Mt},20648:function(_n,yn,me){"use strict";me.d(yn,{TM:function(){return yt},Yk:function(){return mt}});var le=me(93083),Te=me(98447),He=me(17313),st=me(8378),We=me(37613),ct=me(83116);const Me=new le.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),bt=(De,te)=>({[`.${De}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${te.motionDurationSlow}`}}}),Pt=(De,te)=>({[`.${De}-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:'""'}}}),Ge=(De,te)=>{const{treeCls:ee,treeNodeCls:ce,treeNodePadding:se,titleHeight:he,nodeSelectedBg:ve,nodeHoverBg:Ee}=te,Le=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"},[`${ce}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${te.colorPrimary}`,opacity:0,animationName:Me,animationDuration:te.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${ce}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,He.oN)(te)),[`&:not(${ce}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:he,lineHeight:`${he}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${te.motionDurationSlow}`,[`${ce}:hover &`]:{opacity:.45}},[`&${ce}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:he}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},bt(De,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:Le},[`${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"},Pt(De,te)),[`${ce}.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"}}},[`${ce}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${he/2}px !important`}}}}})}},ut=De=>{const{treeCls:te,treeNodeCls:ee,treeNodePadding:ce,directoryNodeSelectedBg:se,directoryNodeSelectedColor:he}=De;return{[`${te}${te}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:ce,insetInlineStart:0,transition:`background-color ${De.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:De.controlItemBgHover}},"> *":{zIndex:1},[`${te}-switcher`]:{transition:`color ${De.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"}}}}}},mt=(De,te)=>{const ee=`.${De}`,ce=`${ee}-treenode`,se=te.paddingXS/2,he=(0,We.TS)(te,{treeCls:ee,treeNodeCls:ce,treeNodePadding:se});return[Ge(De,he),ut(he)]},yt=De=>{const{controlHeightSM:te}=De;return{titleHeight:te,nodeHoverBg:De.controlItemBgHover,nodeSelectedBg:De.controlItemBgActive}};yn.ZP=(0,ct.Z)("Tree",(De,te)=>{let{prefixCls:ee}=te;return[{[De.componentCls]:(0,Te.C2)(`${ee}-checkbox`,De)},mt(ee,De),(0,st.Z)(De)]},De=>{const{colorTextLightSolid:te,colorPrimary:ee}=De;return Object.assign(Object.assign({},yt(De)),{directoryNodeSelectedColor:te,directoryNodeSelectedBg:ee})})},71997:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return ce}});var le=me(72308),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"},st=He,We=me(7657),ct=function(he,ve){return Te.createElement(We.Z,(0,le.Z)({},he,{ref:ve,icon:st}))},Me=Te.forwardRef(ct),bt=Me,Pt=me(52671),Ge=me(58617),ut=me(15075),mt=me(43531),yt=me(92310),De=me.n(yt),te=me(92343),ce=se=>{const{prefixCls:he,switcherIcon:ve,treeNodeProps:Ee,showLine:Le}=se,{isLeaf:Ne,expanded:je,loading:ze}=Ee;if(ze)return Te.createElement(Ge.Z,{className:`${he}-switcher-loading-icon`});let Ye;if(Le&&typeof Le=="object"&&(Ye=Le.showLeafIcon),Ne){if(!Le)return null;if(typeof Ye!="boolean"&&Ye){const Ze=typeof Ye=="function"?Ye(Ee):Ye,Lt=`${he}-switcher-line-custom-icon`;return(0,te.l$)(Ze)?(0,te.Tm)(Ze,{className:De()(Ze.props.className||"",Lt)}):Ze}return Ye?Te.createElement(Pt.Z,{className:`${he}-switcher-line-icon`}):Te.createElement("span",{className:`${he}-switcher-leaf-line`})}const Xe=`${he}-switcher-icon`,lt=typeof ve=="function"?ve(Ee):ve;return(0,te.l$)(lt)?(0,te.Tm)(lt,{className:De()(lt.props.className||"",Xe)}):lt!==void 0?lt:Le?je?Te.createElement(ut.Z,{className:`${he}-switcher-line-icon`}):Te.createElement(mt.Z,{className:`${he}-switcher-line-icon`}):Te.createElement(bt,{className:Xe})}},99498:function(_n,yn,me){(function(le){le(me(89780))})(function(le){le.defineOption("placeholder","",function(bt,Pt,Ge){var ut=Ge&&Ge!=le.Init;if(Pt&&!ut)bt.on("blur",We),bt.on("change",ct),bt.on("swapDoc",ct),le.on(bt.getInputField(),"compositionupdate",bt.state.placeholderCompose=function(){st(bt)}),ct(bt);else if(!Pt&&ut){bt.off("blur",We),bt.off("change",ct),bt.off("swapDoc",ct),le.off(bt.getInputField(),"compositionupdate",bt.state.placeholderCompose),Te(bt);var mt=bt.getWrapperElement();mt.className=mt.className.replace(" CodeMirror-empty","")}Pt&&!bt.hasFocus()&&We(bt)});function Te(bt){bt.state.placeholder&&(bt.state.placeholder.parentNode.removeChild(bt.state.placeholder),bt.state.placeholder=null)}function He(bt){Te(bt);var Pt=bt.state.placeholder=document.createElement("pre");Pt.style.cssText="height: 0; overflow: visible",Pt.style.direction=bt.getOption("direction"),Pt.className="CodeMirror-placeholder CodeMirror-line-like";var Ge=bt.getOption("placeholder");typeof Ge=="string"&&(Ge=document.createTextNode(Ge)),Pt.appendChild(Ge),bt.display.lineSpace.insertBefore(Pt,bt.display.lineSpace.firstChild)}function st(bt){setTimeout(function(){var Pt=!1,Ge=bt.getInputField();Ge.nodeName=="TEXTAREA"?Pt=!Ge.value:bt.lineCount()==1&&(Pt=!/[^\u200b]/.test(Ge.querySelector(".CodeMirror-line").textContent)),Pt?He(bt):Te(bt)},20)}function We(bt){Me(bt)&&He(bt)}function ct(bt){var Pt=bt.getWrapperElement(),Ge=Me(bt);Pt.className=Pt.className.replace(" CodeMirror-empty","")+(Ge?" CodeMirror-empty":""),Ge?He(bt):Te(bt)}function Me(bt){return bt.lineCount()===1&&bt.getLine(0)===""}})},25717:function(_n,yn,me){(function(le){le(me(89780))})(function(le){var Te={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},He=le.Pos;le.defineOption("autoCloseBrackets",!1,function(te,ee,ce){ce&&ce!=le.Init&&(te.removeKeyMap(We),te.state.closeBrackets=null),ee&&(ct(st(ee,"pairs")),te.state.closeBrackets=ee,te.addKeyMap(We))});function st(te,ee){return ee=="pairs"&&typeof te=="string"?te:typeof te=="object"&&te[ee]!=null?te[ee]:Te[ee]}var We={Backspace:Pt,Enter:Ge};function ct(te){for(var ee=0;ee<te.length;ee++){var ce=te.charAt(ee),se="'"+ce+"'";We[se]||(We[se]=Me(ce))}}ct(Te.pairs+"`");function Me(te){return function(ee){return mt(ee,te)}}function bt(te){var ee=te.state.closeBrackets;if(!ee||ee.override)return ee;var ce=te.getModeAt(te.getCursor());return ce.closeBrackets||ee}function Pt(te){var ee=bt(te);if(!ee||te.getOption("disableInput"))return le.Pass;for(var ce=st(ee,"pairs"),se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return le.Pass;var ve=yt(te,se[he].head);if(!ve||ce.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 Ge(te){var ee=bt(te),ce=ee&&st(ee,"explode");if(!ce||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=yt(te,se[he].head);if(!ve||ce.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 Le=0;Le<se.length;Le++){var Ne=se[Le].head.line;te.indentLine(Ne,null,!0),te.indentLine(Ne+1,null,!0)}})}function ut(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 mt(te,ee){var ce=bt(te);if(!ce||te.getOption("disableInput"))return le.Pass;var se=st(ce,"pairs"),he=se.indexOf(ee);if(he==-1)return le.Pass;for(var ve=st(ce,"closeBefore"),Ee=st(ce,"triples"),Le=se.charAt(he+1)==ee,Ne=te.listSelections(),je=he%2==0,ze,Ye=0;Ye<Ne.length;Ye++){var Xe=Ne[Ye],lt=Xe.head,Ze,Lt=te.getRange(lt,He(lt.line,lt.ch+1));if(je&&!Xe.empty())Ze="surround";else if((Le||!je)&&Lt==ee)Le&&De(te,lt)?Ze="both":Ee.indexOf(ee)>=0&&te.getRange(lt,He(lt.line,lt.ch+3))==ee+ee+ee?Ze="skipThree":Ze="skip";else if(Le&&lt.ch>1&&Ee.indexOf(ee)>=0&&te.getRange(He(lt.line,lt.ch-2),lt)==ee+ee){if(lt.ch>2&&/\bstring/.test(te.getTokenTypeAt(He(lt.line,lt.ch-2))))return le.Pass;Ze="addFour"}else if(Le){var rt=lt.ch==0?" ":te.getRange(He(lt.line,lt.ch-1),lt);if(!le.isWordChar(Lt)&&rt!=ee&&!le.isWordChar(rt))Ze="both";else return le.Pass}else if(je&&(Lt.length===0||/\s/.test(Lt)||ve.indexOf(Lt)>-1))Ze="both";else return le.Pass;if(!ze)ze=Ze;else if(ze!=Ze)return le.Pass}var Ot=he%2?se.charAt(he-1):ee,wt=he%2?ee:se.charAt(he+1);te.operation(function(){if(ze=="skip")te.execCommand("goCharRight");else if(ze=="skipThree")for(var Dt=0;Dt<3;Dt++)te.execCommand("goCharRight");else if(ze=="surround"){for(var Wt=te.getSelections(),Dt=0;Dt<Wt.length;Dt++)Wt[Dt]=Ot+Wt[Dt]+wt;te.replaceSelections(Wt,"around"),Wt=te.listSelections().slice();for(var Dt=0;Dt<Wt.length;Dt++)Wt[Dt]=ut(Wt[Dt]);te.setSelections(Wt)}else ze=="both"?(te.replaceSelection(Ot+wt,null),te.triggerElectric(Ot+wt),te.execCommand("goCharLeft")):ze=="addFour"&&(te.replaceSelection(Ot+Ot+Ot+Ot,"before"),te.execCommand("goCharRight"))})}function yt(te,ee){var ce=te.getRange(He(ee.line,ee.ch-1),He(ee.line,ee.ch+1));return ce.length==2?ce:null}function De(te,ee){var ce=te.getTokenAt(He(ee.line,ee.ch+1));return/\bstring/.test(ce.type)&&ce.start==ee.ch&&(ee.ch==0||!/\bstring/.test(te.getTokenTypeAt(ee)))}})},6313:function(_n,yn,me){(function(le){le(me(89780),me(32855))})(function(le){le.defineOption("autoCloseTags",!1,function(Pt,Ge,ut){if(ut!=le.Init&&ut&&Pt.removeKeyMap("autoCloseTags"),!!Ge){var mt={name:"autoCloseTags"};(typeof Ge!="object"||Ge.whenClosing!==!1)&&(mt["'/'"]=function(yt){return ct(yt)}),(typeof Ge!="object"||Ge.whenOpening!==!1)&&(mt["'>'"]=function(yt){return st(yt)}),Pt.addKeyMap(mt)}});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 st(Pt){if(Pt.getOption("disableInput"))return le.Pass;for(var Ge=Pt.listSelections(),ut=[],mt=Pt.getOption("autoCloseTags"),yt=0;yt<Ge.length;yt++){if(!Ge[yt].empty())return le.Pass;var De=Ge[yt].head,te=Pt.getTokenAt(De),ee=le.innerMode(Pt.getMode(),te.state),ce=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(ce),he=se&&se.name;if(!he)return le.Pass;var ve=ee.mode.configuration=="html",Ee=typeof mt=="object"&&mt.dontCloseTags||ve&&Te,Le=typeof mt=="object"&&mt.indentTags||ve&&He;te.end>De.ch&&(he=he.slice(0,he.length-te.end+De.ch));var Ne=he.toLowerCase();if(!he||te.type=="string"&&(te.end!=De.ch||!/[\"\']/.test(te.string.charAt(te.string.length-1))||te.string.length==1)||te.type=="tag"&&se.close||te.string.indexOf("/")==De.ch-te.start-1||Ee&&Me(Ee,Ne)>-1||bt(Pt,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(ce)||[],he,De,!0))return le.Pass;var je=typeof mt=="object"&&mt.emptyTags;if(je&&Me(je,he)>-1){ut[yt]={text:"/>",newPos:le.Pos(De.line,De.ch+2)};continue}var ze=Le&&Me(Le,Ne)>-1;ut[yt]={indent:ze,text:">"+(ze?`
`:"")+"</"+he+">",newPos:ze?le.Pos(De.line+1,0):le.Pos(De.line,De.ch+1)}}for(var Ye=typeof mt=="object"&&mt.dontIndentOnAutoClose,yt=Ge.length-1;yt>=0;yt--){var Xe=ut[yt];Pt.replaceRange(Xe.text,Ge[yt].head,Ge[yt].anchor,"+insert");var lt=Pt.listSelections().slice(0);lt[yt]={head:Xe.newPos,anchor:Xe.newPos},Pt.setSelections(lt),!Ye&&Xe.indent&&(Pt.indentLine(Xe.newPos.line,null,!0),Pt.indentLine(Xe.newPos.line+1,null,!0))}}function We(Pt,Ge){for(var ut=Pt.listSelections(),mt=[],yt=Ge?"/":"</",De=Pt.getOption("autoCloseTags"),te=typeof De=="object"&&De.dontIndentOnSlash,ee=0;ee<ut.length;ee++){if(!ut[ee].empty())return le.Pass;var ce=ut[ee].head,se=Pt.getTokenAt(ce),he=le.innerMode(Pt.getMode(),se.state),ve=he.state;if(Ge&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=ce.ch-1))return le.Pass;var Ee,Le=he.mode.name!="xml"&&Pt.getMode().name=="htmlmixed";if(Le&&he.mode.name=="javascript")Ee=yt+"script";else if(Le&&he.mode.name=="css")Ee=yt+"style";else{var Ne=he.mode.xmlCurrentContext&&he.mode.xmlCurrentContext(ve);if(!Ne||Ne.length&&bt(Pt,Ne,Ne[Ne.length-1],ce))return le.Pass;Ee=yt+Ne[Ne.length-1]}Pt.getLine(ce.line).charAt(se.end)!=">"&&(Ee+=">"),mt[ee]=Ee}if(Pt.replaceSelections(mt),ut=Pt.listSelections(),!te)for(var ee=0;ee<ut.length;ee++)(ee==ut.length-1||ut[ee].head.line<ut[ee+1].head.line)&&Pt.indentLine(ut[ee].head.line)}function ct(Pt){return Pt.getOption("disableInput")?le.Pass:We(Pt,!0)}le.commands.closeTag=function(Pt){return We(Pt)};function Me(Pt,Ge){if(Pt.indexOf)return Pt.indexOf(Ge);for(var ut=0,mt=Pt.length;ut<mt;++ut)if(Pt[ut]==Ge)return ut;return-1}function bt(Pt,Ge,ut,mt,yt){if(!le.scanForClosingTag)return!1;var De=Math.min(Pt.lastLine()+1,mt.line+500),te=le.scanForClosingTag(Pt,mt,null,De);if(!te||te.tag!=ut)return!1;for(var ee=yt?1:0,ce=Ge.length-1;ce>=0&&Ge[ce]==ut;ce--)++ee;mt=te.to;for(var ce=1;ce<ee;ce++){var se=le.scanForClosingTag(Pt,mt,null,De);if(!se||se.tag!=ut)return!1;mt=se.to}return!0}})},32855:function(_n,yn,me){(function(le){le(me(89780))})(function(le){"use strict";var Te=le.Pos;function He(ce,se){return ce.line-se.line||ce.ch-se.ch}var st="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=st+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ct=new RegExp("<(/?)(["+st+"]["+We+"]*)","g");function Me(ce,se,he,ve){this.line=se,this.ch=he,this.cm=ce,this.text=ce.getLine(se),this.min=ve?Math.max(ve.from,ce.firstLine()):ce.firstLine(),this.max=ve?Math.min(ve.to-1,ce.lastLine()):ce.lastLine()}function bt(ce,se){var he=ce.cm.getTokenTypeAt(Te(ce.line,se));return he&&/\btag\b/.test(he)}function Pt(ce){if(!(ce.line>=ce.max))return ce.ch=0,ce.text=ce.cm.getLine(++ce.line),!0}function Ge(ce){if(!(ce.line<=ce.min))return ce.text=ce.cm.getLine(--ce.line),ce.ch=ce.text.length,!0}function ut(ce){for(;;){var se=ce.text.indexOf(">",ce.ch);if(se==-1){if(Pt(ce))continue;return}if(!bt(ce,se+1)){ce.ch=se+1;continue}var he=ce.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(ce.text.slice(he+1,se));return ce.ch=se+1,ve?"selfClose":"regular"}}function mt(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf("<",ce.ch-1):-1;if(se==-1){if(Ge(ce))continue;return}if(!bt(ce,se+1)){ce.ch=se;continue}ct.lastIndex=se,ce.ch=se;var he=ct.exec(ce.text);if(he&&he.index==se)return he}}function yt(ce){for(;;){ct.lastIndex=ce.ch;var se=ct.exec(ce.text);if(!se){if(Pt(ce))continue;return}if(!bt(ce,se.index+1)){ce.ch=se.index+1;continue}return ce.ch=se.index+se[0].length,se}}function De(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf(">",ce.ch-1):-1;if(se==-1){if(Ge(ce))continue;return}if(!bt(ce,se+1)){ce.ch=se;continue}var he=ce.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(ce.text.slice(he+1,se));return ce.ch=se+1,ve?"selfClose":"regular"}}function te(ce,se){for(var he=[];;){var ve=yt(ce),Ee,Le=ce.line,Ne=ce.ch-(ve?ve[0].length:0);if(!ve||!(Ee=ut(ce)))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(Le,Ne),to:Te(ce.line,ce.ch)}}else he.push(ve[2])}}function ee(ce,se){for(var he=[];;){var ve=De(ce);if(!ve)return;if(ve=="selfClose"){mt(ce);continue}var Ee=ce.line,Le=ce.ch,Ne=mt(ce);if(!Ne)return;if(Ne[1])he.push(Ne[2]);else{for(var je=he.length-1;je>=0;--je)if(he[je]==Ne[2]){he.length=je;break}if(je<0&&(!se||se==Ne[2]))return{tag:Ne[2],from:Te(ce.line,ce.ch),to:Te(Ee,Le)}}}}le.registerHelper("fold","xml",function(ce,se){for(var he=new Me(ce,se.line,0);;){var ve=yt(he);if(!ve||he.line!=se.line)return;var Ee=ut(he);if(!Ee)return;if(!ve[1]&&Ee!="selfClose"){var Le=Te(he.line,he.ch),Ne=te(he,ve[2]);return Ne&&He(Ne.from,Le)>0?{from:Le,to:Ne.from}:null}}}),le.findMatchingTag=function(ce,se,he){var ve=new Me(ce,se.line,se.ch,he);if(!(ve.text.indexOf(">")==-1&&ve.text.indexOf("<")==-1)){var Ee=ut(ve),Le=Ee&&Te(ve.line,ve.ch),Ne=Ee&&mt(ve);if(!(!Ee||!Ne||He(ve,se)>0)){var je={from:Te(ve.line,ve.ch),to:Le,tag:Ne[2]};return Ee=="selfClose"?{open:je,close:null,at:"open"}:Ne[1]?{open:ee(ve,Ne[2]),close:je,at:"close"}:(ve=new Me(ce,Le.line,Le.ch,he),{open:je,close:te(ve,Ne[2]),at:"open"})}}},le.findEnclosingTag=function(ce,se,he,ve){for(var Ee=new Me(ce,se.line,se.ch,he);;){var Le=ee(Ee,ve);if(!Le)break;var Ne=new Me(ce,se.line,se.ch,he),je=te(Ne,Le.tag);if(je)return{open:Le,close:je}}},le.scanForClosingTag=function(ce,se,he,ve){var Ee=new Me(ce,se.line,se.ch,ve?{from:0,to:ve}:null);return te(Ee,he)}})},89780:function(_n){(function(yn,me){_n.exports=me()})(this,function(){"use strict";var yn=navigator.userAgent,me=navigator.platform,le=/gecko\/\d/i.test(yn),Te=/MSIE \d/.test(yn),He=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(yn),st=/Edge\/(\d+)/.exec(yn),We=Te||He||st,ct=We&&(Te?document.documentMode||6:+(st||He)[1]),Me=!st&&/WebKit\//.test(yn),bt=Me&&/Qt\/\d+\.\d+/.test(yn),Pt=!st&&/Chrome\//.test(yn),Ge=/Opera\//.test(yn),ut=/Apple Computer/.test(navigator.vendor),mt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(yn),yt=/PhantomJS/.test(yn),De=!st&&/AppleWebKit/.test(yn)&&/Mobile\/\w+/.test(yn),te=/Android/.test(yn),ee=De||te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(yn),ce=De||/Mac/.test(me),se=/\bCrOS\b/.test(yn),he=/win/i.test(me),ve=Ge&&yn.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&(Ge=!1,Me=!0);var Ee=ce&&(bt||Ge&&(ve==null||ve<12.11)),Le=le||We&&ct>=9;function Ne(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var je=function(ie,ae){var ge=ie.className,fe=Ne(ae).exec(ge);if(fe){var xe=ge.slice(fe.index+fe[0].length);ie.className=ge.slice(0,fe.index)+(xe?fe[1]+xe:"")}};function ze(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function Ye(ie,ae){return ze(ie).appendChild(ae)}function Xe(ie,ae,ge,fe){var xe=document.createElement(ie);if(ge&&(xe.className=ge),fe&&(xe.style.cssText=fe),typeof ae=="string")xe.appendChild(document.createTextNode(ae));else if(ae)for(var ke=0;ke<ae.length;++ke)xe.appendChild(ae[ke]);return xe}function lt(ie,ae,ge,fe){var xe=Xe(ie,ae,ge,fe);return xe.setAttribute("role","presentation"),xe}var Ze;document.createRange?Ze=function(ie,ae,ge,fe){var xe=document.createRange();return xe.setEnd(fe||ie,ge),xe.setStart(ie,ae),xe}:Ze=function(ie,ae,ge){var fe=document.body.createTextRange();try{fe.moveToElementText(ie.parentNode)}catch(xe){return fe}return fe.collapse(!0),fe.moveEnd("character",ge),fe.moveStart("character",ae),fe};function Lt(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 rt(){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;Ne(ae).test(ge)||(ie.className+=(ge?" ":"")+ae)}function wt(ie,ae){for(var ge=ie.split(" "),fe=0;fe<ge.length;fe++)ge[fe]&&!Ne(ge[fe]).test(ae)&&(ae+=" "+ge[fe]);return ae}var Dt=function(ie){ie.select()};De?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 Mt(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 et(ie,ae,ge,fe,xe){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var ke=fe||0,Je=xe||0;;){var vt=ie.indexOf(" ",ke);if(vt<0||vt>=ae)return Je+(ae-ke);Je+=vt-ke,Je+=ge-Je%ge,ke=vt+1}}var Ue=function(){this.id=null,this.f=null,this.time=0,this.handler=Wt(this.onTimeout,this)};Ue.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ue.prototype.set=function(ie,ae){this.f=ae;var 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 Pn=50,xn={toString:function(){return"CodeMirror.Pass"}},_t={scroll:!1},qt={origin:"*mouse"},cn={origin:"+move"};function Gn(ie,ae,ge){for(var fe=0,xe=0;;){var ke=ie.indexOf(" ",fe);ke==-1&&(ke=ie.length);var Je=ke-fe;if(ke==ie.length||xe+Je>=ae)return fe+Math.min(Je,ae-xe);if(xe+=ke-fe,xe+=ge-xe%ge,fe=ke+1,xe>=ae)return fe}}var gn=[""];function Zn(ie){for(;gn.length<=ie;)gn.push(Ct(gn)+" ");return gn[ie]}function Ct(ie){return ie[ie.length-1]}function Wn(ie,ae){for(var ge=[],fe=0;fe<ie.length;fe++)ge[fe]=ae(ie[fe],fe);return ge}function di(ie,ae,ge){for(var fe=0,xe=ge(ae);fe<ie.length&&ge(ie[fe])<=xe;)fe++;ie.splice(fe,0,ae)}function Kt(){}function ln(ie,ae){var ge;return Object.create?ge=Object.create(ie):(Kt.prototype=ie,ge=new Kt),ae&&Mt(ae,ge),ge}var $t=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Tt(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||$t.test(ie))}function ft(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Tt(ie)?!0:ae.test(ie):Tt(ie)}function $e(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var Gt=/[\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 Ht(ie){return ie.charCodeAt(0)>=768&&Gt.test(ie)}function ht(ie,ae,ge){for(;(ge<0?ae>0:ae<ie.length)&&Ht(ie.charAt(ae));)ae+=ge;return ae}function at(ie,ae,ge){for(var fe=ae>ge?-1:1;;){if(ae==ge)return ae;var xe=(ae+ge)/2,ke=fe<0?Math.ceil(xe):Math.floor(xe);if(ke==ae)return ie(ke)?ae:ge;ie(ke)?ge=ke:ae=ke+fe}}function Re(ie,ae,ge,fe){if(!ie)return fe(ae,ge,"ltr",0);for(var xe=!1,ke=0;ke<ie.length;++ke){var Je=ie[ke];(Je.from<ge&&Je.to>ae||ae==ge&&Je.to==ae)&&(fe(Math.max(Je.from,ae),Math.min(Je.to,ge),Je.level==1?"rtl":"ltr",ke),xe=!0)}xe||fe(ae,ge,"ltr")}var Pe=null;function ye(ie,ae,ge){var fe;Pe=null;for(var xe=0;xe<ie.length;++xe){var ke=ie[xe];if(ke.from<ae&&ke.to>ae)return xe;ke.to==ae&&(ke.from!=ke.to&&ge=="before"?fe=xe:Pe=xe),ke.from==ae&&(ke.from!=ke.to&&ge!="before"?fe=xe:Pe=xe)}return fe!=null?fe:Pe}var Oe=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]/,xe=/[stwN]/,ke=/[LRr]/,Je=/[Lb1n]/,vt=/[1n]/;function gt(jt,In,Yt){this.level=jt,this.from=In,this.to=Yt}return function(jt,In){var Yt=In=="ltr"?"L":"R";if(jt.length==0||In=="ltr"&&!fe.test(jt))return!1;for(var si=jt.length,ri=[],er=0;er<si;++er)ri.push(ge(jt.charCodeAt(er)));for(var cr=0,Fr=Yt;cr<si;++cr){var so=ri[cr];so=="m"?ri[cr]=Fr:Fr=so}for(var Zo=0,Bo=Yt;Zo<si;++Zo){var ea=ri[Zo];ea=="1"&&Bo=="r"?ri[Zo]="n":ke.test(ea)&&(Bo=ea,ea=="r"&&(ri[Zo]="R"))}for(var _a=1,Mo=ri[0];_a<si-1;++_a){var rs=ri[_a];rs=="+"&&Mo=="1"&&ri[_a+1]=="1"?ri[_a]="1":rs==","&&Mo==ri[_a+1]&&(Mo=="1"||Mo=="n")&&(ri[_a]=Mo),Mo=rs}for(var rl=0;rl<si;++rl){var ru=ri[rl];if(ru==",")ri[rl]="N";else if(ru=="%"){var xl=void 0;for(xl=rl+1;xl<si&&ri[xl]=="%";++xl);for(var Uu=rl&&ri[rl-1]=="!"||xl<si&&ri[xl]=="1"?"1":"N",wu=rl;wu<xl;++wu)ri[wu]=Uu;rl=xl-1}}for(var Xl=0,Yu=Yt;Xl<si;++Xl){var hu=ri[Xl];Yu=="L"&&hu=="1"?ri[Xl]="L":ke.test(hu)&&(Yu=hu)}for(var Jl=0;Jl<si;++Jl)if(xe.test(ri[Jl])){var Ds=void 0;for(Ds=Jl+1;Ds<si&&xe.test(ri[Ds]);++Ds);for(var Sl=(Jl?ri[Jl-1]:Yt)=="L",uu=(Ds<si?ri[Ds]:Yt)=="L",fu=Sl==uu?Sl?"L":"R":Yt,jc=Jl;jc<Ds;++jc)ri[jc]=fu;Jl=Ds-1}for(var Pl=[],Pc,Se=0;Se<si;)if(Je.test(ri[Se])){var Ce=Se;for(++Se;Se<si&&Je.test(ri[Se]);++Se);Pl.push(new gt(0,Ce,Se))}else{var Ie=Se,Ve=Pl.length,St=In=="rtl"?1:0;for(++Se;Se<si&&ri[Se]!="L";++Se);for(var xt=Ie;xt<Se;)if(vt.test(ri[xt])){Ie<xt&&(Pl.splice(Ve,0,new gt(1,Ie,xt)),Ve+=St);var It=xt;for(++xt;xt<Se&&vt.test(ri[xt]);++xt);Pl.splice(Ve,0,new gt(2,It,xt)),Ve+=St,Ie=xt}else++xt;Ie<Se&&Pl.splice(Ve,0,new gt(1,Ie,Se))}return In=="ltr"&&(Pl[0].level==1&&(Pc=jt.match(/^\s+/))&&(Pl[0].from=Pc[0].length,Pl.unshift(new gt(0,0,Pc[0].length))),Ct(Pl).level==1&&(Pc=jt.match(/\s+$/))&&(Ct(Pl).to-=Pc[0].length,Pl.push(new gt(0,si-Pc[0].length,si)))),In=="rtl"?Pl.reverse():Pl}}();function Ke(ie,ae){var ge=ie.order;return ge==null&&(ge=ie.order=Oe(ie.text,ae)),ge}var Fe=[],Et=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]||Fe).concat(ge)}};function sn(ie,ae){return ie._handlers&&ie._handlers[ae]||Fe}function pn(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,xe=fe&&fe[ae];if(xe){var ke=Rt(xe,ge);ke>-1&&(fe[ae]=xe.slice(0,ke).concat(xe.slice(ke+1)))}}}function en(ie,ae){var ge=sn(ie,ae);if(ge.length)for(var fe=Array.prototype.slice.call(arguments,2),xe=0;xe<ge.length;++xe)ge[xe].apply(null,fe)}function wn(ie,ae,ge){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),en(ie,ge||ae.type,ie,ae),Zi(ae)||ae.codemirrorIgnore}function hi(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 Rn(ie,ae){return sn(ie,ae).length>0}function Sn(ie){ie.prototype.on=function(ae,ge){Et(this,ae,ge)},ie.prototype.off=function(ae,ge){pn(this,ae,ge)}}function Pi(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function zi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function Zi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function ir(ie){Pi(ie),zi(ie)}function Nr(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)),ce&&ie.ctrlKey&&ae==1&&(ae=3),ae}var li=function(){if(We&&ct<9)return!1;var ie=Xe("div");return"draggable"in ie||"dragDrop"in ie}(),xi;function Gi(ie){if(xi==null){var ae=Xe("span","\u200B");Ye(ie,Xe("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(xi=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(We&&ct<8))}var ge=xi?Xe("span","\u200B"):Xe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ge.setAttribute("cm-text",""),ge}var Oi;function to(ie){if(Oi!=null)return Oi;var ae=Ye(ie,document.createTextNode("A\u062EA")),ge=Ze(ae,0,1).getBoundingClientRect(),fe=Ze(ae,1,2).getBoundingClientRect();return ze(ie),!ge||ge.left==ge.right?!1:Oi=fe.right-ge.right<3}var eo=`
b`.split(/\n/).length!=3?function(ie){for(var ae=0,ge=[],fe=ie.length;ae<=fe;){var xe=ie.indexOf(`
`,ae);xe==-1&&(xe=ie.length);var ke=ie.slice(ae,ie.charAt(xe-1)=="\r"?xe-1:xe),Je=ke.indexOf("\r");Je!=-1?(ge.push(ke.slice(0,Je)),ae+=Je+1):(ge.push(ke),ae=xe+1)}return ge}:function(ie){return ie.split(/\r\n?|\n/)},Be=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},Fi=function(){var ie=Xe("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),wr=null;function Fn(ie){if(wr!=null)return wr;var ae=Ye(ie,Xe("span","x")),ge=ae.getBoundingClientRect(),fe=Ze(ae,0,1).getBoundingClientRect();return wr=Math.abs(ge.left-fe.left)>1}var wi={},$i={};function tr(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),wi[ie]=ae}function ei(ie,ae){$i[ie]=ae}function $n(ie){if(typeof ie=="string"&&$i.hasOwnProperty(ie))ie=$i[ie];else if(ie&&typeof ie.name=="string"&&$i.hasOwnProperty(ie.name)){var ae=$i[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=ln(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return $n("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return $n("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function zt(ie,ae){ae=$n(ae);var ge=wi[ae.name];if(!ge)return zt(ie,"text/plain");var fe=ge(ie,ae);if(Vt.hasOwnProperty(ae.name)){var xe=Vt[ae.name];for(var ke in xe)xe.hasOwnProperty(ke)&&(fe.hasOwnProperty(ke)&&(fe["_"+ke]=fe[ke]),fe[ke]=xe[ke])}if(fe.name=ae.name,ae.helperType&&(fe.helperType=ae.helperType),ae.modeProps)for(var Je in ae.modeProps)fe[Je]=ae.modeProps[Je];return fe}var Vt={};function Qe(ie,ae){var ge=Vt.hasOwnProperty(ie)?Vt[ie]:Vt[ie]={};Mt(ae,ge)}function an(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var ge={};for(var fe in ae){var xe=ae[fe];xe instanceof Array&&(xe=xe.concat([])),ge[fe]=xe}return ge}function dn(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 Nt(ie,ae,ge){return ie.startState?ie.startState(ae,ge):!0}var dt=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};dt.prototype.eol=function(){return this.pos>=this.string.length},dt.prototype.sol=function(){return this.pos==this.lineStart},dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},dt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},dt.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},dt.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},dt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},dt.prototype.skipToEnd=function(){this.pos=this.string.length},dt.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},dt.prototype.backUp=function(ie){this.pos-=ie},dt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=et(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?et(this.string,this.lineStart,this.tabSize):0)},dt.prototype.indentation=function(){return et(this.string,null,this.tabSize)-(this.lineStart?et(this.string,this.lineStart,this.tabSize):0)},dt.prototype.match=function(ie,ae,ge){if(typeof ie=="string"){var fe=function(Je){return ge?Je.toLowerCase():Je},xe=this.string.substr(this.pos,ie.length);if(fe(xe)==fe(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var ke=this.string.slice(this.pos).match(ie);return ke&&ke.index>0?null:(ke&&ae!==!1&&(this.pos+=ke[0].length),ke)}},dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},dt.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},dt.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},dt.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function nn(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 xe=ge.children[fe],ke=xe.chunkSize();if(ae<ke){ge=xe;break}ae-=ke}return ge.lines[ae]}function vn(ie,ae,ge){var fe=[],xe=ae.line;return ie.iter(ae.line,ge.line+1,function(ke){var Je=ke.text;xe==ge.line&&(Je=Je.slice(0,ge.ch)),xe==ae.line&&(Je=Je.slice(ae.ch)),fe.push(Je),++xe}),fe}function zn(ie,ae,ge){var fe=[];return ie.iter(ae,ge,function(xe){fe.push(xe.text)}),fe}function qn(ie,ae){var ge=ae-ie.height;if(ge)for(var fe=ie;fe;fe=fe.parent)fe.height+=ge}function Ft(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 xe=0;fe.children[xe]!=ae;++xe)ge+=fe.children[xe].chunkSize();return ge+ae.first}function Bn(ie,ae){var ge=ie.first;e:do{for(var fe=0;fe<ie.children.length;++fe){var xe=ie.children[fe],ke=xe.height;if(ae<ke){ie=xe;continue e}ae-=ke,ge+=xe.chunkSize()}return ge}while(!ie.lines);for(var Je=0;Je<ie.lines.length;++Je){var vt=ie.lines[Je],gt=vt.height;if(ae<gt)break;ae-=gt}return ge+Je}function Kn(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function Ci(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function En(ie,ae,ge){if(ge===void 0&&(ge=null),!(this instanceof En))return new En(ie,ae,ge);this.line=ie,this.ch=ae,this.sticky=ge}function un(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function bn(ie,ae){return ie.sticky==ae.sticky&&un(ie,ae)==0}function Ei(ie){return En(ie.line,ie.ch)}function Ni(ie,ae){return un(ie,ae)<0?ae:ie}function mi(ie,ae){return un(ie,ae)<0?ie:ae}function Di(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function Ai(ie,ae){if(ae.line<ie.first)return En(ie.first,0);var ge=ie.first+ie.size-1;return ae.line>ge?En(ge,nn(ie,ge).text.length):gr(ae,nn(ie,ae.line).text.length)}function gr(ie,ae){var ge=ie.ch;return ge==null||ge>ae?En(ie.line,ae):ge<0?En(ie.line,0):ie}function Or(ie,ae){for(var ge=[],fe=0;fe<ae.length;fe++)ge[fe]=Ai(ie,ae[fe]);return ge}var Hr=function(ie,ae){this.state=ie,this.lookAhead=ae},jn=function(ie,ae,ge,fe){this.state=ae,this.doc=ie,this.line=ge,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};jn.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},jn.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}},jn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},jn.fromSaved=function(ie,ae,ge){return ae instanceof Hr?new jn(ie,an(ie.mode,ae.state),ge,ae.lookAhead):new jn(ie,an(ie.mode,ae),ge)},jn.prototype.save=function(ie){var ae=ie!==!1?an(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hr(ae,this.maxLookAhead):ae};function Po(ie,ae,ge,fe){var xe=[ie.state.modeGen],ke={};Vr(ie,ae.text,ie.doc.mode,ge,function(jt,In){return xe.push(jt,In)},ke,fe);for(var Je=ge.state,vt=function(jt){ge.baseTokens=xe;var In=ie.state.overlays[jt],Yt=1,si=0;ge.state=!0,Vr(ie,ae.text,In.mode,ge,function(ri,er){for(var cr=Yt;si<ri;){var Fr=xe[Yt];Fr>ri&&xe.splice(Yt,1,ri,xe[Yt+1],Fr),Yt+=2,si=Math.min(ri,Fr)}if(er)if(In.opaque)xe.splice(cr,Yt-cr,ri,"overlay "+er),Yt=cr+2;else for(;cr<Yt;cr+=2){var so=xe[cr+1];xe[cr+1]=(so?so+" ":"")+"overlay "+er}},ke),ge.state=Je,ge.baseTokens=null,ge.baseTokenPos=1},gt=0;gt<ie.state.overlays.length;++gt)vt(gt);return{styles:xe,classes:ke.bgClass||ke.textClass?ke:null}}function Wr(ie,ae,ge){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var fe=ro(ie,Ft(ae)),xe=ae.text.length>ie.options.maxHighlightLength&&an(ie.doc.mode,fe.state),ke=Po(ie,ae,fe);xe&&(fe.state=xe),ae.stateAfter=fe.save(!xe),ae.styles=ke.styles,ke.classes?ae.styleClasses=ke.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 ro(ie,ae,ge){var fe=ie.doc,xe=ie.display;if(!fe.mode.startState)return new jn(fe,!0,ae);var ke=jr(ie,ae,ge),Je=ke>fe.first&&nn(fe,ke-1).stateAfter,vt=Je?jn.fromSaved(fe,Je,ke):new jn(fe,Nt(fe.mode),ke);return fe.iter(ke,ae,function(gt){Mn(ie,gt.text,vt);var jt=vt.line;gt.stateAfter=jt==ae-1||jt%5==0||jt>=xe.viewFrom&&jt<xe.viewTo?vt.save():null,vt.nextLine()}),ge&&(fe.modeFrontier=vt.line),vt}function Mn(ie,ae,ge,fe){var xe=ie.doc.mode,ke=new dt(ae,ie.options.tabSize,ge);for(ke.start=ke.pos=fe||0,ae==""&&ii(xe,ge.state);!ke.eol();)Hi(xe,ke,ge.state),ke.start=ke.pos}function ii(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var ge=dn(ie,ae);if(ge.mode.blankLine)return ge.mode.blankLine(ge.state)}}function Hi(ie,ae,ge,fe){for(var xe=0;xe<10;xe++){fe&&(fe[0]=dn(ie,ge).mode);var ke=ie.token(ae,ge);if(ae.pos>ae.start)return ke}throw new Error("Mode "+ie.name+" failed to advance stream.")}var xr=function(ie,ae,ge){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=ge};function qi(ie,ae,ge,fe){var xe=ie.doc,ke=xe.mode,Je;ae=Ai(xe,ae);var vt=nn(xe,ae.line),gt=ro(ie,ae.line,ge),jt=new dt(vt.text,ie.options.tabSize,gt),In;for(fe&&(In=[]);(fe||jt.pos<ae.ch)&&!jt.eol();)jt.start=jt.pos,Je=Hi(ke,jt,gt.state),fe&&In.push(new xr(jt,Je,an(xe.mode,gt.state)));return fe?In:new xr(jt,Je,gt.state)}function pr(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 Vr(ie,ae,ge,fe,xe,ke,Je){var vt=ge.flattenSpans;vt==null&&(vt=ie.options.flattenSpans);var gt=0,jt=null,In=new dt(ae,ie.options.tabSize,fe),Yt,si=ie.options.addModeClass&&[null];for(ae==""&&pr(ii(ge,fe.state),ke);!In.eol();){if(In.pos>ie.options.maxHighlightLength?(vt=!1,Je&&Mn(ie,ae,fe,In.pos),In.pos=ae.length,Yt=null):Yt=pr(Hi(ge,In,fe.state,si),ke),si){var ri=si[0].name;ri&&(Yt="m-"+(Yt?ri+" "+Yt:ri))}if(!vt||jt!=Yt){for(;gt<In.start;)gt=Math.min(In.start,gt+5e3),xe(gt,jt);jt=Yt}In.start=In.pos}for(;gt<In.pos;){var er=Math.min(In.pos,gt+5e3);xe(er,jt),gt=er}}function jr(ie,ae,ge){for(var fe,xe,ke=ie.doc,Je=ge?-1:ae-(ie.doc.mode.innerMode?1e3:100),vt=ae;vt>Je;--vt){if(vt<=ke.first)return ke.first;var gt=nn(ke,vt-1),jt=gt.stateAfter;if(jt&&(!ge||vt+(jt instanceof Hr?jt.lookAhead:0)<=ke.modeFrontier))return vt;var In=et(gt.text,null,ie.options.tabSize);(xe==null||fe>In)&&(xe=vt-1,fe=In)}return xe}function kr(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 xe=nn(ie,fe).stateAfter;if(xe&&(!(xe instanceof Hr)||fe+xe.lookAhead<ae)){ge=fe+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,ge)}}var Kr=!1,Yn=!1;function Ho(){Kr=!0}function Xn(){Yn=!0}function Ao(ie,ae,ge){this.marker=ie,this.from=ae,this.to=ge}function Qo(ie,ae){if(ie)for(var ge=0;ge<ie.length;++ge){var fe=ie[ge];if(fe.marker==ae)return fe}}function nr(ie,ae){for(var ge,fe=0;fe<ie.length;++fe)ie[fe]!=ae&&(ge||(ge=[])).push(ie[fe]);return ge}function qo(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function Go(ie,ae,ge){var fe;if(ie)for(var xe=0;xe<ie.length;++xe){var ke=ie[xe],Je=ke.marker,vt=ke.from==null||(Je.inclusiveLeft?ke.from<=ae:ke.from<ae);if(vt||ke.from==ae&&Je.type=="bookmark"&&(!ge||!ke.marker.insertLeft)){var gt=ke.to==null||(Je.inclusiveRight?ke.to>=ae:ke.to>ae);(fe||(fe=[])).push(new Ao(Je,ke.from,gt?null:ke.to))}}return fe}function Br(ie,ae,ge){var fe;if(ie)for(var xe=0;xe<ie.length;++xe){var ke=ie[xe],Je=ke.marker,vt=ke.to==null||(Je.inclusiveRight?ke.to>=ae:ke.to>ae);if(vt||ke.from==ae&&Je.type=="bookmark"&&(!ge||ke.marker.insertLeft)){var gt=ke.from==null||(Je.inclusiveLeft?ke.from<=ae:ke.from<ae);(fe||(fe=[])).push(new Ao(Je,gt?null:ke.from-ae,ke.to==null?null:ke.to-ae))}}return fe}function Er(ie,ae){if(ae.full)return null;var ge=Kn(ie,ae.from.line)&&nn(ie,ae.from.line).markedSpans,fe=Kn(ie,ae.to.line)&&nn(ie,ae.to.line).markedSpans;if(!ge&&!fe)return null;var xe=ae.from.ch,ke=ae.to.ch,Je=un(ae.from,ae.to)==0,vt=Go(ge,xe,Je),gt=Br(fe,ke,Je),jt=ae.text.length==1,In=Ct(ae.text).length+(jt?xe:0);if(vt)for(var Yt=0;Yt<vt.length;++Yt){var si=vt[Yt];if(si.to==null){var ri=Qo(gt,si.marker);ri?jt&&(si.to=ri.to==null?null:ri.to+In):si.to=xe}}if(gt)for(var er=0;er<gt.length;++er){var cr=gt[er];if(cr.to!=null&&(cr.to+=In),cr.from==null){var Fr=Qo(vt,cr.marker);Fr||(cr.from=In,jt&&(vt||(vt=[])).push(cr))}else cr.from+=In,jt&&(vt||(vt=[])).push(cr)}vt&&(vt=mo(vt)),gt&&gt!=vt&&(gt=mo(gt));var so=[vt];if(!jt){var Zo=ae.text.length-2,Bo;if(Zo>0&&vt)for(var ea=0;ea<vt.length;++ea)vt[ea].to==null&&(Bo||(Bo=[])).push(new Ao(vt[ea].marker,null,null));for(var _a=0;_a<Zo;++_a)so.push(Bo);so.push(gt)}return so}function mo(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 Yo(ie,ae,ge){var fe=null;if(ie.iter(ae.line,ge.line+1,function(ri){if(ri.markedSpans)for(var er=0;er<ri.markedSpans.length;++er){var cr=ri.markedSpans[er].marker;cr.readOnly&&(!fe||Rt(fe,cr)==-1)&&(fe||(fe=[])).push(cr)}}),!fe)return null;for(var xe=[{from:ae,to:ge}],ke=0;ke<fe.length;++ke)for(var Je=fe[ke],vt=Je.find(0),gt=0;gt<xe.length;++gt){var jt=xe[gt];if(!(un(jt.to,vt.from)<0||un(jt.from,vt.to)>0)){var In=[gt,1],Yt=un(jt.from,vt.from),si=un(jt.to,vt.to);(Yt<0||!Je.inclusiveLeft&&!Yt)&&In.push({from:jt.from,to:vt.from}),(si>0||!Je.inclusiveRight&&!si)&&In.push({from:vt.to,to:jt.to}),xe.splice.apply(xe,In),gt+=In.length-3}}return xe}function Ki(ie){var ae=ie.markedSpans;if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.detachLine(ie);ie.markedSpans=null}}function ot(ie,ae){if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.attachLine(ie);ie.markedSpans=ae}}function sa(ie){return ie.inclusiveLeft?-1:0}function va(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(),xe=ae.find(),ke=un(fe.from,xe.from)||sa(ie)-sa(ae);if(ke)return-ke;var Je=un(fe.to,xe.to)||va(ie)-va(ae);return Je||ae.id-ie.id}function hs(ie,ae){var ge=Yn&&ie.markedSpans,fe;if(ge)for(var xe=void 0,ke=0;ke<ge.length;++ke)xe=ge[ke],xe.marker.collapsed&&(ae?xe.from:xe.to)==null&&(!fe||Ma(fe,xe.marker)<0)&&(fe=xe.marker);return fe}function Ga(ie){return hs(ie,!0)}function Lo(ie){return hs(ie,!1)}function po(ie,ae){var ge=Yn&&ie.markedSpans,fe;if(ge)for(var xe=0;xe<ge.length;++xe){var ke=ge[xe];ke.marker.collapsed&&(ke.from==null||ke.from<ae)&&(ke.to==null||ke.to>ae)&&(!fe||Ma(fe,ke.marker)<0)&&(fe=ke.marker)}return fe}function la(ie,ae,ge,fe,xe){var ke=nn(ie,ae),Je=Yn&&ke.markedSpans;if(Je)for(var vt=0;vt<Je.length;++vt){var gt=Je[vt];if(gt.marker.collapsed){var jt=gt.marker.find(0),In=un(jt.from,ge)||sa(gt.marker)-sa(xe),Yt=un(jt.to,fe)||va(gt.marker)-va(xe);if(!(In>=0&&Yt<=0||In<=0&&Yt>=0)&&(In<=0&&(gt.marker.inclusiveRight&&xe.inclusiveLeft?un(jt.to,ge)>=0:un(jt.to,ge)>0)||In>=0&&(gt.marker.inclusiveRight&&xe.inclusiveLeft?un(jt.from,fe)<=0:un(jt.from,fe)<0)))return!0}}}function Eo(ie){for(var ae;ae=Ga(ie);)ie=ae.find(-1,!0).line;return ie}function Na(ie){for(var ae;ae=Lo(ie);)ie=ae.find(1,!0).line;return ie}function os(ie){for(var ae,ge;ae=Lo(ie);)ie=ae.find(1,!0).line,(ge||(ge=[])).push(ie);return ge}function xo(ie,ae){var ge=nn(ie,ae),fe=Eo(ge);return ge==fe?ae:Ft(fe)}function Yr(ie,ae){if(ae>ie.lastLine())return ae;var ge=nn(ie,ae),fe;if(!vi(ie,ge))return ae;for(;fe=Lo(ge);)ge=fe.find(1,!0).line;return Ft(ge)+1}function vi(ie,ae){var ge=Yn&&ae.markedSpans;if(ge){for(var fe=void 0,xe=0;xe<ge.length;++xe)if(fe=ge[xe],!!fe.marker.collapsed){if(fe.from==null)return!0;if(!fe.marker.widgetNode&&fe.from==0&&fe.marker.inclusiveLeft&&no(ie,ae,fe))return!0}}}function no(ie,ae,ge){if(ge.to==null){var fe=ge.marker.find(1,!0);return no(ie,fe.line,Qo(fe.line.markedSpans,ge.marker))}if(ge.marker.inclusiveRight&&ge.to==ae.text.length)return!0;for(var xe=void 0,ke=0;ke<ae.markedSpans.length;++ke)if(xe=ae.markedSpans[ke],xe.marker.collapsed&&!xe.marker.widgetNode&&xe.from==ge.to&&(xe.to==null||xe.to!=ge.from)&&(xe.marker.inclusiveLeft||ge.marker.inclusiveRight)&&no(ie,ae,xe))return!0}function io(ie){ie=Eo(ie);for(var ae=0,ge=ie.parent,fe=0;fe<ge.lines.length;++fe){var xe=ge.lines[fe];if(xe==ie)break;ae+=xe.height}for(var ke=ge.parent;ke;ge=ke,ke=ge.parent)for(var Je=0;Je<ke.children.length;++Je){var vt=ke.children[Je];if(vt==ge)break;ae+=vt.height}return ae}function Ja(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,ge,fe=ie;ge=Ga(fe);){var xe=ge.find(0,!0);fe=xe.from.line,ae+=xe.from.ch-xe.to.ch}for(fe=ie;ge=Lo(fe);){var ke=ge.find(0,!0);ae-=fe.text.length-ke.from.ch,fe=ke.to.line,ae+=fe.text.length-ke.to.ch}return ae}function Ca(ie){var ae=ie.display,ge=ie.doc;ae.maxLine=nn(ge,ge.first),ae.maxLineLength=Ja(ae.maxLine),ae.maxLineChanged=!0,ge.iter(function(fe){var xe=Ja(fe);xe>ae.maxLineLength&&(ae.maxLineLength=xe,ae.maxLine=fe)})}var fa=function(ie,ae,ge){this.text=ie,ot(this,ae),this.height=ge?ge(this):1};fa.prototype.lineNo=function(){return Ft(this)},Sn(fa);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),Ki(ie),ot(ie,ge);var xe=fe?fe(ie):1;xe!=ie.height&&qn(ie,xe)}function Qa(ie){ie.parent=null,Ki(ie)}var Es={},ys={};function Zs(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var ge=ae.addModeClass?ys:Es;return ge[ie]||(ge[ie]=ie.replace(/\S+/g,"cm-$&"))}function Dn(ie,ae){var ge=lt("span",null,null,Me?"padding-right: .1px":null),fe={pre:lt("pre",[ge],"CodeMirror-line"),content:ge,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var xe=0;xe<=(ae.rest?ae.rest.length:0);xe++){var ke=xe?ae.rest[xe-1]:ae.line,Je=void 0;fe.pos=0,fe.addToken=ra,to(ie.display.measure)&&(Je=Ke(ke,ie.doc.direction))&&(fe.addToken=Ol(fe.addToken,Je)),fe.map=[];var vt=ae!=ie.display.externalMeasured&&Ft(ke);yu(ke,fe,Wr(ie,ke,vt)),ke.styleClasses&&(ke.styleClasses.bgClass&&(fe.bgClass=wt(ke.styleClasses.bgClass,fe.bgClass||"")),ke.styleClasses.textClass&&(fe.textClass=wt(ke.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild(Gi(ie.display.measure))),xe==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(Me){var gt=fe.content.lastChild;(/\bcm-tab\b/.test(gt.className)||gt.querySelector&&gt.querySelector(".cm-tab"))&&(fe.content.className="cm-tab-wrap-hack")}return en(ie,"renderLine",ie,ae.line,fe.pre),fe.pre.className&&(fe.textClass=wt(fe.pre.className,fe.textClass||"")),fe}function Ss(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 ra(ie,ae,ge,fe,xe,ke,Je){if(ae){var vt=ie.splitSpaces?hl(ae,ie.trailingSpace):ae,gt=ie.cm.state.specialChars,jt=!1,In;if(!gt.test(ae))ie.col+=ae.length,In=document.createTextNode(vt),ie.map.push(ie.pos,ie.pos+ae.length,In),We&&ct<9&&(jt=!0),ie.pos+=ae.length;else{In=document.createDocumentFragment();for(var Yt=0;;){gt.lastIndex=Yt;var si=gt.exec(ae),ri=si?si.index-Yt:ae.length-Yt;if(ri){var er=document.createTextNode(vt.slice(Yt,Yt+ri));We&&ct<9?In.appendChild(Xe("span",[er])):In.appendChild(er),ie.map.push(ie.pos,ie.pos+ri,er),ie.col+=ri,ie.pos+=ri}if(!si)break;Yt+=ri+1;var cr=void 0;if(si[0]==" "){var Fr=ie.cm.options.tabSize,so=Fr-ie.col%Fr;cr=In.appendChild(Xe("span",Zn(so),"cm-tab")),cr.setAttribute("role","presentation"),cr.setAttribute("cm-text"," "),ie.col+=so}else si[0]=="\r"||si[0]==`
`?(cr=In.appendChild(Xe("span",si[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),cr.setAttribute("cm-text",si[0]),ie.col+=1):(cr=ie.cm.options.specialCharPlaceholder(si[0]),cr.setAttribute("cm-text",si[0]),We&&ct<9?In.appendChild(Xe("span",[cr])):In.appendChild(cr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,cr),ie.pos++}}if(ie.trailingSpace=vt.charCodeAt(ae.length-1)==32,ge||fe||xe||jt||ke||Je){var Zo=ge||"";fe&&(Zo+=fe),xe&&(Zo+=xe);var Bo=Xe("span",[In],Zo,ke);if(Je)for(var ea in Je)Je.hasOwnProperty(ea)&&ea!="style"&&ea!="class"&&Bo.setAttribute(ea,Je[ea]);return ie.content.appendChild(Bo)}ie.content.appendChild(In)}}function hl(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var ge=ae,fe="",xe=0;xe<ie.length;xe++){var ke=ie.charAt(xe);ke==" "&&ge&&(xe==ie.length-1||ie.charCodeAt(xe+1)==32)&&(ke="\xA0"),fe+=ke,ge=ke==" "}return fe}function Ol(ie,ae){return function(ge,fe,xe,ke,Je,vt,gt){xe=xe?xe+" cm-force-border":"cm-force-border";for(var jt=ge.pos,In=jt+fe.length;;){for(var Yt=void 0,si=0;si<ae.length&&(Yt=ae[si],!(Yt.to>jt&&Yt.from<=jt));si++);if(Yt.to>=In)return ie(ge,fe,xe,ke,Je,vt,gt);ie(ge,fe.slice(0,Yt.to-jt),xe,ke,null,vt,gt),ke=null,fe=fe.slice(Yt.to-jt),jt=Yt.to}}}function ns(ie,ae,ge,fe){var xe=!fe&&ge.widgetNode;xe&&ie.map.push(ie.pos,ie.pos+ae,xe),!fe&&ie.cm.display.input.needsContentAttribute&&(xe||(xe=ie.content.appendChild(document.createElement("span"))),xe.setAttribute("cm-marker",ge.id)),xe&&(ie.cm.display.input.setUneditable(xe),ie.content.appendChild(xe)),ie.pos+=ae,ie.trailingSpace=!1}function yu(ie,ae,ge){var fe=ie.markedSpans,xe=ie.text,ke=0;if(!fe){for(var Je=1;Je<ge.length;Je+=2)ae.addToken(ae,xe.slice(ke,ke=ge[Je]),Zs(ge[Je+1],ae.cm.options));return}for(var vt=xe.length,gt=0,jt=1,In="",Yt,si,ri=0,er,cr,Fr,so,Zo;;){if(ri==gt){er=cr=Fr=si="",Zo=null,so=null,ri=1/0;for(var Bo=[],ea=void 0,_a=0;_a<fe.length;++_a){var Mo=fe[_a],rs=Mo.marker;if(rs.type=="bookmark"&&Mo.from==gt&&rs.widgetNode)Bo.push(rs);else if(Mo.from<=gt&&(Mo.to==null||Mo.to>gt||rs.collapsed&&Mo.to==gt&&Mo.from==gt)){if(Mo.to!=null&&Mo.to!=gt&&ri>Mo.to&&(ri=Mo.to,cr=""),rs.className&&(er+=" "+rs.className),rs.css&&(si=(si?si+";":"")+rs.css),rs.startStyle&&Mo.from==gt&&(Fr+=" "+rs.startStyle),rs.endStyle&&Mo.to==ri&&(ea||(ea=[])).push(rs.endStyle,Mo.to),rs.title&&((Zo||(Zo={})).title=rs.title),rs.attributes)for(var rl in rs.attributes)(Zo||(Zo={}))[rl]=rs.attributes[rl];rs.collapsed&&(!so||Ma(so.marker,rs)<0)&&(so=Mo)}else Mo.from>gt&&ri>Mo.from&&(ri=Mo.from)}if(ea)for(var ru=0;ru<ea.length;ru+=2)ea[ru+1]==ri&&(cr+=" "+ea[ru]);if(!so||so.from==gt)for(var xl=0;xl<Bo.length;++xl)ns(ae,0,Bo[xl]);if(so&&(so.from||0)==gt){if(ns(ae,(so.to==null?vt+1:so.to)-gt,so.marker,so.from==null),so.to==null)return;so.to==gt&&(so=!1)}}if(gt>=vt)break;for(var Uu=Math.min(vt,ri);;){if(In){var wu=gt+In.length;if(!so){var Xl=wu>Uu?In.slice(0,Uu-gt):In;ae.addToken(ae,Xl,Yt?Yt+er:er,Fr,gt+Xl.length==ri?cr:"",si,Zo)}if(wu>=Uu){In=In.slice(Uu-gt),gt=Uu;break}gt=wu,Fr=""}In=xe.slice(ke,ke=ge[jt++]),Yt=Zs(ge[jt++],ae.cm.options)}}}function eu(ie,ae,ge){this.line=ae,this.rest=os(ae),this.size=this.rest?Ft(Ct(this.rest))-ge+1:1,this.node=this.text=null,this.hidden=vi(ie,ae)}function ps(ie,ae,ge){for(var fe=[],xe,ke=ae;ke<ge;ke=xe){var Je=new eu(ie.doc,nn(ie.doc,ke),ke);xe=ke+Je.size,fe.push(Je)}return fe}var Ba=null;function tu(ie){Ba?Ba.ops.push(ie):ie.ownsGroup=Ba={ops:[ie],delayedCallbacks:[]}}function Do(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 xe=ie.ops[fe];if(xe.cursorActivityHandlers)for(;xe.cursorActivityCalled<xe.cursorActivityHandlers.length;)xe.cursorActivityHandlers[xe.cursorActivityCalled++].call(null,xe.cm)}}while(ge<ae.length)}function Ea(ie,ae){var ge=ie.ownsGroup;if(ge)try{Do(ge)}finally{Ba=null,ae(ge)}}var ca=null;function dr(ie,ae){var ge=sn(ie,ae);if(ge.length){var fe=Array.prototype.slice.call(arguments,2),xe;Ba?xe=Ba.delayedCallbacks:ca?xe=ca:(xe=ca=[],setTimeout(Rs,0));for(var ke=function(vt){xe.push(function(){return ge[vt].apply(null,fe)})},Je=0;Je<ge.length;++Je)ke(Je)}}function Rs(){var ie=ca;ca=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function ls(ie,ae,ge,fe){for(var xe=0;xe<ae.changes.length;xe++){var ke=ae.changes[xe];ke=="text"?Ji(ie,ae):ke=="gutter"?Us(ie,ae,ge,fe):ke=="class"?Cs(ie,ae):ke=="widget"&&$l(ie,ae,fe)}ae.changes=null}function sl(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&&ct<8&&(ie.node.style.zIndex=2)),ie.node}function jl(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=sl(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):Dn(ie,ae)}function Ji(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,Cs(ie,ae)):ge&&(ae.text.className=ge)}function Cs(ie,ae){jl(ie,ae),ae.line.wrapClass?sl(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 xe=sl(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),xe.insertBefore(ae.gutterBackground,ae.text)}var ke=ae.line.gutterMarkers;if(ie.options.lineNumbers||ke){var Je=sl(ae),vt=ae.gutter=Xe("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(vt),Je.insertBefore(vt,ae.text),ae.line.gutterClass&&(vt.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!ke||!ke["CodeMirror-linenumbers"])&&(ae.lineNumber=vt.appendChild(Xe("div",Ci(ie.options,ge),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),ke)for(var gt=0;gt<ie.display.gutterSpecs.length;++gt){var jt=ie.display.gutterSpecs[gt].className,In=ke.hasOwnProperty(jt)&&ke[jt];In&&vt.appendChild(Xe("div",[In],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[jt]+"px; width: "+fe.gutterWidth[jt]+"px"))}}}function $l(ie,ae,ge){ae.alignable&&(ae.alignable=null);for(var fe=Ne("CodeMirror-linewidget"),xe=ae.node.firstChild,ke=void 0;xe;xe=ke)ke=xe.nextSibling,fe.test(xe.className)&&ae.node.removeChild(xe);Vl(ie,ae,ge)}function kl(ie,ae,ge,fe){var xe=ou(ie,ae);return ae.text=ae.node=xe.pre,xe.bgClass&&(ae.bgClass=xe.bgClass),xe.textClass&&(ae.textClass=xe.textClass),Cs(ie,ae),Us(ie,ae,ge,fe),Vl(ie,ae,fe),ae.node}function Vl(ie,ae,ge){if(Oo(ie,ae.line,ae,ge,!0),ae.rest)for(var fe=0;fe<ae.rest.length;fe++)Oo(ie,ae.rest[fe],ae,ge,!1)}function Oo(ie,ae,ge,fe,xe){if(ae.widgets)for(var ke=sl(ge),Je=0,vt=ae.widgets;Je<vt.length;++Je){var gt=vt[Je],jt=Xe("div",[gt.node],"CodeMirror-linewidget"+(gt.className?" "+gt.className:""));gt.handleMouseEvents||jt.setAttribute("cm-ignore-events","true"),ic(gt,jt,ge,fe),ie.display.input.setUneditable(jt),xe&&gt.above?ke.insertBefore(jt,ge.gutter||ge.text):ke.appendChild(jt),dr(gt,"redraw")}}function ic(ie,ae,ge,fe){if(ie.noHScroll){(ge.alignable||(ge.alignable=[])).push(ae);var xe=fe.wrapperWidth;ae.style.left=fe.fixedPos+"px",ie.coverGutter||(xe-=fe.gutterTotalWidth,ae.style.paddingLeft=fe.gutterTotalWidth+"px"),ae.style.width=xe+"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(!Lt(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;"),Ye(ae.display.measure,Xe("div",[ie.node],null,ge))}return ie.height=ie.node.parentNode.offsetHeight}function Ln(ie,ae){for(var ge=Nr(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 On(ie){return ie.lineSpace.offsetTop}function ai(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function Qi(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=Ye(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 Vi(ie){return Pn-ie.display.nativeBarWidth}function Ri(ie){return ie.display.scroller.clientWidth-Vi(ie)-ie.display.barWidth}function _i(ie){return ie.display.scroller.clientHeight-Vi(ie)-ie.display.barHeight}function oi(ie,ae,ge){var fe=ie.options.lineWrapping,xe=fe&&Ri(ie);if(!ae.measure.heights||fe&&ae.measure.width!=xe){var ke=ae.measure.heights=[];if(fe){ae.measure.width=xe;for(var Je=ae.text.firstChild.getClientRects(),vt=0;vt<Je.length-1;vt++){var gt=Je[vt],jt=Je[vt+1];Math.abs(gt.bottom-jt.bottom)>2&&ke.push((gt.bottom+jt.top)/2-ge.top)}}ke.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 xe=0;xe<ie.rest.length;xe++)if(Ft(ie.rest[xe])>ge)return{map:ie.measure.maps[xe],cache:ie.measure.caches[xe],before:!0}}function ur(ie,ae){ae=Eo(ae);var ge=Ft(ae),fe=ie.display.externalMeasured=new eu(ie.doc,ae,ge);fe.lineN=ge;var xe=fe.built=Dn(ie,fe);return fe.text=xe.pre,Ye(ie.display.lineMeasure,xe.pre),fe}function zr(ie,ae,ge,fe){return Ua(ie,$o(ie,ae),ge,fe)}function ga(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[yr(ie,ae)];var ge=ie.display.externalMeasured;if(ge&&ae>=ge.lineN&&ae<ge.lineN+ge.size)return ge}function $o(ie,ae){var ge=Ft(ae),fe=ga(ie,ge);fe&&!fe.text?fe=null:fe&&fe.changes&&(ls(ie,fe,ge,Pr(ie)),ie.curOp.forceUpdate=!0),fe||(fe=ur(ie,ae));var xe=Li(fe,ae,ge);return{line:ae,view:fe,rect:null,map:xe.map,cache:xe.cache,before:xe.before,hasHeights:!1}}function Ua(ie,ae,ge,fe,xe){ae.before&&(ge=-1);var ke=ge+(fe||""),Je;return ae.cache.hasOwnProperty(ke)?Je=ae.cache[ke]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(oi(ie,ae.view,ae.rect),ae.hasHeights=!0),Je=Bi(ie,ae,ge,fe),Je.bogus||(ae.cache[ke]=Je)),{left:Je.left,right:Je.right,top:xe?Je.rtop:Je.top,bottom:xe?Je.rbottom:Je.bottom}}var Va={left:0,right:0,top:0,bottom:0};function No(ie,ae,ge){for(var fe,xe,ke,Je,vt,gt,jt=0;jt<ie.length;jt+=3)if(vt=ie[jt],gt=ie[jt+1],ae<vt?(xe=0,ke=1,Je="left"):ae<gt?(xe=ae-vt,ke=xe+1):(jt==ie.length-3||ae==gt&&ie[jt+3]>ae)&&(ke=gt-vt,xe=ke-1,ae>=gt&&(Je="right")),xe!=null){if(fe=ie[jt+2],vt==gt&&ge==(fe.insertLeft?"left":"right")&&(Je=ge),ge=="left"&&xe==0)for(;jt&&ie[jt-2]==ie[jt-3]&&ie[jt-1].insertLeft;)fe=ie[(jt-=3)+2],Je="left";if(ge=="right"&&xe==gt-vt)for(;jt<ie.length-3&&ie[jt+3]==ie[jt+4]&&!ie[jt+5].insertLeft;)fe=ie[(jt+=3)+2],Je="right";break}return{node:fe,start:xe,end:ke,collapse:Je,coverStart:vt,coverEnd:gt}}function Xr(ie,ae){var ge=Va;if(ae=="left")for(var fe=0;fe<ie.length&&(ge=ie[fe]).left==ge.right;fe++);else for(var xe=ie.length-1;xe>=0&&(ge=ie[xe]).left==ge.right;xe--);return ge}function Bi(ie,ae,ge,fe){var xe=No(ae.map,ge,fe),ke=xe.node,Je=xe.start,vt=xe.end,gt=xe.collapse,jt;if(ke.nodeType==3){for(var In=0;In<4;In++){for(;Je&&Ht(ae.line.text.charAt(xe.coverStart+Je));)--Je;for(;xe.coverStart+vt<xe.coverEnd&&Ht(ae.line.text.charAt(xe.coverStart+vt));)++vt;if(We&&ct<9&&Je==0&&vt==xe.coverEnd-xe.coverStart?jt=ke.parentNode.getBoundingClientRect():jt=Xr(Ze(ke,Je,vt).getClientRects(),fe),jt.left||jt.right||Je==0)break;vt=Je,Je=Je-1,gt="right"}We&&ct<11&&(jt=Jr(ie.display.measure,jt))}else{Je>0&&(gt=fe="right");var Yt;ie.options.lineWrapping&&(Yt=ke.getClientRects()).length>1?jt=Yt[fe=="right"?Yt.length-1:0]:jt=ke.getBoundingClientRect()}if(We&&ct<9&&!Je&&(!jt||!jt.left&&!jt.right)){var si=ke.parentNode.getClientRects()[0];si?jt={left:si.left,right:si.left+Mi(ie.display),top:si.top,bottom:si.bottom}:jt=Va}for(var ri=jt.top-ae.rect.top,er=jt.bottom-ae.rect.top,cr=(ri+er)/2,Fr=ae.view.measure.heights,so=0;so<Fr.length-1&&!(cr<Fr[so]);so++);var Zo=so?Fr[so-1]:0,Bo=Fr[so],ea={left:(gt=="right"?jt.right:jt.left)-ae.rect.left,right:(gt=="left"?jt.left:jt.right)-ae.rect.left,top:Zo,bottom:Bo};return!jt.left&&!jt.right&&(ea.bogus=!0),ie.options.singleCursorHeightPerLine||(ea.rtop=ri,ea.rbottom=er),ea}function Jr(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Fn(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 Vo(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,ze(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)Vo(ie.display.view[ae])}function ya(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 Pt&&te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function oa(){return Pt&&te?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Io(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 Ar(ie,ae,ge,fe,xe){if(!xe){var ke=Io(ae);ge.top+=ke,ge.bottom+=ke}if(fe=="line")return ge;fe||(fe="local");var Je=io(ae);if(fe=="local"?Je+=On(ie.display):Je-=ie.display.viewOffset,fe=="page"||fe=="window"){var vt=ie.display.lineSpace.getBoundingClientRect();Je+=vt.top+(fe=="window"?0:oa());var gt=vt.left+(fe=="window"?0:bo());ge.left+=gt,ge.right+=gt}return ge.top+=Je,ge.bottom+=Je,ge}function Da(ie,ae,ge){if(ge=="div")return ae;var fe=ae.left,xe=ae.top;if(ge=="page")fe-=bo(),xe-=oa();else if(ge=="local"||!ge){var ke=ie.display.sizer.getBoundingClientRect();fe+=ke.left,xe+=ke.top}var Je=ie.display.lineSpace.getBoundingClientRect();return{left:fe-Je.left,top:xe-Je.top}}function Ha(ie,ae,ge,fe,xe){return fe||(fe=nn(ie.doc,ae.line)),Ar(ie,fe,zr(ie,fe,ae.ch,xe),ge)}function La(ie,ae,ge,fe,xe,ke){fe=fe||nn(ie.doc,ae.line),xe||(xe=$o(ie,fe));function Je(er,cr){var Fr=Ua(ie,xe,er,cr?"right":"left",ke);return cr?Fr.left=Fr.right:Fr.right=Fr.left,Ar(ie,fe,Fr,ge)}var vt=Ke(fe,ie.doc.direction),gt=ae.ch,jt=ae.sticky;if(gt>=fe.text.length?(gt=fe.text.length,jt="before"):gt<=0&&(gt=0,jt="after"),!vt)return Je(jt=="before"?gt-1:gt,jt=="before");function In(er,cr,Fr){var so=vt[cr],Zo=so.level==1;return Je(Fr?er-1:er,Zo!=Fr)}var Yt=ye(vt,gt,jt),si=Pe,ri=In(gt,Yt,jt=="before");return si!=null&&(ri.other=In(gt,si,jt!="before")),ri}function fl(ie,ae){var ge=0;ae=Ai(ie.doc,ae),ie.options.lineWrapping||(ge=Mi(ie.display)*ae.ch);var fe=nn(ie.doc,ae.line),xe=io(fe)+On(ie.display);return{left:ge,right:ge,top:xe,bottom:xe+fe.height}}function xu(ie,ae,ge,fe,xe){var ke=En(ie,ae,ge);return ke.xRel=xe,fe&&(ke.outside=fe),ke}function tn(ie,ae,ge){var fe=ie.doc;if(ge+=ie.display.viewOffset,ge<0)return xu(fe.first,0,null,-1,-1);var xe=Bn(fe,ge),ke=fe.first+fe.size-1;if(xe>ke)return xu(fe.first+fe.size-1,nn(fe,ke).text.length,null,1,1);ae<0&&(ae=0);for(var Je=nn(fe,xe);;){var vt=rn(ie,Je,xe,ae,ge),gt=po(Je,vt.ch+(vt.xRel>0||vt.outside>0?1:0));if(!gt)return vt;var jt=gt.find(1);if(jt.line==xe)return jt;Je=nn(fe,xe=jt.line)}}function Jt(ie,ae,ge,fe){fe-=Io(ae);var xe=ae.text.length,ke=at(function(Je){return Ua(ie,ge,Je-1).bottom<=fe},xe,0);return xe=at(function(Je){return Ua(ie,ge,Je).top>fe},ke,xe),{begin:ke,end:xe}}function Tn(ie,ae,ge,fe){ge||(ge=$o(ie,ae));var xe=Ar(ie,ae,Ua(ie,ge,fe),"line").top;return Jt(ie,ae,ge,xe)}function tt(ie,ae,ge,fe){return ie.bottom<=ge?!1:ie.top>ge?!0:(fe?ie.left:ie.right)>ae}function rn(ie,ae,ge,fe,xe){xe-=io(ae);var ke=$o(ie,ae),Je=Io(ae),vt=0,gt=ae.text.length,jt=!0,In=Ke(ae,ie.doc.direction);if(In){var Yt=(ie.options.lineWrapping?Dr:sr)(ie,ae,ge,ke,In,fe,xe);jt=Yt.level!=1,vt=jt?Yt.from:Yt.to-1,gt=jt?Yt.to:Yt.from-1}var si=null,ri=null,er=at(function(_a){var Mo=Ua(ie,ke,_a);return Mo.top+=Je,Mo.bottom+=Je,tt(Mo,fe,xe,!1)?(Mo.top<=xe&&Mo.left<=fe&&(si=_a,ri=Mo),!0):!1},vt,gt),cr,Fr,so=!1;if(ri){var Zo=fe-ri.left<ri.right-fe,Bo=Zo==jt;er=si+(Bo?0:1),Fr=Bo?"after":"before",cr=Zo?ri.left:ri.right}else{!jt&&(er==gt||er==vt)&&er++,Fr=er==0?"after":er==ae.text.length?"before":Ua(ie,ke,er-(jt?1:0)).bottom+Je<=xe==jt?"after":"before";var ea=La(ie,En(ge,er,Fr),"line",ae,ke);cr=ea.left,so=xe<ea.top?-1:xe>=ea.bottom?1:0}return er=ht(ae.text,er,1),xu(ge,er,Fr,so,fe-cr)}function sr(ie,ae,ge,fe,xe,ke,Je){var vt=at(function(Yt){var si=xe[Yt],ri=si.level!=1;return tt(La(ie,En(ge,ri?si.to:si.from,ri?"before":"after"),"line",ae,fe),ke,Je,!0)},0,xe.length-1),gt=xe[vt];if(vt>0){var jt=gt.level!=1,In=La(ie,En(ge,jt?gt.from:gt.to,jt?"after":"before"),"line",ae,fe);tt(In,ke,Je,!0)&&In.top>Je&&(gt=xe[vt-1])}return gt}function Dr(ie,ae,ge,fe,xe,ke,Je){var vt=Jt(ie,ae,fe,Je),gt=vt.begin,jt=vt.end;/\s/.test(ae.text.charAt(jt-1))&&jt--;for(var In=null,Yt=null,si=0;si<xe.length;si++){var ri=xe[si];if(!(ri.from>=jt||ri.to<=gt)){var er=ri.level!=1,cr=Ua(ie,fe,er?Math.min(jt,ri.to)-1:Math.max(gt,ri.from)).right,Fr=cr<ke?ke-cr+1e9:cr-ke;(!In||Yt>Fr)&&(In=ri,Yt=Fr)}}return In||(In=xe[xe.length-1]),In.from<gt&&(In={from:gt,to:In.to,level:In.level}),In.to>jt&&(In={from:In.from,to:jt,level:In.level}),In}var vr;function lr(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(vr==null){vr=Xe("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)vr.appendChild(document.createTextNode("x")),vr.appendChild(Xe("br"));vr.appendChild(document.createTextNode("x"))}Ye(ie.measure,vr);var ge=vr.offsetHeight/50;return ge>3&&(ie.cachedTextHeight=ge),ze(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");Ye(ie.measure,ge);var fe=ae.getBoundingClientRect(),xe=(fe.right-fe.left)/10;return xe>2&&(ie.cachedCharWidth=xe),xe||10}function Pr(ie){for(var ae=ie.display,ge={},fe={},xe=ae.gutters.clientLeft,ke=ae.gutters.firstChild,Je=0;ke;ke=ke.nextSibling,++Je){var vt=ie.display.gutterSpecs[Je].className;ge[vt]=ke.offsetLeft+ke.clientLeft+xe,fe[vt]=ke.clientWidth}return{fixedPos:Qr(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:ge,gutterWidth:fe,wrapperWidth:ae.wrapper.clientWidth}}function Qr(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function So(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(xe){if(vi(ie.doc,xe))return 0;var ke=0;if(xe.widgets)for(var Je=0;Je<xe.widgets.length;Je++)xe.widgets[Je].height&&(ke+=xe.widgets[Je].height);return ge?ke+(Math.ceil(xe.text.length/fe)||1)*ae:ke+ae}}function hr(ie){var ae=ie.doc,ge=So(ie);ae.iter(function(fe){var xe=ge(fe);xe!=fe.height&&qn(fe,xe)})}function mr(ie,ae,ge,fe){var xe=ie.display;if(!ge&&Nr(ae).getAttribute("cm-not-content")=="true")return null;var ke,Je,vt=xe.lineSpace.getBoundingClientRect();try{ke=ae.clientX-vt.left,Je=ae.clientY-vt.top}catch(Yt){return null}var gt=tn(ie,ke,Je),jt;if(fe&&gt.xRel>0&&(jt=nn(ie.doc,gt.line).text).length==gt.ch){var In=et(jt,jt.length,ie.options.tabSize)-jt.length;gt=En(gt.line,Math.max(0,Math.round((ke-Qi(ie.display).left)/Mi(ie.display))-In))}return gt}function yr(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 ji(ie,ae,ge,fe){ae==null&&(ae=ie.doc.first),ge==null&&(ge=ie.doc.first+ie.doc.size),fe||(fe=0);var xe=ie.display;if(fe&&ge<xe.viewTo&&(xe.updateLineNumbers==null||xe.updateLineNumbers>ae)&&(xe.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=xe.viewTo)Yn&&xo(ie.doc,ae)<xe.viewTo&&Zr(ie);else if(ge<=xe.viewFrom)Yn&&Yr(ie.doc,ge+fe)>xe.viewFrom?Zr(ie):(xe.viewFrom+=fe,xe.viewTo+=fe);else if(ae<=xe.viewFrom&&ge>=xe.viewTo)Zr(ie);else if(ae<=xe.viewFrom){var ke=zo(ie,ge,ge+fe,1);ke?(xe.view=xe.view.slice(ke.index),xe.viewFrom=ke.lineN,xe.viewTo+=fe):Zr(ie)}else if(ge>=xe.viewTo){var Je=zo(ie,ae,ae,-1);Je?(xe.view=xe.view.slice(0,Je.index),xe.viewTo=Je.lineN):Zr(ie)}else{var vt=zo(ie,ae,ae,-1),gt=zo(ie,ge,ge+fe,1);vt&&gt?(xe.view=xe.view.slice(0,vt.index).concat(ps(ie,vt.lineN,gt.lineN)).concat(xe.view.slice(gt.index)),xe.viewTo+=fe):Zr(ie)}var jt=xe.externalMeasured;jt&&(ge<jt.lineN?jt.lineN+=fe:ae<jt.lineN+jt.size&&(xe.externalMeasured=null))}function ki(ie,ae,ge){ie.curOp.viewChanged=!0;var fe=ie.display,xe=ie.display.externalMeasured;if(xe&&ae>=xe.lineN&&ae<xe.lineN+xe.size&&(fe.externalMeasured=null),!(ae<fe.viewFrom||ae>=fe.viewTo)){var ke=fe.view[yr(ie,ae)];if(ke.node!=null){var Je=ke.changes||(ke.changes=[]);Rt(Je,ge)==-1&&Je.push(ge)}}}function Zr(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function zo(ie,ae,ge,fe){var xe=yr(ie,ae),ke,Je=ie.display.view;if(!Yn||ge==ie.doc.first+ie.doc.size)return{index:xe,lineN:ge};for(var vt=ie.display.viewFrom,gt=0;gt<xe;gt++)vt+=Je[gt].size;if(vt!=ae){if(fe>0){if(xe==Je.length-1)return null;ke=vt+Je[xe].size-ae,xe++}else ke=vt-ae;ae+=ke,ge+=ke}for(;xo(ie.doc,ge)!=ge;){if(xe==(fe<0?0:Je.length-1))return null;ge+=fe*Je[xe-(fe<0?1:0)].size,xe+=fe}return{index:xe,lineN:ge}}function br(ie,ae,ge){var fe=ie.display,xe=fe.view;xe.length==0||ae>=fe.viewTo||ge<=fe.viewFrom?(fe.view=ps(ie,ae,ge),fe.viewFrom=ae):(fe.viewFrom>ae?fe.view=ps(ie,ae,fe.viewFrom).concat(fe.view):fe.viewFrom<ae&&(fe.view=fe.view.slice(yr(ie,ae))),fe.viewFrom=ae,fe.viewTo<ge?fe.view=fe.view.concat(ps(ie,fe.viewTo,ge)):fe.viewTo>ge&&(fe.view=fe.view.slice(0,yr(ie,ge)))),fe.viewTo=ge}function Cr(ie){for(var ae=ie.display.view,ge=0,fe=0;fe<ae.length;fe++){var xe=ae[fe];!xe.hidden&&(!xe.node||xe.changes)&&++ge}return ge}function Ir(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function Tr(ie,ae){ae===void 0&&(ae=!0);for(var ge=ie.doc,fe={},xe=fe.cursors=document.createDocumentFragment(),ke=fe.selection=document.createDocumentFragment(),Je=0;Je<ge.sel.ranges.length;Je++)if(!(!ae&&Je==ge.sel.primIndex)){var vt=ge.sel.ranges[Je];if(!(vt.from().line>=ie.display.viewTo||vt.to().line<ie.display.viewFrom)){var gt=vt.empty();(gt||ie.options.showCursorWhenSelecting)&&fr(ie,vt.head,xe),gt||_o(ie,vt,ke)}}return fe}function fr(ie,ae,ge){var fe=La(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),xe=ge.appendChild(Xe("div","\xA0","CodeMirror-cursor"));if(xe.style.left=fe.left+"px",xe.style.top=fe.top+"px",xe.style.height=Math.max(0,fe.bottom-fe.top)*ie.options.cursorHeight+"px",fe.other){var ke=ge.appendChild(Xe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));ke.style.display="",ke.style.left=fe.other.left+"px",ke.style.top=fe.other.top+"px",ke.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function Aa(ie,ae){return ie.top-ae.top||ie.left-ae.left}function _o(ie,ae,ge){var fe=ie.display,xe=ie.doc,ke=document.createDocumentFragment(),Je=Qi(ie.display),vt=Je.left,gt=Math.max(fe.sizerWidth,Ri(ie)-fe.sizer.offsetLeft)-Je.right,jt=xe.direction=="ltr";function In(Bo,ea,_a,Mo){ea<0&&(ea=0),ea=Math.round(ea),Mo=Math.round(Mo),ke.appendChild(Xe("div",null,"CodeMirror-selected","position: absolute; left: "+Bo+`px;
top: `+ea+"px; width: "+(_a==null?gt-Bo:_a)+`px;
height: `+(Mo-ea)+"px"))}function Yt(Bo,ea,_a){var Mo=nn(xe,Bo),rs=Mo.text.length,rl,ru;function xl(Xl,Yu){return Ha(ie,En(Bo,Xl),"div",Mo,Yu)}function Uu(Xl,Yu,hu){var Jl=Tn(ie,Mo,null,Xl),Ds=Yu=="ltr"==(hu=="after")?"left":"right",Sl=hu=="after"?Jl.begin:Jl.end-(/\s/.test(Mo.text.charAt(Jl.end-1))?2:1);return xl(Sl,Ds)[Ds]}var wu=Ke(Mo,xe.direction);return Re(wu,ea||0,_a==null?rs:_a,function(Xl,Yu,hu,Jl){var Ds=hu=="ltr",Sl=xl(Xl,Ds?"left":"right"),uu=xl(Yu-1,Ds?"right":"left"),fu=ea==null&&Xl==0,jc=_a==null&&Yu==rs,Pl=Jl==0,Pc=!wu||Jl==wu.length-1;if(uu.top-Sl.top<=3){var Se=(jt?fu:jc)&&Pl,Ce=(jt?jc:fu)&&Pc,Ie=Se?vt:(Ds?Sl:uu).left,Ve=Ce?gt:(Ds?uu:Sl).right;In(Ie,Sl.top,Ve-Ie,Sl.bottom)}else{var St,xt,It,Zt;Ds?(St=jt&&fu&&Pl?vt:Sl.left,xt=jt?gt:Uu(Xl,hu,"before"),It=jt?vt:Uu(Yu,hu,"after"),Zt=jt&&jc&&Pc?gt:uu.right):(St=jt?Uu(Xl,hu,"before"):vt,xt=!jt&&fu&&Pl?gt:Sl.right,It=!jt&&jc&&Pc?vt:uu.left,Zt=jt?Uu(Yu,hu,"after"):gt),In(St,Sl.top,xt-St,Sl.bottom),Sl.bottom<uu.top&&In(vt,Sl.bottom,null,uu.top),In(It,uu.top,Zt-It,uu.bottom)}(!rl||Aa(Sl,rl)<0)&&(rl=Sl),Aa(uu,rl)<0&&(rl=uu),(!ru||Aa(Sl,ru)<0)&&(ru=Sl),Aa(uu,ru)<0&&(ru=uu)}),{start:rl,end:ru}}var si=ae.from(),ri=ae.to();if(si.line==ri.line)Yt(si.line,si.ch,ri.ch);else{var er=nn(xe,si.line),cr=nn(xe,ri.line),Fr=Eo(er)==Eo(cr),so=Yt(si.line,si.ch,Fr?er.text.length+1:null).end,Zo=Yt(ri.line,Fr?0:null,ri.ch).start;Fr&&(so.top<Zo.top-2?(In(so.right,so.top,null,so.bottom),In(vt,Zo.top,Zo.left,Zo.bottom)):In(so.right,so.top,Zo.left-so.right,so.bottom)),so.bottom<Zo.top&&In(vt,so.bottom,null,Zo.top)}ge.appendChild(ke)}function xa(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()||El(ie),ae.cursorDiv.style.visibility=(ge=!ge)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function Wa(ie){ie.state.focused||(ie.display.input.focus(),Oa(ie))}function wo(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,El(ie))},100)}function Oa(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(en(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(),Me&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),xa(ie))}function El(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(en(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 Mr(ie){for(var ae=ie.display,ge=ae.lineDiv.offsetTop,fe=0;fe<ae.view.length;fe++){var xe=ae.view[fe],ke=ie.options.lineWrapping,Je=void 0,vt=0;if(!xe.hidden){if(We&&ct<8){var gt=xe.node.offsetTop+xe.node.offsetHeight;Je=gt-ge,ge=gt}else{var jt=xe.node.getBoundingClientRect();Je=jt.bottom-jt.top,!ke&&xe.text.firstChild&&(vt=xe.text.firstChild.getBoundingClientRect().right-jt.left-1)}var In=xe.line.height-Je;if((In>.005||In<-.005)&&(qn(xe.line,Je),_s(xe.line),xe.rest))for(var Yt=0;Yt<xe.rest.length;Yt++)_s(xe.rest[Yt]);if(vt>ie.display.sizerWidth){var si=Math.ceil(vt/Mi(ie.display));si>ie.display.maxLineLength&&(ie.display.maxLineLength=si,ie.display.maxLine=xe.line,ie.display.maxLineChanged=!0)}}}}function _s(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 jo(ie,ae,ge){var fe=ge&&ge.top!=null?Math.max(0,ge.top):ie.scroller.scrollTop;fe=Math.floor(fe-On(ie));var xe=ge&&ge.bottom!=null?ge.bottom:fe+ie.wrapper.clientHeight,ke=Bn(ae,fe),Je=Bn(ae,xe);if(ge&&ge.ensure){var vt=ge.ensure.from.line,gt=ge.ensure.to.line;vt<ke?(ke=vt,Je=Bn(ae,io(nn(ae,vt))+ie.wrapper.clientHeight)):Math.min(gt,ae.lastLine())>=Je&&(ke=Bn(ae,io(nn(ae,gt))-ie.wrapper.clientHeight),Je=gt)}return{from:ke,to:Math.max(Je,ke+1)}}function Hs(ie,ae){if(!wn(ie,"scrollCursorIntoView")){var ge=ie.display,fe=ge.sizer.getBoundingClientRect(),xe=null;if(ae.top+fe.top<0?xe=!0:ae.bottom+fe.top>(window.innerHeight||document.documentElement.clientHeight)&&(xe=!1),xe!=null&&!yt){var ke=Xe("div","\u200B",null,`position: absolute;
top: `+(ae.top-ge.viewOffset-On(ie.display))+`px;
height: `+(ae.bottom-ae.top+Vi(ie)+ge.barHeight)+`px;
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(ke),ke.scrollIntoView(xe),ie.display.lineSpace.removeChild(ke)}}}function gl(ie,ae,ge,fe){fe==null&&(fe=0);var xe;!ie.options.lineWrapping&&ae==ge&&(ae=ae.ch?En(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,ge=ae.sticky=="before"?En(ae.line,ae.ch+1,"before"):ae);for(var ke=0;ke<5;ke++){var Je=!1,vt=La(ie,ae),gt=!ge||ge==ae?vt:La(ie,ge);xe={left:Math.min(vt.left,gt.left),top:Math.min(vt.top,gt.top)-fe,right:Math.max(vt.left,gt.left),bottom:Math.max(vt.bottom,gt.bottom)+fe};var jt=ad(ie,xe),In=ie.doc.scrollTop,Yt=ie.doc.scrollLeft;if(jt.scrollTop!=null&&(ac(ie,jt.scrollTop),Math.abs(ie.doc.scrollTop-In)>1&&(Je=!0)),jt.scrollLeft!=null&&(au(ie,jt.scrollLeft),Math.abs(ie.doc.scrollLeft-Yt)>1&&(Je=!0)),!Je)break}return xe}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 xe=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:ge.scroller.scrollTop,ke=_i(ie),Je={};ae.bottom-ae.top>ke&&(ae.bottom=ae.top+ke);var vt=ie.doc.height+ai(ge),gt=ae.top<fe,jt=ae.bottom>vt-fe;if(ae.top<xe)Je.scrollTop=gt?0:ae.top;else if(ae.bottom>xe+ke){var In=Math.min(ae.top,(jt?vt:ae.bottom)-ke);In!=xe&&(Je.scrollTop=In)}var Yt=ie.options.fixedGutter?0:ge.gutters.offsetWidth,si=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:ge.scroller.scrollLeft-Yt,ri=Ri(ie)-ge.gutters.offsetWidth,er=ae.right-ae.left>ri;return er&&(ae.right=ae.left+ri),ae.left<10?Je.scrollLeft=0:ae.left<si?Je.scrollLeft=Math.max(0,ae.left+Yt-(er?0:10)):ae.right>ri+si-3&&(Je.scrollLeft=ae.right+(er?0:10)-ri),Je}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 as(ie,ae){du(ie),ie.curOp.scrollToPos=ae}function du(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var ge=fl(ie,ae.from),fe=fl(ie,ae.to);Rc(ie,ge,fe,ae.margin)}}function Rc(ie,ae,ge,fe){var xe=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,xe.scrollLeft,xe.scrollTop)}function ac(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(le||Rr(ie,{top:ae}),Rd(ie,ae,!0),le&&Rr(ie),Si(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,ua(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+ai(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+Vi(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"),xe=this.horiz=Xe("div",[Xe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=xe.tabIndex=-1,ie(fe),ie(xe),Et(fe,"scroll",function(){fe.clientHeight&&ae(fe.scrollTop,"vertical")}),Et(xe,"scroll",function(){xe.clientWidth&&ae(xe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,We&&ct<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 xe=ie.viewHeight-(ae?fe:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+xe)+"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 ke=ie.viewWidth-ie.barLeft-(ge?fe:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+ke)+"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=ce&&!mt?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ue,this.disableVert=new Ue},Wu.prototype.enableZeroWidthBar=function(ie,ae,ge){ie.style.pointerEvents="auto";function fe(){var xe=ie.getBoundingClientRect(),ke=ge=="vert"?document.elementFromPoint(xe.right-1,(xe.top+xe.bottom)/2):document.elementFromPoint((xe.right+xe.left)/2,xe.bottom-1);ke!=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 xe=0;xe<4&&ge!=ie.display.barWidth||fe!=ie.display.barHeight;xe++)ge!=ie.display.barWidth&&ie.options.lineWrapping&&Mr(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),Et(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 ui(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},tu(ie.curOp)}function fo(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++)it(ae[ge]);for(var fe=0;fe<ae.length;fe++)qe(ae[fe]);for(var xe=0;xe<ae.length;xe++)Xt(ae[xe]);for(var ke=0;ke<ae.length;ke++)Qt(ae[ke]);for(var Je=0;Je<ae.length;Je++)mn(ae[Je])}function it(ie){var ae=ie.cm,ge=ae.display;or(ae),ie.updateMaxLine&&Ca(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 qe(ie){ie.updatedDisplay=ie.mustUpdate&&Ur(ie.cm,ie.update)}function Xt(ie){var ae=ie.cm,ge=ae.display;ie.updatedDisplay&&Mr(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+Vi(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,ge.sizer.offsetLeft+ie.adjustWidthTo-Ri(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==rt();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,ge),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&yc(ae,ie.barMeasure),ie.updatedDisplay&&Ko(ae,ie.barMeasure),ie.selectionChanged&&xa(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),ge&&Wa(ie.cm)}function mn(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 xe=gl(ae,Ai(fe,ie.scrollToPos.from),Ai(fe,ie.scrollToPos.to),ie.scrollToPos.margin);Hs(ae,xe)}var ke=ie.maybeHiddenMarkers,Je=ie.maybeUnhiddenMarkers;if(ke)for(var vt=0;vt<ke.length;++vt)ke[vt].lines.length||en(ke[vt],"hide");if(Je)for(var gt=0;gt<Je.length;++gt)Je[gt].lines.length&&en(Je[gt],"unhide");ge.wrapper.offsetHeight&&(fe.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&en(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function on(ie,ae){if(ie.curOp)return ae();ui(ie);try{return ae()}finally{fo(ie)}}function Un(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);ui(ie);try{return ae.apply(ie,arguments)}finally{fo(ie)}}}function Hn(ie){return function(){if(this.curOp)return ie.apply(this,arguments);ui(this);try{return ie.apply(this,arguments)}finally{fo(this)}}}function Jn(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);ui(ae);try{return ie.apply(this,arguments)}finally{fo(ae)}}}function Si(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Wt(Qn,ie))}function Qn(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var ge=+new Date+ie.options.workTime,fe=ro(ie,ae.highlightFrontier),xe=[];ae.iter(fe.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(ke){if(fe.line>=ie.display.viewFrom){var Je=ke.styles,vt=ke.text.length>ie.options.maxHighlightLength?an(ae.mode,fe.state):null,gt=Po(ie,ke,fe,!0);vt&&(fe.state=vt),ke.styles=gt.styles;var jt=ke.styleClasses,In=gt.classes;In?ke.styleClasses=In:jt&&(ke.styleClasses=null);for(var Yt=!Je||Je.length!=ke.styles.length||jt!=In&&(!jt||!In||jt.bgClass!=In.bgClass||jt.textClass!=In.textClass),si=0;!Yt&&si<Je.length;++si)Yt=Je[si]!=ke.styles[si];Yt&&xe.push(fe.line),ke.stateAfter=fe.save(),fe.nextLine()}else ke.text.length<=ie.options.maxHighlightLength&&Mn(ie,ke.text,fe),ke.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>ge)return Si(ie,ie.options.workDelay),!0}),ae.highlightFrontier=fe.line,ae.modeFrontier=Math.max(ae.modeFrontier,fe.line),xe.length&&on(ie,function(){for(var ke=0;ke<xe.length;ke++)ki(ie,xe[ke],"text")})}}var yi=function(ie,ae,ge){var fe=ie.display;this.viewport=ae,this.visible=jo(fe,ie.doc,ae),this.editorIsHidden=!fe.wrapper.offsetWidth,this.wrapperHeight=fe.wrapper.clientHeight,this.wrapperWidth=fe.wrapper.clientWidth,this.oldDisplayWidth=Ri(ie),this.force=ge,this.dims=Pr(ie),this.events=[]};yi.prototype.signal=function(ie,ae){Rn(ie,ae)&&this.events.push(arguments)},yi.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)en.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=Vi(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Vi(ie)+"px",ae.scrollbarsClipped=!0)}function Ui(ie){if(ie.hasFocus())return null;var ae=rt();if(!ae||!Lt(ie.display.lineDiv,ae))return null;var ge={activeElt:ae};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&Lt(ie.display.lineDiv,fe.anchorNode)&&(ge.anchorNode=fe.anchorNode,ge.anchorOffset=fe.anchorOffset,ge.focusNode=fe.focusNode,ge.focusOffset=fe.focusOffset)}return ge}function Yi(ie){if(!(!ie||!ie.activeElt||ie.activeElt==rt())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Lt(document.body,ie.anchorNode)&&Lt(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 Ur(ie,ae){var ge=ie.display,fe=ie.doc;if(ae.editorIsHidden)return Zr(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&&Cr(ie)==0)return!1;oo(ie)&&(Zr(ie),ae.dims=Pr(ie));var xe=fe.first+fe.size,ke=Math.max(ae.visible.from-ie.options.viewportMargin,fe.first),Je=Math.min(xe,ae.visible.to+ie.options.viewportMargin);ge.viewFrom<ke&&ke-ge.viewFrom<20&&(ke=Math.max(fe.first,ge.viewFrom)),ge.viewTo>Je&&ge.viewTo-Je<20&&(Je=Math.min(xe,ge.viewTo)),Yn&&(ke=xo(ie.doc,ke),Je=Yr(ie.doc,Je));var vt=ke!=ge.viewFrom||Je!=ge.viewTo||ge.lastWrapHeight!=ae.wrapperHeight||ge.lastWrapWidth!=ae.wrapperWidth;br(ie,ke,Je),ge.viewOffset=io(nn(ie.doc,ge.viewFrom)),ie.display.mover.style.top=ge.viewOffset+"px";var gt=Cr(ie);if(!vt&&gt==0&&!ae.force&&ge.renderedView==ge.view&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo))return!1;var jt=Ui(ie);return gt>4&&(ge.lineDiv.style.display="none"),_r(ie,ge.updateLineNumbers,ae.dims),gt>4&&(ge.lineDiv.style.display=""),ge.renderedView=ge.view,Yi(jt),ze(ge.cursorDiv),ze(ge.selectionDiv),ge.gutters.style.height=ge.sizer.style.minHeight=0,vt&&(ge.lastWrapHeight=ae.wrapperHeight,ge.lastWrapWidth=ae.wrapperWidth,Si(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==Ri(ie)){if(ge&&ge.top!=null&&(ge={top:Math.min(ie.doc.height+ai(ie.display)-_i(ie),ge.top)}),ae.visible=jo(ie.display,ie.doc,ge),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else fe&&(ae.visible=jo(ie.display,ie.doc,ge));if(!Ur(ie,ae))break;Mr(ie);var xe=su(ie);Ir(ie),yc(ie,xe),Ko(ie,xe),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 Rr(ie,ae){var ge=new yi(ie,ae);if(Ur(ie,ge)){Mr(ie),rr(ie,ge);var fe=su(ie);Ir(ie),yc(ie,fe),Ko(ie,fe),ge.finish()}}function _r(ie,ae,ge){var fe=ie.display,xe=ie.options.lineNumbers,ke=fe.lineDiv,Je=ke.firstChild;function vt(er){var cr=er.nextSibling;return Me&&ce&&ie.display.currentWheelTarget==er?er.style.display="none":er.parentNode.removeChild(er),cr}for(var gt=fe.view,jt=fe.viewFrom,In=0;In<gt.length;In++){var Yt=gt[In];if(!Yt.hidden)if(!Yt.node||Yt.node.parentNode!=ke){var si=kl(ie,Yt,jt,ge);ke.insertBefore(si,Je)}else{for(;Je!=Yt.node;)Je=vt(Je);var ri=xe&&ae!=null&&ae<=jt&&Yt.lineNumber;Yt.changes&&(Rt(Yt.changes,"gutter")>-1&&(ri=!1),ls(ie,Yt,jt,ge)),ri&&(ze(Yt.lineNumber),Yt.lineNumber.appendChild(document.createTextNode(Ci(ie.options,jt)))),Je=Yt.node.nextSibling}jt+=Yt.size}for(;Je;)Je=vt(Je)}function vo(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Ko(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+Vi(ie)+"px"}function ua(ie){var ae=ie.display,ge=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var fe=Qr(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,xe=ae.gutters.offsetWidth,ke=fe+"px",Je=0;Je<ge.length;Je++)if(!ge[Je].hidden){ie.options.fixedGutter&&(ge[Je].gutter&&(ge[Je].gutter.style.left=ke),ge[Je].gutterBackground&&(ge[Je].gutterBackground.style.left=ke));var vt=ge[Je].alignable;if(vt)for(var gt=0;gt<vt.length;gt++)vt[gt].style.left=ke}ie.options.fixedGutter&&(ae.gutters.style.left=fe+xe+"px")}}function oo(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,ge=Ci(ie.options,ae.first+ae.size-1),fe=ie.display;if(ge.length!=fe.lineNumChars){var xe=fe.measure.appendChild(Xe("div",[Xe("div",ge)],"CodeMirror-linenumber CodeMirror-gutter-elt")),ke=xe.firstChild.offsetWidth,Je=xe.offsetWidth-ke;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(ke,fe.lineGutter.offsetWidth-Je)+1,fe.lineNumWidth=fe.lineNumInnerWidth+Je,fe.lineNumChars=fe.lineNumInnerWidth?ge.length:-1,fe.lineGutter.style.width=fe.lineNumWidth+"px",vo(ie.display),!0}return!1}function Wo(ie,ae){for(var ge=[],fe=!1,xe=0;xe<ie.length;xe++){var ke=ie[xe],Je=null;if(typeof ke!="string"&&(Je=ke.style,ke=ke.className),ke=="CodeMirror-linenumbers")if(ae)fe=!0;else continue;ge.push({className:ke,style:Je})}return ae&&!fe&&ge.push({className:"CodeMirror-linenumbers",style:null}),ge}function ka(ie){var ae=ie.gutters,ge=ie.gutterSpecs;ze(ae),ie.lineGutter=null;for(var fe=0;fe<ge.length;++fe){var xe=ge[fe],ke=xe.className,Je=xe.style,vt=ae.appendChild(Xe("div",null,"CodeMirror-gutter "+ke));Je&&(vt.style.cssText=Je),ke=="CodeMirror-linenumbers"&&(ie.lineGutter=vt,vt.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=ge.length?"":"none",vo(ie)}function uo(ie){ka(ie.display),ji(ie),ua(ie)}function ko(ie,ae,ge,fe){var xe=this;this.input=ge,xe.scrollbarFiller=Xe("div",null,"CodeMirror-scrollbar-filler"),xe.scrollbarFiller.setAttribute("cm-not-content","true"),xe.gutterFiller=Xe("div",null,"CodeMirror-gutter-filler"),xe.gutterFiller.setAttribute("cm-not-content","true"),xe.lineDiv=lt("div",null,"CodeMirror-code"),xe.selectionDiv=Xe("div",null,null,"position: relative; z-index: 1"),xe.cursorDiv=Xe("div",null,"CodeMirror-cursors"),xe.measure=Xe("div",null,"CodeMirror-measure"),xe.lineMeasure=Xe("div",null,"CodeMirror-measure"),xe.lineSpace=lt("div",[xe.measure,xe.lineMeasure,xe.selectionDiv,xe.cursorDiv,xe.lineDiv],null,"position: relative; outline: none");var ke=lt("div",[xe.lineSpace],"CodeMirror-lines");xe.mover=Xe("div",[ke],null,"position: relative"),xe.sizer=Xe("div",[xe.mover],"CodeMirror-sizer"),xe.sizerWidth=null,xe.heightForcer=Xe("div",null,null,"position: absolute; height: "+Pn+"px; width: 1px;"),xe.gutters=Xe("div",null,"CodeMirror-gutters"),xe.lineGutter=null,xe.scroller=Xe("div",[xe.sizer,xe.heightForcer,xe.gutters],"CodeMirror-scroll"),xe.scroller.setAttribute("tabIndex","-1"),xe.wrapper=Xe("div",[xe.scrollbarFiller,xe.gutterFiller,xe.scroller],"CodeMirror"),We&&ct<8&&(xe.gutters.style.zIndex=-1,xe.scroller.style.paddingRight=0),!Me&&!(le&&ee)&&(xe.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(xe.wrapper):ie(xe.wrapper)),xe.viewFrom=xe.viewTo=ae.first,xe.reportedViewFrom=xe.reportedViewTo=ae.first,xe.view=[],xe.renderedView=null,xe.externalMeasured=null,xe.viewOffset=0,xe.lastWrapHeight=xe.lastWrapWidth=0,xe.updateLineNumbers=null,xe.nativeBarWidth=xe.barHeight=xe.barWidth=0,xe.scrollbarsClipped=!1,xe.lineNumWidth=xe.lineNumInnerWidth=xe.lineNumChars=null,xe.alignWidgets=!1,xe.cachedCharWidth=xe.cachedTextHeight=xe.cachedPaddingH=null,xe.maxLine=null,xe.maxLineLength=0,xe.maxLineChanged=!1,xe.wheelDX=xe.wheelDY=xe.wheelStartX=xe.wheelStartY=null,xe.shift=!1,xe.selForContextMenu=null,xe.activeTouch=null,xe.gutterSpecs=Wo(fe.gutters,fe.lineNumbers),ka(xe),ge.init(xe)}var co=0,Lr=null;We?Lr=-.53:le?Lr=15:Pt?Lr=-.7:ut&&(Lr=-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*=Lr,ae.y*=Lr,ae}function Sa(ie,ae){var ge=Fo(ae),fe=ge.x,xe=ge.y,ke=ie.display,Je=ke.scroller,vt=Je.scrollWidth>Je.clientWidth,gt=Je.scrollHeight>Je.clientHeight;if(fe&&vt||xe&&gt){if(xe&&ce&&Me){e:for(var jt=ae.target,In=ke.view;jt!=Je;jt=jt.parentNode)for(var Yt=0;Yt<In.length;Yt++)if(In[Yt].node==jt){ie.display.currentWheelTarget=jt;break e}}if(fe&&!le&&!Ge&&Lr!=null){xe&&gt&&ac(ie,Math.max(0,Je.scrollTop+xe*Lr)),au(ie,Math.max(0,Je.scrollLeft+fe*Lr)),(!xe||xe&&gt)&&Pi(ae),ke.wheelStartX=null;return}if(xe&&Lr!=null){var si=xe*Lr,ri=ie.doc.scrollTop,er=ri+ke.wrapper.clientHeight;si<0?ri=Math.max(0,ri+si-50):er=Math.min(ie.doc.height,er+si+50),Rr(ie,{top:ri,bottom:er})}co<20&&(ke.wheelStartX==null?(ke.wheelStartX=Je.scrollLeft,ke.wheelStartY=Je.scrollTop,ke.wheelDX=fe,ke.wheelDY=xe,setTimeout(function(){if(ke.wheelStartX!=null){var cr=Je.scrollLeft-ke.wheelStartX,Fr=Je.scrollTop-ke.wheelStartY,so=Fr&&ke.wheelDY&&Fr/ke.wheelDY||cr&&ke.wheelDX&&cr/ke.wheelDX;ke.wheelStartX=ke.wheelStartY=null,so&&(Lr=(Lr*co+so)/(co+1),++co)}},200)):(ke.wheelDX+=fe,ke.wheelDY+=xe))}}var Pa=function(ie,ae){this.ranges=ie,this.primIndex=ae};Pa.prototype.primary=function(){return this.ranges[this.primIndex]},Pa.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(!bn(ge.anchor,fe.anchor)||!bn(ge.head,fe.head))return!1}return!0},Pa.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new ao(Ei(this.ranges[ae].anchor),Ei(this.ranges[ae].head));return new Pa(ie,this.primIndex)},Pa.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Pa.prototype.contains=function(ie,ae){ae||(ae=ie);for(var ge=0;ge<this.ranges.length;ge++){var fe=this.ranges[ge];if(un(ae,fe.from())>=0&&un(ie,fe.to())<=0)return ge}return-1};var ao=function(ie,ae){this.anchor=ie,this.head=ae};ao.prototype.from=function(){return mi(this.anchor,this.head)},ao.prototype.to=function(){return Ni(this.anchor,this.head)},ao.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,xe=ae[ge];ae.sort(function(si,ri){return un(si.from(),ri.from())}),ge=Rt(ae,xe);for(var ke=1;ke<ae.length;ke++){var Je=ae[ke],vt=ae[ke-1],gt=un(vt.to(),Je.from());if(fe&&!Je.empty()?gt>0:gt>=0){var jt=mi(vt.from(),Je.from()),In=Ni(vt.to(),Je.to()),Yt=vt.empty()?Je.from()==Je.head:vt.from()==vt.head;ke<=ge&&--ge,ae.splice(--ke,2,new ao(Yt?In:jt,Yt?jt:In))}}return new Pa(ae,ge)}function Ka(ie,ae){return new Pa([new ao(ie,ae||ie)],0)}function bs(ie){return ie.text?En(ie.from.line+ie.text.length-1,Ct(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function us(ie,ae){if(un(ie,ae.from)<0)return ie;if(un(ie,ae.to)<=0)return bs(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+=bs(ae).ch-ae.to.ch),En(ge,fe)}function qs(ie,ae){for(var ge=[],fe=0;fe<ie.sel.ranges.length;fe++){var xe=ie.sel.ranges[fe];ge.push(new ao(us(xe.anchor,ae),us(xe.head,ae)))}return Ta(ie.cm,ge,ie.sel.primIndex)}function Ls(ie,ae,ge){return ie.line==ae.line?En(ge.line,ie.ch-ae.ch+ge.ch):En(ge.line+(ie.line-ae.line),ie.ch)}function Za(ie,ae,ge){for(var fe=[],xe=En(ie.first,0),ke=xe,Je=0;Je<ae.length;Je++){var vt=ae[Je],gt=Ls(vt.from,xe,ke),jt=Ls(bs(vt),xe,ke);if(xe=vt.to,ke=jt,ge=="around"){var In=ie.sel.ranges[Je],Yt=un(In.head,In.anchor)<0;fe[Je]=new ao(Yt?jt:gt,Yt?gt:jt)}else fe[Je]=new ao(gt,gt)}return new Pa(fe,ie.sel.primIndex)}function aa(ie){ie.doc.mode=zt(ie.options,ie.doc.modeOption),fs(ie)}function fs(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,Si(ie,100),ie.state.modeGen++,ie.curOp&&ji(ie)}function el(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&Ct(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Ws(ie,ae,ge,fe){function xe(Zo){return ge?ge[Zo]:null}function ke(Zo,Bo,ea){$a(Zo,Bo,ea,fe),dr(Zo,"change",Zo,ae)}function Je(Zo,Bo){for(var ea=[],_a=Zo;_a<Bo;++_a)ea.push(new fa(jt[_a],xe(_a),fe));return ea}var vt=ae.from,gt=ae.to,jt=ae.text,In=nn(ie,vt.line),Yt=nn(ie,gt.line),si=Ct(jt),ri=xe(jt.length-1),er=gt.line-vt.line;if(ae.full)ie.insert(0,Je(0,jt.length)),ie.remove(jt.length,ie.size-jt.length);else if(el(ie,ae)){var cr=Je(0,jt.length-1);ke(Yt,Yt.text,ri),er&&ie.remove(vt.line,er),cr.length&&ie.insert(vt.line,cr)}else if(In==Yt)if(jt.length==1)ke(In,In.text.slice(0,vt.ch)+si+In.text.slice(gt.ch),ri);else{var Fr=Je(1,jt.length-1);Fr.push(new fa(si+In.text.slice(gt.ch),ri,fe)),ke(In,In.text.slice(0,vt.ch)+jt[0],xe(0)),ie.insert(vt.line+1,Fr)}else if(jt.length==1)ke(In,In.text.slice(0,vt.ch)+jt[0]+Yt.text.slice(gt.ch),xe(0)),ie.remove(vt.line+1,er);else{ke(In,In.text.slice(0,vt.ch)+jt[0],xe(0)),ke(Yt,si+Yt.text.slice(gt.ch),ri);var so=Je(1,jt.length-1);er>1&&ie.remove(vt.line+1,er-1),ie.insert(vt.line+1,so)}dr(ie,"change",ie,ae)}function cl(ie,ae,ge){function fe(xe,ke,Je){if(xe.linked)for(var vt=0;vt<xe.linked.length;++vt){var gt=xe.linked[vt];if(gt.doc!=ke){var jt=Je&&gt.sharedHist;ge&&!jt||(ae(gt.doc,jt),fe(gt.doc,xe,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,hr(ie),aa(ie),da(ie),ie.options.lineWrapping||Ca(ie),ie.options.mode=ae.modeOption,ji(ie)}function da(ie){(ie.doc.direction=="rtl"?Ot:je)(ie.display.lineDiv,"CodeMirror-rtl")}function wa(ie){on(ie,function(){da(ie),ji(ie)})}function Xo(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 Ps(ie,ae){var ge={from:Ei(ae.from),to:bs(ae),text:vn(ie,ae.from,ae.to)};return Kl(ie,ge,ae.from.line,ae.to.line+1),cl(ie,function(fe){return Kl(fe,ge,ae.from.line,ae.to.line+1)},!0),ge}function Uo(ie){for(;ie.length;){var ae=Ct(ie);if(ae.ranges)ie.pop();else break}}function Ra(ie,ae){if(ae)return Uo(ie.done),Ct(ie.done);if(ie.done.length&&!Ct(ie.done).ranges)return Ct(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),Ct(ie.done)}function ss(ie,ae,ge,fe){var xe=ie.history;xe.undone.length=0;var ke=+new Date,Je,vt;if((xe.lastOp==fe||xe.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&xe.lastModTime>ke-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(Je=Ra(xe,xe.lastOp==fe)))vt=Ct(Je.changes),un(ae.from,ae.to)==0&&un(ae.from,vt.to)==0?vt.to=bs(ae):Je.changes.push(Ps(ie,ae));else{var gt=Ct(xe.done);for((!gt||!gt.ranges)&&bl(ie.sel,xe.done),Je={changes:[Ps(ie,ae)],generation:xe.generation},xe.done.push(Je);xe.done.length>xe.undoDepth;)xe.done.shift(),xe.done[0].ranges||xe.done.shift()}xe.done.push(ge),xe.generation=++xe.maxGeneration,xe.lastModTime=xe.lastSelTime=ke,xe.lastOp=xe.lastSelOp=fe,xe.lastOrigin=xe.lastSelOrigin=ae.origin,vt||en(ie,"historyAdded")}function cs(ie,ae,ge,fe){var xe=ae.charAt(0);return xe=="*"||xe=="+"&&ge.ranges.length==fe.ranges.length&&ge.somethingSelected()==fe.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Al(ie,ae,ge,fe){var xe=ie.history,ke=fe&&fe.origin;ge==xe.lastSelOp||ke&&xe.lastSelOrigin==ke&&(xe.lastModTime==xe.lastSelTime&&xe.lastOrigin==ke||cs(ie,ke,Ct(xe.done),ae))?xe.done[xe.done.length-1]=ae:bl(ae,xe.done),xe.lastSelTime=+new Date,xe.lastSelOrigin=ke,xe.lastSelOp=ge,fe&&fe.clearRedo!==!1&&Uo(xe.undone)}function bl(ie,ae){var ge=Ct(ae);ge&&ge.ranges&&ge.equals(ie)||ae.push(ie)}function Kl(ie,ae,ge,fe){var xe=ae["spans_"+ie.id],ke=0;ie.iter(Math.max(ie.first,ge),Math.min(ie.first+ie.size,fe),function(Je){Je.markedSpans&&((xe||(xe=ae["spans_"+ie.id]={}))[ke]=Je.markedSpans),++ke})}function Fs(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 Zl(ie,ae){var ge=ae["spans_"+ie.id];if(!ge)return null;for(var fe=[],xe=0;xe<ae.text.length;++xe)fe.push(Fs(ge[xe]));return fe}function dl(ie,ae){var ge=Zl(ie,ae),fe=Er(ie,ae);if(!ge)return fe;if(!fe)return ge;for(var xe=0;xe<ge.length;++xe){var ke=ge[xe],Je=fe[xe];if(ke&&Je)e:for(var vt=0;vt<Je.length;++vt){for(var gt=Je[vt],jt=0;jt<ke.length;++jt)if(ke[jt].marker==gt.marker)continue e;ke.push(gt)}else Je&&(ge[xe]=Je)}return ge}function Fl(ie,ae,ge){for(var fe=[],xe=0;xe<ie.length;++xe){var ke=ie[xe];if(ke.ranges){fe.push(ge?Pa.prototype.deepCopy.call(ke):ke);continue}var Je=ke.changes,vt=[];fe.push({changes:vt});for(var gt=0;gt<Je.length;++gt){var jt=Je[gt],In=void 0;if(vt.push({from:jt.from,to:jt.to,text:jt.text}),ae)for(var Yt in jt)(In=Yt.match(/^spans_(\d+)$/))&&Rt(ae,Number(In[1]))>-1&&(Ct(vt)[Yt]=jt[Yt],delete jt[Yt])}}return fe}function _c(ie,ae,ge,fe){if(fe){var xe=ie.anchor;if(ge){var ke=un(ae,xe)<0;ke!=un(ge,xe)<0?(xe=ae,ae=ge):ke!=un(ae,ge)<0&&(ae=ge)}return new ao(xe,ae)}else return new ao(ge||ae,ae)}function Bs(ie,ae,ge,fe,xe){xe==null&&(xe=ie.cm&&(ie.cm.display.shift||ie.extend)),js(ie,new Pa([_c(ie.sel.primary(),ae,ge,xe)],0),fe)}function ks(ie,ae,ge){for(var fe=[],xe=ie.cm&&(ie.cm.display.shift||ie.extend),ke=0;ke<ie.sel.ranges.length;ke++)fe[ke]=_c(ie.sel.ranges[ke],ae[ke],null,xe);var Je=Ta(ie.cm,fe,ie.sel.primIndex);js(ie,Je,ge)}function Ms(ie,ae,ge,fe){var xe=ie.sel.ranges.slice(0);xe[ae]=ge,js(ie,Ta(ie.cm,xe,ie.sel.primIndex),fe)}function Gs(ie,ae,ge,fe){js(ie,Ka(ae,ge),fe)}function pl(ie,ae,ge){var fe={ranges:ae.ranges,update:function(xe){this.ranges=[];for(var ke=0;ke<xe.length;ke++)this.ranges[ke]=new ao(Ai(ie,xe[ke].anchor),Ai(ie,xe[ke].head))},origin:ge&&ge.origin};return en(ie,"beforeSelectionChange",ie,fe),ie.cm&&en(ie.cm,"beforeSelectionChange",ie.cm,fe),fe.ranges!=ae.ranges?Ta(ie.cm,fe.ranges,fe.ranges.length-1):ae}function is(ie,ae,ge){var fe=ie.history.done,xe=Ct(fe);xe&&xe.ranges?(fe[fe.length-1]=ae,Dl(ie,ae,ge)):js(ie,ae,ge)}function js(ie,ae,ge){Dl(ie,ae,ge),Al(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,ge)}function Dl(ie,ae,ge){(Rn(ie,"beforeSelectionChange")||ie.cm&&Rn(ie.cm,"beforeSelectionChange"))&&(ae=pl(ie,ae,ge));var fe=ge&&ge.bias||(un(ae.primary().head,ie.sel.primary().head)<0?-1:1);Ul(ie,Du(ie,ae,fe,!0)),!(ge&&ge.scroll===!1)&&ie.cm&&oc(ie.cm)}function Ul(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,hi(ie.cm)),dr(ie,"cursorActivity",ie))}function Gu(ie){Ul(ie,Du(ie,ie.sel,null,!1))}function Du(ie,ae,ge,fe){for(var xe,ke=0;ke<ae.ranges.length;ke++){var Je=ae.ranges[ke],vt=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[ke],gt=Iu(ie,Je.anchor,vt&&vt.anchor,ge,fe),jt=Iu(ie,Je.head,vt&&vt.head,ge,fe);(xe||gt!=Je.anchor||jt!=Je.head)&&(xe||(xe=ae.ranges.slice(0,ke)),xe[ke]=new ao(gt,jt))}return xe?Ta(ie.cm,xe,ae.primIndex):ae}function ml(ie,ae,ge,fe,xe){var ke=nn(ie,ae.line);if(ke.markedSpans)for(var Je=0;Je<ke.markedSpans.length;++Je){var vt=ke.markedSpans[Je],gt=vt.marker,jt="selectLeft"in gt?!gt.selectLeft:gt.inclusiveLeft,In="selectRight"in gt?!gt.selectRight:gt.inclusiveRight;if((vt.from==null||(jt?vt.from<=ae.ch:vt.from<ae.ch))&&(vt.to==null||(In?vt.to>=ae.ch:vt.to>ae.ch))){if(xe&&(en(gt,"beforeCursorEnter"),gt.explicitlyCleared))if(ke.markedSpans){--Je;continue}else break;if(!gt.atomic)continue;if(ge){var Yt=gt.find(fe<0?1:-1),si=void 0;if((fe<0?In:jt)&&(Yt=Ou(ie,Yt,-fe,Yt&&Yt.line==ae.line?ke:null)),Yt&&Yt.line==ae.line&&(si=un(Yt,ge))&&(fe<0?si<0:si>0))return ml(ie,Yt,ae,fe,xe)}var ri=gt.find(fe<0?-1:1);return(fe<0?jt:In)&&(ri=Ou(ie,ri,fe,ri.line==ae.line?ke:null)),ri?ml(ie,ri,ae,fe,xe):null}}return ae}function Iu(ie,ae,ge,fe,xe){var ke=fe||1,Je=ml(ie,ae,ge,ke,xe)||!xe&&ml(ie,ae,ge,ke,!0)||ml(ie,ae,ge,-ke,xe)||!xe&&ml(ie,ae,ge,-ke,!0);return Je||(ie.cantEdit=!0,En(ie.first,0))}function Ou(ie,ae,ge,fe){return ge<0&&ae.ch==0?ae.line>ie.first?Ai(ie,En(ae.line-1)):null:ge>0&&ae.ch==(fe||nn(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?En(ae.line+1,0):null:new En(ae.line,ae.ch+ge)}function Ns(ie){ie.setSelection(En(ie.firstLine(),0),En(ie.lastLine()),_t)}function Hl(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(xe,ke,Je,vt){xe&&(fe.from=Ai(ie,xe)),ke&&(fe.to=Ai(ie,ke)),Je&&(fe.text=Je),vt!==void 0&&(fe.origin=vt)}),en(ie,"beforeChange",ie,fe),ie.cm&&en(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 Un(ie.cm,$s)(ie,ae,ge);if(ie.cm.state.suppressEdits)return}if(!((Rn(ie,"beforeChange")||ie.cm&&Rn(ie.cm,"beforeChange"))&&(ae=Hl(ie,ae,!0),!ae))){var fe=Kr&&!ge&&Yo(ie,ae.from,ae.to);if(fe)for(var xe=fe.length-1;xe>=0;--xe)zs(ie,{from:fe[xe].from,to:fe[xe].to,text:xe?[""]:ae.text,origin:ae.origin});else zs(ie,ae)}}function zs(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&un(ae.from,ae.to)==0)){var ge=qs(ie,ae);ss(ie,ae,ge,ie.cm?ie.cm.curOp.id:NaN),sc(ie,ae,ge,Er(ie,ae));var fe=[];cl(ie,function(xe,ke){!ke&&Rt(fe,xe.history)==-1&&(Ys(xe.history,ae),fe.push(xe.history)),sc(xe,ae,null,Er(xe,ae))})}}function $u(ie,ae,ge){var fe=ie.cm&&ie.cm.state.suppressEdits;if(!(fe&&!ge)){for(var xe=ie.history,ke,Je=ie.sel,vt=ae=="undo"?xe.done:xe.undone,gt=ae=="undo"?xe.undone:xe.done,jt=0;jt<vt.length&&(ke=vt[jt],!(ge?ke.ranges&&!ke.equals(ie.sel):!ke.ranges));jt++);if(jt!=vt.length){for(xe.lastOrigin=xe.lastSelOrigin=null;;)if(ke=vt.pop(),ke.ranges){if(bl(ke,gt),ge&&!ke.equals(ie.sel)){js(ie,ke,{clearRedo:!1});return}Je=ke}else if(fe){vt.push(ke);return}else break;var In=[];bl(Je,gt),gt.push({changes:In,generation:xe.generation}),xe.generation=ke.generation||++xe.maxGeneration;for(var Yt=Rn(ie,"beforeChange")||ie.cm&&Rn(ie.cm,"beforeChange"),si=function(cr){var Fr=ke.changes[cr];if(Fr.origin=ae,Yt&&!Hl(ie,Fr,!1))return vt.length=0,{};In.push(Ps(ie,Fr));var so=cr?qs(ie,Fr):Ct(vt);sc(ie,Fr,so,dl(ie,Fr)),!cr&&ie.cm&&ie.cm.scrollIntoView({from:Fr.from,to:bs(Fr)});var Zo=[];cl(ie,function(Bo,ea){!ea&&Rt(Zo,Bo.history)==-1&&(Ys(Bo.history,Fr),Zo.push(Bo.history)),sc(Bo,Fr,null,dl(Bo,Fr))})},ri=ke.changes.length-1;ri>=0;--ri){var er=si(ri);if(er)return er.v}}}}function Kc(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Pa(Wn(ie.sel.ranges,function(xe){return new ao(En(xe.anchor.line+ae,xe.anchor.ch),En(xe.head.line+ae,xe.head.ch))}),ie.sel.primIndex),ie.cm)){ji(ie.cm,ie.first,ie.first-ae,ae);for(var ge=ie.cm.display,fe=ge.viewFrom;fe<ge.viewTo;fe++)ki(ie.cm,fe,"gutter")}}function sc(ie,ae,ge,fe){if(ie.cm&&!ie.cm.curOp)return Un(ie.cm,sc)(ie,ae,ge,fe);if(ae.to.line<ie.first){Kc(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 xe=ae.text.length-1-(ie.first-ae.from.line);Kc(ie,xe),ae={from:En(ie.first,0),to:En(ae.to.line+xe,ae.to.ch),text:[Ct(ae.text)],origin:ae.origin}}var ke=ie.lastLine();ae.to.line>ke&&(ae={from:ae.from,to:En(ke,nn(ie,ke).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=vn(ie,ae.from,ae.to),ge||(ge=qs(ie,ae)),ie.cm?lc(ie.cm,ae,fe):Ws(ie,ae,fe),Dl(ie,ge,_t),ie.cantEdit&&Iu(ie,En(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function lc(ie,ae,ge){var fe=ie.doc,xe=ie.display,ke=ae.from,Je=ae.to,vt=!1,gt=ke.line;ie.options.lineWrapping||(gt=Ft(Eo(nn(fe,ke.line))),fe.iter(gt,Je.line+1,function(ri){if(ri==xe.maxLine)return vt=!0,!0})),fe.sel.contains(ae.from,ae.to)>-1&&hi(ie),Ws(fe,ae,ge,So(ie)),ie.options.lineWrapping||(fe.iter(gt,ke.line+ae.text.length,function(ri){var er=Ja(ri);er>xe.maxLineLength&&(xe.maxLine=ri,xe.maxLineLength=er,xe.maxLineChanged=!0,vt=!1)}),vt&&(ie.curOp.updateMaxLine=!0)),kr(fe,ke.line),Si(ie,400);var jt=ae.text.length-(Je.line-ke.line)-1;ae.full?ji(ie):ke.line==Je.line&&ae.text.length==1&&!el(ie.doc,ae)?ki(ie,ke.line,"text"):ji(ie,ke.line,Je.line+1,jt);var In=Rn(ie,"changes"),Yt=Rn(ie,"change");if(Yt||In){var si={from:ke,to:Je,text:ae.text,removed:ae.removed,origin:ae.origin};Yt&&dr(ie,"change",ie,si),In&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(si)}ie.display.selForContextMenu=null}function Vu(ie,ae,ge,fe,xe){var ke;fe||(fe=ge),un(fe,ge)<0&&(ke=[fe,ge],ge=ke[0],fe=ke[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),$s(ie,{from:ge,to:fe,text:ae,origin:xe})}function ku(ie,ae,ge,fe){ge<ie.line?ie.line+=fe:ae<ie.line&&(ie.line=ae,ie.ch=0)}function ws(ie,ae,ge,fe){for(var xe=0;xe<ie.length;++xe){var ke=ie[xe],Je=!0;if(ke.ranges){ke.copied||(ke=ie[xe]=ke.deepCopy(),ke.copied=!0);for(var vt=0;vt<ke.ranges.length;vt++)ku(ke.ranges[vt].anchor,ae,ge,fe),ku(ke.ranges[vt].head,ae,ge,fe);continue}for(var gt=0;gt<ke.changes.length;++gt){var jt=ke.changes[gt];if(ge<jt.from.line)jt.from=En(jt.from.line+fe,jt.from.ch),jt.to=En(jt.to.line+fe,jt.to.ch);else if(ae<=jt.to.line){Je=!1;break}}Je||(ie.splice(0,xe+1),xe=0)}}function Ys(ie,ae){var ge=ae.from.line,fe=ae.to.line,xe=ae.text.length-(fe-ge)-1;ws(ie.done,ge,fe,xe),ws(ie.undone,ge,fe,xe)}function vl(ie,ae,ge,fe){var xe=ae,ke=ae;return typeof ae=="number"?ke=nn(ie,Di(ie,ae)):xe=Ft(ae),xe==null?null:(fe(ke,xe)&&ie.cm&&ki(ie.cm,xe,ge),ke)}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 xe=this.lines[ge];this.height-=xe.height,Qa(xe),dr(xe,"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 ms(ie){this.children=ie;for(var ae=0,ge=0,fe=0;fe<ie.length;++fe){var xe=ie[fe];ae+=xe.chunkSize(),ge+=xe.height,xe.parent=this}this.size=ae,this.height=ge,this.parent=null}ms.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],xe=fe.chunkSize();if(ie<xe){var ke=Math.min(ae,xe-ie),Je=fe.height;if(fe.removeInner(ie,ke),this.height-=Je-fe.height,xe==ke&&(this.children.splice(ge--,1),fe.parent=null),(ae-=ke)==0)break;ie=0}else ie-=xe}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof Xs))){var vt=[];this.collapse(vt),this.children=[new Xs(vt)],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 xe=this.children[fe],ke=xe.chunkSize();if(ie<=ke){if(xe.insertInner(ie,ae,ge),xe.lines&&xe.lines.length>50){for(var Je=xe.lines.length%25+25,vt=Je;vt<xe.lines.length;){var gt=new Xs(xe.lines.slice(vt,vt+=25));xe.height-=gt.height,this.children.splice(++fe,0,gt),gt.parent=this}xe.lines=xe.lines.slice(0,Je),this.maybeSpill()}break}ie-=ke}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),ge=new ms(ae);if(ie.parent){ie.size-=ge.size,ie.height-=ge.height;var xe=Rt(ie.parent.children,ie);ie.parent.children.splice(xe+1,0,ge)}else{var fe=new ms(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 xe=this.children[fe],ke=xe.chunkSize();if(ie<ke){var Je=Math.min(ae,ke-ie);if(xe.iterN(ie,Je,ge))return!0;if((ae-=Je)==0)break;ie=0}else ie-=ke}}};var yl=function(ie,ae,ge){if(ge)for(var fe in ge)ge.hasOwnProperty(fe)&&(this[fe]=ge[fe]);this.doc=ie,this.node=ae};yl.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,ge=this.line,fe=Ft(ge);if(!(fe==null||!ae)){for(var xe=0;xe<ae.length;++xe)ae[xe]==this&&ae.splice(xe--,1);ae.length||(ge.widgets=null);var ke=zl(this);qn(ge,Math.max(0,ge.height-ke)),ie&&(on(ie,function(){Su(ie,ge,-ke),ki(ie,fe,"widget")}),dr(ie,"lineWidgetCleared",ie,this,fe))}},yl.prototype.changed=function(){var ie=this,ae=this.height,ge=this.doc.cm,fe=this.line;this.height=null;var xe=zl(this)-ae;xe&&(vi(this.doc,fe)||qn(fe,fe.height+xe),ge&&on(ge,function(){ge.curOp.forceUpdate=!0,Su(ge,fe,xe),dr(ge,"lineWidgetChanged",ge,ie,Ft(fe))}))},Sn(yl);function Su(ie,ae,ge){io(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Tc(ie,ge)}function xc(ie,ae,ge,fe){var xe=new yl(ie,ge,fe),ke=ie.cm;return ke&&xe.noHScroll&&(ke.display.alignWidgets=!0),vl(ie,ae,"widget",function(Je){var vt=Je.widgets||(Je.widgets=[]);if(xe.insertAt==null?vt.push(xe):vt.splice(Math.min(vt.length-1,Math.max(0,xe.insertAt)),0,xe),xe.line=Je,ke&&!vi(ie,Je)){var gt=io(Je)<ie.scrollTop;qn(Je,Je.height+zl(xe)),gt&&Tc(ke,xe.height),ke.curOp.forceUpdate=!0}return!0}),ke&&dr(ke,"lineWidgetAdded",ke,xe,typeof ae=="number"?ae:Ft(ae)),xe}var jd=0,hn=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++jd};hn.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&ui(ie),Rn(this,"clear")){var ge=this.find();ge&&dr(this,"clear",ge.from,ge.to)}for(var fe=null,xe=null,ke=0;ke<this.lines.length;++ke){var Je=this.lines[ke],vt=Qo(Je.markedSpans,this);ie&&!this.collapsed?ki(ie,Ft(Je),"text"):ie&&(vt.to!=null&&(xe=Ft(Je)),vt.from!=null&&(fe=Ft(Je))),Je.markedSpans=nr(Je.markedSpans,vt),vt.from==null&&this.collapsed&&!vi(this.doc,Je)&&ie&&qn(Je,lr(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var gt=0;gt<this.lines.length;++gt){var jt=Eo(this.lines[gt]),In=Ja(jt);In>ie.display.maxLineLength&&(ie.display.maxLine=jt,ie.display.maxLineLength=In,ie.display.maxLineChanged=!0)}fe!=null&&ie&&this.collapsed&&ji(ie,fe,xe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Gu(ie.doc)),ie&&dr(ie,"markerCleared",ie,this,fe,xe),ae&&fo(ie),this.parent&&this.parent.clear()}},hn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var ge,fe,xe=0;xe<this.lines.length;++xe){var ke=this.lines[xe],Je=Qo(ke.markedSpans,this);if(Je.from!=null&&(ge=En(ae?ke:Ft(ke),Je.from),ie==-1))return ge;if(Je.to!=null&&(fe=En(ae?ke:Ft(ke),Je.to),ie==1))return fe}return ge&&{from:ge,to:fe}},hn.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),ge=this,fe=this.doc.cm;!ae||!fe||on(fe,function(){var xe=ae.line,ke=Ft(ae.line),Je=ga(fe,ke);if(Je&&(Vo(Je),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!vi(ge.doc,xe)&&ge.height!=null){var vt=ge.height;ge.height=null;var gt=zl(ge)-vt;gt&&qn(xe,xe.height+gt)}dr(fe,"markerChanged",fe,ie)})},hn.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)},hn.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)}},Sn(hn);function sd(ie,ae,ge,fe,xe){if(fe&&fe.shared)return df(ie,ae,ge,fe,xe);if(ie.cm&&!ie.cm.curOp)return Un(ie.cm,sd)(ie,ae,ge,fe,xe);var ke=new hn(ie,xe),Je=un(ae,ge);if(fe&&Mt(fe,ke,!1),Je>0||Je==0&&ke.clearWhenEmpty!==!1)return ke;if(ke.replacedWith&&(ke.collapsed=!0,ke.widgetNode=lt("span",[ke.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||ke.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(ke.widgetNode.insertLeft=!0)),ke.collapsed){if(la(ie,ae.line,ae,ge,ke)||ae.line!=ge.line&&la(ie,ge.line,ae,ge,ke))throw new Error("Inserting collapsed marker partially overlapping an existing one");Xn()}ke.addToHistory&&ss(ie,{from:ae,to:ge,origin:"markText"},ie.sel,NaN);var vt=ae.line,gt=ie.cm,jt;if(ie.iter(vt,ge.line+1,function(Yt){gt&&ke.collapsed&&!gt.options.lineWrapping&&Eo(Yt)==gt.display.maxLine&&(jt=!0),ke.collapsed&&vt!=ae.line&&qn(Yt,0),qo(Yt,new Ao(ke,vt==ae.line?ae.ch:null,vt==ge.line?ge.ch:null)),++vt}),ke.collapsed&&ie.iter(ae.line,ge.line+1,function(Yt){vi(ie,Yt)&&qn(Yt,0)}),ke.clearOnEnter&&Et(ke,"beforeCursorEnter",function(){return ke.clear()}),ke.readOnly&&(Ho(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),ke.collapsed&&(ke.id=++jd,ke.atomic=!0),gt){if(jt&&(gt.curOp.updateMaxLine=!0),ke.collapsed)ji(gt,ae.line,ge.line+1);else if(ke.className||ke.startStyle||ke.endStyle||ke.css||ke.attributes||ke.title)for(var In=ae.line;In<=ge.line;In++)ki(gt,In,"text");ke.atomic&&Gu(gt.doc),dr(gt,"markerAdded",gt,ke)}return ke}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();dr(this,"clear")}},Bc.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Sn(Bc);function df(ie,ae,ge,fe,xe){fe=Mt(fe),fe.shared=!1;var ke=[sd(ie,ae,ge,fe,xe)],Je=ke[0],vt=fe.widgetNode;return cl(ie,function(gt){vt&&(fe.widgetNode=vt.cloneNode(!0)),ke.push(sd(gt,Ai(gt,ae),Ai(gt,ge),fe,xe));for(var jt=0;jt<gt.linked.length;++jt)if(gt.linked[jt].isParent)return;Je=Ct(ke)}),new Bc(ke,Je)}function zd(ie){return ie.findMarks(En(ie.first,0),ie.clipPos(En(ie.lastLine())),function(ae){return ae.parent})}function Zd(ie,ae){for(var ge=0;ge<ae.length;ge++){var fe=ae[ge],xe=fe.find(),ke=ie.clipPos(xe.from),Je=ie.clipPos(xe.to);if(un(ke,Je)){var vt=sd(ie,ke,Je,fe.primary,fe.primary.type);fe.markers.push(vt),vt.parent=fe}}}function Rh(ie){for(var ae=function(fe){var xe=ie[fe],ke=[xe.primary.doc];cl(xe.primary.doc,function(gt){return ke.push(gt)});for(var Je=0;Je<xe.markers.length;Je++){var vt=xe.markers[Je];Rt(ke,vt.doc)==-1&&(vt.parent=null,xe.markers.splice(Je--,1))}},ge=0;ge<ie.length;ge++)ae(ge)}var Qg=0,Bl=function(ie,ae,ge,fe,xe){if(!(this instanceof Bl))return new Bl(ie,ae,ge,fe,xe);ge==null&&(ge=0),ms.call(this,[new Xs([new fa("",null)])]),this.first=ge,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ge;var ke=En(ge,0);this.sel=Ka(ke),this.history=new Xo(null),this.id=++Qg,this.modeOption=ae,this.lineSep=fe,this.direction=xe=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Ws(this,{from:ke,to:ke,text:ie}),js(this,Ka(ke),_t)};Bl.prototype=ln(ms.prototype,{constructor:Bl,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=zn(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Jn(function(ie){var ae=En(this.first,0),ge=this.first+this.size-1;$s(this,{from:ae,to:En(ge,nn(this,ge).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&vc(this.cm,0,0),js(this,Ka(ae),_t)}),replaceRange:function(ie,ae,ge,fe){ae=Ai(this,ae),ge=ge?Ai(this,ge):ae,Vu(this,ie,ae,ge,fe)},getRange:function(ie,ae,ge){var fe=vn(this,Ai(this,ie),Ai(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(Kn(this,ie))return nn(this,ie)},getLineNumber:function(ie){return Ft(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=nn(this,ie)),Eo(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Ai(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:Jn(function(ie,ae,ge){Gs(this,Ai(this,typeof ie=="number"?En(ie,ae||0):ie),null,ge)}),setSelection:Jn(function(ie,ae,ge){Gs(this,Ai(this,ie),Ai(this,ae||ie),ge)}),extendSelection:Jn(function(ie,ae,ge){Bs(this,Ai(this,ie),ae&&Ai(this,ae),ge)}),extendSelections:Jn(function(ie,ae){ks(this,Or(this,ie),ae)}),extendSelectionsBy:Jn(function(ie,ae){var ge=Wn(this.sel.ranges,ie);ks(this,Or(this,ge),ae)}),setSelections:Jn(function(ie,ae,ge){if(ie.length){for(var fe=[],xe=0;xe<ie.length;xe++)fe[xe]=new ao(Ai(this,ie[xe].anchor),Ai(this,ie[xe].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),js(this,Ta(this.cm,fe,ae),ge)}}),addSelection:Jn(function(ie,ae,ge){var fe=this.sel.ranges.slice(0);fe.push(new ao(Ai(this,ie),Ai(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 xe=vn(this,ae[fe].from(),ae[fe].to());ge=ge?ge.concat(xe):xe}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 xe=vn(this,ge[fe].from(),ge[fe].to());ie!==!1&&(xe=xe.join(ie||this.lineSeparator())),ae[fe]=xe}return ae},replaceSelection:function(ie,ae,ge){for(var fe=[],xe=0;xe<this.sel.ranges.length;xe++)fe[xe]=ie;this.replaceSelections(fe,ae,ge||"+input")},replaceSelections:Jn(function(ie,ae,ge){for(var fe=[],xe=this.sel,ke=0;ke<xe.ranges.length;ke++){var Je=xe.ranges[ke];fe[ke]={from:Je.from(),to:Je.to(),text:this.splitLines(ie[ke]),origin:ge}}for(var vt=ae&&ae!="end"&&Za(this,fe,ae),gt=fe.length-1;gt>=0;gt--)$s(this,fe[gt]);vt?is(this,vt):this.cm&&oc(this.cm)}),undo:Jn(function(){$u(this,"undo")}),redo:Jn(function(){$u(this,"redo")}),undoSelection:Jn(function(){$u(this,"undo",!0)}),redoSelection:Jn(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 xe=0;xe<ie.undone.length;xe++)ie.undone[xe].ranges||++ge;return{undo:ae,redo:ge}},clearHistory:function(){var ie=this;this.history=new Xo(this.history.maxGeneration),cl(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:Fl(this.history.done),undone:Fl(this.history.undone)}},setHistory:function(ie){var ae=this.history=new Xo(this.history.maxGeneration);ae.done=Fl(ie.done.slice(0),null,!0),ae.undone=Fl(ie.undone.slice(0),null,!0)},setGutterMarker:Jn(function(ie,ae,ge){return vl(this,ie,"gutter",function(fe){var xe=fe.gutterMarkers||(fe.gutterMarkers={});return xe[ae]=ge,!ge&&$e(xe)&&(fe.gutterMarkers=null),!0})}),clearGutter:Jn(function(ie){var ae=this;this.iter(function(ge){ge.gutterMarkers&&ge.gutterMarkers[ie]&&vl(ae,ge,"gutter",function(){return ge.gutterMarkers[ie]=null,$e(ge.gutterMarkers)&&(ge.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!Kn(this,ie)||(ae=ie,ie=nn(this,ie),!ie))return null}else if(ae=Ft(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:Jn(function(ie,ae,ge){return vl(this,ie,ae=="gutter"?"gutter":"class",function(fe){var xe=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!fe[xe])fe[xe]=ge;else{if(Ne(ge).test(fe[xe]))return!1;fe[xe]+=" "+ge}return!0})}),removeLineClass:Jn(function(ie,ae,ge){return vl(this,ie,ae=="gutter"?"gutter":"class",function(fe){var xe=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",ke=fe[xe];if(ke)if(ge==null)fe[xe]=null;else{var Je=ke.match(Ne(ge));if(!Je)return!1;var vt=Je.index+Je[0].length;fe[xe]=ke.slice(0,Je.index)+(!Je.index||vt==ke.length?"":" ")+ke.slice(vt)||null}else return!1;return!0})}),addLineWidget:Jn(function(ie,ae,ge){return xc(this,ie,ae,ge)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,ge){return sd(this,Ai(this,ie),Ai(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=Ai(this,ie),sd(this,ie,ie,ge,"bookmark")},findMarksAt:function(ie){ie=Ai(this,ie);var ae=[],ge=nn(this,ie.line).markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe){var xe=ge[fe];(xe.from==null||xe.from<=ie.ch)&&(xe.to==null||xe.to>=ie.ch)&&ae.push(xe.marker.parent||xe.marker)}return ae},findMarks:function(ie,ae,ge){ie=Ai(this,ie),ae=Ai(this,ae);var fe=[],xe=ie.line;return this.iter(ie.line,ae.line+1,function(ke){var Je=ke.markedSpans;if(Je)for(var vt=0;vt<Je.length;vt++){var gt=Je[vt];!(gt.to!=null&&xe==ie.line&&ie.ch>=gt.to||gt.from==null&&xe!=ie.line||gt.from!=null&&xe==ae.line&&gt.from>=ae.ch)&&(!ge||ge(gt.marker))&&fe.push(gt.marker.parent||gt.marker)}++xe}),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(xe){var ke=xe.text.length+fe;if(ke>ie)return ae=ie,!0;ie-=ke,++ge}),Ai(this,En(ge,ae))},indexFromPos:function(ie){ie=Ai(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 Bl(zn(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 Bl(zn(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 As&&(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];cl(ie,function(xe){return fe.push(xe.id)},!0),ie.history=new Xo(null),ie.history.done=Fl(this.history.done,fe),ie.history.undone=Fl(this.history.undone,fe)}},iterLinkedDocs:function(ie){cl(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):eo(ie)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Jn(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&wa(this.cm))})}),Bl.prototype.eachLine=Bl.prototype.iter;var dh=0;function Hd(ie){var ae=this;if(Hf(ae),!(wn(ae,ie)||Ln(ae.display,ie))){Pi(ie),We&&(dh=+new Date);var ge=mr(ae,ie,!0),fe=ie.dataTransfer.files;if(!(!ge||ae.isReadOnly()))if(fe&&fe.length&&window.FileReader&&window.File)for(var xe=fe.length,ke=Array(xe),Je=0,vt=function(){++Je==xe&&Un(ae,function(){ge=Ai(ae.doc,ge);var ri={from:ge,to:ge,text:ae.doc.splitLines(ke.filter(function(er){return er!=null}).join(ae.doc.lineSeparator())),origin:"paste"};$s(ae.doc,ri),is(ae.doc,Ka(Ai(ae.doc,ge),Ai(ae.doc,bs(ri))))})()},gt=function(ri,er){if(ae.options.allowDropFileTypes&&Rt(ae.options.allowDropFileTypes,ri.type)==-1){vt();return}var cr=new FileReader;cr.onerror=function(){return vt()},cr.onload=function(){var Fr=cr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Fr)){vt();return}ke[er]=Fr,vt()},cr.readAsText(ri)},jt=0;jt<fe.length;jt++)gt(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 In=ie.dataTransfer.getData("Text");if(In){var Yt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Yt=ae.listSelections()),Dl(ae.doc,Ka(ge,ge)),Yt)for(var si=0;si<Yt.length;++si)Vu(ae.doc,"",Yt[si].anchor,Yt[si].head,"drag");ae.replaceSelection(In,"around","paste"),ae.display.input.focus()}}catch(ri){}}}}function hh(ie,ae){if(We&&(!ie.state.draggingText||+new Date-dh<100)){ir(ae);return}if(!(wn(ie,ae)||Ln(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!ut)){var ge=Xe("img",null,null,"position: fixed; left: 0; top: 0;");ge.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Ge&&(ge.width=ge.height=1,ie.display.wrapper.appendChild(ge),ge._top=ge.offsetTop),ae.dataTransfer.setDragImage(ge,0,0),Ge&&ge.parentNode.removeChild(ge)}}function hf(ie,ae){var ge=mr(ie,ae);if(ge){var fe=document.createDocumentFragment();fr(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)),Ye(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 xe=ae[fe].CodeMirror;xe&&ge.push(xe)}ge.length&&ge[0].operation(function(){for(var ke=0;ke<ge.length;ke++)ie(ge[ke])})}}var gh=!1;function Ku(){gh||(Wd(),gh=!0)}function Wd(){var ie;Et(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,fh(ff)},100))}),Et(window,"blur",function(){return fh(El)})}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=ce?Pu.macDefault:Pu.pcDefault;function Md(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var ge,fe,xe,ke,Je=0;Je<ae.length-1;Je++){var vt=ae[Je];if(/^(cmd|meta|m)$/i.test(vt))ke=!0;else if(/^a(lt)?$/i.test(vt))ge=!0;else if(/^(c|ctrl|control)$/i.test(vt))fe=!0;else if(/^s(hift)?$/i.test(vt))xe=!0;else throw new Error("Unrecognized modifier name: "+vt)}return ge&&(ie="Alt-"+ie),fe&&(ie="Ctrl-"+ie),ke&&(ie="Cmd-"+ie),xe&&(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 xe=Wn(ge.split(" "),Md),ke=0;ke<xe.length;ke++){var Je=void 0,vt=void 0;ke==xe.length-1?(vt=xe.join(" "),Je=fe):(vt=xe.slice(0,ke+1).join(" "),Je="...");var gt=ae[vt];if(!gt)ae[vt]=Je;else if(gt!=Je)throw new Error("Inconsistent bindings for "+vt)}delete ie[ge]}for(var jt in ae)ie[jt]=ae[jt];return ie}function Tu(ie,ae,ge,fe){ae=ud(ae);var xe=ae.call?ae.call(ie,fe):ae[ie];if(xe===!1)return"nothing";if(xe==="...")return"multi";if(xe!=null&&ge(xe))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return Tu(ie,ae.fallthrough,ge,fe);for(var ke=0;ke<ae.fallthrough.length;ke++){var Je=Tu(ie,ae.fallthrough[ke],ge,fe);if(Je)return Je}}}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(Ge&&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=[],xe=0;xe<ge.length;xe++){for(var ke=ae(ge[xe]);fe.length&&un(ke.from,Ct(fe).to)<=0;){var Je=fe.pop();if(un(Je.from,ke.from)<0){ke.from=Je.from;break}}fe.push(ke)}on(ie,function(){for(var vt=fe.length-1;vt>=0;vt--)Vu(ie.doc,"",fe[vt].from,fe[vt].to,"+delete");oc(ie)})}function jh(ie,ae,ge){var fe=ht(ie.text,ae+ge,ge);return fe<0||fe>ie.text.length?null:fe}function Ml(ie,ae,ge){var fe=jh(ie,ae.ch,ge);return fe==null?null:new En(ae.line,fe,ge<0?"after":"before")}function gs(ie,ae,ge,fe,xe){if(ie){ae.doc.direction=="rtl"&&(xe=-xe);var ke=Ke(ge,ae.doc.direction);if(ke){var Je=xe<0?Ct(ke):ke[0],vt=xe<0==(Je.level==1),gt=vt?"after":"before",jt;if(Je.level>0||ae.doc.direction=="rtl"){var In=$o(ae,ge);jt=xe<0?ge.text.length-1:0;var Yt=Ua(ae,In,jt).top;jt=at(function(si){return Ua(ae,In,si).top==Yt},xe<0==(Je.level==1)?Je.from:Je.to-1,jt),gt=="before"&&(jt=jh(ge,jt,1))}else jt=xe<0?Je.to:Je.from;return new En(fe,jt,gt)}}return new En(fe,xe<0?ge.text.length:0,xe<0?"before":"after")}function Js(ie,ae,ge,fe){var xe=Ke(ae,ie.doc.direction);if(!xe)return Ml(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 ke=ye(xe,ge.ch,ge.sticky),Je=xe[ke];if(ie.doc.direction=="ltr"&&Je.level%2==0&&(fe>0?Je.to>ge.ch:Je.from<ge.ch))return Ml(ae,ge,fe);var vt=function(so,Zo){return jh(ae,so instanceof En?so.ch:so,Zo)},gt,jt=function(so){return ie.options.lineWrapping?(gt=gt||$o(ie,ae),Tn(ie,ae,gt,so)):{begin:0,end:ae.text.length}},In=jt(ge.sticky=="before"?vt(ge,-1):ge.ch);if(ie.doc.direction=="rtl"||Je.level==1){var Yt=Je.level==1==fe<0,si=vt(ge,Yt?1:-1);if(si!=null&&(Yt?si<=Je.to&&si<=In.end:si>=Je.from&&si>=In.begin)){var ri=Yt?"before":"after";return new En(ge.line,si,ri)}}var er=function(so,Zo,Bo){for(var ea=function(rl,ru){return ru?new En(ge.line,vt(rl,1),"before"):new En(ge.line,rl,"after")};so>=0&&so<xe.length;so+=Zo){var _a=xe[so],Mo=Zo>0==(_a.level!=1),rs=Mo?Bo.begin:vt(Bo.end,-1);if(_a.from<=rs&&rs<_a.to||(rs=Mo?_a.from:vt(_a.to,-1),Bo.begin<=rs&&rs<Bo.end))return ea(rs,Mo)}},cr=er(ke+fe,fe,In);if(cr)return cr;var Fr=fe>0?In.end:vt(In.begin,-1);return Fr!=null&&!(fe>0&&Fr==ae.text.length)&&(cr=er(fe>0?0:xe.length-1,fe,jt(Fr)),cr)?cr:null}var nu={selectAll:Ns,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=nn(ie.doc,ae.head.line).text.length;return ae.head.ch==ge&&ae.head.line<ie.lastLine()?{from:ae.head,to:En(ae.head.line+1,0)}:{from:ae.head,to:En(ae.head.line,ge)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return lu(ie,function(ae){return{from:En(ae.from().line,0),to:Ai(ie.doc,En(ae.to().line+1,0))}})},delLineLeft:function(ie){return lu(ie,function(ae){return{from:En(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(En(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(En(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")},cn)},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")},cn)},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},cn)},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,xe=0;xe<ge.length;xe++){var ke=ge[xe].from(),Je=et(ie.getLine(ke.line),ke.ch,fe);ae.push(Zn(fe-Je%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 xe=ae[fe].head,ke=nn(ie.doc,xe.line).text;if(ke){if(xe.ch==ke.length&&(xe=new En(xe.line,xe.ch-1)),xe.ch>0)xe=new En(xe.line,xe.ch+1),ie.replaceRange(ke.charAt(xe.ch-1)+ke.charAt(xe.ch-2),En(xe.line,xe.ch-2),xe,"+transpose");else if(xe.line>ie.doc.first){var Je=nn(ie.doc,xe.line-1).text;Je&&(xe=new En(xe.line,1),ie.replaceRange(ke.charAt(0)+ie.doc.lineSeparator()+Je.charAt(Je.length-1),En(xe.line-1,Je.length-1),xe,"+transpose"))}}ge.push(new ao(xe,xe))}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=nn(ie.doc,ae),fe=Eo(ge);return fe!=ge&&(ae=Ft(fe)),gs(!0,ie,fe,ae,1)}function cc(ie,ae){var ge=nn(ie.doc,ae),fe=Na(ge);return fe!=ge&&(ae=Ft(fe)),gs(!0,ie,ge,ae,-1)}function $d(ie,ae){var ge=uc(ie,ae.line),fe=nn(ie.doc,ge.line),xe=Ke(fe,ie.doc.direction);if(!xe||xe[0].level==0){var ke=Math.max(ge.ch,fe.text.search(/\S/)),Je=ae.line==ge.line&&ae.ch<=ke&&ae.ch;return En(ge.line,Je?0:ke,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,xe=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ge&&(ie.display.shift=!1),xe=ae(ie)!=xn}finally{ie.display.shift=fe,ie.state.suppressEdits=!1}return xe}function vh(ie,ae,ge){for(var fe=0;fe<ie.state.keyMaps.length;fe++){var xe=Tu(ae,ie.state.keyMaps[fe],ge,ie);if(xe)return xe}return ie.options.extraKeys&&Tu(ae,ie.options.extraKeys,ge,ie)||Tu(ae,ie.options.keyMap,ge,ie)}var Sc=new Ue;function Yc(ie,ae,ge,fe){var xe=ie.state.keySeq;if(xe){if(Uc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Sc.set(50,function(){ie.state.keySeq==xe&&(ie.state.keySeq=null,ie.display.input.reset())}),Wf(ie,xe+" "+ae,ge,fe))return!0}return Wf(ie,ae,ge,fe)}function Wf(ie,ae,ge,fe){var xe=vh(ie,ae,fe);return xe=="multi"&&(ie.state.keySeq=ae),xe=="handled"&&dr(ie,"keyHandled",ie,ae,ge),(xe=="handled"||xe=="multi")&&(Pi(ge),xa(ie)),!!xe}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 Vd=null;function hg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=rt(),!wn(ae,ie))){We&&ct<11&&ie.keyCode==27&&(ie.returnValue=!1);var ge=ie.keyCode;ae.display.shift=ge==16||ie.shiftKey;var fe=Gf(ae,ie);Ge&&(Vd=fe?ge:null,!fe&&ge==88&&!Fi&&(ce?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),le&&!ce&&!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"),pn(document,"keyup",ge),pn(document,"mouseover",ge))}Et(document,"keyup",ge),Et(document,"mouseover",ge)}function gg(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),wn(this,ie)}function Xc(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(Ln(ae.display,ie)||wn(ae,ie)||ie.ctrlKey&&!ie.altKey||ce&&ie.metaKey)){var ge=ie.keyCode,fe=ie.charCode;if(Ge&&ge==Vd){Vd=null,Pi(ie);return}if(!(Ge&&(!ie.which||ie.which<10)&&Gf(ae,ie))){var xe=String.fromCharCode(fe==null?ge:fe);xe!="\b"&&($f(ae,ie,xe)||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&&un(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(!(wn(ae,ie)||ge.activeTouch&&ge.input.supportsTouch())){if(ge.input.ensurePolled(),ge.shift=ie.shiftKey,Ln(ge,ie)){Me||(ge.scroller.draggable=!1,setTimeout(function(){return ge.scroller.draggable=!0},100));return}if(!Vf(ae,ie)){var fe=mr(ae,ie),xe=pi(ie),ke=fe?vg(fe,xe):"single";window.focus(),xe==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(fe&&yg(ae,xe,fe,ke,ie))&&(xe==1?fe?xg(ae,fe,ke,ie):Nr(ie)==ge.scroller&&Pi(ie):xe==2?(fe&&Bs(ae.doc,fe),setTimeout(function(){return ge.input.focus()},20)):xe==3&&(Le?ae.display.input.onContextMenu(ie):wo(ae)))}}}function yg(ie,ae,ge,fe,xe){var ke="Click";return fe=="double"?ke="Double"+ke:fe=="triple"&&(ke="Triple"+ke),ke=(ae==1?"Left":ae==2?"Middle":"Right")+ke,Yc(ie,ph(ke,xe),xe,function(Je){if(typeof Je=="string"&&(Je=nu[Je]),!Je)return!1;var vt=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),vt=Je(ie,ge)!=xn}finally{ie.state.suppressEdits=!1}return vt})}function xh(ie,ae,ge){var fe=ie.getOption("configureMouse"),xe=fe?fe(ie,ae,ge):{};if(xe.unit==null){var ke=se?ge.shiftKey&&ge.metaKey:ge.altKey;xe.unit=ke?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(xe.extend==null||ie.doc.extend)&&(xe.extend=ie.doc.extend||ge.shiftKey),xe.addNew==null&&(xe.addNew=ce?ge.metaKey:ge.ctrlKey),xe.moveOnDrag==null&&(xe.moveOnDrag=!(ce?ge.altKey:ge.ctrlKey)),xe}function xg(ie,ae,ge,fe){We?setTimeout(Wt(Wa,ie),0):ie.curOp.focus=rt();var xe=xh(ie,ge,fe),ke=ie.doc.sel,Je;ie.options.dragDrop&&li&&!ie.isReadOnly()&&ge=="single"&&(Je=ke.contains(ae))>-1&&(un((Je=ke.ranges[Je]).from(),ae)<0||ae.xRel>0)&&(un(Je.to(),ae)>0||ae.xRel<0)?Sg(ie,fe,ae,xe):Hp(ie,fe,ae,xe)}function Sg(ie,ae,ge,fe){var xe=ie.display,ke=!1,Je=Un(ie,function(jt){Me&&(xe.scroller.draggable=!1),ie.state.draggingText=!1,pn(xe.wrapper.ownerDocument,"mouseup",Je),pn(xe.wrapper.ownerDocument,"mousemove",vt),pn(xe.scroller,"dragstart",gt),pn(xe.scroller,"drop",Je),ke||(Pi(jt),fe.addNew||Bs(ie.doc,ge,null,null,fe.extend),Me&&!ut||We&&ct==9?setTimeout(function(){xe.wrapper.ownerDocument.body.focus({preventScroll:!0}),xe.input.focus()},20):xe.input.focus())}),vt=function(jt){ke=ke||Math.abs(ae.clientX-jt.clientX)+Math.abs(ae.clientY-jt.clientY)>=10},gt=function(){return ke=!0};Me&&(xe.scroller.draggable=!0),ie.state.draggingText=Je,Je.copy=!fe.moveOnDrag,xe.scroller.dragDrop&&xe.scroller.dragDrop(),Et(xe.wrapper.ownerDocument,"mouseup",Je),Et(xe.wrapper.ownerDocument,"mousemove",vt),Et(xe.scroller,"dragstart",gt),Et(xe.scroller,"drop",Je),wo(ie),setTimeout(function(){return xe.input.focus()},20)}function Pg(ie,ae,ge){if(ge=="char")return new ao(ae,ae);if(ge=="word")return ie.findWordAt(ae);if(ge=="line")return new ao(En(ae.line,0),Ai(ie.doc,En(ae.line+1,0)));var fe=ge(ie,ae);return new ao(fe.from,fe.to)}function Hp(ie,ae,ge,fe){var xe=ie.display,ke=ie.doc;Pi(ae);var Je,vt,gt=ke.sel,jt=gt.ranges;if(fe.addNew&&!fe.extend?(vt=ke.sel.contains(ge),vt>-1?Je=jt[vt]:Je=new ao(ge,ge)):(Je=ke.sel.primary(),vt=ke.sel.primIndex),fe.unit=="rectangle")fe.addNew||(Je=new ao(ge,ge)),ge=mr(ie,ae,!0,!0),vt=-1;else{var In=Pg(ie,ge,fe.unit);fe.extend?Je=_c(Je,In.anchor,In.head,fe.extend):Je=In}fe.addNew?vt==-1?(vt=jt.length,js(ke,Ta(ie,jt.concat([Je]),vt),{scroll:!1,origin:"*mouse"})):jt.length>1&&jt[vt].empty()&&fe.unit=="char"&&!fe.extend?(js(ke,Ta(ie,jt.slice(0,vt).concat(jt.slice(vt+1)),0),{scroll:!1,origin:"*mouse"}),gt=ke.sel):Ms(ke,vt,Je,qt):(vt=0,js(ke,new Pa([Je],0),qt),gt=ke.sel);var Yt=ge;function si(Bo){if(un(Yt,Bo)!=0)if(Yt=Bo,fe.unit=="rectangle"){for(var ea=[],_a=ie.options.tabSize,Mo=et(nn(ke,ge.line).text,ge.ch,_a),rs=et(nn(ke,Bo.line).text,Bo.ch,_a),rl=Math.min(Mo,rs),ru=Math.max(Mo,rs),xl=Math.min(ge.line,Bo.line),Uu=Math.min(ie.lastLine(),Math.max(ge.line,Bo.line));xl<=Uu;xl++){var wu=nn(ke,xl).text,Xl=Gn(wu,rl,_a);rl==ru?ea.push(new ao(En(xl,Xl),En(xl,Xl))):wu.length>Xl&&ea.push(new ao(En(xl,Xl),En(xl,Gn(wu,ru,_a))))}ea.length||ea.push(new ao(ge,ge)),js(ke,Ta(ie,gt.ranges.slice(0,vt).concat(ea),vt),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(Bo)}else{var Yu=Je,hu=Pg(ie,Bo,fe.unit),Jl=Yu.anchor,Ds;un(hu.anchor,Jl)>0?(Ds=hu.head,Jl=mi(Yu.from(),hu.anchor)):(Ds=hu.anchor,Jl=Ni(Yu.to(),hu.head));var Sl=gt.ranges.slice(0);Sl[vt]=qg(ie,new ao(Ai(ke,Jl),Ds)),js(ke,Ta(ie,Sl,vt),qt)}}var ri=xe.wrapper.getBoundingClientRect(),er=0;function cr(Bo){var ea=++er,_a=mr(ie,Bo,!0,fe.unit=="rectangle");if(_a)if(un(_a,Yt)!=0){ie.curOp.focus=rt(),si(_a);var Mo=jo(xe,ke);(_a.line>=Mo.to||_a.line<Mo.from)&&setTimeout(Un(ie,function(){er==ea&&cr(Bo)}),150)}else{var rs=Bo.clientY<ri.top?-20:Bo.clientY>ri.bottom?20:0;rs&&setTimeout(Un(ie,function(){er==ea&&(xe.scroller.scrollTop+=rs,cr(Bo))}),50)}}function Fr(Bo){ie.state.selectingText=!1,er=1/0,Bo&&(Pi(Bo),xe.input.focus()),pn(xe.wrapper.ownerDocument,"mousemove",so),pn(xe.wrapper.ownerDocument,"mouseup",Zo),ke.history.lastSelOrigin=null}var so=Un(ie,function(Bo){Bo.buttons===0||!pi(Bo)?Fr(Bo):cr(Bo)}),Zo=Un(ie,Fr);ie.state.selectingText=Zo,Et(xe.wrapper.ownerDocument,"mousemove",so),Et(xe.wrapper.ownerDocument,"mouseup",Zo)}function qg(ie,ae){var ge=ae.anchor,fe=ae.head,xe=nn(ie.doc,ge.line);if(un(ge,fe)==0&&ge.sticky==fe.sticky)return ae;var ke=Ke(xe);if(!ke)return ae;var Je=ye(ke,ge.ch,ge.sticky),vt=ke[Je];if(vt.from!=ge.ch&&vt.to!=ge.ch)return ae;var gt=Je+(vt.from==ge.ch==(vt.level!=1)?0:1);if(gt==0||gt==ke.length)return ae;var jt;if(fe.line!=ge.line)jt=(fe.line-ge.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var In=ye(ke,fe.ch,fe.sticky),Yt=In-Je||(fe.ch-ge.ch)*(vt.level==1?-1:1);In==gt-1||In==gt?jt=Yt<0:jt=Yt>0}var si=ke[gt+(jt?-1:0)],ri=jt==(si.level==1),er=ri?si.from:si.to,cr=ri?"after":"before";return ge.ch==er&&ge.sticky==cr?ae:new ao(new En(ge.line,er,cr),fe)}function Kd(ie,ae,ge,fe){var xe,ke;if(ae.touches)xe=ae.touches[0].clientX,ke=ae.touches[0].clientY;else try{xe=ae.clientX,ke=ae.clientY}catch(si){return!1}if(xe>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;fe&&Pi(ae);var Je=ie.display,vt=Je.lineDiv.getBoundingClientRect();if(ke>vt.bottom||!Rn(ie,ge))return Zi(ae);ke-=vt.top-Je.viewOffset;for(var gt=0;gt<ie.display.gutterSpecs.length;++gt){var jt=Je.gutters.childNodes[gt];if(jt&&jt.getBoundingClientRect().right>=xe){var In=Bn(ie.doc,ke),Yt=ie.display.gutterSpecs[gt];return en(ie,ge,ie,In,Yt.className,ae),Zi(ae)}}}function Vf(ie,ae){return Kd(ie,ae,"gutterClick",!0)}function gf(ie,ae){Ln(ie.display,ae)||ep(ie,ae)||wn(ie,ae,"contextmenu")||Le||ie.display.input.onContextMenu(ae)}function ep(ie,ae){return Rn(ie,"gutterContextMenu")?Kd(ie,ae,"gutterContextMenu",!1):!1}function Kf(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ya(ie)}var Sh={toString:function(){return"CodeMirror.Init"}},wg={},Ph={};function tp(ie){var ae=ie.optionHandlers;function ge(fe,xe,ke,Je){ie.defaults[fe]=xe,ke&&(ae[fe]=Je?function(vt,gt,jt){jt!=Sh&&ke(vt,gt,jt)}:ke)}ie.defineOption=ge,ie.Init=Sh,ge("value","",function(fe,xe){return fe.setValue(xe)},!0),ge("mode",null,function(fe,xe){fe.doc.modeOption=xe,aa(fe)},!0),ge("indentUnit",2,aa,!0),ge("indentWithTabs",!1),ge("smartIndent",!0),ge("tabSize",4,function(fe){fs(fe),ya(fe),ji(fe)},!0),ge("lineSeparator",null,function(fe,xe){if(fe.doc.lineSep=xe,!!xe){var ke=[],Je=fe.doc.first;fe.doc.iter(function(gt){for(var jt=0;;){var In=gt.text.indexOf(xe,jt);if(In==-1)break;jt=In+xe.length,ke.push(En(Je,In))}Je++});for(var vt=ke.length-1;vt>=0;vt--)Vu(fe.doc,xe,ke[vt],En(ke[vt].line,ke[vt].ch+xe.length))}}),ge("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,xe,ke){fe.state.specialChars=new RegExp(xe.source+(xe.test(" ")?"":"| "),"g"),ke!=Sh&&fe.refresh()}),ge("specialCharPlaceholder",Ss,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,xe){return fe.getInputField().spellcheck=xe},!0),ge("autocorrect",!1,function(fe,xe){return fe.getInputField().autocorrect=xe},!0),ge("autocapitalize",!1,function(fe,xe){return fe.getInputField().autocapitalize=xe},!0),ge("rtlMoveVisually",!he),ge("wholeLineUpdateBefore",!0),ge("theme","default",function(fe){Kf(fe),uo(fe)},!0),ge("keyMap","default",function(fe,xe,ke){var Je=ud(xe),vt=ke!=Sh&&ud(ke);vt&&vt.detach&&vt.detach(fe,Je),Je.attach&&Je.attach(fe,vt||null)}),ge("extraKeys",null),ge("configureMouse",null),ge("lineWrapping",!1,np,!0),ge("gutters",[],function(fe,xe){fe.display.gutterSpecs=Wo(xe,fe.options.lineNumbers),uo(fe)},!0),ge("fixedGutter",!0,function(fe,xe){fe.display.gutters.style.left=xe?Qr(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,xe){fe.display.gutterSpecs=Wo(fe.options.gutters,xe),uo(fe)},!0),ge("firstLineNumber",1,uo,!0),ge("lineNumberFormatter",function(fe){return fe},uo,!0),ge("showCursorWhenSelecting",!1,Ir,!0),ge("resetSelectionOnContextMenu",!0),ge("lineWiseCopyCut",!0),ge("pasteLinesPerSelection",!0),ge("selectionsMayTouch",!1),ge("readOnly",!1,function(fe,xe){xe=="nocursor"&&(El(fe),fe.display.input.blur()),fe.display.input.readOnlyChanged(xe)}),ge("screenReaderLabel",null,function(fe,xe){xe=xe===""?null:xe,fe.display.input.screenReaderLabelChanged(xe)}),ge("disableInput",!1,function(fe,xe){xe||fe.display.input.reset()},!0),ge("dragDrop",!0,Uf),ge("allowDropFileTypes",null),ge("cursorBlinkRate",530),ge("cursorScrollMargin",0),ge("cursorHeight",1,Ir,!0),ge("singleCursorHeightPerLine",!0,Ir,!0),ge("workTime",100),ge("workDelay",100),ge("flattenSpans",!0,fs,!0),ge("addModeClass",!1,fs,!0),ge("pollInterval",100),ge("undoDepth",200,function(fe,xe){return fe.doc.history.undoDepth=xe}),ge("historyEventDelay",1250),ge("viewportMargin",10,function(fe){return fe.refresh()},!0),ge("maxHighlightLength",1e4,fs,!0),ge("moveInputWithCursor",!0,function(fe,xe){xe||fe.display.input.resetPosition()}),ge("tabindex",null,function(fe,xe){return fe.display.input.getField().tabIndex=xe||""}),ge("autofocus",null),ge("direction","ltr",function(fe,xe){return fe.doc.setDirection(xe)},!0),ge("phrases",null)}function Uf(ie,ae,ge){var fe=ge&&ge!=Sh;if(!ae!=!fe){var xe=ie.display.dragFunctions,ke=ae?Et:pn;ke(ie.display.scroller,"dragstart",xe.start),ke(ie.display.scroller,"dragenter",xe.enter),ke(ie.display.scroller,"dragover",xe.over),ke(ie.display.scroller,"dragleave",xe.leave),ke(ie.display.scroller,"drop",xe.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"),Ca(ie)),hr(ie),ji(ie),ya(ie),setTimeout(function(){return yc(ie)},100)}function As(ie,ae){var ge=this;if(!(this instanceof As))return new As(ie,ae);this.options=ae=ae?Mt(ae):{},Mt(wg,ae,!1);var fe=ae.value;typeof fe=="string"?fe=new Bl(fe,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(fe.modeOption=ae.mode),this.doc=fe;var xe=new As.inputStyles[ae.inputStyle](this),ke=this.display=new ko(ie,fe,xe,ae);ke.wrapper.CodeMirror=this,Kf(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 Ue,keySeq:null,specialChars:null},ae.autofocus&&!ee&&ke.input.focus(),We&&ct<11&&setTimeout(function(){return ge.display.input.reset(!0)},20),Zh(this),Ku(),ui(this),this.curOp.forceUpdate=!0,ba(this,fe),ae.autofocus&&!ee||this.hasFocus()?setTimeout(function(){ge.hasFocus()&&!ge.state.focused&&Oa(ge)},20):El(this);for(var Je in Ph)Ph.hasOwnProperty(Je)&&Ph[Je](this,ae[Je],Sh);oo(this),ae.finishInit&&ae.finishInit(this);for(var vt=0;vt<Ud.length;++vt)Ud[vt](this);fo(this),Me&&ae.lineWrapping&&getComputedStyle(ke.lineDiv).textRendering=="optimizelegibility"&&(ke.lineDiv.style.textRendering="auto")}As.defaults=wg,As.optionHandlers=Ph;function Zh(ie){var ae=ie.display;Et(ae.scroller,"mousedown",Un(ie,Jc)),We&&ct<11?Et(ae.scroller,"dblclick",Un(ie,function(gt){if(!wn(ie,gt)){var jt=mr(ie,gt);if(!(!jt||Vf(ie,gt)||Ln(ie.display,gt))){Pi(gt);var In=ie.findWordAt(jt);Bs(ie.doc,In.anchor,In.head)}}})):Et(ae.scroller,"dblclick",function(gt){return wn(ie,gt)||Pi(gt)}),Et(ae.scroller,"contextmenu",function(gt){return gf(ie,gt)}),Et(ae.input.getField(),"contextmenu",function(gt){ae.scroller.contains(gt.target)||gf(ie,gt)});var ge,fe={end:0};function xe(){ae.activeTouch&&(ge=setTimeout(function(){return ae.activeTouch=null},1e3),fe=ae.activeTouch,fe.end=+new Date)}function ke(gt){if(gt.touches.length!=1)return!1;var jt=gt.touches[0];return jt.radiusX<=1&&jt.radiusY<=1}function Je(gt,jt){if(jt.left==null)return!0;var In=jt.left-gt.left,Yt=jt.top-gt.top;return In*In+Yt*Yt>20*20}Et(ae.scroller,"touchstart",function(gt){if(!wn(ie,gt)&&!ke(gt)&&!Vf(ie,gt)){ae.input.ensurePolled(),clearTimeout(ge);var jt=+new Date;ae.activeTouch={start:jt,moved:!1,prev:jt-fe.end<=300?fe:null},gt.touches.length==1&&(ae.activeTouch.left=gt.touches[0].pageX,ae.activeTouch.top=gt.touches[0].pageY)}}),Et(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),Et(ae.scroller,"touchend",function(gt){var jt=ae.activeTouch;if(jt&&!Ln(ae,gt)&&jt.left!=null&&!jt.moved&&new Date-jt.start<300){var In=ie.coordsChar(ae.activeTouch,"page"),Yt;!jt.prev||Je(jt,jt.prev)?Yt=new ao(In,In):!jt.prev.prev||Je(jt,jt.prev.prev)?Yt=ie.findWordAt(In):Yt=new ao(En(In.line,0),Ai(ie.doc,En(In.line+1,0))),ie.setSelection(Yt.anchor,Yt.head),ie.focus(),Pi(gt)}xe()}),Et(ae.scroller,"touchcancel",xe),Et(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(ac(ie,ae.scroller.scrollTop),au(ie,ae.scroller.scrollLeft,!0),en(ie,"scroll",ie))}),Et(ae.scroller,"mousewheel",function(gt){return Sa(ie,gt)}),Et(ae.scroller,"DOMMouseScroll",function(gt){return Sa(ie,gt)}),Et(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(gt){wn(ie,gt)||ir(gt)},over:function(gt){wn(ie,gt)||(hf(ie,gt),ir(gt))},start:function(gt){return hh(ie,gt)},drop:Un(ie,Hd),leave:function(gt){wn(ie,gt)||Hf(ie)}};var vt=ae.input.getField();Et(vt,"keyup",function(gt){return gg.call(ie,gt)}),Et(vt,"keydown",Un(ie,hg)),Et(vt,"keypress",Un(ie,Xc)),Et(vt,"focus",function(gt){return Oa(ie,gt)}),Et(vt,"blur",function(gt){return El(ie,gt)})}var Ud=[];As.defineInitHook=function(ie){return Ud.push(ie)};function iu(ie,ae,ge,fe){var xe=ie.doc,ke;ge==null&&(ge="add"),ge=="smart"&&(xe.mode.indent?ke=ro(ie,ae).state:ge="prev");var Je=ie.options.tabSize,vt=nn(xe,ae),gt=et(vt.text,null,Je);vt.stateAfter&&(vt.stateAfter=null);var jt=vt.text.match(/^\s*/)[0],In;if(!fe&&!/\S/.test(vt.text))In=0,ge="not";else if(ge=="smart"&&(In=xe.mode.indent(ke,vt.text.slice(jt.length),vt.text),In==xn||In>150)){if(!fe)return;ge="prev"}ge=="prev"?ae>xe.first?In=et(nn(xe,ae-1).text,null,Je):In=0:ge=="add"?In=gt+ie.options.indentUnit:ge=="subtract"?In=gt-ie.options.indentUnit:typeof ge=="number"&&(In=gt+ge),In=Math.max(0,In);var Yt="",si=0;if(ie.options.indentWithTabs)for(var ri=Math.floor(In/Je);ri;--ri)si+=Je,Yt+=" ";if(si<In&&(Yt+=Zn(In-si)),Yt!=jt)return Vu(xe,Yt,En(ae,0),En(ae,jt.length),"+input"),vt.stateAfter=null,!0;for(var er=0;er<xe.sel.ranges.length;er++){var cr=xe.sel.ranges[er];if(cr.head.line==ae&&cr.head.ch<jt.length){var Fr=En(ae,jt.length);Ms(xe,er,new ao(Fr,Fr));break}}}var Ru=null;function Hh(ie){Ru=ie}function wh(ie,ae,ge,fe,xe){var ke=ie.doc;ie.display.shift=!1,fe||(fe=ke.sel);var Je=+new Date-200,vt=xe=="paste"||ie.state.pasteIncoming>Je,gt=eo(ae),jt=null;if(vt&&fe.ranges.length>1)if(Ru&&Ru.text.join(`
`)==ae){if(fe.ranges.length%Ru.text.length==0){jt=[];for(var In=0;In<Ru.text.length;In++)jt.push(ke.splitLines(Ru.text[In]))}}else gt.length==fe.ranges.length&&ie.options.pasteLinesPerSelection&&(jt=Wn(gt,function(so){return[so]}));for(var Yt=ie.curOp.updateInput,si=fe.ranges.length-1;si>=0;si--){var ri=fe.ranges[si],er=ri.from(),cr=ri.to();ri.empty()&&(ge&&ge>0?er=En(er.line,er.ch-ge):ie.state.overwrite&&!vt?cr=En(cr.line,Math.min(nn(ke,cr.line).text.length,cr.ch+Ct(gt).length)):vt&&Ru&&Ru.lineWise&&Ru.text.join(`
`)==gt.join(`
`)&&(er=cr=En(er.line,0)));var Fr={from:er,to:cr,text:jt?jt[si%jt.length]:gt,origin:xe||(vt?"paste":ie.state.cutIncoming>Je?"cut":"+input")};$s(ie.doc,Fr),dr(ie,"inputRead",ie,Fr)}ae&&!vt&&Eg(ie,ae),oc(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Yt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Cg(ie,ae){var 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 xe=ge.ranges[fe];if(!(xe.head.ch>100||fe&&ge.ranges[fe-1].head.line==xe.head.line)){var ke=ie.getModeAt(xe.head),Je=!1;if(ke.electricChars){for(var vt=0;vt<ke.electricChars.length;vt++)if(ae.indexOf(ke.electricChars.charAt(vt))>-1){Je=iu(ie,xe.head.line,"smart");break}}else ke.electricInput&&ke.electricInput.test(nn(ie.doc,xe.head.line).text.slice(0,xe.head.ch))&&(Je=iu(ie,xe.head.line,"smart"));Je&&dr(ie,"electricInput",ie,xe.head.line)}}}function bg(ie){for(var ae=[],ge=[],fe=0;fe<ie.doc.sel.ranges.length;fe++){var xe=ie.doc.sel.ranges[fe].head.line,ke={anchor:En(xe,0),head:En(xe+1,0)};ge.push(ke),ae.push(ie.getRange(ke.anchor,ke.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 Me?ie.style.width="1000px":ie.setAttribute("wrap","off"),De&&(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,xe){var ke=this.options,Je=ke[fe];ke[fe]==xe&&fe!="mode"||(ke[fe]=xe,ae.hasOwnProperty(fe)&&Un(this,ae[fe])(this,xe,Je),en(this,"optionChange",this,fe))},getOption:function(fe){return this.options[fe]},getDoc:function(){return this.doc},addKeyMap:function(fe,xe){this.state.keyMaps[xe?"push":"unshift"](ud(fe))},removeKeyMap:function(fe){for(var xe=this.state.keyMaps,ke=0;ke<xe.length;++ke)if(xe[ke]==fe||xe[ke].name==fe)return xe.splice(ke,1),!0},addOverlay:Hn(function(fe,xe){var ke=fe.token?fe:ie.getMode(this.options,fe);if(ke.startState)throw new Error("Overlays may not be stateful.");di(this.state.overlays,{mode:ke,modeSpec:fe,opaque:xe&&xe.opaque,priority:xe&&xe.priority||0},function(Je){return Je.priority}),this.state.modeGen++,ji(this)}),removeOverlay:Hn(function(fe){for(var xe=this.state.overlays,ke=0;ke<xe.length;++ke){var Je=xe[ke].modeSpec;if(Je==fe||typeof fe=="string"&&Je.name==fe){xe.splice(ke,1),this.state.modeGen++,ji(this);return}}}),indentLine:Hn(function(fe,xe,ke){typeof xe!="string"&&typeof xe!="number"&&(xe==null?xe=this.options.smartIndent?"smart":"prev":xe=xe?"add":"subtract"),Kn(this.doc,fe)&&iu(this,fe,xe,ke)}),indentSelection:Hn(function(fe){for(var xe=this.doc.sel.ranges,ke=-1,Je=0;Je<xe.length;Je++){var vt=xe[Je];if(vt.empty())vt.head.line>ke&&(iu(this,vt.head.line,fe,!0),ke=vt.head.line,Je==this.doc.sel.primIndex&&oc(this));else{var gt=vt.from(),jt=vt.to(),In=Math.max(ke,gt.line);ke=Math.min(this.lastLine(),jt.line-(jt.ch?0:1))+1;for(var Yt=In;Yt<ke;++Yt)iu(this,Yt,fe);var si=this.doc.sel.ranges;gt.ch==0&&xe.length==si.length&&si[Je].from().ch>0&&Ms(this.doc,Je,new ao(gt,si[Je].to()),_t)}}}),getTokenAt:function(fe,xe){return qi(this,fe,xe)},getLineTokens:function(fe,xe){return qi(this,En(fe),xe,!0)},getTokenTypeAt:function(fe){fe=Ai(this.doc,fe);var xe=Wr(this,nn(this.doc,fe.line)),ke=0,Je=(xe.length-1)/2,vt=fe.ch,gt;if(vt==0)gt=xe[2];else for(;;){var jt=ke+Je>>1;if((jt?xe[jt*2-1]:0)>=vt)Je=jt;else if(xe[jt*2+1]<vt)ke=jt+1;else{gt=xe[jt*2+2];break}}var In=gt?gt.indexOf("overlay "):-1;return In<0?gt:In==0?null:gt.slice(0,In-1)},getModeAt:function(fe){var xe=this.doc.mode;return xe.innerMode?ie.innerMode(xe,this.getTokenAt(fe).state).mode:xe},getHelper:function(fe,xe){return this.getHelpers(fe,xe)[0]},getHelpers:function(fe,xe){var ke=[];if(!ge.hasOwnProperty(xe))return ke;var Je=ge[xe],vt=this.getModeAt(fe);if(typeof vt[xe]=="string")Je[vt[xe]]&&ke.push(Je[vt[xe]]);else if(vt[xe])for(var gt=0;gt<vt[xe].length;gt++){var jt=Je[vt[xe][gt]];jt&&ke.push(jt)}else vt.helperType&&Je[vt.helperType]?ke.push(Je[vt.helperType]):Je[vt.name]&&ke.push(Je[vt.name]);for(var In=0;In<Je._global.length;In++){var Yt=Je._global[In];Yt.pred(vt,this)&&Rt(ke,Yt.val)==-1&&ke.push(Yt.val)}return ke},getStateAfter:function(fe,xe){var ke=this.doc;return fe=Di(ke,fe==null?ke.first+ke.size-1:fe),ro(this,fe+1,xe).state},cursorCoords:function(fe,xe){var ke,Je=this.doc.sel.primary();return fe==null?ke=Je.head:typeof fe=="object"?ke=Ai(this.doc,fe):ke=fe?Je.from():Je.to(),La(this,ke,xe||"page")},charCoords:function(fe,xe){return Ha(this,Ai(this.doc,fe),xe||"page")},coordsChar:function(fe,xe){return fe=Da(this,fe,xe||"page"),tn(this,fe.left,fe.top)},lineAtHeight:function(fe,xe){return fe=Da(this,{top:fe,left:0},xe||"page").top,Bn(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,xe,ke){var Je=!1,vt;if(typeof fe=="number"){var gt=this.doc.first+this.doc.size-1;fe<this.doc.first?fe=this.doc.first:fe>gt&&(fe=gt,Je=!0),vt=nn(this.doc,fe)}else vt=fe;return Ar(this,vt,{top:0,left:0},xe||"page",ke||Je).top+(Je?this.doc.height-io(vt):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,xe,ke,Je,vt){var gt=this.display;fe=La(this,Ai(this.doc,fe));var jt=fe.bottom,In=fe.left;if(xe.style.position="absolute",xe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(xe),gt.sizer.appendChild(xe),Je=="over")jt=fe.top;else if(Je=="above"||Je=="near"){var Yt=Math.max(gt.wrapper.clientHeight,this.doc.height),si=Math.max(gt.sizer.clientWidth,gt.lineSpace.clientWidth);(Je=="above"||fe.bottom+xe.offsetHeight>Yt)&&fe.top>xe.offsetHeight?jt=fe.top-xe.offsetHeight:fe.bottom+xe.offsetHeight<=Yt&&(jt=fe.bottom),In+xe.offsetWidth>si&&(In=si-xe.offsetWidth)}xe.style.top=jt+"px",xe.style.left=xe.style.right="",vt=="right"?(In=gt.sizer.clientWidth-xe.offsetWidth,xe.style.right="0px"):(vt=="left"?In=0:vt=="middle"&&(In=(gt.sizer.clientWidth-xe.offsetWidth)/2),xe.style.left=In+"px"),ke&&rc(this,{left:In,top:jt,right:In+xe.offsetWidth,bottom:jt+xe.offsetHeight})},triggerOnKeyDown:Hn(hg),triggerOnKeyPress:Hn(Xc),triggerOnKeyUp:gg,triggerOnMouseDown:Hn(Jc),execCommand:function(fe){if(nu.hasOwnProperty(fe))return nu[fe].call(null,this)},triggerElectric:Hn(function(fe){Eg(this,fe)}),findPosH:function(fe,xe,ke,Je){var vt=1;xe<0&&(vt=-1,xe=-xe);for(var gt=Ai(this.doc,fe),jt=0;jt<xe&&(gt=pf(this.doc,gt,vt,ke,Je),!gt.hitSide);++jt);return gt},moveH:Hn(function(fe,xe){var ke=this;this.extendSelectionsBy(function(Je){return ke.display.shift||ke.doc.extend||Je.empty()?pf(ke.doc,Je.head,fe,xe,ke.options.rtlMoveVisually):fe<0?Je.from():Je.to()},cn)}),deleteH:Hn(function(fe,xe){var ke=this.doc.sel,Je=this.doc;ke.somethingSelected()?Je.replaceSelection("",null,"+delete"):lu(this,function(vt){var gt=pf(Je,vt.head,fe,xe,!1);return fe<0?{from:gt,to:vt.head}:{from:vt.head,to:gt}})}),findPosV:function(fe,xe,ke,Je){var vt=1,gt=Je;xe<0&&(vt=-1,xe=-xe);for(var jt=Ai(this.doc,fe),In=0;In<xe;++In){var Yt=La(this,jt,"div");if(gt==null?gt=Yt.left:Yt.left=gt,jt=Ld(this,Yt,vt,ke),jt.hitSide)break}return jt},moveV:Hn(function(fe,xe){var ke=this,Je=this.doc,vt=[],gt=!this.display.shift&&!Je.extend&&Je.sel.somethingSelected();if(Je.extendSelectionsBy(function(In){if(gt)return fe<0?In.from():In.to();var Yt=La(ke,In.head,"div");In.goalColumn!=null&&(Yt.left=In.goalColumn),vt.push(Yt.left);var si=Ld(ke,Yt,fe,xe);return xe=="page"&&In==Je.sel.primary()&&Tc(ke,Ha(ke,si,"div").top-Yt.top),si},cn),vt.length)for(var jt=0;jt<Je.sel.ranges.length;jt++)Je.sel.ranges[jt].goalColumn=vt[jt]}),findWordAt:function(fe){var xe=this.doc,ke=nn(xe,fe.line).text,Je=fe.ch,vt=fe.ch;if(ke){var gt=this.getHelper(fe,"wordChars");(fe.sticky=="before"||vt==ke.length)&&Je?--Je:++vt;for(var jt=ke.charAt(Je),In=ft(jt,gt)?function(Yt){return ft(Yt,gt)}:/\s/.test(jt)?function(Yt){return/\s/.test(Yt)}:function(Yt){return!/\s/.test(Yt)&&!ft(Yt)};Je>0&&In(ke.charAt(Je-1));)--Je;for(;vt<ke.length&&In(ke.charAt(vt));)++vt}return new ao(En(fe.line,Je),En(fe.line,vt))},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"),en(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==rt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Hn(function(fe,xe){vc(this,fe,xe)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-Vi(this)-this.display.barHeight,width:fe.scrollWidth-Vi(this)-this.display.barWidth,clientHeight:_i(this),clientWidth:Ri(this)}},scrollIntoView:Hn(function(fe,xe){fe==null?(fe={from:this.doc.sel.primary().head,to:null},xe==null&&(xe=this.options.cursorScrollMargin)):typeof fe=="number"?fe={from:En(fe,0),to:null}:fe.from==null&&(fe={from:fe,to:null}),fe.to||(fe.to=fe.from),fe.margin=xe||0,fe.from.line!=null?as(this,fe):Rc(this,fe.from,fe.to,fe.margin)}),setSize:Hn(function(fe,xe){var ke=this,Je=function(gt){return typeof gt=="number"||/^\d+$/.test(String(gt))?gt+"px":gt};fe!=null&&(this.display.wrapper.style.width=Je(fe)),xe!=null&&(this.display.wrapper.style.height=Je(xe)),this.options.lineWrapping&&ma(this);var vt=this.display.viewFrom;this.doc.iter(vt,this.display.viewTo,function(gt){if(gt.widgets){for(var jt=0;jt<gt.widgets.length;jt++)if(gt.widgets[jt].noHScroll){ki(ke,vt,"widget");break}}++vt}),this.curOp.forceUpdate=!0,en(this,"refresh",this)}),operation:function(fe){return on(this,fe)},startOperation:function(){return ui(this)},endOperation:function(){return fo(this)},refresh:Hn(function(){var fe=this.display.cachedTextHeight;ji(this),this.curOp.forceUpdate=!0,ya(this),vc(this,this.doc.scrollLeft,this.doc.scrollTop),vo(this.display),(fe==null||Math.abs(fe-lr(this.display))>.5||this.options.lineWrapping)&&hr(this),en(this,"refresh",this)}),swapDoc:Hn(function(fe){var xe=this.doc;return xe.cm=null,this.state.selectingText&&this.state.selectingText(),ba(this,fe),ya(this),this.display.input.reset(),vc(this,fe.scrollLeft,fe.scrollTop),this.curOp.forceScroll=!0,dr(this,"swapDoc",this,xe),xe}),phrase:function(fe){var xe=this.options.phrases;return xe&&Object.prototype.hasOwnProperty.call(xe,fe)?xe[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}},Sn(ie),ie.registerHelper=function(fe,xe,ke){ge.hasOwnProperty(fe)||(ge[fe]=ie[fe]={_global:[]}),ge[fe][xe]=ke},ie.registerGlobalHelper=function(fe,xe,ke,Je){ie.registerHelper(fe,xe,Je),ge[fe]._global.push({pred:ke,val:Je})}}function pf(ie,ae,ge,fe,xe){var ke=ae,Je=ge,vt=nn(ie,ae.line),gt=xe&&ie.direction=="rtl"?-ge:ge;function jt(){var Zo=ae.line+gt;return Zo<ie.first||Zo>=ie.first+ie.size?!1:(ae=new En(Zo,ae.ch,ae.sticky),vt=nn(ie,Zo))}function In(Zo){var Bo;if(fe=="codepoint"){var ea=vt.text.charCodeAt(ae.ch+(fe>0?0:-1));isNaN(ea)?Bo=null:Bo=new En(ae.line,Math.max(0,Math.min(vt.text.length,ae.ch+ge*(ea>=55296&&ea<56320?2:1))),-ge)}else xe?Bo=Js(ie.cm,vt,ae,ge):Bo=Ml(vt,ae,ge);if(Bo==null)if(!Zo&&jt())ae=gs(xe,ie.cm,vt,ae.line,gt);else return!1;else ae=Bo;return!0}if(fe=="char"||fe=="codepoint")In();else if(fe=="column")In(!0);else if(fe=="word"||fe=="group")for(var Yt=null,si=fe=="group",ri=ie.cm&&ie.cm.getHelper(ae,"wordChars"),er=!0;!(ge<0&&!In(!er));er=!1){var cr=vt.text.charAt(ae.ch)||`
`,Fr=ft(cr,ri)?"w":si&&cr==`
`?"n":!si||/\s/.test(cr)?null:"p";if(si&&!er&&!Fr&&(Fr="s"),Yt&&Yt!=Fr){ge<0&&(ge=1,In(),ae.sticky="after");break}if(Fr&&(Yt=Fr),ge>0&&!In(!er))break}var so=Iu(ie,ae,ke,Je,!0);return bn(ke,so)&&(so.hitSide=!0),so}function Ld(ie,ae,ge,fe){var xe=ie.doc,ke=ae.left,Je;if(fe=="page"){var vt=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),gt=Math.max(vt-.5*lr(ie.display),3);Je=(ge>0?ae.bottom:ae.top)+ge*gt}else fe=="line"&&(Je=ge>0?ae.bottom+3:ae.top-3);for(var jt;jt=tn(ie,ke,Je),!!jt.outside;){if(ge<0?Je<=0:Je>=xe.height){jt.hitSide=!0;break}Je+=ge*5}return jt}var Vs=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Vs.prototype.init=function(ie){var ae=this,ge=this,fe=ge.cm,xe=ge.div=ie.lineDiv;Fg(xe,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function ke(vt){for(var gt=vt.target;gt;gt=gt.parentNode){if(gt==xe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(gt.className))break}return!1}Et(xe,"paste",function(vt){!ke(vt)||wn(fe,vt)||Cg(vt,fe)||ct<=11&&setTimeout(Un(fe,function(){return ae.updateFromDOM()}),20)}),Et(xe,"compositionstart",function(vt){ae.composing={data:vt.data,done:!1}}),Et(xe,"compositionupdate",function(vt){ae.composing||(ae.composing={data:vt.data,done:!1})}),Et(xe,"compositionend",function(vt){ae.composing&&(vt.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),Et(xe,"touchstart",function(){return ge.forceCompositionEnd()}),Et(xe,"input",function(){ae.composing||ae.readFromDOMSoon()});function Je(vt){if(!(!ke(vt)||wn(fe,vt))){if(fe.somethingSelected())Hh({lineWise:!1,text:fe.getSelections()}),vt.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var gt=bg(fe);Hh({lineWise:!0,text:gt.text}),vt.type=="cut"&&fe.operation(function(){fe.setSelections(gt.ranges,0,_t),fe.replaceSelection("",null,"cut")})}else return;if(vt.clipboardData){vt.clipboardData.clearData();var jt=Ru.text.join(`
`);if(vt.clipboardData.setData("Text",jt),vt.clipboardData.getData("Text")==jt){vt.preventDefault();return}}var In=Bg(),Yt=In.firstChild;fe.display.lineSpace.insertBefore(In,fe.display.lineSpace.firstChild),Yt.value=Ru.text.join(`
`);var si=document.activeElement;Dt(Yt),setTimeout(function(){fe.display.lineSpace.removeChild(In),si.focus(),si==xe&&ge.showPrimarySelection()},50)}}Et(xe,"copy",Je),Et(xe,"cut",Je)},Vs.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Vs.prototype.prepareSelection=function(){var ie=Tr(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Vs.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Vs.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Vs.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,ge=ae.doc.sel.primary(),fe=ge.from(),xe=ge.to();if(ae.display.viewTo==ae.display.viewFrom||fe.line>=ae.display.viewTo||xe.line<ae.display.viewFrom){ie.removeAllRanges();return}var ke=mf(ae,ie.anchorNode,ie.anchorOffset),Je=mf(ae,ie.focusNode,ie.focusOffset);if(!(ke&&!ke.bad&&Je&&!Je.bad&&un(mi(ke,Je),fe)==0&&un(Ni(ke,Je),xe)==0)){var vt=ae.display.view,gt=fe.line>=ae.display.viewFrom&&Ch(ae,fe)||{node:vt[0].measure.map[2],offset:0},jt=xe.line<ae.display.viewTo&&Ch(ae,xe);if(!jt){var In=vt[vt.length-1].measure,Yt=In.maps?In.maps[In.maps.length-1]:In.map;jt={node:Yt[Yt.length-1],offset:Yt[Yt.length-2]-Yt[Yt.length-3]}}if(!gt||!jt){ie.removeAllRanges();return}var si=ie.rangeCount&&ie.getRangeAt(0),ri;try{ri=Ze(gt.node,gt.offset,jt.offset,jt.node)}catch(er){}ri&&(!le&&ae.state.focused?(ie.collapse(gt.node,gt.offset),ri.collapsed||(ie.removeAllRanges(),ie.addRange(ri))):(ie.removeAllRanges(),ie.addRange(ri)),si&&ie.anchorNode==null?ie.addRange(si):le&&this.startGracePeriod()),this.rememberSelection()}},Vs.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)},Vs.prototype.showMultipleSelections=function(ie){Ye(this.cm.display.cursorDiv,ie.cursors),Ye(this.cm.display.selectionDiv,ie.selection)},Vs.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},Vs.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Lt(this.div,ae)},Vs.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Vs.prototype.blur=function(){this.div.blur()},Vs.prototype.getField=function(){return this.div},Vs.prototype.supportsTouch=function(){return!0},Vs.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)},Vs.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},Vs.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(te&&Pt&&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,Ka(ge,fe),_t),(ge.bad||fe.bad)&&(ae.curOp.selectionChanged=!0)})}}},Vs.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(),xe=ge.to();if(fe.ch==0&&fe.line>ie.firstLine()&&(fe=En(fe.line-1,nn(ie.doc,fe.line-1).length)),xe.ch==nn(ie.doc,xe.line).text.length&&xe.line<ie.lastLine()&&(xe=En(xe.line+1,0)),fe.line<ae.viewFrom||xe.line>ae.viewTo-1)return!1;var ke,Je,vt;fe.line==ae.viewFrom||(ke=yr(ie,fe.line))==0?(Je=Ft(ae.view[0].line),vt=ae.view[0].node):(Je=Ft(ae.view[ke].line),vt=ae.view[ke-1].node.nextSibling);var gt=yr(ie,xe.line),jt,In;if(gt==ae.view.length-1?(jt=ae.viewTo-1,In=ae.lineDiv.lastChild):(jt=Ft(ae.view[gt+1].line)-1,In=ae.view[gt+1].node.previousSibling),!vt)return!1;for(var Yt=ie.doc.splitLines(Eh(ie,vt,In,Je,jt)),si=vn(ie.doc,En(Je,0),En(jt,nn(ie.doc,jt).text.length));Yt.length>1&&si.length>1;)if(Ct(Yt)==Ct(si))Yt.pop(),si.pop(),jt--;else if(Yt[0]==si[0])Yt.shift(),si.shift(),Je++;else break;for(var ri=0,er=0,cr=Yt[0],Fr=si[0],so=Math.min(cr.length,Fr.length);ri<so&&cr.charCodeAt(ri)==Fr.charCodeAt(ri);)++ri;for(var Zo=Ct(Yt),Bo=Ct(si),ea=Math.min(Zo.length-(Yt.length==1?ri:0),Bo.length-(si.length==1?ri:0));er<ea&&Zo.charCodeAt(Zo.length-er-1)==Bo.charCodeAt(Bo.length-er-1);)++er;if(Yt.length==1&&si.length==1&&Je==fe.line)for(;ri&&ri>fe.ch&&Zo.charCodeAt(Zo.length-er-1)==Bo.charCodeAt(Bo.length-er-1);)ri--,er++;Yt[Yt.length-1]=Zo.slice(0,Zo.length-er).replace(/^\u200b+/,""),Yt[0]=Yt[0].slice(ri).replace(/\u200b+$/,"");var _a=En(Je,ri),Mo=En(jt,si.length?Ct(si).length-er:0);if(Yt.length>1||Yt[0]||un(_a,Mo))return Vu(ie.doc,Yt,_a,Mo,"+input"),!0},Vs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Vs.prototype.reset=function(){this.forceCompositionEnd()},Vs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Vs.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))},Vs.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&on(this.cm,function(){return ji(ie.cm)})},Vs.prototype.setUneditable=function(ie){ie.contentEditable="false"},Vs.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Un(this.cm,wh)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Vs.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Vs.prototype.onContextMenu=function(){},Vs.prototype.resetPosition=function(){},Vs.prototype.needsContentAttribute=!0;function Ch(ie,ae){var ge=ga(ie,ae.line);if(!ge||ge.hidden)return null;var fe=nn(ie.doc,ae.line),xe=Li(ge,fe,ae.line),ke=Ke(fe,ie.doc.direction),Je="left";if(ke){var vt=ye(ke,ae.ch);Je=vt%2?"right":"left"}var gt=No(xe.map,ae.ch,Je);return gt.offset=gt.collapse=="right"?gt.end:gt.start,gt}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,xe){var ke="",Je=!1,vt=ie.doc.lineSeparator(),gt=!1;function jt(ri){return function(er){return er.id==ri}}function In(){Je&&(ke+=vt,gt&&(ke+=vt),Je=gt=!1)}function Yt(ri){ri&&(In(),ke+=ri)}function si(ri){if(ri.nodeType==1){var er=ri.getAttribute("cm-text");if(er){Yt(er);return}var cr=ri.getAttribute("cm-marker"),Fr;if(cr){var so=ie.findMarks(En(fe,0),En(xe+1,0),jt(+cr));so.length&&(Fr=so[0].find(0))&&Yt(vn(ie.doc,Fr.from,Fr.to).join(vt));return}if(ri.getAttribute("contenteditable")=="false")return;var Zo=/^(pre|div|p|li|table|br)$/i.test(ri.nodeName);if(!/^br$/i.test(ri.nodeName)&&ri.textContent.length==0)return;Zo&&In();for(var Bo=0;Bo<ri.childNodes.length;Bo++)si(ri.childNodes[Bo]);/^(pre|p)$/i.test(ri.nodeName)&&(gt=!0),Zo&&(Je=!0)}else ri.nodeType==3&&Yt(ri.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;si(ae),ae!=ge;)ae=ae.nextSibling,gt=!1;return ke}function mf(ie,ae,ge){var fe;if(ae==ie.display.lineDiv){if(fe=ie.display.lineDiv.childNodes[ge],!fe)return Xd(ie.clipPos(En(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 xe=0;xe<ie.display.view.length;xe++){var ke=ie.display.view[xe];if(ke.node==fe)return ip(ke,ae,ge)}}function ip(ie,ae,ge){var fe=ie.text.firstChild,xe=!1;if(!ae||!Lt(fe,ae))return Xd(En(Ft(ie.line),0),!0);if(ae==fe&&(xe=!0,ae=fe.childNodes[ge],ge=0,!ae)){var ke=ie.rest?Ct(ie.rest):ie.line;return Xd(En(Ft(ke),ke.text.length),xe)}var Je=ae.nodeType==3?ae:null,vt=ae;for(!Je&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(Je=ae.firstChild,ge&&(ge=Je.nodeValue.length));vt.parentNode!=fe;)vt=vt.parentNode;var gt=ie.measure,jt=gt.maps;function In(Fr,so,Zo){for(var Bo=-1;Bo<(jt?jt.length:0);Bo++)for(var ea=Bo<0?gt.map:jt[Bo],_a=0;_a<ea.length;_a+=3){var Mo=ea[_a+2];if(Mo==Fr||Mo==so){var rs=Ft(Bo<0?ie.line:ie.rest[Bo]),rl=ea[_a]+Zo;return(Zo<0||Mo!=Fr)&&(rl=ea[_a+(Zo?1:0)]),En(rs,rl)}}}var Yt=In(Je,vt,ge);if(Yt)return Xd(Yt,xe);for(var si=vt.nextSibling,ri=Je?Je.nodeValue.length-ge:0;si;si=si.nextSibling){if(Yt=In(si,si.firstChild,0),Yt)return Xd(En(Yt.line,Yt.ch-ri),xe);ri+=si.textContent.length}for(var er=vt.previousSibling,cr=ge;er;er=er.previousSibling){if(Yt=In(er,er.firstChild,-1),Yt)return Xd(En(Yt.line,Yt.ch+cr),xe);cr+=er.textContent.length}}var Yl=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ue,this.hasSelection=!1,this.composing=null};Yl.prototype.init=function(ie){var ae=this,ge=this,fe=this.cm;this.createField(ie);var xe=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),De&&(xe.style.width="0px"),Et(xe,"input",function(){We&&ct>=9&&ae.hasSelection&&(ae.hasSelection=null),ge.poll()}),Et(xe,"paste",function(Je){wn(fe,Je)||Cg(Je,fe)||(fe.state.pasteIncoming=+new Date,ge.fastPoll())});function ke(Je){if(!wn(fe,Je)){if(fe.somethingSelected())Hh({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var vt=bg(fe);Hh({lineWise:!0,text:vt.text}),Je.type=="cut"?fe.setSelections(vt.ranges,null,_t):(ge.prevInput="",xe.value=vt.text.join(`
`),Dt(xe))}else return;Je.type=="cut"&&(fe.state.cutIncoming=+new Date)}}Et(xe,"cut",ke),Et(xe,"copy",ke),Et(ie.scroller,"paste",function(Je){if(!(Ln(ie,Je)||wn(fe,Je))){if(!xe.dispatchEvent){fe.state.pasteIncoming=+new Date,ge.focus();return}var vt=new Event("paste");vt.clipboardData=Je.clipboardData,xe.dispatchEvent(vt)}}),Et(ie.lineSpace,"selectstart",function(Je){Ln(ie,Je)||Pi(Je)}),Et(xe,"compositionstart",function(){var Je=fe.getCursor("from");ge.composing&&ge.composing.range.clear(),ge.composing={start:Je,range:fe.markText(Je,fe.getCursor("to"),{className:"CodeMirror-composing"})}}),Et(xe,"compositionend",function(){ge.composing&&(ge.poll(),ge.composing.range.clear(),ge.composing=null)})},Yl.prototype.createField=function(ie){this.wrapper=Bg(),this.textarea=this.wrapper.firstChild},Yl.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},Yl.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,ge=ie.doc,fe=Tr(ie);if(ie.options.moveInputWithCursor){var xe=La(ie,ge.sel.primary().head,"div"),ke=ae.wrapper.getBoundingClientRect(),Je=ae.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,xe.top+Je.top-ke.top)),fe.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,xe.left+Je.left-ke.left))}return fe},Yl.prototype.showSelection=function(ie){var ae=this.cm,ge=ae.display;Ye(ge.cursorDiv,ie.cursors),Ye(ge.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},Yl.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&&ct>=9&&(this.hasSelection=ge)}else ie||(this.prevInput=this.textarea.value="",We&&ct>=9&&(this.hasSelection=null))}},Yl.prototype.getField=function(){return this.textarea},Yl.prototype.supportsTouch=function(){return!1},Yl.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ee||rt()!=this.textarea))try{this.textarea.focus()}catch(ie){}},Yl.prototype.blur=function(){this.textarea.blur()},Yl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Yl.prototype.receivedFocus=function(){this.slowPoll()},Yl.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},Yl.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)},Yl.prototype.poll=function(){var ie=this,ae=this.cm,ge=this.textarea,fe=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Be(ge)&&!fe&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var xe=ge.value;if(xe==fe&&!ae.somethingSelected())return!1;if(We&&ct>=9&&this.hasSelection===xe||ce&&/[\uf700-\uf7ff]/.test(xe))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var ke=xe.charCodeAt(0);if(ke==8203&&!fe&&(fe="\u200B"),ke==8666)return this.reset(),this.cm.execCommand("undo")}for(var Je=0,vt=Math.min(fe.length,xe.length);Je<vt&&fe.charCodeAt(Je)==xe.charCodeAt(Je);)++Je;return on(ae,function(){wh(ae,xe.slice(Je),fe.length-Je,null,ie.composing?"*compose":null),xe.length>1e3||xe.indexOf(`
`)>-1?ge.value=ie.prevInput="":ie.prevInput=xe,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Yl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Yl.prototype.onKeyPress=function(){We&&ct>=9&&(this.hasSelection=null),this.fastPoll()},Yl.prototype.onContextMenu=function(ie){var ae=this,ge=ae.cm,fe=ge.display,xe=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var ke=mr(ge,ie),Je=fe.scroller.scrollTop;if(!ke||Ge)return;var vt=ge.options.resetSelectionOnContextMenu;vt&&ge.doc.sel.contains(ke)==-1&&Un(ge,js)(ge.doc,Ka(ke),_t);var gt=xe.style.cssText,jt=ae.wrapper.style.cssText,In=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",xe.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(ie.clientY-In.top-5)+"px; left: "+(ie.clientX-In.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 Yt;Me&&(Yt=window.scrollY),fe.input.focus(),Me&&window.scrollTo(null,Yt),fe.input.reset(),ge.somethingSelected()||(xe.value=ae.prevInput=" "),ae.contextMenuPending=ri,fe.selForContextMenu=ge.doc.sel,clearTimeout(fe.detectingSelectAll);function si(){if(xe.selectionStart!=null){var cr=ge.somethingSelected(),Fr="\u200B"+(cr?xe.value:"");xe.value="\u21DA",xe.value=Fr,ae.prevInput=cr?"":"\u200B",xe.selectionStart=1,xe.selectionEnd=Fr.length,fe.selForContextMenu=ge.doc.sel}}function ri(){if(ae.contextMenuPending==ri&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=jt,xe.style.cssText=gt,We&&ct<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=Je),xe.selectionStart!=null)){(!We||We&&ct<9)&&si();var cr=0,Fr=function(){fe.selForContextMenu==ge.doc.sel&&xe.selectionStart==0&&xe.selectionEnd>0&&ae.prevInput=="\u200B"?Un(ge,Ns)(ge):cr++<10?fe.detectingSelectAll=setTimeout(Fr,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(Fr,200)}}if(We&&ct>=9&&si(),Le){ir(ie);var er=function(){pn(window,"mouseup",er),setTimeout(ri,20)};Et(window,"mouseup",er)}else setTimeout(ri,50)},Yl.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},Yl.prototype.setUneditable=function(){},Yl.prototype.needsContentAttribute=!1;function rp(ie,ae){if(ae=ae?Mt(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=rt();ae.autofocus=ge==ie||ie.getAttribute("autofocus")!=null&&ge==document.body}function fe(){ie.value=vt.getValue()}var xe;if(ie.form&&(Et(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone)){var ke=ie.form;xe=ke.submit;try{var Je=ke.submit=function(){fe(),ke.submit=xe,ke.submit(),ke.submit=Je}}catch(gt){}}ae.finishInit=function(gt){gt.save=fe,gt.getTextArea=function(){return ie},gt.toTextArea=function(){gt.toTextArea=isNaN,fe(),ie.parentNode.removeChild(gt.getWrapperElement()),ie.style.display="",ie.form&&(pn(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=xe))}},ie.style.display="none";var vt=As(function(gt){return ie.parentNode.insertBefore(gt,ie.nextSibling)},ae);return vt}function Jd(ie){ie.off=pn,ie.on=Et,ie.wheelEventPixels=ta,ie.Doc=Bl,ie.splitLines=eo,ie.countColumn=et,ie.findColumn=Gn,ie.isWordChar=Tt,ie.Pass=xn,ie.signal=en,ie.Line=fa,ie.changeEnd=bs,ie.scrollbarModel=_d,ie.Pos=En,ie.cmpPos=un,ie.modes=wi,ie.mimeModes=$i,ie.resolveMode=$n,ie.getMode=zt,ie.modeExtensions=Vt,ie.extendMode=Qe,ie.copyState=an,ie.startState=Nt,ie.innerMode=dn,ie.commands=nu,ie.keyMap=Pu,ie.keyName=mh,ie.isModifierKey=Uc,ie.lookupKey=Tu,ie.normalizeKeyMap=_h,ie.StringStream=dt,ie.SharedTextMarker=Bc,ie.TextMarker=hn,ie.LineWidget=yl,ie.e_preventDefault=Pi,ie.e_stopPropagation=zi,ie.e_stop=ir,ie.addClass=Ot,ie.contains=Lt,ie.rmClass=je,ie.keyNames=Mc}tp(As),Yd(As);var dd="iter insert remove copy getEditor constructor".split(" ");for(var bh in Bl.prototype)Bl.prototype.hasOwnProperty(bh)&&Rt(dd,bh)<0&&(As.prototype[bh]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Bl.prototype[bh]));return Sn(Bl),As.inputStyles={textarea:Yl,contenteditable:Vs},As.defineMode=function(ie){!As.defaults.mode&&ie!="null"&&(As.defaults.mode=ie),tr.apply(this,arguments)},As.defineMIME=ei,As.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),As.defineMIME("text/plain","null"),As.defineExtension=function(ie,ae){As.prototype[ie]=ae},As.defineDocExtension=function(ie,ae){Bl.prototype[ie]=ae},As.fromTextArea=rp,Jd(As),As.version="5.58.2",As})},25419:function(_n,yn,me){(function(le){le(me(89780),me(15525),me(98101))})(function(le){"use strict";le.defineMode("markdown",function(Te,He){var st=le.getMode(Te,"text/html"),We=st.name=="null";function ct(et){if(le.findModeByName){var Ue=le.findModeByName(et);Ue&&(et=Ue.mime||Ue.mimes[0])}var Rt=le.getMode(Te,et);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 Me={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 bt in Me)Me.hasOwnProperty(bt)&&He.tokenTypeOverrides[bt]&&(Me[bt]=He.tokenTypeOverrides[bt]);var Pt=/^([*\-_])(?:\s*\1){2,}\s*$/,Ge=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,ut=/^\[(x| )\](?=\s)/i,mt=He.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,yt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,De=/^[^#!\[\]*_\\<>` "'(~:]+/,te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,ce=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function he(et,Ue,Rt){return Ue.f=Ue.inline=Rt,Rt(et,Ue)}function ve(et,Ue,Rt){return Ue.f=Ue.block=Rt,Rt(et,Ue)}function Ee(et){return!et||!/\S/.test(et.string)}function Le(et){if(et.linkTitle=!1,et.linkHref=!1,et.linkText=!1,et.em=!1,et.strong=!1,et.strikethrough=!1,et.quote=0,et.indentedCode=!1,et.f==je){var Ue=We;if(!Ue){var Rt=le.innerMode(st,et.htmlState);Ue=Rt.mode.name=="xml"&&Rt.state.tagStart===null&&!Rt.state.context&&Rt.state.tokenize.isInText}Ue&&(et.f=lt,et.block=Ne,et.htmlState=null)}return et.trailingSpace=0,et.trailingSpaceNewLine=!1,et.prevLine=et.thisLine,et.thisLine={stream:null},null}function Ne(et,Ue){var Rt=et.column()===Ue.indentation,Pn=Ee(Ue.prevLine.stream),xn=Ue.indentedCode,_t=Ue.prevLine.hr,qt=Ue.list!==!1,cn=(Ue.listStack[Ue.listStack.length-1]||0)+3;Ue.indentedCode=!1;var Gn=Ue.indentation;if(Ue.indentationDiff===null&&(Ue.indentationDiff=Ue.indentation,qt)){for(Ue.list=null;Gn<Ue.listStack[Ue.listStack.length-1];)Ue.listStack.pop(),Ue.listStack.length?Ue.indentation=Ue.listStack[Ue.listStack.length-1]:Ue.list=!1;Ue.list!==!1&&(Ue.indentationDiff=Gn-Ue.listStack[Ue.listStack.length-1])}var gn=!Pn&&!_t&&!Ue.prevLine.header&&(!qt||!xn)&&!Ue.prevLine.fencedCodeEnd,Zn=(Ue.list===!1||_t||Pn)&&Ue.indentation<=cn&&et.match(Pt),Ct=null;if(Ue.indentationDiff>=4&&(xn||Ue.prevLine.fencedCodeEnd||Ue.prevLine.header||Pn))return et.skipToEnd(),Ue.indentedCode=!0,Me.code;if(et.eatSpace())return null;if(Rt&&Ue.indentation<=cn&&(Ct=et.match(mt))&&Ct[1].length<=6)return Ue.quote=0,Ue.header=Ct[1].length,Ue.thisLine.header=!0,He.highlightFormatting&&(Ue.formatting="header"),Ue.f=Ue.inline,Ye(Ue);if(Ue.indentation<=cn&&et.eat(">"))return Ue.quote=Rt?1:Ue.quote+1,He.highlightFormatting&&(Ue.formatting="quote"),et.eatSpace(),Ye(Ue);if(!Zn&&!Ue.setext&&Rt&&Ue.indentation<=cn&&(Ct=et.match(Ge))){var Wn=Ct[1]?"ol":"ul";return Ue.indentation=Gn+et.current().length,Ue.list=!0,Ue.quote=0,Ue.listStack.push(Ue.indentation),Ue.em=!1,Ue.strong=!1,Ue.code=!1,Ue.strikethrough=!1,He.taskLists&&et.match(ut,!1)&&(Ue.taskList=!0),Ue.f=Ue.inline,He.highlightFormatting&&(Ue.formatting=["list","list-"+Wn]),Ye(Ue)}else{if(Rt&&Ue.indentation<=cn&&(Ct=et.match(te,!0)))return Ue.quote=0,Ue.fencedEndRE=new RegExp(Ct[1]+"+ *$"),Ue.localMode=He.fencedCodeBlockHighlighting&&ct(Ct[2]||He.fencedCodeBlockDefaultMode),Ue.localMode&&(Ue.localState=le.startState(Ue.localMode)),Ue.f=Ue.block=ze,He.highlightFormatting&&(Ue.formatting="code-block"),Ue.code=-1,Ye(Ue);if(Ue.setext||(!gn||!qt)&&!Ue.quote&&Ue.list===!1&&!Ue.code&&!Zn&&!ee.test(et.string)&&(Ct=et.lookAhead(1))&&(Ct=Ct.match(yt)))return Ue.setext?(Ue.header=Ue.setext,Ue.setext=0,et.skipToEnd(),He.highlightFormatting&&(Ue.formatting="header")):(Ue.header=Ct[0].charAt(0)=="="?1:2,Ue.setext=Ue.header),Ue.thisLine.header=!0,Ue.f=Ue.inline,Ye(Ue);if(Zn)return et.skipToEnd(),Ue.hr=!0,Ue.thisLine.hr=!0,Me.hr;if(et.peek()==="[")return he(et,Ue,wt)}return he(et,Ue,Ue.inline)}function je(et,Ue){var Rt=st.token(et,Ue.htmlState);if(!We){var Pn=le.innerMode(st,Ue.htmlState);(Pn.mode.name=="xml"&&Pn.state.tagStart===null&&!Pn.state.context&&Pn.state.tokenize.isInText||Ue.md_inside&&et.current().indexOf(">")>-1)&&(Ue.f=lt,Ue.block=Ne,Ue.htmlState=null)}return Rt}function ze(et,Ue){var Rt=Ue.listStack[Ue.listStack.length-1]||0,Pn=Ue.indentation<Rt,xn=Rt+3;if(Ue.fencedEndRE&&Ue.indentation<=xn&&(Pn||et.match(Ue.fencedEndRE))){He.highlightFormatting&&(Ue.formatting="code-block");var _t;return Pn||(_t=Ye(Ue)),Ue.localMode=Ue.localState=null,Ue.block=Ne,Ue.f=lt,Ue.fencedEndRE=null,Ue.code=0,Ue.thisLine.fencedCodeEnd=!0,Pn?ve(et,Ue,Ue.block):_t}else return Ue.localMode?Ue.localMode.token(et,Ue.localState):(et.skipToEnd(),Me.code)}function Ye(et){var Ue=[];if(et.formatting){Ue.push(Me.formatting),typeof et.formatting=="string"&&(et.formatting=[et.formatting]);for(var Rt=0;Rt<et.formatting.length;Rt++)Ue.push(Me.formatting+"-"+et.formatting[Rt]),et.formatting[Rt]==="header"&&Ue.push(Me.formatting+"-"+et.formatting[Rt]+"-"+et.header),et.formatting[Rt]==="quote"&&(!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=et.quote?Ue.push(Me.formatting+"-"+et.formatting[Rt]+"-"+et.quote):Ue.push("error"))}if(et.taskOpen)return Ue.push("meta"),Ue.length?Ue.join(" "):null;if(et.taskClosed)return Ue.push("property"),Ue.length?Ue.join(" "):null;if(et.linkHref?Ue.push(Me.linkHref,"url"):(et.strong&&Ue.push(Me.strong),et.em&&Ue.push(Me.em),et.strikethrough&&Ue.push(Me.strikethrough),et.emoji&&Ue.push(Me.emoji),et.linkText&&Ue.push(Me.linkText),et.code&&Ue.push(Me.code),et.image&&Ue.push(Me.image),et.imageAltText&&Ue.push(Me.imageAltText,"link"),et.imageMarker&&Ue.push(Me.imageMarker)),et.header&&Ue.push(Me.header,Me.header+"-"+et.header),et.quote&&(Ue.push(Me.quote),!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=et.quote?Ue.push(Me.quote+"-"+et.quote):Ue.push(Me.quote+"-"+He.maxBlockquoteDepth)),et.list!==!1){var Pn=(et.listStack.length-1)%3;Pn?Pn===1?Ue.push(Me.list2):Ue.push(Me.list3):Ue.push(Me.list1)}return et.trailingSpaceNewLine?Ue.push("trailing-space-new-line"):et.trailingSpace&&Ue.push("trailing-space-"+(et.trailingSpace%2?"a":"b")),Ue.length?Ue.join(" "):null}function Xe(et,Ue){if(et.match(De,!0))return Ye(Ue)}function lt(et,Ue){var Rt=Ue.text(et,Ue);if(typeof Rt!="undefined")return Rt;if(Ue.list)return Ue.list=null,Ye(Ue);if(Ue.taskList){var Pn=et.match(ut,!0)[1]===" ";return Pn?Ue.taskOpen=!0:Ue.taskClosed=!0,He.highlightFormatting&&(Ue.formatting="task"),Ue.taskList=!1,Ye(Ue)}if(Ue.taskOpen=!1,Ue.taskClosed=!1,Ue.header&&et.match(/^#+$/,!0))return He.highlightFormatting&&(Ue.formatting="header"),Ye(Ue);var xn=et.next();if(Ue.linkTitle){Ue.linkTitle=!1;var _t=xn;xn==="("&&(_t=")"),_t=(_t+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var qt="^\\s*(?:[^"+_t+"\\\\]+|\\\\\\\\|\\\\.)"+_t;if(et.match(new RegExp(qt),!0))return Me.linkHref}if(xn==="`"){var cn=Ue.formatting;He.highlightFormatting&&(Ue.formatting="code"),et.eatWhile("`");var Gn=et.current().length;if(Ue.code==0&&(!Ue.quote||Gn==1))return Ue.code=Gn,Ye(Ue);if(Gn==Ue.code){var gn=Ye(Ue);return Ue.code=0,gn}else return Ue.formatting=cn,Ye(Ue)}else if(Ue.code)return Ye(Ue);if(xn==="\\"&&(et.next(),He.highlightFormatting)){var Zn=Ye(Ue),Ct=Me.formatting+"-escape";return Zn?Zn+" "+Ct:Ct}if(xn==="!"&&et.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ue.imageMarker=!0,Ue.image=!0,He.highlightFormatting&&(Ue.formatting="image"),Ye(Ue);if(xn==="["&&Ue.imageMarker&&et.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ue.imageMarker=!1,Ue.imageAltText=!0,He.highlightFormatting&&(Ue.formatting="image"),Ye(Ue);if(xn==="]"&&Ue.imageAltText){He.highlightFormatting&&(Ue.formatting="image");var Zn=Ye(Ue);return Ue.imageAltText=!1,Ue.image=!1,Ue.inline=Ue.f=Lt,Zn}if(xn==="["&&!Ue.image)return Ue.linkText&&et.match(/^.*?\]/)||(Ue.linkText=!0,He.highlightFormatting&&(Ue.formatting="link")),Ye(Ue);if(xn==="]"&&Ue.linkText){He.highlightFormatting&&(Ue.formatting="link");var Zn=Ye(Ue);return Ue.linkText=!1,Ue.inline=Ue.f=et.match(/\(.*?\)| ?\[.*?\]/,!1)?Lt:lt,Zn}if(xn==="<"&&et.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ue.f=Ue.inline=Ze,He.highlightFormatting&&(Ue.formatting="link");var Zn=Ye(Ue);return Zn?Zn+=" ":Zn="",Zn+Me.linkInline}if(xn==="<"&&et.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ue.f=Ue.inline=Ze,He.highlightFormatting&&(Ue.formatting="link");var Zn=Ye(Ue);return Zn?Zn+=" ":Zn="",Zn+Me.linkEmail}if(He.xml&&xn==="<"&&et.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Wn=et.string.indexOf(">",et.pos);if(Wn!=-1){var di=et.string.substring(et.start,Wn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(di)&&(Ue.md_inside=!0)}return et.backUp(1),Ue.htmlState=le.startState(st),ve(et,Ue,je)}if(He.xml&&xn==="<"&&et.match(/^\/\w*?>/))return Ue.md_inside=!1,"tag";if(xn==="*"||xn==="_"){for(var Kt=1,ln=et.pos==1?" ":et.string.charAt(et.pos-2);Kt<3&&et.eat(xn);)Kt++;var $t=et.peek()||" ",Tt=!/\s/.test($t)&&(!ce.test($t)||/\s/.test(ln)||ce.test(ln)),ft=!/\s/.test(ln)&&(!ce.test(ln)||/\s/.test($t)||ce.test($t)),$e=null,Gt=null;if(Kt%2&&(!Ue.em&&Tt&&(xn==="*"||!ft||ce.test(ln))?$e=!0:Ue.em==xn&&ft&&(xn==="*"||!Tt||ce.test($t))&&($e=!1)),Kt>1&&(!Ue.strong&&Tt&&(xn==="*"||!ft||ce.test(ln))?Gt=!0:Ue.strong==xn&&ft&&(xn==="*"||!Tt||ce.test($t))&&(Gt=!1)),Gt!=null||$e!=null){He.highlightFormatting&&(Ue.formatting=$e==null?"strong":Gt==null?"em":"strong em"),$e===!0&&(Ue.em=xn),Gt===!0&&(Ue.strong=xn);var gn=Ye(Ue);return $e===!1&&(Ue.em=!1),Gt===!1&&(Ue.strong=!1),gn}}else if(xn===" "&&(et.eat("*")||et.eat("_"))){if(et.peek()===" ")return Ye(Ue);et.backUp(1)}if(He.strikethrough){if(xn==="~"&&et.eatWhile(xn)){if(Ue.strikethrough){He.highlightFormatting&&(Ue.formatting="strikethrough");var gn=Ye(Ue);return Ue.strikethrough=!1,gn}else if(et.match(/^[^\s]/,!1))return Ue.strikethrough=!0,He.highlightFormatting&&(Ue.formatting="strikethrough"),Ye(Ue)}else if(xn===" "&&et.match(/^~~/,!0)){if(et.peek()===" ")return Ye(Ue);et.backUp(2)}}if(He.emoji&&xn===":"&&et.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ue.emoji=!0,He.highlightFormatting&&(Ue.formatting="emoji");var Ht=Ye(Ue);return Ue.emoji=!1,Ht}return xn===" "&&(et.match(/^ +$/,!1)?Ue.trailingSpace++:Ue.trailingSpace&&(Ue.trailingSpaceNewLine=!0)),Ye(Ue)}function Ze(et,Ue){var Rt=et.next();if(Rt===">"){Ue.f=Ue.inline=lt,He.highlightFormatting&&(Ue.formatting="link");var Pn=Ye(Ue);return Pn?Pn+=" ":Pn="",Pn+Me.linkInline}return et.match(/^[^>]+/,!0),Me.linkInline}function Lt(et,Ue){if(et.eatSpace())return null;var Rt=et.next();return Rt==="("||Rt==="["?(Ue.f=Ue.inline=Ot(Rt==="("?")":"]"),He.highlightFormatting&&(Ue.formatting="link-string"),Ue.linkHref=!0,Ye(Ue)):"error"}var rt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ot(et){return function(Ue,Rt){var Pn=Ue.next();if(Pn===et){Rt.f=Rt.inline=lt,He.highlightFormatting&&(Rt.formatting="link-string");var xn=Ye(Rt);return Rt.linkHref=!1,xn}return Ue.match(rt[et]),Rt.linkHref=!0,Ye(Rt)}}function wt(et,Ue){return et.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ue.f=Dt,et.next(),He.highlightFormatting&&(Ue.formatting="link"),Ue.linkText=!0,Ye(Ue)):he(et,Ue,lt)}function Dt(et,Ue){if(et.match(/^\]:/,!0)){Ue.f=Ue.inline=Wt,He.highlightFormatting&&(Ue.formatting="link");var Rt=Ye(Ue);return Ue.linkText=!1,Rt}return et.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function Wt(et,Ue){return et.eatSpace()?null:(et.match(/^[^\s]+/,!0),et.peek()===void 0?Ue.linkTitle=!0:et.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ue.f=Ue.inline=lt,Me.linkHref+" url")}var Mt={startState:function(){return{f:Ne,prevLine:{stream:null},thisLine:{stream:null},block:Ne,htmlState:null,indentation:0,inline:lt,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(et){return{f:et.f,prevLine:et.prevLine,thisLine:et.thisLine,block:et.block,htmlState:et.htmlState&&le.copyState(st,et.htmlState),indentation:et.indentation,localMode:et.localMode,localState:et.localMode?le.copyState(et.localMode,et.localState):null,inline:et.inline,text:et.text,formatting:!1,linkText:et.linkText,linkTitle:et.linkTitle,linkHref:et.linkHref,code:et.code,em:et.em,strong:et.strong,strikethrough:et.strikethrough,emoji:et.emoji,header:et.header,setext:et.setext,hr:et.hr,taskList:et.taskList,list:et.list,listStack:et.listStack.slice(0),quote:et.quote,indentedCode:et.indentedCode,trailingSpace:et.trailingSpace,trailingSpaceNewLine:et.trailingSpaceNewLine,md_inside:et.md_inside,fencedEndRE:et.fencedEndRE}},token:function(et,Ue){if(Ue.formatting=!1,et!=Ue.thisLine.stream){if(Ue.header=0,Ue.hr=!1,et.match(/^\s*$/,!0))return Le(Ue),null;if(Ue.prevLine=Ue.thisLine,Ue.thisLine={stream:et},Ue.taskList=!1,Ue.trailingSpace=0,Ue.trailingSpaceNewLine=!1,!Ue.localState&&(Ue.f=Ue.block,Ue.f!=je)){var Rt=et.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ue.indentation=Rt,Ue.indentationDiff=null,Rt>0)return null}}return Ue.f(et,Ue)},innerMode:function(et){return et.block==je?{state:et.htmlState,mode:st}:et.localState?{state:et.localState,mode:et.localMode}:{state:et,mode:Mt}},indent:function(et,Ue,Rt){return et.block==je&&st.indent?st.indent(et.htmlState,Ue,Rt):et.localState&&et.localMode.indent?et.localMode.indent(et.localState,Ue,Rt):le.Pass},blankLine:Le,getType:Ye,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Mt},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},98101:function(_n,yn,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(st){st=st.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var ct=le.modeInfo[We];if(ct.mime==st)return ct;if(ct.mimes){for(var Me=0;Me<ct.mimes.length;Me++)if(ct.mimes[Me]==st)return ct}}if(/\+xml$/.test(st))return le.findModeByMIME("application/xml");if(/\+json$/.test(st))return le.findModeByMIME("application/json")},le.findModeByExtension=function(st){st=st.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var ct=le.modeInfo[We];if(ct.ext){for(var Me=0;Me<ct.ext.length;Me++)if(ct.ext[Me]==st)return ct}}},le.findModeByFileName=function(st){for(var We=0;We<le.modeInfo.length;We++){var ct=le.modeInfo[We];if(ct.file&&ct.file.test(st))return ct}var Me=st.lastIndexOf("."),bt=Me>-1&&st.substring(Me+1,st.length);if(bt)return le.findModeByExtension(bt)},le.findModeByName=function(st){st=st.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var ct=le.modeInfo[We];if(ct.name.toLowerCase()==st)return ct;if(ct.alias){for(var Me=0;Me<ct.alias.length;Me++)if(ct.alias[Me].toLowerCase()==st)return ct}}}})},67549:function(_n,yn,me){(function(le){le(me(89780))})(function(le){"use strict";le.defineMode("stex",function(Te,He){"use strict";function st(De,te){De.cmdState.push(te)}function We(De){return De.cmdState.length>0?De.cmdState[De.cmdState.length-1]:null}function ct(De){var te=De.cmdState.pop();te&&te.closeBracket()}function Me(De){for(var te=De.cmdState,ee=te.length-1;ee>=0;ee--){var ce=te[ee];if(ce.name!="DEFAULT")return ce}return{styleIdentifier:function(){return null}}}function bt(De,te,ee){return function(){this.name=De,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 Pt={};Pt.importmodule=bt("importmodule","tag",["string","builtin"]),Pt.documentclass=bt("documentclass","tag",["","atom"]),Pt.usepackage=bt("usepackage","tag",["atom"]),Pt.begin=bt("begin","tag",["atom"]),Pt.end=bt("end","tag",["atom"]),Pt.label=bt("label","tag",["atom"]),Pt.ref=bt("ref","tag",["atom"]),Pt.eqref=bt("eqref","tag",["atom"]),Pt.cite=bt("cite","tag",["atom"]),Pt.bibitem=bt("bibitem","tag",["atom"]),Pt.Bibitem=bt("Bibitem","tag",["atom"]),Pt.RBibitem=bt("RBibitem","tag",["atom"]),Pt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Ge(De,te){De.f=te}function ut(De,te){var ee;if(De.match(/^\\[a-zA-Z@]+/)){var ce=De.current().slice(1);return ee=Pt.hasOwnProperty(ce)?Pt[ce]:Pt.DEFAULT,ee=new ee,st(te,ee),Ge(te,yt),ee.style}if(De.match(/^\\[$&%#{}_]/)||De.match(/^\\[,;!\/\\]/))return"tag";if(De.match("\\["))return Ge(te,function(he,ve){return mt(he,ve,"\\]")}),"keyword";if(De.match("\\("))return Ge(te,function(he,ve){return mt(he,ve,"\\)")}),"keyword";if(De.match("$$"))return Ge(te,function(he,ve){return mt(he,ve,"$$")}),"keyword";if(De.match("$"))return Ge(te,function(he,ve){return mt(he,ve,"$")}),"keyword";var se=De.next();if(se=="%")return De.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=We(te),ee)ee.closeBracket(se),Ge(te,yt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=Pt.DEFAULT,ee=new ee,st(te,ee),"bracket"):/\d/.test(se)?(De.eatWhile(/[\w.%]/),"atom"):(De.eatWhile(/[\w\-_]/),ee=Me(te),ee.name=="begin"&&(ee.argument=De.current()),ee.styleIdentifier())}function mt(De,te,ee){if(De.eatSpace())return null;if(ee&&De.match(ee))return Ge(te,ut),"keyword";if(De.match(/^\\[a-zA-Z@]+/))return"tag";if(De.match(/^[a-zA-Z]+/))return"variable-2";if(De.match(/^\\[$&%#{}_]/)||De.match(/^\\[,;!\/]/)||De.match(/^[\^_&]/))return"tag";if(De.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(De.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ce=De.next();return ce=="{"||ce=="}"||ce=="["||ce=="]"||ce=="("||ce==")"?"bracket":ce=="%"?(De.skipToEnd(),"comment"):"error"}function yt(De,te){var ee=De.peek(),ce;return ee=="{"||ee=="["?(ce=We(te),ce.openBracket(ee),De.eat(ee),Ge(te,ut),"bracket"):/[ \t\r]/.test(ee)?(De.eat(ee),null):(Ge(te,ut),ct(te),ut(De,te))}return{startState:function(){var De=He.inMathMode?function(te,ee){return mt(te,ee)}:ut;return{cmdState:[],f:De}},copyState:function(De){return{cmdState:De.cmdState.slice(),f:De.f}},token:function(De,te){return te.f(De,te)},blankLine:function(De){De.f=ut,De.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},15525:function(_n,yn,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(st,We){var ct=st.indentUnit,Me={},bt=We.htmlMode?Te:He;for(var Pt in bt)Me[Pt]=bt[Pt];for(var Pt in We)Me[Pt]=We[Pt];var Ge,ut;function mt(Ze,Lt){function rt(Dt){return Lt.tokenize=Dt,Dt(Ze,Lt)}var Ot=Ze.next();if(Ot=="<")return Ze.eat("!")?Ze.eat("[")?Ze.match("CDATA[")?rt(te("atom","]]>")):null:Ze.match("--")?rt(te("comment","-->")):Ze.match("DOCTYPE",!0,!0)?(Ze.eatWhile(/[\w\._\-]/),rt(ee(1))):null:Ze.eat("?")?(Ze.eatWhile(/[\w\._\-]/),Lt.tokenize=te("meta","?>"),"meta"):(Ge=Ze.eat("/")?"closeTag":"openTag",Lt.tokenize=yt,"tag bracket");if(Ot=="&"){var wt;return Ze.eat("#")?Ze.eat("x")?wt=Ze.eatWhile(/[a-fA-F\d]/)&&Ze.eat(";"):wt=Ze.eatWhile(/[\d]/)&&Ze.eat(";"):wt=Ze.eatWhile(/[\w\.\-:]/)&&Ze.eat(";"),wt?"atom":"error"}else return Ze.eatWhile(/[^&<]/),null}mt.isInText=!0;function yt(Ze,Lt){var rt=Ze.next();if(rt==">"||rt=="/"&&Ze.eat(">"))return Lt.tokenize=mt,Ge=rt==">"?"endTag":"selfcloseTag","tag bracket";if(rt=="=")return Ge="equals",null;if(rt=="<"){Lt.tokenize=mt,Lt.state=ve,Lt.tagName=Lt.tagStart=null;var Ot=Lt.tokenize(Ze,Lt);return Ot?Ot+" tag error":"tag error"}else return/[\'\"]/.test(rt)?(Lt.tokenize=De(rt),Lt.stringStartCol=Ze.column(),Lt.tokenize(Ze,Lt)):(Ze.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function De(Ze){var Lt=function(rt,Ot){for(;!rt.eol();)if(rt.next()==Ze){Ot.tokenize=yt;break}return"string"};return Lt.isInAttribute=!0,Lt}function te(Ze,Lt){return function(rt,Ot){for(;!rt.eol();){if(rt.match(Lt)){Ot.tokenize=mt;break}rt.next()}return Ze}}function ee(Ze){return function(Lt,rt){for(var Ot;(Ot=Lt.next())!=null;){if(Ot=="<")return rt.tokenize=ee(Ze+1),rt.tokenize(Lt,rt);if(Ot==">")if(Ze==1){rt.tokenize=mt;break}else return rt.tokenize=ee(Ze-1),rt.tokenize(Lt,rt)}return"meta"}}function ce(Ze,Lt,rt){this.prev=Ze.context,this.tagName=Lt,this.indent=Ze.indented,this.startOfLine=rt,(Me.doNotIndent.hasOwnProperty(Lt)||Ze.context&&Ze.context.noIndent)&&(this.noIndent=!0)}function se(Ze){Ze.context&&(Ze.context=Ze.context.prev)}function he(Ze,Lt){for(var rt;;){if(!Ze.context||(rt=Ze.context.tagName,!Me.contextGrabbers.hasOwnProperty(rt)||!Me.contextGrabbers[rt].hasOwnProperty(Lt)))return;se(Ze)}}function ve(Ze,Lt,rt){return Ze=="openTag"?(rt.tagStart=Lt.column(),Ee):Ze=="closeTag"?Le:ve}function Ee(Ze,Lt,rt){return Ze=="word"?(rt.tagName=Lt.current(),ut="tag",ze):Me.allowMissingTagName&&Ze=="endTag"?(ut="tag bracket",ze(Ze,Lt,rt)):(ut="error",Ee)}function Le(Ze,Lt,rt){if(Ze=="word"){var Ot=Lt.current();return rt.context&&rt.context.tagName!=Ot&&Me.implicitlyClosed.hasOwnProperty(rt.context.tagName)&&se(rt),rt.context&&rt.context.tagName==Ot||Me.matchClosing===!1?(ut="tag",Ne):(ut="tag error",je)}else return Me.allowMissingTagName&&Ze=="endTag"?(ut="tag bracket",Ne(Ze,Lt,rt)):(ut="error",je)}function Ne(Ze,Lt,rt){return Ze!="endTag"?(ut="error",Ne):(se(rt),ve)}function je(Ze,Lt,rt){return ut="error",Ne(Ze,Lt,rt)}function ze(Ze,Lt,rt){if(Ze=="word")return ut="attribute",Ye;if(Ze=="endTag"||Ze=="selfcloseTag"){var Ot=rt.tagName,wt=rt.tagStart;return rt.tagName=rt.tagStart=null,Ze=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(Ot)?he(rt,Ot):(he(rt,Ot),rt.context=new ce(rt,Ot,wt==rt.indented)),ve}return ut="error",ze}function Ye(Ze,Lt,rt){return Ze=="equals"?Xe:(Me.allowMissing||(ut="error"),ze(Ze,Lt,rt))}function Xe(Ze,Lt,rt){return Ze=="string"?lt:Ze=="word"&&Me.allowUnquoted?(ut="string",ze):(ut="error",ze(Ze,Lt,rt))}function lt(Ze,Lt,rt){return Ze=="string"?lt:ze(Ze,Lt,rt)}return{startState:function(Ze){var Lt={tokenize:mt,state:ve,indented:Ze||0,tagName:null,tagStart:null,context:null};return Ze!=null&&(Lt.baseIndent=Ze),Lt},token:function(Ze,Lt){if(!Lt.tagName&&Ze.sol()&&(Lt.indented=Ze.indentation()),Ze.eatSpace())return null;Ge=null;var rt=Lt.tokenize(Ze,Lt);return(rt||Ge)&&rt!="comment"&&(ut=null,Lt.state=Lt.state(Ge||rt,Ze,Lt),ut&&(rt=ut=="error"?rt+" error":ut)),rt},indent:function(Ze,Lt,rt){var Ot=Ze.context;if(Ze.tokenize.isInAttribute)return Ze.tagStart==Ze.indented?Ze.stringStartCol+1:Ze.indented+ct;if(Ot&&Ot.noIndent)return le.Pass;if(Ze.tokenize!=yt&&Ze.tokenize!=mt)return rt?rt.match(/^(\s*)/)[0].length:0;if(Ze.tagName)return Me.multilineTagIndentPastTag!==!1?Ze.tagStart+Ze.tagName.length+2:Ze.tagStart+ct*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test(Lt))return 0;var wt=Lt&&/^<(\/)?([\w_:\.-]*)/.exec(Lt);if(wt&&wt[1])for(;Ot;)if(Ot.tagName==wt[2]){Ot=Ot.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(Ot.tagName))Ot=Ot.prev;else break;else if(wt)for(;Ot;){var Dt=Me.contextGrabbers[Ot.tagName];if(Dt&&Dt.hasOwnProperty(wt[2]))Ot=Ot.prev;else break}for(;Ot&&Ot.prev&&!Ot.startOfLine;)Ot=Ot.prev;return Ot?Ot.indent+ct:Ze.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(Ze){Ze.state==Xe&&(Ze.state=ze)},xmlCurrentTag:function(Ze){return Ze.tagName?{name:Ze.tagName,close:Ze.type=="closeTag"}:null},xmlCurrentContext:function(Ze){for(var Lt=[],rt=Ze.context;rt;rt=rt.prev)rt.tagName&&Lt.push(rt.tagName);return Lt.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(_n,yn,me){"use strict";me.d(yn,{$u:function(){return Pt},BD:function(){return Kt},E9:function(){return bt},FF:function(){return xi},FJ:function(){return ve},Hn:function(){return he},KX:function(){return Le},NB:function(){return Re},S0:function(){return Ct},UL:function(){return Ge},Vk:function(){return se},Vm:function(){return ye},YI:function(){return Wn},ZA:function(){return He},Zt:function(){return ut},al:function(){return $e},bn:function(){return ft},bx:function(){return ln},g2:function(){return di},h1:function(){return Xe},hD:function(){return Sn},l4:function(){return ct},rU:function(){return Pe},s_:function(){return $t},uz:function(){return at},z6:function(){return mt}}),_n=me.hmd(_n),function(){var Be;function Fi(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function wr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Fi(a)}}function Fn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var wi=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},$i;if(typeof Object.setPrototypeOf=="function")$i=Object.setPrototypeOf;else{var tr;e:{var ei={a:!0},$n={};try{$n.__proto__=ei,tr=$n.a;break e}catch(a){}tr=!1}$i=tr?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var zt=$i;function Vt(a,y){if(a.prototype=wi(y.prototype),a.prototype.constructor=a,zt)zt(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 Qe=typeof me.g!="undefined"&&me.g!=null?me.g:self,an=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},dn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Nt(a,y){if(y){var x=Qe;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&&dn(x,a,{writable:!0,value:y})}}Nt("Object.assign",function(a){return a||an}),Nt("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 dt=typeof globalThis=="object"&&globalThis||typeof me.g=="object"&&me.g.global===me.g&&me.g||typeof self=="object"&&self.self===self&&self||{};dt.requestAnimationFrame===void 0&&(dt.setImmediate===void 0?dt.requestAnimationFrame=function(a){dt.setTimeout(a,0)}:dt.requestAnimationFrame=dt.setImmediate);function nn(){}function vn(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&dt.clearTimeout(x),x=zn(function(){x=-1,a.apply(E,b)},y)}}function zn(a,y){return dt.setTimeout(a,y)}function qn(a){return dt.document.createElement(a)}function Ft(a){throw Error(a)}function Bn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Ft(a)}function Kn(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),Ft(x+" is not in the range "+y+": "+a)}function Ci(a){dt.console&&dt.console.log(a)}function En(a){return typeof a=="object"&&a!==null}function un(a){return Array.isArray(a)||dt.NodeList&&a instanceof dt.NodeList||dt.HTMLCollection&&a instanceof dt.HTMLCollection}function bn(a){return Array.prototype.slice.call(a)}function Ei(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Ft("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Ni(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Ft("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function mi(){var a=ro.pop();return a===void 0?[]:a}function Di(a){a.length=0,ro.push(a)}function Ai(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(En(a)&&a.constructor)return Ai(a.constructor);return typeof a}function gr(a){var y=a;return En(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function Or(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 Hr(a,y,x){Object.defineProperty(jo.prototype,a,{get:y,set:x})}function jn(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 Po=dt.navigator!==void 0&&0<dt.navigator.userAgent.indexOf("Trident/7"),Wr=dt.navigator!==void 0&&dt.navigator.platform!==void 0&&dt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,ro=[];Object.freeze([]),nn.className="Util",nn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",nn.adym="gojs.net",nn.vfo="28e645fdb266",nn.className="Util";function Mn(a,y,x){Ao(this),this.j=a,this.xa=y,this.o=x}Mn.prototype.toString=function(){return"EnumValue."+this.xa};function ii(a,y){return y==null||y===""?null:a[y]}Qe.Object.defineProperties(Mn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Mn.className="EnumValue";function Hi(){this.ew=[]}Hi.prototype.toString=function(){return this.ew.join("")},Hi.prototype.add=function(a){a!==""&&this.ew.push(a)},Hi.className="StringBuilder";function xr(){}xr.className="PropertyCollection";var qi={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){dt.console&&dt.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 pr(){}pr.prototype.reset=function(){},pr.prototype.next=function(){return!1},pr.prototype.Ad=function(){return!1},pr.prototype.first=function(){return null},pr.prototype.any=function(){return!1},pr.prototype.all=function(){return!0},pr.prototype.each=function(){return this},pr.prototype.map=function(){return this},pr.prototype.filter=function(){return this},pr.prototype.de=function(){},pr.prototype.toString=function(){return"EmptyIterator"},Qe.Object.defineProperties(pr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),pr.prototype.first=pr.prototype.first,pr.prototype.hasNext=pr.prototype.Ad,pr.prototype.next=pr.prototype.next,pr.prototype.reset=pr.prototype.reset;var Vr=null;pr.className="EmptyIterator",Vr=new pr;function jr(a){this.key=-1,this.value=a}jr.prototype.reset=function(){this.key=-1},jr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},jr.prototype.Ad=function(){return this.next()},jr.prototype.first=function(){return this.key=0,this.value},jr.prototype.any=function(a){return this.key=-1,a(this.value)},jr.prototype.all=function(a){return this.key=-1,a(this.value)},jr.prototype.each=function(a){return this.key=-1,a(this.value),this},jr.prototype.map=function(a){return new jr(a(this.value))},jr.prototype.filter=function(a){return a(this.value)?new jr(this.value):Vr},jr.prototype.de=function(){this.value=null},jr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Qe.Object.defineProperties(jr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),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="SingletonIterator";function kr(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}kr.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},kr.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},kr.prototype.Ad=function(){return this.next()},kr.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},kr.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},kr.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},kr.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},kr.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 Yn,a.s=x,a.xb(),a.iterator},kr.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 Yn,a.s=x,a.xb(),a.iterator},kr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},kr.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Qe.Object.defineProperties(kr.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}}}),kr.prototype.first=kr.prototype.first,kr.prototype.hasNext=kr.prototype.Ad,kr.prototype.next=kr.prototype.next,kr.prototype.reset=kr.prototype.reset,kr.className="ListIterator";function Kr(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Kr.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Kr.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)},Kr.prototype.Ad=function(){return this.next()},Kr.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},Kr.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},Kr.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},Kr.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},Kr.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 Yn,a.s=x,a.xb(),a.iterator},Kr.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 Yn,a.s=x,a.xb(),a.iterator},Kr.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Kr.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Qe.Object.defineProperties(Kr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Kr.prototype.first=Kr.prototype.first,Kr.prototype.hasNext=Kr.prototype.Ad,Kr.prototype.next=Kr.prototype.next,Kr.prototype.reset=Kr.prototype.reset,Kr.className="ListIteratorBackwards";function Yn(a){Ao(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Ft("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Be=Yn.prototype,Be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.toString=function(){return"List()#"+nr(this)},Be.add=function(a){return a===null?this:(this._isFrozen&&Bn(this,a),this.s.push(a),this.xb(),this)},Be.push=function(a){this.add(a)},Be.addAll=function(a){if(a===null)return this;this._isFrozen&&Bn(this);var y=this.s;if(un(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},Be.clear=function(){this._isFrozen&&Bn(this),this.s.length=0,this.xb()},Be.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Be.has=function(a){return this.contains(a)},Be.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Be.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Kn(a,"0 <= i < length",Yn,"elt:i"),y[a]},Be.get=function(a){return this.M(a)},Be.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Kn(a,"0 <= i < length",Yn,"setElt:i"),this._isFrozen&&Bn(this,a),x[a]=y},Be.set=function(a,y){this.cd(a,y)},Be.first=function(){var a=this.s;return a.length===0?null:a[0]},Be.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Be.pop=function(){this._isFrozen&&Bn(this);var a=this.s;return 0<a.length?a.pop():null},Yn.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},Yn.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},Yn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Yn.prototype.map=function(a){for(var y=new Yn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Yn.prototype.filter=function(a){for(var y=new Yn,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},Be=Yn.prototype,Be.Gb=function(a,y){0>a&&Kn(a,">= 0",Yn,"insertAt:i"),this._isFrozen&&Bn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Be.remove=function(a){if(a===null)return!1;this._isFrozen&&Bn(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)},Be.delete=function(a){return this.remove(a)},Be.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Kn(a,"0 <= i < length",Yn,"removeAt:i"),this._isFrozen&&Bn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Be.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&&Bn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Yn.prototype.copy=function(){var a=new Yn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Be=Yn.prototype,Be.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Be.Iv=function(){for(var a=new Xn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Be.sort=function(a){return this._isFrozen&&Bn(this),this.s.sort(a),this.xb(),this},Be.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&Bn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Kn(y,"0 <= from < length",Yn,"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},Be.reverse=function(){return this._isFrozen&&Bn(this),this.s.reverse(),this.xb(),this},Qe.Object.defineProperties(Yn.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 Vr;var a=this.Sa;return a!==null?(a.reset(),a):new kr(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Vr;var a=this.Hg;return a!==null?(a.reset(),a):new Kr(this)}}}),Yn.prototype.reverse=Yn.prototype.reverse,Yn.prototype.sortRange=Yn.prototype.zi,Yn.prototype.sort=Yn.prototype.sort,Yn.prototype.toSet=Yn.prototype.Iv,Yn.prototype.toArray=Yn.prototype.Fa,Yn.prototype.removeRange=Yn.prototype.removeRange,Yn.prototype.removeAt=Yn.prototype.mb,Yn.prototype.delete=Yn.prototype.delete,Yn.prototype.remove=Yn.prototype.remove,Yn.prototype.insertAt=Yn.prototype.Gb,Yn.prototype.pop=Yn.prototype.pop,Yn.prototype.last=Yn.prototype.jc,Yn.prototype.first=Yn.prototype.first,Yn.prototype.set=Yn.prototype.set,Yn.prototype.setElt=Yn.prototype.cd,Yn.prototype.get=Yn.prototype.get,Yn.prototype.elt=Yn.prototype.M,Yn.prototype.indexOf=Yn.prototype.indexOf,Yn.prototype.has=Yn.prototype.has,Yn.prototype.contains=Yn.prototype.contains,Yn.prototype.clear=Yn.prototype.clear,Yn.prototype.addAll=Yn.prototype.addAll,Yn.prototype.push=Yn.prototype.push,Yn.prototype.add=Yn.prototype.add,Yn.prototype.thaw=Yn.prototype.ka,Yn.prototype.freeze=Yn.prototype.freeze,Yn.className="List";function Ho(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ho.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ho.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)},Ho.prototype.Ad=function(){return this.next()},Ho.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},Ho.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},Ho.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},Ho.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},Ho.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Yn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ho.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Yn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Ho.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ho.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Qe.Object.defineProperties(Ho.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ho.prototype.first=Ho.prototype.first,Ho.prototype.hasNext=Ho.prototype.Ad,Ho.prototype.next=Ho.prototype.next,Ho.prototype.reset=Ho.prototype.reset,Ho.className="SetIterator";function Xn(a){Ao(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Ft("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Be=Xn.prototype,Be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.toString=function(){return"Set()#"+nr(this)},Be.add=function(a){if(a===null)return this;this._isFrozen&&Bn(this,a);var y=a;return En(a)&&(y=Qo(a)),this.Tb[y]===void 0&&(this.Sb++,a=new mo(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},Be.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Bn(this),un(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},Be.contains=function(a){if(a===null)return!1;var y=a;return En(a)&&(y=nr(a),y===void 0)?!1:this.Tb[y]!==void 0},Be.has=function(a){return this.contains(a)},Be.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Be.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Be.first=function(){var a=this.ea;return a===null?null:a.value},Xn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Xn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Xn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Xn.prototype.map=function(a){for(var y=new Xn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Xn.prototype.filter=function(a){for(var y=new Xn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Be=Xn.prototype,Be.remove=function(a){if(a===null)return!1;this._isFrozen&&Bn(this,a);var y=a;if(En(a)&&(y=nr(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},Be.delete=function(a){return this.remove(a)},Be.hp=function(a){if(a===null)return this;if(this._isFrozen&&Bn(this),un(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},Be.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Bn(this);var y=new Xn;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},Be.clear=function(){this._isFrozen&&Bn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Xn.prototype.copy=function(){var a=new Xn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Xn.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},Xn.prototype.Hv=function(){var a=new Yn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Ao(a){a.__gohashid=qo++}function Qo(a){var y=a.__gohashid;return y===void 0&&(y=qo++,a.__gohashid=y),y}function nr(a){return a.__gohashid}Qe.Object.defineProperties(Xn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Vr;var a=this.Sa;return a!==null?(a.reset(),a):new Ho(this)}}}),Xn.prototype.toList=Xn.prototype.Hv,Xn.prototype.toArray=Xn.prototype.Fa,Xn.prototype.clear=Xn.prototype.clear,Xn.prototype.retainAll=Xn.prototype.pA,Xn.prototype.removeAll=Xn.prototype.hp,Xn.prototype.delete=Xn.prototype.delete,Xn.prototype.remove=Xn.prototype.remove,Xn.prototype.first=Xn.prototype.first,Xn.prototype.containsAny=Xn.prototype.Ty,Xn.prototype.containsAll=Xn.prototype.Sy,Xn.prototype.has=Xn.prototype.has,Xn.prototype.contains=Xn.prototype.contains,Xn.prototype.addAll=Xn.prototype.addAll,Xn.prototype.add=Xn.prototype.add,Xn.prototype.thaw=Xn.prototype.ka,Xn.prototype.freeze=Xn.prototype.freeze;var qo=1;Xn.className="Set",Xn.uniqueHash=Ao,Xn.hashIdUnique=Qo,Xn.hashId=nr;function Go(a){this.ma=a,this.qa=a.Ja,this.sa=null}Go.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Go.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)},Go.prototype.Ad=function(){return this.next()},Go.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},Go.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},Go.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},Go.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},Go.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Yn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Go.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Yn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Go.prototype.de=function(){this.value=this.key=null,this.qa=-1},Go.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Qe.Object.defineProperties(Go.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Go.prototype.first=Go.prototype.first,Go.prototype.hasNext=Go.prototype.Ad,Go.prototype.next=Go.prototype.next,Go.prototype.reset=Go.prototype.reset,Go.className="MapKeySetIterator";function Br(a){Xn.call(this),Ao(this),this._isFrozen=!0,this.ma=a}Vt(Br,Xn),Be=Br.prototype,Be.freeze=function(){return this},Be.ka=function(){return this},Be.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Be.add=function(){Ft("This Set is read-only: "+this.toString())},Be.contains=function(a){return this.ma.contains(a)},Be.has=function(a){return this.contains(a)},Be.remove=function(){Ft("This Set is read-only: "+this.toString())},Be.delete=function(a){return this.remove(a)},Be.clear=function(){Ft("This Set is read-only: "+this.toString())},Be.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Br.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Br.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Br.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Br.prototype.map=function(a){for(var y=new Xn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Br.prototype.filter=function(a){for(var y=new Xn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Br.prototype.copy=function(){return new Br(this.ma)},Br.prototype.Iv=function(){var a=new Xn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Br.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},Br.prototype.Hv=function(){var a=new Yn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Qe.Object.defineProperties(Br.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Vr:new Go(this.ma)}}}),Br.prototype.toList=Br.prototype.Hv,Br.prototype.toArray=Br.prototype.Fa,Br.prototype.toSet=Br.prototype.Iv,Br.prototype.first=Br.prototype.first,Br.prototype.clear=Br.prototype.clear,Br.prototype.delete=Br.prototype.delete,Br.prototype.remove=Br.prototype.remove,Br.prototype.has=Br.prototype.has,Br.prototype.contains=Br.prototype.contains,Br.prototype.add=Br.prototype.add,Br.prototype.thaw=Br.prototype.ka,Br.prototype.freeze=Br.prototype.freeze,Br.className="MapKeySet";function Er(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Er.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Er.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.value=y.value,this.key=y.key,!0):(this.de(),!1)},Er.prototype.Ad=function(){return this.next()},Er.prototype.first=function(){var a=this.ma;if(this.qa=a.Ja,a=a.ea,a!==null){this.sa=a;var y=a.value;return this.key=a.key,this.value=y}return null},Er.prototype.any=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Er.prototype.all=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Er.prototype.each=function(a){var y=this.ma;for(this.sa=y.jf=null,y=y.ea;y!==null;)a(y.value),y=y.va;return this},Er.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Yn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Er.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Yn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Er.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Er.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Qe.Object.defineProperties(Er.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Er.prototype.first=Er.prototype.first,Er.prototype.hasNext=Er.prototype.Ad,Er.prototype.next=Er.prototype.next,Er.prototype.reset=Er.prototype.reset,Er.className="MapValueSetIterator";function mo(a,y){this.key=a,this.value=y,this.ll=this.va=null}mo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},mo.className="KeyValuePair";function Yo(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Yo.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},Yo.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},Yo.prototype.Ad=function(){return this.next()},Yo.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},Yo.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},Yo.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},Yo.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},Yo.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Yn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},Yo.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Yn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},Yo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},Yo.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Qe.Object.defineProperties(Yo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Yo.prototype.first=Yo.prototype.first,Yo.prototype.hasNext=Yo.prototype.Ad,Yo.prototype.next=Yo.prototype.next,Yo.prototype.reset=Yo.prototype.reset,Yo.className="MapIterator";function Ki(a){Ao(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"&&Ft("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Be=Ki.prototype,Be.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.toString=function(){return"Map()#"+nr(this)},Be.add=function(a,y){this._isFrozen&&Bn(this,a);var x=a;En(a)&&(x=Qo(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new mo(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},Be.set=function(a,y){return this.add(a,y)},Be.addAll=function(a){if(a===null)return this;if(un(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 Ki)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},Be.first=function(){return this.ea},Ki.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},Ki.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},Ki.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},Ki.prototype.map=function(a){for(var y=new Ki,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},Ki.prototype.filter=function(a){for(var y=new Ki,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Be=Ki.prototype,Be.contains=function(a){var y=a;return En(a)&&(y=nr(a),y===void 0)?!1:this.Tb[y]!==void 0},Be.has=function(a){return this.contains(a)},Be.I=function(a){var y=a;return En(a)&&(y=nr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Be.get=function(a){return this.I(a)},Be.remove=function(a){if(a===null)return!1;this._isFrozen&&Bn(this,a);var y=a;if(En(a)&&(y=nr(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},Be.delete=function(a){return this.remove(a)},Be.clear=function(){this._isFrozen&&Bn(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()},Ki.prototype.copy=function(){var a=new Ki,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},Ki.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 mo(b.key,b.value),x++}return y},Ki.prototype.Lf=function(){return new Br(this)},Qe.Object.defineProperties(Ki.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Vr;var a=this.Sa;return a!==null?(a.reset(),a):new Yo(this)}},iteratorKeys:{get:function(){return 0>=this.count?Vr:new Go(this)}},iteratorValues:{get:function(){if(0>=this.count)return Vr;var a=this.jf;return a!==null?(a.reset(),a):new Er(this)}}}),Ki.prototype.toKeySet=Ki.prototype.Lf,Ki.prototype.toArray=Ki.prototype.Fa,Ki.prototype.clear=Ki.prototype.clear,Ki.prototype.delete=Ki.prototype.delete,Ki.prototype.remove=Ki.prototype.remove,Ki.prototype.get=Ki.prototype.get,Ki.prototype.getValue=Ki.prototype.I,Ki.prototype.has=Ki.prototype.has,Ki.prototype.contains=Ki.prototype.contains,Ki.prototype.first=Ki.prototype.first,Ki.prototype.addAll=Ki.prototype.addAll,Ki.prototype.set=Ki.prototype.set,Ki.prototype.add=Ki.prototype.add,Ki.prototype.thaw=Ki.prototype.ka,Ki.prototype.freeze=Ki.prototype.freeze,Ki.className="Map";function ot(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Ft("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var sa,va,Ma,hs,Ga;ot.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},ot.prototype.h=function(a,y){return this.x=a,this.y=y,this},ot.prototype.sg=function(a,y){return this.x=a,this.y=y,this},ot.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},ot.prototype.copy=function(){var a=new ot;return a.x=this.x,a.y=this.y,a},Be=ot.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function Lo(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 ot(x,b)}return new ot}function po(a){return a.x.toString()+" "+a.y.toString()}Be.toString=function(){return"Point("+this.x+","+this.y+")"},Be.D=function(a){return a instanceof ot?this.x===a.x&&this.y===a.y:!1},Be.hi=function(a,y){return this.x===a&&this.y===y},Be.Xa=function(a){return tt.B(this.x,a.x)&&tt.B(this.y,a.y)},Be.add=function(a){return this.x+=a.x,this.y+=a.y,this},Be.re=function(a){return this.x-=a.x,this.y-=a.y,this},Be.offset=function(a,y){return this.x+=a,this.y+=y,this},ot.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},Be=ot.prototype,Be.scale=function(a,y){return this.x*=a,this.y*=y,this},Be.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Be.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Be.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},Be.ab=function(a){return la(a.x-this.x,a.y-this.y)},Be.direction=function(a,y){return la(a-this.x,y-this.y)};function la(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}Be.Ry=function(a,y){return tt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Be.fA=function(a,y,x,E){return tt.qh(a,y,x,E,this.x,this.y,this),this},Be.gA=function(a,y){return tt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Be.uA=function(a,y,x,E){return tt.No(this.x,this.y,a,y,x,E,this),this},Be.vA=function(a,y){return tt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Be.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},Be.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},Be.transform=function(a){return a.Ga(this),this};function Eo(a,y){return y.Cd(a),a}function Na(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 os(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function xo(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)}Be.w=function(){return isFinite(this.x)&&isFinite(this.y)},ot.alloc=function(){var a=Yr.pop();return a===void 0?new ot:a},ot.allocAt=function(a,y){var x=Yr.pop();return x===void 0?new ot(a,y):(x.x=a,x.y=y,x)},ot.free=function(a){Yr.push(a)},ot.prototype.isReal=ot.prototype.w,ot.prototype.setSpot=ot.prototype.yi,ot.prototype.setRectSpot=ot.prototype.xi,ot.prototype.snapToGridPoint=ot.prototype.vA,ot.prototype.snapToGrid=ot.prototype.uA,ot.prototype.projectOntoLineSegmentPoint=ot.prototype.gA,ot.prototype.projectOntoLineSegment=ot.prototype.fA,ot.intersectingLineSegments=function(a,y,x,E,b,z,ne,re){return tt.Rl(a,y,x,E,b,z,ne,re)},ot.prototype.compareWithLineSegmentPoint=ot.prototype.Ry,ot.compareWithLineSegment=function(a,y,x,E,b,z){return tt.Fl(a,y,x,E,b,z)},ot.prototype.direction=ot.prototype.direction,ot.prototype.directionPoint=ot.prototype.ab,ot.prototype.normalize=ot.prototype.normalize,ot.prototype.distanceSquared=ot.prototype.zd,ot.prototype.distanceSquaredPoint=ot.prototype.Bf,ot.prototype.scale=ot.prototype.scale,ot.prototype.rotate=ot.prototype.rotate,ot.prototype.offset=ot.prototype.offset,ot.prototype.subtract=ot.prototype.re,ot.prototype.add=ot.prototype.add,ot.prototype.equalsApprox=ot.prototype.Xa,ot.prototype.equalTo=ot.prototype.hi,ot.prototype.equals=ot.prototype.D,ot.prototype.set=ot.prototype.set,ot.prototype.setTo=ot.prototype.sg;var Yr=[];ot.className="Point",ot.parse=Lo,ot.stringify=po,ot.distanceLineSegmentSquared=Na,ot.distanceSquared=os,ot.direction=xo,ot.Origin=sa=new ot(0,0).ja(),ot.InfiniteTopLeft=va=new ot(-1/0,-1/0).ja(),ot.InfiniteBottomRight=Ma=new ot(1/0,1/0).ja(),ot.SixPoint=hs=new ot(6,6).ja(),ot.NoPoint=Ga=new ot(NaN,NaN).ja(),ot.parse=Lo,ot.stringify=po,ot.distanceLineSegmentSquared=Na,ot.distanceSquared=os,ot.direction=xo;function vi(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):Ft("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var no,io,Ja,Ca,fa,$a,Qa;vi.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},vi.prototype.h=function(a,y){return this.width=a,this.height=y,this},vi.prototype.sg=function(a,y){return this.width=a,this.height=y,this},vi.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},vi.prototype.copy=function(){var a=new vi;return a.width=this.width,a.height=this.height,a},Be=vi.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function Es(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 vi(x,b)}return new vi}function ys(a){return a.width.toString()+" "+a.height.toString()}Be.toString=function(){return"Size("+this.width+","+this.height+")"},Be.D=function(a){return a instanceof vi?this.width===a.width&&this.height===a.height:!1},Be.hi=function(a,y){return this.width===a&&this.height===y},Be.Xa=function(a){return tt.B(this.width,a.width)&&tt.B(this.height,a.height)},Be.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},Be.w=function(){return isFinite(this.width)&&isFinite(this.height)},vi.alloc=function(){var a=Zs.pop();return a===void 0?new vi:a},vi.free=function(a){Zs.push(a)},vi.prototype.isReal=vi.prototype.w,vi.prototype.inflate=vi.prototype.Bc,vi.prototype.equalsApprox=vi.prototype.Xa,vi.prototype.equalTo=vi.prototype.hi,vi.prototype.equals=vi.prototype.D,vi.prototype.set=vi.prototype.set,vi.prototype.setTo=vi.prototype.sg;var Zs=[];vi.className="Size",vi.parse=Es,vi.stringify=ys,vi.ZeroSize=no=new vi(0,0).ja(),vi.OneSize=io=new vi(1,1).ja(),vi.SixSize=Ja=new vi(6,6).ja(),vi.EightSize=Ca=new vi(8,8).ja(),vi.TenSize=fa=new vi(10,10).ja(),vi.InfiniteSize=$a=new vi(1/0,1/0).ja(),vi.NoSize=Qa=new vi(NaN,NaN).ja(),vi.parse=Es,vi.stringify=ys;function Dn(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 ot?(x=a.x,a=a.y,y instanceof ot?(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 vi?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Ft("Incorrect second argument supplied to Rect constructor "+y)):Ft("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Be=Dn.prototype,Be.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Be.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Ss(a,y,x){a.width=y,a.height=x}Be.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Be.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Be.dd=function(a){return this.x=a.x,this.y=a.y,this},Be.tA=function(a){return this.width=a.width,this.height=a.height,this},Dn.prototype.copy=function(){var a=new Dn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Be=Dn.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function ra(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 Dn(x,b,z,ne)}return new Dn}function hl(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Be.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Be.D=function(a){return a instanceof Dn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Be.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Be.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 Ol(a,y){return tt.$(a.x,y.x)&&tt.$(a.y,y.y)&&tt.$(a.width,y.width)&&tt.$(a.height,y.height)}Be.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Be.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},Be.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},Be.offset=function(a,y){return this.x+=a,this.y+=y,this},Be.Bc=function(a,y){return ns(this,y,a,y,a)},Be.Co=function(a){return ns(this,a.top,a.right,a.bottom,a.left)},Be.Fv=function(a){return ns(this,-a.top,-a.right,-a.bottom,-a.left)},Be.Hz=function(a,y,x,E){return ns(this,a,y,x,E)};function ns(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}Be.Ex=function(a){return yu(this,a.x,a.y,a.width,a.height)},Be.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}Be.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Be.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 eu(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))}Be.Ye=function(a){return ps(this,a.x,a.y,0,0)},Be.ed=function(a){return ps(this,a.x,a.y,a.width,a.height)},Be.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),ps(this,a,y,x,E)};function ps(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}Be.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 Ba(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 tu(a,y,x,E,b,z,ne,re){return a>ne+b||b>x+a?!1:!(y>re+z||z>E+y)}Be.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Be.Mz=function(){return this.width===0&&this.height===0},Dn.alloc=function(){var a=ca.pop();return a===void 0?new Dn:a},Dn.allocAt=function(a,y,x,E){var b=ca.pop();return b===void 0?new Dn(a,y,x,E):b.h(a,y,x,E)},Dn.free=function(a){ca.push(a)},Qe.Object.defineProperties(Dn.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 ot(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new vi(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new ot(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}}}),Dn.prototype.isEmpty=Dn.prototype.Mz,Dn.prototype.isReal=Dn.prototype.w,Dn.intersectsLineSegment=function(a,y,x,E,b,z,ne,re){return tt.Fx(a,y,x,E,b,z,ne,re)},Dn.prototype.setSpot=Dn.prototype.yi,Dn.prototype.union=Dn.prototype.Kv,Dn.prototype.unionRect=Dn.prototype.ed,Dn.prototype.unionPoint=Dn.prototype.Ye,Dn.prototype.intersects=Dn.prototype.Vu,Dn.prototype.intersectsRect=Dn.prototype.Yc,Dn.prototype.intersect=Dn.prototype.Uu,Dn.prototype.intersectRect=Dn.prototype.Ex,Dn.prototype.grow=Dn.prototype.Hz,Dn.prototype.subtractMargin=Dn.prototype.Fv,Dn.prototype.addMargin=Dn.prototype.Co,Dn.prototype.inflate=Dn.prototype.Bc,Dn.prototype.offset=Dn.prototype.offset,Dn.prototype.contains=Dn.prototype.contains,Dn.prototype.containsRect=Dn.prototype.Re,Dn.prototype.containsPoint=Dn.prototype.ca,Dn.prototype.equalsApprox=Dn.prototype.Xa,Dn.prototype.equalTo=Dn.prototype.hi,Dn.prototype.equals=Dn.prototype.D,Dn.prototype.setSize=Dn.prototype.tA,Dn.prototype.setPoint=Dn.prototype.dd,Dn.prototype.set=Dn.prototype.set,Dn.prototype.setTo=Dn.prototype.sg;var Do=null,Ea=null,ca=[];Dn.className="Rect",Dn.parse=ra,Dn.stringify=hl,Dn.contains=Ba,Dn.intersects=tu,Dn.ZeroRect=Do=new Dn(0,0,0,0).ja(),Dn.NoRect=Ea=new Dn(NaN,NaN,NaN,NaN).ja(),Dn.parse=ra,Dn.stringify=hl,Dn.contains=Ba,Dn.intersects=tu;function dr(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):Ft("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}dr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},dr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},dr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},dr.prototype.copy=function(){var a=new dr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Be=dr.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function Rs(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 dr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new dr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new dr(x,b);for(var ne=NaN;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),isNaN(ne)?new dr(x,b):new dr(x,b,z,ne)}return new dr}function ls(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Be.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Be.D=function(a){return a instanceof dr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Be.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Be.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)},Be.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},dr.alloc=function(){var a=ou.pop();return a===void 0?new dr:a},dr.free=function(a){ou.push(a)},dr.prototype.isReal=dr.prototype.w,dr.prototype.equalsApprox=dr.prototype.Xa,dr.prototype.equalTo=dr.prototype.hi,dr.prototype.equals=dr.prototype.D,dr.prototype.set=dr.prototype.set,dr.prototype.setTo=dr.prototype.sg;var sl=null,jl=null,ou=[];dr.className="Margin",dr.parse=Rs,dr.stringify=ls,dr.ZeroMargin=sl=new dr(0,0,0,0).ja(),dr.TwoMargin=jl=new dr(2,2,2,2).ja(),dr.parse=Rs,dr.stringify=ls;function Ji(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 Cs,Us,$l,kl,Vl,Oo,ic,zl,Ln,On,ai,Qi,Vi,Ri,_i,oi,Li,ur,zr,ga,$o,Ua,Va,No,Xr,Bi,Jr,Vo,ma,ya,bo,oa,Io,Ar,Da,Ha;Ji.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ji.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Ji.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ji.prototype.copy=function(){var a=new Ji;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Be=Ji.prototype,Be.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Be.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this};function La(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function fl(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Cs;if(a==="TopLeft")return Us;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return $l;if(a==="TopRight")return kl;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Vl;if(a==="Center")return Oo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return ic;if(a==="BottomLeft")return zl;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return Ln;if(a==="BottomRight")return On;if(a==="TopSide")return ai;if(a==="LeftSide")return Qi;if(a==="RightSide")return Vi;if(a==="BottomSide")return Ri;if(a==="TopBottomSides")return _i;if(a==="LeftRightSides")return oi;if(a==="TopLeftSides")return Li;if(a==="TopRightSides")return ur;if(a==="BottomLeftSides")return zr;if(a==="BottomRightSides")return ga;if(a==="NotTopSide")return $o;if(a==="NotLeftSide")return Ua;if(a==="NotRightSide")return Va;if(a==="NotBottomSide")return No;if(a==="AllSides")return Xr;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 Ji(x,b,z,ne)}return new Ji}function xu(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Be.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(Cs)?"None":this.D(Us)?"TopLeft":this.D($l)?"Top":this.D(kl)?"TopRight":this.D(Vl)?"Left":this.D(Oo)?"Center":this.D(ic)?"Right":this.D(zl)?"BottomLeft":this.D(Ln)?"Bottom":this.D(On)?"BottomRight":this.D(ai)?"TopSide":this.D(Qi)?"LeftSide":this.D(Vi)?"RightSide":this.D(Ri)?"BottomSide":this.D(_i)?"TopBottomSides":this.D(oi)?"LeftRightSides":this.D(Li)?"TopLeftSides":this.D(ur)?"TopRightSides":this.D(zr)?"BottomLeftSides":this.D(ga)?"BottomRightSides":this.D($o)?"NotTopSide":this.D(Ua)?"NotLeftSide":this.D(Va)?"NotRightSide":this.D(No)?"NotBottomSide":this.D(Xr)?"AllSides":this.D(Bi)?"Default":"None"},Be.D=function(a){return a instanceof Ji?(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},Be.gv=function(){return new Ji(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Be.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Jr))a=Qi;else if(a.D(Vo))a=Vi;else if(a.D(ma))a=ai;else if(a.D(ya))a=Ri;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Be.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Be.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Be.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Be.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Be.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Ji.alloc=function(){var a=tn.pop();return a===void 0?new Ji:a},Ji.free=function(a){tn.push(a)},Ji.prototype.isDefault=Ji.prototype.Xb,Ji.prototype.isNone=Ji.prototype.ys,Ji.prototype.isSide=Ji.prototype.$c,Ji.prototype.isNoSpot=Ji.prototype.Mc,Ji.prototype.isSpot=Ji.prototype.sb,Ji.prototype.includesSide=Ji.prototype.Hf,Ji.prototype.opposite=Ji.prototype.gv,Ji.prototype.equals=Ji.prototype.D,Ji.prototype.set=Ji.prototype.set,Ji.prototype.setTo=Ji.prototype.sg;var tn=[];Ji.className="Spot",Ji.parse=fl,Ji.stringify=xu,Ji.None=Cs=La(new Ji(0,0,0,0),0).ja(),Ji.Default=Bi=La(new Ji(0,0,-1,0),-1).ja(),Ji.TopLeft=Us=new Ji(0,0,0,0).ja(),Ji.TopCenter=$l=new Ji(.5,0,0,0).ja(),Ji.TopRight=kl=new Ji(1,0,0,0).ja(),Ji.LeftCenter=Vl=new Ji(0,.5,0,0).ja(),Ji.Center=Oo=new Ji(.5,.5,0,0).ja(),Ji.RightCenter=ic=new Ji(1,.5,0,0).ja(),Ji.BottomLeft=zl=new Ji(0,1,0,0).ja(),Ji.BottomCenter=Ln=new Ji(.5,1,0,0).ja(),Ji.BottomRight=On=new Ji(1,1,0,0).ja(),Ji.MiddleTop=bo=$l,Ji.MiddleLeft=oa=Vl,Ji.MiddleRight=Io=ic,Ji.MiddleBottom=Ar=Ln,Ji.Top=ma=$l,Ji.Left=Jr=Vl,Ji.Right=Vo=ic,Ji.Bottom=ya=Ln,Ji.TopSide=ai=La(new Ji(0,0,1,1),1).ja(),Ji.LeftSide=Qi=La(new Ji(0,0,1,2),1).ja(),Ji.RightSide=Vi=La(new Ji(0,0,1,4),1).ja(),Ji.BottomSide=Ri=La(new Ji(0,0,1,8),1).ja(),Ji.TopBottomSides=_i=La(new Ji(0,0,1,9),1).ja(),Ji.LeftRightSides=oi=La(new Ji(0,0,1,6),1).ja(),Ji.TopLeftSides=Li=La(new Ji(0,0,1,3),1).ja(),Ji.TopRightSides=ur=La(new Ji(0,0,1,5),1).ja(),Ji.BottomLeftSides=zr=La(new Ji(0,0,1,10),1).ja(),Ji.BottomRightSides=ga=La(new Ji(0,0,1,12),1).ja(),Ji.NotTopSide=$o=La(new Ji(0,0,1,14),1).ja(),Ji.NotLeftSide=Ua=La(new Ji(0,0,1,13),1).ja(),Ji.NotRightSide=Va=La(new Ji(0,0,1,11),1).ja(),Ji.NotBottomSide=No=La(new Ji(0,0,1,7),1).ja(),Ji.AllSides=Xr=La(new Ji(0,0,1,15),1).ja(),Da=new Ji(.156,.156).ja(),Ha=new Ji(.844,.844).ja(),Ji.parse=fl,Ji.stringify=xu;function Jt(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Jt.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},Jt.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},Jt.prototype.copy=function(){var a=new Jt;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},Jt.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Jt.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},Jt.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Jt.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Jt.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},Jt.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},Jt.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},Jt.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},Be=Jt.prototype,Be.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Be.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Be.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)},Be.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))},Be.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))},Be.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,de=this.dy,pe=y*z+x*re+ue,we=y*ne+x*oe+de,be=E*z+x*re+ue,Ae=E*ne+x*oe+de;return x=y*z+b*re+ue,y=y*ne+b*oe+de,z=E*z+b*re+ue,E=E*ne+b*oe+de,b=Math.min(pe,be),pe=Math.max(pe,be),be=Math.min(we,Ae),we=Math.max(we,Ae),b=Math.min(b,x),pe=Math.max(pe,x),be=Math.min(be,y),we=Math.max(we,y),b=Math.min(b,z),pe=Math.max(pe,z),be=Math.min(be,E),we=Math.max(we,E),a.h(b,be,pe-b,we-be),a},Jt.alloc=function(){var a=Tn.pop();return a===void 0?new Jt:a},Jt.free=function(a){Tn.push(a)},Jt.prototype.transformRect=Jt.prototype.pp,Jt.prototype.transformPoint=Jt.prototype.Ga,Jt.prototype.scale=Jt.prototype.scale,Jt.prototype.translate=Jt.prototype.translate,Jt.prototype.rotate=Jt.prototype.rotate,Jt.prototype.invert=Jt.prototype.Vj,Jt.prototype.multiplyInverted=Jt.prototype.bv,Jt.prototype.multiply=Jt.prototype.multiply,Jt.prototype.reset=Jt.prototype.reset,Jt.prototype.isIdentity=Jt.prototype.ws,Jt.prototype.equals=Jt.prototype.D,Jt.prototype.setTransform=Jt.prototype.setTransform,Jt.prototype.set=Jt.prototype.set;var Tn=[];Jt.className="Transform",Jt.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,de=E;else ue=E,de=y;if(a===x)return ue<=ne&&ne<=de&&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&&(de+=b,ue-=b,ue<=ne&&ne<=de))if(oe-re>de-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,de,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,de);var we=(a+x)/2,be=(y+E)/2,Ae=(x+b)/2,_e=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(we+Ae)/2,x=(be+_e)/2,Ae=(Ae+b)/2,_e=(_e+z)/2;var pt=(E+Ae)/2,nt=(x+_e)/2;return tt.cs(a,y,we,be,E,x,pt,nt,oe,ue,de,pe)||tt.cs(pt,nt,Ae,_e,b,z,ne,re,oe,ue,de,pe)},ax:function(a,y,x,E,b,z,ne,re,oe){var ue=(x+b)/2,de=(E+z)/2;return oe.h((((a+x)/2+ue)/2+(ue+(b+ne)/2)/2)/2,(((y+E)/2+de)/2+(de+(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 xo(((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))ps(ue,a,y,0,0),ps(ue,ne,re,0,0);else{var de=(a+x)/2,pe=(y+E)/2,we=(x+b)/2,be=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(de+we)/2,x=(pe+be)/2,we=(we+b)/2,be=(be+z)/2;var Ae=(E+we)/2,_e=(x+be)/2;tt.Dl(a,y,de,pe,E,x,Ae,_e,oe,ue),tt.Dl(Ae,_e,we,be,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 de=(a+x)/2,pe=(y+E)/2,we=(x+b)/2,be=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(de+we)/2,x=(pe+be)/2,we=(we+b)/2,be=(be+z)/2;var Ae=(E+we)/2,_e=(x+be)/2;tt.Qe(a,y,de,pe,E,x,Ae,_e,oe,ue),tt.Qe(Ae,_e,we,be,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 de=(a+x)/2,pe=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var we=(de+x)/2,be=(pe+E)/2;return tt.jv(a,y,de,pe,we,be,ne,re,oe,ue)||tt.jv(we,be,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))ps(re,a,y,0,0),ps(re,b,z,0,0);else{var oe=(a+x)/2,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var de=(oe+x)/2,pe=(ue+E)/2;tt.iv(a,y,oe,ue,de,pe,ne,re),tt.iv(de,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 de=(oe+x)/2,pe=(ue+E)/2;tt.ep(a,y,oe,ue,de,pe,ne,re),tt.ep(de,pe,x,E,b,z,ne,re)}return re},Eo:function(a,y,x,E,b,z,ne,re,oe,ue,de,pe,we,be){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,de,pe)||(we=(a-ne)*(ue-pe)-(y-re)*(oe-de),we===0)?!1:(be.h(((a*re-y*ne)*(oe-de)-(a-ne)*(oe*pe-ue*de))/we,((a*re-y*ne)*(ue-pe)-(y-re)*(oe*pe-ue*de))/we),!0);var Ae=(a+x)/2,_e=(y+E)/2,pt=(x+b)/2,nt=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Ae+pt)/2,x=(_e+nt)/2,pt=(pt+b)/2,nt=(nt+z)/2;var Bt=(E+pt)/2,At=(x+nt)/2,kt=1/0,Ut=!1,fn=0,bi=0;return tt.Eo(a,y,Ae,_e,E,x,Bt,At,oe,ue,de,pe,we,be)&&(a=(be.x-oe)*(be.x-oe)+(be.y-ue)*(be.y-ue),a<kt&&(kt=a,Ut=!0,fn=be.x,bi=be.y)),tt.Eo(Bt,At,pt,nt,b,z,ne,re,oe,ue,de,pe,we,be)&&(be.x-oe)*(be.x-oe)+(be.y-ue)*(be.y-ue)<kt&&(Ut=!0,fn=be.x,bi=be.y),Ut&&(be.x=fn,be.y=bi),Ut},Fo:function(a,y,x,E,b,z,ne,re,oe,ue,de,pe,we){var be=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-de),we===0)return be;var Ae=((a*re-y*ne)*(oe-de)-(a-ne)*(oe*pe-ue*de))/we,_e=((a*re-y*ne)*(ue-pe)-(y-re)*(oe*pe-ue*de))/we;if(Ae>=de)return be;if((oe>de?oe-de:de-oe)<(ue>pe?ue-pe:pe-ue)){if(y<re?(oe=y,a=re):(oe=re,a=y),_e<oe||_e>a)return be}else if(a<ne?(oe=a,a=ne):oe=ne,Ae<oe||Ae>a)return be;0<we?be++:0>we&&be--}else{Ae=(a+x)/2,_e=(y+E)/2;var pt=(x+b)/2,nt=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(Ae+pt)/2,x=(_e+nt)/2,pt=(pt+b)/2,nt=(nt+z)/2;var Bt=(E+pt)/2,At=(x+nt)/2;be+=tt.Fo(a,y,Ae,_e,E,x,Bt,At,oe,ue,de,pe,we),be+=tt.Fo(Bt,At,pt,nt,b,z,ne,re,oe,ue,de,pe,we)}return be},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 de(pt,nt){var Bt=(pt-a)*(pt-a)+(nt-y)*(nt-y);Bt<pe&&(pe=Bt,oe.h(pt,nt))}var pe=1/0;de(oe.x,oe.y);var we=0,be=0,Ae=0,_e=0;if(b<ne?(we=b,be=ne):(we=ne,be=b),z<re?(Ae=b,_e=ne):(Ae=ne,_e=b),we=(be-we)/2+ue,ue=(_e-Ae)/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,de(x,ue*we+z),de(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),de(ue,x*ue-x*a+y),we=(-re-we)/(2*E),de(we,x*we-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ne,re,oe){var ue=1e21,de=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,de=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,de=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,de=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,de=oe.x,pe=oe.y)),oe.h(de,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):!!(Ba(a,y,x,E,b,z)||Ba(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,de=ue+ne*ne+oe*re;return ue=4/3*(Math.sqrt(2*ue*de)-de)/(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 de=a/(y+b),pe=ne/(y+z);if(de=de*de+pe*pe-1,0<de)re=y;else if(0>de)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 xr,um:new xr,Mf:new xr,Nf:0,vm:100};tt.za=tt.AA;function rn(a){Ao(this),this.l=2,a===void 0&&(a=rn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===rn.o?this.ee=new Yn:(rn.V===null&&(rn.V=new Yn().freeze()),this.ee=rn.V),this.aq=this.ee.Ja,this.Ip=new Dn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Us,this.gg=On,this.Rk=this.Sk=NaN,this.Uf=si}rn.prototype.copy=function(){var a=new rn;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===rn.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},rn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},rn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==rn.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},rn.prototype.ka=function(){if(Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==rn.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},rn.prototype.Xa=function(a){if(!(a instanceof rn))return!1;if(this.type!==a.type)return this.type===rn.j&&a.type===rn.o?sr(this,a):a.type===rn.j&&this.type===rn.o?sr(a,this):!1;if(this.type===rn.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!==rn.j||y.type!==rn.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===ki&&tt.B(a.endX,y.endX)&&tt.B(a.endY,y.endY))))}rn.ia=function(a){return a.toString()},rn.prototype.qb=function(a){a.classType===rn&&(this.type=a)},rn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case rn.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 rn.u:var y=new Dn(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 rn.F:if(y=new Dn(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 rn.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()}},rn.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},rn.parse=function(a,y){function x(){return _e>=kt-1?!0:ue[_e+1].match(Ut)!==null}function E(){return _e++,ue[_e]}function b(lo){var $r=parseFloat(E()),Fa=parseFloat(E());pt===pt.toLowerCase()&&($r=At.x+$r,Fa=At.y+Fa),lo.h($r,Fa)}function z(){return b(At),At}function ne(){return b(Bt),Bt}function re(){var lo=nt.toLowerCase();return lo!=="c"&&lo!=="s"&&lo!=="q"&&lo!=="t"?At:new ot(2*At.x-Bt.x,2*At.y-Bt.y)}y===void 0&&(y=!1);var oe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(oe,"$1 $2"),a=a.replace(oe,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var ue=a.split(" ");for(a=0;a<ue.length;a++){var de=ue[a];if(de.match(/(\.[0-9]*)(\.)/gm)!==null){oe=mi();for(var pe="",we=!1,be=0;be<de.length;be++){var Ae=de[be];Ae!=="."||we?Ae==="."?(oe.push(pe),pe="."):pe+=Ae:(we=!0,pe+=Ae)}for(oe.push(pe),ue.splice(a,1),de=0;de<oe.length;de++)ue.splice(a+de,0,oe[de]);a+=oe.length-1,Di(oe)}}var _e=-1,pt="",nt="";oe=new ot(0,0);var Bt=new ot(0,0),At=new ot(0,0),kt=ue.length;a=A1(null),we=pe=de=!1,be=!0,Ae=null;for(var Ut=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(_e>=kt-1);)if(nt=pt,pt=E(),pt!=="")switch(pt.toUpperCase()){case"X":be=!0,pe=de=!1;break;case"M":for(Ae=z(),a.mc===null||be===!0?(pp(a,Ae.x,Ae.y,de,!pe,we),be=!1):a.moveTo(Ae.x,Ae.y),oe.assign(At);!x();)Ae=z(),a.lineTo(Ae.x,Ae.y);break;case"L":for(;!x();)Ae=z(),a.lineTo(Ae.x,Ae.y);break;case"H":for(;!x();)At=new ot((pt===pt.toLowerCase()?At.x:0)+parseFloat(E()),At.y),a.lineTo(At.x,At.y);break;case"V":for(;!x();)At=new ot(At.x,(pt===pt.toLowerCase()?At.y:0)+parseFloat(E())),a.lineTo(At.x,At.y);break;case"C":for(;!x();){Ae=new ot,b(Ae);var fn=ne(),bi=z();Vh(a,Ae.x,Ae.y,fn.x,fn.y,bi.x,bi.y)}break;case"S":for(;!x();)Ae=re(),fn=ne(),bi=z(),Vh(a,Ae.x,Ae.y,fn.x,fn.y,bi.x,bi.y);break;case"Q":for(;!x();)Ae=ne(),fn=z(),u0(a,Ae.x,Ae.y,fn.x,fn.y);break;case"T":for(;!x();)Bt=Ae=re(),fn=z(),u0(a,Ae.x,Ae.y,fn.x,fn.y);break;case"B":for(;!x();){Ae=parseFloat(E()),fn=parseFloat(E()),bi=parseFloat(E());var Xi=parseFloat(E()),Wi=parseFloat(E()),fi=Wi,ti=!1;x()||(fi=parseFloat(E()),x()||(ti=parseFloat(E())!==0)),pt===pt.toLowerCase()&&(bi+=At.x,Xi+=At.y),a.arcTo(Ae,fn,bi,Xi,Wi,fi,ti)}break;case"A":for(;!x();)Ae=Math.abs(parseFloat(E())),fn=Math.abs(parseFloat(E())),bi=parseFloat(E()),Wi=Xi=!1,ti=fi=0,fi=E(),fi.length===1?(Xi=!!parseFloat(fi),Wi=!!parseFloat(E()),fi=parseFloat(E())):fi.length===2?(Xi=!!parseFloat(fi[0]),Wi=!!parseFloat(fi[1]),fi=parseFloat(E())):(Xi=!!parseFloat(fi[0]),Wi=!!parseFloat(fi[1]),fi=parseFloat(fi.slice(2))),ti=parseFloat(E()),pt===pt.toLowerCase()&&(fi=At.x+fi,ti=At.y+ti),At.h(fi,ti),wS(a,Ae,fn,bi,Xi,Wi,fi,ti);break;case"Z":PS(a),At.assign(oe);break;case"F":for(Ae="",fn=1;ue[_e+fn];)if(ue[_e+fn]==="0")we=!0,fn++;else if(ue[_e+fn].match(/[Uu]/)!==null)fn++;else if(ue[_e+fn].match(Ut)===null)fn++;else{Ae=ue[_e+fn];break}Ae.match(/[Mm]/)?de=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Ae="",fn=1;ue[_e+fn];)if(ue[_e+fn].match(/[Ff]/)!==null)fn++;else if(ue[_e+fn].match(Ut)===null)fn++;else{Ae=ue[_e+fn];break}Ae.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},rn.Ha=function(a,y){for(var x=a.length,E=ot.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}ot.free(E)},rn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===rn.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},rn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===rn.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),Dr(this,a,!1),ps(a,0,0,0,0),a.freeze()},rn.prototype.ix=function(){var a=new Dn;return Dr(this,a,!0),a};function Dr(a,y,x){switch(a.type){case rn.j:case rn.u:case rn.F:x?y.h(a.od,a.pd,0,0):ps(y,a.od,a.pd,0,0),ps(y,a.Dc,a.Ec,0,0);break;case rn.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):ps(y,z.startX,z.startY,0,0);for(var ne=z.segments.s,re=ne.length,oe=z.startX,ue=z.startY,de=0;de<re;de++){var pe=ne[de];switch(pe.type){case ki:case ji:oe=pe.endX,ue=pe.endY,ps(y,oe,ue,0,0);break;case Zr: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 br:case Cr:var we=pe.type===br?mr(pe,z):yr(pe,z,oe,ue),be=we.length;if(be===0){oe=pe.type===br?pe.centerX:pe.endX,ue=pe.type===br?pe.centerY:pe.endY,ps(y,oe,ue,0,0);break}pe=null;for(var Ae=0;Ae<be;Ae++)pe=we[Ae],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:Ft("Unknown Segment type: "+pe.type)}}}break;default:Ft("Unknown Geometry type: "+a.type)}}rn.prototype.normalize=function(){this._isFrozen&&Bn(this);var a=this.ix();return this.offset(-a.x,-a.y),new ot(-a.x,-a.y)},rn.prototype.offset=function(a,y){return this._isFrozen&&Bn(this),this.transform(1,0,0,1,a,y),this},rn.prototype.scale=function(a,y){return this._isFrozen&&Bn(this),this.transform(a,0,0,y,0,0),this},rn.prototype.rotate=function(a,y,x){this._isFrozen&&Bn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Jt.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Jt.free(E),this},Be=rn.prototype,Be.transform=function(a,y,x,E,b,z){switch(this.type){case rn.j:case rn.u:case rn.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 rn.o:for(var oe=this.figures.s,ue=oe.length,de=0;de<ue;de++){var pe=oe[de];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,be=0;be<we;be++){var Ae=pe[be];switch(Ae.type){case ki:case ji:ne=Ae.endX,re=Ae.endY,Ae.endX=ne*a+re*x+b,Ae.endY=ne*y+re*E+z;break;case Zr:ne=Ae.point1X,re=Ae.point1Y,Ae.point1X=ne*a+re*x+b,Ae.point1Y=ne*y+re*E+z,ne=Ae.point2X,re=Ae.point2Y,Ae.point2X=ne*a+re*x+b,Ae.point2Y=ne*y+re*E+z,ne=Ae.endX,re=Ae.endY,Ae.endX=ne*a+re*x+b,Ae.endY=ne*y+re*E+z;break;case zo:ne=Ae.point1X,re=Ae.point1Y,Ae.point1X=ne*a+re*x+b,Ae.point1Y=ne*y+re*E+z,ne=Ae.endX,re=Ae.endY,Ae.endX=ne*a+re*x+b,Ae.endY=ne*y+re*E+z;break;case br:ne=Ae.centerX,re=Ae.centerY,Ae.centerX=ne*a+re*x+b,Ae.centerY=ne*y+re*E+z,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Ae.startAngle+=ne),0>a&&(Ae.startAngle=180-Ae.startAngle,Ae.sweepAngle=-Ae.sweepAngle),0>E&&(Ae.startAngle=-Ae.startAngle,Ae.sweepAngle=-Ae.sweepAngle),Ae.radiusX*=Math.sqrt(a*a+x*x),Ae.radiusY!==void 0&&(Ae.radiusY*=Math.sqrt(y*y+E*E));break;case Cr:if(ne=Ae.endX,re=Ae.endY,Ae.endX=ne*a+re*x+b,Ae.endY=ne*y+re*E+z,Ae.radiusX===0||Ae.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),Ae.xAxisRotation+=ne),0>a&&(Ae.xAxisRotation=180-Ae.xAxisRotation,Ae.isClockwiseArc=!Ae.isClockwiseArc),0>E&&(Ae.xAxisRotation=-Ae.xAxisRotation,Ae.isClockwiseArc=!Ae.isClockwiseArc),Ae.radiusX*=Math.sqrt(a*a+x*x),Ae.radiusY*=Math.sqrt(y*y+E*E);break;default:Ft("Unknown Segment type: "+Ae.type)}}}}return this._isInvalidBounds=!0,this},Be.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 rn.j:return tt.Yb(x,E,b,z,y,a.x,a.y);case rn.u:var ne=Dn.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),Dn.free(ne),a;case rn.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 rn.o:return vr(this,a,y,!0,!1);default:return!1}};function vr(a,y,x,E,b){var z=y.x;y=y.y;for(var ne=a.bounds.x-20,re=0,oe,ue,de,pe,we=a.figures.s,be=we.length,Ae=0;Ae<be;Ae++){var _e=we[Ae],pt=!_e.isEvenOdd;if(_e.isFilled){if(E&&_e.ca(z,y,x))return!0;var nt=_e.segments;oe=_e.startX,ue=_e.startY;for(var Bt=oe,At=ue,kt=nt.s,Ut=0;Ut<=nt.length;Ut++){var fn=void 0;if(Ut!==nt.length){fn=kt[Ut];var bi=fn.type;a=fn.endX,pe=fn.endY}else bi=ki,a=Bt,pe=At;switch(bi){case ji:if(Bt=lr(z,y,ne,y,oe,ue,Bt,At),isNaN(Bt))return!0;re+=Bt,Bt=a,At=pe;break;case ki:if(oe=lr(z,y,ne,y,oe,ue,a,pe),isNaN(oe))return!0;re+=oe;break;case Zr:de=tt.Fo(oe,ue,fn.point1X,fn.point1Y,fn.point2X,fn.point2Y,a,pe,ne,y,z,y,.5),re+=de;break;case zo:de=tt.Fo(oe,ue,(oe+2*fn.point1X)/3,(ue+2*fn.point1Y)/3,(2*fn.point1X+a)/3,(2*fn.point1Y+pe)/3,a,pe,ne,y,z,y,.5),re+=de;break;case br:case Cr:bi=fn.type===br?mr(fn,_e):yr(fn,_e,oe,ue);var Xi=bi.length;if(Xi===0){if(oe=lr(z,y,ne,y,oe,ue,fn.type===br?fn.centerX:fn.endX,fn.type===br?fn.centerY:fn.endY),isNaN(oe))return!0;re+=oe;break}fn=null;for(var Wi=0;Wi<Xi;Wi++){if(fn=bi[Wi],Wi===0){if(de=lr(z,y,ne,y,oe,ue,fn[0],fn[1]),isNaN(de))return!0;re+=de}de=tt.Fo(fn[0],fn[1],fn[2],fn[3],fn[4],fn[5],fn[6],fn[7],ne,y,z,y,.5),re+=de}fn!==null&&(a=fn[6],pe=fn[7]);break;default:Ft("Unknown Segment type: "+fn.type)}oe=a,ue=pe}if(pt){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(_e.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}Be.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new ot),this.type===rn.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 de=oe[a];if(ne+de>=z)return E=z-ne,E=de===0?0:E/de,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+=de}}return y},Be.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===rn.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},Be.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===rn.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 de=oe[a];if(ne+de>=z)return E=z-ne,E=de===0?0:E/de,de=x[re],x=de[2*a],re=de[2*a+1],b=de[2*a+2],a=de[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+=de}}return y},Be.xx=function(a){if(this.type===rn.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=ot.alloc();return tt.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,ot.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ne)}}else if(this.type===rn.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=ot.alloc(),b=1/0,re=ne=0,oe=y.length;for(var de=ue=0,pe=0;pe<oe;pe++)for(var we=y[pe],be=x[pe],Ae=we.length,_e=0;_e<Ae;_e+=2){var pt=we[_e],nt=we[_e+1];if(_e!==0){tt.qh(ue,de,pt,nt,a.x,a.y,E);var Bt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);Bt<b&&(b=Bt,ne=re,ne+=Math.sqrt((E.x-ue)*(E.x-ue)+(E.y-de)*(E.y-de))),re+=be[(_e-2)/2]}ue=pt,de=nt}return ot.free(E),a=ne/z,0>a?0:1<a?1:a}return 0};function Pr(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===rn.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===rn.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===rn.F){var z=new So;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ne=new hr(br);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=mr(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(Qr(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,de=ue.length,pe=0;pe<de;pe++){var we=ue[pe];switch(we.type){case ji:4<=E.length&&(y.push(E),x.push(Qr(E))),E=[],E.push(we.endX),E.push(we.endY),ne=we.endX,z=we.endY,re=ne,oe=z;break;case ki:E.push(we.endX),E.push(we.endY),ne=we.endX,z=we.endY;break;case Zr: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 br:var be=mr(we,b),Ae=be.length;if(Ae===0){E.push(we.centerX),E.push(we.centerY),ne=we.centerX,z=we.centerY;break}for(var _e=0;_e<Ae;_e++){var pt=be[_e];tt.Qe(ne,z,pt[2],pt[3],pt[4],pt[5],pt[6],pt[7],.5,E),ne=pt[6],z=pt[7]}break;case Cr:if(be=yr(we,b,ne,z),Ae=be.length,_e=we.endX,pt=we.endY,Ae===0){E.push(_e),E.push(pt),ne=_e,z=pt;break}for(_e=0;_e<Ae;_e++)pt=be[_e],tt.Qe(ne,z,pt[2],pt[3],pt[4],pt[5],pt[6],pt[7],.5,E),ne=pt[6],z=pt[7];break;default:Ft("Segment not of valid type: "+we.type)}we.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(Qr(E)))}}}function Qr(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(os(x,E,ne,re))),x=ne,E=re}return y}Be.add=function(a){return this.ee.add(a),this},Be.pm=function(a,y,x,E,b,z,ne,re){return this._isFrozen&&Bn(this),this.fg=new Ji(a,y,b,z).freeze(),this.gg=new Ji(x,E,ne,re).freeze(),this},Qe.Object.defineProperties(rn.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 Pr(this),this.tk}},flattenedLengths:{get:function(){return Pr(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===rn.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===rn.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&&Bn(this,a),this.na=a,a===rn.o?this.ee=new Yn:(rn.V===null&&(rn.V=new Yn().freeze()),this.ee=rn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Bn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Bn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Bn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Bn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Bn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Bn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Bn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Bn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),rn.prototype.setSpots=rn.prototype.pm,rn.prototype.add=rn.prototype.add,rn.prototype.getFractionForPoint=rn.prototype.xx,rn.prototype.getPointAndAngleAlongPath=rn.prototype.Qu,rn.prototype.getAngleAlongPath=rn.prototype.wx,rn.prototype.getPointAlongPath=rn.prototype.Pu,rn.prototype.containsPoint=rn.prototype.ca,rn.prototype.transform=rn.prototype.transform,rn.prototype.rotate=rn.prototype.rotate,rn.prototype.scale=rn.prototype.scale,rn.prototype.offset=rn.prototype.offset,rn.prototype.normalize=rn.prototype.normalize,rn.prototype.computeBoundsWithoutOrigin=rn.prototype.ix,rn.prototype.equalsApprox=rn.prototype.Xa,rn.className="Geometry",rn.j=new Mn(rn,"Line",0),rn.u=new Mn(rn,"Rectangle",1),rn.F=new Mn(rn,"Ellipse",2),rn.o=new Mn(rn,"Path",3),rn.V=null,rn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",rn.className="Geometry",rn.stringify=rn.ia,rn.fillPath=rn.nb,rn.parse=rn.parse,rn.Line=rn.j,rn.Rectangle=rn.u,rn.Ellipse=rn.F,rn.Path=rn.o;function So(a,y,x,E,b){Ao(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 Yn,this.sr=this.pl.Ja,this.fw=null}So.prototype.copy=function(){var a=new So;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},Be=So.prototype,Be.Xa=function(a){if(!(a instanceof So&&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},Be.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},Be.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},Be.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},Be.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},Be.add=function(a){return this.pl.add(a),this},Be.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 de=re[ue];switch(de.type){case ji:z=de.endX,ne=de.endY,E=de.endX,b=de.endY;break;case ki:if(tt.Yb(E,b,de.endX,de.endY,x,a,y))return!0;E=de.endX,b=de.endY;break;case Zr:if(tt.cs(E,b,de.point1X,de.point1Y,de.point2X,de.point2Y,de.endX,de.endY,.5,a,y,x))return!0;E=de.endX,b=de.endY;break;case zo:if(tt.jv(E,b,de.point1X,de.point1Y,de.endX,de.endY,.5,a,y,x))return!0;E=de.endX,b=de.endY;break;case br:case Cr:var pe=de.type===br?mr(de,this):yr(de,this,E,b),we=pe.length,be=de.type===br?de.centerX:de.endX,Ae=de.type===br?de.centerY:de.endY;if(we===0){if(tt.Yb(E,b,be,Ae,x,a,y))return!0;E=be,b=Ae;break}for(be=null,Ae=0;Ae<we;Ae++)if(be=pe[Ae],Ae===0&&tt.Yb(E,b,be[0],be[1],x,a,y)||tt.cs(be[0],be[1],be[2],be[3],be[4],be[5],be[6],be[7],.5,a,y,x))return!0;be!==null&&(E=be[6],b=be[7]);break;default:Ft("Unknown Segment type: "+de.type)}if(de.isClosed&&(E!==z||b!==ne)&&tt.Yb(E,b,z,ne,x,a,y))return!0}return!1},Qe.Object.defineProperties(So.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&&Bn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Bn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Bn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Bn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Bn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Bn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),So.prototype.add=So.prototype.add,So.prototype.equalsApprox=So.prototype.Xa,So.className="PathFigure";function hr(a,y,x,E,b,z,ne,re){Ao(this),a===void 0&&(a=ki),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===Cr?(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===br&&(z=Math.max(z,0)),this.Wh=z,typeof ne=="number"?(a===br&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}hr.prototype.copy=function(){var a=new hr;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},Be=hr.prototype,Be.Xa=function(a){if(!(a instanceof hr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ji:case ki:return tt.B(this.endX,a.endX)&&tt.B(this.endY,a.endY);case Zr: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 br: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 Cr: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}},Be.qb=function(a){a.classType===hr&&(this.type=a)},Be.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ji:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ki:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Zr: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 br: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 Cr: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":"")},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.close=function(){return this.isClosed=!0,this};function mr(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=Jt.alloc();ne.reset(),x<E?ne.scale(1,E/x):ne.scale(x/E,1),rn.Ha(z,ne),Jt.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 yr(a,y,x,E){function b(_e,pt,nt,Bt){return(_e*Bt<pt*nt?-1:1)*Math.acos((_e*nt+pt*Bt)/(Math.sqrt(_e*_e+pt*pt)*Math.sqrt(nt*nt+Bt*Bt)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var ne=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,ue=a.Dc,de=a.Ec,pe=Math.cos(ne),we=Math.sin(ne),be=pe*(x-ue)/2+we*(E-de)/2;ne=-we*(x-ue)/2+pe*(E-de)/2;var Ae=be*be/(y*y)+ne*ne/(z*z);return 1<Ae&&(y*=Math.sqrt(Ae),z*=Math.sqrt(Ae)),Ae=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ne*ne-z*z*be*be)/(y*y*ne*ne+z*z*be*be)),isNaN(Ae)&&(Ae=0),re=Ae*y*ne/z,Ae=Ae*-z*be/y,isNaN(re)&&(re=0),isNaN(Ae)&&(Ae=0),x=(x+ue)/2+pe*re-we*Ae,E=(E+de)/2+we*re+pe*Ae,de=b(1,0,(be-re)/y,(ne-Ae)/z),pe=(be-re)/y,ue=(ne-Ae)/z,be=(-be-re)/y,re=(-ne-Ae)/z,ne=b(pe,ue,be,re),be=(pe*be+ue*re)/(Math.sqrt(pe*pe+ue*ue)*Math.sqrt(be*be+re*re)),-1>=be?ne=Math.PI:1<=be&&(ne=0),!oe&&0<ne&&(ne-=2*Math.PI),oe&&0>ne&&(ne+=2*Math.PI),oe=y>z?1:y/z,be=y>z?z/y:1,y=tt.jx(0,0,y>z?y:z,de,de+ne,!0),z=Jt.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,be),rn.Ha(y,z),Jt.free(z),a.ae=y,a.ae}Qe.Object.defineProperties(hr.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&&Bn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Bn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Bn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Bn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Bn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Bn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Bn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Bn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Bn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Kn(a,">= zero",hr,"radiusX"),this._isFrozen&&Bn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Kn(a,">= zero",hr,"radiusY"),this._isFrozen&&Bn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Bn(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&&Bn(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&&Bn(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&&Bn(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&&Bn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),hr.prototype.equalsApprox=hr.prototype.Xa;var ji=new Mn(hr,"Move",0),ki=new Mn(hr,"Line",1),Zr=new Mn(hr,"Bezier",2),zo=new Mn(hr,"QuadraticBezier",3),br=new Mn(hr,"Arc",4),Cr=new Mn(hr,"SvgArc",4);hr.className="PathSegment",hr.Move=ji,hr.Line=ki,hr.Bezier=Zr,hr.QuadraticBezier=zo,hr.Arc=br,hr.SvgArc=Cr;function Ir(){this.H=null,this.xu=new ot(0,0).freeze(),this.mt=new ot(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}Ir.prototype.copy=function(){var a=new Ir;return this.clone(a)},Ir.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},Ir.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},Ir.prototype.So=function(a,y){var x=this.diagram;return x===null||ph(x,a,y),y},Ir.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(ph(x,a,y),y.assign(x.Ps(y))),y},Qe.Object.defineProperties(Ir.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}}}),Ir.prototype.getMultiTouchDocumentPoint=Ir.prototype.Bz,Ir.prototype.getMultiTouchViewPoint=Ir.prototype.So,Ir.className="InputEvent";function Tr(){this.H=null,this.xa="",this.ar=this.Lr=null}Tr.prototype.copy=function(){var a=new Tr;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Tr.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Qe.Object.defineProperties(Tr.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}}}),Tr.className="DiagramEvent";function fr(){this.Fm=_o,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}fr.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},fr.prototype.copy=function(){var a=new fr;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=En(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=En(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=En(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=En(y)&&typeof y.J=="function"?y.J():y,a},fr.prototype.qb=function(a){a.classType===fr&&(this.change=a)},fr.prototype.toString=function(){var a="";return a=this.change===Aa?a+"* ":this.change===_o?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===Aa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=gr(this.object)),this.oldValue!==null&&(a+=" old: "+gr(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+gr(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},fr.prototype.I=function(a){return a?this.oldValue:this.newValue},fr.prototype.Dz=function(a){return a?this.oldParam:this.newParam},fr.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},fr.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},fr.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},fr.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Qe.Object.defineProperties(fr.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===Aa&&(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}}}),fr.prototype.redo=fr.prototype.redo,fr.prototype.canRedo=fr.prototype.canRedo,fr.prototype.undo=fr.prototype.undo,fr.prototype.canUndo=fr.prototype.canUndo,fr.prototype.getParam=fr.prototype.Dz,fr.prototype.getValue=fr.prototype.I,fr.prototype.clear=fr.prototype.clear;var Aa=new Mn(fr,"Transaction",-1),_o=new Mn(fr,"Property",0),xa=new Mn(fr,"Insert",1),Wa=new Mn(fr,"Remove",2);fr.className="ChangedEvent",fr.Transaction=Aa,fr.Property=_o,fr.Insert=xa,fr.Remove=Wa;function wo(){this.o=new Yn().freeze(),this.xa="",this.j=!1}wo.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},wo.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()},wo.prototype.canUndo=function(){return this.isComplete},wo.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()}},wo.prototype.canRedo=function(){return this.isComplete},wo.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()}},wo.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new Ki,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===_o&&E.object){var b=y.get(E.object);b||(b=new Ki,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()}},Qe.Object.defineProperties(wo.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}}}),wo.prototype.optimize=wo.prototype.ak,wo.prototype.redo=wo.prototype.redo,wo.prototype.canRedo=wo.prototype.canRedo,wo.prototype.undo=wo.prototype.undo,wo.prototype.canUndo=wo.prototype.canUndo,wo.prototype.clear=wo.prototype.clear,wo.className="Transaction";function Oa(){this.Pt=new Xn,this.Jd=!1,this.u=new Yn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Yn().freeze(),this.hl=new Yn,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},Be=Oa.prototype,Be.Xw=function(a){this.Pt.add(a)},Be.Rx=function(a){this.Pt.remove(a)},Be.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},Be.eb=function(a){return a===void 0&&(a=""),El(this,!0,a)},Be.Kf=function(){return El(this,!1,"")};function El(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Ci("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}Be.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){Ci("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){Ci("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 fr;for(E.change=Aa,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 wo);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||Ci("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},Qe.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 Mr(){Ao(this),this.H=Bc,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ir,this.Zr=-1}Mr.prototype.toString=function(){return this.name!==""?this.name+" Tool":Ai(this.constructor)},Mr.prototype.updateAdornments=function(){},Mr.prototype.canStart=function(){return this.isEnabled},Mr.prototype.doStart=function(){},Mr.prototype.doActivate=function(){this.isActive=!0},Mr.prototype.doDeactivate=function(){this.isActive=!1},Mr.prototype.doStop=function(){},Mr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Mr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Mr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Mr.prototype.doMouseMove=function(){},Mr.prototype.doMouseUp=function(){this.stopTool()},Mr.prototype.doMouseWheel=function(){},Mr.prototype.canStartMultiTouch=function(){return!0},Mr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,ot.allocAt(NaN,NaN)),E=y.So(1,ot.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}ot.free(x),ot.free(E)},Mr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,ot.allocAt(NaN,NaN)),E=y.So(1,ot.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 ot((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}ot.free(x),ot.free(E)},Mr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Mr.prototype.doKeyUp=function(){},Mr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Mr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Mr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Wr?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||(Wr?y.meta:y.control)||y.shift||a.clearSelection()}},Mr.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,_s(a,E,x),E.handled};function _s(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)}}}Mr.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}},Mr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Mr.prototype.doCurrentObjectChanged=function(){},Mr.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===gl&&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===gl&&!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)}}},Mr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Mr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=zn(function(){x.doWaitAfter(E)},a)},Mr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&dt.clearTimeout(this.Zr),this.Zr=-1},Mr.prototype.doWaitAfter=function(){},Mr.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},Mr.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},Qe.Object.defineProperties(Mr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof hn&&(this.H=a)}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},isEnabled:{get:function(){return this.Jd},set:function(a){this.Jd=a}},isActive:{get:function(){return this.nb},set:function(a){this.nb=a}},transactionResult:{get:function(){return this.wm},set:function(a){this.wm=a}}}),Mr.prototype.startTransaction=Mr.prototype.Ea,Mr.className="Tool";function jo(){Mr.call(this),this.name="ToolManager",this.hb=new Yn,this.ob=new Yn,this.Hb=new Yn,this.F=this.V=850,this.o=new vi(2,2).ja(),this.Ha=5e3,this.ia=gl,this.u=Tc,this.Mp=this.j=null,this.zj=-1}Vt(jo,Mr),jo.prototype.initializeStandardTools=function(){},jo.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()}},jo.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===gl?this.mouseWheelBehavior=rc:this.mouseWheelBehavior===rc&&(this.mouseWheelBehavior=gl)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},jo.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)}jo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof pa&&(y===a||y.rg(a))||this.hideToolTip()},jo.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()))},jo.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)},jo.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()},jo.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&&(dt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=zn(function(){b.hideToolTip()},a)}},jo.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}},jo.prototype.hideToolTip=function(){this.zj!==-1&&(dt.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)},jo.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()},jo.prototype.doMouseWheel=function(){this.standardMouseWheel()},jo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},jo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},jo.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},jo.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},jo.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)},Qe.Object.defineProperties(jo.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}}}),jo.prototype.replaceStandardTool=jo.prototype.gb;var gl=new Mn(jo,"WheelScroll",0),rc=new Mn(jo,"WheelZoom",1),ad=new Mn(jo,"WheelNone",2),Tc=new Mn(jo,"GestureZoom",3),oc=new Mn(jo,"GestureCancel",4),vc=new Mn(jo,"GestureNone",5);jo.className="ToolManager",jo.WheelScroll=gl,jo.WheelZoom=rc,jo.WheelNone=ad,jo.GestureZoom=Tc,jo.GestureCancel=oc,jo.GestureNone=vc;function as(){Mr.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 ot(NaN,NaN),this.Fr=new ot,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Xn().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var du;Vt(as,Mr),as.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},as.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},as.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,(Wr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},as.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&&Bl(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,mn=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 gi?(a.draggedLink=y.first(),a.draggedLink.canRelinkFrom()&&a.draggedLink.canRelinkTo()&&a.draggedLink.Ej(),a.Oe=x.toolManager.findTool("Relinking"),a.Oe===null&&(a.Oe=new Yi,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}as.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},as.prototype.Pd=function(a){return a===void 0?new dd(sa):this.isGridSnapEnabled?new dd(new ot(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new dd(a.copy())},as.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),ac(this),Vd(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),mn!==null&&(mn.currentCursor=""),Qt=mn=null,su(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),dh(a,!0)},as.prototype.stopTransaction=function(){var a=this.diagram,y=Mr.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()}as.prototype.doCancel=function(){su(this),yc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},as.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},as.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 Ki,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 gi&&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 gi&&(x.value.point=new ot(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=ot.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),ot.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Bl(E),E.hk())}as.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 gi&&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),ui(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)}as.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})},as.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=ot.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(Oo,a);oe=y.Bf(oe),oe<z&&(ne=re,z=oe)}}return ot.free(a),ne}function ui(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)):Ur(b,ne,z,oe,re):Ur(b,null,null,null,null)}}}}as.prototype.doDragOver=function(){};function fo(a,y){var x=a.diagram;a.dragsLink&&ui(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 Ii&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Qt!==null){for(a=Dn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Ii&&it(x,E,a);Dn.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 it(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 gi},!0,function(b){return b instanceof gi},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}as.prototype.doDropOnto=function(){},as.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),Vd(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))}},as.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),Vd(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,fo(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&qe(this),a.Ya(),Vd(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},as.prototype.simulatedMouseMove=function(a,y,x){if(Qt===null)return!1;var E=Qt.diagram;x instanceof hn||(x=null);var b=mn;return x!==b&&(b!==null&&b!==E&&(b.ug(),Qt.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),mn=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)},as.prototype.simulatedMouseUp=function(a,y,x){if(Qt===null)return!1;var E=mn,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;mn=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 ot),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 qe(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Ii&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}as.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Wr?!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())},as.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())},as.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())},as.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},as.prototype.Az=function(){return Qt},as.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)},as.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)}},as.prototype.doSimulatedDragLeave=function(){var a=Qt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},as.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Qt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Xt(this,y.draggedParts.Lf(),!1,a.firstInput),Au(this,this.copiedParts,!1),bd(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},as.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"),Xt(this,y.draggedParts.Lf(),!0,a.lastInput),Au(this,this.copiedParts,!1);var E=new Xn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),fo(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 Xt(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=Dn.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 de=ue.location;ue=de.x,de=de.y,isNaN(ue)||isNaN(de)||(ue<E&&(E=ue),de<b&&(b=de),ue>ne&&(ne=ue),de>re&&(re=de))}}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,Dn.free(z),z=a.Fr,ne=new Ki,re=ot.alloc(),oe=y.iterator;oe.next();)ue=oe.value,ue instanceof gi&&ue.canCopy()&&(de=x.I(ue),de!==null&&(de.points=ue.points,Yh(de,z.x-E,z.y-b),de.suspendsRouting=!0,ne.add(de,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))));ot.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)}}}as.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},as.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new ot},Qe.Object.defineProperties(as.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}}}),as.prototype.getDraggingSource=as.prototype.Az;var Qt=null,mn=null;as.className="DraggingTool",du=new Yn,Hr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),jo.prototype.doCancel=function(){Qt!==null&&Qt.doCancel(),Mr.prototype.doCancel.call(this)};function on(){Mr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new gi,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 Ii,y=new Co,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=io,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Ii,y=new Co,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=io,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 Ki,this.Of=this.gj=this.Pf=null}Vt(on,Mr),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=vi.alloc();ne.width=y.naturalBounds.width*z,ne.height=y.naturalBounds.height*z,E.desiredSize=ne,vi.free(ne),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Oo,z=ot.alloc(),x.location=y.ga(Oo,z),ot.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=io,y.fromSpot=Cs,y.toSpot=Cs),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 Ii){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 Ii))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Ii)&&(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 Ii){var oe=ne.ga(Oo,ot.alloc()),ue=x.x-oe.x,de=x.y-oe.y;ot.free(oe),oe=ue*ue+de*de,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 Ii&&(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 Ii))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Ii))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 Xn;return E.add(a),Un(this,x,y,E)};function Un(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Un(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Un(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!Hn(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!Hn(this,a,y,x,!0)}if(E===Cg)return a===y?a=!0:(E=new Xn,E.add(y),a=Jn(this,E,a,y,x)),!a;if(E===Eg)return!Hn(this,a,y,x,!1);if(E===bg)return a===y?a=!0:(E=new Xn,E.add(y),a=Si(this,E,a,y,x)),!a}return!0};function Hn(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&&Hn(a,ne,x,E,b)))return!0}return!1}function Jn(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&&Jn(a,y,ne,E,b)))return!0}return!1}function Si(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&&Si(a,y,re,E,b))return!0}}return!1}Qe.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 Qn(){on.call(this),this.name="Linking",this.V={},this.F=null,this.K=yi,this.Xd=null}Vt(Qn,on),Qn.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},Qn.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 Ii)))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===Ui)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Qn.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 Ii&&(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 Ii&&(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)},Qn.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()},Qn.prototype.doStop=function(){on.prototype.doStop.call(this),this.startObject=null},Qn.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 Ii&&(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)}}},Qn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof gi)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)},Qn.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Qn.prototype.doNoLink=function(){},Qe.Object.defineProperties(Qn.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 Mn(Qn,"Either",0),or=new Mn(Qn,"ForwardsOnly",0),Ui=new Mn(Qn,"BackwardsOnly",0);Qn.className="LinkingTool",Qn.Either=yi,Qn.ForwardsOnly=or,Qn.BackwardsOnly=Ui;function Yi(){on.call(this),this.name="Relinking";var a=new Co;a.figure="Diamond",a.desiredSize=Ca,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Co,a.figure="Diamond",a.desiredSize=Ca,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Dn}Vt(Yi,on),Yi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof gi){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},Yi.prototype.makeAdornment=function(a,y){var x=new pa;return x.type=ci.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Yi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowRelink||!a.model.xs()||!a.lastInput.left)return!1;var y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom");return y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo")),y!==null},Yi.prototype.doActivate=function(){var a=this.diagram;if(this.originalLink===null){var y=this.handle;if(y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkFrom"),y===null&&(y=this.findToolHandleAt(a.firstInput.documentPoint,"RelinkTo"))),y===null)return;var x=y.part;if(!(x instanceof pa&&x.adornedPart instanceof gi))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=no),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=no),this.temporaryToNode!==null&&(this.temporaryToNode.location=this.originalLink.i(this.originalLink.pointsCount-1)))),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0),a.add(this.temporaryFromNode),a.add(this.temporaryToNode),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.copyLinkProperties(this.originalLink,this.temporaryLink),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0},Yi.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===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}},Yi.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},Yi.prototype.doStop=function(){on.prototype.doStop.call(this),this.handle=null},Yi.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var ne=this.targetPort.part;ne instanceof Ii&&(this.isForwards?(E=ne,b=this.targetPort):(y=ne,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},Yi.prototype.reconnectLink=function(a,y,x,E){return x=x!==null&&x.portId!==null?x.portId:"",E?(a.toNode=y,a.toPortId=x):(a.fromNode=y,a.fromPortId=x),!0},Yi.prototype.doNoRelink=function(){};function Ur(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)}Qe.Object.defineProperties(Yi.prototype,{fromHandleArchetype:{get:function(){return this.V},set:function(a){this.V=a}},toHandleArchetype:{get:function(){return this.Xd},set:function(a){this.Xd=a}},handle:{get:function(){return this.F},set:function(a){if(a!==null&&!(a.part instanceof pa))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Yi.className="RelinkingTool",Hr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Hr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function rr(){Mr.call(this),this.name="LinkReshaping";var a=new Co;a.figure="Rectangle",a.desiredSize=Ja,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Co,a.figure="Diamond",a.desiredSize=Ca,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new ot,this.Yq=new Yn}Vt(rr,Mr),rr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:_r},rr.prototype.om=function(a,y){a.reshapingBehavior=y},rr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof gi){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=ci.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,Ko),re.cursor="n-resize"):tt.B(oe.y,ue.y)&&(this.om(re,vo),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,Ko),re.cursor="n-resize"):tt.B(oe.y,ue.y)&&(this.om(re,vo),re.cursor="w-resize")):ne!==z&&(this.om(re,ua),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 gi){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=Mr.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(Oo)},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&&(Rr(this,ne,E,b,z,!0)||Rr(this,ne,E,b,z,!1))){var re=y.points.copy();Rr(this,ne,E,b,z,!0)?(re.cd(x-2,new ot(ne.x,(z.y+ne.y)/2)),re.cd(x+1,new ot(z.x,(z.y+ne.y)/2))):(re.cd(x-2,new ot((z.x+ne.x)/2,ne.y)),re.cd(x+1,new ot((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&&(Rr(this,E,b,z,ne,!0)||Rr(this,E,b,z,ne,!1))&&(re=y.points.copy(),Rr(this,E,b,z,ne,!0)?(re.cd(x-1,new ot(E.x,(E.y+ne.y)/2)),re.cd(x+2,new ot(ne.x,(E.y+ne.y)/2))):(re.cd(x-1,new ot((E.x+ne.x)/2,E.y)),re.cd(x+2,new ot((E.x+ne.x)/2,ne.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ne=ot.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()),ot.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Rr(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===Ko?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===vo&&(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===Ko?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===vo&&(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(Oo,ot.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,ot.alloc()),y.L(0,E.x,E.y),ot.free(z),ot.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(Oo,ot.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,ot.alloc()),y.L(y.pointsCount-1,a.x,a.y),ot.free(x),ot.free(a));y.zf()},rr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case ua:return a;case Ko:return new ot(y.i(x).x,a.y);case vo:return new ot(a.x,y.i(x).y);default:case _r:return y.i(x)}},Qe.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 _r=new Mn(rr,"None",0),vo=new Mn(rr,"Horizontal",1),Ko=new Mn(rr,"Vertical",2),ua=new Mn(rr,"All",3);rr.className="LinkReshapingTool",rr.None=_r,rr.Horizontal=vo,rr.Vertical=Ko,rr.All=ua,Hr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function oo(){Mr.call(this),this.name="Resizing",this.o=new vi(1,1).freeze(),this.j=new vi(9999,9999).freeze(),this.yg=new vi(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Co;a.alignmentFocus=Oo,a.figure="Rectangle",a.desiredSize=Ja,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new ot,this.Dw=new vi,this.Tn=new ot,this.rt=new vi(0,0),this.qt=new vi(1/0,1/0),this.pt=new vi(1,1)}Vt(oo,Mr),oo.prototype.updateAdornments=function(a){if(!(a===null||a instanceof gi)){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)}},oo.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new pa,y.type=ci.Spot,y.locationSpot=Oo;var x=new Cu;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Us)),y.add(this.makeHandle(a,kl)),y.add(this.makeHandle(a,On)),y.add(this.makeHandle(a,zl)),y.add(this.makeHandle(a,bo)),y.add(this.makeHandle(a,Io)),y.add(this.makeHandle(a,Ar)),y.add(this.makeHandle(a,oa))}else if(Zc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},oo.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},oo.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=Oo),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 ci)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},oo.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},oo.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))},oo.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},oo.prototype.stopTransaction=function(){var a=this.diagram,y=Mr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},oo.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},oo.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,ot.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),ot.free(b)}},oo.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,ot.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),ot.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},oo.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 Yn;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()}},oo.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Oo);var ne=this.adornedObject.naturalBounds,re=ne.x,oe=ne.y,ue=ne.x+ne.width,de=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=ot.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,de-E.height),a.y=Math.min(a.y,de-x.height),a.height=Math.max(de-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=de-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*(de-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,de-E.height),a.y=Math.min(a.y,de-x.height),a.height=Math.max(de-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=de-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*(de-oe-a.height))):0>=y.y?(a.y=Math.max(we.y,de-E.height),a.y=Math.min(a.y,de-x.height),a.height=de-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))),ot.free(we),a},oo.prototype.computeReshape=function(){var a=ri;return this.adornedObject instanceof Co&&(a=Ov(this.adornedObject)),!(a===er||this.diagram.lastInput.shift)},oo.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},oo.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},oo.prototype.computeCellSize=function(){var a=new vi(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},Qe.Object.defineProperties(oo.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}}}),oo.className="ResizingTool",Hr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Wo(){Mr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new ot,this.ue=null;var a=new Co;a.figure="Ellipse",a.desiredSize=Ca,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new ot(NaN,NaN),this.u=0,this.F=50}Vt(Wo,Mr),Wo.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)}},Wo.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new pa,y.type=ci.Position,y.locationSpot=Oo;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},Wo.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},Wo.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)},Wo.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(Oo)},Wo.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)},Wo.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new ot(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Wo.prototype.stopTransaction=function(){var a=this.diagram,y=Mr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Wo.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Wo.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Wo.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()},Wo.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()}},Wo.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},Qe.Object.defineProperties(Wo.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}}}),Wo.className="RotatingTool",Hr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function ka(){Mr.call(this),this.name="ClickSelecting"}Vt(ka,Mr),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(){Mr.call(this),this.name="Action",this.pk=null}Vt(uo,Mr),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 ko(){Mr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new ot(0,0)}Vt(ko,Mr),ko.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)},ko.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},ko.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);En(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=ot.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),ot.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Qe.Object.defineProperties(ko.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}}}),ko.className="ClickCreatingTool";function co(){Mr.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}Vt(co,Mr),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=vi.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),vi.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 Dn(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),Wr?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 Yn,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)}},Qe.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 Lr(){Mr.call(this),this.name="Panning",this.Xt=new ot,this.xy=new ot,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(dt.document,"scroll",a.Kw,!1),a.stopTool()}}Vt(Lr,Mr),Lr.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())},Lr.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(dt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Lr.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Lr.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Lr.prototype.doMouseMove=function(){this.move()},Lr.prototype.doMouseUp=function(){this.move(),this.stopTool()},Lr.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)}},Qe.Object.defineProperties(Lr.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Lr.className="PanningTool",Hr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Hr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Hr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Hr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Hr("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}Qe.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 Sa(){Mr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new ot,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Vt(Sa,Mr);function Pa(a){var y=new Fo;y.show=function(b,z,ne){ne.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},us=y,a.tu=function(){a.stopTool()},y=qn("div");var x=qn("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=qn("style");dt.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",ao,!1),E.addEventListener(y,"selectstart",ao,!1),E.addEventListener(x,"contextmenu",ao,!1)),y.className="goCXforeground",x.className="goCXbackground",dt.document.body&&(dt.document.body.appendChild(y),dt.document.body.appendChild(x)),Za=y,Ls=x,qs=!0}function ao(a){return a.preventDefault(),!1}Sa.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)},Sa.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Sa.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Sa.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof hn||(a instanceof Yt?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},Sa.prototype.doActivate=function(){},Sa.prototype.doMouseDown=function(){if(Mr.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)},Sa.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()&&(Ka(a,!0),a.isActive||a.stopTool())}Sa.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Ka(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=us,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Yt?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()}}Sa.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Sa.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},Sa.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}},Sa.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 bs(a){var y=new Yn;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}Sa.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=bs(this)),Za.innerHTML="",Ls.addEventListener("pointerdown",this.tu,!1);var y=this,x=qn("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=qn("li"),z.className="goCXli";var ne=qn("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",Ls.style.display="block"},Sa.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===us){Za.style.display="none",Ls.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Ls,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Qe.Object.defineProperties(Sa.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&&us===null&&As&&Pa(this),us},set:function(a){a===null&&(qs=!0),us=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var us=null,qs=!1,Ls=null,Za=null;Sa.className="ContextMenuTool",Hr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function aa(){Mr.call(this),this.name="TextEditing",this.Zh=new es,this.ia=null,this.V=Xo,this.vj=null,this.qa=Uo,this.u=1,this.F=!0,this.o=null,this.j=new Fo,this.kt=null,fs(this,this.j)}Vt(aa,Mr);function fs(a,y){if(As){var x=qn("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(da)):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!==Uo){var E=a.kt;a.qa===Ra&&(a.qa=ss),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Uo){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 es&&z instanceof aa)if(z.state===Al)x.style.border="3px solid red",x.focus();else{var ne=E.ga(Oo),re=b.position,oe=b.scale,ue=E.Df()*oe;ue<z.minimumEditorScale&&(ue=z.minimumEditorScale);var de=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=de+"px",x.style.left=(we-de/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)}}}aa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Kl&&Kl!==this&&(Kl.acceptText(cl),Kl&&Kl!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof es&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===Xo&&!y.isSelected||this.starting===Ps&&2>a.lastInput.clickCount)):!1},aa.prototype.doStart=function(){Kl=this,this.textBlock!==null&&this.doActivate()},aa.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 es&&(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 Dn(this.textBlock.ga(Us),this.textBlock.ga(On));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},aa.prototype.doCancel=function(){this.stopTool()},aa.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},aa.prototype.doMouseDown=function(){this.isActive&&this.acceptText(cl)},aa.prototype.acceptText=function(a){switch(a){case cl:this.qa===bl?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===Ra||this.qa===Al||this.qa===ss)&&(this.qa=cs,el(this));break;case Ws:case da:case ba:(da!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Ra||this.qa===Al||this.qa===ss)&&(this.qa=cs,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=bl,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=Al,a.doError(b,z))}}aa.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)},aa.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},aa.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Uo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},aa.prototype.doStop=function(){Kl=null},aa.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)))},aa.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Qe.Object.defineProperties(aa.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)}}}),aa.prototype.measureTemporaryTextBlock=aa.prototype.Lx;var Ws=new Mn(aa,"LostFocus",0),cl=new Mn(aa,"MouseDown",1),ba=new Mn(aa,"Tab",2),da=new Mn(aa,"Enter",3),wa=new Mn(aa,"SingleClick",0),Xo=new Mn(aa,"SingleClickSelected",1),Ps=new Mn(aa,"DoubleClick",2),Uo=new Mn(aa,"StateNone",0),Ra=new Mn(aa,"StateActive",1),ss=new Mn(aa,"StateEditing",2),cs=new Mn(aa,"StateValidating",3),Al=new Mn(aa,"StateInvalid",4),bl=new Mn(aa,"StateValidated",5),Kl=null;aa.className="TextEditingTool",aa.LostFocus=Ws,aa.MouseDown=cl,aa.Tab=ba,aa.Enter=da,aa.SingleClick=wa,aa.SingleClickSelected=Xo,aa.DoubleClick=Ps,aa.StateNone=Uo,aa.StateActive=Ra,aa.StateEditing=ss,aa.StateValidating=cs,aa.StateInvalid=Al,aa.StateValidated=bl,Hr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function Fs(a){Du||(Ul(),Du=!0),this.H=Bc,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=ml,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Xn,this.ce=new Ns,this.ce.Yd=this,this.Ei=new Xn,this.pu=new Xn,this.Sr=new Xn,this.pr=new Xn,a&&Object.assign(this,a)}Fs.prototype.Xe=function(a){this.H=a},Fs.prototype.canStart=function(){return!0};function Zl(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ml(a.H),a.zb=!0)}function dl(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===ml?(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(),Hl(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),dt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Bl(x),Hd(x),a.zb=!1,y.start(),y.bc&&(Ms(a),x.Ya(),Kc(y,0),lu(x,!0),Gs(a),x.R("AnimationStarting",a)))}))}}function Fl(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function _c(a,y,x,E){a.isTicking||Fl(a)||y instanceof gi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Be=Fs.prototype,Be.fv=function(a){return this.ce.fv(a)},Be.Xu=function(a){return this.ce.Xu(a)};function Bs(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 Yt&&oe.diagram!==null||oe instanceof hn){re=!0;break e}}re=!1}re?$u(ne,!1):ne.Xk=!0}}b.pu.clear(),b.bc!==!1&&(Ms(b),lu(b.H),Gs(b)),dt.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),dt.requestAnimationFrame(function(){x()}))}function ks(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Ms(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}Be.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(),Hl(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Hl(y,this.H)},Be.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))},Be.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),js(this,a))},Be.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 pl(a,y,x){!a.zb||y.D(x)||Fl(a)||(a.H.pi||(y=x.copy()),$s(a.ce,a.H,"position",y,x))}function is(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 Dl(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],de=y[2];return y=y[3],re===0||re===100?(z=oe,ne=ue):(de===0||de===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,de-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ne+"%, "+re+"%, "+x+")"}function Ul(){function a(x,E,b,z,ne,re){x.position=new ot(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}var y=new Ki;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 ot(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 ot(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 ot(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 ot(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 Dn(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=Dl(E,b,ne,re,z)}),y.add("stroke",function(x,E,b,z,ne,re){x.stroke=Dl(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=Dl(E,b,ne,re,z)}),y.add("areaBackground",function(x,E,b,z,ne,re){x.areaBackground=Dl(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}Qe.Object.defineProperties(Fs.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&&Kn(a,">= 1",Fs,"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}}}),Fs.prototype.stopAnimation=Fs.prototype.Cc;var Gu=null,Du=!1,ml=new Mn(Fs,"Default",1),Iu=new Mn(Fs,"AnimateLocations",2),Ou=new Mn(Fs,"None",3);Fs.className="AnimationManager",Fs.defineAnimationEffect=function(a,y){Du||(Ul(),Du=!0),Gu.add(a,y)},Fs.Default=ml,Fs.AnimateLocations=Iu,Fs.None=Ou;function Ns(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=sa,this.vc=new Ki,this.Tt=new Ki,this.yl=new Xn,this.Ut=new Xn,this.dw=Yd,a&&Object.assign(this,a)}Ns.prototype.suspend=function(){this.Xk=!0},Ns.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),Ms(this.Yd),lu(this.H),Gs(this.Yd),this.H.redraw()};function Hl(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}Be=Ns.prototype,Be.start=function(){if(this.vc.count===0||this.bc)return this;for(var a=this.H,y=this.vc.iterator;y.next();){var x=y.key;a===null&&(x instanceof hn?a=x:x instanceof Yt&&(a=x.diagram))}if(a!==null)this.H=a,this.Yd=a.animationManager;else return this;return y=this.Yd,y.isEnabled===!1?this:(this.Gd=isNaN(this.Dg)?y.duration:this.Dg,this.Lp=this.ot,y.Ok&&y.Pk===ml&&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),Ms(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,Bs(y,this),this)},Be.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Be.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof hn?this.H=a:a instanceof Yt&&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 hn&&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 Yt&&re instanceof ot&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(ue.position),re=new Vu(oe,ue,z),ne.add(y,re);ne=oe[x],ne instanceof ot&&!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 ot||a instanceof vi?a.copy():a}Be.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Be.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),Ms(x),Kc(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 Kc(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Yt&&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)}}}Be.stop=function(){return this.bc?(this.Ml(!0),this):this},Be.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,Ms(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,de=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],de[pe]!==void 0?de[pe]:re.Hu?oe[pe]:ue[pe],this.Lp,this.Gd,this.Gd,this)}re.Hu&&de.location!==void 0&&ne instanceof Sr&&(ne.location=de.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),Hl(this,null),x.Ml(this),y.$b())}},Be.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 ot(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 Ii&&this.Cj(E,y)},Be.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 Ii&&this.Aj(E,y)}},Be.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Qe.Object.defineProperties(Ns.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Kn(a,">= 1",Ns,"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:Ft("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}}}),Ns.prototype.getTemporaryState=Ns.prototype.Ez,Ns.prototype.stop=Ns.prototype.stop,Ns.prototype.add=Ns.prototype.add,Ns.prototype.addTemporaryPart=Ns.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}Ns.className="Animation",Ns.EaseLinear=function(a,y,x,E){return x*a/E+y},Ns.EaseInOutQuad=sc,Ns.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Ns.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Ns.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Ns.EaseOutExpo=lc;function Vu(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Vu.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=vl))}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 ws(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))}Qe.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 Mn(ku,"Default",1),vl=new Mn(ku,"Immediate",2),Xs=new Mn(ku,"Bundled",3);ku.className="AnimationTrigger",ku.Default=Ys,ku.Immediate=vl,ku.Bundled=Xs;function ms(a){Ao(this),this.H=null,this.Pa=new Yn,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)}Be=ms.prototype,Be.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Jl(x)}a.clear(),this.Zq.length=0},Be.Xe=function(a){this.H=a},Be.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 Ii?E++:oe instanceof gi?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&&nr(E)&&(re+=" #"+nr(E)),x instanceof Ii?re+=" "+gr(E):x instanceof gi&&(re+=" "+gr(x.fromNode)+" "+gr(x.toNode));return y+" "+this.Pa.count+": "+re},Be.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=ot.alloc(),z=this.Pa.s,ne=z.length;ne--;){var re=z[ne];if((E!==!0||wf(re)!==!1)&&re.isVisible()&&(b.assign(a),Eo(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return ot.free(b),re}return ot.free(b),null},Be.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Yn||E instanceof Xn||(E=new Xn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=ot.alloc(),ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((b!==!0||wf(oe)!==!1)&&oe.isVisible()){z.assign(a),Eo(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 ot.free(z),E},Be.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 Yn||b instanceof Xn||(b=new Xn),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},Be.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 de=ue;ue.Cf(a,y,x,E,b)&&(y!==null&&(de=y(de)),de===null||x!==null&&!x(de)||b.add(de))}}return b},Be.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 Yn||b instanceof Xn)&&(z=b),b=!0),z instanceof Yn||z instanceof Xn||(z=new Xn),this.Uh===!1)return z;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var re=ot.alloc(),oe=ot.alloc(),ue=this.Pa.s,de=ue.length;de--;){var pe=ue[de];if((ne!==!0||wf(pe)!==!1)&&pe.isVisible()){re.assign(a),Eo(re,pe.oe),oe.h(a.x+y,a.y),Eo(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 ot.free(re),ot.free(oe),z},Be.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=mi();for(var b=mi(),z=0;z<E;z++){var ne=x[z];if(ne.vw=z,ne instanceof gi){if(ne.fd===!1)continue}else if(ne instanceof pa&&ne.adornedPart!==null)continue;var re=ne.actualBounds;ne.isVisible()&&eu(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]);Di(a),Di(b)}}};function yl(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Be.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=yl(this,a);var z=this.Zq;z.length=0;for(var ne=y.scale,re=Dn.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ne,re,!0);if(Dn.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=yl(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,ue=Dn.alloc(),de=0;de<z;de++){var pe=b[de];E.contains(pe)&&a.Oj(y,pe,x,re,oe,ue,!1)}Dn.free(ue),y.globalAlpha=ne}}}Be.Oj=function(a,y,x,E,b,z,ne){if(ne&&!wf(y))a.Hs(y);else{if(E!==null&&y instanceof gi&&(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 Ia?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&&(Ds(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Ds(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),Ds(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))}},Be.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(_o,a,this,y,x,E,b)},Be.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&Jl(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},Be.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,Jl(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}Qe.Object.defineProperties(ms.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===""&&Ft("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Ft("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)&&Kn(a,"0 <= value <= 1",ms,"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))}}}),ms.prototype.findObjectsNear=ms.prototype.og,ms.prototype.findObjectsIn=ms.prototype.Cf,ms.prototype.findObjectsAt=ms.prototype.ji,ms.prototype.findObjectAt=ms.prototype.ic,ms.className="Layer";function hn(a,y){if(ip||(Yl(),ip=!0),Ao(this),Bc=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,As){var x=this,E=function(){x.removeEventListener(dt.document,"DOMContentLoaded",E,!1),x.setRTL()};dt.document.body!==null?this.setRTL():x.addEventListener(dt.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===_o&&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 xs,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"||dt.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 Fs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Yn,a.pj=new Ki,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new ot(NaN,NaN).freeze(),a.du=new ot(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new ot(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Jt,a.zu=new ot(NaN,NaN).freeze(),a.ut=new Dn(NaN,NaN,NaN,NaN).freeze(),a.rj=new dr(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 Xn,a.Eh=new Ki,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new dr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ir,a.bq.diagram=a,a.Qg=new Ir,a.Qg.diagram=a,a.cj=new Ir,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Hp(a),a.ai=new Xn,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 Ki,a.Xn=new Yn,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 dr(5).freeze(),a.Hw=new Xn().freeze(),a.Nt=999999999,a.nw=new Xn().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 Xn,a.ow=new Xn,a.Xh=null,a.aw=new vi(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new ot,bounds:new Dn,Py:new vi,bA:new vi,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Dn(NaN,NaN,NaN,NaN).freeze(),a.wo=new vi(NaN,NaN).freeze(),a.Sp=new Dn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new Ki;var y=new Ii,x=new es;x.bind(new tl("text","",gr)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Ii,x=new es,x.stroke="brown",x.bind(new tl("text","",gr)),y.add(x),a.Lg.add("Comment",y),y=new Ii,y.selectable=!1,y.avoidable=!1,x=new Co,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new vi(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new Ki,y=new ho,y.selectionObjectName="GROUPPANEL",y.type=ci.Vertical,x=new es,x.font="bold 12pt sans-serif",x.bind(new tl("text","",gr)),y.add(x),x=new ci(ci.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 dr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new Ki,y=new gi,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 gi,x=new Co,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new pa,y.type=ci.Auto,x=new Co,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Cu,x.margin=new dr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new pa,y.type=ci.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 jo,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=Ga,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 ot,a.zy=500,a.wp=new ot,a.wq=!1}hn.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 Xn().freeze(),a.nw=new Xn().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(),ro=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Zd(){return null}hn.prototype.reset=function(){this.clear(),this.vb=!0,df(this),Jc(this),this.Wg=!0,hh(this),this.layout=new xs,this.Wg=!1,this.model=Sy(),this.model.undoManager=new Oa,this.vb=this.rn=!1,this.N()},hn.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=dt.document.body);var y=qn("div");y.dir="rtl",y.style.cssText="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll;",y.textContent="A",a.appendChild(y);var x="reverse";0<y.scrollLeft?x="default":(y.scrollLeft=1,y.scrollLeft===0&&(x="negative")),a.removeChild(y),this.bu=x},hn.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=dt.document.body);var y=0;if(As){var x=np;y=sd,x===null&&(x=np=qn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=sd=qn("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||Wr||(y=11)}this.Db=y,this.Gw=!0},hn.prototype.qb=function(a){a.classType===hn&&(this.autoScale=a)},hn.prototype.toString=function(a){a===void 0&&(a=0);var y="";if(this.div&&this.div.id&&(y=this.div.id),y='Diagram "'+y+'"',0>=a)return y;for(var x=this.Wa.iterator;x.next();)y+=`
`+x.value.toString(a-1);return y};function Rh(a,y){if(As){if(y!=null||Ft("Diagram setup requires an argument DIV."),a.Ka!==null&&Ft("Diagram has already completed setup."),typeof y=="string"?a.Ka=dt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Ft("No DIV or DIV id supplied: "+y),a.Ka===null&&Ft("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Ft("Invalid div id; div already has a Diagram associated with it."),!a.ol&&dt.ResizeObserver){var x=vn(function(){a.$b()},250);a.ol=new dt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}dt.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=dt.go;var b=new Gl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",dt.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 Gl(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,As){b=qn("div");var z=qn("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=vn(function(){a.Yh=null,a.N()},300),a.Ov=vn(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=dt.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,de=ne;oe&&oe.H&&(de=ne,ue=oe.H),re.targetDiagram=ue,Uc(a,de,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=dt.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 hn&&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)}}hn.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},hn.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(dt,"resize",a.Ov,!1)}function Bl(a){30<a.Sq&&(a.Yh=1)}function dh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),qi&&qi.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}hn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:dt.devicePixelRatio||1},hn.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},hn.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},hn.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},hn.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},hn.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},hn.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},hn.prototype.doFocus=function(){this.focus()},hn.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=dt.scrollX||dt.pageXOffset,y=dt.scrollY||dt.pageYOffset;this.ta.focus(),dt.scrollTo(a,y)}},hn.prototype.Oy=function(){this.H.R("GainedFocus")},hn.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 ms;y.name="Background",a.Al(y),y=new ms,y.name="",a.Al(y),y=new ms,y.name="Foreground",a.Al(y),y=new ms,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new ms,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new ms,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 ci(ci.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)}hn.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,de=E.right+z.right;z=E.bottom+z.bottom;var pe=b.x;E=b.y;var we=b.width,be=b.height,Ae=b.right,_e=b.bottom;b=this.scale;var pt=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":pt=pt+a.scrollWidth-a.clientWidth;break;case"reverse":pt=a.scrollWidth-pt-a.clientWidth}var nt=pt;we<oe||be<ue?(pt=ot.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==nt&&(pt.x=nt/b+ne,this.ju=nt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(pt.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=pt,ot.free(pt),this.Ee=this.qr=!1):(pt=ot.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<pe&&(this.position=pt.h(nt+ne,this.position.y)),de>Ae&&(this.position=pt.h(-(y.scrollWidth-this.Aa)+nt-this.Aa/b+de,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<E&&(this.position=pt.h(this.position.x,a.scrollTop+re)),z>_e&&(this.position=pt.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),ot.free(pt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,de=E.right,Ae=b.right,z=E.bottom,_e=b.bottom,ne=E.x,pe=b.x,re=E.y,E=b.y,we>=oe&&ne>=pe&&de<=Ae&&(x.style.width="1px"),be>=ue&&re>=E&&z<=_e&&(x.style.height="1px"))}},hn.prototype.computeBounds=function(a){return a===void 0&&(a=new Dn),Ml(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}hn.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(un(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof gi||(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 gi||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Dn(NaN,NaN,0,0):x};function Ku(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=ot.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Dn.allocAt(0,0,E.width,E.height);var b=ot.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Dn.free(E),ot.free(b),ot.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()?Oo: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 Dn(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}hn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Yd,this.scale=Wd(this,Ru),a!==Yd&&(Ku(this,!1),ff(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Be=hn.prototype,Be.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 ot(a.x,a.y)}},Be.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new ot(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))},Be.zz=function(a){if(a instanceof Yt){this.eq=a;var y=ot.alloc();this.fq=this.op(a.ga(Us,y)),ot.free(y)}else this.eq=null,this.fq=Ga};function ff(a,y,x,E,b,z){var ne=ot.allocAt(a.pa.x,a.pa.y),re=ne.x,oe=ne.y;if(a.eq!==null){var ue=ot.alloc();ue=a.eq.ga(Us,ue),re=ue.x-a.fq.x/a.scale,oe=ue.y-a.fq.y/a.scale,b=Cs,ot.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),pl(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Jc(a),ot.free(ne)}Be.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},Be.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Ml(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),Ml(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}Be.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 Yn||b instanceof Xn||(b=new Xn),Ml(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Be.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Yn||E instanceof Xn||(E=new Xn),Ml(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Be.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)},Be.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Yn||b instanceof Xn||(b=new Xn),Ml(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ne=z.value;ne.visible&&ne.Cf(a,y,x,E,b)}return b},Be.Nu=function(a,y,x,E,b,z){var ne=new Xn;Ml(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 Yn||b instanceof Xn||(b=new Xn),Ml(a),a=a.Wa.iteratorBackwards;a.next();){var ne=a.value;ne.visible&&!ne.isTemporary&&ne.Cf(y,z,x,E,b)}return b}Be.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)},Be.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 Yn||b instanceof Xn)&&(z=b),b=!0),z instanceof Yn||z instanceof Xn||(z=new Xn),Ml(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 Yn||b instanceof Xn)&&(z=b),b=!0),z instanceof Yn||z instanceof Xn||(z=new Xn),Ml(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}hn.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),Wr&&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,Wr&&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)}hn.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)},hn.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)},hn.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)},hn.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)},hn.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new ot(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?Eo(new ot(y,a),this.Ab):new ot(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=ot.allocAt(ne,re),a.Ab.Cd(y),x.documentPoint.assign(y),ot.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))}}hn.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function mh(a){a.ld||Ml(a),a.Va()}hn.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Be=hn.prototype,Be.Pz=function(){return this.kg},Be.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 ot(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&zn(function(){E.ld=!1,Zl(y,"Model"),a(E)},1)},Be.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;dt.requestAnimationFrame(function(){y.kg&&y.bd()})}},Be.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&&Ml(a),x&&Ku(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];xt(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)),Ml(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,Ml(a),a.ou||mh(a),ud(a,!0,!1),ne=!1,z?(x=Dn.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),Dn.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)),Ku(a,!0)),z&&ne&&a.eb("Initial Layout"),Ml(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)}Ku(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 Ml(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 Xn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof ho&&E.U&65536&&(E.U=E.U^65536)})}}Be.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()&&gs(this,x);for(a.reset();a.next();)x=a.value,x instanceof gi&&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 gs(a,y){for(var x=mi(),E=mi(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof ho?(St(z)||It(z)||Pf(z))&&gs(a,z):z instanceof gi?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(Di(x),y.measure(1/0,1/0),y.arrange(),a=E.length,y=0;y<a;y++)x=E[y],x.measure(1/0,1/0),x.arrange();Di(E)}Be.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Be.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Ft("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,ds(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&&(Jt.prototype.Cd=Jt.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,de=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-ue,-de),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&&(Jt.prototype.Cd=Jt.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=qi&&qi.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&&Ft("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 de=a.Ca;a.Ca=b;var pe=a.Wa.s,we=pe.length;try{var be=new Dn(z.x,z.y,E.width/b,E.height/b),Ae=be.copy();Ae.Co(x),Xc(a,Ae),Ml(a),a.Fd(pe,we,a,be),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 _e=a.Mb;y.scale(_e,_e);var pt=Jt.alloc();pt.reset(),pt.translate(x.left,x.top),pt.scale(b),z.x===0&&z.y===0||pt.translate(-z.x,-z.y),y.setTransform(pt.m11,pt.m12,pt.m21,pt.m22,pt.dx,pt.dy),y.yc(),y instanceof Ia&&ds(y,pt.m11,pt.m12,pt.m21,pt.m22,pt.dx,pt.dy),Jt.free(pt),nu(a,y),y.globalAlpha=a.pb;var nt=a.Qj("Grid");if(ne){var Bt=new Xn,At=ne.iterator;for(At.reset();At.next();){var kt=At.value;kt instanceof Sr&&(ue||kt.layer!==nt)&&(kt.Gj(),Bt.add(kt))}for(ue=0;ue<we;ue++)Su(pe[ue],y,a,Bt,oe);Bt.each(function(fn){return fn.Gj()})}else for(Bt=0;Bt<we;Bt++){var Ut=pe[Bt];Ut===nt?ue&&Ut.gc(y,a,!0):Ut.gc(y,a,oe)}a.$i=!1,a.Yf&&Jd(a.Yf,a)&&a.Vp()}finally{a.Ca=de,a.ib.Vc(!0),a.vd=!0,a.Fd(pe,we,a,a.viewportBounds),Xc(a),a.ib instanceof Ia&&(a.ib.Nj.PA(),a.redraw())}}}Be.Gf=function(a){return this.Rg[a]},Be.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Be.Tx=function(){this.Rg=new xr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Wr||Po),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))}Be.Ql=function(a){return this.on[a]},Be.sA=function(a,y){this.on[a]=y},Be.Sx=function(){this.on=new xr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Be.set=function(a){return Object.assign(this,a),this},Be.Du=function(a){return this.nm(a)},Be.nm=function(a){return uc(this,a),this};function uc(a,y){var x=a instanceof ci,E=a instanceof hn,b;for(b in y){b===""&&Ft("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])),En(z)?ne=b.substr(re+1):Ft("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ne[0]!=="_"&&!Or(z,ne))if(E&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(E&&ne==="Changed"){a.Pe(y[ne]);continue}else if(E&&Or(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 Ft('Trying to set undefined property "'+ne+'" on object: '+z.toString());z[ne]=y[b],ne[0]==="_"&&z instanceof Yt&&z.Vw(ne)}}Be.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new Ki,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Be.N=function(a){if(a===void 0)this.Fc=!0,this.$b();else{var y=this.viewportBounds;a.w()&&y.Yc(a)&&(this.Fc=!0,this.$b())}this.R("InvalidateDraw")},hn.prototype.invalidateViewport=function(a,y){if(this.Fc!==!0)if(this.Fc=!0,this.nl==="svg")this.bd();else{var x=this.Gf("temporaryPixelRatio")===!0;if(this.Gf("viewportOptimizations")===!0&&this.scrollMode!==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=Dn.alloc(),yg(this,this.computeBounds(E)),Dn.free(E)),E=this.ta,E===null||E instanceof Jo)))){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,de=Math.max(z,0),pe=Math.max(y,0),we=Math.floor(b-de),be=Math.floor(re-pe);a.drawImage(E.Oa,de,pe,we,be,0,0,we,be),Jd(this.Yf,this)&&a.clearRect(0,0,oe,ue),E=mi(),a=mi(),be=Math.abs(z),we=Math.abs(y);var Ae=de===0?0:b-be;de=ot.allocAt(Ae,0),be=ot.allocAt(be+Ae,re),a.push(new Dn(Math.min(de.x,be.x),Math.min(de.y,be.y),Math.abs(de.x-be.x),Math.abs(de.y-be.y)));var _e=this.Ab;if(_e.reset(),_e.scale(ne,ne),this.Ca!==1&&_e.scale(this.Ca),ne=this.pa,(ne.x!==0||ne.y!==0)&&isFinite(ne.x)&&isFinite(ne.y)&&_e.translate(-ne.x,-ne.y),Eo(de,_e),Eo(be,_e),E.push(new Dn(Math.min(de.x,be.x),Math.min(de.y,be.y),Math.abs(de.x-be.x),Math.abs(de.y-be.y))),Ae=pe===0?0:re-we,de.h(0,Ae),be.h(b,we+Ae),a.push(new Dn(Math.min(de.x,be.x),Math.min(de.y,be.y),Math.abs(de.x-be.x),Math.abs(de.y-be.y))),Eo(de,_e),Eo(be,_e),E.push(new Dn(Math.min(de.x,be.x),Math.min(de.y,be.y),Math.abs(de.x-be.x),Math.abs(de.y-be.y))),Jd(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,de.h(b,re),be.h(oe+b,ue+re),a.push(new Dn(Math.min(de.x,be.x),Math.min(de.y,be.y),Math.abs(de.x-be.x),Math.abs(de.y-be.y))),Eo(de,_e),Eo(be,_e),E.push(new Dn(Math.min(de.x,be.x),Math.min(de.y,be.y),Math.abs(de.x-be.x),Math.abs(de.y-be.y)))),ot.free(de),ot.free(be),ud(this,!1,!0),this.Ka===null&&Ft("No div specified"),this.ta===null&&Ft("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=yl(ne,b),pe=ne.Zq,pe.length=0,de=this.scale,we=Dn.alloc(),be=ne.Pa.s,_e=be.length,Ae=oe.length;for(var pt=0;pt<_e;pt++){var nt=be[pt],Bt=eg(nt,nt.actualBounds);e:{for(var At=2/de,kt=4/de,Ut=0;Ut<Ae;Ut++){var fn=oe[Ut];if(fn.width!==0&&fn.height!==0&&Bt.Vu(fn.x-At,fn.y-At,fn.width+kt,fn.height+kt)){Bt=!0;break e}}Bt=!1}Bt&&ne.Oj(b,nt,this,pe,de,we,!0)}Dn.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()}Di(E),Di(a),this.ld=!1}}else this.bd();x&&(Bl(this),this.bd(),dh(this,!0))}else x?(Bl(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,de=a.viewportBounds;b=de.x;var pe=de.y,we=de.width,be=de.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 Ae=a.ku,_e=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var pt=a.documentBounds,nt=0,Bt=0,At=0,kt=0,Ut=de.width,fn=de.height,bi=a.rj;a.contentAlignment.sb()?(pt.width>Ut&&(nt=bi.left,Bt=bi.right),pt.height>fn&&(At=bi.top,kt=bi.bottom)):(nt=bi.left,Bt=bi.right,At=bi.top,kt=bi.bottom);var Xi=pt.width+nt+Bt,Wi=pt.height+At+kt;bi=a.scale;var fi=Xi>oe/bi,ti=Wi>ue/bi;if(!(z||a.gf||a.Be||fi||ti))return!0;nt=pt.x-nt,oe=de.x,Bt=pt.right+Bt,ue=de.right+ne,At=pt.y-At;var lo=de.y;pt=pt.bottom+kt,de=de.bottom+re;var $r="1px";if(kt="1px",a.scrollMode===Yd&&(fi||ti)&&(fi&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(fi=1,nt+1<oe&&(fi=Math.max((oe-nt)*bi+a.Aa,fi)),Bt>ue+1&&(fi=Math.max((Bt-ue)*bi+a.Aa,fi)),Ut+ne+1<Xi&&(fi=Math.max((Xi-Ut)*bi+a.Aa,fi)),$r=fi.toString()+"px"),ti&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(fi=1,At+1<lo&&(fi=Math.max((lo-At)*bi+a.ya,fi)),pt>de+1&&(fi=Math.max((pt-de)*bi+a.ya,fi)),fn+re+1<Wi&&(fi=Math.max((Wi-fn)*bi+a.ya,fi)),kt=fi.toString()+"px")),fi=$r!=="1px",ti=kt!=="1px",fi&&ti||!fi&&!ti||(ti&&(ue-=a.Db),fi&&(de-=a.Db),Xi<Ut+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,nt+1<oe&&(ne=Math.max((oe-nt)*bi+a.Aa,ne)),Bt>ue+1&&(ne=Math.max((Bt-ue)*bi+a.Aa,ne)),Ut+1<Xi&&(ne=Math.max((Xi-Ut)*bi+a.Aa,ne)),$r=ne.toString()+"px"),fi=$r!=="1px",ne=a.ya,fi!==a.Be&&(ne=fi?a.ya-a.Db:a.ya+a.Db),Wi<fn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,At+1<lo&&(re=Math.max((lo-At)*bi+ne,re)),pt>de+1&&(re=Math.max((pt-de)*bi+ne,re)),fn+1<Wi&&(re=Math.max((Wi-fn)*bi+ne,re)),kt=re.toString()+"px"),ti=kt!=="1px"),a.qr&&fi===a.Be&&ti===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(fi!==a.Be&&($r==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=fi,_e.style.width=$r,ti!==a.gf&&(kt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=ot.alloc(),ti?(y.style.left=a.Db+"px",a.position=re.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=re.h(a.pa.x-a.Db/a.scale,a.pa.y)),ot.free(re))),z&&Jc(a),a.gf=ti,_e.style.height=kt,a.gu=!0,z&&(a.pn=!0),y=Ae.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Ut+1<Xi?y=(a.position.x-nt)*bi:nt+1<oe?y=Ae.scrollWidth-Ae.clientWidth:Bt>ue+1&&(y=a.position.x*bi)),a.tn)switch(a.bu){case"negative":y=-(Ae.scrollWidth-y-Ae.clientWidth);break;case"reverse":y=Ae.scrollWidth-y-Ae.clientWidth}return Ae.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(fn+1<Wi?Ae.scrollTop=(a.position.y-At)*bi:At+1<lo?Ae.scrollTop=Ae.scrollHeight-Ae.clientHeight:pt>de+1&&(Ae.scrollTop=a.position.y*bi)),oe=a.Aa,ue=a.ya,Ae.style.width=oe+(a.gf?a.Db:0)+"px",Ae.style.height=ue+(a.Be?a.Db:0)+"px",x!==oe||E!==ue||a.animationManager.zb?(x=Dn.allocAt(b,pe,we,be),a.onViewportBoundsChanged(x,a.viewportBounds,bi,z),Dn.free(x),!1):!0}Be=hn.prototype,Be.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Ft("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&&Ft('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(xa,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Be.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)}),It(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()},Be.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()},Be.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(Wa,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Be.Is=function(a,y){if(y===void 0&&(y=!1),un(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 Xn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Be.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},hn.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 Ki;if(a!==null)if(un(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 Ii){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 gi)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=ot.alloc(),ne=ot.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=mi(),oe=mi(),ue=y.iterator,de=ot.alloc();ue.next();){var pe=ue.key,we=ue.value;if(pe.Zc()){var be=hg(a,pe,y);be!==null?re.push(new ie(pe,we,be)):(!b||pe.canMove())&&(be=we.point,z.assign(be),a.computeMove(pe,z.add(ne),E,de),pe.location=de,we.shifted===void 0&&(we.shifted=new ot),we.shifted.assign(de.re(be)))}else ue.key instanceof gi&&oe.push(ue.sa)}for(ot.free(de),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 ot),pe.node.location=z.add(pe.Su.shifted);for(b=ot.alloc(),ue=ot.alloc(),pe=oe.length,we=0;we<pe;we++){var Ae=oe[we];if(be=Ae.key,be instanceof gi)if(be.suspendsRouting){be.Tg=null,de=be.fromNode;var _e=be.toNode;if(a.draggedLink!==null&&E.dragsLink)if(_e=Ae.value.point,be.dragComputation===null)y.add(be,a.Pd(E,be,ne)),Yh(be,ne.x-_e.x,ne.y-_e.y);else{Ae=ot.allocAt(0,0),(de=be.i(0))&&de.w()&&Ae.assign(de);var pt=de=ot.alloc().assign(Ae).add(ne);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(pt=ot.alloc(),Gf(a,be,de,pt,E)),de.assign(be.dragComputation(be,de,pt)).re(Ae),y.add(be,a.Pd(E,be,de)),Yh(be,de.x-_e.x,de.y-_e.y),ot.free(Ae),ot.free(de),pt!==de&&ot.free(pt)}else de!==null&&(b.assign(de.location),pt=y.I(de),pt!==null&&b.re(pt.point)),_e!==null&&(ue.assign(_e.location),pt=y.I(_e),pt!==null&&ue.re(pt.point)),de!==null&&_e!==null?b.Xa(ue)?(de=Ae.value.point,_e=z,_e.assign(b),_e.re(de),y.add(be,a.Pd(E,be,b)),Yh(be,_e.x,_e.y)):(be.suspendsRouting=!1,be.bb()):(Ae=Ae.value.point,de=de!==null?b:_e!==null?ue:ne,y.add(be,a.Pd(E,be,de)),Yh(be,de.x-Ae.x,de.y-Ae.y))}else(be.fromNode===null||be.toNode===null)&&(de=Ae.value.point,y.add(be,a.Pd(E,be,ne)),Yh(be,ne.x-de.x,ne.y-de.y))}ot.free(z),ot.free(ne),ot.free(b),ot.free(ue),Di(re),Di(oe),x||(Ml(a),Vd(a,y))}}hn.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new ot),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=ot.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&&ot.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=ot.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),ot.free(z)}}function $f(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof gi&&(y.suspendsRouting=!0)}function Vd(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof gi&&(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}Be=hn.prototype,Be.Pd=function(a,y,x){if(x===void 0)return new dd(sa);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new dd(new ot(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&&Ft("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Ft("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Ft("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Ft("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&&Ft("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Be.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(xa,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Be.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(Wa,"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(xa,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Be.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(Wa,"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(xa,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Be.kA=function(a){if(a.diagram!==this&&Ft("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(Wa,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Be.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Be.Yw=function(a){return this.pf===null&&(this.pf=new Yn),this.pf.add(a),this.model.Pe(a),this},Be.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Be.Pe=function(a){return this.zg===null&&(this.zg=new Yn),this.zg.add(a),this},Be.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Be.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Aa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Be.cb=function(a,y,x,E,b,z,ne){z===void 0&&(z=null),ne===void 0&&(ne=null);var re=new fr;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)},Be.g=function(a,y,x,E,b){this.cb(_o,a,this,y,x,E,b)},hn.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===_o){var b=a.object;if(vs(b,a.propertyName,a.I(y)),b instanceof Yt){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===xa){var ne=a.object,re=a.newParam,oe=a.newValue;if(ne instanceof ci)if(typeof re=="number"&&oe instanceof Yt){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 ms){var de=a.oldParam===!0;typeof re=="number"&&oe instanceof Sr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ne.pc(de?re:-1,oe,de)):ne.oi(re,oe,de))}else ne instanceof hn?typeof re=="number"&&oe instanceof ms&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):Ft("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Wa){var pe=a.object,we=a.oldParam,be=a.oldValue;if(pe instanceof ci)typeof we=="number"&&be instanceof Yt?y?pe.Gb(we,be):pe.pc(we):typeof we=="number"&&be instanceof ol&&(be.isRow?d1(pe,we,y?be:void 0):h1(pe,we,y?be:void 0));else if(pe instanceof ms){var Ae=a.newParam===!0;typeof we=="number"&&be instanceof Sr&&(y?0>pe.Pa.indexOf(be)&&pe.oi(we,be,Ae):(be.isSelected=!1,be.isHighlighted=!1,be.Wb(),pe.pc(Ae?we:-1,be,Ae)))}else pe instanceof hn?typeof we=="number"&&be instanceof ms&&(y?(be.Xe(this),this.Wa.Gb(we,be)):this.Wa.mb(we)):Ft("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Aa&&Ft("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},hn.prototype.Ea=function(a){return this.undoManager.Ea(a)},hn.prototype.eb=function(a){return this.undoManager.eb(a)},hn.prototype.Kf=function(){return this.undoManager.Kf()},hn.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},hn.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},hn.prototype.rp=function(){this.partManager.rp()};function gg(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Jc(a),a.N(),a.Ee=!0,E.zb&&(Fl(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(Vi)&&(re=z-1):re=ue.sb()?ue.x*(z-1):z/2),isNaN(oe)&&(ue.$c()?ue.Hf(ai)?oe=0:ue.Hf(Ri)&&(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=ot.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,ot.free(z),a.Ca=x,Jc(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Ku(a,!1),E.zb&&(Fl(E)||E.ce.add(E.H,"scale",y,a.Ca))}}hn.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 jo&&(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=vi.alloc(),b=1,z=1,ne=x.O.s,re=ne.length,oe=0;oe<re;oe++){var ue=ne[oe],de=Math.abs(ue.interval);2>de||(bv(ue.figure)?z=z*de/tt.vx(z,de):b=b*de/tt.vx(b,de))}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=Dn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Dn.free(y);return}b=y.width,z=y.height,a=y.x,ne=y.y,Dn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=ot.alloc(),tt.No(a,ne,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),vi.free(E),x.part.location=y,ot.free(y)}}hn.prototype.clearSelection=function(a){a===void 0&&(a=!1);var y=this.selection;if(y.count!==0){a||this.R("ChangingSelection",y);for(var x=y.Fa(),E=x.length,b=0;b<E;b++)x[b].isSelected=!1;y.ka(),y.clear(),y.freeze(),a||this.R("ChangedSelection",y)}},hn.prototype.select=function(a){a!==null&&a.diagram===this&&(!a.isSelected||1<this.selection.count)&&(this.R("ChangingSelection",this.selection),this.clearSelection(!0),a.isSelected=!0,this.R("ChangedSelection",this.selection))},hn.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),un(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Sr||Ft("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||Ft("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},hn.prototype.clearHighlighteds=function(){var a=this.highlighteds;if(0<a.count){for(var y=a.Fa(),x=y.length,E=0;E<x;E++)y[E].isHighlighted=!1;a.ka(),a.clear(),a.freeze()}},Be=hn.prototype,Be.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Be.Jz=function(a){a=new Xn().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||Ft("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Be.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=ot.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)),ot.free(z);return}Ft("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):Ft("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),ot.free(z)},Be.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)},Be.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Be.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)},Be.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,de=y.dx,pe=y.dy,we=x*ne+E*oe+de;y=x*re+E*ue+pe;var be=b*ne+E*oe+de;return a=b*re+E*ue+pe,E=x*ne+z*oe+de,x=x*re+z*ue+pe,ne=b*ne+z*oe+de,b=b*re+z*ue+pe,z=Math.min(we,be),we=Math.max(we,be),be=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),we=Math.max(we,E),be=Math.min(be,x),y=Math.max(y,x),z=Math.min(z,ne),we=Math.max(we,ne),be=Math.min(be,b),y=Math.max(y,b),new Dn(z,be,we-z,y-be)},Be.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),Eo(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}hn.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===Aa&&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===Aa){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Ml(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||dl(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(),ks(this.animationManager)),!this.Rt&&ne&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;zn(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 Xn&&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 Xn&&x.Bg.remove(a),fp(E));break}}}}}hn.prototype.Wd=function(){this.partManager.Wd()},hn.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},hn.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},hn.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},hn.prototype.Vb=function(a){return this.partManager.Vb(a)},hn.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Be=hn.prototype,Be.Lc=function(a){return this.partManager.Lc(a)},Be.ii=function(a){return this.partManager.ii(a)},Be.Kc=function(a){return this.partManager.Kc(a)},Be.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:Fn(wr(y)))},Be.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:Fn(wr(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),Ku(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Be.Va=function(){if(this.Zi){var a=Dn.alloc();yg(this,this.computeBounds(a)),Dn.free(a)}},Be.rz=function(){for(var a=new Xn,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},Be.qz=function(){return this.ai.iterator},Be.Uz=function(a){Ml(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||Zl(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),Ml(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||dl(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),gs(a,y),b.isValidLayout=!0):a.xh=!0)}}Be.yz=function(){for(var a=new Yn,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 Yn;x.add(b,ne),x.add(z,ne),E.add(b,b),E.add(z,b)}var x=new Ki,E=new Ki;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 Kd(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Ft("Unknown DiagramEvent name: "+y)}Be.Bj=function(a,y){return a=Kd(this,a),a!==null&&a.add(y),this},Be.am=function(a,y){a=Kd(this,a),a!==null&&a.remove(y)},Be.R=function(a,y,x){var E=Kd(this,a),b=new Tr;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 Vf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Be.Yj=function(a,y){return gf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},hn.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?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=Dn.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&&Kf(a,ne,E,y)}Dn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Dn.alloc(),z=x.memberParts;z.next();)ne=z.value,ne instanceof Ii&&Kf(a,ne,E,y);Dn.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 Kf(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 Ii&&Kf(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)}hn.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():wg(this)};function wg(a){a.vk===-1&&(a.vk=zn(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=Dn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),yg(a,y),Dn.free(y),a.Fc=!0,a.bd(),wg(a))}},a.vp))}hn.prototype.ug=function(){this.vk!==-1&&(dt.clearTimeout(this.vk),this.vk=-1)},hn.prototype.computeAutoScrollPosition=function(a){var y=this.position,x=this.xp;if(0>=x.top&&0>=x.left&&0>=x.right&&0>=x.bottom)return y;var E=this.viewportBounds,b=this.scale;E=Dn.allocAt(0,0,E.width*b,E.height*b);var z=ot.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(sa)||(y=new ot(y.x+z.x/b,y.y+z.y/b)),Dn.free(E),ot.free(z),y},Be=hn.prototype,Be.Cs=function(){return null},Be.av=function(){return null},Be.bs=function(a,y){this.pj.add(a,y)},Be.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 de=+new Date;for(z=!0,ne.reset();ne.next();)if(!ne.value[0].al){z=!1;break}z||de-ue>oe?y(x,b,re):dt.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 dt.requestAnimationFrame(function(){E()}),null}Be.Wz=function(a){return As?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Be.Jx=function(a){return a===void 0&&(a={}),Ph(this,this.Xz,a)},Be.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"&&Ft('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"&&Ft("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 vi(1/0,1/0):new vi(2e3,2e3));var re=y.position||null,oe=y.parts||null,ue=y.padding===void 0?1:y.padding,de=y.background||null,pe=y.omitTemporary;pe===void 0&&(pe=!0);var we=y.document||document,be=y.elementFinished||null,Ae=y.showTemporary;Ae===void 0&&(Ae=!pe),y=y.showGrid,y===void 0&&(y=Ae),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof ue=="number"?ue=new dr(ue):ue instanceof dr||Ft("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 Gl(null,we,void 0,!0);var _e=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=be,Js(a,E.context,ue,new vi(pe.width,pe.height),a.Ca,a.pa,oe,de,Ae,y),E.context):(a.Xm=!1,Js(a,_e,ue,new vi(pe.width,pe.height),a.Ca,a.pa,oe,de,Ae,y),a.Xm=!0,pe.context);var pt=a.Pp,nt=a.documentBounds.copy();if(nt.Fv(a.yb),Ae)for(var Bt=a.Wa.s,At=Bt.length,kt=0;kt<At;kt++){var Ut=Bt[kt];if(Ut.visible&&Ut.isTemporary){Ut=Ut.Pa.s;for(var fn=Ut.length,bi=0;bi<fn;bi++){var Xi=Ut[bi];Xi.isInDocumentBounds&&Xi.isVisible()&&(Xi=Xi.actualBounds,Xi.w()&&nt.ed(Xi))}}}if(Bt=new ot(nt.x,nt.y),oe!==null){for(At=new Dn(0,0,0,0),kt=!0,Ut=oe.iterator,Ut.reset();Ut.next();)fn=Ut.value,fn instanceof Sr&&(bi=fn.layer,bi!==null&&!bi.visible||bi!==null&&!Ae&&bi.isTemporary||!fn.isVisible()||(fn=fn.actualBounds,fn.w()&&(kt?(kt=!1,At.assign(fn)):At.ed(fn))));nt.width=At.width,nt.height=At.height,Bt.x=At.x,Bt.y=At.y}return re!==null&&re.w()&&(Bt=re,z||(z=pt)),At=re=0,ue!==null&&(re=ue.left+ue.right,At=ue.top+ue.bottom),kt=Ut=0,b!==null&&(Ut=b.width,kt=b.height,isFinite(Ut)&&(Ut=Math.max(0,Ut-re)),isFinite(kt)&&(kt=Math.max(0,kt-At))),b!==null&&z!==null?(z==="NaN"&&(z=pt),b.w()?(b=Ut,nt=kt):isNaN(kt)?(b=Ut,nt=nt.height*z):(b=nt.width*z,nt=kt)):b!==null?b.w()?(z=Math.min(Ut/nt.width,kt/nt.height),b=Ut,nt=kt):isNaN(kt)?(z=Ut/nt.width,b=Ut,nt=nt.height*z):(z=kt/nt.height,b=nt.width*z,nt=kt):z!==null?z==="NaN"&&ne.w()?(z=Math.min((ne.width-re)/nt.width,(ne.height-At)/nt.height),z>pt?(z=pt,b=nt.width,nt=nt.height):(b=ne.width,nt=ne.height)):(b=nt.width*z,nt=nt.height*z):(z=pt,b=nt.width,nt=nt.height),ue!==null?(b+=re,nt+=At):ue=new dr(0),ne!==null&&(pt=ne.width,ne=ne.height,isNaN(pt)&&(pt=2e3),isNaN(ne)&&(ne=2e3),isFinite(pt)&&(b=Math.min(b,pt)),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=be,Js(a,E.context,ue,new vi(Math.ceil(b),Math.ceil(nt)),z,Bt,oe,de,Ae,y),E.context):(a.Xm=!1,Js(a,_e,ue,new vi(Math.ceil(b),Math.ceil(nt)),z,Bt,oe,de,Ae,y),a.Xm=!0,pe.context)}Qe.Object.defineProperties(hn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof xe||(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 Jo(this,dt.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 Jo(this,dt.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(dt,"resize",this.Ov,!1),this.removeEventListener(dt,"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)&&Kn(a,"0 <= value <= 1",hn,"opacity"),this.pb=a,this.g("opacity",y,a),this.N())}},validCycle:{get:function(){return this.wu},set:function(a){var y=this.wu;y!==a&&(this.wu=a,this.g("validCycle",y,a))}},layers:{get:function(){return this.Wa.iterator}},isModelReadOnly:{get:function(){var a=this.cc;return a===null?!1:a.isReadOnly},set:function(a){var y=this.cc;y!==null&&(y.isReadOnly=a)}},isReadOnly:{get:function(){return this.Gg},set:function(a){var y=this.Gg;y!==a&&(this.Gg=a,this.g("isReadOnly",y,a))}},isEnabled:{get:function(){return this.Jd},set:function(a){var y=this.Jd;y!==a&&(this.Jd=a,this.g("isEnabled",y,a))}},allowClipboard:{get:function(){return this.Us},set:function(a){var y=this.Us;y!==a&&(this.Us=a,this.g("allowClipboard",y,a))}},allowCopy:{get:function(){return this.Fi},set:function(a){var y=this.Fi;y!==a&&(this.Fi=a,this.g("allowCopy",y,a))}},allowDelete:{get:function(){return this.Gi},set:function(a){var y=this.Gi;y!==a&&(this.Gi=a,this.g("allowDelete",y,a))}},allowDragOut:{get:function(){return this.Vs},set:function(a){var y=this.Vs;y!==a&&(this.Vs=a,this.g("allowDragOut",y,a))}},allowDrop:{get:function(){return this.Ws},set:function(a){var y=this.Ws;y!==a&&(this.Ws=a,this.g("allowDrop",y,a))}},allowTextEdit:{get:function(){return this.Pi},set:function(a){var y=this.Pi;y!==a&&(this.Pi=a,this.g("allowTextEdit",y,a))}},allowGroup:{get:function(){return this.Hi},set:function(a){var y=this.Hi;y!==a&&(this.Hi=a,this.g("allowGroup",y,a))}},allowUngroup:{get:function(){return this.Qi},set:function(a){var y=this.Qi;y!==a&&(this.Qi=a,this.g("allowUngroup",y,a))}},allowInsert:{get:function(){return this.Ys},set:function(a){var y=this.Ys;y!==a&&(this.Ys=a,this.g("allowInsert",y,a))}},allowLink:{get:function(){return this.Ii},set:function(a){var y=this.Ii;y!==a&&(this.Ii=a,this.g("allowLink",y,a))}},allowRelink:{get:function(){return this.Ki},set:function(a){var y=this.Ki;y!==a&&(this.Ki=a,this.g("allowRelink",y,a))}},allowMove:{get:function(){return this.Ji},set:function(a){var y=this.Ji;y!==a&&(this.Ji=a,this.g("allowMove",y,a))}},allowReshape:{get:function(){return this.Li},set:function(a){var y=this.Li;y!==a&&(this.Li=a,this.g("allowReshape",y,a))}},allowResize:{get:function(){return this.Mi},set:function(a){var y=this.Mi;y!==a&&(this.Mi=a,this.g("allowResize",y,a))}},allowRotate:{get:function(){return this.Ni},set:function(a){var y=this.Ni;y!==a&&(this.Ni=a,this.g("allowRotate",y,a))}},allowSelect:{get:function(){return this.Oi},set:function(a){var y=this.Oi;y!==a&&(this.Oi=a,this.g("allowSelect",y,a))}},allowUndo:{get:function(){return this.Zs},set:function(a){var y=this.Zs;y!==a&&(this.Zs=a,this.g("allowUndo",y,a))}},allowZoom:{get:function(){return this.at},set:function(a){var y=this.at;y!==a&&(this.at=a,this.g("allowZoom",y,a))}},hasVerticalScrollbar:{get:function(){return this.nn},set:function(a){var y=this.nn;y!==a&&(this.nn=a,this.Ee=!0,this.N(),this.g("hasVerticalScrollbar",y,a),Ku(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),Ku(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),Ku(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),Ku(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Kn(a,">= 0",hn,"scrollHorizontalLineChange"),this.iu=a,this.g("scrollHorizontalLineChange",y,a))}},scrollVerticalLineChange:{get:function(){return this.mu},set:function(a){var y=this.mu;y!==a&&(0>a&&Kn(a,">= 0",hn,"scrollVerticalLineChange"),this.mu=a,this.g("scrollVerticalLineChange",y,a))}},lastInput:{get:function(){return this.cj},set:function(a){this.cj=a}},previousInput:{get:function(){return this.Qg},set:function(a){this.Qg=a}},firstInput:{get:function(){return this.bq},set:function(a){this.bq=a}},currentCursor:{get:function(){return this.it},set:function(a){if(a===""&&(a=this.Op),this.it!==a){var y=this.ta,x=this.Ka;if(y!==null&&x!==null){this.it=a;var 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 Kn(a,">= 0",hn,"maxSelectionCount")}},nodeSelectionAdornmentTemplate:{get:function(){return this.St},set:function(a){var y=this.St;y!==a&&(this.St=a,this.g("nodeSelectionAdornmentTemplate",y,a))}},groupSelectionAdornmentTemplate:{get:function(){return this.wt},set:function(a){var y=this.wt;y!==a&&(this.wt=a,this.g("groupSelectionAdornmentTemplate",y,a))}},linkSelectionAdornmentTemplate:{get:function(){return this.Kt},set:function(a){var y=this.Kt;y!==a&&(this.Kt=a,this.g("linkSelectionAdornmentTemplate",y,a))}},highlighteds:{get:function(){return this.nw}},isModified:{get:function(){var a=this.undoManager;return a.isEnabled?a.currentTransaction!==null?!0:this.rn&&this.Ce!==a.historyIndex:this.rn},set:function(a){if(this.rn!==a){this.rn=a;var y=this.undoManager;!a&&y.isEnabled&&(this.Ce=y.historyIndex),a||pg(this)}}},model:{get:function(){return this.cc},set:function(a){var y=this.cc;if(y!==a){this.currentTool.doCancel(),y&&y.undoManager!==a.undoManager&&y.undoManager.isInTransaction&&Ft("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,Zl(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(dt,"pointermove",this.dk,!0),this.addEventListener(dt,"pointerdown",this.ui,!0),this.addEventListener(dt,"pointerup",this.fk,!0),this.addEventListener(dt,"pointerout",this.ek,!0),this.addEventListener(dt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(dt,"wheel",this.$j,!0),this.addEventListener(dt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(dt,"pointermove",this.dk,!0),this.removeEventListener(dt,"pointerdown",this.ui,!0),this.removeEventListener(dt,"pointerup",this.fk,!0),this.removeEventListener(dt,"pointerout",this.ek,!0),this.removeEventListener(dt,"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(dt,"wheel",this.$j,!0),this.removeEventListener(dt,"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=ot.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),pl(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)}ot.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!==ci.Grid&&Ft("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||Ft("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 dr(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&&Ku(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,Ku(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&&Ku(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()||Ft("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()||Ft("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)):Kn(a,"> 0",hn,"minScale"))}},maxScale:{get:function(){return this.Mt},set:function(a){var y=this.Mt;y!==a&&(0<a?(this.Mt=a,this.g("maxScale",y,a),a<this.scale&&(this.scale=a)):Kn(a,"> 0",hn,"maxScale"))}},zoomPoint:{get:function(){return this.zu},set:function(a){this.zu.D(a)||(this.zu=a=a.J())}},contentAlignment:{get:function(){return this.zk},set:function(a){var y=this.zk;y.D(a)||(this.zk=a=a.J(),this.g("contentAlignment",y,a),Ku(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 dr(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&&Ft("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!==Vs&&a!==Ch&&Ft("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 vi(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 dr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Qe.Object.defineProperties(hn,{licenseKey:{get:function(){return Mg.jc()},set:function(a){Mg.add(a.replace(/\s/g,""))}},version:{get:function(){return Xd}}}),hn.prototype.makeImageData=hn.prototype.Jx,hn.prototype.makeImage=hn.prototype.Wz,hn.prototype.cacheGroupExternalLinks=hn.prototype.Fu,hn.prototype.addRenderer=hn.prototype.bs,hn.prototype.makeSVG=hn.prototype.av,hn.prototype.makeSvg=hn.prototype.Cs,hn.prototype.stopAutoScroll=hn.prototype.ug,hn.prototype.doAutoScroll=hn.prototype.gs,hn.prototype.isUnoccupied=hn.prototype.Yj,hn.prototype.raiseDiagramEvent=hn.prototype.R,hn.prototype.removeDiagramListener=hn.prototype.am,hn.prototype.addDiagramListener=hn.prototype.Bj,hn.prototype.findTreeRoots=hn.prototype.yz,hn.prototype.layoutDiagram=hn.prototype.Uz,hn.prototype.findTopLevelGroups=hn.prototype.qz,hn.prototype.findTopLevelNodesAndLinks=hn.prototype.rz,hn.prototype.ensureBounds=hn.prototype.Va,hn.prototype.findLinksByExample=hn.prototype.ls,hn.prototype.findNodesByExample=hn.prototype.ms,hn.prototype.findLinkForData=hn.prototype.Kc,hn.prototype.findNodeForData=hn.prototype.ii,hn.prototype.findPartForData=hn.prototype.Lc,hn.prototype.findLinkForKey=hn.prototype.findLinkForKey,hn.prototype.findNodeForKey=hn.prototype.Vb,hn.prototype.findPartForKey=hn.prototype.findPartForKey,hn.prototype.rebuildParts=hn.prototype.Wd,hn.prototype.transformViewToDoc=hn.prototype.Ps,hn.prototype.transformRectDocToView=hn.prototype.zA,hn.prototype.transformDocToView=hn.prototype.op,hn.prototype.centerRect=hn.prototype.es,hn.prototype.scrollToRect=hn.prototype.tv,hn.prototype.scroll=hn.prototype.scroll,hn.prototype.highlightCollection=hn.prototype.Jz,hn.prototype.highlight=hn.prototype.Iz,hn.prototype.selectCollection=hn.prototype.rA,hn.prototype.select=hn.prototype.select,hn.prototype.updateAllRelationshipsFromData=hn.prototype.rp,hn.prototype.updateAllTargetBindings=hn.prototype.updateAllTargetBindings,hn.prototype.commit=hn.prototype.commit,hn.prototype.rollbackTransaction=hn.prototype.Kf,hn.prototype.commitTransaction=hn.prototype.eb,hn.prototype.startTransaction=hn.prototype.Ea,hn.prototype.raiseChanged=hn.prototype.g,hn.prototype.raiseChangedEvent=hn.prototype.cb,hn.prototype.removeChangedListener=hn.prototype.ik,hn.prototype.addChangedListener=hn.prototype.Pe,hn.prototype.removeModelChangedListener=hn.prototype.mA,hn.prototype.addModelChangedListener=hn.prototype.Yw,hn.prototype.findLayer=hn.prototype.Qj,hn.prototype.removeLayer=hn.prototype.kA,hn.prototype.addLayerAfter=hn.prototype.Cy,hn.prototype.addLayerBefore=hn.prototype.Ww,hn.prototype.addLayer=hn.prototype.Al,hn.prototype.moveParts=hn.prototype.moveParts,hn.prototype.copyParts=hn.prototype.Kj,hn.prototype.removeParts=hn.prototype.Is,hn.prototype.remove=hn.prototype.remove,hn.prototype.add=hn.prototype.add,hn.prototype.clearDelayedGeometries=hn.prototype.bx,hn.prototype.setProperties=hn.prototype.nm,hn.prototype.attach=hn.prototype.Du,hn.prototype.set=hn.prototype.set,hn.prototype.resetInputOptions=hn.prototype.Sx,hn.prototype.setInputOption=hn.prototype.sA,hn.prototype.getInputOption=hn.prototype.Ql,hn.prototype.resetRenderingHints=hn.prototype.Tx,hn.prototype.setRenderingHint=hn.prototype.Xx,hn.prototype.getRenderingHint=hn.prototype.Gf,hn.prototype.maybeUpdate=hn.prototype.bd,hn.prototype.requestUpdate=hn.prototype.$b,hn.prototype.delayInitialization=hn.prototype.Xy,hn.prototype.isUpdateRequested=hn.prototype.Pz,hn.prototype.invalidateDocumentBounds=hn.prototype.Ya,hn.prototype.findObjectsNear=hn.prototype.og,hn.prototype.findPartsNear=hn.prototype.mz,hn.prototype.findObjectsIn=hn.prototype.Cf,hn.prototype.findPartsIn=hn.prototype.ux,hn.prototype.findObjectsAt=hn.prototype.ji,hn.prototype.findPartsAt=hn.prototype.lz,hn.prototype.findObjectAt=hn.prototype.ic,hn.prototype.findPartAt=hn.prototype.Ol,hn.prototype.focusObject=hn.prototype.zz,hn.prototype.alignDocument=hn.prototype.Jy,hn.prototype.zoomToRect=hn.prototype.BA,hn.prototype.zoomToFit=hn.prototype.zoomToFit,hn.prototype.diagramScroll=hn.prototype.kx,hn.prototype.focus=hn.prototype.focus;var Uf=new Ki,np=null,As=dt.document!==void 0,Zh=null,Ud="",iu=new Mn(hn,"None",0),Ru=new Mn(hn,"Uniform",1),Hh=new Mn(hn,"UniformToFill",2),wh=new Mn(hn,"CycleAll",10),Cg=new Mn(hn,"CycleNotDirected",11),Eg=new Mn(hn,"CycleNotDirectedFast",12),bg=new Mn(hn,"CycleNotUndirected",13),Fg=new Mn(hn,"CycleDestinationTree",14),Bg=new Mn(hn,"CycleSourceTree",15),Yd=new Mn(hn,"DocumentScroll",1),pf=new Mn(hn,"InfiniteScroll",2),Ld=new Mn(hn,"TreeParentCollapsed",21),Vs=new Mn(hn,"AllParentsCollapsed",22),Ch=new Mn(hn,"AnyParentsCollapsed",23),Mg=new Yn,Xd="2.3.10",Eh="image",mf=null,ip=!1;function Yl(){if(As){var a=dt.document.createElement("canvas"),y=a.getContext("2d"),x=jn("7ca11abfd022028846");y[x]=jn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",nn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Jt.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",tt.za],b=1;5>b;b++)y[jn("7ca11abfd7330390")](jn(E[b-1]),10,15*b);for(y[x]=jn("39f046ebb36e4b"),x=1;5>x;x++)y[jn("7ca11abfd7330390")](jn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Jt.prototype.Cd=Jt.prototype.Eu),mf=a}}hn.className="Diagram",hn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=dt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof hn?y.H:null},hn.inherit=function(a,y){function x(){}if(Object.getPrototypeOf(a).prototype)throw Error(`Used go.Diagram.inherit defining already defined class
`+a);x.prototype=y.prototype,a.prototype=new x,a.prototype.constructor=a},hn.useDOM=function(a){As=a?dt.document!==void 0:!1},hn.isUsingDOM=function(){return As},hn.None=iu,hn.Uniform=Ru,hn.UniformToFill=Hh,hn.CycleAll=wh,hn.CycleNotDirected=Cg,hn.CycleNotDirectedFast=Eg,hn.CycleNotUndirected=bg,hn.CycleDestinationTree=Fg,hn.CycleSourceTree=Bg,hn.DocumentScroll=Yd,hn.InfiniteScroll=pf,hn.TreeParentCollapsed=Ld,hn.AllParentsCollapsed=Vs,hn.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=dt[jn("76a715b2f73f148a")][jn("72ba13b5")]||"";if(a.Rc=!0,As){var E=hn[jn("76a115b6ed251eaf4692")];if(E)for(var b=Mg.iterator;b.next()&&(E=b.value,E=jn(E).split(jn("39e9")),!(6>E.length));){var z=jn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ne=jn(nn[jn("6cae19")]).split(".");if(z[0]>ne[0]||z[0]===ne[0]&&z[1]>=ne[1]){var re=dt[jn("74a900bae4370f8b51")][jn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=re[jn("73a612b6fb191d")](jn("3aad1ab6e022098b4dc4")),z=jn(E[2]),-1<ne&&(re=re[jn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ne),!a.Rc))break;for(ne=x[jn("76ad18b4f73e")],re=x[jn("73a612b6fb191d")](jn("35e7"))+2;re<ne;re++)y+=x[re];if(ne=y[jn("73a612b6fb191d")](z),0>ne&&z!==jn("7da71ca0ad381e90")&&(ne=y[jn("73a612b6fb191d")](jn("76a715b2ef3e149757"))),0>ne&&(ne=y[jn("73a612b6fb191d")](jn("76a715b2ef3e149757"))),0>ne&&(ne=y[jn("73a612b6fb191d")](jn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[jn("73a612b6fb191d")](jn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[jn("73a612b6fb191d")](jn("35"))||y[jn("73a612b6fb191d")](jn("35"))===-1),!a.Rc||x[jn("73a612b6fb191d")](jn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[jn("73a612b6fb191d")](z)),!a.Rc)||(ne=dt[jn("76a715b2f73f148a")][jn("69ad17a1e03e")],re=ne[jn("73a612b6fb191d")](jn("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ne[jn("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ne=dt.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[jn("79a417a0f0181a8946")]=E,dt.document[jn("78a712aa")]){dt.document[jn("78a712aa")][jn("7bb806b6ed32388c4a875b")](ne),oe=dt.getComputedStyle(ne).getPropertyValue(jn("78a704b7e62456904c9b12701b6532a8"));var ue=dt.getComputedStyle(ne).getPropertyValue(jn("75b817b0ea2202"));if(dt.document[jn("78a712aa")][jn("68ad1bbcf533388c4a875b")](ne),oe){if(ne=dt[jn("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(jn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ne=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var de in ne)if(E===ne[de].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(de=x[jn("76ad18b4f73e")],b=x[jn("73a612b6fb191d")](jn("35e7"))+2;b<de;b++)y+=x[b];x=y[jn("73a612b6fb191d")](jn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[jn("73a612b6fb191d")](jn("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function dd(a){this.j=a===void 0?new ot:a,this.o=new ot}Qe.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 vi(NaN,NaN).freeze(),this.gridSnapCellSpot=Us,this.gridSnapOrigin=new ot(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"||dt.Element&&a instanceof Element)var x=hn.call(this,a)||this;else x=hn.call(this)||this,y=a;return fe(x),y&&x.nm(y),x}Vt(ge,hn);function fe(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=$l,a.layout=new Rl}ge.prototype.reset=function(){hn.prototype.reset.call(this),fe(this)},ge.className="Palette";function xe(a,y){if(typeof a=="string"||dt.Element&&a instanceof Element)var x=hn.call(this,a)||this;else x=hn.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 dr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new vt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ne=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new ot(re.x-ne.width/2,re.y-ne.height/2)}},x.Pf=function(){E.Ya(),Je(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&&Je(E)},x.autoScale=Ru,x.vb=!1,y&&Object.assign(x,y),x}Vt(xe,hn),xe.prototype.computePixelRatio=function(){return 1},xe.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 Gl(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),ke(this)}finally{this.ta=a,this.ib=y}}}hn.prototype.redraw.call(this)},xe.prototype.gc=function(){if(this.Ka===null&&Ft("No div specified"),this.ta===null&&Ft("No canvas specified"),!(this.ta instanceof Jo)&&($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?ke(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 ke(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=Dn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Xc(y,b),Dn.free(b),Ml(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=yl(re,b),ue.gc(b,oe),b.globalAlpha=re);else{for(var de=yl(re,b),pe=oe.scale,we=Dn.alloc(),be=re.Pa.s,Ae=be.length,_e=0;_e<Ae;_e++){var pt=be[_e];(E||pt!==ue)&&re.Oj(b,pt,oe,null,pe,we,!1)}Dn.free(we),b.globalAlpha=de}}}}}function Je(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=vi.alloc();b.h(x.width,x.height),E.desiredSize=b,vi.free(b),a=2/a.scale,E instanceof Co&&(E.strokeWidth=a),y.location=new ot(x.x-a/2,x.y-a/2),y.isSelected=!0}}}xe.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Do;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},xe.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},xe.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Je(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))},Qe.Object.defineProperties(xe.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof xe&&Ft("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),Je(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),Je(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)}}}),xe.className="Overview";function vt(){as.call(this),this.j=null}Vt(vt,as),vt.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 ot(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new ot(a.x-this.j.x,a.y-this.j.y)),!0)},vt.prototype.doActivate=function(){this.j=null,as.prototype.doActivate.call(this)},vt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},vt.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 ot(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new ot(a.x-this.j.x,a.y-this.j.y)}}},vt.className="OverviewDraggingTool";function gt(){Ao(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=Do,this.hb=!0,this.cg=null,this.ob=200}gt.prototype.toString=function(){return"CommandHandler"},gt.prototype.Xe=function(a){this.H=a},gt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=Wr?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()},gt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},gt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof jo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},gt.prototype.canStopCommand=function(){return!0},gt.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=""}},gt.prototype.canSelectAll=function(){return this.diagram.allowSelect},gt.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 Xn,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=""}},gt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},gt.prototype.copySelection=function(){var a=this.diagram,y=new Xn;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)},gt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},gt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},gt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},gt.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 Yn,x.addAll(z),Zh=x,Ud=y.model.dataFormat}}y.R("ClipboardChanged",x)},gt.prototype.pasteFromClipboard=function(){var a=new Xn,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},gt.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 ot(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=""}},gt.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)},gt.prototype.undo=function(){this.diagram.undoManager.undo()},gt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},gt.prototype.redo=function(){this.diagram.undoManager.redo()},gt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},gt.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))},gt.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)},gt.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))},gt.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)},gt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},gt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},gt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Zl(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=Do):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),dl(y)},gt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},gt.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;Zl(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 Ii&&oe.isTreeExpanded&&(!(oe instanceof ho)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof Sr&&y.tv(oe.actualBounds),oe instanceof Ii&&!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(){zn(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 gi){var E=y.fromNode;E!==null&&jt(a,E,x),y=y.toNode,y!==null&&jt(a,y,x)}else y instanceof Ii&&(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}gt.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)},gt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Zl(y.animationManager,"Collapse Tree");var x=new Yn;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 Ii&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},gt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Ii&&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 Ii&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},gt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Zl(y.animationManager,"Expand Tree");var x=new Yn;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 Ii&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},gt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Ii)||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 Ii&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},gt.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 Yn,z=a.selection.iterator;z.next();){var ne=z.value;ne.Zc()&&ne.canGroup()&&b.add(ne)}for(var re=new Yn,oe=b.iterator;oe.next();){var ue=oe.value;z=!1;for(var de=b.iterator;de.next();)if(ue.Td(de.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 be=y.copyNodeData(x);En(be)&&(y.xf(be),E=a.ii(be))}if(E!==null){pe!==null&&this.isValidMember(pe,E)&&(E.containingGroup=pe);for(var Ae=re.iterator;Ae.next();){var _e=Ae.value;this.isValidMember(E,_e)&&(_e.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},gt.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 In(a){var y=mi();for(a=a.iterator;a.next();){var x=a.value;x instanceof gi||y.push(x)}a=new Xn,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,ne=0;ne<x;ne++)if(b.Td(y[ne])){z=!1;break}z&&a.add(b)}return Di(y),a}gt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof gi)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},gt.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 Yn;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 Yn;if(0<E.count){y.clearSelection(!0);for(var re=E.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var ue=oe.containingGroup,de=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 gi)){var be=we.data;be!==null?x.mp(be,de):we.containingGroup=ue}}y.remove(oe)}}y.R("SelectionUngrouped",E,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},gt.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},gt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=In(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},gt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Zl(y.animationManager,"Collapse SubGraph");var x=new Yn;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")}},gt.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},gt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Zl(y.animationManager,"Expand SubGraph");var x=new Yn;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")}},gt.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},gt.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 es&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},gt.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 es))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 es&&x.editable}),a!==null))return!0;return!1},gt.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 Yt?b=a.ga(Oo):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new ot(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,Ka(x,!1,a)}},gt.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)},gt.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 Ki,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 gi&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Qe.Object.defineProperties(gt.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||Ft("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}}}),gt.className="CommandHandler",Zd=function(){return new gt};function Yt(){Ao(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new ot(NaN,NaN).freeze(),this.jd=Qa,this.Ab=new Jt,this.wh=new Jt,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=sl,this.uc=new Dn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Dn(NaN,NaN,NaN,NaN).freeze(),this.dc=new Dn(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 si,ri,er,cr,Fr,so,Zo,Bo,ea,_a;Yt.prototype.cloneProtected=function(a){a.l=this.l|6144,a.pb=this.pb,a.bn=this.bn,a.Ma=this.Ma,a.pa.assign(this.pa),a.jd=this.jd.J(),this.Lb!==null?a.Lb=this.Lb.copy():a.Lb=null,a.Ca=this.Ca,a.Kb=this.Kb,a.Kg=this.Kg.J(),a.uc.assign(this.uc),a.Ib.assign(this.Ib),a.dc.assign(this.dc),a.Yn=this.Yn,this.ba!==null&&(a.ba=this.ba.copy()),a.Jb=this.Jb.J(),a.sk=this.sk.J(),a.io=this.io,a.Ag=this.Ag,this.Ua!==null&&(a.Ua=this.Ua.copy()),this.A!==null&&(a.A=this.A.nc?this.A:this.A.copy()),this.Dh!==null&&(a.Dh=bn(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Yt.prototype.Vw=function(a){var y=this.Dh;if(un(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Yt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Yt.prototype.clone=function(){var a=new this.constructor;if(this.cloneProtected(a),this.Dh!==null)for(var y=0;y<this.Dh.length;y++){var x=this.Dh[y];a[x]=this[x]}return a},Yt.prototype.copy=function(){return this.clone()},Be=Yt.prototype,Be.qb=function(a){a.classType===gi?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Ft("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Yt&&(this.stretch=a)},Be.toString=function(){return Ai(this.constructor)+"#"+nr(this)},Be.th=function(){this.A!==null&&(this.A.nc=!0)};function Mo(a){a.A===null?a.A=new Gr:a.A.nc&&(a.A=a.A.copy())}Be.Xc=function(){if(this.ba===null){var a=new yo;a.Xi=Cs,a.yj=Cs,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Be.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===_o&&Se(this)&&rs(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 Ki),ne=z.undoManager.transactionLevel===0,a.startCondition===vl?ne=!0:a.startCondition===Xs&&(ne=!1),ne?(z=new Ns,ws(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()):(Zl(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof ci&&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 ci&&Jf(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function rs(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))}}Be.ks=function(a){return this.bindingId===a?this:null},Be.g=function(a,y,x){this.cb(_o,a,this,y,x)},Be.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 Jt);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))}Be.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?Na(a.x,a.y,0,0,0,E.height)<=y||Na(a.x,a.y,0,E.height,E.width,E.height)<=y||Na(a.x,a.y,E.width,E.height,E.width,0)<=y||Na(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},Be.se=function(){return!0},Be.ca=function(a){var y=ot.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return ot.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=Ba(x.x-ne*oe,x.y-ne*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),ot.free(y),a}return b=!1,(this instanceof pa||this instanceof Co?Ba(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)),ot.free(y),b},Be.gh=function(a){var y=this.naturalBounds;return Ba(0,0,y.width,y.height,a.x,a.y)},Be.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Dn.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=ot.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)))),ot.free(b),Dn.free(y),E},Be.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=ot.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)))),ot.free(b),E},Be.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=ot.allocAt(0,0),b=ot.allocAt(0,x.height),z=ot.allocAt(x.width,x.height),ne=ot.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=Dn.allocAt(0,0,x.width,x.height);var oe=ot.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)))),ot.free(oe),Dn.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 ot.free(E),ot.free(b),ot.free(z),ot.free(ne),re},Be.ga=function(a,y){if(y===void 0&&(y=new ot),a instanceof Ji){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},Be.mi=function(a){a===void 0&&(a=new Dn);var y=this.naturalBounds,x=this.oe,E=ot.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),ps(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),ps(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),ps(a,E.x,E.y,0,0),ot.free(E),a},Be.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},Be.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Be.qs=function(a,y){return y===void 0&&(y=new ot),y.assign(a),this.oe.Cd(y),y},Be.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Be.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,de=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*de+we,y=x*re+E*ue+pe,x=x*oe+E*de+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)},Yt.prototype.measure=function(a,y,x,E){if(St(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 ci;switch(fu(this,!0)){case ri:ne=b=0,re&&(y=a=1/0);break;case si: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 Fr: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()||Ft("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),xt(this,!1)}},Yt.prototype.Wl=function(){},Yt.prototype.Dd=function(){return!1},Yt.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Dn.alloc();z.assign(this.Ib),this.Ib.ka(),It(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 es&&(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()||Ft("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Zt(this,!1),Dn.free(z)},Be=Yt.prototype,Be.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=ri),y){case ri:(x>E||z>b)&&(xt(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case si:xt(a,!0),a.measure(E,b,0,0);break;case cr:xt(a,!0),a.measure(E,z,0,0);break;case Fr:xt(a,!0),a.measure(x,b,0,0)}}}Be.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(),Ol(a,y)||(x.oh(),this.Pn(x)))},Be.Pn=function(a){this.portId!==null&&(Uv(a,!0),a instanceof Ii&&G1(a,this))},Be.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 ci&&$h(this),ne=this.Ib;if(z){var re=this.Ib,oe=this.dc,ue=this.areaBackground,de=this.Ma;ue===null&&de===null||a.yc(),ue!==null&&(Ds(this,a,ue,!0,!0,oe,re),ue instanceof ha&&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)),de!==null&&(Ds(this,a,de,!0,!1,oe,re),de instanceof ha&&de.type===Nc?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(de)):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&&Sl(this),ue=this.part,oe=!1;var pe=0;ue&&y.Gf("drawShadows")&&(oe=ue.isShadowed)&&(de=ue.shadowOffset,pe=Math.max(de.y,de.x)*y.scale*y.Mb),de=this.Dd();var we;if(!(we=y.$i||!de)){var be=this.naturalBounds;we=this.wh;var Ae=we.m11,_e=we.m21,pt=we.dx,nt=we.m12,Bt=we.m22,At=we.dy,kt,Ut=kt=0;we=kt*Ae+Ut*_e+pt;var fn=kt*nt+Ut*Bt+At;kt=be.width+pe,Ut=0;var bi=kt*Ae+Ut*_e+pt;kt=kt*nt+Ut*Bt+At,Ut=Math.min(we,bi);var Xi=Math.min(fn,kt),Wi=Math.max(we+0,bi)-Ut,fi=Math.max(fn+0,kt)-Xi;we=Ut,fn=Xi,kt=be.width+pe,Ut=be.height+pe,bi=kt*Ae+Ut*_e+pt,kt=kt*nt+Ut*Bt+At,Ut=Math.min(we,bi),Xi=Math.min(fn,kt),Wi=Math.max(we+Wi,bi)-Ut,fi=Math.max(fn+fi,kt)-Xi,we=Ut,fn=Xi,kt=0,Ut=be.height+pe,bi=kt*Ae+Ut*_e+pt,kt=kt*nt+Ut*Bt+At,Ut=Math.min(we,bi),Xi=Math.min(fn,kt),Wi=Math.max(we+Wi,bi)-Ut,fi=Math.max(fn+fi,kt)-Xi,we=Ut,fn=Xi,pe=y.viewportBounds,be=pe.x,Ae=pe.y,we=!(we>pe.width+be||be>Wi+we||fn>pe.height+Ae||Ae>fi+fn)}if(we){if(we=(this.l&256)!==0,a.clipInsteadOfFill&&(we=!1),this instanceof es&&(a.font=this.font),we){if(fn=re.se()?re.naturalBounds:re.actualBounds,Wi=Math.max(ne.x,fn.x),fi=Math.max(ne.y,fn.y),pe=Math.min(ne.right,fn.right)-Wi,be=Math.min(ne.bottom,fn.bottom)-fi,Ae=this.tb,Ae!==null&&(Wi=Ae.x,fi=Ae.y,pe=Ae.width,be=Ae.height),Wi>ne.width+ne.x||ne.x>fn.width+fn.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Wi,fi,pe,be),a.clip()}if(de){if(!ue.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}oe&&(fn=ue.shadowOffset,a.Ev(fn.x*y.scale*this.scale*y.Mb,fn.y*y.scale*this.scale*y.Mb,ue.shadowBlur),Il(a),a.shadowColor=ue.shadowColor)}oe&&this.shadowVisible===!0?Il(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&&xl(this,re)&&this.shadowVisible===null&&gu(a),this.Ma!==null&&(a.yc(),wu(this,a,ue,ne)),oe&&(this.Ma!==null||this.areaBackground!==null||xl(this,re))?(Pc(this,!0),this.shadowVisible===null&&gu(a)):Pc(this,!1),this.hh(a,y),oe&&this.l&512&&Il(a),de&&oe&&gu(a),we&&(a.restore(),a.Vc(this instanceof ci)),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 xl(a,y){return y===null?!1:($h(y)&&(y=y.panel),(y.l&512)!==0||(y.type===ci.Auto||y.type===ci.Spot)&&y.Pb()!==a)}Be.Dv=function(){};function Uu(a,y,x,E){Ds(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof ha&&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;Ds(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof ha&&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 Xl(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===ci.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 Ia))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&&Xl(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),Il(y),y.shadowColor=a.shadowColor}a instanceof es&&(y.font=a.font),y.yd=null;var ne=a.transform;z=a instanceof ci;var re=a instanceof ci?$h(a):!1;a.l&4096&&Sl(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&&Il(y),re&&a.shadowVisible===!0?Il(y):re&&a.shadowVisible===!1&&gu(y),b=a.panel,re&&xl(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||xl(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&&Il(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&&Xl(a,E,re),ne!==null&&ne(a,re)),!0)}Be.$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"+qo++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ne,height:x}),this instanceof ci&&(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 Jl(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=wr(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()}}Be.hh=function(){},Be.lv=function(){this.Uc=!0},Be.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 ci?$h(this):!1;if(!(this instanceof ci&&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&&Ts(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Ql(a)):y.setAttributeNS(null,"transform",Ql(a))}else if(!x||this instanceof ci)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 ci))&&(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},Be.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 Ds(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 de=x.xe;else{var pe=0,we=0,be=0,Ae=0,_e=0,pt=0;if(pt=_e=0,b?(_e=ne.x,pt=ne.y):E||(_e-=ue/2,pt-=ue/2),pe=x.start.x*re+x.start.offsetX,we=x.start.y*oe+x.start.offsetY,be=x.end.x*re+x.end.offsetX,Ae=x.end.y*oe+x.end.offsetY,pe+=_e,be+=_e,we+=pt,Ae+=pt,x.type===Bh)de=y.createLinearGradient(pe,we,be,Ae);else if(x.type===Nc)pt=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(_e=0,pt=Math.max(re,oe)/2):_e=x.startRadius,de=y.createRadialGradient(pe,we,_e,be,Ae,pt);else if(x.type===lp)try{de=y.createPattern(x.pattern,"repeat")}catch(Bt){de=null}if(x.type!==lp&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)de.addColorStop(b.key,b.value);if(z&&(x.xe=de,de!==null&&(x.yk=re,x.ft=oe),de===null&&x.type===lp&&x.yk!==-1)){x.yk=-1;var nt=a.diagram;nt!==null&&x.yk===-1&&zn(function(){nt.redraw()},600)}}E?y.fillStyle=de:y.strokeStyle=de}}}Be.rg=function(a){if(a instanceof ci)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},Be.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Be.If=function(){for(var a=this instanceof ci?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Sl(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Ie(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}Ie(a,!1),Ve(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ve(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,Ve(a,!1)))}Be.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=ot.alloc();z.yi(y,x,E,b,Oo),a.rotate(this.Kb,z.x,z.y),ot.free(z)}},Be.v=function(a){if(!St(this)){a===void 0&&(a=!1),xt(this,!0),Zt(this,!0);var y=this.panel;y===null||a||y.v()}},Be.Uj=function(){St(this)||(xt(this,!0),Zt(this,!0))};function uu(a){if(!It(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Ii&&a.Bd(),y.$b())),Zt(a,!0)}}Be.Uk=function(){!(this.l&2048)&&(Ie(this,!0),Ve(this,!0))},Be.Wu=function(){Ve(this,!0)},Be.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===ci.Table?jc(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===ci.Auto&&E.Pb()===a?Pl(a,si,y):x===so?E!==null?E.type===ci.Spot&&E.Pb()===a?Pl(a,si,y):(x=E.defaultStretch,x===so?Pl(a,ri,y):Pl(a,x,y)):Pl(a,ri,y):Pl(a,x,y)}function jc(a,y,x,E){var b=a.stretch;if(b!==so)return Pl(a,b,E);var z=b=null;switch(y.stretch){case Fr:z=!0;break;case si:z=!0}switch(x.stretch){case cr:b=!0;break;case si:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===cr||y===si),z===null&&(z=y===Fr||y===si),b===!0&&z===!0?Pl(a,si,E):b===!0?Pl(a,cr,E):z===!0?Pl(a,Fr,E):Pl(a,ri,E)}function Pl(a,y,x){if(x)return y;if(y===ri||(x=a.desiredSize,x.w()))return ri;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===cr)return ri;if(y===si)return Fr}else{if(y===Fr)return ri;if(y===si)return cr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Fr)return ri;if(y===si)return cr}else{if(y===cr)return ri;if(y===si)return Fr}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 Ie(a,y){a.l=y?a.l|2048:a.l&-2049}function Ve(a,y){a.l=y?a.l|4096:a.l&-4097}function St(a){return(a.l&8192)!==0}function xt(a,y){a.l=y?a.l|8192:a.l&-8193}function It(a){return(a.l&16384)!==0}function Zt(a,y){a.l=y?a.l|16384:a.l&-16385}Be.Gj=function(){this.svg=null},Be.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Be.Av=function(){},Be.zv=function(a){return this.pa=a,uu(this),!0},Be.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Be.kq=function(){return 0};function Cn(a){var y=a.part;if(y instanceof Ii&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||G1(y,a)}}function Vn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof ci?a instanceof Ii?a.Bd():a.qm(a,function(x){Cn(x)}):Cn(a))}Be.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)&&Ft("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Yn),this.localBindings.add(b),this},Be.set=function(a){return Object.assign(this,a),this},Be.Du=function(a){return An(this,a),this},Be.apply=function(a){return a(this),this},Be.nm=function(a){return uc(this,a),this},Be.pz=function(){return this.ih()},Be.ih=function(){for(var a=this instanceof ci?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Be.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new Ki),this.animationTriggers.add(a.propertyName,a),this};function kn(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=Ti.I(a);typeof z=="function"?(x=bn(arguments),E=z(x),En(E)||Ft('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=dt.go[a]}if(E===null&&(b!=null&&b.constructor||Ft("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 hn&&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?Ft("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):An(E,z);return E}function An(a,y){if(typeof y=="string")if(a instanceof es)a.text=y;else if(a instanceof Co)a.figure=y;else if(a instanceof zu)a.source=y;else if(a instanceof ci)y=Qc.I(y),y!==null&&(a.type=y);else if(a instanceof ha){var x=ii(ha,y);x!==null?a.type=x:Ft("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof rn?(y=ii(rn,y),y!==null&&(a.type=y)):a instanceof hr&&(y=ii(hr,y),y!==null&&(a.type=y));else if(y instanceof Yt)a instanceof ci||Ft("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):Ft("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Mn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ll)a.type=y;else if(y instanceof tl)a instanceof Yt||a instanceof ol?a.bind(y):Ft("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ku)a instanceof Yt?a.Jv(y):Ft("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof So)a instanceof rn&&a.type===rn.o?a.figures.add(y):Ft("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof hr)a instanceof So?a.segments.add(y):Ft("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof xs)a instanceof hn||a instanceof ho?a.layout=y:Ft("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++)An(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof ha){x=new xr;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)&&Ft("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)&&Ft("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new xr;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);uc(a,b)}else uc(a,y);else Ft('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function Nn(a,y){Ti.add(a,y)}function ni(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}Qe.Object.defineProperties(Yt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Gr),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 Gr),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 Gr),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 qr),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 qr),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 qr),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:sa},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new qr),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:so},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)&&Kn(a,"0 <= value <= 1",Yt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(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(),Vn(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 ha&&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 ha&&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 ot(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&&Ft("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,Vn(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&&(rs(this,a,"width"),rs(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 vi(a,this.jd.height).freeze(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&rs(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 vi(this.jd.width,a).freeze(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&rs(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:no},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 dr(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&&Sl(this),this.Ab}},oe:{get:function(){return this.l&4096&&Sl(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:ri},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()&&Ft("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&&Kn(a,">= 0",Yt,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&Kn(a,">= 1",Yt,"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&&Kn(a,">= 0",Yt,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&Kn(a,">= 1",Yt,"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 Ii||Ft("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Qv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,K1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Cs},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&&Kn(a,">= 0",Yt,"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&&Kn(a,">= 0",Yt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Cs},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&&Kn(a,">= 0",Yt,"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&&Kn(a,">= 0",Yt,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",y,a))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(a){var y=this.cursor;y!==a&&(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))}}}),Yt.prototype.trigger=Yt.prototype.Jv,Yt.prototype.findBindingPanel=Yt.prototype.ih,Yt.prototype.findTemplateBinder=Yt.prototype.pz,Yt.prototype.setProperties=Yt.prototype.nm,Yt.prototype.apply=Yt.prototype.apply,Yt.prototype.attach=Yt.prototype.Du,Yt.prototype.set=Yt.prototype.set,Yt.prototype.isEnabledObject=Yt.prototype.If,Yt.prototype.isVisibleObject=Yt.prototype.Ed,Yt.prototype.isContainedBy=Yt.prototype.rg,Yt.prototype.getNearestIntersectionPoint=Yt.prototype.rs,Yt.prototype.getLocalPoint=Yt.prototype.qs,Yt.prototype.getDocumentScale=Yt.prototype.Df,Yt.prototype.getDocumentAngle=Yt.prototype.li,Yt.prototype.getDocumentBounds=Yt.prototype.mi,Yt.prototype.getDocumentPoint=Yt.prototype.ga,Yt.prototype.intersectsRect=Yt.prototype.Yc,Yt.prototype.containedInRect=Yt.prototype.fh,Yt.prototype.containsRect=Yt.prototype.Re,Yt.prototype.containsPoint=Yt.prototype.ca,Yt.prototype.raiseChanged=Yt.prototype.g,Yt.prototype.raiseChangedEvent=Yt.prototype.cb,Yt.prototype.addCopyProperty=Yt.prototype.Vw;var Ti=null;Yt.className="GraphObject",Ti=new Ki,Nn("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=kn(ci,ci.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof ci){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"},kn(Co,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ji(0,0,2.76142374915397,2.761423749153969),spot2:new Ji(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 ci&&(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 ci&&(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 ci&&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 ci&&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 ci&&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 ci&&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}),Nn("TreeExpanderButton",function(){var a=kn("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},kn(Co,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ca},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 Ii){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}),Nn("SubGraphExpanderButton",function(){var a=kn("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},kn(Co,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ca},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}),Nn("ToolTip",function(){return kn(pa,ci.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new ot(0,3),shadowBlur:5},kn(Co,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Ji(0,0,4,6),spot2:new Ji(1,1,-4,-4)}))}),Nn("ContextMenu",function(){return kn(pa,ci.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new ot(0,3),shadowBlur:5},new tl("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),Nn("ContextMenuButton",function(){var a=kn("Button");a.stretch=cr;var y=a.fb("ButtonBorder");return y instanceof Co&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Ji(0,0,2,3),y.spot2=new Ji(1,1,-2,-2)),a}),Nn("PanelExpanderButton",function(a){var y=ni(a,"COLLAPSIBLE"),x=kn("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},kn(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}),Nn("CheckBoxButton",function(a){var y=ni(a);return a=kn("Button",{desiredSize:new vi(14,14)},kn(Co,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:si,geometryStretch:er,visible:!1},y!==""?new tl("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof ci){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}),Nn("CheckBox",function(a){a=ni(a),a=kn("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new dr(0,1,0,0)});var y=kn(ci,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new dr(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),Yt.None=ri=new Mn(Yt,"None",0),Yt.Default=so=new Mn(Yt,"Default",0),Yt.Vertical=Fr=new Mn(Yt,"Vertical",4),Yt.Horizontal=cr=new Mn(Yt,"Horizontal",5),Yt.Fill=si=new Mn(Yt,"Fill",3),Yt.Uniform=er=new Mn(Yt,"Uniform",1),Yt.UniformToFill=Zo=new Mn(Yt,"UniformToFill",2),Yt.FlipVertical=Bo=new Mn(Yt,"FlipVertical",1),Yt.FlipHorizontal=ea=new Mn(Yt,"FlipHorizontal",2),Yt.FlipBoth=_a=new Mn(Yt,"FlipBoth",3),Yt.make=kn,Yt.getBuilders=function(){var a=new Ki,y;for(y in Ti)if(y!==y.toLowerCase()){var x=Ti.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Yt.defineBuilder=Nn,Yt.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Ti.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Yt))return y&&E.set(y),E;Ft('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Yt.takeBuilderArgument=ni;function Gr(){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=no,this.o=$a,this.hg=so,this.ob=this.Bi=1,this.Pf=ri,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Gr.prototype.copy=function(){var a=new Gr;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 qr(){this.u=-1/0,this.o=0,this.F=sa,this.rr=Eu,this.j=this.V="None"}qr.prototype.copy=function(){var a=new qr;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},qr.className="LinkElementSettings";function yo(){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}yo.prototype.copy=function(){var a=new yo;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},yo.className="LinkSettings";function To(){this.ha=[1,0,0,1,0,0]}To.prototype.copy=function(){var a=new To;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},To.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},To.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},To.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)}},To.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 Jo(a,y,x){this.ownerDocument=a=y===void 0?dt.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 Ia(this,x)}Jo.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},Jo.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),En(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},Jo.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Jo.prototype.focus=function(){this.Oa.focus()},Jo.prototype.mx=function(){this.ownerDocument=null},Qe.Object.defineProperties(Jo.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}}}),Jo.className="SVGSurface";function Ia(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 To,this.j=wc(this),this.Nj=wc(this,"gojs-diagram"),this.Hl=this.ti=null;var x=qo++,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 ds(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+")")}Be=Ia.prototype,Be.arc=function(a,y,x,E,b,z,ne,re){var oe=2*Math.PI,ue=oe-1e-6,de=x*Math.cos(E),pe=x*Math.sin(E),we=a+de,be=y+pe,Ae=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ne-we)||1e-6<Math.abs(re-be))&&this.path.push(["L",we,+be]),0>E&&(E=E%oe+oe),E>ue?(this.path.push(["A",x,x,0,1,Ae,a-de,y-pe]),this.path.push(["A",x,x,0,1,Ae,we,be])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Ae,a+x*Math.cos(b),y+x*Math.sin(b)])},Be.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Be.Se=function(a){this.addPath(this.path,this.rb,a||0)},Be.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Be.clearRect=function(){},Be.clip=function(){this.Yl.clipPath=!0},Be.closePath=function(){this.path.push(["z"])},Be.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},Be.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"+qo++,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+")"},Be.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 Ts(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)}Be.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 de=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ne=x,re=E=de,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,Ts(this,y,x,E,b,z||0,ne||0,re,oe),z={x:0,y:0,width:de||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!==de||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),Is(this,Eh,z,this.rb),this.addElement(Eh,z)},Be.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),Wl(this,this.Yl)},Be.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Be.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},Is(this,"fill",a,this.rb),this.addElement("rect",a)},Be.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},Is(this,"fill",a,this.rb),Wl(this,a),this.svg.prepend(this.Ud("rect",a))},Be.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},Is(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Be.lineTo=function(a,y){this.path.push(["L",a,y])},Be.moveTo=function(a,y){this.path.push(["M",a,y])},Be.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Be.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"])},Be.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},Be.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())},Be.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 Ql(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Be.scale=function(a,y){this.rb.scale(a,y)},Be.translate=function(a,y){this.rb.translate(a,y)},Be.transform=function(){},Be.yc=function(){},Be.stroke=function(){Xu(this,this.Yl)},Be.jk=function(){this.clipInsteadOfFill||this.stroke()},Be.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Be.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 Is(a,y,x,E){y==="fill"?Wl(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 Wl(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"+qo++,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,de){return ue.offset>de.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Be.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=bn(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,Is(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 To;re.ha=[y,x,E,b,z,ne],y={},Is(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}Be.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 Il(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Be.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Be.fs=function(){this.Ct=!1},Be.Vc=function(){},Be.Wx=function(){},Ia.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ia.prototype.getImageData=function(){return null},Ia.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()))}Ia.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ia.className="SVGContext",hn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Jo(this,dt.document));var y=new Jo(this,dt.document,!0);a===void 0&&(a=new xr);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)},hn.prototype.makeSvg=hn.prototype.Cs,hn.prototype.av=function(a){return this.Cs(a)},hn.prototype.makeSVG=hn.prototype.av;function Gl(a,y,x,E){this.ownerDocument=y=y===void 0?dt.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}Gl.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},Gl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Gl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Gl.prototype.focus=function(){this.Oa.focus()},Gl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Qe.Object.defineProperties(Gl.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}}}),Gl.className="CanvasSurface";function fd(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Ft("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 Jt,this.isTemporary=!!x}Be=fd.prototype,Be.Wx=function(a){this.Z.imageSmoothingEnabled=a},Be.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Be.beginPath=function(){this.Z.beginPath()},Be.Se=function(){},Be.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Be.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Be.clip=function(){this.Z.clip()},Be.closePath=function(){this.Z.closePath()},Be.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Be.createPattern=function(a,y){return this.Z.createPattern(a,y)},Be.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Be.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)},Be.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Be.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Be.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Be.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Be.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Be.lineTo=function(a,y){this.Z.lineTo(a,y)},Be.measureText=function(a){return this.Z.measureText(a)},Be.moveTo=function(a,y){this.Z.moveTo(a,y)},Be.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Be.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Be.restore=function(){this.Z.restore()},Be.save=function(){this.yc(),this.Z.save()},fd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Be=fd.prototype,Be.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Be.scale=function(a,y){this.El.scale(a,y)},Be.translate=function(a,y){this.El.translate(a,y)},Be.stroke=function(){this.Z.stroke()},Be.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}},Be.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Be.ng=function(a,y){if(a instanceof ha&&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)},Be.jk=function(){this.Hm||this.stroke()},Be.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Be.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Be.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vf),a.lineDashOffset=0)},Be.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Be.Hs=function(){},Qe.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 ha(a,y){sp||(ap(),sp=!0),Ao(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=$l,this.Lk=Ln):this.Lk=a===Nc?this.Qd=Oo:this.Qd=Cs,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}ha.prototype.copy=function(){var a=new ha;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},Be=ha.prototype,Be.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Be.ka=function(){return Object.isFrozen(this)&&Ft("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Be.qb=function(a){a.classType===ha&&(this.type=a)},Be.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+")"},Be.addColorStop=function(a,y){return this._isFrozen&&Bn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Kn(a,"0 <= loc <= 1",ha,"addColorStop:loc"),this.we===null&&(this.we=new Ki),this.we.add(a,y),this.na===Gh&&(this.type=Bh),this.xe=null,this},Be.Vz=function(a,y){if(this._isFrozen&&Bn(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)}Be.Wy=function(a,y){if(this._isFrozen&&Bn(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)+")"}Be.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 ha?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 Tl.j=.4124564*y+.3575761*x+.1804375*E,Tl.u=.2126729*y+.7151522*x+.072175*E,Tl.o=.0193339*y+.119192*x+.9503041*E,Tl.F=Ya.F,y=Wp(Tl.j/Sf[0]),x=Wp(Tl.u/Sf[1]),E=Wp(Tl.o/Sf[2]),zc.j=116*x-16,zc.u=500*(y-x),zc.o=200*(x-E),zc.F=Tl.F,zc.j=Math.min(100,Math.max(0,zc.j+100*a)),a=(zc.j+16)/116,y=a-zc.o/200,Tl.j=Sf[0]*Ng(zc.u/500+a),Tl.u=Sf[1]*(zc.j>xf*Ag?Math.pow(a,3):zc.j/xf),Tl.o=Sf[2]*Ng(y),Tl.F=zc.F,a=-.969266*Tl.j+1.8760108*Tl.u+.041556*Tl.o,y=.0556434*Tl.j+-.2040259*Tl.u+1.0572252*Tl.o,Ya.j=255*op((3.2404542*Tl.j+-1.5371385*Tl.u+-.4985314*Tl.o)/100),Ya.u=255*op(a/100),Ya.o=255*op(y/100),Ya.F=Tl.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:Ft("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 ha||Ft("Value for "+y+" must be a color string or a Brush, not "+a))}function ap(){Dg=As?new Gl(null,void 0,{willReadFrequently:!0}).context:null}Qe.Object.defineProperties(ha.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Bn(this,a),this.na=a,this.start.Mc()&&(a===Bh?this.start=$l:a===Nc&&(this.start=Oo)),this.end.Mc()&&(a===Bh?this.end=Ln:a===Nc&&(this.end=Oo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Bn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Bn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Bn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Bn(this,a),0>a&&Kn(a,">= zero",ha,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Bn(this,a),0>a&&Kn(a,">= zero",ha,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Bn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Bn(this,a),this.cr=a,this.xe=null}}}),ha.prototype.isDark=ha.prototype.Gx,ha.prototype.darkenBy=ha.prototype.Wy,ha.prototype.lightenBy=ha.prototype.Vz,ha.prototype.addColorStop=ha.prototype.addColorStop;var Ag=216/24389,xf=24389/27,Sf=[95.047,100,108.883],Dg=null,Ya=new gd,Ju=new gd,Tl=new gd,zc=new gd,sp=!1;ha.className="Brush";var Gh;ha.Solid=Gh=new Mn(ha,"Solid",0);var Bh;ha.Linear=Bh=new Mn(ha,"Linear",1);var Nc;ha.Radial=Nc=new Mn(ha,"Radial",2);var lp;ha.Pattern=lp=new Mn(ha,"Pattern",4);var up;ha.Lab=up=new Mn(ha,"Lab",5);var i1;ha.HSL=i1=new Mn(ha,"HSL",6),ha.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},ha.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)},ha.lighten=function(a){return Wh(a)},ha.lightenBy=Wh,ha.darken=function(a){return Lg(a)},ha.darkenBy=Lg,ha.mix=pd,ha.isDark=Qd;function ll(){this.xa="Base"}ll.prototype.measure=function(){},ll.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},ll.prototype.arrange=function(){},ll.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},ll.prototype.iA=function(a){a.Uj()},ll.prototype.gc=function(){},Qe.Object.defineProperties(ll.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return ci}}}),ll.prototype.remeasureObject=ll.prototype.iA,ll.prototype.arrangeElement=ll.prototype.Ly,ll.prototype.measureElement=ll.prototype.Yz,ll.className="PanelLayout";function _m(){this.xa="Base"}Vt(_m,ll),_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 de=ue.margin,pe=de.right+de.left;de=de.top+de.bottom,ue.measure(y,x,z,ne);var we=ue.measuredBounds;pe=Math.max(we.width+pe,0),de=Math.max(we.height+de,0),we=ue.position.x;var be=ue.position.y;isFinite(we)||(we=0),isFinite(be)||(be=0),ue instanceof Co&&ue.isGeometryPositioned&&(ue=ue.strokeWidth/2,we-=ue,be-=ue),ps(b,we,be,pe,de)}}},_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 de=z.strokeWidth/2;oe-=de,ue-=de}z.visible&&z.arrange(oe+re.left,ue+re.top,ne.width,ne.height)}};function jm(){this.xa="Base"}Vt(jm,ll),jm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;y=mi(),z=Mh(a);for(var oe=0;oe<re;oe++){var ue=E[oe];if(ue.visible||ue===z){var de=fu(ue,!1);if(de!==ri&&de!==cr)y.push(ue);else{ue.measure(1/0,x,0,ne),de=ue.margin,ue=ue.measuredBounds;var pe=Math.max(ue.height+de.top+de.bottom,0);b.width+=Math.max(ue.width+de.right+de.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)&&(de=oe.margin,re=de.right+de.left,de=de.top+de.bottom,oe.measure(1/0,x,0,ne),oe=oe.measuredBounds,de=Math.max(oe.height+de,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,de));Di(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,de=y[oe];if(de.visible){var pe=de.measuredBounds,we=de.margin,be=we.top+we.bottom,Ae=z+b.bottom,_e=pe.height,pt=fu(de,!1);(isNaN(de.desiredSize.height)&&pt===si||pt===Fr)&&(_e=Math.max(x.height-be-Ae,0)),be=_e+be+Ae,Ae=de.alignment,Ae.Xb()&&(Ae=a.defaultAlignment),Ae.sb()||(Ae=Oo),ne&&(re-=pe.width+we.left+we.right),de.arrange(re+Ae.offsetX+we.left,ue+Ae.offsetY+we.top+(x.height*Ae.y-be*Ae.y),pe.width,_e),ne||(re+=pe.width+we.left+we.right)}}};function zm(){this.xa="Base"}Vt(zm,ll),zm.prototype.measure=function(a,y,x,E,b,z){var ne=E.length;x=mi();for(var re=Mh(a),oe=0;oe<ne;oe++){var ue=E[oe];if(ue.visible||ue===re){var de=fu(ue,!1);if(de!==ri&&de!==Fr)x.push(ue);else{var pe=ue.margin;de=pe.right+pe.left,pe=pe.top+pe.bottom,ue.measure(y,1/0,z,0),ue=ue.measuredBounds,Ss(b,Math.max(b.width,Math.max(ue.width+de,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);Di(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,de=y[oe];if(de.visible){var pe=de.measuredBounds,we=de.margin,be=we.left+we.right,Ae=z+b.right,_e=pe.width,pt=fu(de,!1);(isNaN(de.desiredSize.width)&&pt===si||pt===cr)&&(_e=Math.max(x.width-be-Ae,0)),be=_e+be+Ae,Ae=de.alignment,Ae.Xb()&&(Ae=a.defaultAlignment),Ae.sb()||(Ae=Oo),ne&&(re-=pe.height+we.bottom+we.top),de.arrange(ue+Ae.offsetX+we.left+(x.width*Ae.x-be*Ae.x),re+Ae.offsetY+we.top,_e,pe.height),ne||(re+=pe.height+we.bottom+we.top)}}};function Zm(){this.xa="Base"}Vt(Zm,ll),Zm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),ue=oe.margin,de=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 be=Math.max(z+de,0),Ae=Math.max(ne+pe,0),_e=a.isClipping,pt=Dn.allocAt(-ue.left,-ue.top,be,Ae),nt=Dn.allocAt(0,0,z,ne);Cv(oe,nt,!0),z=nt.width,ne=nt.height;for(var Bt=!0,At=Mh(a),kt=0;kt<re;kt++){var Ut=E[kt];we=y;var fn=x;if(Ut!==oe&&(Ut.visible||Ut===At)){ue=Ut.margin;var bi=ue.left,Xi=ue.top;switch(be=ue.right+ue.left,Ae=ue.top+ue.bottom,ue=fu(Ut,!1),ue){case si:we=z,fn=ne,Xi=bi=Ae=be=0;break;case cr:we=z,bi=be=0;break;case Fr:fn=ne,Xi=Ae=0}Ut.measure(we,fn,0,0),we=Ut.measuredBounds,be=Math.max(we.width+be,0),Ae=Math.max(we.height+Ae,0),ue=Ut.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Oo);var Wi=Ut.alignmentFocus;if(Wi.Xb()&&(Wi=Oo),fn=null,Ut instanceof ci&&Ut.$e!==""&&(fn=Ut.fb(Ut.$e),fn===Ut&&(fn=null)),bi=nt.x-bi,Xi=nt.y-Xi,fn!==null){for(Ut.arrange(0,0,we.width,we.height),we=fn.actualBounds,we=ot.allocAt(we.x+(Wi.x*we.width-Wi.offsetX),we.y+(Wi.y*we.height-Wi.offsetY)),fn=fn.panel;fn!==Ut;)fn.transform.Ga(we),fn=fn.panel;bi+=ue.x*z+ue.offsetX-we.x,Xi+=ue.y*ne+ue.offsetY-we.y,ot.free(we)}else bi+=ue.x*z+ue.offsetX-(Wi.x*we.width+Wi.offsetX),Xi+=ue.y*ne+ue.offsetY-(Wi.y*we.height+Wi.offsetY);Bt?(Bt=!1,b.h(bi,Xi,be,Ae)):ps(b,bi,Xi,be,Ae)}}switch(Bt?b.assign(pt):_e?b.Uu(nt.x,nt.y,nt.width,nt.height):ps(b,pt.x,pt.y,pt.width,pt.height),Dn.free(pt),Dn.free(nt),ue=oe.stretch,ue===so&&(ue=fu(oe,!1)),ue){case ri:return;case si:if(!isFinite(y)&&!isFinite(x))return;break;case cr:if(!isFinite(y))return;break;case Fr:if(!isFinite(x))return}for(we=oe.measuredBounds,z=we.width,ne=we.height,be=Math.max(z+de,0),Ae=Math.max(ne+pe,0),ue=oe.margin,nt=Dn.allocAt(-ue.left,-ue.top,be,Ae),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,be=ue.right+ue.left,Ae=ue.top+ue.bottom,we=x.measuredBounds,be=Math.max(we.width+be,0),Ae=Math.max(we.height+Ae,0),de=x.alignment,de.Xb()&&(de=a.defaultAlignment),de.sb()||(de=Oo),x=x.alignmentFocus,x.Xb()&&(x=Oo),Bt?(Bt=!1,b.h(de.x*z+de.offsetX-(x.x*we.width+x.offsetX)-ue.left,de.y*ne+de.offsetY-(x.y*we.height+x.offsetY)-ue.top,be,Ae)):ps(b,de.x*z+de.offsetX-(x.x*we.width+x.offsetX)-ue.left,de.y*ne+de.offsetY-(x.y*we.height+x.offsetY)-ue.top,be,Ae));Bt?b.assign(pt):_e?b.Uu(nt.x,nt.y,nt.width,nt.height):ps(b,pt.x,pt.y,pt.width,pt.height),Dn.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,de=oe-x.y;for(b.arrange(ue,de,ne,re),ne=Dn.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,be=ue.height;de=pe.alignment,de.Xb()&&(de=a.defaultAlignment),de.sb()||(de=Oo);var Ae=pe.alignmentFocus;if(Ae.Xb()&&(Ae=Oo),ue=null,pe instanceof ci&&pe.$e!==""&&(ue=pe.fb(pe.$e),ue===pe&&(ue=null)),ue!==null){var _e=ue.actualBounds;for(Ae=ot.allocAt(_e.x+(Ae.x*_e.width-Ae.offsetX),_e.y+(Ae.y*_e.height-Ae.offsetY)),ue=ue.panel;ue!==pe;)ue.transform.Ga(Ae),ue=ue.panel;ue=de.x*ne.width+de.offsetX-Ae.x,de=de.y*ne.height+de.offsetY-Ae.y,ot.free(Ae)}else ue=de.x*ne.width+de.offsetX-(Ae.x*we+Ae.offsetX),de=de.y*ne.height+de.offsetY-(Ae.y*be+Ae.offsetY);ue+=ne.x-x.x,de+=ne.y-x.y,pe.visible&&pe.arrange(z+ue,oe+de,we,be)}}Dn.free(ne)};function Cv(a,y,x){var E=null;if(a instanceof ci&&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"}Vt(Hm,ll),Hm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),ue=oe.margin,de=y,pe=x,we=ue.right+ue.left,be=ue.top+ue.bottom;oe.measure(y,x,z,ne),ue=oe.measuredBounds;var Ae=0,_e=null;oe instanceof Co&&(_e=oe,Ae=_e.strokeWidth*_e.scale);var pt=Math.max(ue.width+we,0);ue=Math.max(ue.height+be,0);var nt=Bv(oe),Bt=nt.x*pt+nt.offsetX;nt=nt.y*ue+nt.offsetY;var At=Mv(oe),kt=At.x*pt+At.offsetX;for(At=At.y*ue+At.offsetY,isFinite(y)&&(de=Math.max(Math.abs(Bt-kt)-Ae,0)),isFinite(x)&&(pe=Math.max(Math.abs(nt-At)-Ae,0)),Ae=vi.alloc(),Ae.h(0,0),a=Mh(a),At=0;At<re;At++)nt=E[At],nt===oe||!nt.visible&&nt!==a||(ue=nt.margin,pt=ue.right+ue.left,Bt=ue.top+ue.bottom,nt.measure(de,pe,0,0),ue=nt.measuredBounds,pt=Math.max(ue.width+pt,0),ue=Math.max(ue.height+Bt,0),Ae.h(Math.max(pt,Ae.width),Math.max(ue,Ae.height)));if(re===1)b.width=pt,b.height=ue,vi.free(Ae);else{switch(nt=Bv(oe),At=Mv(oe),re=E=0,At.x!==nt.x&&At.y!==nt.y&&(E=Ae.width/Math.abs(At.x-nt.x),re=Ae.height/Math.abs(At.y-nt.y)),vi.free(Ae),Ae=0,_e!==null&&(Ae=_e.strokeWidth*_e.scale,Ov(_e)===er&&(E=re=Math.max(E,re))),E+=Math.abs(nt.offsetX)+Math.abs(At.offsetX)+Ae,re+=Math.abs(nt.offsetY)+Math.abs(At.offsetY)+Ae,_e=oe.stretch,_e===so&&(_e=fu(oe,!1)),_e){case ri:ne=z=0;break;case si:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case cr:isFinite(y)&&(E=y),ne=0;break;case Fr: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+be}},Hm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Dn.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 de=Bv(E),pe=Mv(E),we=de.y*b.height+de.offsetY,be=pe.x*b.width+pe.offsetX;for(pe=pe.y*b.height+pe.offsetY,z.x=de.x*b.width+de.offsetX,z.y=we,ps(z,be,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),de=Math.max(ue.height+ne.top+ne.bottom,0),we=re.alignment,we.Xb()&&(we=a.defaultAlignment),we.sb()||(we=Oo),oe=z.width*we.x+we.offsetX-oe*we.x+ne.left+z.x,ne=z.height*we.y+we.offsetY-de*we.y+ne.top+z.y,re.visible&&(Ba(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 Dn(z.x,z.y,z.width,z.height))));Dn.free(z)};function Wm(){this.xa="Base",this.name="Table"}Vt(Wm,ll),Wm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ne=mi(),re=mi(),oe=0;oe<z;oe++){var ue=E[oe],de=ue instanceof ci?ue:null;if(de!==null&&$h(de)&&ue.visible){re.push(de);for(var pe=de.O.s,we=pe.length,be=0;be<we;be++){var Ae=pe[be];de.type===ci.TableRow?Ae.row=ue.row:de.type===ci.TableColumn&&(Ae.column=ue.column),ne.push(Ae)}}else ne.push(ue)}z=ne.length,z===0&&(a.Fb(0),a.Eb(0));for(var _e=[],pt=0;pt<z;pt++){var nt=ne[pt];nt.visible&&(xt(nt,!0),Zt(nt,!0),_e[nt.row]||(_e[nt.row]=[]),_e[nt.row][nt.column]||(_e[nt.row][nt.column]=[]),_e[nt.row][nt.column].push(nt))}Di(ne);var Bt=mi(),At=mi(),kt=mi(),Ut={count:0},fn={count:0},bi=y,Xi=x,Wi=a.rowDefs,fi=a.colDefs,ti=null;z=Wi.length;for(var lo=0;lo<z;lo++)ti=Wi[lo],ti!==void 0&&(ti.actual=0);z=fi.length;for(var $r=0;$r<z;$r++)ti=fi[$r],ti!==void 0&&(ti.actual=0);for(var Fa=_e.length,qa=0,wl=0;wl<Fa;wl++)_e[wl]&&(qa=Math.max(qa,_e[wl].length));var Nl=Math.min(a.topIndex,Fa-1),pu=Math.min(a.leftIndex,qa-1),Cl=0;Fa=_e.length;for(var tf=Mh(a),nl=0;nl<Fa;nl++)if(_e[nl]){qa=_e[nl].length;var Sd=a.Fb(nl);Sd.actual=0;for(var mu=Sd.oc=0;mu<qa;mu++)if(_e[nl][mu]){var nf=a.Eb(mu);Bt[mu]===void 0&&(nf.actual=0,nf.oc=0,Bt[mu]=!0);for(var Fc=_e[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<Nl||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)&&Gg;if(Of||vu===ri||Id||nl<Nl||mu<pu||(Ut[mu]!==void 0||vu!==si&&vu!==cr||(Ut[mu]=-1,Ut.count++),fn[nl]!==void 0||vu!==si&&vu!==Fr||(fn[nl]=-1,fn.count++),kt.push(qu)),qu.measure(1/0,1/0,0,0),!(nl<Nl||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===ri||vu===cr)){ti=a.Fb(nl);var kf=ti.Wc();Cl=Math.max(pc-ti.actual,0),Cl+kf>Xi&&(Cl=Math.max(Xi-kf,0));var hv=ti.oa===0;ti.oc=ti.oc+Cl,ti.actual=ti.oa+Cl,Xi=Math.max(Xi-(Cl+(hv?kf:0)),0)}if(qu.columnSpan===1&&(vu===ri||vu===Fr)){ti=a.Eb(mu);var Am=ti.Wc();Cl=Math.max(og-ti.actual,0),Cl+Am>bi&&(Cl=Math.max(bi-Am,0));var Xy=ti.oa===0;ti.oc=ti.oc+Cl,ti.actual=ti.oa+Cl,bi=Math.max(bi-(Cl+(Xy?Am:0)),0)}Of&&qu.Uj()}}}}}Di(Bt);var sh=0,Ah=0;z=a.columnCount;for(var $g=0;$g<z;$g++){var Tf=fi[$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=Wi[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=Xi=Math.max(x-Ah,0),rf=bi;z=kt.length;for(var tc=0;tc<z;tc++){var Od=kt[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;Ut[Od.column]=Dh.oc===0&&Ut[Od.column]!==void 0?Math.max(Op.width+ag,Ut[Od.column]):null,fn[Od.row]=fv.oc===0&&fn[Od.row]!==void 0?Math.max(Op.height+kd,fn[Od.row]):null}var Vg=0,kp=0,rd;for(rd in fn)rd!=="count"&&(Vg+=fn[rd]);for(rd in Ut)rd!=="count"&&(kp+=Ut[rd]);for(var _l=vi.alloc(),Dm=0;Dm<z;Dm++){var Lu=kt[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)&&Ut[Lu.column]!==null?kp===0?Ih=Nu.actual+bi:Ih=Ut[Lu.column]/kp*rf:Ut[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(Xi)&&fn[Lu.row]!==null?Vg===0?of=il.actual+Xi:of=fn[Lu.row]/Vg*lh:fn[Lu.row]!==null?of=Xi:of=il.actual||Xi,of=Math.max(0,of-il.Wc())),_l.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:_l.height=Math.max(_l.height,il.actual+Xi);break;case Fr:_l.width=Math.max(_l.width,Nu.actual+bi)}var sg=Lu.margin,Jy=sg.right+sg.left,gv=sg.top+sg.bottom;Lu.Uj(),Lu.measure(_l.width,_l.height,Nu.minimum,il.minimum);var Tp=Lu.measuredBounds,lg=Math.max(Tp.width+Jy,0),Kg=Math.max(Tp.height+gv,0);isFinite(bi)&&(lg=Math.min(lg,_l.width)),isFinite(Xi)&&(Kg=Math.min(Kg,_l.height));var nc=0;nc=il.actual,il.actual=Math.max(il.actual,Kg),il.oc=Math.max(il.oc,Kg),Cl=il.actual-nc,Xi=Math.max(Xi-Cl,0),fn[Lu.row]===null&&(lh=Math.max(lh-Cl,0)),nc=Nu.actual,Nu.actual=Math.max(Nu.actual,lg),Nu.oc=Math.max(Nu.oc,lg),Cl=Nu.actual-nc,bi=Math.max(bi-Cl,0),Ut[Lu.column]===null&&(rf=Math.max(rf-Cl,0))}}Di(kt);var Oh=vi.alloc(),Cd=mi(),kc=mi();if(z=At.length,z!==0){for(var _f=0;_f<Fa;_f++)if(_e[_f]){qa=_e[_f].length;var Rp=a.Fb(_f);Cd[_f]=Rp.actual;for(var jf=0;jf<qa;jf++)if(_e[_f][jf]){var pv=a.Eb(jf);kc[jf]=pv.actual}}}for(var _p=0;_p<z;_p++){var Ks=At[_p];if(Ks.visible||Ks===tf){var od=a.Fb(Ks.row),$c=a.Eb(Ks.column);switch(_l.h(Math.max($c.minimum,Math.min(y,$c.maximum)),Math.max(od.minimum,Math.min(x,od.maximum))),vu=jc(Ks,od,$c,!1),vu){case si:kc[$c.index]!==0&&(_l.width=Math.min(_l.width,kc[$c.index])),Cd[od.index]!==0&&(_l.height=Math.min(_l.height,Cd[od.index]));break;case cr:kc[$c.index]!==0&&(_l.width=Math.min(_l.width,kc[$c.index]));break;case Fr:Cd[od.index]!==0&&(_l.height=Math.min(_l.height,Cd[od.index]))}isFinite($c.width)&&(_l.width=$c.width),isFinite(od.height)&&(_l.height=od.height),Oh.h(0,0);for(var mv=$c.minimum,mc=od.minimum,af=1;af<Ks.rowSpan&&!(Ks.row+af>=a.rowCount);af++)ti=a.Fb(Ks.row+af),Cl=0,Cl=vu===si||vu===Fr?Math.max(ti.minimum,Cd[Ks.row+af]===0?ti.maximum:Math.min(Cd[Ks.row+af],ti.maximum)):Math.max(ti.minimum,isNaN(ti.Hc)?ti.maximum:Math.min(ti.Hc,ti.maximum)),Oh.height+=Cl,mc+=ti.minimum;for(var Vc=1;Vc<Ks.columnSpan&&!(Ks.column+Vc>=a.columnCount);Vc++)ti=a.Eb(Ks.column+Vc),Cl=0,Cl=vu===si||vu===cr?Math.max(ti.minimum,kc[Ks.column+Vc]===0?ti.maximum:Math.min(kc[Ks.column+Vc],ti.maximum)):Math.max(ti.minimum,isNaN(ti.Hc)?ti.maximum:Math.min(ti.Hc,ti.maximum)),Oh.width+=Cl,mv+=ti.minimum;_l.width+=Oh.width,_l.height+=Oh.height;var jp=Ks.margin,zf=jp.right+jp.left,Im=jp.top+jp.bottom;Ks.measure(_l.width,_l.height,mv,mc);for(var zp=Ks.measuredBounds,Td=Math.max(zp.width+zf,0),ug=Math.max(zp.height+Im,0),Zf=0,Zp=0;Zp<Ks.rowSpan&&!(Ks.row+Zp>=a.rowCount);Zp++)ti=a.Fb(Ks.row+Zp),Zf+=ti.total||0;if(Zf<ug){var sf=ug-Zf,uh=ug-Zf;if(Ks.spanAllocation!==null)for(var lf=Ks.spanAllocation,kh=0;kh<Ks.rowSpan&&!(0>=sf)&&!(Ks.row+kh>=a.rowCount);kh++){ti=a.Fb(Ks.row+kh);var uf=ti.oa||0,cg=lf(Ks,ti,uh);ti.actual=Math.min(ti.maximum,uf+cg),ti.oa!==uf&&(sf-=ti.oa-uf)}for(;0<sf;){var Ed=ti.oa||0;if(isNaN(ti.height)&&ti.maximum>Ed&&(ti.actual=Math.min(ti.maximum,Ed+sf),ti.oa!==Ed&&(sf-=ti.oa-Ed)),ti.index===0)break;ti=a.Fb(ti.index-1)}}for(var Ug=0,cf=0;cf<Ks.columnSpan&&!(Ks.column+cf>=a.columnCount);cf++)ti=a.Eb(Ks.column+cf),Ug+=ti.total||0;if(Ug<Td){var Yg=Td-Ug,Qy=Td-Ug;if(Ks.spanAllocation!==null)for(var Th=Ks.spanAllocation,dg=0;dg<Ks.columnSpan&&!(0>=Yg)&&!(Ks.column+dg>=a.columnCount);dg++){ti=a.Eb(Ks.column+dg);var Om=ti.oa||0,qy=Th(Ks,ti,Qy);ti.actual=Math.min(ti.maximum,Om+qy),ti.oa!==Om&&(Yg-=ti.oa-Om)}for(;0<Yg;){var vv=ti.oa||0;if(isNaN(ti.width)&&ti.maximum>vv&&(ti.actual=Math.min(ti.maximum,vv+Yg),ti.oa!==vv&&(Yg-=ti.oa-vv)),ti.index===0)break;ti=a.Eb(ti.index-1)}}}}Di(At),vi.free(Oh),vi.free(_l),Cd!==void 0&&Di(Cd),kc!==void 0&&Di(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++)fi[xv]!==void 0&&(ti=a.Eb(xv),isFinite(ti.width)?(km+=ti.width,km+=ti.Wc()):qm(ti)===Kp?(km+=ti.oa,km+=ti.Wc()):ti.oa!==0&&(sh+=ti.oa,sh+=ti.Wc()));isFinite(yv.width)?Xg=Math.min(yv.width,pS.width):Xg=vu!==ri&&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++)fi[Sv]!==void 0&&(ti=a.Eb(Sv),isFinite(ti.width)||qm(ti)===Kp||(ti.actual=ti.oa*JS),ti.position=b.width,ti.oa!==0&&(b.width+=ti.oa,b.width+=ti.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)Wi[Pv]!==void 0&&(ti=a.Fb(Pv),isFinite(ti.height)?(Tm+=ti.height,Tm+=ti.Wc()):qm(ti)===Kp?(Tm+=ti.oa,Tm+=ti.Wc()):ti.oa!==0&&(Ah+=ti.oa,Ah+=ti.Wc()));isFinite(yv.height)?Jg=Math.min(yv.height,pS.height):Jg=vu!==ri&&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++)Wi[wv]!==void 0&&(ti=a.Fb(wv),isFinite(ti.height)||qm(ti)===Kp||(ti.actual=ti.oa*QS),ti.position=b.height,ti.oa!==0&&(b.height+=ti.oa,b.height+=ti.Wc()));z=re.length;for(var e1=0;e1<z;e1++){var Rm=re[e1],t1=0,n1=0;Rm.type===ci.TableRow?(t1=b.width,ti=a.Fb(Rm.row),n1=ti.actual):(ti=a.Eb(Rm.column),t1=ti.actual,n1=b.height),Rm.measuredBounds.h(0,0,t1,n1),xt(Rm,!1)}Di(re),a.inRowsCols=_e},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,de=0,pe=0;pe<ue;pe++)ne[pe]&&(de=Math.max(de,ne[pe].length));oe=a.rowDefs,re=a.colDefs;var we=pe=0,be=Math.min(a.topIndex,ue-1);if(0<oe.length){for(;be!==ue&&(oe[be]===void 0||oe[be].oa===0);)be++;be=Math.max(Math.min(be,ue-1),0),pe=-oe[be].position}var Ae=Math.min(a.leftIndex,de-1);if(0<re.length){for(;Ae!==de&&(re[Ae]===void 0||re[Ae].oa===0);)Ae++;Ae=Math.max(Math.min(Ae,de-1),0),we=-re[Ae].position}for(var _e=0,pt=0;_e!==ue&&oe[_e]===void 0;)_e++;for(;pt!==ue&&re[pt]===void 0;)pt++;de=a.part,a.Fb(_e),a.Eb(pt);for(var nt=0;nt<y.length;nt++){var Bt=y[nt];if(Bt instanceof ci&&Bt.visible&&$h(Bt)){if(Bt.type===ci.TableRow){re=a.Fb(Bt.row);var At=a.Eb(pt)}else re=a.Fb(_e),At=a.Eb(Bt.column);oe=re.position+pe+b,re.oa!==0&&(oe+=re.Io(Math.max(_e,be))),re=At.position+we+z,At.oa!==0&&(re+=At.Io(Math.max(pt,Ae))),At=Bt.measuredBounds,Bt.Uk(),Bt.actualBounds.ka();var kt=Bt.actualBounds,Ut=Dn.allocAt(kt.x,kt.y,kt.width,kt.height);kt.x=Bt.type===ci.TableRow?z:re,kt.y=Bt.type===ci.TableColumn?b:oe,kt.width=At.width,kt.height=At.height,Bt.actualBounds.freeze(),Zt(Bt,!1),Ol(Ut,kt)||de===null||(de.oh(),Bt.Pn(de)),Dn.free(Ut)}}for(nt=vi.alloc(),Bt=0;Bt<ue;Bt++)if(ne[Bt]){for(de=ne[Bt].length,At=a.Fb(Bt),oe=At.position+pe+b,At.oa!==0&&(oe+=At.Io(Math.max(_e,be))),kt=0;kt<de;kt++)if(ne[Bt][kt]){Ut=a.Eb(kt),re=Ut.position+we+z,Ut.oa!==0&&(re+=Ut.Io(Math.max(pt,Ae)));for(var fn=ne[Bt][kt],bi=fn.length,Xi=0;Xi<bi;Xi++){var Wi=fn[Xi],fi=Wi.measuredBounds;nt.h(0,0);for(var ti=1;ti<Wi.rowSpan&&!(Bt+ti>=a.rowCount);ti++){var lo=a.Fb(Bt+ti);lo.oa!==0&&(nt.height+=lo.total)}for(ti=1;ti<Wi.columnSpan&&!(kt+ti>=a.columnCount);ti++)lo=a.Eb(kt+ti),lo.oa!==0&&(nt.width+=lo.total);var $r=Ut.oa+nt.width,Fa=At.oa+nt.height;ti=re,lo=oe;var qa=$r,wl=Fa,Nl=re,pu=oe,Cl=$r,tf=Fa;re+$r>x.width&&(Cl=Math.max(x.width-re,0)),oe+Fa>x.height&&(tf=Math.max(x.height-oe,0));var nl=Wi.alignment;if(nl.Xb()){nl=a.defaultAlignment,nl.sb()||(nl=Oo);var Sd=nl.x,mu=nl.y,nf=nl.offsetX;nl=nl.offsetY;var Fc=Ut.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=fi.width,Gc=fi.height;var fc=Wi.margin,qu=fc.left+fc.right,Of=fc.top+fc.bottom,Pd=jc(Wi,At,Ut,!1);!isNaN(Wi.desiredSize.width)||Pd!==si&&Pd!==cr||(Fc=Math.max($r-qu,0)),!isNaN(Wi.desiredSize.height)||Pd!==si&&Pd!==Fr||(Gc=Math.max(Fa-Of,0)),$r=Wi.maxSize,Fa=Wi.minSize,Fc=Math.min($r.width,Fc),Gc=Math.min($r.height,Gc),Fc=Math.max(Fa.width,Fc),Gc=Math.max(Fa.height,Gc),$r=Gc+Of,ti+=qa*Sd-(Fc+qu)*Sd+nf+fc.left,lo+=wl*mu-$r*mu+nl+fc.top,Wi.visible&&(Ba(Nl,pu,Cl,tf,ti,lo,fi.width,fi.height)?Wi.arrange(ti,lo,Fc,Gc):Wi.arrange(ti,lo,Fc,Gc,new Dn(Nl,pu,Cl,tf)))}}}for(vi.free(nt),a=0;a<E;a++)x=y[a],z=x instanceof ci?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"}Vt(Gm,ll),Gm.prototype.measure=function(){},Gm.prototype.arrange=function(){};function $m(){this.xa="Base"}Vt($m,ll),$m.prototype.measure=function(){},$m.prototype.arrange=function(){};function Vm(){this.xa="Base"}Vt(Vm,ll),Vm.prototype.measure=function(a,y,x,E,b,z,ne){1<E.length&&Ft("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 de=E.scale,pe=re.width;re=re.height;var we=Math.max(y-ue,0),be=Math.max(x-oe,0),Ae=1;a.viewboxStretch===er?pe!==0&&re!==0&&(Ae=Math.min(we/pe,be/re)):pe!==0&&re!==0&&(Ae=Math.max(we/pe,be/re)),Ae===0&&(Ae=1e-4),E.Ca*=Ae,de!==E.scale&&(xt(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)},Vm.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=Oo),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"}Vt(Gp,ll),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),de=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 be=[],Ae=a.O.s,_e=Ae.length,pt=0;pt<_e;pt++){var nt=Ae[pt],Bt=[];if(be.push(Bt),nt.visible){var At=nt.interval;if(!(0>At)){nt=bv(nt.figure);for(var kt=0;kt<_e;kt++)if(kt!==pt){var Ut=Ae[kt];Ut.visible&&bv(Ut.figure)===nt&&(Ut=Ut.interval,Ut>At&&Bt.push(Ut))}}}}for(Ae=a.O.s,_e=Ae.length,pt=0;pt<_e;pt++){var fn=Ae[pt];if(fn.visible&&(Bt=fn.interval||1,nt=Math.abs(Bt),!(2>b*nt*x))){if(At=fn.segmentIndex,(!isFinite(At)||isNaN(At))&&(At=0),0>At&&(At=nt-Math.min(-At,nt)),At=Math.round(At%nt),nt=fn.opacity,kt=1,nt!==1){if(nt===0)continue;kt=y.globalAlpha,y.globalAlpha=kt*nt}Ut=be[pt];var bi=!1,Xi=fn.strokeDashArray;if(Xi!==null&&(bi=!0,y.js(Xi,fn.strokeDashOffset)),fn.figure==="LineV"&&fn.stroke!==null&&0<fn.strokeWidth){for(y.lineWidth=fn.strokeWidth,Ds(a,y,fn.stroke,!1,!1,z,ne),y.beginPath(),Xi=fn=Math.floor((we-b)/b);Xi<=fn+ue;Xi++){var Wi=Xi*b+we;0<=Wi&&Wi<=re&&Km(Xi,Bt,At,Ut)&&(y.moveTo(Wi,0),y.lineTo(Wi,oe))}y.stroke(),y.Se()}else if(fn.figure==="LineH"&&fn.stroke!==null&&0<fn.strokeWidth){for(y.lineWidth=fn.strokeWidth,Ds(a,y,fn.stroke,!1,!1,z,ne),y.beginPath(),Xi=fn=Math.floor((pe-E)/E);Xi<=fn+de;Xi++)Wi=Xi*E+pe,0<=Wi&&Wi<=oe&&Km(Xi,Bt,At,Ut)&&(y.moveTo(0,Wi),y.lineTo(re,Wi));y.stroke(),y.Se()}else if(fn.figure==="BarV"&&fn.fill!==null)for(Ds(a,y,fn.fill,!0,!1,z,ne),fn=fn.width,isNaN(fn)&&(fn=b),Wi=Xi=Math.floor((we-b)/b);Wi<=Xi+ue;Wi++){var fi=Wi*b+we;0<=fi+fn&&fi<=re&&Km(Wi,Bt,At,Ut)&&y.fillRect(fi,0,fn,oe)}else if(fn.figure==="BarH"&&fn.fill!==null)for(Ds(a,y,fn.fill,!0,!1,z,ne),fn=fn.height,isNaN(fn)&&(fn=E),Wi=Xi=Math.floor((pe-E)/E);Wi<=Xi+de;Wi++)fi=Wi*E+pe,0<=fi+fn&&fi<=oe&&Km(Wi,Bt,At,Ut)&&y.fillRect(0,fi,re,fn);bi&&y.fs(),nt!==1&&(y.globalAlpha=kt)}}y.restore(),y.Vc(!1)};function Km(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"}Vt(Um,ll),Um.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof pa||a instanceof gi){var ne=null,re=null;if(a instanceof gi&&(ne=a),a instanceof pa&&(re=a,ne=re.adornedPart,a.j===null&&(a.j=[])),ne instanceof gi){var oe=ne;if(z===0)Ss(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 de=oe.points,pe=ne.pointsCount;re!==null?re.Ul(!1):ne!==null&&ne.Ul(!1),re=y.width;var we=y.height,be=a.j;if(be.length=0,ue!==null){r1(a,re,we,ue);var Ae=ue.measuredBounds;x.ed(Ae),be.push(Ae)}Ae=Jt.alloc();for(var _e=ot.alloc(),pt=ot.alloc(),nt=0;nt<z;nt++){var Bt=E[nt];if(Bt!==ue)if(Bt.isPanelMain&&Bt instanceof Co){r1(a,re,we,Bt);var At=Bt.measuredBounds;x.ed(At),be.push(At)}else if(2>pe)Bt.measure(1/0,1/0,0,0),At=Bt.measuredBounds,x.ed(At),be.push(At);else{var kt=Bt.segmentIndex,Ut=Bt.segmentFraction,fn=Bt.alignmentFocus;fn.Mc()&&(fn=Oo);var bi=Bt.segmentOrientation,Xi=Bt.segmentOffset;if(isNaN(kt)){var Wi=oe.ua;At=mi(),Wi.Qu(Ut,At);var fi=ot.allocAt(At[0],At[1]);if(fi.add(oe.i(0)),Wi.type===rn.j?fi.offset(-Wi.startX,-Wi.startY):(Wi=Wi.figures.first(),Wi!==null&&fi.offset(-Wi.startX,-Wi.startY)),Wi=At[2],bi!==Eu){var ti=oe.computeAngle(Bt,bi,Wi);Bt.Kb=ti}ti=fi.x-y.x;var lo=fi.y-y.y;ot.free(fi),Di(At)}else if(kt<-pe||kt>=pe)At=ot.alloc(),oe.vg(),oe.computeMidPoint(At),Wi=oe.midAngle,bi!==Eu&&(ti=oe.computeAngle(Bt,bi,Wi),Bt.Kb=ti),ti=At.x-y.x,lo=At.y-y.y,ot.free(At);else{if(ti=0,0<=kt?(lo=de.M(kt),At=kt<pe-1?de.M(kt+1):lo):(ti=pe+kt,lo=de.M(ti),At=0<ti?de.M(ti-1):lo),lo.Xa(At)){0<=kt?(Wi=0<kt?de.M(kt-1):lo,ti=kt<pe-2?de.M(kt+2):At):(Wi=ti<pe-1?de.M(ti+1):lo,ti=1<ti?de.M(ti-2):At),fi=Wi.Bf(lo);var $r=At.Bf(ti);Wi=fi>$r+10?0<=kt?Wi.ab(lo):lo.ab(Wi):$r>fi+10?0<=kt?At.ab(ti):ti.ab(At):0<=kt?Wi.ab(ti):ti.ab(Wi)}else Wi=0<=kt?lo.ab(At):At.ab(lo);bi!==Eu&&(ti=oe.computeAngle(Bt,bi,Wi),Bt.Kb=ti),ti=lo.x+(At.x-lo.x)*Ut-y.x,lo=lo.y+(At.y-lo.y)*Ut-y.y}Bt.measure(1/0,1/0,0,0),At=Bt.measuredBounds,fi=Bt.naturalBounds;var Fa=0;Bt instanceof Co&&(Fa=Bt.strokeWidth),$r=fi.width+Fa;var qa=fi.height+Fa;Ae.reset(),Ae.translate(-At.x,-At.y),Ae.scale(Bt.scale,Bt.scale),Ae.rotate(bi===Eu?Bt.angle:Wi,$r/2,qa/2),bi!==im&&bi!==om||Ae.rotate(90,$r/2,qa/2),bi!==rm&&bi!==am||Ae.rotate(-90,$r/2,qa/2),bi===E0&&(45<Wi&&135>Wi||225<Wi&&315>Wi)&&Ae.rotate(-Wi,$r/2,qa/2),fi=new Dn(0,0,$r,qa),_e.xi(fi,fn),Ae.Ga(_e),fn=-_e.x+Fa/2*Bt.scale,Bt=-_e.y+Fa/2*Bt.scale,pt.assign(Xi),Fa=isNaN(Xi.x);var wl=isNaN(Xi.y);if(Fa||wl){$r=$r/2+3,qa=qa/2+3;var Nl=45<=Wi&&135>=Wi,pu=225<=Wi&&315>=Wi;bi===Eu&&(Nl||pu)?(pt.x=wl?$r:Xi.y,pt.y=Fa?qa:Xi.x,Nl?0<=kt||isNaN(kt)&&.5>Ut||!Fa||(pt.y=-qa):pu&&((0<=kt||isNaN(kt)&&.5>Ut)&&Fa&&(pt.y=-qa),wl&&(pt.x=-$r))):(Fa&&(pt.x=0<=kt||isNaN(kt)&&.5>Ut?$r:-$r),wl&&(pt.y=-qa),pt.rotate(Wi))}else pt.rotate(Wi);ti+=pt.x,lo+=pt.y,fi.set(At),fi.h(ti+fn,lo+Bt,At.width,At.height),be.push(fi),x.ed(fi)}}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),Ss(b,x.width||0,x.height||0),Jt.free(Ae),ot.free(_e),ot.free(pt)}}}},Um.prototype.arrange=function(a,y){var x=y.length;if(a instanceof pa||a instanceof gi){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 de=ne[re];re++,ue.arrange(de.x-a.jg.x,de.y-a.jg.y,de.width,de.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof gi)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,de=ne.segmentOffset,isNaN(re)){var be=pe.ua,Ae=mi();be.Qu(oe,Ae);var _e=ot.allocAt(Ae[0],Ae[1]);_e.add(pe.i(0)),be.type===rn.j||(be=be.figures.first()),_e.offset(-be.startX,-be.startY),be=Ae[2],ue!==Eu&&(pe=pe.computeAngle(ne,ue,be),ne.angle=pe),pe=_e.x;var pt=_e.y;ot.free(_e),Di(Ae)}else if(re<-x||re>=x)Ae=ot.alloc(),be=pe,pt=Ae,be.vg(),be.computeMidPoint(pt),be=pe.midAngle,ue!==Eu&&(pe=pe.computeAngle(ne,ue,be),ne.angle=pe),pe=Ae.x,pt=Ae.y,ot.free(Ae);else{if(_e=0,0<=re?(Ae=y.s[re],pt=re<x-1?y.s[re+1]:Ae):(_e=x+re,Ae=y.s[_e],pt=0<_e?y.s[_e-1]:Ae),Ae.Xa(pt)){0<=re?(be=0<re?y.s[re-1]:Ae,_e=re<x-2?y.s[re+2]:pt):(be=_e<x-1?y.s[_e+1]:Ae,_e=1<_e?y.s[_e-2]:pt);var nt=be.Bf(Ae),Bt=pt.Bf(_e);be=nt>Bt+10?0<=re?be.ab(Ae):Ae.ab(be):Bt>nt+10?0<=re?pt.ab(_e):_e.ab(pt):0<=re?be.ab(_e):_e.ab(be)}else be=0<=re?Ae.ab(pt):pt.ab(Ae);ue!==Eu&&(pe=pe.computeAngle(ne,ue,be),ne.angle=pe),pe=Ae.x+(pt.x-Ae.x)*oe,pt=Ae.y+(pt.y-Ae.y)*oe}if(we.ys())ne.location=new ot(pe,pt);else{we.Mc()&&(we=Oo),Ae=Jt.alloc(),Ae.reset(),Ae.scale(ne.scale,ne.scale),Ae.rotate(ne.angle,0,0);var At=ne.naturalBounds;_e=Dn.allocAt(0,0,At.width,At.height),nt=ot.alloc(),nt.xi(_e,we),Ae.Ga(nt),we=-nt.x,Bt=-nt.y;var kt=At.width,Ut=At.height;At=ot.alloc(),At.assign(de);var fn=isNaN(de.x),bi=isNaN(de.y);if(fn||bi){kt=kt/2+3,Ut=Ut/2+3;var Xi=45<=be&&135>=be,Wi=225<=be&&315>=be;ue===Eu&&(Xi||Wi)?(At.x=bi?kt:de.y,At.y=fn?Ut:de.x,Xi?0<=re||isNaN(re)&&.5>oe||!fn||(At.y=-Ut):Wi&&((0<=re||isNaN(re)&&.5>oe)&&fn&&(At.y=-Ut),bi&&(At.x=-kt))):(fn&&(At.x=0<=re||isNaN(re)&&.5>oe?kt:-kt),bi&&(At.y=-Ut),At.rotate(be))}else At.rotate(be);pe+=At.x,pt+=At.y,Ae.pp(_e),we+=_e.x,Bt+=_e.y,re=ot.allocAt(pe+we,pt+Bt),ne.move(re),ot.free(re),ot.free(At),ot.free(nt),Dn.free(_e),Jt.free(Ae)}}b!==null?b.Ul(!1):E.Ul(!1),E=I1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),ot.free(E)}};function r1(a,y,x,E){if(St(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof pa&&a.type===ci.Link&&a.adornedObject instanceof Co&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof gi&&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),xt(E,!1)}}function $p(){this.xa="Base"}Vt($p,ll),$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,de=oe.top+oe.bottom;re.measure(y,x,z,ne);var pe=re.measuredBounds,we=new Dn(-oe.left,-oe.top,Math.max(pe.width+ue,0),Math.max(pe.height+de,0));a.graduatedBounds.push(we),b.assign(we);for(var be=re.geometry,Ae=re.strokeWidth,_e=be.flattenedSegments,pt=be.flattenedLengths,nt=be.flattenedTotalLength,Bt=_e.length,At=0,kt=0,Ut=mi(),fn=0;fn<Bt;fn++){var bi=_e[fn],Xi=[];kt=At=0;for(var Wi=bi.length,fi=0;fi<Wi;fi+=2){var ti=bi[fi],lo=bi[fi+1];if(fi!==0){var $r=180*Math.atan2(lo-kt,ti-At)/Math.PI;0>$r&&($r+=360),Xi.push($r)}At=ti,kt=lo}Ut.push(Xi)}if(a.graduatedIntervals===null){for(var Fa=[],qa=a.O.s,wl=qa.length,Nl=0;Nl<wl;Nl++){var pu=qa[Nl],Cl=[];if(Fa.push(Cl),pu.visible){var tf=pu.interval;if(!(0>tf)){for(var nl=0;nl<wl;nl++)if(nl!==Nl){var Sd=qa[nl];if(Sd.visible&&pu.constructor===Sd.constructor){var mu=Sd.interval;mu>tf&&Cl.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=pt[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 es&&!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=Ut[Id][ec],rf=pt[Id][ec];Id<pt.length;){for(;fc>Gg&&ec<pt[Id].length-1;)ec++,lh=Ut[Id][ec],rf=pt[Id][ec],Gg+=rf;if(fc<=Gg)break;Id++,ec=0,lh=Ut[Id][ec],rf=pt[Id][ec],Gg+=rf}var tc=_e[Id],Od=tc[2*ec],fv=tc[2*ec+1],Dh=(fc-(Gg-rf))/rf,Op=new ot(Od+(tc[2*ec+2]-Od)*Dh+Ae/2-be.bounds.x,fv+(tc[2*ec+3]-fv)*Dh+Ae/2-be.bounds.y);Op.scale(re.scale,re.scale);e:{var wd=lh,ag=Ut[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 Vg=Math.abs(wd-kd);if(180<Vg&&(wd<kd?wd+=360:kd+=360,Vg=Math.abs(wd-kd)),5e-4>Dh||.9995<Dh){lh=(wd+kd)/2%360;break e}if(10>Vg){var kp=1-Math.abs(.5-Dh);lh=(wd*kp+kd*(1-kp))%360;break e}}}lh=wd}if(gc instanceof es){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)}Di(Ut);var _l=a.graduatedMarks;if(_l!==null)for(var Dm=E.length,Lu=0;Lu<Dm;Lu++){var il=E[Lu],Nu=_l[Lu];if(il.visible&&il!==re&&Nu.length!==0){if(il instanceof Co){var Ih=a,of=b,sg=il.alignmentFocus;sg.Mc()&&(sg=$l);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,Kg=Dn.allocAt(0,0,Tp,lg),nc=ot.alloc();nc.xi(Kg,sg),Dn.free(Kg);for(var Oh=-nc.x,Cd=-nc.y,kc=new Dn,_f=Nu.length,Rp=0;Rp<_f;Rp++)for(var jf=Nu[Rp],pv=jf.$l.x,_p=jf.$l.y,Ks=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(Ks+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(-Ks-il.angle)}ot.free(nc),Ih.graduatedBounds!==null&&Ih.graduatedBounds.push(kc),ps(of,kc.x,kc.y,kc.width,kc.height)}else if(il instanceof es){var $c=a,mv=b;$c.temporaryTextBlock===null&&($c.temporaryTextBlock=new es);var mc=$c.temporaryTextBlock;x1(mc,il);var af=il.alignmentFocus;af.Mc()&&(af=$l);for(var Vc=il.segmentOrientation,jp=il.segmentOffset,zf=new Dn,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,Vc!==Eu&&(Zf=Vc===nm||Vc===C0?Td+il.angle:Td,ug=gi.computeAngle(Vc,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=Jt.alloc();Ed.reset(),Ed.translate(-lf.x,-lf.y),Ed.scale(mc.scale,mc.scale),Ed.rotate(Zf,uf/2,cg/2),Vc!==im&&Vc!==om||Ed.rotate(90,uf/2,cg/2),Vc!==rm&&Vc!==am||Ed.rotate(-90,uf/2,cg/2),Vc===E0&&(45<Td&&135>Td||225<Td&&315>Td)&&Ed.rotate(-Td,uf/2,cg/2);var Ug=Dn.allocAt(0,0,uf,cg),cf=ot.alloc();cf.xi(Ug,af),Ed.Ga(cf);var Yg=-cf.x,Qy=-cf.y,Th=ot.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 Dn(Im,zp,lf.width,lf.height),Om=new Dn(lf.x,lf.y,lf.width,lf.height),qy=new Dn(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),ot.free(Th),ot.free(cf),Dn.free(Ug),Jt.free(Ed)}$c.graduatedBounds!==null&&$c.graduatedBounds.push(zf),ps(mv,zf.x,zf.y,zf.width,zf.height)}xt(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 de=y[ue];re=b[ue],de.visible&&de!==E&&re.length!==0&&(re=z[ne],ne++,de.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 Ia,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,de=oe.length,pe=0;pe<de;pe++){var we=oe[pe],be=ue[pe],Ae=be.length;if(we.visible&&we!==z&&be.length!==0){if(we instanceof Co){if(!(2>a.graduatedTickUnit*we.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ne&&we.graduatedSkip===null)){var _e=we.measuredBounds,pt=we.strokeWidth*we.scale,nt=we.alignmentFocus;nt.Mc()&&(nt=$l);for(var Bt=0;Bt<Ae;Bt++){var At=be[Bt].$l,kt=be[Bt].angle,Ut=nt,fn=we.Ab;fn.reset(),fn.translate(At.x+re.x,At.y+re.y),fn.rotate(kt+we.angle,0,0),fn.translate(-_e.width*Ut.x+Ut.offsetX+pt/2,-_e.height*Ut.y+Ut.offsetY+pt/2),fn.scale(we.scale,we.scale),Ie(we,!1),we.wh.set(we.Ab),we.Kk=we.scale,Ve(we,!1),we.gc(y,x),b&&(a.svg.appendChild(we.svg),we.svg=null),we.Ab.reset()}}}else if(we instanceof es)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new es),_e=a.temporaryTextBlock,x1(_e,we),pt=0;pt<Ae;pt++)nt=be[pt],nt.actualBounds&&nt.measuredBounds&&nt.naturalBounds&&(_e.ec=nt.text||"",_e.Kb=nt.Sz||0,_e.Gc=nt.lineCount||0,Bt=nt.lines,Bt!==void 0&&(_e.Cb=Bt[0],_e.Ih=Bt[1],_e.df=Bt[2],_e.Le=Bt[3],_e.Qc=Bt[4],_e.Qb=Bt[5],_e.ze=Bt[6]),nt.naturalBounds&&(_e.dc=nt.naturalBounds),nt.actualBounds&&(Bt=nt.actualBounds,_e.arrange(Bt.x,Bt.y,Bt.width,Bt.height)),Bt=nt.actualBounds,_e.arrange(Bt.x,Bt.y,Bt.width,Bt.height),At=nt.measuredBounds,nt=nt.naturalBounds,kt=_e.Ab,kt.reset(),kt.translate(Bt.x+re.x,Bt.y+re.y),kt.translate(-At.x,-At.y),_e.no(kt,nt.x,nt.y,nt.width,nt.height),Ie(_e,!1),_e.wh.set(_e.Ab),_e.Kk=_e.scale,Ve(_e,!1),_e.Ng=we.part,_e.Me=we.panel,_e.gc(y,x),_e.Me=null,_e.Ng=null,b&&(a.svg.appendChild(_e.svg),_e.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function ci(a,y){if(Yt.call(this),this.na=null,a===void 0)this.na=ci.Position;else if(typeof a=="string"){var x=Qc.I(a);x!==null&&(this.na=x)}else a instanceof ll?this.na=a:a&&(this.na=ci.Position,y=a);this.na===null&&Ft("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===ci.Grid?1048576:0),this.O=new Yn,this.yb=sl,this.Tm=Bi,this.Uf=so,this.$g=null,this.$e="",this.jg=new Dn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=er,this.jn=fa,this.kn=sa,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Vt(ci,Yt),ci.prototype.cloneProtected=function(a){Yt.prototype.cloneProtected.call(this,a),a.na=this.na,a.yb=this.yb.J(),a.Tm=this.Tm.J(),a.Uf=this.Uf,a.$e=this.$e,a.jg.assign(this.jg),this.T!==null&&(a.T=this.T.copy(a)),a.xo=this.xo,a.jn=this.jn.J(),a.kn=this.kn.J(),this.ra!==null&&(a.ra=this.ra.copy()),a.ub=this.ub,a.zn=this.zn,a.Hh=this.Hh},ci.prototype.Af=function(a){Yt.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},ci.prototype.copy=function(){var a=Yt.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 Ii&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(xa,"elements",a,null,b,null,ne)}}return a}return null},Be=ci.prototype,Be.toString=function(){return"Panel("+this.type.name+")#"+nr(this)},Be.Pn=function(a){Yt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Be.hh=function(a,y){if(this.na===ci.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===ci.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===ci.Table)if(a.yc(),a instanceof Ia){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===ci.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 de=ue.separatorStrokeWidth;isNaN(de)&&(de=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var pe=ue.separatorStroke;if(pe===null&&(pe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),de!==0&&pe!==null){Ds(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+de,x?we>ne.height&&(de-=we-ne.height):we>ne.width&&(de-=we-ne.width),ue=ue.position+de/2,y.lineWidth=de,de=a.yb,x?(ue+=de.top,we=ne.width-de.right,y.moveTo(de.left,ue),y.lineTo(we,ue)):(ue+=de.left,we=ne.height-de.bottom,y.moveTo(ue,de.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),de=0;de<z;de++){var pe=E[de];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 be=pe.Wc(),Ae=pe.separatorStrokeWidth;isNaN(Ae)&&(Ae=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var _e=pe.separatorStroke;_e===null&&(_e=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(_e===null||pe.index===(x?oe:ue))&&(Ae=0),be-=Ae,Ae=pe.position+Ae,be+=pe.actual,Ae+be>we&&(be=we-Ae),0>=be||(we=a.yb,Ds(a,y,pe.background,!0,!1,re,ne),x?y.fillRect(we.left,Ae+we.top,ne.width-(we.left+we.right),be):y.fillRect(Ae+we.left,we.top,be,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"}Be.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Be.kk=function(a,y,x){if(!Yt.prototype.kk.call(this,a,y,x))return!1;if(this.type===ci.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===ci.Grid||this.na===ci.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},Be.nk=function(){return!0},Be.$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 Yt.prototype.$o.call(this,a,y,x,E)},Be.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,de=-ne.m21*re,pe=ne.m11*re,we=re*(ne.m21*ne.dy-ne.m22*ne.dx),be=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*de+we,re=a*ue+y*pe+be,a=x*oe+E*de+we,oe=x*ue+E*pe+be,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,de=ue=0,pe=1,be=we=0),re=a*oe+y*de+we,a=a*ue+y*pe+be,oe=x*oe+E*de+we,x=x*ue+E*pe+be,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),ue=!1,pe=this.O.s,be=pe.length,de=ot.alloc(),we=null,y=1/0;var Ae=null,_e=this.isClipping&&this.na===ci.Spot;_e&&(Ae=ot.alloc(),we=this.Pb(),(ue=we.Sj(re,a,oe,x,Ae))&&(y=(re-Ae.x)*(re-Ae.x)+(a-Ae.y)*(a-Ae.y)));for(var pt=0;pt<be;pt++){var nt=pe[pt];nt.visible&&nt!==we&&nt.Sj(re,a,oe,x,de)&&(ue=!0,nt=(re-de.x)*(re-de.x)+(a-de.y)*(a-de.y),nt<E&&(E=nt,b.set(de)))}return _e&&(y>E&&b.set(Ae),ot.free(Ae)),ot.free(de),z&&b.transform(ne),ue},Be.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Yt.prototype.Gj.call(this)},Be.v=function(a){if(!St(this)){Yt.prototype.v.call(this,a),a=null,(this.na===ci.Auto||this.na===ci.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 ci||b instanceof es||z!==ri)&&b.v(!0)}}}},Be.Uj=function(){if(!St(this)){xt(this,!0),Zt(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Be.Uk=function(){if(!(this.l&2048)){Ie(this,!0),Ve(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Be.Wu=function(){Ve(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Be.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),Ss(b,a,oe),Ss(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},Be.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}Be.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=ri),a){case ri:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case si: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 Fr:this.v(!0),this.measure(y+re,E+ne,0,0)}}this.na.arrange(this,b,this.jg)}},Be.gh=function(a){var y=this.naturalBounds,x=Mh(this);if(Ba(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=ot.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Eo(b.set(a),z.transform),z.ca(b)))return ot.free(b),!0}return ot.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Be.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},Be.qm=function(a,y){if(y(this,a),a instanceof ci){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 ci&&s1(a,z,x)}}function vS(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof ci){y=y.O.s;for(var E=y.length,b=0;b<E;b++)l1(a,y[b],x)}}Be.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof ci){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}Be.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Vp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof ci){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 ci?x=Math.max(x,c1(b)):b instanceof Co&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Be.se=function(){return!(this.type===ci.TableRow||this.type===ci.TableColumn)};function $h(a){return a.type===ci.TableRow||a.type===ci.TableColumn}Be.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),It(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ne=z?a:Eo(ot.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,ue=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),ue=oe/2),Ba(-(ue*b),-(ue*b),E.width+oe*b,E.height+oe*b,ne.x,ne.y)){if(!this.isAtomic){b=this.O.s;var de=b.length;if(re=ot.alloc(),ue=(oe=this.isClipping&&this.na===ci.Spot)?this.Pb():null,oe&&(ue.se()?Eo(re.set(a),ue.transform):re.set(a),!ue.ca(re)))return ot.free(re),z||ot.free(ne),null;for(var pe=Mh(this);de--;){var we=b[de];if((we.visible||we===pe)&&(we.se()?Eo(re.set(a),we.transform):re.set(a),!oe||we!==ue)){var be=null;if(we instanceof ci?be=we.ic(re,y,x):we.pickable===!0&&we.ca(re)&&(be=we),be!==null&&(y!==null&&(be=y(be)),be!==null&&(x===null||x(be))))return ot.free(re),z||ot.free(ne),be}}ot.free(re)}return this.background===null&&this.areaBackground===null?(z||ot.free(ne),null):(a=Ba(0,0,E.width,E.height,ne.x,ne.y)?this:null,z||ot.free(ne),a)}return z||ot.free(ne),null},Be.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:Eo(ot.allocAt(a.x,a.y),this.transform);if(b=Ba(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=ot.alloc(),de=Mh(this);oe--;){var pe=re[oe];if(pe.visible||pe===de){pe.se()?Eo(ue.set(a),pe.transform):ue.set(a);var we=pe;pe=pe instanceof ci?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))}}ot.free(ue)}return z||ot.free(ne),b&&(this.background!==null||this.areaBackground!==null)}return z||ot.free(ne),!1},Be.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=Jt.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Fv(this,y,x,b),z===void 0&&Jt.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 de=oe[ue];if(de.visible||de===re){var pe=de.actualBounds,we=this.naturalBounds;pe.x>we.width||pe.y>we.height||0>pe.x+pe.width||0>pe.y+pe.height||(pe=de,de=de instanceof ci?de:null,we=Jt.alloc(),we.set(ne),(de!==null?de.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)),Jt.free(we))}}return z===void 0&&Jt.free(ne),E}return z===void 0&&Jt.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 ci&&Fv(ne,y,x,E),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||E.add(ne))}}}Be.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:Eo(ot.allocAt(a.x,a.y),this.transform),ue=re?y:Eo(ot.allocAt(y.x,y.y),this.transform),de=oe.Bf(ue),pe=0<oe.x&&oe.x<ne.width&&0<oe.y&&oe.y<ne.height||Na(oe.x,oe.y,0,0,0,ne.height)<=de||Na(oe.x,oe.y,0,ne.height,ne.width,ne.height)<=de||Na(oe.x,oe.y,ne.width,ne.height,ne.width,0)<=de||Na(oe.x,oe.y,ne.width,0,0,0)<=de;if(ne=oe.zd(0,0)<=de&&oe.zd(0,ne.height)<=de&&oe.zd(ne.width,0)<=de&&oe.zd(ne.width,ne.height)<=de,re||(ot.free(oe),ot.free(ue)),pe){if(!this.isAtomic){oe=ot.alloc(),ue=ot.alloc(),de=Mh(this);for(var we=this.O.s,be=we.length;be--;){var Ae=we[be];if(Ae.visible||Ae===de){var _e=Ae.actualBounds,pt=this.naturalBounds;(!re||!(_e.x>pt.width||_e.y>pt.height||0>_e.x+_e.width||0>_e.y+_e.height))&&(Ae.se()?(_e=Ae.transform,Eo(oe.set(a),_e),Eo(ue.set(y),_e)):(oe.set(a),ue.set(y)),_e=Ae,Ae=Ae instanceof ci?Ae:null,(Ae!==null?Ae.og(oe,ue,x,E,b,z):_e.tx(oe,ue,b))&&(x!==null&&(_e=x(_e)),_e===null||E!==null&&!E(_e)||z.add(_e)))}}ot.free(oe),ot.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=On),y}Be.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},Be.M=function(a){return this.O.M(a)},Be.Gb=function(a,y){y instanceof Sr&&Ft("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Ft("Cannot make a Panel contain itself: "+this.toString()),Ft("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Ft("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!==ci.Grid||y instanceof Co||Ft("Can only add Shapes to a Grid Panel, not: "+y),this.na!==ci.Graduated||y instanceof Co||y instanceof es||Ft("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 Ki),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 Ft("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),St(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof ci&&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 Ii&&(x.Te=!0),x.Te&&x instanceof Ii&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Wa,"elements",this,y,null,E,null),x.cb(xa,"elements",this,null,y,null,a)))};function Lv(a,y){a.l=y?a.l|16777216:a.l&-16777217}Be.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)},Be.mb=function(a){0<=a&&this.pc(a,!0)},Be.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),xt(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 Ii&&(E instanceof ci?E.qm(E,function(ne,re){Qv(z,re,y)}):Qv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Wa,"elements",this,E,null,a,null))},Be.Fb=function(a){0>a&&Kn(a,">= 0",ci,"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(xa,"rowdefs",this,null,x,null,a)}return y[a]},Be.oA=function(a){if(0>a&&Kn(a,">= 0",ci,"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(Wa,"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()}}Be.Eb=function(a){0>a&&Kn(a,">= 0",ci,"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(xa,"coldefs",this,null,x,null,a)}return y[a]},Be.jA=function(a){if(0>a&&Kn(a,">= 0",ci,"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(Wa,"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()}}Be.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},Be.Hy=function(a,y){return(a=this.Fb(a))&&Qm(a,new ol(y)),this},Be.By=function(a,y){return(a=this.Eb(a))&&Qm(a,new ol(y)),this},Be.nz=function(a){if(0>a||this.type!==ci.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},Be.fz=function(a){if(0>a||this.type!==ci.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},Be.Fz=function(a,y){if(y===void 0&&(y=new ot(NaN,NaN)),this.type!==ci.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)},Be.Gz=function(a){if(this.type!==ci.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&&Ft("Template cannot have .data be non-null: "+a),a.allBindings=y=new Yn;else if(y._isFrozen)return;var x=new Yn;Lv(a,!1),a.qm(a,function(ue,de){de.th();var pe=de.localBindings;if(pe!==null)for(Ce(de,!1),pe=pe.iterator;pe.next();){var we=pe.value;we.mode===gm&&Ce(de,!0);var be=we.sourceName;be!==null&&(be==="/"&&Lv(ue,!0),be=Bx(we,ue,de),be!==null&&(x.add(be),be.srcBindings===null&&(be.srcBindings=new Yn),be.srcBindings.add(we))),y.add(we)}if(de instanceof ci&&de.type===ci.Table){if(0<de.rowCount){for(ue=de.rowDefs,pe=ue.length,we=0;we<pe;we++)if(be=ue[we],be!==void 0&&be.be!==null)for(var Ae=be.be.iterator;Ae.next();){var _e=Ae.value;_e.xd=be,_e.to=2,_e.wl=be.index,y.add(_e)}}if(0<de.columnCount){for(de=de.colDefs,ue=de.length,pe=0;pe<ue;pe++)if(we=de[pe],we!==void 0&&we.be!==null)for(be=we.be.iterator;be.next();)Ae=be.value,Ae.xd=we,Ae.to=1,Ae.wl=we.index,y.add(Ae)}}});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 Yn),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 ci&&(ne=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ne),oe!==null?(z=oe,b.targetProperty=re):Ci('Warning: unable to find GraphObject named "'+ne+'" for Binding: '+b.toString())),z instanceof ol?(ne=nr(z.panel),b.Ai=ne===void 0?-1:ne,z.panel.bindingId=b.Ai):z instanceof Yt?(ne=nr(z),b.Ai=ne===void 0?-1:ne,z.bindingId=b.Ai):Ft("Unknown type of binding target: "+z)}y.freeze(),a instanceof Sr&&a.Zc()&&a.Va()}Be.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vS(y,function(x){x instanceof ci&&(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},Be.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 ci))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Be.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 ci&&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 ci)||z.data!==y[ne])return!0;b++,ne++}return!1}function Vp(a){if(a.type===ci.Spot||a.type===ci.Auto)return Math.min(a.O.length,1);if(a.type===ci.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===ci.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof ci&&$h(a))?1:0}Be.mv=function(){for(var a=Vp(this);this.O.length>a;)this.pc(this.O.length-1,!1);g1(this,this.itemArray)};function g1(a,y){var x=Vp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var 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 ci){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),St(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 Ii&&(y.Te=!0),y.Te&&y instanceof Ii&&(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 Ki),a.ge.add(y,b)),z=x+Vp(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 ci){var b=y,z=x;E.type===ci.TableRow?E.row=b:E.type===ci.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;Ft("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,Ci('No item template Panel found for category "'+y+'" on '+a),Ci(" Using default item template."),a=new ci,y=new es,y.bind(new tl("text","",gr)),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 ci){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof ci&&!z.isEnabled||Jm(a,z,x)}}}function Ad(a,y){y.name=a,Qc.add(a,y)}Qe.Object.defineProperties(ci.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===ci.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&&Kn(a,">= 0",ci,"padding"),a=new dr(a)):(0>a.left&&Kn(a.left,">= 0",ci,"padding:value.left"),0>a.right&&Kn(a.right,">= 0",ci,"padding:value.right"),0>a.top&&Kn(a.top,">= 0",ci,"padding:value.top"),0>a.bottom&&Kn(a.bottom,">= 0",ci,"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:sl},set:function(a){typeof a=="number"&&(a=new dr(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 ha)&&(a instanceof ha&&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)||Ft("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 ha)&&(a instanceof ha&&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)||Ft("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||Ft("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()||Ft("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&&rs(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&&rs(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)&&Ft("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)&&Ft("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 gi?(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 Gr),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 Ki}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Sr||a.isPanelMain)&&Ft("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))}}}),Qe.Object.defineProperties(ci,{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")}}}),ci.prototype.rebuildItemElements=ci.prototype.mv,ci.prototype.findItemPanelForData=ci.prototype.sx,ci.prototype.updateTargetBindings=ci.prototype.La,ci.prototype.copyTemplate=ci.prototype.Uy,ci.prototype.graduatedValueForPoint=ci.prototype.Gz,ci.prototype.graduatedPointForValue=ci.prototype.Fz,ci.prototype.findColumnForLocalX=ci.prototype.fz,ci.prototype.findRowForLocalY=ci.prototype.nz,ci.prototype.addColumnDefinition=ci.prototype.By,ci.prototype.addRowDefinition=ci.prototype.Hy,ci.prototype.addRowColumnDefinition=ci.prototype.Gy,ci.prototype.removeColumnDefinition=ci.prototype.jA,ci.prototype.getColumnDefinition=ci.prototype.Eb,ci.prototype.removeRowDefinition=ci.prototype.oA,ci.prototype.getRowDefinition=ci.prototype.Fb,ci.prototype.removeAt=ci.prototype.mb,ci.prototype.remove=ci.prototype.remove,ci.prototype.insertAt=ci.prototype.Gb,ci.prototype.elt=ci.prototype.M,ci.prototype.add=ci.prototype.add,ci.prototype.findObject=ci.prototype.fb,ci.prototype.findInVisualTree=ci.prototype.Nl,ci.prototype.walkVisualTreeFrom=ci.prototype.qm,ci.prototype.findMainElement=ci.prototype.Pb;var p1=!1,m1=null,Qc=new Ki;ci.className="Panel",ci.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=sl,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){Ao(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=so,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=bn(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=bn(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Be=ol.prototype,Be.qb=function(a){a.classType===ol&&(this.sizing=a)},Be.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+nr(this)},Be.wi=function(a){this.Me=a},Be.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)},Be.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===ci.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)},Be.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(_o,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}Be.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)&&Ft("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Yn),this.be.add(b),this},Qe.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&&Kn(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&&Kn(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))&&Kn(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&&Kn(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 dr(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 ha&&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)||Ft("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 ha&&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 Mn(ol,"Default",0),Kp=new Mn(ol,"None",1),e0=new Mn(ol,"ProportionalExtra",2);ol.className="RowColumnDefinition",ol.Default=Iv,ol.None=Kp,ol.ProportionalExtra=e0;function Co(a,y){Yt.call(this),this.Rd=this.ua=null,this.an="None",this.xc=this.Ui="black",this.ig=1,this.Na=this.Yg=null,this.Vn=this.Un=NaN,this.fa=null,typeof a=="string"?this.figure=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}Vt(Co,Yt),Co.prototype.cloneProtected=function(a){Yt.prototype.cloneProtected.call(this,a),a.ua=this.ua,a.Rd=this.Rd,a.an=this.an,a.Ui=this.Ui,a.xc=this.xc,a.ig=this.ig,this.Yg!==null&&(a.Yg=bn(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())}Be=Co.prototype,Be.th=function(){Yt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Be.qb=function(a){a===ri||a===er||a===Zo||a===so?this.geometryStretch=a:Yt.prototype.qb.call(this,a)},Be.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+nr(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,de,pe,we,be,Ae,_e=0,pt=mi(),nt=2;nt<b;nt+=2)ue=x[nt],de=x[nt+1],pe=ue-re,re=de-oe,pe===0&&(pe=.001),we=re/pe,be=Math.atan2(re,pe),Ae=Math.sqrt(pe*pe+re*re),pt.push([pe,be,we,Ae]),_e+=Ae,re=ue,oe=de;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,de=ue!==0,nt=0,Ae=pt[nt],pe=Ae[0],be=Ae[1],we=Ae[2],Ae=Ae[3];for(var Bt=0;.1<=_e;){if(Bt===0&&(de?(b=x,b-=ue,_e-=ue,de=!1):b=x,b===0&&(b=1)),b>_e){Di(pt);return}b>Ae?(Bt=b-Ae,b=Ae):Bt=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(be),a.translate(-(ne/2),-(z/2)),Bt===0&&E.hh(a,y),a.translate(ne/2,z/2),a.rotate(-be),a.translate(-re,-oe),_e-=b,Ae-=b,Bt!==0){if(nt++,nt===pt.length){Di(pt);return}Ae=pt[nt],pe=Ae[0],be=Ae[1],we=Ae[2],Ae=Ae[3],b=Bt}}Di(pt)}}Be.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&&Ds(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===ci.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&&(Ds(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===rn.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===rn.u){var ue=b.startX;oe=b.startY;var de=b.endX,pe=b.endY;b=Math.min(ue,de);var we=Math.min(oe,pe);ue=Math.abs(de-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&&Il(a)),a.Se()}else if(b.type===rn.F)ue=b.startX,oe=b.startY,de=b.endX,pe=b.endY,b=Math.abs(de-ue)/2,we=Math.abs(pe-oe)/2,ue=Math.min(ue,de)+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&&Il(a)),a.Se();else if(b.type===rn.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),de=ue.segments.s,pe=de.length;for(var be=null,Ae=0;Ae<pe;Ae++){var _e=de[Ae];switch(_e.type){case ji:a.moveTo(_e.endX,_e.endY);break;case ki:a.lineTo(_e.endX,_e.endY);break;case Zr:a.bezierCurveTo(_e.point1X,_e.point1Y,_e.point2X,_e.point2Y,_e.endX,_e.endY);break;case zo:a.quadraticCurveTo(_e.point1X,_e.point1Y,_e.endX,_e.endY);break;case br:if(_e.radiusX===_e.radiusY){var pt=Math.PI/180;a.arc(_e.point1X,_e.point1Y,_e.radiusX,_e.startAngle*pt,(_e.startAngle+_e.sweepAngle)*pt,0>_e.sweepAngle,be!==null?be.endX:ue.startX,be!==null?be.endY:ue.startY)}else if(be=mr(_e,ue),pt=be.length,pt===0)a.lineTo(_e.centerX,_e.centerY);else for(var nt=0;nt<pt;nt++){var Bt=be[nt];nt===0&&a.lineTo(Bt[0],Bt[1]),a.bezierCurveTo(Bt[2],Bt[3],Bt[4],Bt[5],Bt[6],Bt[7])}break;case Cr:if(nt=pt=0,be!==null&&be.type===br){if(be=mr(be,ue),Bt=be.length,Bt===0){a.lineTo(_e.endX,_e.endY);break}be=be[Bt-1]||null,be!==null&&(pt=be[6],nt=be[7])}else pt=be!==null?be.endX:ue.startX,nt=be!==null?be.endY:ue.startY;if(be=yr(_e,ue,pt,nt),pt=be.length,pt===0){a.lineTo(_e.endX,_e.endY);break}for(nt=0;nt<pt;nt++)Bt=be[nt],a.bezierCurveTo(Bt[2],Bt[3],Bt[4],Bt[5],Bt[6],Bt[7]);break;default:Ft("Segment not of valid type: "+_e.type)}_e.isClosed&&a.closePath(),be=_e}de=ue.isFilled,z?ue.isShadowed?(de===!0&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&(de&&re&&gu(a),a.jk(),de&&re&&Il(a))):(gu(a),de&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk(),Il(a)):(de&&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=mi(),z.type===rn.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===rn.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,de=ue.length,pe=0;pe<de;pe++){switch(Ae=ue[pe],Ae.type){case ji:cp(a,y,E,x),E.length=0,E.push(Ae.endX),E.push(Ae.endY),ne=Ae.endX,b=Ae.endY,oe=ne,we=b;break;case ki:E.push(Ae.endX),E.push(Ae.endY),ne=Ae.endX,b=Ae.endY;break;case Zr:tt.Qe(ne,b,Ae.point1X,Ae.point1Y,Ae.point2X,Ae.point2Y,Ae.endX,Ae.endY,.5,E),ne=Ae.endX,b=Ae.endY;break;case zo:tt.ep(ne,b,Ae.point1X,Ae.point1Y,Ae.endX,Ae.endY,.5,E),ne=Ae.endX,b=Ae.endY;break;case br:if(_e=mr(Ae,re),be=_e.length,be===0){E.push(Ae.centerX),E.push(Ae.centerY),ne=Ae.centerX,b=Ae.centerY;break}for(pt=0;pt<be;pt++)nt=_e[pt],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 Cr:if(_e=yr(Ae,re,ne,b),be=_e.length,be===0){E.push(Ae.endX),E.push(Ae.endY),ne=Ae.endX,b=Ae.endY;break}for(pt=0;pt<be;pt++)nt=_e[pt],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:Ft("Segment not of valid type: "+Ae.type)}Ae.isClosed&&(E.push(oe),E.push(we),cp(a,y,E,x))}cp(a,y,E,x)}else if(z.type===rn.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===rn.F){if(b=new So,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ne=new hr(br),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=mr(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)}Di(E),a.restore(),a.Vc(!1)}}}},Be.kk=function(a,y,x){return!Yt.prototype.kk.call(this,a,y,x)||this.xc===null&&this.Ui===null||this.ua===null||this.pathPattern!==null||this.geometry.figures.length!==this.svg.getElementsByTagName("path").length?!1:(a.Hl=this.svg,this.hh(a,y),a.Hl=null,!0)},Be.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Yt.prototype.nk.call(this,a)},Be.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)}},Be.ga=function(a,y){if(y===void 0&&(y=new ot),a instanceof Ji){a.Mc()&&Ft("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},Be.mi=function(a){a===void 0&&(a=new Dn);var y=this.naturalBounds,x=this.oe;y=Dn.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=ot.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),ps(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),ps(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),ps(a,E.x,E.y,0,0),Dn.free(y),ot.free(E),a},Be.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!==rn.j||y||(b+=2);var z=Dn.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Dn.free(z),!1;if(E=b+1e-4,x.type===rn.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:(Dn.free(z),tt.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===rn.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 Dn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Dn.free(z),a}if(x.type===rn.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 Dn.free(z),!1;ne+=E,b+=E}return this.stroke!==null&&(ne+=E,b+=E),Dn.free(z),0>=ne||0>=b?!1:1>=x*x/(ne*ne)+y*y/(b*b)}if(x.type===rn.o)return Dn.free(z),this.fill===null?Mi(x,a.x,a.y,b):vr(x,a,b,1<this.strokeWidth,y);Ft("Unknown Geometry type: "+x.type)},Be.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):Ft("Unsupported Figure: "+re)}ne=oe.bounds}re=ne.width,oe=ne.height,ue=ne.width;var de=ne.height;switch(fu(this,!0)){case ri:E=x=0;break;case si:ue=Math.max(a-z,0),de=Math.max(y-z,0);break;case cr:ue=Math.max(a-z,0),E=0;break;case Fr:x=0,de=Math.max(y-z,0)}isFinite(b.width)&&(ue=b.width),isFinite(b.height)&&(de=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),de=Math.min(pe.height,de),ue=isFinite(ue)?Math.max(x,ue):Math.max(re,x),de=isFinite(de)?Math.max(E,de):Math.max(oe,E),x=Ov(this),x){case ri:break;case si:re=ue,oe=de;break;case er:x=Math.min(ue/re,de/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:Ft(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,de+z),b.w()?(ue=b.width,de=b.height,ue=Math.min(pe.width,ue),de=Math.min(pe.height,de),ue=Math.max(we.width,ue),de=Math.max(we.height,de),this.dc.h(0,0,ue,de)):this.dc.assign(ne)};function Ov(a){var y=a.geometryStretch;return a.Rd!==null?y===so?si:y:y===so?kv[a.figure].defaultStretch:y}Be.eh=function(a,y,x,E){ru(this,a,y,x,E)},Be.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Be.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,de=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*de+we,re=x*re+E*ue+pe,oe=x*oe+E*de+we,pe=this.ig/2,ue=this.ua,ue===null&&(this.measure(1/0,1/0),ue=this.ua);var be=ue.bounds;if(de=!1,ue.type===rn.j)if(1.5>=this.strokeWidth)de=tt.Ve(ue.startX,ue.startY,ue.endX,ue.endY,z,ne,re,oe,b);else{if(ue.startX===ue.endX?(E=pe,de=0):(y=(ue.endY-ue.startY)/(ue.endX-ue.startX),de=pe/Math.sqrt(1+y*y),E=de*y),y=mi(),a=new ot,tt.Ve(ue.startX+E,ue.startY+de,ue.endX+E,ue.endY+de,z,ne,re,oe,a)&&y.push(a),a=new ot,tt.Ve(ue.startX-E,ue.startY-de,ue.endX-E,ue.endY-de,z,ne,re,oe,a)&&y.push(a),a=new ot,tt.Ve(ue.startX+E,ue.startY+de,ue.startX-E,ue.startY-de,z,ne,re,oe,a)&&y.push(a),a=new ot,tt.Ve(ue.endX+E,ue.endY+de,ue.endX-E,ue.endY-de,z,ne,re,oe,a)&&y.push(a),re=y.length,re===0)return Di(y),!1;for(de=!0,oe=1/0,E=0;E<re;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-ne)*(a.y-ne),x<oe&&(oe=x,b.x=a.x,b.y=a.y);Di(y)}else if(ue.type===rn.u)de=tt.Ff(be.x-pe,be.y-pe,be.x+be.width+pe,be.y+be.height+pe,z,ne,re,oe,b);else if(ue.type===rn.F){y=Dn.allocAt(be.x,be.y,be.width,be.height).Bc(pe,pe);e:if(y.width===0)de=tt.Ve(y.x,y.y,y.x,y.y+y.height,z,ne,re,oe,b);else if(y.height===0)de=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,de=y.y+ue,x=9999,z!==re&&(x=(ne-oe)/(z-re)),9999>Math.abs(x)){if(oe=ne-de-x*(z-E),0>a*a*x*x+ue*ue-oe*oe){b.x=NaN,b.y=NaN,de=!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+de,oe=x*(a-E)+oe+de,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,de=!1;break e}oe=Math.sqrt(re),re=de+oe,oe=de-oe,Math.abs(re-ne)<Math.abs(oe-ne)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}de=!0}Dn.free(y)}else if(ue.type===rn.o){we=ot.alloc();var Ae=re-z,_e=oe-ne,pt=Ae*Ae+_e*_e,nt=z,Bt=ne;if(0<pt&&be.contains(nt,Bt)&&(we.x=nt,we.y=Bt,this.ca(we)))for(Ae!==0&&.5>Math.abs(Ae)?(_e*=.5/Ae,Ae=.5):_e!==0&&.5>Math.abs(_e)&&(Ae*=.5/_e,_e=.5),nt-=Ae,Bt-=_e;be.contains(nt,Bt);)nt-=Ae,Bt-=_e;for(b.x=re,b.y=oe,_e=0;_e<ue.figures.count;_e++){var At=ue.figures.s[_e],kt=At.isFilled?nt:z,Ut=At.isFilled?Bt:ne,fn=At.segments;be=At.startX,Ae=At.startY;for(var bi=be,Xi=Ae,Wi=0;Wi<fn.count;Wi++){var fi=fn.s[Wi],ti=fi.type,lo=fi.endX,$r=fi.endY,Fa=!1;switch(ti){case ji:bi=lo,Xi=$r;break;case ki:Fa=n0(be,Ae,lo,$r,kt,Ut,re,oe,we);break;case Zr:Fa=tt.Eo(be,Ae,fi.point1X,fi.point1Y,fi.point2X,fi.point2Y,lo,$r,kt,Ut,re,oe,.6,we);break;case zo:Fa=tt.Eo(be,Ae,be+2/3*(fi.point1X-be),Ae+2/3*(fi.point1Y-Ae),lo+2/3*(fi.point1X-lo),$r+2/3*(fi.point1Y-$r),lo,$r,kt,Ut,re,oe,.6,we);break;case br:case Cr:ti=fi.type===br?mr(fi,At):yr(fi,At,be,Ae);var qa=ti.length;if(qa===0){Fa=n0(be,Ae,fi.type===br?fi.centerX:fi.endX,fi.type===br?fi.centerY:fi.endY,kt,Ut,re,oe,we);break}for($r=null,lo=0;lo<qa;lo++){if($r=ti[lo],lo===0&&n0(be,Ae,$r[0],$r[1],kt,Ut,re,oe,we)){var wl=t0(kt,Ut,we,pt,b);wl<pt&&(pt=wl,de=!0)}tt.Eo($r[0],$r[1],$r[2],$r[3],$r[4],$r[5],$r[6],$r[7],kt,Ut,re,oe,.6,we)&&(wl=t0(kt,Ut,we,pt,b),wl<pt&&(pt=wl,de=!0))}lo=$r[6],$r=$r[7];break;default:Ft("Unknown Segment type: "+ti)}be=lo,Ae=$r,Fa&&(Fa=t0(kt,Ut,we,pt,b),Fa<pt&&(pt=Fa,de=!0)),fi.isClosed&&(lo=bi,$r=Xi,n0(be,Ae,lo,$r,kt,Ut,re,oe,we)&&(fi=t0(kt,Ut,we,pt,b),fi<pt&&(pt=fi,de=!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,ot.free(we)}else Ft("Unknown Geometry type: "+ue.type);return de?(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,de=(b-ne)*(y-E)-(z-re)*(a-x);return de===0?!1:(oe.x=((b*re-z*ne)*(a-x)-(b-ne)*(a*E-y*x))/de,oe.y=((b*re-z*ne)*(y-E)-(z-re)*(a*E-y*x))/de,(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)}Be.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=ot.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)))),ot.free(z),b},Be.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Jt.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ne=ot.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 ot.free(ne),!0;var re=ot.alloc(),oe=ot.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)))),ot.free(ne),Jt.free(x),ot.free(re),ot.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)}Be.tx=function(a,y,x){function E(pt,nt){for(var Bt=pt.length,At=0;At<Bt;At+=2)if(nt.zd(pt[At],pt[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,os(a.x,a.y,re,oe)<=b&&os(a.x,a.y,ue,oe)<=b&&os(a.x,a.y,re,ne)<=b&&os(a.x,a.y,ue,ne)<=b)return!0}if(re=y.startX,oe=y.startY,ue=y.endX,ne=y.endY,y.type===rn.j){if(x=(re-ue)*(a.x-ue)+(oe-ne)*(a.y-ne),Na(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===rn.u)return y=!1,x&&(y=Na(a.x,a.y,re,oe,re,ne)<=b||Na(a.x,a.y,re,oe,ue,oe)<=b||Na(a.x,a.y,ue,oe,ue,ne)<=b||Na(a.x,a.y,re,ne,ue,ne)<=b),y;if(y.type===rn.F){y=a.x-(re+ue)/2,z=a.y-(oe+ne)/2;var de=Math.abs(ue-re)/2,pe=Math.abs(ne-oe)/2;if(de===0||pe===0)return Na(a.x,a.y,re,oe,ue,ne)<=b;if(x){if(a=tt.$y(de,pe,y,z),a*a<=b)return!0}else return!(os(y,z,-de,0)>=b||os(y,z,0,-pe)>=b||os(y,z,0,pe)>=b||os(y,z,de,0)>=b)}else if(y.type===rn.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&&Na(a.x,a.y,z,re,z,ue)>b&&Na(a.x,a.y,z,re,oe,re)>b&&Na(a.x,a.y,oe,ue,z,ue)>b&&Na(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):vr(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,de=z.startY,a.zd(ne,de)>b)return!1;for(re=z.segments.s,oe=re.length,ue=0;ue<oe;ue++)switch(pe=re[ue],pe.type){case ji:case ki:if(ne=pe.endX,de=pe.endY,a.zd(ne,de)>b)return!1;break;case Zr:var we=mi();if(tt.Qe(ne,de,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.8,we),ne=E(we,a),Di(we),ne||(ne=pe.endX,de=pe.endY,a.zd(ne,de)>b))return!1;break;case zo:if(we=mi(),tt.ep(ne,de,pe.point1X,pe.point1Y,pe.endX,pe.endY,.8,we),ne=E(we,a),Di(we),ne||(ne=pe.endX,de=pe.endY,a.zd(ne,de)>b))return!1;break;case br:case Cr:we=pe.type===br?mr(pe,z):yr(pe,z,ne,de);var be=we.length;if(be===0){if(ne=pe.type===br?pe.centerX:pe.endX,de=pe.type===br?pe.centerY:pe.endY,a.zd(ne,de)>b)return!1;break}pe=null;for(var Ae=mi(),_e=0;_e<be;_e++)if(pe=we[_e],Ae.length=0,tt.Qe(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.8,Ae),E(Ae,a))return Di(Ae),!1;Di(Ae),pe!==null&&(ne=pe[6],de=pe[7]);break;default:Ft("Unknown Segment type: "+pe.type)}}return!0}}}return!1},Be.qc=function(){this.ua=null},Be.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=Io):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Ji(1-Io.x,Io.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&&Ft("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=rn.parse(tt.um[E],!1),qd[E]=a,x!==E&&(qd[x]=E),E}}return typeof y=="string"?y:y instanceof rn?a:null}Qe.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&&rs(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=rn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=ot.allocAt(-y.x,-y.y),ot.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 ha&&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 ha&&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 Kn(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"?Kn(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"?Kn(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)||Ft("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()])||Ft("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?Ft("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new qr),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?Ft("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new qr),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:so},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 xr,kv=new xr;Co.className="Shape",Co.getFigureGenerators=function(){var a=new Ki,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 Ki;for(E in tt.um)if(qd[E]===void 0){var y=rn.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 rn&&a.add(x,E)}return a.freeze(),a},Co.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=rn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Ft("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=so,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 es(a,y){return Yt.call(this),s0||(ju=As?new Gl(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}Vt(es,Yt),es.prototype.cloneProtected=function(a){Yt.prototype.cloneProtected.call(this,a),a.ec=this.ec,a.xc=this.xc,a.Ae=this.Ae,a.Gc=this.Gc,a.Cb=this.Cb,a.Lq=this.Lq,a.Gm=this.Gm,this.fa!==null&&(a.fa=this.fa.copy()),this.da!==null&&(a.da=this.da.nc?this.da:this.da.copy()),a.Ih=this.Ih,a.df=this.df,a.Le=this.Le,a.Qc=this.Qc,a.Qb=this.Qb,a.ze=this.ze};function Dd(a){a.da===null?a.da=new Wv:a.da.nc&&(a.da=a.da.copy())}Be=es.prototype,Be.th=function(){Yt.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}Be.qb=function(a){a.classType===es?this.wrap=a:Yt.prototype.qb.call(this,a)},Be.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Be.v=function(){Yt.prototype.v.call(this)},Be.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;Ds(this,a,this.xc,!0,!1,x,E),(oe||ue)&&Ds(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var de=this.oe,pe=de.dx-(ne*de.m21+de.dx);de=de.dy-(ne*de.m22+de.dy);var we=y.scale;switch(8>(pe*pe+de*de)*we*we&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ia&&(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(),de=this.Gc,we=(y+ne+pe)*de,z>we&&(E=this.verticalAlignment,E=E.y*z-E.y*we+E.offsetY),de===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<de;we++){var be=this.Qc[we];be>b&&(be=b),E+=y,this.Oj(this.Qb[we],a,0,E,b,ne,be,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)}}},Be.Oj=function(a,y,x,E,b,z,ne,re,oe,ue,de){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 Ia&&y.ad.classList.add("gojs-td")}de&&(de=E+z-z/2.2|0,a%2!==0&&(de+=.5),E=x+pe,z=de,x=x+pe+ne,ne=de,pe=a,y.beginPath(),y.lineWidth=pe,y.moveTo(E,z),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Ia&&y.ad.classList.add("gojs-td"))}},Be.kk=function(a,y,x){if(!Yt.prototype.kk.call(this,a,y,x))return!1;if(Ds(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},Be.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Yt.prototype.nk.call(this,a)},Be.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)}},Be.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),Ss(this.dc,z,ne),this.Ge(0,0,z,ne),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Be.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 de=qc(z);a.Cb=de,Up(a,z,de),E!==null&&E.h(de,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)),de=0;ue<=x;)pe++,de=ue,ue=qc(y.substr(0,pe));if(pe===1){var we=ue;z=Math.max(z,ue)}else we=de,z=Math.max(z,de);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(de=dp(a,ne),ue=qc(y+de);0<de.length&&ue<=x;)y+=de,ne=ne.substr(de.length),de=dp(a,ne),ue=y+de,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"),de.length===0?(pe=ue,z=Math.max(z,ue)):(pe=de=qc(y),z=Math.max(z,de)),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=vi.alloc();Rv(a,z,y,oe),b+=oe.height,vi.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}Qe.Object.defineProperties(es.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:ri},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=vi.alloc();Rv(this,this.ec,999999,a);var y=a.width;vi.free(a),a=P1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Ss(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 ha&&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&&Kn(a,"> 0",es,"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 Mn(es,"None",0),w1=new Mn(es,"WrapFit",1),jv=new Mn(es,"WrapDesiredSize",2),C1=new Mn(es,"WrapBreakAll",3),zv=new Mn(es,"OverflowClip",0),o0=new Mn(es,"OverflowEllipsis",1),Xp=new Mn(es,"FormatTrim",0),E1=new Mn(es,"FormatNone",0),xS=/[ \u200b\u00ad]/,Zv=new xr,b1=0,a0=new xr,Hv=0,Jp="...",F1="",ju=null,s0=!1;es.className="TextBlock";function Wv(){this.nc=!1,this.Hd=null,this.Xf=ri,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},es.getEllipsis=function(){return Jp},es.setEllipsis=function(a){Jp=a,a0=new xr,Hv=0},es.getBaseline=function(){return i0},es.setBaseline=function(a){i0=a},es.getUnderline=function(){return r0},es.setUnderline=function(a){r0=a},es.isValidFont=function(a){if(s0||(ju=As?new Gl(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},es.FormatNone=E1,es.FormatTrim=Xp,es.None=_v,es.OverflowClip=zv,es.OverflowEllipsis=o0,es.WrapBreakAll=C1,es.WrapDesiredSize=jv,es.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){Yt.call(this),this.Eg=null,this.qo="",this.Xg=Ea,this.Nk=si,this.Zg=this.Hd=null,this.Mk=Oo,this.Xf=ri,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;Vt(zu,Yt),zu.prototype.cloneProtected=function(a){Yt.prototype.cloneProtected.call(this,a),a.qo=this.qo,a.element=this.Eg,a.Xg=this.Xg.J(),a.Nk=this.Nk,a.Xf=this.Xf,a.Hd=this.Hd,a.Zg=this.Zg,a.Mk=this.Mk.J(),a.en=this.en,a.rl=this.rl},zu.prototype.qb=function(a){a===ri||a===er||a===Zo?this.imageStretch=a:Yt.prototype.qb.call(this,a)},zu.prototype.toString=function(){return"Picture("+this.source+")#"+nr(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new xr,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()||(xt(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=mi();for(var re=0;re<b;re++)z.push(ne[re]);if(y.hn)for(re=0;re<b;re++)ne=z[re],ne.Hd!==null&&ne.Hd(ne,x);Di(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}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 Ia;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,de=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,be=this.Nk,Ae=this.Mk;switch(be){case ri:if(this.sourceRect.w())break;pe>=E.width&&(z=z+Ae.offsetX+(pe*Ae.x-E.width*Ae.x)),we>=E.height&&(ne=ne+Ae.offsetY+(we*Ae.y-E.height*Ae.y)),oe=Math.min(E.width,pe),re=Math.min(E.height,we);break;case si:pe=E.width,we=E.height;break;case er:case Zo:be===er?(be=Math.min(E.height/we,E.width/pe),pe*=be,we*=be):be===Zo&&(be=Math.max(E.height/we,E.width/pe),pe*=be,we*=be,pe>=E.width&&(z=(z+Ae.offsetX+(pe*Ae.x-E.width*Ae.x)/pe)*oe),we>=E.height&&(ne=(ne+Ae.offsetY+(we*Ae.y-E.height*Ae.y)/we)*re),oe*=1/(pe/E.width),re*=1/(we/E.height),pe=E.width,we=E.height)}be=this.Df()*y.scale;var _e=pe*be*we*be,pt=oe*re/_e,nt=x.__goCache;be=null;var Bt=SS;if(!b){if(x.sq&&nt!==void 0&&4<_e&&pt>Bt*Bt)for(nt.gi===null&&(L1(nt,4,ue,de,x),L1(nt,16,ue,de,x)),b=nt.gi,ue=b.length,de=0;de<ue&&b[de].ratio*b[de].ratio<pt;de++)be=b[de];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Gl(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?Ae.offsetX+(E.width*Ae.x-pe*Ae.x):0,Ae=we<E.height?Ae.offsetY+(E.height*Ae.y-we*Ae.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&&be!==null&&be.ratio!==1){a.save(),y=be.ratio;try{a.drawImage(be.source,z/y,ne/y,Math.min(be.source.width,oe/y),Math.min(be.source.height,re/y),b,Ae,Math.min(E.width,pe),Math.min(E.height,we)),a instanceof Ia&&(this.bt=[z/y,ne/y,Math.min(be.source.width,oe/y),Math.min(be.source.height,re/y),b,Ae,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,Ae,Math.min(E.width,pe),Math.min(E.height,we)),a instanceof Ia&&(this.bt=[z,ne,oe,re,b,Ae,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===si||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===si||z===Fr?(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)),Ss(this.dc,a,y),this.Ge(0,0,a,y)},zu.prototype.eh=function(a,y,x,E){ru(this,a,y,x,E)},Qe.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||Ft("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 Xn),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()||(xt(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(As){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<l0&&(fp(),x=hp),E=qn("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 xr,zu.clearCache=fp;function M1(){this.gi=null}function L1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Gl(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 rn,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new rn,this.mc=null};function pp(a,y,x,E,b,z){a.mc=new So,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 hr(ji);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 hr(ki);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Vh(a,y,x,E,b,z,ne){var re;re===void 0&&(re=!1);var oe=new hr(Zr);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 hr(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 hr(br);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 hr(Cr,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 rn(rn.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 rn(rn.u),E.endX=y,E.endY=x,E.defaultStretch=er,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 rn().add(new So(a,0,!0).add(new hr(ki,y-a,0)).add(new hr(Zr,y,a,y-z,0,y,z)).add(new hr(ki,y,x-a)).add(new hr(Zr,y-a,x,y,x-z,y-z,x)).add(new hr(ki,a,x)).add(new hr(Zr,0,x-a,z,x,0,x-z)).add(new hr(ki,0,a)).add(new hr(Zr,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Ji(0,0,z,z),b.spot2=new Ji(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 rn(rn.F),E.endX=y,E.endY=x,E.spot1=Da,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 rn(rn.F),E.endX=y,E.endY=x,E.spot1=Da,E.spot2=Ha,E.defaultStretch=er,tt.Nf<tt.vm&&(tt.Mf[a]=E,tt.Nf++)),E}),cu("TriangleRight",function(a,y,x){return new rn().add(new So(0,0).add(new hr(ki,y,.5*x)).add(new hr(ki,0,x).close())).pm(0,.25,.5,.75)}),cu("TriangleDown",function(a,y,x){return new rn().add(new So(0,0).add(new hr(ki,y,0)).add(new hr(ki,.5*y,x).close())).pm(.25,0,.75,.5)}),cu("TriangleLeft",function(a,y,x){return new rn().add(new So(y,x).add(new hr(ki,0,.5*x)).add(new hr(ki,y,0).close())).pm(.5,.25,1,.75)}),cu("TriangleUp",function(a,y,x){return new rn().add(new So(y,x).add(new hr(ki,0,x)).add(new hr(ki,.5*y,0).close())).pm(.25,.5,.75,1)}),cu("Triangle","TriangleUp"),cu("Diamond",function(a,y,x){return new rn().add(new So(.5*y,0).add(new hr(ki,0,.5*x)).add(new hr(ki,.5*y,x)).add(new hr(ki,y,.5*x).close())).pm(.25,.25,.75,.75)}),cu("LineH",function(a,y,x){return a=new rn(rn.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 rn(rn.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 rn().add(new So(0,x/2,!1).add(new hr(ki,y,x/2)).add(new hr(ji,y/2,0)).add(new hr(ki,y/2,x)))}),cu("XLine",function(a,y,x){return new rn().add(new So(0,x,!1).add(new hr(ki,y,0)).add(new hr(ji,0,0)).add(new hr(ki,y,x)))}),cu("LineRight",function(a,y,x){return new rn().add(new So(.25*y,0,!1).add(new hr(ki,.75*y,.5*x)).add(new hr(ki,.25*y,x)))}),cu("LineDown",function(a,y,x){return new rn().add(new So(0,.25*x,!1).add(new hr(ki,.5*y,.75*x)).add(new hr(ki,y,.25*x)))}),cu("LineLeft",function(a,y,x){return new rn().add(new So(.75*y,0,!1).add(new hr(ki,.25*y,.5*x)).add(new hr(ki,.75*y,x)))}),cu("LineUp",function(a,y,x){return new rn().add(new So(0,.75*x,!1).add(new hr(ki,.5*y,.25*x)).add(new hr(ki,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=Qa,this.ir=null,this.jr="",this.lr=Bi,this.Gq="",this.Hq=Us,this.Pq=va,this.Kq=Ma,this.Up=null,this.Cq=127,this.zr=hs,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 ll||typeof a=="string"?ci.call(this,a):(ci.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 ot(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Dn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Vt(Sr,ci),Sr.prototype.cloneProtected=function(a){ci.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},Be=Sr.prototype,Be.Af=function(a){ci.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Be.toString=function(){var a=Ai(this.constructor)+"#"+nr(this);return this.data!==null&&(a+="("+gr(this.data)+")"),a};function Zu(a){a.P===null?a.P=new Gv:a.P.nc&&(a.P=a.P.copy())}Be.th=function(){ci.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Be.gk=function(a,y,x,E,b,z,ne){var re=this.diagram;re!==null&&(a===xa&&y==="elements"?b instanceof ci?Jf(b,function(oe){vy(re.partManager,oe),zh(re,oe)}):yh(re,b):a===Wa&&y==="elements"&&(b instanceof ci?Jf(b,function(oe){yy(re.partManager,oe,re)}):vg(re,b)),re.cb(a,y,x,E,b,z,ne))},Be.La=function(a){if(ci.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 ci&&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 Ki),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=mi();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Di(y)}},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=ci.Link),x.adornedObject=y)}if(x!==null){x.type===ci.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){Kv(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=Dn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Dn.free(E),Kv(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 Jt);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=Oo;this.locationSpot.sb()&&(z=this.locationSpot);var ne=ot.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),ot.free(ne)}},Sr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Sr.prototype.moveTo=function(a,y,x){a=ot.allocAt(a,y),this.move(a,x),ot.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 Ki),y.I(a)!==null)return y.I(a);var x=ci.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Kh(a,y,x,E){E===void 0&&(E=new ot),x=x.Mc()?Oo: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 Dn),a.assign(this.actualBounds)},Sr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function I1(a){var y=ot.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(It(this)===!1)D1(this);else{Zt(this,!1);var a=this.Ib,y=Dn.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),Dn.free(y),Kv(this,!1)}},Be=Sr.prototype,Be.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Dn.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),Dn.free(b)}!(this.G&65536)&&a.D(y)||_1(this,E,x),x.N(),!a.w()&&!y.w()||Ol(a,y)||(this instanceof Ii&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Be.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 ot(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Pf(this)===!1&&It(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 ot(E,b),x))}Be.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;Pf(this)||It(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)},Be.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,ot.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 ot(z,ne),y),E||y.x===z&&y.y===ne||a.g("position",new ot(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 Ii&&Sh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?wf(a)?(eu(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Be.si=function(){return!0},Be.Zc=function(){return!0},Be.ph=function(){return!1},Be.Dd=function(){return!0};function Vv(a,y,x,E){y.constructor===a.constructor||Z1||(Z1=!0,Ci('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Ci(" Old class: "+Ai(a.constructor)+", new class: "+Ai(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 Ii&&(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 Ii&&(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 Kv(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}Be=Sr.prototype,Be.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}Be.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Be.N=function(){var a=this.diagram;a!==null&&!It(this)&&!Pf(this)&&this.isVisible()&&this.Ib.w()&&a.N(eg(this,this.Ib))},Be.v=function(){ci.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Ii&&this.labeledLink!==null&&uu(this.labeledLink),a.$b(!0))},Be.Vo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},Be.Wo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},Be.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Be.oz=function(){return Yv(this,this)};function Yv(a,y){var x=y.containingGroup;return x!==null?1+Yv(a,x):y instanceof Ii&&(y=y.labeledLink,y!==null)?Yv(a,y):0}Be.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof Ii&&(x=y.labeledLink,x!==null)?j1(a,x):y}Be.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 Ii&&(y=y.labeledLink,y!==null)?Xv(a,y,x):!1:!0}Be.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 Ii){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 Ii&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof ho&&h0(y,!1),y instanceof Ii&&(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 Ii&&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 Ii&&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 Ii){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 gi)for(y=y.labelNodes;y.next();)Cf(a,y.value,x,E,b,z)}}Qe.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?Vr: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(Wa,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(xa,"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!==ci.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:va},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,It(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&&Vv(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 gi||(E=this.location.copy(),Vv(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){Vv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var 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 gi?(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:Qa},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&&Ft("Cannot make a Group a member of itself: "+this.toString()),Ft("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 Xn,Cf(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Ii)for(E=E.linksConnected;E.next();)mp(E.value)}if(this instanceof Ii){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 Ft("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 Ii&&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:hs},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 ll||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)}Vt(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 gi&&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||!It(a))},pa.prototype.Zc=function(){return!1},pa.prototype.gk=function(a,y,x,E,b,z,ne){if(a===xa&&y==="elements"){if(b instanceof Cu)this.$a===null&&(this.$a=b);else if(b instanceof ci){var re=b.Nl(function(oe){return oe instanceof Cu});re instanceof Cu&&this.$a===null&&(this.$a=re)}}else a===Wa&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof ci&&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(){},Qe.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=jl,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 Ii(a,y){a===void 0||a instanceof ll||typeof a=="string"?Sr.call(this,a):(Sr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Yn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Vt(Ii,Sr),Ii.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())},Be=Ii.prototype,Be.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())}Be.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 Xn),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}Be.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},Be.gk=function(a,y,x,E,b,z,ne){a===xa&&y==="elements"?this.wc=null:a===Wa&&y==="elements"&&(this.wc=null),Sr.prototype.gk.call(this,a,y,x,E,b,z,ne)},Be.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)}}Be.si=function(){return!0},Ii.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Ii.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Ii.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===Vs){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},Ii.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)}},Ii.prototype.qx=function(){var a=new Xn,y=new Xn;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)})}}Ii.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new kr(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Be=Ii.prototype,Be.Mo=function(a){a===void 0&&(a=null);var y=new kr(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Be.Sd=function(a){a===void 0&&(a=null);var y=new kr(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Be.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 Xn,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 Xn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new jr(x):Vr},Be.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 Xn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new jr(x):Vr},Be.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 Xn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new jr(x):Vr},Be.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new kr(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},Be.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new kr(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}}}Ii.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Be=Ii.prototype,Be.Vo=function(a){Sr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&ex(a,this))},Be.Wo=function(a){Sr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Be.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)},Be.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new Ki:a.wc.clear(),a.qm(a,function(y,x){K1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function K1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function 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=mi()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Di(x)}}}Be.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},Be.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}},Be.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},Be.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},Be.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Ii)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},Be.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 Xn;return a(this,y),y},Be.uz=function(){return U1(this,this)};function U1(a,y){return y=y.pg(),y===null?0:1+U1(a,y)}Be.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new kr(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},Be.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 Yn,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 Yn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new jr(x):Vr},Be.wz=function(a){a===void 0&&(a=1/0);var y=new Xn;return Cf(y,this,!1,a,!0),y},Ii.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 Xn;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 de=y.contains(ue);if(de||y.add(ue),ne){var pe=x?ue.Oo():ue.Po();oe.uv=a,pe.all(function(we){return function(be){return be===we.uv||!be.isTreeExpanded}}(oe))&&E.Aj(ue,b),ue.oh(),ue.Zb(!1)}ue.isTreeExpanded&&(ue.wasTreeExpanded=ue.isTreeExpanded,de||X1(ue,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}Ii.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 Xn;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 de=oe.value;if(de.isTreeLink&&(re||de.fd||de.bb(),de=de.To(a),de!==null&&de!==a&&!y.contains(de))){if(y.add(de),!re){de.Zb(!0),de.oh();var pe=x?de.Oo():de.Po();ue.vv=a,pe.all(function(we){return function(be){return be===we.vv||!be.isTreeExpanded}}(ue))&&b.Cj(de,z)}(2<E||de.wasTreeExpanded)&&(de.wasTreeExpanded=!1,J1(de,y,x,E-1,b,z,ne))}ue={vv:ue.vv}}a.isTreeExpanded=!0}Qe.Object.defineProperties(Ii.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:jl},set:function(a){typeof a=="number"&&(a=new dr(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&&V1(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))}}}),Ii.prototype.expandTree=Ii.prototype.expandTree,Ii.prototype.collapseTree=Ii.prototype.collapseTree,Ii.prototype.findTreeParts=Ii.prototype.wz,Ii.prototype.findTreeChildrenNodes=Ii.prototype.Ou,Ii.prototype.findTreeChildrenLinks=Ii.prototype.Qo,Ii.prototype.findTreeLevel=Ii.prototype.uz,Ii.prototype.findTreeParentChain=Ii.prototype.vz,Ii.prototype.findTreeParentNode=Ii.prototype.pg,Ii.prototype.findTreeParentLink=Ii.prototype.kh,Ii.prototype.findCommonTreeParent=Ii.prototype.gz,Ii.prototype.findTreeRoot=Ii.prototype.xz,Ii.prototype.isInTreeOf=Ii.prototype.Nz,Ii.prototype.findPort=Ii.prototype.ns,Ii.prototype.findLinksTo=Ii.prototype.kz,Ii.prototype.findLinksBetween=Ii.prototype.jz,Ii.prototype.findNodesInto=Ii.prototype.Oo,Ii.prototype.findNodesOutOf=Ii.prototype.Po,Ii.prototype.findNodesConnected=Ii.prototype.Mu,Ii.prototype.findLinksInto=Ii.prototype.Sd,Ii.prototype.findLinksOutOf=Ii.prototype.Mo,Ii.prototype.findExternalTreeLinksConnected=Ii.prototype.qx,Ii.prototype.invalidateConnectedLinks=Ii.prototype.Bd,Ii.prototype.invalidateLinkBundle=Ii.prototype.Lz;var ES=new Mn(Ii,"SpreadingNone",10),p0=new Mn(Ii,"SpreadingEvenly",11),qv=new Mn(Ii,"SpreadingPacked",12);Ii.className="Node",Ii.SpreadingNone=ES,Ii.SpreadingEvenly=p0,Ii.SpreadingPacked=qv;function ho(a,y){a===void 0||a instanceof ll||typeof a=="string"?Ii.call(this,a):(Ii.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Xn,this.$a=null,this.Sc=new xs,this.Sc.group=this,this.gl=new Xn,this.tb=this.$p=null,y&&Object.assign(this,y)}Vt(ho,Ii),ho.prototype.cloneProtected=function(a){Ii.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())},Be=ho.prototype,Be.Af=function(a){Ii.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 Ii)x.Bd(y);else if(x instanceof gi)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Be.gk=function(a,y,x,E,b,z,ne){if(a===xa&&y==="elements"){if(b instanceof Cu)this.$a===null?this.$a=b:this.$a!==b&&Ft("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof ci){var re=b.Nl(function(oe){return oe instanceof Cu});re instanceof Cu&&(this.$a===null?this.$a=re:this.$a!==re&&Ft("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Wa&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof ci&&this.$a.rg(E)&&(this.$a=null));Ii.prototype.gk.call(this,a,y,x,E,b,z,ne)},Be.Xl=function(a,y){Ii.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==ci.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof ci&&(a=a.Pb()),this.tb===null&&(this.tb=new Dn),a.mi(this.tb),a instanceof Co&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Be.eh=function(a,y,x,E){this.nf=this.$a,Ii.prototype.eh.call(this,a,y,x,E)},Be.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof gi||y.Va()}),Ii.prototype.Va.call(this)},Be.si=function(){if(!Ii.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Ii){if(y.isVisible()&&It(y))return!1}else if(y instanceof gi&&y.isVisible()&&It(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 gi&&!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 gi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Be.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)}Ii.prototype.Lj.call(this)},ho.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=In(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=In(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))},Be=ho.prototype,Be.Bd=function(a){var y=(this.U&65536)!==0;if(Ii.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()))}}},Be.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 Xn,E=y.iterator;E.next();){var b=E.value;if(b instanceof Ii)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Be.iz=function(){var a=this.Rj();a.add(this);for(var y=new Xn,x=a.iterator;x.next();){var E=x.value;if(E instanceof Ii)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},Be.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Xn;return a(this,y),y},Be.Rj=function(){var a=new Xn;return Cf(a,this,!0,0,!0),a.remove(this),a},Be.Zb=function(a){Ii.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 Ii)z.Bd(y),x.Aj(z,E);else if(z instanceof gi)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 Ii)z.Bd(y),x.Cj(z,E);else if(z instanceof gi)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=ot.alloc(),Ii.prototype.move.call(this,a,y),a=new Xn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof gi&&(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 Ii&&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 gi&&(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());ot.free(z)}},Qe.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&&Ft("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){Yt.call(this),this.yb=sl,this.ko=new Dn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Vt(Cu,Yt),Cu.prototype.cloneProtected=function(a){Yt.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 Ba(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)||Ft("Placeholder is not inside a Group or Adornment."),a instanceof ho){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Ss(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=ot.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),ot.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!==ci.Link&&(re=z.ga(a.category==="Selection"?Us:a.locationSpot,ot.alloc()),a.location=re,ot.free(re)),isNaN(ue)||isNaN(ne)?(a=z.ga(Us,ot.alloc()),ue=Dn.allocAt(a.x,a.y,0,0),ue.Ye(z.ga(On,a)),ue.Ye(z.ga(kl,a)),ue.Ye(z.ga(zl,a)),Ss(y,ue.width+E||0,ue.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),ot.free(a),Dn.free(ue)):(Ss(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=Dn.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)),Dn.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 gi&&(!y.computesBoundsIncludingLinks||St(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},Qe.Object.defineProperties(Cu.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new dr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Cu.className="Placeholder";function gi(a){Sr.call(this,ci.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 Yn().freeze(),this.Tg=this.Mg=null,this.ml=new Dn,this.ua=new rn,this.u=this.o=this.Sf=this.Wf=null,this.su=new ot,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Vt(gi,Sr),gi.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())},Be=gi.prototype,Be.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)},Be.qb=function(a){a.classType===gi?(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&&Ft("Unknown Link enum value for a Link property: "+a):Sr.prototype.qb.call(this,a)},Be.Xc=function(){this.ba===null&&(this.ba=new yo)},Be.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),It(a)||Pf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),It(a)||Pf(a)))},Be.zv=function(){return!1},Be.Av=function(){},Be.Zc=function(){return!1},gi.prototype.computeAngle=function(a,y,x){return gi.computeAngle(y,x)},gi.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}Be=gi.prototype,Be.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Sr.prototype.oh.call(this)},Be.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Be.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function ex(a,y){a.wd===null&&(a.wd=new Xn),a.wd.add(y),a.v()}Be.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)}},Be.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)}},Be.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))},gi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},gi.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=ot.allocAt(x.x+E,x.y+b),Sr.prototype.move.call(this,a,!1),ot.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)},gi.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},gi.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},gi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ga),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},gi.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)},Be=gi.prototype,Be.i=function(a){return this.Nb.s[a]},Be.dd=function(a,y){this.Nb.cd(a,y)},Be.L=function(a,y,x){this.Nb.cd(a,new ot(y,x))},Be.Kz=function(a,y){this.Nb.Gb(a,y)},Be.m=function(a,y,x){this.Nb.Gb(a,new ot(y,x))},Be.ne=function(a){this.Nb.add(a)},Be.yf=function(a,y){this.Nb.add(new ot(a,y))},Be.pv=function(a){this.Nb.mb(a)},Be.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 Yn,z=a.Nb.iterator;z.next();){var ne=z.value;b.add(new ot(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&&is(ne.animationManager,a,b),a.g("points",z,b)}}Be.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Be.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,de=0;de<ue;de++){var pe=oe[de];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(de=b[z],pe=oe[z],de.x-x!==pe.x-ne||de.y-E!==pe.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&is(x.animationManager,this,y),m0(this),this.g("points",a,y)}},Be.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))}Be.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())}},Be.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()}}},gi.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kg||(kg=new Ii,kg.desiredSize=no,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 Ii,Tg.desiredSize=no,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,de=this.isOrthogonal,pe=this.curve===Ec;this.Wf=ue&&!de?pe=!0:!1;var we=this.computeAdjusting()===Eu||ue;if(!de&&!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=de=0;var be=z.x+re/3,Ae=z.y+oe/3,_e=be,pt=Ae;tt.B(oe,0)?pt=0<re?pt-ue:pt+ue:(de=-re/oe,pe=Math.sqrt(ue*ue/(de*de+1)),0>ue&&(pe=-pe),_e=(0>oe?-1:1)*pe+be,pt=de*(_e-be)+Ae),be=z.x+2*re/3,Ae=z.y+2*oe/3;var nt=be,Bt=Ae;tt.B(oe,0)?Bt=0<re?Bt-ue:Bt+ue:(nt=(0>oe?-1:1)*pe+be,Bt=de*(nt-be)+Ae),this.Fj(),this.ne(z),this.yf(_e,pt),this.yf(nt,Bt),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=Dn.alloc(),y.mi(re),oe=re.ca(b),we.mi(re),ue=re.ca(E),(oe||ue)&&(ne=y.ga(y0(ne),new ot),this.dd(0,this.getLinkPointFromPoint(a,y,ne,b,!0,ne)),x=we.ga(y0(x),new ot),this.dd(1,this.getLinkPointFromPoint(z,we,x,E,!1,x))),Dn.free(re))}else{pe=this.isAvoiding,we&&(de&&pe||ue)&&this.Fj();var At=ue?this.computeCurviness():0;pe=this.getLinkPoint(a,y,ne,!0,de,E,b),be=_e=Ae=0,(de||!re||ue)&&(pt=this.computeEndSegmentLength(a,y,ne,!0),be=this.getLinkDirection(a,y,pe,ne,!0,de,E,b),ue&&(re||ne.D(x)||!de&&ne.x+x.x===1&&ne.y+x.y===1)&&(be-=de?90:30,0>At&&(be-=180)),0>be?be+=360:360<=be&&(be-=360),ue&&(pt+=Math.abs(At)*(de?1:2)),be===0?Ae=pt:be===90?_e=pt:be===180?Ae=-pt:be===270?_e=-pt:(Ae=pt*Math.cos(be*Math.PI/180),_e=pt*Math.sin(be*Math.PI/180)),ne.Mc()&&ue&&(pt=y.ga(Oo,ot.alloc()),nt=ot.allocAt(pt.x+1e3*Ae,pt.y+1e3*_e),this.getLinkPointFromPoint(a,y,pt,nt,!0,pe),ot.free(pt),ot.free(nt))),pt=this.getLinkPoint(E,b,x,!1,de,a,y);var kt=Bt=nt=0;if(de||!oe||ue){var Ut=this.computeEndSegmentLength(E,b,x,!1);kt=this.getLinkDirection(E,b,pt,x,!1,de,a,y),ue&&(oe||ne.D(x)||!de&&ne.x+x.x===1&&ne.y+x.y===1)&&(kt+=de?0:30,0>At&&(kt+=180)),0>kt?kt+=360:360<=kt&&(kt-=360),ue&&(Ut+=Math.abs(At)*(de?1:2)),kt===0?nt=Ut:kt===90?Bt=Ut:kt===180?nt=-Ut:kt===270?Bt=-Ut:(nt=Ut*Math.cos(kt*Math.PI/180),Bt=Ut*Math.sin(kt*Math.PI/180)),x.Mc()&&ue&&(x=b.ga(Oo,ot.alloc()),ne=ot.allocAt(x.x+1e3*nt,x.y+1e3*Bt),this.getLinkPointFromPoint(E,b,x,ne,!1,pt),ot.free(x),ot.free(ne))}x=pe,(de||!re||ue)&&(x=new ot(pe.x+Ae,pe.y+_e)),ne=pt,(de||!oe||ue)&&(ne=new ot(pt.x+nt,pt.y+Bt)),!we&&!de&&re&&3<z&&this.adjustPoints(0,pe,z-2,ne)?this.dd(z-1,pt):!we&&!de&&oe&&3<z&&this.adjustPoints(1,x,z-1,pt)?this.dd(0,pe):!we&&(de?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ne)?(this.dd(0,pe),this.dd(z-1,pt)):(this.Fj(),this.ne(pe),(de||!re||ue)&&this.ne(x),de&&this.addOrthoPoints(x,be,ne,kt,a,E),(de||!oe||ue)&&this.ne(ne),this.ne(pt))}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}gi.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new ot),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,de=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+de,E=E.x*re+E.y*ue+pe,ne=x.x*ne+x.y*oe+de,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)}gi.prototype.getLinkPoint=function(a,y,x,E,b,z,ne,re){if(re===void 0&&(re=new ot),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=ot.alloc(),ue=ot.alloc();var de=new Dn(y.ga(Us,oe),y.ga(On,ue)),pe=this.computeSpot(!E,ne);a=this.getLinkPoint(z,ne,pe,!E,b,a,y,ue),(x.Hf(Qi)||x.Hf(Vi))&&a.y>=de.y&&a.y<=de.y+de.height?re.y=a.y:(x.Hf(ai)||x.Hf(Ri))&&a.x>=de.x&&a.x<=de.x+de.width&&(re.x=a.x),ot.free(oe),ot.free(ue)}}return re}}return x=y.ga(y0(x),ot.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=ot.alloc(),ne=ne.ga(y0(oe),z),b&&(ne=ny(x,ne)),ot.free(z)),this.getLinkPointFromPoint(a,y,x,ne,E,re),ot.free(x),re},gi.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(Oo,ot.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=ot.alloc(),re=re.ga(Oo,x),ot.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,ot.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},gi.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)},gi.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Oo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Bi?Cs:y)):(a=y||this.toPort,a===null?a=Oo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Bi?Cs:y)),a};function vp(a){return a===Cs||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:Oo}gi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Eu&&4<this.pointsCount?this.computeMidPoint(new ot):(a=y.Zn,a=a!==null?lx(a,this):null,a!==null?a.Zo:y.ga(Oo))},gi.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},gi.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=Jt.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Fv(this,y,x,b),z===void 0&&Jt.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 de=oe[ue];if(de.visible||de===this.locationObject){var pe=de.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=Jt.alloc(),pe.set(ne),de instanceof ci)re=de.Cf(a,y,x,E,b,pe);else if(this.path===de){if(de instanceof Co)if(re=a,we=E,de.pickable===!1)re=!1;else if(pe.multiply(de.transform),we)e:{var be=re,Ae=pe;if(de.fh(be,Ae))re=!0;else{if(Ae===void 0&&(Ae=de.transform,be.Re(de.actualBounds))){re=!0;break e}re=be.left,we=be.right;var _e=be.top;be=be.bottom;var pt=ot.alloc(),nt=ot.alloc(),Bt=ot.alloc(),At=Jt.alloc();At.set(Ae),At.bv(de.transform),At.Vj(),nt.x=we,nt.y=_e,nt.transform(At),pt.x=re,pt.y=_e,pt.transform(At),Ae=!1,qf(de,pt,nt,Bt)?Ae=!0:(pt.x=we,pt.y=be,pt.transform(At),qf(de,pt,nt,Bt)?Ae=!0:(nt.x=re,nt.y=be,nt.transform(At),qf(de,pt,nt,Bt)?Ae=!0:(pt.x=re,pt.y=_e,pt.transform(At),qf(de,pt,nt,Bt)&&(Ae=!0)))),Jt.free(At),ot.free(pt),ot.free(nt),ot.free(Bt),re=Ae}}else re=de.fh(re,pe)}else re=rl(de,a,E,pe);re&&(we=de,y!==null&&(we=y(de)),we&&(x===null||x(we))&&b.add(we)),Jt.free(pe)}}}return z===void 0&&Jt.free(ne),re||this.background!==null||this.areaBackground!==null}return z===void 0&&Jt.free(ne),!1},gi.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},gi.prototype.computeCorner=function(){if(this.curve===Ec)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},gi.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},gi.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(Oo).ab(x.ga(Oo))/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},gi.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Eu&&x.bb()}},gi.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=ix;var y=this.Sf;if(y!==null){for(var x=mi(),E=0,b=y.links,z=0;z<b.length;z++){var ne=b[z].computeSpacing();x.push(ne),E+=ne}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),Di(x)}}return a},gi.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},gi.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},gi.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 de=0>oe?-Math.PI/2:Math.PI/2;else de=Math.atan(oe/Math.abs(re)),0>re&&(de=Math.PI-de);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,de=we-de,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+de,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,de=y.y,oe=E.x,we=E.y;var be=1;if(oe-re!==0){var Ae=(we-de)/(oe-re);be=Math.sqrt(1+1/(Ae*Ae))}else Ae=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var _e=y.x,pt=y.y,nt=.5;ue!==0&&(nt=((b-_e)*(b-ne)+(z-pt)*(z-pe))/ue);var Bt=b+nt*(ne-b),At=z+nt*(pe-z);y=Math.sqrt((_e-Bt)*(_e-Bt)+(pt-At)*(pt-At)),pt<Ae*(_e-Bt)+At&&(y=-y),0<Ae&&(y=-y),_e=re+nt*(oe-re),nt=de+nt*(we-de),Ae!==0?(y=_e+y/be,this.L(a,y,nt-(y-_e)/Ae)):this.L(a,_e,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,de=z.y,pe=re,ue=de,tt.B(b.y,z.y)?tt.B(z.x,ne.x)?de=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)&&(de=y.y)),this.L(a+1,re,de),b=this.i(x),z=this.i(x-1),ne=this.i(x-2),re=z.x,de=z.y,oe=re,we=de,tt.B(b.y,z.y)?tt.B(z.x,ne.x)?de=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)&&(de=E.y)),this.L(x-1,re,de),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}},gi.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=ot.alloc(),de=ot.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),de.h(x.x,(a.y+x.y)/2),E===180?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),de.x=ue.x,de.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,de.x=ue.x,de.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),de.y=ue.y)):(ue.h(a.x,x.y),de.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)),de.x=x.x,de.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),de.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)),de.x=x.x,de.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),de.h(x.x,(a.y+x.y)/2),E===0?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),de.x=ue.x,de.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,de.x=ue.x,de.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),de.y=ue.y)):(ue.h(a.x,x.y),de.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)),de.x=x.x,de.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),de.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)),de.x=x.x,de.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),de.h((a.x+x.x)/2,x.y),E===270?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),de.x=x.x,de.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,de.x=x.x,de.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,de.x=ue.x)):(ue.h(x.x,a.y),de.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)),de.x=ue.x,de.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)),de.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)),de.x=ue.x,de.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),de.h((a.x+x.x)/2,x.y),E===90?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),de.x=x.x,de.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,de.x=x.x,de.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,de.x=ue.x)):(ue.h(x.x,a.y),de.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)),de.x=ue.x,de.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)),de.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)),de.x=ue.x,de.y=x.y)));var pe=x;if(this.isAvoiding){var we=this.diagram;if(we===null||b===z||this.layer.isTemporary||!Vf(we)||re.ca(pe)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var be=gf(we,!0,this.containingGroup,null);if(this.segmentIndex!==17&&be.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))&&be.Yj(Math.min(ue.x,de.x),Math.min(ue.y,de.y),Math.abs(ue.x-de.x),Math.abs(ue.y-de.y))&&be.Yj(Math.min(de.x,pe.x),Math.min(de.y,pe.y),Math.abs(de.x-pe.x),Math.abs(de.y-pe.y)))y=!1;else{b=a,z=pe;var Ae=x=null;if(we.isVirtualized){we=be.bounds.copy(),we.Bc(-be.Ho,-be.Go);var _e=ot.alloc();xp(be,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,_e)?(x=a=_e.copy(),y=_e.ab(ue)):tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,de.x,de.y,_e)?(x=a=_e.copy(),y=_e.ab(de)):tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,de.x,de.y,pe.x,pe.y,_e)&&(x=a=_e.copy(),y=_e.ab(pe))),xp(be,pe.x,pe.y)||(tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,pe.x,pe.y,de.x,de.y,_e)?(Ae=pe=_e.copy(),E=de.ab(_e)):tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,de.x,de.y,ue.x,ue.y,_e)?(Ae=pe=_e.copy(),E=ue.ab(_e)):tt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,a.x,a.y,_e)&&(Ae=pe=_e.copy(),E=a.ab(_e))),ot.free(_e)}re=re.copy().ed(oe),re.Bc(be.Ho*be.Os,be.Go*be.Os),ax(be,a,y,pe,E,re,!0),oe=th(be,pe.x,pe.y),!be.abort&&oe>=Sp&&(ox(be),re.Bc(be.Ho*be.Hx,be.Go*be.Ix),ax(be,a,y,pe,E,re,!1),oe=th(be,pe.x,pe.y)),!be.abort&&oe<Sp&&th(be,pe.x,pe.y)!==Jh?(ry(this,be,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)<=be.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)<=be.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)),Ae!==null&&(E===0||E===180?this.yf(z.x,Ae.y):this.yf(Ae.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ue.copy()),this.ne(de.copy())),ot.free(ue),ot.free(de)}},gi.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||!Vf(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),de=x,pe=E;for(b===0?de+=re:b===90?pe+=oe:b===180?de-=re:pe-=oe,b!==ne&&ue>ng&&th(y,de,pe)!==ue-1&&(th(y,x-re,E)===ue-1?(b=180,de=x-re,pe=E):th(y,x+re,E)===ue-1?(b=0,de=x+re,pe=E):th(y,x,E-oe)===ue-1?(b=270,de=x,pe=E-oe):th(y,x,E+oe)===ue-1&&(b=90,de=x,pe=E+oe));ue>ng&&th(y,de,pe)===ue-1;)x=de,E=pe,b===0?de+=re:b===90?pe+=oe:b===180?de-=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,de=E,b===0?(z=90,de+=oe):b===90?(z=180,ne-=re):b===180?(z=270,de-=oe):b===270&&(z=0,ne+=re),th(y,ne,de)===ue-1?ry(a,y,ne,de,z,!1,z):(ne=x,de=E,b===0?(z=270,de-=oe):b===90?(z=0,ne+=re):b===180?(z=90,de+=oe):b===270&&(z=180,ne-=re),th(y,ne,de)===ue-1&&ry(a,y,ne,de,z,!1,z))),a.yf(x,E)}gi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Na(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=Na(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ne,b=re)}return z},gi.prototype.qc=function(){this.lk=!1,this.v()},gi.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)}}},gi.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=rn.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)),Vh(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=ot.allocAt(E,oe),x=ot.alloc(),x.assign(this.i(1)),z=ot.allocAt(E,oe),b=ot.allocAt(E,oe),ne=this.i(0);for(var ue,de=this.smoothness/3,pe=1;pe<this.pointsCount-1;pe++){ue=this.i(pe);var we=ne,be=ue,Ae=this.i(oy(this,ue,pe,!1));if((!tt.$(we.x,be.x)||!tt.$(be.x,Ae.x))&&(!tt.$(we.y,be.y)||!tt.$(be.y,Ae.y))){var _e=de;isNaN(_e)&&(_e=this.smoothness/3);var pt=we.x;we=we.y;var nt=be.x;be=be.y;var Bt=Ae.x;Ae=Ae.y;var At=_e*x0(pt,we,nt,be);_e*=x0(nt,be,Bt,Ae),tt.$(we,be)&&tt.$(nt,Bt)&&(nt>pt?Ae>be?(z.x=nt-At,z.y=be-At,b.x=nt+_e,b.y=be+_e):(z.x=nt-At,z.y=be+At,b.x=nt+_e,b.y=be-_e):Ae>be?(z.x=nt+At,z.y=be-At,b.x=nt-_e,b.y=be+_e):(z.x=nt+At,z.y=be+At,b.x=nt-_e,b.y=be-_e)),tt.$(pt,nt)&&tt.$(be,Ae)&&(be>we?(Bt>nt?(z.x=nt-At,z.y=be-At,b.x=nt+_e):(z.x=nt+At,z.y=be-At,b.x=nt-_e),b.y=be+_e):(Bt>nt?(z.x=nt-At,z.y=be+At,b.x=nt+_e):(z.x=nt+At,z.y=be+At,b.x=nt-_e),b.y=be-_e)),(tt.$(pt,nt)&&tt.$(nt,Bt)||tt.$(we,be)&&tt.$(be,Ae))&&(pt=.5*(pt+Bt),we=.5*(we+Ae),z.x=pt,z.y=we,b.x=pt,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)),Vh(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,de=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(de=Ig(this,de.copy(),!1,sa)),ue=.5*(ue+de.x),ne=.5*(ne+de.y),Vh(re,b.x-E,b.y-oe,ue-E,ne-oe,de.x-E,de.y-oe),ot.free(y),ot.free(x),ot.free(z),ot.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,sa)),Vh(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ne.x-E,ne.y-oe);else{for(z=ot.alloc(),z.assign(this.i(0)),b=ot.alloc(),b.assign(z),ne=this.computeCorner(),pe=1,ue=0;pe<y;){if(pe=oy(this,z,pe,1<pe),de=this.i(pe),pe>=y-1){if(!z.D(de))this.computeShortLength(!1)!==0&&(de=Ig(this,de.copy(),!1,sa)),Og(this,re,-E,-oe,z,de,x);else if(ue===0)for(pe=1;pe<y;)b.assign(z),de=this.i(pe++),Og(this,re,-E,-oe,z,de,x),z.assign(de);break}if(ue=oy(this,de,pe+1,pe<y-3),pe=-E,pt=-oe,we=de,nt=this.i(ue),_e=x,tt.B(z.y,we.y)&&tt.B(we.x,nt.x))if(Ae=Math.min(ne,Math.abs(we.x-b.x)/2),Ae=At=Math.min(Ae,Math.abs(nt.y-we.y)/2),tt.B(Ae,0))Og(this,re,pe,pt,z,we,_e),z.assign(we);else{var kt=we.x,Ut=we.y;be=kt,Bt=Ut,we.x>z.x?kt=we.x-Ae:kt=we.x+Ae,nt.y>we.y?Bt=we.y+At:Bt=we.y-At,nt=ot.allocAt(kt,Ut),Og(this,re,pe,pt,z,nt,_e),ot.free(nt),u0(re,we.x+pe,we.y+pt,be+pe,Bt+pt),z.h(be,Bt)}else tt.B(z.x,we.x)&&tt.B(we.y,nt.y)?(Ae=Math.min(ne,Math.abs(we.y-b.y)/2),Ae=At=Math.min(Ae,Math.abs(nt.x-we.x)/2),tt.B(At,0)?(Og(this,re,pe,pt,z,we,_e),z.assign(we)):(kt=we.x,Ut=we.y,be=kt,Bt=Ut,we.y>z.y?Ut=we.y-Ae:Ut=we.y+Ae,nt.x>we.x?be=we.x+At:be=we.x-At,nt=ot.allocAt(kt,Ut),Og(this,re,pe,pt,z,nt,_e),ot.free(nt),u0(re,we.x+pe,we.y+pt,be+pe,Bt+pt),z.h(be,Bt))):(Og(this,re,pe,pt,z,we,_e),z.assign(we));b.assign(de),pe=ue}ot.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=rn.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}gi.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 de=0;de<ue;){var pe=Math.max(b.x,Math.min(oe[de++]-re,z.x-ne));y.lineTo(pe+x,z.y+E);for(var we=pe+x,be=Math.min(pe+ne,z.x);de<ue&&(pe=oe[de],pe<be+ne);)de++,be=Math.min(pe+re,z.x);pe=z.y-ne+E,be+=x;var Ae=z.y+E;a.curve===Xh?pp(y,be,Ae,!1):Vh(y,we,pe,be,pe,be,Ae)}else for(--ue;0<=ue;){for(de=Math.min(b.x,Math.max(oe[ue--]+re,z.x+ne)),y.lineTo(de+x,z.y+E),we=de+x,pe=Math.max(de-ne,z.x);0<=ue&&(de=oe[ue],de>pe-ne);)ue--,pe=Math.max(de-re,z.x);de=z.y-ne+E,pe+=x,be=z.y+E,a.curve===Xh?pp(y,pe,be,!1):Vh(y,we,de,pe,de,pe,be)}else if(tt.B(b.x,z.x))if(b.y<z.y)for(de=0;de<ue;){for(pe=Math.max(b.y,Math.min(oe[de++]-re,z.y-ne)),y.lineTo(z.x+x,pe+E),we=pe+E,pe=Math.min(pe+ne,z.y);de<ue&&(be=oe[de],be<pe+ne);)de++,pe=Math.min(be+re,z.y);be=z.x-ne+x,Ae=z.x+x,pe+=E,a.curve===Xh?pp(y,Ae,pe,!1):Vh(y,be,we,be,pe,Ae,pe)}else for(--ue;0<=ue;){for(de=Math.min(b.y,Math.max(oe[ue--]+re,z.y+ne)),y.lineTo(z.x+x,de+E),we=de+E,de=Math.max(de-ne,z.y);0<=ue&&(pe=oe[ue],pe>de-ne);)ue--,de=Math.max(pe-re,z.y);pe=z.x-ne+x,be=z.x+x,de+=E,a.curve===Xh?pp(y,be,de,!1):Vh(y,pe,we,pe,de,be,de)}}}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 gi){if(oe===a)return 0<E.length&&E.sort(function(de,pe){return de-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(de,pe){return de-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=ot.alloc(),oe=1;oe<z;oe++){var ue=E.i(oe);if(oe<z-1){var de=E.i(oe+1);if(ne.y===ue.y&&ue.y===de.y){if(ue.x>ne.x&&de.x>=ue.x||ue.x<ne.x&&de.x<=ue.x)continue}else if(ne.x===ue.x&&ue.x===de.x&&(ue.y>ne.y&&de.y>=ue.y||ue.y<ne.y&&de.y<=ue.y))continue}e:{de=a.x;var pe=a.y,we=y.x,be=y.y,Ae=ne.x;ne=ne.y;var _e=ue.x,pt=ue.y;if(tt.B(de,we)){if(!tt.B(pe,be)&&tt.B(ne,pt)&&Math.min(pe,be)<ne&&Math.max(pe,be)>ne&&Math.min(Ae,_e)<de&&Math.max(Ae,_e)>de&&!tt.B(Ae,_e)){re.x=de,re.y=ne,de=!0;break e}}else if(tt.B(pe,be)&&tt.B(Ae,_e)&&Math.min(de,we)<Ae&&Math.max(de,we)>Ae&&Math.min(ne,pt)<pe&&Math.max(ne,pt)>pe&&!tt.B(ne,pt)){re.x=Ae,re.y=pe,de=!0;break e}re.x=0,re.y=0,de=!1}de&&(b?x.push(re.x):x.push(re.y)),ne=ue}ot.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()))}gi.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 gi&&(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 gi&&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())}}gi.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},gi.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},gi.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)},gi.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&&(Ni(y.links,a),y.Sl()))}gi.prototype.ph=function(){return!0},Qe.Object.defineProperties(gi.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&&Kn(a,">= 0",gi,"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&&Kn(a,">= 0",gi,"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?Vr: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 ot)}},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 Yn,E=0;E<a.length/2;E++)b=new ot(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(!En(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Yn,E=0;E<a.length;E++)b=a[E],x.add(new ot(b.x,b.y).freeze())}}else if(a instanceof Yn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Ft("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&&is(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)}}}),gi.prototype.invalidateOtherJumpOvers=gi.prototype.Xo,gi.prototype.findClosestSegment=gi.prototype.ez,gi.prototype.updateRoute=gi.prototype.vg,gi.prototype.invalidateRoute=gi.prototype.bb,gi.prototype.rollbackRoute=gi.prototype.rv,gi.prototype.commitRoute=gi.prototype.zf,gi.prototype.startRoute=gi.prototype.uh,gi.prototype.clearPoints=gi.prototype.Fj,gi.prototype.removePoint=gi.prototype.pv,gi.prototype.addPointAt=gi.prototype.yf,gi.prototype.addPoint=gi.prototype.ne,gi.prototype.insertPointAt=gi.prototype.m,gi.prototype.insertPoint=gi.prototype.Kz,gi.prototype.setPointAt=gi.prototype.L,gi.prototype.setPoint=gi.prototype.dd,gi.prototype.getPoint=gi.prototype.i,gi.prototype.getOtherPort=gi.prototype.Cz,gi.prototype.getOtherNode=gi.prototype.To;var kg=null,Tg=null,ay=new Mn(gi,"Normal",1),BS=new Mn(gi,"Orthogonal",2),MS=new Mn(gi,"AvoidsNodes",6),nx=new Mn(gi,"AvoidsNodesStraight",7),Eu=new Mn(gi,"None",0),Ec=new Mn(gi,"Bezier",9),Xh=new Mn(gi,"JumpGap",10),yp=new Mn(gi,"JumpOver",11),tm=new Mn(gi,"End",17),P0=new Mn(gi,"Scale",18),w0=new Mn(gi,"Stretch",19),nm=new Mn(gi,"OrientAlong",21),im=new Mn(gi,"OrientPlus90",22),rm=new Mn(gi,"OrientMinus90",23),sy=new Mn(gi,"OrientOpposite",24),C0=new Mn(gi,"OrientUpright",25),om=new Mn(gi,"OrientPlus90Upright",26),am=new Mn(gi,"OrientMinus90Upright",27),E0=new Mn(gi,"OrientUpright45",28),ix=16,rx=14,sm=8;gi.className="Link",gi.Normal=ay,gi.Orthogonal=BS,gi.AvoidsNodes=MS,gi.AvoidsNodesStraight=nx,gi.None=Eu,gi.Bezier=Ec,gi.JumpGap=Xh,gi.JumpOver=yp,gi.End=tm,gi.Scale=P0,gi.Stretch=w0,gi.OrientAlong=nm,gi.OrientPlus90=im,gi.OrientMinus90=rm,gi.OrientOpposite=sy,gi.OrientUpright=C0,gi.OrientPlus90Upright=om,gi.OrientMinus90Upright=am,gi.OrientUpright45=E0,gi.EndSegmentStep=8,gi.CurvinessStart=ix,gi.SpacingMin=rx,gi.OrthoShortCut=sm;function b0(a,y,x,E){Ao(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){Ao(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,de=x|0,pe=a.ac[ue][de];if(pe>=ng&&pe<Sp)for(b?de+=E:ue+=E,pe+=1;z<=ue&&ue<=ne&&re<=de&&de<=oe&&!(pe>=a.ac[ue][de]);)a.ac[ue][de]=pe,pe+=1,b?de+=E:ue+=E;if(ue=b?de: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,de=ng;for(a.ac[y][x]=de;ue===Jh&&y>z&&y<ne&&x>re&&x<oe;)de+=1,a.ac[y][x]=de,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,de=Sp;for(a.ac[y][x]=de;ue===Jh&&y>z&&y<ne&&x>re&&x<oe;)a.ac[y][x]=de,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,de=E.y;if(xp(a,ue,de))if(ue-=a.Nd,ue/=a.rc,de-=a.Od,de/=a.sc,1>=Math.abs(re-ue)&&1>=Math.abs(oe-de))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,de|=0;var be=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===Jh?(F0(a,re,oe,be,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,be,x,re,oe,re,oe),E[ue][de]===Jh?(B0(a,ue,de,b===0||b===90?1:-1,b===90||b===270,z,y,pe,we),B0(a,ue,de,1,!(b===90||b===270),z,y,pe,we),B0(a,ue,de,-1,!(b===90||b===270),z,y,pe,we)):B0(a,ue,de,be,x,ue,de,ue,de),x=mi(),ne&&sx(a,ue,de,b,re,oe,x))for((x[0]!==ue||x[1]!==de)&&(x.unshift(de),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);Di(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 de=oe,pe=ue;if(E===0)if(de<b)de++;else break;else if(E===90)if(pe<z)pe++;else break;else if(E===180)if(de>b)de--;else break;else if(pe>z)pe--;else break;var we=re[de][pe];if(we===0||we===uy)break;oe=de,ue=pe}for(;;){if(de=E,pe=oe,we=ue,E===0?we<z?(de=90,we++):we>z&&(de=270,we--):E===90?pe<b?(de=0,pe++):pe>b&&(de=180,pe--):E===180?we<z?(de=90,we++):we>z&&(de=270,we--):pe<b?(de=0,pe++):pe>b&&(de=180,pe--),pe=re[pe][we],de!==E&&pe!==0&&pe!==uy){if(ne.push(oe),ne.push(ue),sx(a,oe,ue,de,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++}}}Qe.Object.defineProperties(lm.prototype,{bounds:{get:function(){return new Dn(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(){Ao(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,ot.alloc()),oe=a.port.ga(On,ot.alloc());for(b=Dn.allocAt(re.x,re.y,0,0),b.Ye(oe),ot.free(re),ot.free(oe),re=ot.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 de=ue.fromPort===a.port||ue.fromNode!==null&&ue.fromNode.Td(E),pe=ue.computeSpot(de,a.port);if(pe.$c()&&(de=de?ue.toPort:ue.fromPort,de!==null)){var we=de.part;if(we!==null){var be=we.findVisibleNode();be!==null&&be!==we&&(we=be,de=we.port),de=ue.computeOtherPoint(we,de),we=re.ab(de),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)),be=a.pe[z],be===void 0?(be=new cy(ue,we,pe),a.pe[z]=be):(be.link=ue,be.angle=we,be.Nc=pe),be.hv.set(de),z++}}}}for(ot.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=ot.alloc(),oe=ot.alloc(),ne=ot.alloc(),ue=ot.alloc(),pe.ga(Us,re),pe.ga(kl,oe),pe.ga(On,ne),pe.ga(zl,ue),be=we=de=pe=0,E===qv)for(var Ae=0;Ae<z.length;Ae++){var _e=z[Ae];if(_e!==null){var pt=_e.link.computeThickness();switch(_e.Nc){case 8:we+=pt;break;case 2:be+=pt;break;case 1:pe+=pt;break;default:case 4:de+=pt}}}var nt=Ae=0,Bt=1,At=_e=0;for(pt=0;pt<z.length;pt++){var kt=z[pt];if(kt!==null){if(Ae!==kt.Nc){switch(Ae=kt.Nc,Ae){case 8:var Ut=ne;nt=ue;break;case 2:Ut=ue,nt=re;break;case 1:Ut=re,nt=oe;break;default:case 4:Ut=oe,nt=ne}switch(_e=nt.x-Ut.x,At=nt.y-Ut.y,Ae){case 8:we>Math.abs(_e)?(Bt=Math.abs(_e)/we,we=Math.abs(_e)):Bt=1;break;case 2:be>Math.abs(At)?(Bt=Math.abs(At)/be,be=Math.abs(At)):Bt=1;break;case 1:pe>Math.abs(_e)?(Bt=Math.abs(_e)/pe,pe=Math.abs(_e)):Bt=1;break;default:case 4:de>Math.abs(At)?(Bt=Math.abs(At)/de,de=Math.abs(At)):Bt=1}nt=0}var fn=kt.Zo;if(E===qv){switch(kt=kt.link.computeThickness(),kt*=Bt,fn.set(Ut),Ae){case 8:fn.x=Ut.x+_e/2+we/2-nt-kt/2;break;case 2:fn.y=Ut.y+At/2+be/2-nt-kt/2;break;case 1:fn.x=Ut.x+_e/2-pe/2+nt+kt/2;break;default:case 4:fn.y=Ut.y+At/2-de/2+nt+kt/2}nt+=kt}else{var bi=.5;E===p0&&(bi=(kt.Uo+1)/(kt.Gl+1)),fn.x=Ut.x+_e*bi,fn.y=Ut.y+At*bi}}}for(ot.free(re),ot.free(oe),ot.free(ne),ot.free(ue),Ut=a.pe,z=0;z<Ut.length;z++)E=Ut[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Dn.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,Cs,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 ot,this.Gl=this.Uo=0,this.Zo=new ot,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 xs(a){Ao(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new ot(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}xs.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},xs.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},xs.prototype.qb=function(){},xs.prototype.toString=function(){var a=Ai(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},xs.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())}}},xs.prototype.createNetwork=function(){return new ts(this)},xs.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof hn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof ho?y.lg(a.memberParts):y.lg(a.iterator),y},xs.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")}},xs.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()}},xs.prototype.doLayout=function(a){var y=new Xn;a instanceof hn?(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},xs.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++}},xs.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 gi)&&(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++}}},xs.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 Ii?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 gi?y.add(oe):!re||!oe.Zc()||oe instanceof Ii||(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()}xs.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Dn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},xs.prototype.ex=function(a){var y=new Xn;return a instanceof hn?(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},xs.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},Qe.Object.defineProperties(xs.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())}}}),xs.prototype.collectParts=xs.prototype.ex,xs.prototype.getLayoutBounds=xs.prototype.ni,xs.prototype.invalidateLayout=xs.prototype.C,xs.className="Layout";function ts(a){Ao(this),this.Sc=a,this.wf=new Xn,this.ye=new Xn,this.Es=new Ki,this.zs=new Ki}ts.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 Xn,this.ye=new Xn,this.Es=new Ki,this.zs=new Ki},ts.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},ts.prototype.createVertex=function(){return new ul(this)},ts.prototype.createEdge=function(){return new hc(this)},ts.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 Ii)return!ne.isLinkLabel;if(ne instanceof gi){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 Ii&&(!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 gi&&(!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))}}},ts.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},Be=ts.prototype,Be.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Be.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},Be.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}Be.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Be.ki=function(a){return a===null?null:this.Es.I(a)},Be.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}}Be.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},Be.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))}Be.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Be.Lo=function(a){return a===null?null:this.zs.I(a)},Be.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},Be.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))}},Be.Ko=function(){for(var a=mi(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);Di(a)},ts.prototype.deleteArtificialVertexes=function(){for(var a=mi(),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=mi(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);Di(a),Di(y)};function NS(a){for(var y=mi(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);Di(y)}ts.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),NS(this),this.Ko()),a=new Yn;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))}}ts.prototype.dz=function(){for(var a=new Xn,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},Qe.Object.defineProperties(ts.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}}}),ts.prototype.findAllParts=ts.prototype.dz,ts.prototype.splitIntoSubNetworks=ts.prototype.Zx,ts.prototype.deleteSelfEdges=ts.prototype.Ko,ts.prototype.reverseEdge=ts.prototype.gm,ts.prototype.linkVertexes=ts.prototype.Zj,ts.prototype.findEdge=ts.prototype.Lo,ts.prototype.deleteLink=ts.prototype.Yy,ts.prototype.deleteEdge=ts.prototype.Mj,ts.prototype.addLink=ts.prototype.Dy,ts.prototype.addEdge=ts.prototype.Bo,ts.prototype.findVertex=ts.prototype.ki,ts.prototype.deleteNode=ts.prototype.Zy,ts.prototype.deleteVertex=ts.prototype.Iu,ts.prototype.addNode=ts.prototype.Bl,ts.prototype.addVertex=ts.prototype.dh,ts.prototype.addParts=ts.prototype.lg,ts.className="LayoutNetwork";function ul(a){Ao(this),this.ob=a,this.j=new Dn(0,0,10,10).freeze(),this.o=new ot(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Yn,this.mg=new Yn}ul.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Yn,this.mg=new Yn},ul.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+nr(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},ul.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;En(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof ho)){x=Dn.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Oo);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Dn.free(x);return}Dn.free(x)}a.moveTo(y.x,y.y)}},ul.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},ul.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},ul.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},ul.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}Qe.Object.defineProperties(ul.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=Dn.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),Dn.free(x),!(a instanceof ho)&&(a=a.locationObject.ga(Oo),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 Xn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Xn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Xn,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 Yn,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}}}),ul.prototype.deleteDestinationEdge=ul.prototype.Jl,ul.prototype.addDestinationEdge=ul.prototype.zl,ul.prototype.deleteSourceEdge=ul.prototype.Kl,ul.prototype.addSourceEdge=ul.prototype.Cl,ul.className="LayoutVertex",ul.standardComparer=gy,ul.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){Ao(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#"+nr(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},Qe.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 Rl(a){xs.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new vi(NaN,NaN).freeze(),this.tf=new vi(10,10).freeze(),this.Jb=cm,this.Rb=L0,this.nd=dm,this.hd=cx,a&&Object.assign(this,a)}Vt(Rl,xs),Rl.prototype.cloneProtected=function(a){xs.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},Rl.prototype.qb=function(a){a.classType===Rl?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:Ft("Unknown enum value: "+a):xs.prototype.qb.call(this,a)},Rl.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=Dn.alloc(),de=Math.max(this.cellSize.width,1);if(!isFinite(de))for(var pe=de=0;pe<b.length;pe++){var we=this.ni(b[pe],ue);de=Math.max(de,we.width)}if(de=Math.max(de+re,1),pe=Math.max(this.cellSize.height,1),!isFinite(pe))for(we=pe=0;we<b.length;we++){var be=this.ni(b[we],ue);pe=Math.max(pe,be.height)}pe=Math.max(pe+oe,1),we=this.arrangement;for(var Ae=be=this.arrangementOrigin.x,_e=this.arrangementOrigin.y,pt=0,nt=0,Bt=0;Bt<b.length;Bt++){var At=b[Bt],kt=this.ni(At,ue),Ut=Math.ceil((kt.width+re)/de)*de,fn=Math.ceil((kt.height+oe)/pe)*pe;switch(we){case md:var bi=Math.abs(Ae-kt.width);break;default:bi=Ae+kt.width}switch((0<z&&pt>z-1||0<ne&&0<pt&&bi-be>ne)&&(E.push(new Dn(0,_e,ne+re,nt)),pt=0,Ae=be,_e+=nt,nt=0),nt=Math.max(nt,fn),we){case md:kt=-kt.width;break;default:kt=0}switch(At.moveTo(Ae+kt,_e),we){case md:Ae-=Ut;break;default:Ae+=Ut}pt++}E.push(new Dn(0,_e,ne+re,nt)),Dn.free(ue);break;case cm:for(oe=ne,de=z,pe=y,we=x,ne=Dn.alloc(),be=Math.max(this.cellSize.width,1),z=_e=ue=0,re=ot.alloc(),Ae=0;Ae<b.length;Ae++)nt=b[Ae],pt=this.ni(nt,ne),nt=Kh(nt,nt.locationObject,nt.locationSpot,re),ue=Math.max(ue,nt.x),_e=Math.max(_e,pt.width-nt.x),z=Math.max(z,nt.y);switch(Ae=this.arrangement,Ae){case md:ue+=pe;break;default:_e+=pe}be=isFinite(be)?Math.max(be+pe,1):Math.max(ue+_e,1);var Xi=nt=this.arrangementOrigin.x;for(Bt=this.arrangementOrigin.y,_e=0,oe>=ue&&(oe-=ue),ue=At=0,Ut=Math.max(this.cellSize.height,1),kt=z=0,fn=!0,pt=ot.alloc(),bi=0;bi<b.length;bi++){var Wi=b[bi],fi=this.ni(Wi,ne),ti=Kh(Wi,Wi.locationObject,Wi.locationSpot,re);if(0<_e)switch(Ae){case md:Xi=(Xi-nt-(fi.width-ti.x))/be,Xi=tt.$(Math.round(Xi),Xi)?Math.round(Xi):Math.floor(Xi),Xi=Xi*be+nt;break;default:Xi=(Xi-nt+ti.x)/be,Xi=tt.$(Math.round(Xi),Xi)?Math.round(Xi):Math.ceil(Xi),Xi=Xi*be+nt}else switch(Ae){case md:At=Xi+ti.x+fi.width;break;default:At=Xi-ti.x}switch(Ae){case md:var lo=-(Xi+ti.x)+At;break;default:lo=Xi+fi.width-ti.x-At}if(0<de&&_e>de-1||0<oe&&0<_e&&lo>oe){for(E.push(new Dn(0,fn?Bt-z:Bt,oe+pe,kt+z+we)),Xi=0;Xi<_e&&bi!==_e;Xi++){lo=b[bi-_e+Xi];var $r=Kh(lo,lo.locationObject,lo.locationSpot,pt);lo.moveTo(lo.position.x,lo.position.y+z-$r.y)}kt+=we,Bt=fn?Bt+kt:Bt+(kt+z),_e=kt=z=0,Xi=nt,fn=!1}switch(Xi===nt&&(ue=Ae===md?Math.max(ue,fi.width-ti.x):Math.min(ue,-ti.x)),z=Math.max(z,ti.y),kt=Math.max(kt,fi.height-ti.y),isFinite(Ut)&&(kt=Math.max(kt,Math.max(fi.height,Ut)-ti.y)),fn?Wi.moveTo(Xi-ti.x,Bt-ti.y):Wi.moveTo(Xi-ti.x,Bt),Ae){case md:Xi-=ti.x+pe;break;default:Xi+=fi.width-ti.x+pe}_e++}if(E.push(new Dn(0,Bt,oe+pe,(fn?kt:kt+z)+we)),b.length!==_e)for(oe=0;oe<_e;oe++)de=b[b.length-_e+oe],pe=Kh(de,de.locationObject,de.locationSpot,re),de.moveTo(de.position.x,de.position.y+z-pe.y);if(ot.free(re),ot.free(pt),Ae===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);Dn.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 ot(b+y/2-(z+b),ne-x/2)):this.commitLayers(E,new ot(b-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Rl.prototype.commitLayers=function(){};function cx(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Qe.Object.defineProperties(Rl.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 Mn(Rl,"Position",0),cm=new Mn(Rl,"Location",1),L0=new Mn(Rl,"LeftToRight",2),md=new Mn(Rl,"RightToLeft",3),py=new Mn(Rl,"Forward",4),N0=new Mn(Rl,"Reverse",5),dm=new Mn(Rl,"Ascending",6),A0=new Mn(Rl,"Descending",7);Rl.className="GridLayout",Rl.standardComparer=cx,Rl.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},Rl.Position=M0,Rl.Location=cm,Rl.LeftToRight=L0,Rl.RightToLeft=md,Rl.Forward=py,Rl.Reverse=N0,Rl.Ascending=dm,Rl.Descending=A0;function ja(){this.On=new Xn,this.Dn=new Xn,this.Pa=new Xn,this.cf=new Ki,this.bf=new Ki,this.aj=new Ki,this.H=null,this.tp=!1}Be=ja.prototype,Be.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Be.Xe=function(a){this.H=a},Be.oi=function(a){if(a instanceof Ii){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 gi?this.Dn.add(a):a instanceof pa||this.Pa.add(a);y=a.data,y===null||a instanceof pa||(a instanceof gi?this.bf.add(y,a):this.cf.add(y,a))},Be.pc=function(a){if(a.Ej(),a instanceof Ii){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 gi?this.Dn.remove(a):a instanceof pa||this.Pa.remove(a);y=a.data,y===null||a instanceof pa||(a instanceof gi?this.bf.remove(y):this.cf.remove(y))},Be.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)&&Ft('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||Ft('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 gi||Ft('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=mi(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=mi(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=mi(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);Di(y),Di(x),Di(a)}},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,Ci('No Group template found for category "'+x+'"'),Ci(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(gx||(gx=!0,Ci('No Node template found for category "'+x+'"'),Ci(" 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,Ci('No Link template found for category "'+a+'"'),Ci(" 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 Ii?a:null)},ja.prototype.findLinkForKey=function(){return null},Be=ja.prototype,Be.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Be.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Ii?a:null)},Be.Kc=function(a){return a===null?null:this.bf.I(a)},Be.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Xn;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(En(ne)&&my(this,b,ne)){y.add(E);break}}}return y.iterator},Be.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Xn;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(En(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(un(z)){if(!un(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(En(y)&&En(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===_o){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===xa){var ne=a.newValue;E==="nodeDataArray"&&En(ne)&&dx(this,ne),y.isModified=!0}else if(x===Wa){var re=a.oldValue;E==="nodeDataArray"&&En(re)&&this.ip(re),y.isModified=!0}else x===Aa&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===_o){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===xa||x===Wa){var de=a.change===xa,pe=de?a.newParam:a.oldParam,we=de?a.newValue:a.oldValue,be=this.aj.I(a.object);if(Array.isArray(be))for(a=0;a<be.length;a++){var Ae=be[a];if(de)Xm(Ae,we,pe,!0);else if(!(0>pe)){var _e=pe+Vp(Ae);Ae.pc(_e,!0),Nv(Ae,_e,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 Xn,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=mi()),x.push(ne))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Di(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(a,y){var x=y.Hh;if(un(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(un(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 Ki;if(un(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 Xn;for(var z=new Ki,ne=E.iterator;ne.next();){var re=ne.value;if(re instanceof gi)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof Ii&&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 de=new Ki;E.each(function(pe){pe.key.data!==null&&de.add(pe.key.data,pe.value.data)}),x(de,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 Ii){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 gi||ne===null||(ne.containingGroup=z)}else if(y instanceof gi&&z instanceof gi)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 Ii&&(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 gi||(E=b.copyNodeData(E),En(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 gi||(b=y.copyNodeData(E)),En(b)&&(x.data=b)));return x},Qe.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 Ll(a){ja.apply(this,arguments)}Vt(Ll,ja),Ll.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vx(this,a.linkDataArray)},Ll.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 Ii&&(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 Ii&&(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}}}}Ll.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)})}Ll.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},Ll.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},Ll.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},Ll.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},Ll.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},Ll.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},Ll.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},Ll.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===_o){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 de=a.newValue;typeof de=="string"&&(ue.fromPortId=de)}}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 be=this.Lc(a.object);if(be!==null){var Ae=a.newValue;if(Ae!==void 0){var _e=this.Vb(Ae);_e instanceof ho?be.containingGroup=_e:be.containingGroup=null}else be.containingGroup=null}}else if(b==="linkLabelKeys"){var pt=this.Kc(a.object);if(pt!==null){var nt=a.oldValue,Bt=a.newValue;Array.isArray(nt)&&nt.forEach(function(ti){0<=Bt.indexOf(ti)||(ti=y.Vb(ti),ti!==null&&(ti.labeledLink=null))}),Array.isArray(Bt)&&Bt.forEach(function(ti){ti=y.Vb(ti),ti!==null&&(ti.labeledLink=pt)})}}else if(b==="linkCategory"){var At=this.Kc(a.object),kt=a.newValue;At!==null&&typeof kt=="string"&&(At.category=kt)}else b==="linkDataArray"&&(xx(this,a.oldValue),vx(this,a.newValue));x.isModified=!0}else if(E===xa){var Ut=a.newValue;if(b==="linkDataArray"&&typeof Ut=="object"&&Ut!==null)yx(this,Ut);else if(b==="linkLabelKeys"&&Ff(Ut)){var fn=this.Kc(a.object),bi=this.Vb(Ut);fn!==null&&bi!==null&&(bi.labeledLink=fn)}x.isModified=!0}else if(E===Wa){var Xi=a.oldValue;if(b==="linkDataArray"&&typeof Xi=="object"&&Xi!==null)this.ip(Xi);else if(b==="linkLabelKeys"&&Ff(Xi)){var Wi=this.Vb(Xi);Wi!==null&&(Wi.labeledLink=null)}x.isModified=!0}}else if(E===_o){var fi=a.propertyName;a.object!==x.model||fi!=="linkFromKeyProperty"&&fi!=="linkToKeyProperty"&&fi!=="linkFromPortIdProperty"&&fi!=="linkToPortIdProperty"&&fi!=="linkLabelKeysProperty"&&fi!=="nodeIsGroupProperty"&&fi!=="nodeGroupKeyProperty"&&fi!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},Ll.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Xn,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)})},Ll.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 gi){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 Xn().addAll(y);var ne=new Xn;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)}}},Ll.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 Ii&&(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))}},Ll.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Ii){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)}}},Ll.prototype.copyPartData=function(a,y){var x=ja.prototype.copyPartData.call(this,a,y);if(a instanceof gi)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},Ll.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 gi){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 Ii&&(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 Ii||(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},Ll.prototype.findLinkForKey=Ll.prototype.findLinkForKey,Ll.prototype.findPartForKey=Ll.prototype.findPartForKey,Ll.prototype.removeAllModeledParts=Ll.prototype.removeAllModeledParts,Ll.prototype.addModeledParts=Ll.prototype.addModeledParts,Ll.prototype.addAllModeledParts=Ll.prototype.addAllModeledParts,Ll.className="GraphLinksPartManager";function Dc(){ja.apply(this,arguments),this.Sg=null}Vt(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||!Hn(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===_o){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 de=oe.kh();de!==null&&(de.category=ue)}}y.isModified=!0}}else if(x===_o){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 Ii&&(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 Ii&&y.mh(z)===x&&I0(this,b,this.ii(z))}yd(y,x)}a=y.mh(a),a!==void 0&&b instanceof Ii&&(a=this.Vb(a),I0(this,a,b))}},Dc.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Ii){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(Wa,"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 Xn,this.il=new Xn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Ao(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new Ki,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 Ki,this.Lt=new Yn,this.Wg=!1,this.o=null,this.undoManager=new Oa,a!==void 0&&(un(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)+":"+gr(b)}}return y},ar.prototype.xA=function(a){a.change!==Aa&&Ft("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof wo?(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 Xn,z=new Xn,ne=new Xn,re=this.vh;a.changes.each(function(pe){pe.model===x&&(pe.modelChange==="nodeDataArray"?pe.change===xa?b.add(pe.newValue):pe.change===Wa&&ne.add(pe.oldValue):x.lb(pe.object)?z.add(pe.object):pe.change!==_o||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 de=null;return E&&(de===null&&(de={}),de.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(de===null&&(de={}),y?de.removedNodeKeys=oe.Fa():de.insertedNodeKeys=oe.Fa()),0<a.length&&(de===null&&(de={}),de.modifiedNodeData=a),0<ue.count&&(de===null&&(de={}),y?de.insertedNodeKeys=ue.Fa():de.removedNodeKeys=ue.Fa()),ue.clear(),oe.clear(),de},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=qo++,E.set(pe,we),b.set(pe,y))}if(!En(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new Ki),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new Ki),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 de=0;de<y.length;de++)oe.push(Pp(a,y[de],!1,E,b,z))}else if(y instanceof ot||y instanceof vi||y instanceof Dn||y instanceof dr||y instanceof Ji)oe=y.copy(),ne(y,oe);else{if(y instanceof ha||y instanceof rn||y instanceof Mn)return y;if(y instanceof Yn)oe=new Yn().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Xn)oe=new Xn().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Ki)oe=new Ki().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(de in oe={},ne(y,oe),y)de!=="__gohashid"&&(oe[de]=Pp(a,y[de],!1,E,b,z))}return x&&z.forEach(function(pe){delete pe.__gohashid}),oe}Be=ar.prototype,Be.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Be.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},Be.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,En(y)&&(a.dm(y),a.modelData=y)}Be.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)},Be.kv=function(a){Sx(this,a),a=a.nodeDataArray,un(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 Xn,ne.add(z),E.add(b,ne)):ne.add(z)}}var E=a.vh;E===null&&(E=new Ki,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===_o?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===xa||z===Wa)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function wx(a,y){for(var x=new Xn,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(En(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}Be.Pv=function(a,y){var x=this,E=!1,b=new Xn,z=new Xn,ne=new Xn,re=this.vh;a.changes.each(function(de){de.model===x&&(de.modelChange==="nodeDataArray"?de.change===xa?b.add(de.newValue):de.change===Wa&&ne.add(de.oldValue):x.lb(de.object)?z.add(de.object):de.change!==_o||x.modelData!==de.object&&de.propertyName!=="modelData"?de.object!==null&&(re&&re.contains(de.object)?re.get(de.object).each(function(pe){x.lb(pe)&&z.add(pe)}):de.object instanceof ar||x.ri()&&x.Jc(de.object)||wx(x,de.object).each(function(pe){z.add(pe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(de){oe.add(x.wa(de)),y||z.add(de)});var ue=this.kl;return ue.clear(),ne.each(function(de){ue.add(x.wa(de)),y&&z.add(de)}),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},Be.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)&&Ft("applyIncrementalJson cannot change Model properties"),Sx(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new Ki;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)},Be.$x=function(a,y){a.change!==Aa&&Ft("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof wo?(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 }'},Be.yA=function(a,y){return this.$x(a,y)},Be.np=function(a){return a===void 0&&(a=fm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Be.toJSON=function(a){return this.np(a)},Be.Zw=function(a){var y=null;if(typeof a=="string")try{y=dt.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Ft("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Ft("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Be.Ky=function(a){return this.Zw(a)},ar.constructGraphLinksModel=function(){return new ar},Be=ar.prototype,Be.dm=function(a){if(un(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(En(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Ft("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(En(a)){for(y in a)if(x=a[y],En(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new Yn,E=0;E<x.length/2;E++)b.add(new ot(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return AS(a)}return a},Be.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()):un(a)?bf(this,a):En(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 Hi;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 ot)y={class:"go.Point",x:bu(x.x),y:bu(x.y)};else if(x instanceof vi)y={class:"go.Size",width:bu(x.width),height:bu(x.height)};else if(x instanceof Dn)y={class:"go.Rect",x:bu(x.x),y:bu(x.y),width:bu(x.width),height:bu(x.height)};else if(x instanceof dr)y={class:"go.Margin",top:bu(x.top),right:bu(x.right),bottom:bu(x.bottom),left:bu(x.left)};else if(x instanceof Ji)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 ha){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 rn?(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(On)||(y.spot2=x.spot2),x.type===rn.o&&(y.path=rn.ia(x))):x instanceof Mn&&(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 Yn){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 ot(Fu(a.x),Fu(a.y));else if(y==="Size")x=new vi(Fu(a.width),Fu(a.height));else if(y==="Rect")x=new Dn(Fu(a.x),Fu(a.y),Fu(a.width),Fu(a.height));else if(y==="Margin")x=new dr(Fu(a.top),Fu(a.right),Fu(a.bottom),Fu(a.left));else if(y==="Spot")typeof a.enum=="string"?x=fl(a.enum):x=new Ji(Fu(a.x),Fu(a.y),Fu(a.offsetX),Fu(a.offsetY));else if(y==="Brush"){if(x=new ha,x.type=ii(ha,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Ji&&(x.start=a.start),a.end instanceof Ji&&(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,En(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=rn.parse(a.path):x=new rn,x.type=ii(rn,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 Ji&&(x.spot1=a.spot1),a.spot2 instanceof Ji&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Py(E),typeof E=="function"&&(x=ii(E,a.name)));return x}Be.Pe=function(a){return this.Lt.add(a),this},Be.ik=function(a){this.Lt.remove(a)},Be.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)},Be.cb=function(a,y,x,E,b,z,ne){al(this,"",a,y,x,E,b,z,ne)},Be.g=function(a,y,x,E,b){al(this,"",_o,a,this,y,x,E,b)},Be.Fs=function(a,y,x,E,b,z){al(this,"",_o,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 fr;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===_o){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)),vs(x,E,b)}else a.change===xa?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,En(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Ni(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&Ei(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!un(E)&&a.propertyName&&(E=Qs(a.object,a.propertyName)),un(E)&&typeof x=="number"&&(a=a.newValue,y?Ni(E,x):Ei(E,x,a))):Ft("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Wa?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,En(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&Ei(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Ni(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!un(E)&&a.propertyName&&(E=Qs(a.object,a.propertyName)),un(E)&&typeof x=="number"&&(a=a.oldValue,y?Ei(E,x,a):Ni(E,x))):Ft("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Aa&&Ft("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}},Be=ar.prototype,Be.La=function(a,y){y===void 0&&(y=""),al(this,"SourceChanged",Aa,y,a,null,null)},Be.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Ft("Key value for node data "+a+" is not a number or a string: "+y)}}},Be.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&&(vs(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),al(this,"nodeKey",_o,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else vs(a,x,y)}};function Ff(a){return typeof a=="number"||typeof a=="string"}Be.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Be.hc=function(a){return a===null&&Ft("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Ff(a)?this.kb.I(a):null},Be.$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))){vs(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;vs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;vs(a,y,x)}}}}},Be.xf=function(a){a!==null&&(Qo(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&&Ft("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,Ei(a.Tc,E,y)),al(a,"nodeDataArray",xa,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Be.Fy=function(a){if(un(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)},Be.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;Ni(a.Tc,E)}al(a,"nodeDataArray",Wa,"nodeDataArray",a,y,null,E,null),a.qp(y)}Be.nA=function(a){if(un(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)},Be.$z=function(a){if(a!==this.nodeDataArray&&un(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()}},Be.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof Xn&&this.Vf.add(y,a))},Be.Lv=function(){},Be.fm=function(){},Be.em=function(){},Be.qp=function(){};function vd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Xn,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 Xn&&(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 Xn?a:null)}Be.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),En(a)&&Ao(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 Ao(E),E}if(x&&En(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 wo||z instanceof fr||(z=k0(a,z,!1)),vs(x,E,z)}return Ao(x),x}return y instanceof ot||y instanceof vi||y instanceof Dn||y instanceof Ji||y instanceof dr?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 Yt&&(Fx=!0,Ci('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Ci(" Is that really your intent?"));var E=Qs(a,y);E!==x&&(vs(a,y,x),this.Fs(a,y,E,x))},Be=ar.prototype,Be.set=function(a,y,x){this.setDataProperty(a,y,x)},Be.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])}},Be.Ay=function(a,y){this.ts(a,-1,y)},Be.ts=function(a,y,x){0>y&&(y=a.length),Ei(a,y,x),al(this,"",xa,"",a,null,x,null,y)},Be.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Ft("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Ni(a,y),al(this,"",Wa,"",a,x,null,y,null)},Be.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;Ft("getCategoryForNodeData found a non-string category for "+a+": "+y)},Be.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&&(vs(a,x,y),al(this,"nodeCategory",_o,x,a,E,y))}else vs(a,x,y)}},Be.lm=function(a,y){this.jm(y,this.Ro(a))},Be.Tl=function(){return!1},Be.Wj=function(){return!1},Be.ri=function(){return!1},Be.xs=function(){return!1},Be.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]:dt.go!==void 0&&dt.go[a]?dt.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 vs(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){}}Qe.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===""&&Ft("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Ft("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];En(b)||Ft("Model.nodeDataArray must only contain Objects, not: "+b),Qo(b)}for(this.Tc=a,E=new Yn,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",_o,"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=dt.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Ft("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=dt[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof ar?y=a:Ft("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=vs,ed.Brush=ha,ed.ChangedEvent=fr,ed.Geometry=rn,ed.Margin=dr,ed.Panel=ci,ed.Point=ot,ed.Rect=Dn,ed.Size=vi,ed.Spot=Ji,ed.Transaction=wo,ed.UndoManager=Oa;function tl(a,y,x,E){Ao(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 Xn}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},Be=tl.prototype,Be.qb=function(a){a.classType===tl&&(this.mode=a)},Be.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Be.freeze=function(){return this._isFrozen=!0,this},Be.ka=function(){return this._isFrozen=!1,this},Be.Kx=function(a){return a===void 0&&(a=null),this.mode=gm,this.backConverter=a,this},Be.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Be.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)}Be.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==="")Ci("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!==""&&vs(a,x,z);else try{if(x!==""){var ne=b(z,a);vs(a,x,ne)}else b(z,a)}catch(re){}}}},Be.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):vs(y,x,ne);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var ue=E.itemIndex,de=E.panel.itemArray;oe.ov(de,ue),oe.ts(de,ue,ne)}}else try{if(x!==""){var pe=z(ne,y,oe);oe!==null?oe.setDataProperty(y,x,pe):vs(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 be=E.itemIndex,Ae=E.panel.itemArray;oe.ov(Ae,be),oe.ts(Ae,be,we)}}}catch(_e){}}finally{this.st.remove(a)}}}},Qe.Object.defineProperties(tl.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Bn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Bn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Bn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Bn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Bn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Bn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Bn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Bn(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 Mn(tl,"OneWay",1),gm=new Mn(tl,"TwoWay",2);tl.className="Binding",tl.parseEnum=function(a,y){return function(x){return x=ii(a,x),x===null?y:x}},tl.toString=gr,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 Xn,this.wb=new Ki,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&&(un(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Vt(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},Be=ia.prototype,Be.clear=function(){ar.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Be.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)+":"+gr(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},Be.Qv=function(a,y){this.linkKeyProperty===""&&Ft("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 Xn,z=new Xn,ne=new Xn,re=this.vh;a.changes.each(function(de){de.model===E&&(de.modelChange==="linkDataArray"?de.change===xa?b.add(de.newValue):de.change===Wa&&ne.add(de.oldValue):E.Jc(de.object)?z.add(de.object):de.object!==null&&(de.object!==null&&re&&re.contains(de.object)?re.get(de.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):de.object instanceof ar||E.lb(de.object)||Lx(E,de.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(de){oe.add(E.Ac(de)),y||z.add(de)});var ue=this.kl;return ue.clear(),ne.each(function(de){ue.add(E.Ac(de)),y&&z.add(de)}),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},Be.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},Be.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)},Be.Rv=function(){var a=ar.prototype.Rv.call(this),y=`,
"linkDataArray": `+bf(this,this.linkDataArray,!0);return a+y},Be.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 Xn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];O0(a,y,b,b,x)}return x}Be.Pv=function(a,y){this.linkKeyProperty===""&&Ft("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 Xn,z=new Xn,ne=new Xn,re=this.vh;a.changes.each(function(de){de.model===E&&(de.modelChange==="linkDataArray"?de.change===xa?b.add(de.newValue):de.change===Wa&&ne.add(de.oldValue):E.Jc(de.object)?z.add(de.object):de.object!==null&&(de.object!==null&&re&&re.contains(de.object)?re.get(de.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):de.object instanceof ar||E.lb(de.object)||Lx(E,de.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(de){oe.add(E.Ac(de)),y||z.add(de)});var ue=this.kl;return ue.clear(),ne.each(function(de){ue.add(E.Ac(de)),y&&z.add(de)}),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},Be.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)&&Ft("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===_o){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),vs(x,E,b);return}}else if(a.change===xa){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,En(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===Wa){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,En(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)}},Be=ia.prototype,Be.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),vs(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Be.yx=function(a){return bc(this,a,!0)},Be.wv=function(a,y){wp(this,a,y,!0)},Be.Bx=function(a){return bc(this,a,!1)},Be.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;Ft((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),vs(y,b,x),a.hc(x)===null&&vd(a,x,y),al(a,E?"linkFromKey":"linkToKey",_o,b,y,z,x),typeof b=="string"&&a.La(y,b))}else vs(y,b,x)}}Be.zx=function(a){return T0(this,a,!0)},Be.xv=function(a,y){Cp(this,a,y,!0)},Be.Cx=function(a){return T0(this,a,!1)},Be.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&&(vs(y,b,x),al(a,E?"linkFromPortId":"linkToPortId",_o,b,y,z,x),typeof b=="string"&&a.La(y,b))}else vs(y,b,x)}}Be.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=Qs(a,y),a===void 0?R0:a)},Be.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(vs(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",_o,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else vs(a,x,y)}},Be.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",xa,x,a,null,y,null,b)))}else Ft(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Be.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",Wa,x,a,y,null,b,null)))}else E!==void 0&&Ft(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Be.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Ft("Key value for link data "+a+" is not a number or a string: "+y)}}},Be.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&&(vs(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),al(this,"linkKey",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(a,x,y)}},Be.jh=function(a){return a===null&&Ft("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Ff(a)?this.wb.I(a):null},Be.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))){vs(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;vs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;vs(a,y,x)}}}}},Be.Jc=function(a){return a===null?!1:this.$f.contains(a)},Be.fi=function(a){a!==null&&(Qo(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&&Ft("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",xa,"linkDataArray",a,null,y,null,E),wy(a,y)}Be.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)},Be.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",Wa,"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)}Be.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)},Be.Zz=function(a){if(this.linkKeyProperty===""&&Ft("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&un(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)}Be.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):k0(this,a,!0),En(a)&&(Ao(a),this.lf!==""&&vs(a,this.lf,void 0),this.mf!==""&&vs(a,this.mf,void 0),this.je!==""&&vs(a,this.je,[])),a},Be.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Qs(a,y)},Be.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Ft("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Be.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),vs(a,x,y),this.hc(y)===null&&vd(this,y,a),al(this,"nodeGroupKey",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(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||vs(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&&(vs(a,y,x),this.Fs(a,y,E,x))},Be=ia.prototype,Be.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])}},Be.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;vs(E,ne,z),al(this,"linkFromKey",_o,ne,E,b,z),typeof ne=="string"&&this.La(E,ne)}if(bc(this,E,!1)===b&&(ne=this.mf,vs(E,ne,z),al(this,"linkToKey",_o,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",xa,oe,E,b,z,ue,ue))}},Be.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;vs(a,E,x),al(this,"nodeGroupKey",_o,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Be.Lv=function(){ar.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)wy(this,a[x])},Be.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=mi();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",_o,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",_o,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",_o,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",xa,ne,E,a,a,re,re),x.push(E))}for(y=0;y<x.length;y++)yd(this,a,x[y]);Di(x)}},Be.em=function(a){ar.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&vd(this,y,a)},Be.qp=function(a){ar.prototype.qp.call(this,a);var y=this.lh(a);yd(this,y,a)},Be.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;Ft("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&&(vs(a,x,y),al(this,"linkCategory",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(a,x,y)}},ia.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Be=ia.prototype,Be.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))}Be.Wj=function(){return!0},Be.ri=function(){return!0},Be.xs=function(){return!0},Be.Xj=function(){return!0},Qe.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];En(b)||Ft("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Qo(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Yn,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 Xn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,al(this,"linkDataArray",_o,"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&&(un(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Vt(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},Be=Bu.prototype,Be.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)+":"+gr(b)}}return y},Be.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},Be.gp=function(a){ar.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Be.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Ft("applyIncrementalJson cannot change Model properties"),ar.prototype.fp.call(this,a)},Be.Vl=function(a){return a},Be.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Ft("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Be.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),vs(a,x,y),this.hc(y)===null&&vd(this,y,a),al(this,"nodeParentKey",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(a,x,y)}},Be.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Qs(a,y),y===void 0)?"":typeof y=="string"?y:(Ft("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&&(vs(a,x,y),al(this,"parentLinkCategory",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else vs(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||vs(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&&(vs(a,y,x),this.Fs(a,y,E,x))},Be=Bu.prototype,Be.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)},Be.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;vs(a,E,x),al(this,"nodeParentKey",_o,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Be.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=mi();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",_o,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]);Di(x)}},Be.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)},Be.qp=function(a){ar.prototype.qp.call(this,a);var y=this.mh(a);yd(this,y,a)},Be.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Be.Tl=function(){return!0},Be.xs=function(){return!0},Qe.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 Os(a){xs.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=td,this.Ti=0,this.Zv=new ot,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)}Vt(Os,xs),Os.prototype.cloneProtected=function(a){xs.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},Os.prototype.qb=function(a){a.classType===Os?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):xs.prototype.qb.call(this,a)},Os.prototype.createNetwork=function(){return new Fp(this)},Os.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 Yn;y.addAll(a.iterator),a=new Yn;var x=new Yn,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 de=this.aspectRatio;(!isFinite(de)||0>=de)&&(de=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 Yn,E.addAll(a),E.addAll(x)):(this.arrangement===nd&&x.reverse(),E=new Yn,E.addAll(x),E.addAll(a))}oe=E.length;for(var be=z=b=0;be<E.length;be++){var Ae=pe+we*z*(this.direction===Mu?1:-1)/oe,_e=E.M(be).diameter;isNaN(_e)&&(_e=Lf(E.M(be),Ae)),360>we&&(be===0||be===E.length-1)&&(_e/=2),b+=_e,z++}if(isNaN(ue)||re===nd){if(isNaN(y)&&(y=6),re!==td&&re!==nd){for(z=-1/0,ne=0;ne<oe;ne++)be=E.M(ne),b=E.M(ne===oe-1?0:ne+1),isNaN(be.diameter)&&Lf(be,0),isNaN(b.diameter)&&Lf(b,0),z=Math.max(z,(be.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),de,pe*Math.PI/180,we*Math.PI/180)}else ue=_0(this,b+(360<=we?oe:oe-1)*(re!==nd?y:1.6*y),de,pe*Math.PI/180,we*Math.PI/180);z=ue*de}else if(z=ue*de,be=Cy(this,ue,z,pe*Math.PI/180,we*Math.PI/180),isNaN(y))(re===td||re===nd)&&(y=(be-b)/(360<=we?oe:oe-1));else if(re===td||re===nd)be=(be-b)/(360<=we?oe:oe-1),be<y?(ue=_0(this,b+y*(360<=we?oe:oe-1),de,pe*Math.PI/180,we*Math.PI/180),z=ue*de):y=be;else{for(ne=-1/0,b=0;b<oe;b++)Ae=E.M(b),_e=E.M(b===oe-1?0:b+1),isNaN(Ae.diameter)&&Lf(Ae,0),isNaN(_e.diameter)&&Lf(_e,0),ne=Math.max(ne,(Ae.diameter+_e.diameter)/2);ne+=y,b=_0(this,ne*(360<=we?oe:oe-1),de,pe*Math.PI/180,we*Math.PI/180),b>ue?(ue=b,z=ue*de):ne=be/(360<=we?oe:oe-1)}if(this.kw=re,this.lc=ue,this.Zm=de,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,de=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=de/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,de/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,de/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,de/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,de/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,de,ue,this.direction);break;case nd:Ix(this,y,de,ue,this.direction)}else Ix(this,y,de,ue-de/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),de=y.M(oe),pe=ne*Math.tan(ue)/a;pe=Math.sqrt((ne*ne+a*a*pe*pe)/(1+pe*pe)),de.centerX=pe*Math.cos(ue),de.centerY=pe*Math.sin(ue),de.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),de=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(de.diameter)&&Lf(de,0),ue=j0(a,b,z,E===Mu?x:-x,(ue.diameter+de.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),de=y.Fa();if(de.length===3)de[0].centerX=z,de[0].centerY=0,de[1].centerX=de[0].centerX-de[0].width/2-de[1].width/2-ne,de[1].y=de[0].y,de[2].centerX=(de[0].centerX+de[1].centerX)/2,de[2].y=de[0].y-de[2].height-ne;else if(de.length===4)de[0].centerX=z,de[0].centerY=0,de[2].centerX=-de[0].centerX,de[2].centerY=de[0].centerY,de[1].centerX=0,de[1].y=Math.min(de[0].y,de[2].y)-de[1].height-ne,de[3].centerX=0,de[3].y=Math.max(de[0].y+de[0].height+ne,de[2].y+de[2].height+ne);else{z=ot.alloc();for(var pe=0;pe<de.length&&(de[pe].centerX=oe,de[pe].centerY=ue,!(pe>=de.length-1));pe++)Tx(a,oe,ue,de,pe,b,z)||Rx(a,oe,ue,de,pe,b,z),oe=z.x,ue=z.y;if(ot.free(z),a.mj++,!(23<a.mj)){oe=de[0].centerX,ue=de[0].centerY,z=de[de.length-1].centerX,pe=de[de.length-1].centerY;var we=Math.abs(oe-z)-((de[0].width+de[de.length-1].width)/2+ne),be=Math.abs(ue-pe)-((de[0].height+de[de.length-1].height)/2+ne);ne=0,1>Math.abs(be)?Math.abs(oe-z)<(de[0].width+de[de.length-1].width)/2&&(ne=0):ne=0<be?be: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,-de[de.length-1].width),ne=Math.min(ne,-de[de.length-1].height)),a.Xr.compare(ne,de),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>de.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),de=ot.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,de)||Rx(a,oe,ue,pe,we,b,de),oe=de.x,ue=de.y;if(ot.free(de),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 de=!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;de=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ne.x=z,ne.y=ue,!1;de=!0}return ue=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==de&&(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}Os.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Os.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 ot(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))},Os.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 de=Math.sin(oe);ne+=Math.sqrt(1-a*a*de*de)*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}}Os.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:Ft("Invalid sorting type.")}return a};function IS(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Yn;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}Os.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 Yn;for(var oe=0,ue=0;ue<y.length;ue++){var de=y[ue].length;if(de===1)E.push(ue);else if(de===0)b.add(a.M(ue));else{if(oe===0)x.push(ue);else{for(var pe=de=1/0,we=-1,be=[],Ae=0;Ae<x.length;Ae++)0>y[x[Ae]].indexOf(x[Ae===x.length-1?0:Ae+1])&&be.push(Ae===x.length-1?0:Ae+1);if(be.length===0)for(Ae=0;Ae<x.length;Ae++)be.push(Ae);for(Ae=0;Ae<be.length;Ae++){for(var _e=be[Ae],pt=y[ue],nt=0,Bt=0;Bt<ne.length;Bt++){var At=z[ne[Bt]],kt=z[re[Bt]];if(At<kt){var Ut=At;At=kt}else Ut=kt;if(Ut<_e&&_e<=At)for(kt=0;kt<pt.length;kt++){var fn=pt[kt];0>x.indexOf(fn)||Ut<z[fn]&&z[fn]<At||Ut===z[fn]||At===z[fn]||nt++}else for(kt=0;kt<pt.length;kt++)fn=pt[kt],0>x.indexOf(fn)||Ut<z[fn]&&z[fn]<At&&Ut!==z[fn]&&At!==z[fn]&&nt++}for(pt=nt,Bt=nt=0;Bt<y[ue].length;Bt++)Ut=x.indexOf(y[ue][Bt]),0<=Ut&&(Ut=Math.abs(_e-(Ut>=_e?Ut+1:Ut)),nt+=Ut<x.length+1-Ut?Ut:x.length+1-Ut);for(Bt=0;Bt<ne.length;Bt++)Ut=z[ne[Bt]],At=z[re[Bt]],Ut>=_e&&Ut++,At>=_e&&At++,Ut>At&&(kt=At,At=Ut,Ut=kt),At-Ut<(x.length+2)/2==(Ut<_e&&_e<=At)&&nt++;(pt<de||pt===de&&nt<pe)&&(de=pt,pe=nt,we=_e)}for(x.splice(we,0,ue),de=0;de<x.length;de++)z[x[de]]=de;for(de=0;de<y[ue].length;de++)pe=y[ue][de],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],de=x.indexOf(ue),0<=de){for(we=pe=0;we<y[ue].length;we++)be=x.indexOf(y[ue][we]),0>be||be===de||(Ae=be>de?be-de:de-be,pe+=be<de!=Ae>ne-Ae?1:-1);x.splice(0>pe?de:de+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},Qe.Object.defineProperties(Os.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 Mn(Os,"ConstantSpacing",0),Bf=new Mn(Os,"ConstantDistance",1),Qh=new Mn(Os,"ConstantAngle",2),nd=new Mn(Os,"Packed",3),Mu=new Mn(Os,"Clockwise",4),Mf=new Mn(Os,"Counterclockwise",5),ig=new Mn(Os,"BidirectionalLeft",6),Ep=new Mn(Os,"BidirectionalRight",7),z0=new Mn(Os,"Forwards",8),Z0=new Mn(Os,"Reverse",9),H0=new Mn(Os,"Ascending",10),W0=new Mn(Os,"Descending",11),bp=new Mn(Os,"Optimized",12),G0=new Mn(Os,"Pythagorean",13),_g=new Mn(Os,"Circular",14);Os.className="CircularLayout",Os.ConstantSpacing=td,Os.ConstantDistance=Bf,Os.ConstantAngle=Qh,Os.Packed=nd,Os.Clockwise=Mu,Os.Counterclockwise=Mf,Os.BidirectionalLeft=ig,Os.BidirectionalRight=Ep,Os.Forwards=z0,Os.Reverse=Z0,Os.Ascending=H0,Os.Descending=W0,Os.Optimized=bp,Os.Pythagorean=G0,Os.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){ts.call(this,a)}Vt(Fp,ts),Fp.prototype.createVertex=function(){return new xm(this)},Fp.prototype.createEdge=function(){return new $0(this)},Fp.className="CircularNetwork";function xm(a){ul.call(this,a),this.u=this.Si=NaN}Vt(xm,ul);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}Qe.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)}Vt($0,hc),$0.className="CircularEdge";function ql(a){xs.call(this),this.ah=null,this.An=0,this.$d=new vi(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)}Vt(ql,xs),ql.prototype.cloneProtected=function(a){xs.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},ql.prototype.createNetwork=function(){return new jg(this)},ql.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=mi(),de=0;de<re+y.vertexes.count+2;de++)ue[de]=null;re=0,ne.reset();for(var pe=Dn.alloc();ne.next();)if(de=ne.value,this.computeBounds(de,pe),oe)oe=!1,b=pe.x+pe.width/2,z=pe.y+pe.height/2,ue[0]=new ot(pe.x+pe.width+E.width,pe.y),ue[1]=new ot(pe.x,pe.y+pe.height+E.height),re=2;else{var we=jx(ue,re,b,z,pe.width,pe.height,E),be=ue[we],Ae=new ot(be.x+pe.width+E.width,be.y),_e=new ot(be.x,be.y+pe.height+E.height);for(we+1<re&&ue.splice(we+1,0,null),ue[we]=Ae,ue[we+1]=_e,re++,we=be.x-pe.x,be=be.y-pe.y,de=de.vertexes.iterator;de.next();)Ae=de.value,Ae.centerX+=we,Ae.centerY+=be}for(Dn.free(pe),de=y.vertexes.iterator;de.next();)ne=de.value,we=ne.bounds,2>re?(b=we.x+we.width/2,z=we.y+we.height/2,ue[0]=new ot(we.x+we.width+E.width,we.y),ue[1]=new ot(we.x,we.y+we.height+E.height),re=2):(oe=jx(ue,re,b,z,we.width,we.height,E),pe=ue[oe],be=new ot(pe.x+we.width+E.width,pe.y),we=new ot(pe.x,pe.y+we.height+E.height),oe+1<re&&ue.splice(oe+1,0,null),ue[oe]=be,ue[oe+1]=we,re++,ne.centerX=pe.x+ne.width/2,ne.centerY=pe.y+ne.height/2);for(Di(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},ql.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},ql.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 Yn),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 Yn,b.Hj=re),re.add(ne),b.Vd--,b.sh+=ne.sh):ne.network===E&&(re=ne.Hj,re===null&&(re=new Yn,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,de=oe.count-ne;de<oe.count;de++){var pe=oe.M(de),we=null;for(z=pe.edges.iterator;z.next();){var be=z.value;if(be.Ax(pe)===b){we=be;break}}we!==null&&(ue+=we.length,re+=pe.width*pe.height)}z=b.centerX,oe=b.centerY,de=b.width,pe=b.height,we=b.focus,be=de*pe,1>be&&(be=1),re=tt.sqrt((re+be+ue*ue*4/(ne*ne))/be),ne=(re-1)*de/2,re=(re-1)*pe/2,b.bounds=new Dn(z-we.x-ne,oe-we.y-re,de+2*ne,pe+2*re),b.focus=new ot(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 Dn(E.centerX-z,E.centerY-ne,b.Ss,b.Qs),E.focus=new ot(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,de=y.vertexes.iterator;de.next();){var pe=de.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(be,Ae){return be===null||Ae===null||be===Ae?0:Ae.width*Ae.height-be.width*be.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(de=null,pe=oe.edges.iterator;pe.next();){de=pe.value;break}pe=oe.width;var we=oe.height;pe=tt.sqrt(pe*pe+we*we)/2,de=z+de.length+pe,pe=ne+(y*(re/2>>1)+ue)*(re%2===0?1:-1),oe.centerX=E+de*Math.cos(pe),oe.centerY=b+de*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 de=a[ue],pe=de.x-x,we=de.y-E;if(pe=pe*pe+we*we,pe<re){for(we=ue-1;0<=we;we--)if(a[we].y>de.y&&a[we].x-de.x<b+ne.width)continue e;for(we=ue+1;we<y;we++)if(a[we].x>de.x&&a[we].y-de.y<z+ne.height)continue e;oe=ue,re=pe}}return oe}ql.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},ql.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(_e,pt){return _e===null||pt===null||_e===pt?0:_e.centerX-pt.centerX}):y.sort(function(_e,pt){return _e===null||pt===null||_e===pt?0:_e.centerY-pt.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 de=E.y+re.y;E=ne.charge*a.electricalFieldX(oe,de),ue=ne.charge*a.electricalFieldY(oe,de),E+=ne.mass*a.gravitationalFieldX(oe,de),ue+=ne.mass*a.gravitationalFieldY(oe,de),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 be=E.y+re.y;if(oe-ue>x||ue-oe>x){if(b)break}else if(de-be>x||be-de>x){if(!b)break}else{var Ae=zx(ne,we);1>Ae?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new V0),Ae=E.random(),re=E.random(),oe>ue?(E=Math.abs(we.bounds.right-ne.bounds.x),E=(1+E)*Ae):oe<ue?(E=Math.abs(we.bounds.x-ne.bounds.right),E=-(1+E)*Ae):(E=Math.max(we.width,ne.width),E=(1+E)*Ae-E/2),de>be?(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)/(Ae*Ae),E=(ue-oe)/Ae*re,ue=(be-de)/Ae*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,de=z.bounds,pe=z.focus,oe=de.x+pe.x,de=de.y+pe.y,pe=zx(x,z),1>pe?(pe=a.randomNumberGenerator,pe===null&&(a.randomNumberGenerator=pe=new V0),re=pe.random(),pe=pe.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,ue=(ne>de?1:-1)*(1+(z.height>x.height?z.height:x.height))*pe):(re=re.stiffness*(pe-re.length),E=(oe-E)/pe*re,ue=(de-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}ql.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},ql.prototype.moveFixedVertex=function(){},ql.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},ql.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)}},ql.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Dn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Dn.free(x)}x=Dn.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()}Dn.free(x)},ql.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},ql.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},ql.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},ql.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},ql.prototype.electricalFieldX=function(){return 0},ql.prototype.electricalFieldY=function(){return 0},ql.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},ql.prototype.gravitationalFieldX=function(){return 0},ql.prototype.gravitationalFieldY=function(){return 0},ql.prototype.isFixed=function(a){return a.isFixed},Qe.Object.defineProperties(ql.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"&&Ft('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())}}}),ql.className="ForceDirectedLayout";function Hx(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}Hx.className="ForceDirectedSubnet";function jg(a){ts.call(this,a)}Vt(jg,ts),jg.prototype.createVertex=function(){return new Sm(this)},jg.prototype.createEdge=function(){return new Pm(this)},jg.className="ForceDirectedNetwork";function Sm(a){ul.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}Vt(Sm,ul),Qe.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}Vt(Pm,hc),Qe.Object.defineProperties(Pm.prototype,{stiffness:{get:function(){return this.o},set:function(a){this.o!==a&&(this.o=a)}},length:{get:function(){return this.j},set:function(a){this.j!==a&&(this.j=a)}}}),Pm.className="ForceDirectedEdge";function V0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}V0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},V0.className="RandomNumberGenerator";function za(a){xs.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 ot,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Vt(za,xs),za.prototype.cloneProtected=function(a){xs.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:Ft("Unknown enum value: "+a):xs.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 de=b.node;if(ne=z.node,de===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 be=we;pe=oe,we=re,oe=ue,re=be}var Ae=b.focus;ue=z.focus;var _e=E.rev?z.bounds:b.bounds;be=ot.alloc(),de!==pe?_e.w()&&pe.isVisible()?pe.actualBounds.w()?(Kh(pe,we,Oo,be),be.x+=pe.actualBounds.x-_e.x,be.y+=pe.actualBounds.y-_e.y):(Kh(pe,we,Oo,be),be.w()||be.assign(Ae)):be.assign(Ae):_e.w()?(Kh(pe,we,Oo,be),be.w()||be.assign(Ae)):be.assign(Ae),pe=E.rev?b.bounds:z.bounds,de=ot.alloc(),ne!==oe?pe.w()&&oe.isVisible()?oe.actualBounds.w()?(Kh(oe,re,Oo,de),de.x+=oe.actualBounds.x-pe.x,de.y+=oe.actualBounds.y-pe.y):(Kh(oe,re,Oo,de),de.w()||de.assign(ue)):de.assign(ue):pe.w()?(Kh(oe,re,Oo,de),de.w()||de.assign(ue)):de.assign(ue),this.K===90||this.K===270?(ne=Math.round((be.x-Ae.x)/this.kc),oe=be.x,re=Math.round((de.x-ue.x)/this.kc),ue=de.x):(ne=Math.round((be.y-Ae.y)/this.kc),oe=be.y,re=Math.round((de.y-ue.y)/this.kc),ue=de.y),ot.free(be),ot.free(de),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(be=b.layer,de=z.layer,pe=0,_e=E.link,_e!==null){var pt=_e.fromPort,nt=_e.toPort;if(pt!==null&&nt!==null){var Bt=_e.fromNode;if(we=_e.toNode,Bt!==null&&we!==null){var At=X0(this,!0),kt=X0(this,!1),Ut=this.setsPortSpots?At:_e.computeSpot(!0,pt);Ae=this.setsPortSpots?kt:_e.computeSpot(!1,nt);var fn=_e.isOrthogonal;Ut.$c()&&Ut.Hf(kt)&&Ae.$c()&&Ae.Hf(At)?pe=0:(At=_e.getLinkPoint(Bt,pt,Ut,!0,fn,we,nt,ot.alloc()),kt=_e.getLinkDirection(Bt,pt,At,Ut,!0,fn,we,nt),ot.free(At),Ut.ys()||kt!==Jx(this,E,!0)?this.setsPortSpots&&Bt!==null&&Bt.ports.count===1&&E.rev&&(pe+=1):pe+=1,Ut=_e.getLinkPoint(we,nt,Ae,!1,fn,Bt,pt,ot.alloc()),_e=_e.getLinkDirection(we,nt,Ut,Ae,!1,fn,Bt,pt),ot.free(Ut),Ae.ys()||_e!==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)&&(Ae=a.createVertex(),Ae.node=null,Ae.Dj=1,Ae.layer=be,Ae.near=b,a.dh(Ae),b=a.Zj(b,Ae,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ne,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=Ae),_e=1,pe&&_e--,be-de>_e&&0<be){for(E.valid=!1,Ae=a.createVertex(),Ae.node=null,Ae.Dj=2,Ae.layer=be-1,a.dh(Ae),b=a.Zj(b,Ae,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=Ae,be--;be-de>_e&&0<be;)Ae=a.createVertex(),Ae.node=null,Ae.Dj=3,Ae.layer=be-1,a.dh(Ae),b=a.Zj(b,Ae,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Ae,be--;b=a.Zj(Ae,z,E.link),b.valid=!pe,pe&&(Ae.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 de=ne+1;de<oe;de++){var pe=E[de];pe.near===ue&&pe.Dj===ue.Dj||re++}else for(de=ne-1;de>oe;de--)pe=E[de],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 be=oe[ue];if(be.valid&&be.fromVertex.layer!==y)for(pe=be.fromVertex.index,de=be.portToPos,be=be.portFromPos,we=ue+1;we<oe.length;we++){var Ae=oe[we];if(Ae.valid&&Ae.fromVertex.layer!==y){var _e=Ae.fromVertex.index,pt=Ae.portToPos;Ae=Ae.portFromPos,de<pt&&(pe>_e||pe===_e&&be>Ae)&&re++,pt<de&&(_e>pe||_e===pe&&Ae>be)&&re++}}}if(0>=x){for(oe=E[ne].destinationEdgesArrayAccess,ue=0;ue<oe.length;ue++)if(be=oe[ue],be.valid&&be.toVertex.layer!==y)for(pe=be.toVertex.index,de=be.portToPos,be=be.portFromPos,we=ue+1;we<oe.length;we++)Ae=oe[we],Ae.valid&&Ae.toVertex.layer!==y&&(_e=Ae.toVertex.index,pt=Ae.portToPos,Ae=Ae.portFromPos,be<Ae&&(pe>_e||pe===_e&&de>pt)&&re++,Ae<be&&(_e>pe||_e===pe&&pt>de)&&re++)}for(z[ne*b+ne]=re,oe=ne+1;oe<b;oe++){var nt=0,Bt=0;if(0<=x){re=E[ne].sourceEdgesArrayAccess;var At=E[oe].sourceEdgesArrayAccess;for(ue=0;ue<re.length;ue++)if(be=re[ue],be.valid&&be.fromVertex.layer!==y)for(pe=be.fromVertex.index,be=be.portFromPos,we=0;we<At.length;we++)Ae=At[we],Ae.valid&&Ae.fromVertex.layer!==y&&(_e=Ae.fromVertex.index,Ae=Ae.portFromPos,(pe<_e||pe===_e&&be<Ae)&&Bt++,(_e<pe||_e===pe&&Ae<be)&&nt++)}if(0>=x){for(re=E[ne].destinationEdgesArrayAccess,At=E[oe].destinationEdgesArrayAccess,ue=0;ue<re.length;ue++)if(be=re[ue],be.valid&&be.toVertex.layer!==y)for(pe=be.toVertex.index,de=be.portToPos,we=0;we<At.length;we++)Ae=At[we],Ae.valid&&Ae.toVertex.layer!==y&&(_e=Ae.toVertex.index,pt=Ae.portToPos,(pe<_e||pe===_e&&de<pt)&&Bt++,(_e<pe||_e===pe&&pt<de)&&nt++)}z[ne*b+oe]=nt,z[oe*b+ne]=Bt}}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 K0(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 de=0;de<ue.length;de++){var pe=ue[de];if(pe.valid&&pe.toVertex.layer!==b){var we=pe.fromVertex.column+pe.portFromColOffset,be=pe.toVertex.column+pe.portToColOffset;re+=(Math.abs(we-be)+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 de=0,pe=0,we=re.near;if(we!==null&&we.layer===re.layer&&(de+=we.column-1,pe++),oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var be=re.fromVertex;re.valid&&!re.rev&&be.layer!==y&&(de+=be.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&&(de+=we.column,pe++);z[ne]=pe===0?-1:de/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 de=0,pe=[],we=re.near;if(we!==null&&we.layer===re.layer&&(pe[de]=we.column-1,de++),re=void 0,oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var be=re.fromVertex;re.valid&&!re.rev&&be.layer!==y&&(pe[de]=be.column+re.portFromColOffset,de++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(pe[de]=we.column+re.portToColOffset,de++);de===0?z[ne]=-1:(pe.sort(function(Ae,_e){return Ae-_e}),ue=de>>1,z[ne]=de&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=Vx(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Vx(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 de=re.sourceEdges;de.next();)de.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 Vx(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:Kx(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(Kx(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 Kx(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 de=0,pe=!1,we=ue.sourceEdgesArrayAccess;b=we.length;for(var be=0;be<b;be++){var Ae=we[be],_e=Ae.fromVertex;de+=1,_e.component!==1&&(z+=1,_e=_e.layer-ue.layer,Ae=a.linkMinLength(Ae),E=Math.min(E,_e-Ae))}for(we=ue.destinationEdgesArrayAccess,b=we.length,be=0;be<b;be++)Ae=we[be].toVertex,--de,Ae.component!==1?--z:pe=!0;(oe===null||de<re)&&!pe&&(oe=ue,re=de)}}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,de=!1,we=ne.sourceEdgesArrayAccess,pe=we.length,be=0;be<pe;be++)Ae=we[be].fromVertex,ue+=1,Ae.component!==1?E+=1:de=!0;for(we=ne.destinationEdgesArrayAccess,pe=we.length,be=0;be<pe;be++)Ae=we[be],_e=Ae.toVertex,--ue,_e.component!==1&&(--E,_e=ne.layer-_e.layer,Ae=a.linkMinLength(Ae),b=Math.min(b,_e-Ae));(re===null||ue>z)&&!de&&(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 de=x[E[z].index*b+E[z+1].index],pe=x[E[z+1].index*b+E[z].index],we=0,be=0,Ae=E[z].column,_e=E[z+1].column,pt=a.nodeMinColumnSpace(E[z],!0),nt=a.nodeMinColumnSpace(E[z],!1),Bt=a.nodeMinColumnSpace(E[z+1],!0),At=a.nodeMinColumnSpace(E[z+1],!1);pt=Ae-pt+Bt,nt=_e-nt+At;var kt=E[z].sourceEdges.iterator;for(kt.reset();kt.next();)if(Bt=kt.value,At=Bt.fromVertex,Bt.valid&&At.layer===y){for(Bt=0;E[Bt]!==At;)Bt++;Bt<z&&(we+=2*(z-Bt),be+=2*(z+1-Bt)),Bt===z+1&&(we+=1),Bt>z+1&&(we+=4*(Bt-z),be+=4*(Bt-(z+1)))}for(kt=E[z].destinationEdges.iterator,kt.reset();kt.next();)if(Bt=kt.value,At=Bt.toVertex,Bt.valid&&At.layer===y){for(Bt=0;E[Bt]!==At;)Bt++;Bt===z+1&&(be+=1)}for(kt=E[z+1].sourceEdges.iterator,kt.reset();kt.next();)if(Bt=kt.value,At=Bt.fromVertex,Bt.valid&&At.layer===y){for(Bt=0;E[Bt]!==At;)Bt++;Bt<z&&(we+=2*(z+1-Bt),be+=2*(z-Bt)),Bt===z&&(be+=1),Bt>z+1&&(we+=4*(Bt-(z+1)),be+=4*(Bt-z))}for(kt=E[z+1].destinationEdges.iterator,kt.reset();kt.next();)if(Bt=kt.value,At=Bt.toVertex,Bt.valid&&At.layer===y){for(Bt=0;E[Bt]!==At;)Bt++;Bt===z&&(we+=1)}Bt=At=0,kt=ne[E[z].index];var Ut=re[E[z].index],fn=ne[E[z+1].index],bi=re[E[z+1].index];kt!==-1&&(At+=Math.abs(kt-Ae),Bt+=Math.abs(kt-nt)),Ut!==-1&&(At+=Math.abs(Ut-Ae),Bt+=Math.abs(Ut-nt)),fn!==-1&&(At+=Math.abs(fn-_e),Bt+=Math.abs(fn-pt)),bi!==-1&&(At+=Math.abs(bi-_e),Bt+=Math.abs(bi-pt)),(be<we-.5||be===we&&pe<de-.5||be===we&&pe===de&&Bt<At-.5)&&(ue=oe=!0,E[z].column=nt,E[z+1].column=pt,de=E[z],E[z]=E[z+1],E[z+1]=de)}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&KS)!==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 de=b[E].column,pe=a.nodeMinColumnSpace(b[E],!0),we=a.nodeMinColumnSpace(b[E],!1),be=0;0>E-1||de-b[E-1].column-1>pe+a.nodeMinColumnSpace(b[E-1],!1)?be=de-1:be=de,pe=E+1>=z||b[E+1].column-de-1>we+a.nodeMinColumnSpace(b[E+1],!0)?de+1:de;var Ae=we=0,_e=0;if(0>=x)for(var pt=b[E].sourceEdges.iterator;pt.next();){var nt=pt.value,Bt=nt.fromVertex;if(nt.valid&&Bt.layer!==y){var At=Ey(nt),kt=nt.portFromColOffset;nt=nt.portToColOffset,Bt=Bt.column,we+=(Math.abs(de+nt-(Bt+kt))+1)*At,Ae+=(Math.abs(be+nt-(Bt+kt))+1)*At,_e+=(Math.abs(pe+nt-(Bt+kt))+1)*At}}if(0<=x)for(pt=b[E].destinationEdges.iterator;pt.next();)nt=pt.value,Bt=nt.toVertex,nt.valid&&Bt.layer!==y&&(At=Ey(nt),kt=nt.portFromColOffset,nt=nt.portToColOffset,Bt=Bt.column,we+=(Math.abs(de+kt-(Bt+nt))+1)*At,Ae+=(Math.abs(be+kt-(Bt+nt))+1)*At,_e+=(Math.abs(pe+kt-(Bt+nt))+1)*At);nt=kt=At=0,pt=ne[b[E].index],Bt=re[b[E].index],pt!==-1&&(At+=Math.abs(pt-de),kt+=Math.abs(pt-be),nt+=Math.abs(pt-pe)),Bt!==-1&&(At+=Math.abs(Bt-de),kt+=Math.abs(Bt-be),nt+=Math.abs(Bt-pe)),Ae<we||Ae===we&&kt<At?(ue=oe=!0,b[E].column=be):(_e<we||_e===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),de=0;if(ne[x]===-1)if(x===0&&x===b-1)de=re;else if(x===0){var pe=E[x+1].column;pe-re===ue+a.nodeMinColumnSpace(E[x+1],!0)?de=re-1:de=re}else x===b-1?(pe=E[x-1].column,de=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,de=(oe+ue)/2|0);else x===0&&x===b-1?de=ne[x]:x===0?(pe=E[x+1].column,ue=pe-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,de=Math.min(ne[x],ue)):x===b-1?(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,de=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?de=ne[x]:oe>=ne[x]?de=oe:ue<=ne[x]&&(de=ue));de!==re&&(z=!0,E[x].column=de)}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=K0(a);for(E=z+1;z<E;){E=z,tS(a,x,1);var ne=K0(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=K0(a),E=z+1;z<E;)E=z,tS(a,x,-1),ne=K0(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=mi(),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 Xn,GS(y,x);var z=null,ne=null,re=null,oe=null,ue=(a.ve&1)!==0,de=(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=wr(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(),de&&(a.verticalAlignment(y,x,!0),ne=Y0(a,y,!0,!0)),Di(y),a.u(z,ne,re,oe),a.network.vertexes.each(function(be){var Ae=mi();ue&&Ae.push(z.get(be)),de&&Ae.push(ne.get(be)),pe&&Ae.push(re.get(be)),we&&Ae.push(oe.get(be)),Ae.sort(function(pt,nt){return pt-nt});var _e=Ae.length;_e=(Ae[Math.floor((_e-1)/2)]+Ae[Math.ceil((_e-1)/2)])/2,Di(Ae),be.zc=_e})}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 de=Ty(ue);if(0<de.length){de=de[0].node===null;break e}}de=!1}var pe=de;if(oe===re.length-1||pe){for(de=ne.length-1,pe&&(de=Ty(ue)[0].index);z<=oe;){if(ue=re[z],!ue.bo){pe=[];for(var we=wr(ue.sourceEdgesArrayAccess),be=we.next();!be.done;be=we.next())be=be.value,be.valid&&pe.push(be);ue.bo=pe}for(ue=wr(ue.bo),pe=ue.next();!pe.done;pe=ue.next())pe=pe.value,we=pe.fromVertex.index,(we<b||we>de)&&y.add(pe);z++}b=de}}}za.prototype.verticalAlignment=function(a,y,x){$S(a),a=wr(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=wr(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],de=void 0;de=x?tv(ue,z):tv(z,ue),!y.contains(de)&&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=wr(y),ne=z.next();!ne.done;ne=z.next()){var re=wr(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=wr(y),re=z.next();!re.done;re=z.next()){re=wr(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var ue=0,de=oe;de.align!==oe;){var pe=de.align,we=ne?de.width:de.height,be=ne?pe.width:pe.height;if(x){var Ae=tv(de,pe),_e=Ae.portFromPos,pt=Ae.portToPos;Ae.link!==null&&(de.node&&de.node!==Ae.link.fromNode&&(_e=ne?de.focusX:de.focusY),pe.node&&pe.node!==Ae.link.toNode&&(pt=ne?pe.focusX:pe.focusY))}else Ae=tv(pe,de),_e=Ae.portToPos,pt=Ae.portFromPos,Ae.link!==null&&(de.node&&de.node!==Ae.link.toNode&&(_e=ne?de.focusX:de.focusY),pe.node&&pe.node!==Ae.link.fromNode&&(pt=ne?pe.focusX:pe.focusY));we=E?de.qg+(we-_e)-(be-pt):de.qg+_e-pt,pe.qg=we,ue=Math.min(ue,we),de=de.align}de=oe;do de.qg=de.qg-ue,de=de.align;while(de!==oe)}}for(x=wr(y),ne=x.next();!ne.done;ne=x.next())for(z=wr(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 Ki,y=wr(y),ne=y.next();!ne.done;ne=y.next())for(x=wr(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&&Ft("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=mi(),b=mi(),z=1/0,ne=0;4>ne;ne++)if(y[ne]){var re=VS(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)));Di(E),Di(b)};function VS(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:Ar:a.K===90?y?Ar:bo:a.K===180?y?oa:Io:y?Io:oa}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,de=oe.column|0;E?(ne=y.x+this.kc*de,ue=this.Kd[ue]):(ne=this.Kd[ue],ue=y.y+this.kc*de),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 ot(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 Dn(0,0,x,Math.abs(this.Ta[0]))):y.push(new Dn(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Dn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Dn(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Dn(0,0,Math.abs(this.Ta[0]),x)):y.push(new Dn(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Dn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Dn(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 de=x.fromVertex,pe=x.toVertex;if(x.valid)y.curve===Ec&&y.pointsCount===4&&(de.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===Cs&&(E=!0),re!==null&&oe===Cs&&(x=!0),(E||x)&&(oe=null,E&&(oe=y.getLinkPointFromPoint(b,ne,ne.ga(Oo),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(Oo),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(de.layer===pe.layer)y.zf();else{var we=!1,be=!1,Ae=this.ie,_e=y.firstPickIndex+1;if(y.isOrthogonal){be=!0;var pt=y.pointsCount;4<pt&&y.points.removeRange(2,pt-3)}else if(y.curve===Ec)we=!0,pt=y.pointsCount,4<pt&&y.points.removeRange(2,pt-3),pt===4&&(_e=2);else{pt=y.pointsCount;var nt=ue===Cs,Bt=oe===Cs;2<pt&&nt&&Bt?y.points.removeRange(1,pt-2):3<pt&&nt&&!Bt?y.points.removeRange(1,pt-3):3<pt&&!nt&&Bt?y.points.removeRange(2,pt-2):4<pt&&!nt&&!Bt&&y.points.removeRange(2,pt-3)}if(x.rev){for(;pe!==null&&de!==pe;){var At=pt=null;for(nt=pe.sourceEdges.iterator;nt.next()&&(Bt=nt.value,Bt.link!==x.link||(pt=Bt.fromVertex,At=Bt.toVertex,pt.node!==null)););if(pt===null)break;if(pt!==de){nt=y.i(_e-1).x,Bt=y.i(_e-1).y;var kt=pt.centerX,Ut=pt.centerY;if(be)this.K===180||this.K===0?_e===y.firstPickIndex+1?(y.m(_e++,nt,Bt),y.m(_e++,nt,Ut)):(At!==null?At.centerY:Bt)!==Ut&&(At=this.Ta[pt.layer-1]+this.Rf.x,y.m(_e++,At,Bt),y.m(_e++,At,Ut)):_e===y.firstPickIndex+1?(y.m(_e++,nt,Bt),y.m(_e++,kt,Bt)):(At!==null?At.centerX:nt)!==kt&&(At=this.Ta[pt.layer-1]+this.Rf.y,y.m(_e++,nt,At),y.m(_e++,kt,At));else if(_e===y.firstPickIndex+1){At=Math.max(10,this.he[pe.layer]);var fn=Math.max(10,this.Ld[pe.layer]);if(we)this.K===180?kt<=pe.bounds.x?(pe=pe.bounds.x,y.m(_e++,pe-At,Ut),y.m(_e++,pe,Ut),y.m(_e++,pe+fn,Ut)):(y.m(_e++,kt-At,Ut),y.m(_e++,kt,Ut),y.m(_e++,kt+fn,Ut)):this.K===90?Ut>=pe.bounds.bottom?(pe=pe.bounds.y+pe.bounds.height,y.m(_e++,kt,pe+fn),y.m(_e++,kt,pe),y.m(_e++,kt,pe-At)):(y.m(_e++,kt,Ut+fn),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut-At)):this.K===270?Ut<=pe.bounds.y?(pe=pe.bounds.y,y.m(_e++,kt,pe-At),y.m(_e++,kt,pe),y.m(_e++,kt,pe+fn)):(y.m(_e++,kt,Ut-At),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut+fn)):this.K===0&&(kt>=pe.bounds.right?(pe=pe.bounds.x+pe.bounds.width,y.m(_e++,pe+fn,Ut),y.m(_e++,pe,Ut),y.m(_e++,pe-At,Ut)):(y.m(_e++,kt+fn,Ut),y.m(_e++,kt,Ut),y.m(_e++,kt-At,Ut)));else{y.m(_e++,nt,Bt);var bi=0;this.K===180||this.K===0?((this.K===180?kt>=pe.bounds.right:kt<=pe.bounds.x)&&(bi=(this.K===0?-At:fn)/2),y.m(_e++,nt+bi,Ut)):((this.K===270?Ut>=pe.bounds.bottom:Ut<=pe.bounds.y)&&(bi=(this.K===90?-At:fn)/2),y.m(_e++,kt,Bt+bi)),y.m(_e++,kt,Ut)}}else At=Math.max(10,this.he[pt.layer]),fn=Math.max(10,this.Ld[pt.layer]),we?this.K===180?(y.m(_e++,kt-At-Ae,Ut),y.m(_e++,Math.min(kt-At+Ae/2,kt),Ut),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut),y.m(_e++,Math.max(kt+fn-Ae/2,kt),Ut),y.m(_e++,kt+fn+Ae,Ut)):this.K===90?(y.m(_e++,kt,Ut+fn+Ae),y.m(_e++,kt,Math.max(Ut+fn-Ae/2,Ut)),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut),y.m(_e++,kt,Math.min(Ut-At+Ae/2,Ut)),y.m(_e++,kt,Ut-At-Ae)):this.K===270?(y.m(_e++,kt,Ut-At-Ae),y.m(_e++,kt,Math.min(Ut-At+Ae/2,Ut)),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut),y.m(_e++,kt,Math.max(Ut+fn-Ae/2,Ut)),y.m(_e++,kt,Ut+fn+Ae)):(y.m(_e++,kt+fn+Ae,Ut),y.m(_e++,Math.max(kt+fn-Ae/2,kt),Ut),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut),y.m(_e++,Math.min(kt-At+Ae/2,kt),Ut),y.m(_e++,kt-At-Ae,Ut)):y.m(_e++,kt,Ut)}pe=pt}(re===null||ue!==Cs||be)&&(nt=y.i(_e-1).x,Bt=y.i(_e-1).y,kt=y.i(_e).x,Ut=y.i(_e).y,be?(Ae=this.Ld[de.layer],this.K===180||this.K===0?(be=Bt,be>=de.bounds.y&&be<=de.bounds.bottom&&(this.K===180?kt>=de.bounds.x:kt<=de.bounds.right)&&(pe=de.centerX+(this.K===180?-Ae:Ae),be<de.bounds.y+de.bounds.height/2?be=de.bounds.y-this.kc/2:be=de.bounds.bottom+this.kc/2,y.m(_e++,pe,Bt),y.m(_e++,pe,be)),y.m(_e++,kt,be)):(be=nt,be>=de.bounds.x&&be<=de.bounds.right&&(this.K===270?Ut>=de.bounds.y:Ut<=de.bounds.bottom)&&(pe=de.centerY+(this.K===270?-Ae:Ae),be<de.bounds.x+de.bounds.width/2?be=de.bounds.x-this.kc/2:be=de.bounds.right+this.kc/2,y.m(_e++,nt,pe),y.m(_e++,be,pe)),y.m(_e++,be,Ut)),y.m(_e++,kt,Ut)):we?(At=Math.max(10,this.he[de.layer]),fn=Math.max(10,this.Ld[de.layer]),this.K===180&&kt>=de.bounds.x?(pe=de.bounds.x+de.bounds.width,y.L(_e-2,pe,Bt),y.L(_e-1,pe+fn,Bt)):this.K===90&&Ut<=de.bounds.bottom?(pe=de.bounds.y,y.L(_e-2,nt,pe),y.L(_e-1,nt,pe-At)):this.K===270&&Ut>=de.bounds.y?(pe=de.bounds.y+de.bounds.height,y.L(_e-2,nt,pe),y.L(_e-1,nt,pe+fn)):this.K===0&&kt<=de.bounds.right&&(pe=de.bounds.x,y.L(_e-2,pe,Bt),y.L(_e-1,pe-At,Bt))):(At=Math.max(10,this.he[de.layer]),fn=Math.max(10,this.Ld[de.layer]),be=0,this.K===180||this.K===0?((this.K===180?kt<=de.bounds.x:kt>=de.bounds.right)&&(be=(this.K===0?fn:-At)/2),y.m(_e++,kt+be,Bt)):((this.K===270?Ut<=de.bounds.y:Ut>=de.bounds.bottom)&&(be=(this.K===90?fn:-At)/2),y.m(_e++,nt,Ut+be)),y.m(_e++,kt,Ut)))}else{for(;de!==null&&de!==pe;){for(At=pt=null,de=de.destinationEdges.iterator;de.next()&&(nt=de.value,nt.link!==x.link||(pt=nt.toVertex,At=nt.fromVertex,At.node!==null&&(At=null),pt.node!==null)););if(pt===null)break;pt!==pe&&(nt=y.i(_e-1).x,Bt=y.i(_e-1).y,kt=pt.centerX,Ut=pt.centerY,be?this.K===180||this.K===0?(At!==null?At.centerY:Bt)!==Ut&&(At=this.Ta[pt.layer]+this.Rf.x,_e===y.firstPickIndex+1&&(At=this.K===0?Math.max(At,nt):Math.min(At,nt)),y.m(_e++,At,Bt),y.m(_e++,At,Ut)):(At!==null?At.centerX:nt)!==kt&&(At=this.Ta[pt.layer]+this.Rf.y,_e===y.firstPickIndex+1&&(At=this.K===90?Math.max(At,Bt):Math.min(At,Bt)),y.m(_e++,nt,At),y.m(_e++,kt,At)):(At=Math.max(10,this.he[pt.layer]),fn=Math.max(10,this.Ld[pt.layer]),we?this.K===180?(y.m(_e++,kt+fn+Ae,Ut),y.m(_e++,Math.max(kt+fn-Ae/2,kt),Ut),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut),y.m(_e++,Math.min(kt-At+Ae/2,kt),Ut),y.m(_e++,kt-At-Ae,Ut)):this.K===90?(y.m(_e++,kt,Ut-At-Ae),y.m(_e++,kt,Math.min(Ut-At+Ae/2,Ut)),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut),y.m(_e++,kt,Math.max(Ut+fn-Ae/2,Ut)),y.m(_e++,kt,Ut+fn+Ae)):this.K===270?(y.m(_e++,kt,Ut+fn+Ae),y.m(_e++,kt,Math.max(Ut+fn-Ae/2,Ut)),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut),y.m(_e++,kt,Math.min(Ut-At+Ae/2,Ut)),y.m(_e++,kt,Ut-At-Ae)):(y.m(_e++,kt-At-Ae,Ut),y.m(_e++,Math.min(kt-At+Ae/2,kt),Ut),y.m(_e++,kt,Ut),y.m(_e++,kt,Ut),y.m(_e++,Math.max(kt+fn-Ae/2,kt),Ut),y.m(_e++,kt+fn+Ae,Ut)):this.K===180?(y.m(_e++,kt+fn,Ut),y.m(_e++,kt-At,Ut)):this.K===90?(y.m(_e++,kt,Ut-At),y.m(_e++,kt,Ut+fn)):this.K===270?(y.m(_e++,kt,Ut+fn),y.m(_e++,kt,Ut-At)):(y.m(_e++,kt-At,Ut),y.m(_e++,kt+fn,Ut)))),de=pt}be&&(nt=y.i(_e-1).x,Bt=y.i(_e-1).y,kt=y.i(_e).x,Ut=y.i(_e).y,this.K===180||this.K===0?Bt!==Ut&&(At=this.K===0?Math.min(Math.max((kt+nt)/2,this.Ta[pe.layer]+this.Rf.x),kt):Math.max(Math.min((kt+nt)/2,this.Ta[pe.layer]+this.Rf.x),kt),y.m(_e++,At,Bt),y.m(_e++,At,Ut)):nt!==kt&&(At=this.K===90?Math.min(Math.max((Ut+Bt)/2,this.Ta[pe.layer]+this.Rf.y),Ut):Math.max(Math.min((Ut+Bt)/2,this.Ta[pe.layer]+this.Rf.y),Ut),y.m(_e++,nt,At),y.m(_e++,kt,At)))}E!==null&&we&&4<=y.pointsCount&&(ne!==null&&(ne=ue===Cs?y.getLinkPointFromPoint(b,ne,ne.ga(Oo),y.i(3),!0):y.i(0),ue===Cs&&(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===Cs?y.getLinkPointFromPoint(z,re,re.ga(Oo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===Cs&&(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 Yn,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 de=0;oe.y<z.y?de=ue.y<z.y?3:z.x<ne.x?2:1:oe.y>z.y&&(de=ue.y>z.y?0:ne.x<z.x?2:1),re.j=de}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),de=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(de++,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,de<pe?(oe=!1,ue=de,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,de=0,pe=z;pe<b;pe++){var we=x[pe];(oe?we.first:we.jc)!==re&&(de++,re=oe?we.first:we.jc);var be=we.link;z=be.i(we.index),ne=be.i(we.index+1);var Ae=this.linkSpacing*(de-(ue-1)/2);y++,be.uh(),be.L(we.index,z.x,z.y+Ae),be.L(we.index+1,ne.x,ne.y+Ae),be.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),de=0,oe.x<z.x?de=ue.x<z.x?3:z.y<ne.y?2:1:oe.x>z.x&&(de=ue.x>z.x?0:ne.y<z.y?2:1),re.j=de),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),de=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(de++,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,de<pe?(oe=!1,ue=de,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,de=0,pe=z;pe<b;pe++)we=x[pe],(oe?we.first:we.jc)!==re&&(de++,re=oe?we.first:we.jc),be=we.link,z=be.i(we.index),ne=be.i(we.index+1),Ae=this.linkSpacing*(de-(ue-1)/2),y++,be.uh(),be.L(we.index,z.x+Ae,z.y),be.L(we.index+1,ne.x+Ae,ne.y),be.zf()}z=b}a=E}}}},Be=za.prototype,Be.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},Be.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},Be.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},Be.B=function(a,y){return a-=y,-1<a&&1>a},Be.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Ft("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}Qe.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()):Ft("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 Mn(za,"CycleDepthFirst",0),Ly=new Mn(za,"CycleGreedy",1),Cm=new Mn(za,"CycleFromLayers",2),Q0=new Mn(za,"LayerOptimalLinkLength",0),Ny=new Mn(za,"LayerLongestPathSink",1),Ay=new Mn(za,"LayerLongestPathSource",2),q0=new Mn(za,"InitDepthFirstOut",0),Dy=new Mn(za,"InitDepthFirstIn",1),Iy=new Mn(za,"InitNaive",2),Oy=new Mn(za,"AggressiveNone",0),ev=new Mn(za,"AggressiveLess",1),ky=new Mn(za,"AggressiveMore",2),KS=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){ts.call(this,a)}Vt(Mp,ts),Mp.prototype.createVertex=function(){return new Oc(this)},Mp.prototype.createEdge=function(){return new Em(this)},Mp.className="LayeredDigraphNetwork";function Oc(a){ul.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}Vt(Oc,ul);function rS(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],E=wr(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=wr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Ft("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=wr(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=wr(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){ul.prototype.Cl.call(this,a),this.bo=this.co=null},Oc.prototype.Kl=function(a){ul.prototype.Kl.call(this,a),this.bo=this.co=null},Oc.prototype.zl=function(a){ul.prototype.zl.call(this,a),this.$n=this.ao=null},Oc.prototype.Jl=function(a){ul.prototype.Jl.call(this,a),this.$n=this.ao=null},Qe.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}Vt(Em,hc),Qe.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 Ro(a){xs.call(this),this.Ub=new Xn,this.Wn=ov,this.ud=ih,this.vo=sv,this.Bq=Ky,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new vi(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)}Vt(Ro,xs),Ro.prototype.cloneProtected=function(a){xs.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)},Ro.prototype.qb=function(a){a.classType===Ro?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:Ft("Unknown enum value: "+a):xs.prototype.qb.call(this,a)},Ro.prototype.createNetwork=function(){return new Wg(this)},Ro.prototype.makeNetwork=function(a){function y(E){if(E instanceof Ii)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof gi){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 hn?(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},Ro.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof hn&&(y=a),this.path===ov&&y!==null?this.ud=y.isTreePathToChildren?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 Xn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Ii?(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 Xn,this.isValidLayout=!0};function YS(a){var y=new Xn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Ro.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:Ft("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:Ft("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 Yn,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 Yn,E=y.sourceVertexes;E.next();)b=E.value,aS(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Ft("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}Ro.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}}Ro.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])}}Ro.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])}}Ro.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:Ft("Unhandled sorting value "+a.sorting.toString())}},Ro.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ro.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 de=ue.value;de.category==="Comment"&&de.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(de),de.Va(),de=de.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,de.width),ne+=de.height+Math.abs(re)):(z+=de.width+Math.abs(re),ne=Math.max(ne,de.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=Dn.allocAt(0,0,a.bounds.width+z,a.bounds.height+ne),a.bounds=b,Dn.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}Ro.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,de=ue.length,pe=ot.alloc(),we=0;we<de;we++){var be=ue[we],Ae=be.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-Ae.width,a.bounds.y+oe),be.move(pe),be=be.Sd();be.next();){var _e=be.value;_e.fromSpot=oa,_e.toSpot=Io}else for(pe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),be.move(pe),be=be.Sd();be.next();)_e=be.value,_e.fromSpot=Io,_e.toSpot=oa;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),be.move(pe),be=be.Sd();be.next();)_e=be.value,_e.fromSpot=Io,_e.toSpot=oa;else for(pe.h(a.bounds.x+a.commentMargin-Ae.width,a.bounds.y+oe),be.move(pe),be=be.Sd();be.next();)_e=be.value,_e.fromSpot=oa,_e.toSpot=Io;oe=0<=a.commentSpacing?oe+(Ae.height+a.commentSpacing):oe+(a.commentSpacing-Ae.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Ae.height),be.move(pe),be=be.Sd();be.next();)_e=be.value,_e.fromSpot=bo,_e.toSpot=Ar;else for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),be.move(pe),be=be.Sd();be.next();)_e=be.value,_e.fromSpot=Ar,_e.toSpot=bo;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),be.move(pe),be=be.Sd();be.next();)_e=be.value,_e.fromSpot=Ar,_e.toSpot=bo;else for(pe.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Ae.height),be.move(pe),be=be.Sd();be.next();)_e=be.value,_e.fromSpot=bo,_e.toSpot=Ar;oe=0<=a.commentSpacing?oe+(Ae.width+a.commentSpacing):oe+(a.commentSpacing-Ae.width)}}if(ot.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)}},Ro.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,de=If(oe),pe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var we=a.nodeSpacing,be=this.computeNodeIndent(a),Ae=a.rowSpacing,_e=0;(E||ue||a.hm||a.im&&a.maxGenerationCount===1)&&(_e=Math.max(0,a.rowIndent)),E=a.width;var pt=a.height,nt=0,Bt=0,At=0,kt=null,Ut=null,fn=0,bi=0,Xi=0,Wi=0,fi=0,ti=0,lo=0,$r=0;if(de&&!bm(oe)&&135<b&&ne.reverse(),bm(oe))if(1<re)for(var Fa=0;Fa<re;Fa++)Fa%2===0&&Fa!==re-1&&($r=Math.max($r,y?ne[Fa].Da.width:ne[Fa].Da.height));else re===1&&($r=y?ne[0].Da.width:ne[0].Da.height);if(de){switch(oe){case qh:Bt=135>b?dS(this,a,ne,$r,nt,Bt):hS(this,a,ne,$r,nt,Bt),$r=Bt.x,nt=Bt.width,Bt=Bt.height;break;case ef:for(kt=0;kt<re;kt++)Ut=ne[kt],pe=Ut.Da,At=ti===0?0:Ae,y?(Ut.S.h(z-pe.width,Wi+At),nt=Math.max(nt,pe.width),Bt=Math.max(Bt,Wi+At+pe.height),Wi+=At+pe.height):(Ut.S.h(Xi+At,z-pe.height),nt=Math.max(nt,Xi+At+pe.width),Bt=Math.max(Bt,pe.height),Xi+=At+pe.width),ti++;break;case Nh:for(kt=0;kt<re;kt++)Ut=ne[kt],z=Ut.Da,pe=ti===0?0:Ae,y?(Ut.S.h(we/2+a.focus.x,Wi+pe),nt=Math.max(nt,z.width),Bt=Math.max(Bt,Wi+pe+z.height),Wi+=pe+z.height):(Ut.S.h(Xi+pe,we/2+a.focus.y),nt=Math.max(nt,Xi+pe+z.width),Bt=Math.max(Bt,z.height),Xi+=pe+z.width),ti++}kt=Qu(this,2),Ut=Qu(this,2),y?(kt[0].h(0,0),kt[1].h(0,Bt),Ut[0].h(nt,0)):(kt[0].h(0,0),kt[1].h(nt,0),Ut[0].h(0,Bt)),Ut[1].h(nt,Bt)}else for(Fa=0;Fa<re;Fa++){var qa=ne[Fa],wl=qa.Da;if(y){0<pe&&0<ti&&Xi+we+wl.width>pe&&(Xi<z&&rg(a,oe,z-Xi,0,lo,Fa-1),fi++,ti=0,lo=Fa,At=Bt,Xi=0,Wi=135<b?-Bt-Ae:Bt+Ae),iv(this,qa,0,Wi);var Nl=0;if(ti===0)kt=qa.Yo,Ut=qa.kp,fn=wl.width,bi=wl.height,(kt===null||Ut===null||b!==id(qa))&&(kt=Qu(this,2),Ut=Qu(this,2),kt[0].h(0,0),kt[1].h(0,bi),Ut[0].h(fn,0),Ut[1].h(fn,bi));else{var pu=mi();bi=fS(this,a,qa,kt,Ut,fn,bi,pu),Nl=bi.x,kt=pu[0],Ut=pu[1],fn=bi.width,bi=bi.height,Di(pu),Xi<wl.width&&0>Nl&&(zg(a,-Nl,0,lo,Fa-1),rv(kt,-Nl,0),rv(Ut,-Nl,0),Nl=0)}qa.S.h(Nl,Wi),nt=Math.max(nt,fn),Bt=Math.max(Bt,At+(fi===0?0:Ae)+wl.height),Xi=fn}else 0<pe&&0<ti&&Wi+we+wl.height>pe&&(Wi<z&&rg(a,oe,0,z-Wi,lo,Fa-1),fi++,ti=0,lo=Fa,At=nt,Wi=0,Xi=135<b?-nt-Ae:nt+Ae),iv(this,qa,Xi,0),Nl=0,ti===0?(kt=qa.Yo,Ut=qa.kp,fn=wl.width,bi=wl.height,(kt===null||Ut===null||b!==id(qa))&&(kt=Qu(this,2),Ut=Qu(this,2),kt[0].h(0,0),kt[1].h(fn,0),Ut[0].h(0,bi),Ut[1].h(fn,bi))):(pu=mi(),bi=fS(this,a,qa,kt,Ut,fn,bi,pu),Nl=bi.x,kt=pu[0],Ut=pu[1],fn=bi.width,bi=bi.height,Di(pu),Wi<wl.height&&0>Nl&&(zg(a,0,-Nl,lo,Fa-1),rv(kt,0,-Nl),rv(Ut,0,-Nl),Nl=0)),qa.S.h(Xi,Nl),Bt=Math.max(Bt,bi),nt=Math.max(nt,At+(fi===0?0:Ae)+wl.width),Wi=bi;ti++}switch(0<fi&&(y?(Bt+=Math.max(0,x),Xi<nt&&rg(a,oe,nt-Xi,0,lo,re-1),0<_e&&(ue||zg(a,_e,0,0,re-1),nt+=_e)):(nt+=Math.max(0,x),Wi<Bt&&rg(a,oe,0,Bt-Wi,lo,re-1),0<_e&&(ue||zg(a,0,_e,0,re-1),Bt+=_e))),_e=ue=0,oe){case Np:y?ue+=nt/2-a.focus.x-be/2:_e+=Bt/2-a.focus.y-be/2;break;case Hg:0<fi?y?ue+=nt/2-a.focus.x-be/2:_e+=Bt/2-a.focus.y-be/2:y?($r=ne[0].S.x+ne[0].la.x,ue+=$r+(ne[re-1].S.x+ne[re-1].la.x+2*ne[re-1].focus.x-$r)/2-a.focus.x-be/2):($r=ne[0].S.y+ne[0].la.y,_e+=$r+(ne[re-1].S.y+ne[re-1].la.y+2*ne[re-1].focus.y-$r)/2-a.focus.y-be/2);break;case rh:y?(ue-=be,nt+=be):(_e-=be,Bt+=be);break;case oh:y?(ue+=nt-a.width+be,nt+=be):(_e+=Bt-a.height+be,Bt+=be);break;case qh:y?1<re?ue+=$r+we/2-a.focus.x:ue+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<re?_e+=$r+we/2-a.focus.y:_e+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case ef:y?ue+=nt+we/2-a.focus.x:_e+=Bt+we/2-a.focus.y;break;case Nh:break;default:Bt=this.customAlignment(a,ue,_e,nt,Bt),ue=Bt[0],_e=Bt[1],nt=Bt[2],Bt=Bt[3]}for(be=0;be<re;be++)$r=ne[be],y?$r.S.h($r.S.x+$r.la.x-ue,$r.S.y+(135<b?(de?-Bt:-$r.Da.height)+$r.la.y-x:pt+x+$r.la.y)):$r.S.h($r.S.x+(135<b?(de?-nt:-$r.Da.width)+$r.la.x-x:E+x+$r.la.x),$r.S.y+$r.la.y-_e);if(re=ne=0,de?y?(nt=jy(a,nt,ue),0>ue&&(ue=0),135<b&&(_e+=Bt+x),Bt+=pt+x,oe===Nh&&(ne+=we/2+a.focus.x),re+=pt+x):(135<b&&(ue+=nt+x),nt+=E+x,Bt=zy(a,Bt,_e),0>_e&&(_e=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&&(_e+=Bt+x),Bt=Math.max(Math.max(Bt,pt),Bt+pt+x),re+=pt+x):(135<b&&(ue+=nt+x),nt=Math.max(Math.max(nt,E),nt+E+x),a.comments===null?pt>Bt&&(Bt=Zy(oe,0,pt-Bt),ne=Bt.x,re=Bt.y,Bt=pt,_e=0):Bt=zy(a,Bt,_e),0>_e&&(re-=_e,_e=0),ne+=E+x),0<fi)b=Qu(this,4),fi=Qu(this,4),y?(b[2].h(0,pt+x),b[3].h(b[2].x,Bt),fi[2].h(nt,b[2].y),fi[3].h(fi[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(nt,b[2].y),fi[2].h(b[2].x,Bt),fi[3].h(b[3].x,fi[2].y));else{for(b=Qu(this,kt.length+2),fi=Qu(this,Ut.length+2),oe=0;oe<kt.length;oe++)de=kt[oe],b[oe+2].h(de.x+ne,de.y+re);for(oe=0;oe<Ut.length;oe++)de=Ut[oe],fi[oe+2].h(de.x+ne,de.y+re)}y?(b[0].h(ue,0),b[1].h(b[0].x,pt),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])),fi[0].h(ue+E,0),fi[1].h(fi[0].x,pt),fi[2].y<fi[1].y&&(fi[2].x<fi[0].x?fi[2].assign(fi[1]):fi[1].assign(fi[2])),fi[3].y<fi[2].y&&(fi[3].x<fi[0].x?fi[3].assign(fi[2]):fi[2].assign(fi[3])),b[2].y-=x/2,fi[2].y-=x/2):(b[0].h(0,_e),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])),fi[0].h(0,_e+pt),fi[1].h(E,fi[0].y),fi[2].x<fi[1].x&&(fi[2].y<fi[0].y?fi[2].assign(fi[1]):fi[1].assign(fi[2])),fi[3].x<fi[2].x&&(fi[3].y<fi[0].y?fi[3].assign(fi[2]):fi[2].assign(fi[3])),b[2].x-=x/2,fi[2].x-=x/2),xd(this,kt),xd(this,Ut),a.Yo=b,a.kp=fi,a.la.h(ue,_e),a.Da.h(nt,Bt)}break;default:Ft("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,de=ue===rh,pe=ue===oh;re=If(ue);var we=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var be=y.nodeSpacing,Ae=a.computeNodeIndent(y),_e=de||pe?0:Ae/2,pt=y.rowSpacing,nt=0;(de||pe||y.hm||y.im&&y.maxGenerationCount===1)&&(nt=Math.max(0,y.rowIndent)),de=y.width;var Bt=y.height,At=0,kt=0,Ut=0,fn=0,bi=0,Xi=0,Wi=0,fi=0,ti=0,lo=0;if(re&&!bm(ue)&&135<E&&b.reverse(),bm(ue))if(1<ne)for(var $r=0;$r<ne;$r++){var Fa=b[$r],qa=Fa.Da;$r%2===0&&$r!==ne-1?ti=Math.max(ti,(x?qa.width:qa.height)+a.computeBusNodeSpacing(Fa)-be):$r%2!==0&&(lo=Math.max(lo,(x?qa.width:qa.height)+a.computeBusNodeSpacing(Fa)-be))}else ne===1&&(ti=x?b[0].Da.width:b[0].Da.height);if(re)switch(ue){case qh:case ah:kt=135>E?dS(a,y,b,ti,At,kt):hS(a,y,b,ti,At,kt),ti=kt.x,At=kt.width,kt=kt.height;break;case ef:for(we=0;we<ne;we++)_e=b[we],Ut=_e.Da,lo=Wi===0?0:pt,x?(_e.S.h(z-Ut.width,bi+lo),At=Math.max(At,Ut.width),kt=Math.max(kt,bi+lo+Ut.height),bi+=lo+Ut.height):(_e.S.h(fn+lo,z-Ut.height),At=Math.max(At,fn+lo+Ut.width),kt=Math.max(kt,Ut.height),fn+=lo+Ut.width),Wi++;break;case Nh:for(z=0;z<ne;z++)we=b[z],_e=we.Da,Ut=Wi===0?0:pt,x?(we.S.h(be/2+y.focus.x,bi+Ut),At=Math.max(At,_e.width),kt=Math.max(kt,bi+Ut+_e.height),bi+=Ut+_e.height):(we.S.h(fn+Ut,be/2+y.focus.y),At=Math.max(At,fn+Ut+_e.width),kt=Math.max(kt,_e.height),fn+=Ut+_e.width),Wi++}else for(lo=0;lo<ne;lo++)$r=b[lo],Fa=$r.Da,x?(0<we&&0<Wi&&fn+be+Fa.width>we&&(fn<z&&rg(y,ue,z-fn,0,fi,lo-1),Xi++,Wi=0,fi=lo,Ut=kt,fn=0,bi=135<E?-kt-pt:kt+pt),qa=Wi===0?_e:be,iv(a,$r,0,bi),$r.S.h(fn+qa,bi),At=Math.max(At,fn+qa+Fa.width),kt=Math.max(kt,Ut+(Xi===0?0:pt)+Fa.height),fn+=qa+Fa.width):(0<we&&0<Wi&&bi+be+Fa.height>we&&(bi<z&&rg(y,ue,0,z-bi,fi,lo-1),Xi++,Wi=0,fi=lo,Ut=At,bi=0,fn=135<E?-At-pt:At+pt),qa=Wi===0?_e:be,iv(a,$r,fn,0),$r.S.h(fn,bi+qa),kt=Math.max(kt,bi+qa+Fa.height),At=Math.max(At,Ut+(Xi===0?0:pt)+Fa.width),bi+=qa+Fa.height),Wi++;switch(0<Xi&&(x?(kt+=Math.max(0,oe),fn<At&&rg(y,ue,At-fn,0,fi,ne-1),0<nt&&(pe||zg(y,nt,0,0,ne-1),At+=nt)):(At+=Math.max(0,oe),bi<kt&&rg(y,ue,0,kt-bi,fi,ne-1),0<nt&&(pe||zg(y,0,nt,0,ne-1),kt+=nt))),nt=pe=0,ue){case Np:x?pe+=At/2-y.focus.x-Ae/2:nt+=kt/2-y.focus.y-Ae/2;break;case Hg:0<Xi?x?pe+=At/2-y.focus.x-Ae/2:nt+=kt/2-y.focus.y-Ae/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-Ae/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-Ae/2);break;case rh:x?(pe-=Ae,At+=Ae):(nt-=Ae,kt+=Ae);break;case oh:x?(pe+=At-y.width+Ae,At+=Ae):(nt+=kt-y.height+Ae,kt+=Ae);break;case qh:case ah:x?1<ne?pe+=ti+be/2-y.focus.x:pe+=b[0].focus.x-y.focus.x+b[0].la.x:1<ne?nt+=ti+be/2-y.focus.y:nt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case ef:x?pe+=At+be/2-y.focus.x:nt+=kt+be/2-y.focus.y;break;case Nh:break;default:a=a.customAlignment(y,pe,nt,At,kt),pe=a[0],nt=a[1],At=a[2],kt=a[3]}for(a=0;a<ne;a++)Ae=b[a],x?Ae.S.h(Ae.S.x+Ae.la.x-pe,Ae.S.y+(135<E?(re?-kt:-Ae.Da.height)+Ae.la.y-oe:Bt+oe+Ae.la.y)):Ae.S.h(Ae.S.x+(135<E?(re?-At:-Ae.Da.width)+Ae.la.x-oe:de+oe+Ae.la.x),Ae.S.y+Ae.la.y-nt);x?(At=jy(y,At,pe),0>pe&&(pe=0),135<E&&(nt+=kt+oe),kt=Math.max(Math.max(kt,Bt),kt+Bt+oe)):(135<E&&(pe+=At+oe),At=Math.max(Math.max(At,de),At+de+oe),kt=zy(y,kt,nt),0>nt&&(nt=0)),y.la.h(pe,nt),y.Da.h(At,kt)}}Ro.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 Dn(E,0,b,z);if(ne===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Dn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=id(y)===90,de=0,pe=0,we=0,be=0;be<ne;be++)if(!(be%2!==0||1<ne&&be===ne-1)){var Ae=x[be],_e=Ae.Da,pt=de===0?0:oe;if(ue){var nt=a.computeBusNodeSpacing(Ae)-re;Ae.S.h(E-(_e.width+nt),we+pt),b=Math.max(b,_e.width+nt),z=Math.max(z,we+pt+_e.height),we+=pt+_e.height}else nt=a.computeBusNodeSpacing(Ae)-re,Ae.S.h(pe+pt,E-(_e.height+nt)),z=Math.max(z,_e.height+nt),b=Math.max(b,pe+pt+_e.width),pe+=pt+_e.width;de++}for(de=0,Ae=pe,be=we,ue?(pe=E+re,we=0):(pe=0,we=E+re),_e=0;_e<ne;_e++)if(_e%2!==0){pt=x[_e],nt=pt.Da;var Bt=de===0?0:oe;if(ue){var At=a.computeBusNodeSpacing(pt)-re;pt.S.h(pe+At,we+Bt),b=Math.max(b,pe+nt.width+At),z=Math.max(z,we+Bt+nt.height),we+=Bt+nt.height}else At=a.computeBusNodeSpacing(pt)-re,pt.S.h(pe+Bt,we+At),b=Math.max(b,pe+Bt+nt.width),z=Math.max(z,we+nt.height+At),pe+=Bt+nt.width;de++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ue?Math.max(Math.abs(be),Math.abs(we)):Math.max(Math.abs(Ae),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(be,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(Ae,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 Dn(E,0,b,z)}function hS(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new Dn(E,0,b,z);if(ne===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Dn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=id(y)===270,de=0,pe=0,we=0,be=0;be<ne;be++)if(!(be%2!==0||1<ne&&be===ne-1)){var Ae=x[be],_e=Ae.Da,pt=de===0?0:oe;if(ue){var nt=a.computeBusNodeSpacing(Ae)-re;we-=pt+_e.height,Ae.S.h(E-(_e.width+nt),we),b=Math.max(b,_e.width+nt),z=Math.max(z,Math.abs(we))}else nt=a.computeBusNodeSpacing(Ae)-re,pe-=pt+_e.width,Ae.S.h(pe,E-(_e.height+nt)),z=Math.max(z,_e.height+nt),b=Math.max(b,Math.abs(pe));de++}for(de=0,Ae=pe,be=we,ue?(pe=E+re,we=0):(pe=0,we=E+re),_e=0;_e<ne;_e++)if(_e%2!==0){pt=x[_e],nt=pt.Da;var Bt=de===0?0:oe;if(ue){var At=a.computeBusNodeSpacing(pt)-re;we-=Bt+nt.height,pt.S.h(pe+At,we),b=Math.max(b,pe+nt.width+At),z=Math.max(z,Math.abs(we))}else At=a.computeBusNodeSpacing(pt)-re,pe-=Bt+nt.width,pt.S.h(pe,we+At),z=Math.max(z,we+nt.height+At),b=Math.max(b,Math.abs(pe));de++}for(1<ne&&ne%2===1&&(oe=x[ne-1],de=oe.Da,a=a.computeBusLastRowSpacing(oe,ue?Math.max(Math.abs(be),Math.abs(we)):Math.max(Math.abs(Ae),Math.abs(pe))),ue?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-de.height-a),pe=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,pe+de.width),0>pe&&(b-=pe),z=Math.max(z,Math.abs(Math.min(be,we))+a+de.height),0>oe.S.x&&(E=nv(y,oe.S.x,!1,E,re))):(oe.S.h(-b-de.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(Ae,pe))+a+de.width),we=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,we+de.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 Dn(E,0,b,z)}Ro.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Ro.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:Ft("Unhandled alignment value "+a.toString())}return new ot(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:Ft("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,de=y.nodeSpacing;y=E;var pe=b;E=z;var we=ne,be=x.Yo,Ae=x.kp;ne=x.Da;var _e=ue?Math.max(we,ne.height):Math.max(E,ne.width);if((be===null||oe!==id(x))&&(be=Qu(a,2),Ae=Qu(a,2),ue?(be[0].h(0,0),be[1].h(0,ne.height),Ae[0].h(ne.width,0),Ae[1].h(Ae[0].x,be[1].y)):(be[0].h(0,0),be[1].h(ne.width,0),Ae[0].h(0,ne.height),Ae[1].h(be[1].x,Ae[0].y))),ue){if(we=9999999,!(pe===null||2>pe.length||be===null||2>be.length))for(b=x=0;x<pe.length&&b<be.length;){z=pe[x];var pt=be[b];oe=pt.x,ue=pt.y,oe+=E;var nt=z;x+1<pe.length&&(nt=pe[x+1]);var Bt=pt;pt=Bt.x,Bt=Bt.y,b+1<be.length&&(Bt=be[b+1],pt=Bt.x,Bt=Bt.y,pt+=E);var At=we;z.y===ue?At=oe-z.x:z.y>ue&&z.y<Bt?At=oe+(z.y-ue)/(Bt-ue)*(pt-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++:Bt<=ue?b++:(nt.y<=Bt&&x++,Bt<=nt.y&&b++)}if(we=E-we,we+=de,x=be,b=we,y===null||2>y.length||x===null||2>x.length)E=null;else{for(de=Qu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)ue=x[z++],de[E++].h(ue.x+b,ue.y);for(;oe<y.length;)ue=y[oe++],de[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++],de[E++].h(ue.x+b,ue.y);for(x=Qu(a,E),oe=0;oe<E;oe++)x[oe].assign(de[oe]);xd(a,de),E=x}if(z=Ae,oe=we,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(de=Qu(a,pe.length+z.length),b=ue=x=0;x<pe.length&&pe[x].y<z[0].y;)nt=pe[x++],de[b++].h(nt.x,nt.y);for(;ue<z.length;)nt=z[ue++],de[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++],de[b++].h(oe.x,oe.y);for(z=Qu(a,b),x=0;x<b;x++)z[x].assign(de[x]);xd(a,de),b=z}return z=Math.max(0,we)+ne.width,ne=_e,xd(a,y),xd(a,be),xd(a,pe),xd(a,Ae),re[0]=E,re[1]=b,new Dn(we,0,z,ne)}if(E=9999999,!(pe===null||2>pe.length||be===null||2>be.length))for(b=x=0;x<pe.length&&b<be.length;)z=pe[x],pt=be[b],oe=pt.x,ue=pt.y,ue+=we,nt=z,x+1<pe.length&&(nt=pe[x+1]),Bt=pt,pt=Bt.x,Bt=Bt.y,b+1<be.length&&(Bt=be[b+1],pt=Bt.x,Bt=Bt.y,Bt+=we),At=E,z.x===oe?At=ue-z.y:z.x>oe&&z.x<pt?At=ue+(z.x-oe)/(pt-oe)*(Bt-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++:pt<=oe?b++:(nt.x<=pt&&x++,pt<=nt.x&&b++);if(we-=E,we+=de,x=be,b=we,y===null||2>y.length||x===null||2>x.length)E=null;else{for(de=Qu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)ue=x[z++],de[E++].h(ue.x,ue.y+b);for(;oe<y.length;)ue=y[oe++],de[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++],de[E++].h(ue.x,ue.y+b);for(x=Qu(a,E),oe=0;oe<E;oe++)x[oe].assign(de[oe]);xd(a,de),E=x}if(z=Ae,oe=we,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(de=Qu(a,pe.length+z.length),b=ue=x=0;x<pe.length&&pe[x].x<z[0].x;)nt=pe[x++],de[b++].h(nt.x,nt.y);for(;ue<z.length;)nt=z[ue++],de[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++],de[b++].h(oe.x,oe.y);for(z=Qu(a,b),x=0;x<b;x++)z[x].assign(de[x]);xd(a,de),b=z}return z=_e,ne=Math.max(0,we)+ne.height,xd(a,y),xd(a,be),xd(a,pe),xd(a,Ae),re[0]=E,re[1]=b,new Dn(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 ot;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)}Ro.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:Ft("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 Vy:y+=b.Da.width+this.$d.width;break;default:Ft("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)}}}Ro.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Ro.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Ro.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 ot(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new ot(-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 Dn(0,z,x,re))):this.angle===90?(b.push(new Dn(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new Dn(z,0,re,x))):(b.push(new Dn(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},Ro.prototype.commitLayers=function(){},Ro.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ro.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])}}Ro.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=Io;break;case 90:b=Ar;break;case 180:b=oa;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?oa:bo;if(ne===1||y===ne-1&&ne%2===1)switch(E){case 0:oe=oa;break;case 90:oe=bo;break;case 180:oe=Io;break;default:oe=Ar}else y%2===0&&(oe=E===90||E===270?Io:Ar);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?Io:Ar,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?oa: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=Io;break;case 90:E.fromSpot=Ar;break;case 180:E.fromSpot=oa;break;default:E.fromSpot=bo}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=oa;break;case 90:E.toSpot=bo;break;case 180:E.toSpot=Io;break;default:E.toSpot=Ar}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=Io;break;case 90:E.toSpot=Ar;break;case 180:E.toSpot=oa;break;default:E.toSpot=bo}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=oa;break;case 90:E.fromSpot=bo;break;case 180:E.fromSpot=Io;break;default:E.fromSpot=Ar}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}Ro.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},Ro.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)},Qe.Object.defineProperties(Ro.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!==Ky&&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!==Vy&&a!==uv||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==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()):Ft("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 Mn(Ro,"PathDefault",-1),ih=new Mn(Ro,"PathDestination",0),Zg=new Mn(Ro,"PathSource",1),Lp=new Mn(Ro,"SortingForwards",10),Fm=new Mn(Ro,"SortingReverse",11),Bm=new Mn(Ro,"SortingAscending",12),Mm=new Mn(Ro,"SortingDescending",13),Np=new Mn(Ro,"AlignmentCenterSubtrees",20),Hg=new Mn(Ro,"AlignmentCenterChildren",21),rh=new Mn(Ro,"AlignmentStart",22),oh=new Mn(Ro,"AlignmentEnd",23),qh=new Mn(Ro,"AlignmentBus",24),ah=new Mn(Ro,"AlignmentBusBranching",25),ef=new Mn(Ro,"AlignmentTopLeftBus",26),Nh=new Mn(Ro,"AlignmentBottomRightBus",27),av=new Mn(Ro,"CompactionNone",30),Lm=new Mn(Ro,"CompactionBlock",31),sv=new Mn(Ro,"StyleLayered",40),Wy=new Mn(Ro,"StyleLastParents",41),Gy=new Mn(Ro,"StyleAlternating",42),$y=new Mn(Ro,"StyleRootOnly",43),lv=new Mn(Ro,"ArrangementVertical",50),Vy=new Mn(Ro,"ArrangementHorizontal",51),uv=new Mn(Ro,"ArrangementFixedRoots",52),Ky=new Mn(Ro,"LayerIndividual",60),Uy=new Mn(Ro,"LayerSiblings",61),cv=new Mn(Ro,"LayerUniform",62);Ro.className="TreeLayout",Ro.PathDefault=ov,Ro.PathDestination=ih,Ro.PathSource=Zg,Ro.SortingForwards=Lp,Ro.SortingReverse=Fm,Ro.SortingAscending=Bm,Ro.SortingDescending=Mm,Ro.AlignmentCenterSubtrees=Np,Ro.AlignmentCenterChildren=Hg,Ro.AlignmentStart=rh,Ro.AlignmentEnd=oh,Ro.AlignmentBus=qh,Ro.AlignmentBusBranching=ah,Ro.AlignmentTopLeftBus=ef,Ro.AlignmentBottomRightBus=Nh,Ro.CompactionNone=av,Ro.CompactionBlock=Lm,Ro.StyleLayered=sv,Ro.StyleLastParents=Wy,Ro.StyleAlternating=Gy,Ro.StyleRootOnly=$y,Ro.ArrangementVertical=lv,Ro.ArrangementHorizontal=Vy,Ro.ArrangementFixedRoots=uv,Ro.LayerIndividual=Ky,Ro.LayerSiblings=Uy,Ro.LayerUniform=cv;function Wg(a){ts.call(this,a)}Vt(Wg,ts),Wg.prototype.createVertex=function(){return new Wc(this)},Wg.prototype.createEdge=function(){return new Ap(this)},Wg.className="TreeNetwork";function Wc(a){ul.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 ot(0,0),this.Da=new vi(0,0),this.la=new ot(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}Vt(Wc,ul),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)},Qe.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 ot(0,0)}Vt(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:Ft("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,de;if(a.uh(),ue||oe){for(de=2;4<a.pointsCount;)a.pv(2);var pe=a.i(1),we=a.i(2)}else{for(de=1;3<a.pointsCount;)a.pv(1);pe=a.i(0),we=a.i(a.pointsCount-1)}var be=a.i(a.pointsCount-1);z===0?(x.alignment===oh?(z=E.bottom+b.y,b.y===0&&pe.y>be.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<be.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(de,pe.x,z),de++,a.m(de,E.right+ne,z),de++,a.m(de,E.right+ne+(b.x-re)/3,z),de++,a.m(de,E.right+ne+2*(b.x-re)/3,z),de++,a.m(de,E.right+ne+(b.x-re),z),de++,a.m(de,we.x,z)):(ue&&(a.m(de,E.right+ne/2,pe.y),de++),a.m(de,E.right+ne/2,z),de++,a.m(de,E.right+ne+b.x-(ue?re/2:re),z),de++,ue&&a.m(de,a.i(de-1).x,we.y))):z===90?(x.alignment===oh?(z=E.right+b.x,b.x===0&&pe.x>be.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<be.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(de,z,pe.y),de++,a.m(de,z,E.bottom+ne),de++,a.m(de,z,E.bottom+ne+(b.y-re)/3),de++,a.m(de,z,E.bottom+ne+2*(b.y-re)/3),de++,a.m(de,z,E.bottom+ne+(b.y-re)),de++,a.m(de,z,we.y)):(ue&&(a.m(de,pe.x,E.bottom+ne/2),de++),a.m(de,z,E.bottom+ne/2),de++,a.m(de,z,E.bottom+ne+b.y-(ue?re/2:re)),de++,ue&&a.m(de,we.x,a.i(de-1).y))):z===180?(x.alignment===oh?(z=E.bottom+b.y,b.y===0&&pe.y>be.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<be.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(de,pe.x,z),de++,a.m(de,E.left-ne,z),de++,a.m(de,E.left-ne+(b.x+re)/3,z),de++,a.m(de,E.left-ne+2*(b.x+re)/3,z),de++,a.m(de,E.left-ne+(b.x+re),z),de++,a.m(de,we.x,z)):(ue&&(a.m(de,E.left-ne/2,pe.y),de++),a.m(de,E.left-ne/2,z),de++,a.m(de,E.left-ne+b.x+(ue?re/2:re),z),de++,ue&&a.m(de,a.i(de-1).x,we.y))):z===270?(x.alignment===oh?(z=E.right+b.x,b.x===0&&pe.x>be.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<be.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(de,z,pe.y),de++,a.m(de,z,E.top-ne),de++,a.m(de,z,E.top-ne+(b.y+re)/3),de++,a.m(de,z,E.top-ne+2*(b.y+re)/3),de++,a.m(de,z,E.top-ne+(b.y+re)),de++,a.m(de,z,we.y)):(ue&&(a.m(de,pe.x,E.top-ne/2),de++),a.m(de,z,E.top-ne/2),de++,a.m(de,z,E.top-ne+b.y+(ue?re/2:re)),de++,ue&&a.m(de,we.x,a.i(de-1).y))):Ft("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()))}}},Qe.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",jo.prototype.initializeStandardTools=function(){this.gb("Action",new uo,this.mouseDownTools),this.gb("Relinking",new Yi,this.mouseDownTools),this.gb("LinkReshaping",new rr,this.mouseDownTools),this.gb("Rotating",new Wo,this.mouseDownTools),this.gb("Resizing",new oo,this.mouseDownTools),this.gb("Linking",new Qn,this.mouseMoveTools),this.gb("Dragging",new as,this.mouseMoveTools),this.gb("DragSelecting",new co,this.mouseMoveTools),this.gb("Panning",new Lr,this.mouseMoveTools),this.gb("ContextMenu",new Sa,this.mouseUpTools),this.gb("TextEditing",new aa,this.mouseUpTools),this.gb("ClickCreating",new ko,this.mouseUpTools),this.gb("ClickSelecting",new ka,this.mouseUpTools)},Ad("Horizontal",new jm),Ad("Spot",new Zm),Ad("Table",new Wm),Ad("Viewbox",new Vm),Ad("TableRow",new Gm),Ad("TableColumn",new $m),Ad("Graduated",new $p),Ad("Grid",new Gp),Uf.add("GraphLinksModel",Ll),Uf.add("TreeModel",Dc);var dv=dt.go,Yy={get licenseKey(){return hn.licenseKey},set licenseKey(a){hn.licenseKey=a},get version(){return hn.version},Group:ho,EnumValue:Mn,List:Yn,Set:Xn,Map:Ki,Point:ot,Size:vi,Rect:Dn,Margin:dr,Spot:Ji,Geometry:rn,PathFigure:So,PathSegment:hr,InputEvent:Ir,DiagramEvent:Tr,ChangedEvent:fr,Model:ar,GraphLinksModel:ia,TreeModel:Bu,Binding:tl,Transaction:wo,UndoManager:Oa,CommandHandler:gt,Tool:Mr,DraggingTool:as,DraggingInfo:dd,DraggingOptions:ae,LinkingBaseTool:on,LinkingTool:Qn,RelinkingTool:Yi,LinkReshapingTool:rr,ResizingTool:oo,RotatingTool:Wo,ClickSelectingTool:ka,ActionTool:uo,ClickCreatingTool:ko,HTMLInfo:Fo,ContextMenuTool:Sa,DragSelectingTool:co,PanningTool:Lr,TextEditingTool:aa,ToolManager:jo,Animation:Ns,AnimationManager:Fs,AnimationTrigger:ku,Layer:ms,Diagram:hn,Palette:ge,Overview:xe,Brush:ha,GraphObject:Yt,Panel:ci,RowColumnDefinition:ol,Shape:Co,TextBlock:es,Picture:zu,Part:Sr,Adornment:pa,Node:Ii,Link:gi,Placeholder:Cu,Layout:xs,LayoutNetwork:ts,LayoutVertex:ul,LayoutEdge:hc,GridLayout:Rl,PanelLayout:ll,CircularLayout:Os,CircularNetwork:Fp,CircularVertex:xm,CircularEdge:$0,ForceDirectedLayout:ql,ForceDirectedNetwork:jg,ForceDirectedVertex:Sm,ForceDirectedEdge:Pm,LayeredDigraphLayout:za,LayeredDigraphNetwork:Mp,LayeredDigraphVertex:Oc,LayeredDigraphEdge:Em,TreeLayout:Ro,TreeNetwork:Wg,TreeVertex:Wc,TreeEdge:Ap};typeof dv=="object"&&dv.version&&Ci("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+Yy.version),hn.prototype.go=Yy,dt.go=Yy,typeof _n.exports=="object"&&(_n.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,st=Te.EnumValue,We=Te.List,ct=Te.Set,Me=Te.Map,bt=Te.Point,Pt=Te.Size,Ge=Te.Rect,ut=Te.Margin,mt=Te.Spot,yt=Te.Geometry,De=Te.PathFigure,te=Te.PathSegment,ee=Te.InputEvent,ce=Te.DiagramEvent,se=Te.ChangedEvent,he=Te.Model,ve=Te.GraphLinksModel,Ee=Te.TreeModel,Le=Te.Binding,Ne=Te.Transaction,je=Te.UndoManager,ze=Te.CommandHandler,Ye=Te.Tool,Xe=Te.DraggingTool,lt=Te.DraggingInfo,Ze=Te.LinkingBaseTool,Lt=Te.LinkingTool,rt=Te.RelinkingTool,Ot=Te.LinkReshapingTool,wt=Te.ResizingTool,Dt=Te.RotatingTool,Wt=Te.ClickSelectingTool,Mt=Te.ActionTool,et=Te.ClickCreatingTool,Ue=Te.HTMLInfo,Rt=Te.ContextMenuTool,Pn=Te.DragSelectingTool,xn=Te.PanningTool,_t=Te.TextEditingTool,qt=Te.ToolManager,cn=Te.Animation,Gn=Te.AnimationManager,gn=Te.AnimationTrigger,Zn=Te.Layer,Ct=Te.Diagram,Wn=Te.Palette,di=Te.Overview,Kt=Te.Brush,ln=Te.GraphObject,$t=Te.Panel,Tt=Te.RowColumnDefinition,ft=Te.Shape,$e=Te.TextBlock,Gt=Te.TextBlockMetrics,Ht=Te.Picture,ht=Te.Part,at=Te.Adornment,Re=Te.Node,Pe=Te.Link,ye=Te.Placeholder,Oe=Te.Layout,Ke=Te.LayoutNetwork,Fe=Te.LayoutVertex,Et=Te.LayoutEdge,sn=Te.GridLayout,pn=Te.PanelLayout,en=Te.CircularLayout,wn=Te.CircularNetwork,hi=Te.CircularVertex,Rn=Te.CircularEdge,Sn=Te.ForceDirectedLayout,Pi=Te.ForceDirectedNetwork,zi=Te.ForceDirectedVertex,Zi=Te.ForceDirectedEdge,ir=Te.LayeredDigraphLayout,Nr=Te.LayeredDigraphNetwork,pi=Te.LayeredDigraphVertex,li=Te.LayeredDigraphEdge,xi=Te.TreeLayout,Gi=Te.TreeNetwork,Oi=Te.TreeVertex,to=Te.TreeEdge,eo=Te.version},24334:function(_n,yn,me){var le,Te;(function(He,st){_n.exports=st(He)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof me.g!="undefined"?me.g:this,function(He){"use strict";He=He||{};var st=He.Base64,We="2.6.4",ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Me=function(rt){for(var Ot={},wt=0,Dt=rt.length;wt<Dt;wt++)Ot[rt.charAt(wt)]=wt;return Ot}(ct),bt=String.fromCharCode,Pt=function(rt){if(rt.length<2){var Ot=rt.charCodeAt(0);return Ot<128?rt:Ot<2048?bt(192|Ot>>>6)+bt(128|Ot&63):bt(224|Ot>>>12&15)+bt(128|Ot>>>6&63)+bt(128|Ot&63)}else{var Ot=65536+(rt.charCodeAt(0)-55296)*1024+(rt.charCodeAt(1)-56320);return bt(240|Ot>>>18&7)+bt(128|Ot>>>12&63)+bt(128|Ot>>>6&63)+bt(128|Ot&63)}},Ge=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ut=function(rt){return rt.replace(Ge,Pt)},mt=function(rt){var Ot=[0,2,1][rt.length%3],wt=rt.charCodeAt(0)<<16|(rt.length>1?rt.charCodeAt(1):0)<<8|(rt.length>2?rt.charCodeAt(2):0),Dt=[ct.charAt(wt>>>18),ct.charAt(wt>>>12&63),Ot>=2?"=":ct.charAt(wt>>>6&63),Ot>=1?"=":ct.charAt(wt&63)];return Dt.join("")},yt=He.btoa&&typeof He.btoa=="function"?function(rt){return He.btoa(rt)}:function(rt){if(rt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return rt.replace(/[\s\S]{1,3}/g,mt)},De=function(rt){return yt(ut(String(rt)))},te=function(rt){return rt.replace(/[+\/]/g,function(Ot){return Ot=="+"?"-":"_"}).replace(/=/g,"")},ee=function(rt,Ot){return Ot?te(De(rt)):De(rt)},ce=function(rt){return ee(rt,!0)},se;He.Uint8Array&&(se=function(rt,Ot){for(var wt="",Dt=0,Wt=rt.length;Dt<Wt;Dt+=3){var Mt=rt[Dt],et=rt[Dt+1],Ue=rt[Dt+2],Rt=Mt<<16|et<<8|Ue;wt+=ct.charAt(Rt>>>18)+ct.charAt(Rt>>>12&63)+(typeof et!="undefined"?ct.charAt(Rt>>>6&63):"=")+(typeof Ue!="undefined"?ct.charAt(Rt&63):"=")}return Ot?te(wt):wt});var he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ve=function(rt){switch(rt.length){case 4:var Ot=(7&rt.charCodeAt(0))<<18|(63&rt.charCodeAt(1))<<12|(63&rt.charCodeAt(2))<<6|63&rt.charCodeAt(3),wt=Ot-65536;return bt((wt>>>10)+55296)+bt((wt&1023)+56320);case 3:return bt((15&rt.charCodeAt(0))<<12|(63&rt.charCodeAt(1))<<6|63&rt.charCodeAt(2));default:return bt((31&rt.charCodeAt(0))<<6|63&rt.charCodeAt(1))}},Ee=function(rt){return rt.replace(he,ve)},Le=function(rt){var Ot=rt.length,wt=Ot%4,Dt=(Ot>0?Me[rt.charAt(0)]<<18:0)|(Ot>1?Me[rt.charAt(1)]<<12:0)|(Ot>2?Me[rt.charAt(2)]<<6:0)|(Ot>3?Me[rt.charAt(3)]:0),Wt=[bt(Dt>>>16),bt(Dt>>>8&255),bt(Dt&255)];return Wt.length-=[0,0,2,1][wt],Wt.join("")},Ne=He.atob&&typeof He.atob=="function"?function(rt){return He.atob(rt)}:function(rt){return rt.replace(/\S{1,4}/g,Le)},je=function(rt){return Ne(String(rt).replace(/[^A-Za-z0-9\+\/]/g,""))},ze=function(rt){return Ee(Ne(rt))},Ye=function(rt){return String(rt).replace(/[-_]/g,function(Ot){return Ot=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Xe=function(rt){return ze(Ye(rt))},lt;He.Uint8Array&&(lt=function(rt){return Uint8Array.from(je(Ye(rt)),function(Ot){return Ot.charCodeAt(0)})});var Ze=function(){var rt=He.Base64;return He.Base64=st,rt};if(He.Base64={VERSION:We,atob:je,btoa:yt,fromBase64:Xe,toBase64:ee,utob:ut,encode:ee,encodeURI:ce,btou:Ee,decode:Xe,noConflict:Ze,fromUint8Array:se,toUint8Array:lt},typeof Object.defineProperty=="function"){var Lt=function(rt){return{value:rt,enumerable:!1,writable:!0,configurable:!0}};He.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Lt(function(){return Xe(this)})),Object.defineProperty(String.prototype,"toBase64",Lt(function(rt){return ee(this,rt)})),Object.defineProperty(String.prototype,"toBase64URI",Lt(function(){return ee(this,!0)}))}}return He.Meteor&&(Base64=He.Base64),_n.exports?_n.exports.Base64=He.Base64:(le=[],Te=function(){return He.Base64}.apply(yn,le),Te!==void 0&&(_n.exports=Te)),{Base64:He.Base64}})},17115:function(_n,yn,me){"use strict";me.d(yn,{ZP:function(){return Me}});var le=me(52487),Te=me(59301),He=me(47273),st=0,We=(0,He.Z)();function ct(){var bt;return We?(bt=st,st+=1):bt="TEST_OR_SSR",bt}function Me(bt){var Pt=Te.useState(),Ge=(0,le.Z)(Pt,2),ut=Ge[0],mt=Ge[1];return Te.useEffect(function(){mt("rc_select_".concat(ct()))},[]),bt||ut}},77861:function(_n,yn,me){"use strict";me.d(yn,{Ac:function(){return Oe},Xo:function(){return Zi},Wx:function(){return Nr},ZP:function(){return dn},lk:function(){return Ee}});var le=me(72308),Te=me(80702),He=me(49618),st=me(77321),We=me(52487),ct=me(74416),Me=me(62853),bt=me(18929),Pt=me(48736),Ge=me(59301),ut=me(92310),mt=me.n(ut),yt=me(34280),De=me(49658),te=me(10228),ee=me(8654),ce=function(dt){var nn=dt.className,vn=dt.customizeIcon,zn=dt.customizeIconProps,qn=dt.onMouseDown,Ft=dt.onClick,Bn=dt.children,Kn;return typeof vn=="function"?Kn=vn(zn):Kn=vn,Ge.createElement("span",{className:nn,onMouseDown:function(En){En.preventDefault(),qn&&qn(En)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Ft,"aria-hidden":!0},Kn!==void 0?Kn:Ge.createElement("span",{className:mt()(nn.split(/\s+/).map(function(Ci){return"".concat(Ci,"-icon")}))},Bn))},se=ce;function he(Nt,dt,nn,vn,zn){var qn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Ft=arguments.length>6?arguments[6]:void 0,Bn=arguments.length>7?arguments[7]:void 0,Kn=Ge.useMemo(function(){if((0,Me.Z)(vn)==="object")return vn.clearIcon;if(zn)return zn},[vn,zn]),Ci=Ge.useMemo(function(){return!!(!qn&&vn&&(nn.length||Ft)&&!(Bn==="combobox"&&Ft===""))},[vn,qn,nn.length,Ft,Bn]);return{allowClear:Ci,clearIcon:Ge.createElement(se,{className:"".concat(Nt,"-clear"),onMouseDown:dt,customizeIcon:Kn},"\xD7")}}var ve=Ge.createContext(null);function Ee(){return Ge.useContext(ve)}function Le(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,dt=Ge.useState(!1),nn=(0,We.Z)(dt,2),vn=nn[0],zn=nn[1],qn=Ge.useRef(null),Ft=function(){window.clearTimeout(qn.current)};Ge.useEffect(function(){return Ft},[]);var Bn=function(Ci,En){Ft(),qn.current=window.setTimeout(function(){zn(Ci),En&&En()},Nt)};return[vn,Bn,Ft]}function Ne(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,dt=Ge.useRef(null),nn=Ge.useRef(null);Ge.useEffect(function(){return function(){window.clearTimeout(nn.current)}},[]);function vn(zn){(zn||dt.current===null)&&(dt.current=zn),window.clearTimeout(nn.current),nn.current=window.setTimeout(function(){dt.current=null},Nt)}return[function(){return dt.current},vn]}function je(Nt,dt,nn,vn){var zn=Ge.useRef(null);zn.current={open:dt,triggerOpen:nn,customizedTrigger:vn},Ge.useEffect(function(){function qn(Ft){var Bn;if(!((Bn=zn.current)!==null&&Bn!==void 0&&Bn.customizedTrigger)){var Kn=Ft.target;Kn.shadowRoot&&Ft.composed&&(Kn=Ft.composedPath()[0]||Kn),zn.current.open&&Nt().filter(function(Ci){return Ci}).every(function(Ci){return!Ci.contains(Kn)&&Ci!==Kn})&&zn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",qn),function(){return window.removeEventListener("mousedown",qn)}},[])}var ze=me(26112),Ye=me(11780),Xe=function(dt,nn){var vn,zn,qn=dt.prefixCls,Ft=dt.id,Bn=dt.inputElement,Kn=dt.disabled,Ci=dt.tabIndex,En=dt.autoFocus,un=dt.autoComplete,bn=dt.editable,Ei=dt.activeDescendantId,Ni=dt.value,mi=dt.maxLength,Di=dt.onKeyDown,Ai=dt.onMouseDown,gr=dt.onChange,Or=dt.onPaste,Hr=dt.onCompositionStart,jn=dt.onCompositionEnd,Po=dt.open,Wr=dt.attrs,ro=Bn||Ge.createElement("input",null),Mn=ro,ii=Mn.ref,Hi=Mn.props,xr=Hi.onKeyDown,qi=Hi.onChange,pr=Hi.onMouseDown,Vr=Hi.onCompositionStart,jr=Hi.onCompositionEnd,kr=Hi.style;return(0,Pt.Kp)(!("maxLength"in ro.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),ro=Ge.cloneElement(ro,(0,st.Z)((0,st.Z)((0,st.Z)({type:"search"},Hi),{},{id:Ft,ref:(0,ee.sQ)(nn,ii),disabled:Kn,tabIndex:Ci,autoComplete:un||"off",autoFocus:En,className:mt()("".concat(qn,"-selection-search-input"),(vn=ro)===null||vn===void 0||(zn=vn.props)===null||zn===void 0?void 0:zn.className),role:"combobox","aria-label":"Search","aria-expanded":Po||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ft,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ft,"_list"),"aria-activedescendant":Po?Ei:void 0},Wr),{},{value:bn?Ni:"",maxLength:mi,readOnly:!bn,unselectable:bn?null:"on",style:(0,st.Z)((0,st.Z)({},kr),{},{opacity:bn?null:0}),onKeyDown:function(Yn){Di(Yn),xr&&xr(Yn)},onMouseDown:function(Yn){Ai(Yn),pr&&pr(Yn)},onChange:function(Yn){gr(Yn),qi&&qi(Yn)},onCompositionStart:function(Yn){Hr(Yn),Vr&&Vr(Yn)},onCompositionEnd:function(Yn){jn(Yn),jr&&jr(Yn)},onPaste:Or})),ro},lt=Ge.forwardRef(Xe);lt.displayName="Input";var Ze=lt;function Lt(Nt){return Array.isArray(Nt)?Nt:Nt!==void 0?[Nt]:[]}var rt=typeof window!="undefined"&&window.document&&window.document.documentElement,Ot=rt;function wt(Nt){return Nt!=null}function Dt(Nt){return!Nt&&Nt!==0}function Wt(Nt){return["string","number"].includes((0,Me.Z)(Nt))}function Mt(Nt){var dt=void 0;return Nt&&(Wt(Nt.title)?dt=Nt.title.toString():Wt(Nt.label)&&(dt=Nt.label.toString())),dt}function et(Nt,dt){Ot?Ge.useLayoutEffect(Nt,dt):Ge.useEffect(Nt,dt)}function Ue(Nt){var dt;return(dt=Nt.key)!==null&&dt!==void 0?dt:Nt.value}var Rt=function(dt){dt.preventDefault(),dt.stopPropagation()},Pn=function(dt){var nn=dt.id,vn=dt.prefixCls,zn=dt.values,qn=dt.open,Ft=dt.searchValue,Bn=dt.autoClearSearchValue,Kn=dt.inputRef,Ci=dt.placeholder,En=dt.disabled,un=dt.mode,bn=dt.showSearch,Ei=dt.autoFocus,Ni=dt.autoComplete,mi=dt.activeDescendantId,Di=dt.tabIndex,Ai=dt.removeIcon,gr=dt.maxTagCount,Or=dt.maxTagTextLength,Hr=dt.maxTagPlaceholder,jn=Hr===void 0?function(sa){return"+ ".concat(sa.length," ...")}:Hr,Po=dt.tagRender,Wr=dt.onToggleOpen,ro=dt.onRemove,Mn=dt.onInputChange,ii=dt.onInputPaste,Hi=dt.onInputKeyDown,xr=dt.onInputMouseDown,qi=dt.onInputCompositionStart,pr=dt.onInputCompositionEnd,Vr=Ge.useRef(null),jr=(0,Ge.useState)(0),kr=(0,We.Z)(jr,2),Kr=kr[0],Yn=kr[1],Ho=(0,Ge.useState)(!1),Xn=(0,We.Z)(Ho,2),Ao=Xn[0],Qo=Xn[1],nr="".concat(vn,"-selection"),qo=qn||un==="multiple"&&Bn===!1||un==="tags"?Ft:"",Go=un==="tags"||un==="multiple"&&Bn===!1||bn&&(qn||Ao);et(function(){Yn(Vr.current.scrollWidth)},[qo]);function Br(sa,va,Ma,hs,Ga){return Ge.createElement("span",{className:mt()("".concat(nr,"-item"),(0,He.Z)({},"".concat(nr,"-item-disabled"),Ma)),title:Mt(sa)},Ge.createElement("span",{className:"".concat(nr,"-item-content")},va),hs&&Ge.createElement(se,{className:"".concat(nr,"-item-remove"),onMouseDown:Rt,onClick:Ga,customizeIcon:Ai},"\xD7"))}function Er(sa,va,Ma,hs,Ga){var Lo=function(la){Rt(la),Wr(!qn)};return Ge.createElement("span",{onMouseDown:Lo},Po({label:va,value:sa,disabled:Ma,closable:hs,onClose:Ga}))}function mo(sa){var va=sa.disabled,Ma=sa.label,hs=sa.value,Ga=!En&&!va,Lo=Ma;if(typeof Or=="number"&&(typeof Ma=="string"||typeof Ma=="number")){var po=String(Lo);po.length>Or&&(Lo="".concat(po.slice(0,Or),"..."))}var la=function(Na){Na&&Na.stopPropagation(),ro(sa)};return typeof Po=="function"?Er(hs,Lo,va,Ga,la):Br(sa,Lo,va,Ga,la)}function Yo(sa){var va=typeof jn=="function"?jn(sa):jn;return Br({title:va},va,!1)}var Ki=Ge.createElement("div",{className:"".concat(nr,"-search"),style:{width:Kr},onFocus:function(){Qo(!0)},onBlur:function(){Qo(!1)}},Ge.createElement(Ze,{ref:Kn,open:qn,prefixCls:vn,id:nn,inputElement:null,disabled:En,autoFocus:Ei,autoComplete:Ni,editable:Go,activeDescendantId:mi,value:qo,onKeyDown:Hi,onMouseDown:xr,onChange:Mn,onPaste:ii,onCompositionStart:qi,onCompositionEnd:pr,tabIndex:Di,attrs:(0,ze.Z)(dt,!0)}),Ge.createElement("span",{ref:Vr,className:"".concat(nr,"-search-mirror"),"aria-hidden":!0},qo,"\xA0")),ot=Ge.createElement(Ye.Z,{prefixCls:"".concat(nr,"-overflow"),data:zn,renderItem:mo,renderRest:Yo,suffix:Ki,itemKey:Ue,maxCount:gr});return Ge.createElement(Ge.Fragment,null,ot,!zn.length&&!qo&&Ge.createElement("span",{className:"".concat(nr,"-placeholder")},Ci))},xn=Pn,_t=function(dt){var nn=dt.inputElement,vn=dt.prefixCls,zn=dt.id,qn=dt.inputRef,Ft=dt.disabled,Bn=dt.autoFocus,Kn=dt.autoComplete,Ci=dt.activeDescendantId,En=dt.mode,un=dt.open,bn=dt.values,Ei=dt.placeholder,Ni=dt.tabIndex,mi=dt.showSearch,Di=dt.searchValue,Ai=dt.activeValue,gr=dt.maxLength,Or=dt.onInputKeyDown,Hr=dt.onInputMouseDown,jn=dt.onInputChange,Po=dt.onInputPaste,Wr=dt.onInputCompositionStart,ro=dt.onInputCompositionEnd,Mn=dt.title,ii=Ge.useState(!1),Hi=(0,We.Z)(ii,2),xr=Hi[0],qi=Hi[1],pr=En==="combobox",Vr=pr||mi,jr=bn[0],kr=Di||"";pr&&Ai&&!xr&&(kr=Ai),Ge.useEffect(function(){pr&&qi(!1)},[pr,Ai]);var Kr=En!=="combobox"&&!un&&!mi?!1:!!kr,Yn=Mn===void 0?Mt(jr):Mn,Ho=function(){if(jr)return null;var Ao=Kr?{visibility:"hidden"}:void 0;return Ge.createElement("span",{className:"".concat(vn,"-selection-placeholder"),style:Ao},Ei)};return Ge.createElement(Ge.Fragment,null,Ge.createElement("span",{className:"".concat(vn,"-selection-search")},Ge.createElement(Ze,{ref:qn,prefixCls:vn,id:zn,open:un,inputElement:nn,disabled:Ft,autoFocus:Bn,autoComplete:Kn,editable:Vr,activeDescendantId:Ci,value:kr,onKeyDown:Or,onMouseDown:Hr,onChange:function(Ao){qi(!0),jn(Ao)},onPaste:Po,onCompositionStart:Wr,onCompositionEnd:ro,tabIndex:Ni,attrs:(0,ze.Z)(dt,!0),maxLength:pr?gr:void 0})),!pr&&jr?Ge.createElement("span",{className:"".concat(vn,"-selection-item"),title:Yn,style:Kr?{visibility:"hidden"}:void 0},jr.label):null,Ho())},qt=_t;function cn(Nt){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(Nt)}var Gn=function(dt,nn){var vn=(0,Ge.useRef)(null),zn=(0,Ge.useRef)(!1),qn=dt.prefixCls,Ft=dt.open,Bn=dt.mode,Kn=dt.showSearch,Ci=dt.tokenWithEnter,En=dt.autoClearSearchValue,un=dt.onSearch,bn=dt.onSearchSubmit,Ei=dt.onToggleOpen,Ni=dt.onInputKeyDown,mi=dt.domRef;Ge.useImperativeHandle(nn,function(){return{focus:function(){vn.current.focus()},blur:function(){vn.current.blur()}}});var Di=Ne(0),Ai=(0,We.Z)(Di,2),gr=Ai[0],Or=Ai[1],Hr=function(kr){var Kr=kr.which;(Kr===te.Z.UP||Kr===te.Z.DOWN)&&kr.preventDefault(),Ni&&Ni(kr),Kr===te.Z.ENTER&&Bn==="tags"&&!zn.current&&!Ft&&(bn==null||bn(kr.target.value)),cn(Kr)&&Ei(!0)},jn=function(){Or(!0)},Po=(0,Ge.useRef)(null),Wr=function(kr){un(kr,!0,zn.current)!==!1&&Ei(!0)},ro=function(){zn.current=!0},Mn=function(kr){zn.current=!1,Bn!=="combobox"&&Wr(kr.target.value)},ii=function(kr){var Kr=kr.target.value;if(Ci&&Po.current&&/[\r\n]/.test(Po.current)){var Yn=Po.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Kr=Kr.replace(Yn,Po.current)}Po.current=null,Wr(Kr)},Hi=function(kr){var Kr=kr.clipboardData,Yn=Kr.getData("text");Po.current=Yn},xr=function(kr){var Kr=kr.target;if(Kr!==vn.current){var Yn=document.body.style.msTouchAction!==void 0;Yn?setTimeout(function(){vn.current.focus()}):vn.current.focus()}},qi=function(kr){var Kr=gr();kr.target!==vn.current&&!Kr&&Bn!=="combobox"&&kr.preventDefault(),(Bn!=="combobox"&&(!Kn||!Kr)||!Ft)&&(Ft&&En!==!1&&un("",!0,!1),Ei())},pr={inputRef:vn,onInputKeyDown:Hr,onInputMouseDown:jn,onInputChange:ii,onInputPaste:Hi,onInputCompositionStart:ro,onInputCompositionEnd:Mn},Vr=Bn==="multiple"||Bn==="tags"?Ge.createElement(xn,(0,le.Z)({},dt,pr)):Ge.createElement(qt,(0,le.Z)({},dt,pr));return Ge.createElement("div",{ref:mi,className:"".concat(qn,"-selector"),onClick:xr,onMouseDown:qi},Vr)},gn=Ge.forwardRef(Gn);gn.displayName="Selector";var Zn=gn,Ct=me(35593),Wn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],di=function(dt){var nn=dt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:nn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:nn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:nn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:nn,adjustY:1},htmlRegion:"scroll"}}},Kt=function(dt,nn){var vn=dt.prefixCls,zn=dt.disabled,qn=dt.visible,Ft=dt.children,Bn=dt.popupElement,Kn=dt.animation,Ci=dt.transitionName,En=dt.dropdownStyle,un=dt.dropdownClassName,bn=dt.direction,Ei=bn===void 0?"ltr":bn,Ni=dt.placement,mi=dt.builtinPlacements,Di=dt.dropdownMatchSelectWidth,Ai=dt.dropdownRender,gr=dt.dropdownAlign,Or=dt.getPopupContainer,Hr=dt.empty,jn=dt.getTriggerDOMNode,Po=dt.onPopupVisibleChange,Wr=dt.onPopupMouseEnter,ro=(0,ct.Z)(dt,Wn),Mn="".concat(vn,"-dropdown"),ii=Bn;Ai&&(ii=Ai(Bn));var Hi=Ge.useMemo(function(){return mi||di(Di)},[mi,Di]),xr=Kn?"".concat(Mn,"-").concat(Kn):Ci,qi=typeof Di=="number",pr=Ge.useMemo(function(){return qi?null:Di===!1?"minWidth":"width"},[Di,qi]),Vr=En;qi&&(Vr=(0,st.Z)((0,st.Z)({},Vr),{},{width:Di}));var jr=Ge.useRef(null);return Ge.useImperativeHandle(nn,function(){return{getPopupElement:function(){return jr.current}}}),Ge.createElement(Ct.Z,(0,le.Z)({},ro,{showAction:Po?["click"]:[],hideAction:Po?["click"]:[],popupPlacement:Ni||(Ei==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Hi,prefixCls:Mn,popupTransitionName:xr,popup:Ge.createElement("div",{ref:jr,onMouseEnter:Wr},ii),stretch:pr,popupAlign:gr,popupVisible:qn,getPopupContainer:Or,popupClassName:mt()(un,(0,He.Z)({},"".concat(Mn,"-empty"),Hr)),popupStyle:Vr,getTriggerDOMNode:jn,onPopupVisibleChange:Po}),Ft)},ln=Ge.forwardRef(Kt);ln.displayName="SelectTrigger";var $t=ln,Tt=me(68413);function ft(Nt,dt){var nn=Nt.key,vn;return"value"in Nt&&(vn=Nt.value),nn!=null?nn:vn!==void 0?vn:"rc-index-key-".concat(dt)}function $e(Nt,dt){var nn=Nt||{},vn=nn.label,zn=nn.value,qn=nn.options,Ft=nn.groupLabel,Bn=vn||(dt?"children":"label");return{label:Bn,value:zn||"value",options:qn||"options",groupLabel:Ft||Bn}}function Gt(Nt){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nn=dt.fieldNames,vn=dt.childrenAsData,zn=[],qn=$e(nn,!1),Ft=qn.label,Bn=qn.value,Kn=qn.options,Ci=qn.groupLabel;function En(un,bn){un.forEach(function(Ei){if(bn||!(Kn in Ei)){var Ni=Ei[Bn];zn.push({key:ft(Ei,zn.length),groupOption:bn,data:Ei,label:Ei[Ft],value:Ni})}else{var mi=Ei[Ci];mi===void 0&&vn&&(mi=Ei.label),zn.push({key:ft(Ei,zn.length),group:!0,data:Ei,label:mi}),En(Ei[Kn],!0)}})}return En(Nt,!1),zn}function Ht(Nt){var dt=(0,st.Z)({},Nt);return"props"in dt||Object.defineProperty(dt,"props",{get:function(){return(0,Pt.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),dt}}),dt}function ht(Nt,dt){if(!dt||!dt.length)return null;var nn=!1;function vn(qn,Ft){var Bn=(0,Tt.Z)(Ft),Kn=Bn[0],Ci=Bn.slice(1);if(!Kn)return[qn];var En=qn.split(Kn);return nn=nn||En.length>1,En.reduce(function(un,bn){return[].concat((0,Te.Z)(un),(0,Te.Z)(vn(bn,Ci)))},[]).filter(function(un){return un})}var zn=vn(Nt,dt);return nn?zn:null}var at=["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"],Re=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Pe(Nt){return Nt==="tags"||Nt==="multiple"}var ye=Ge.forwardRef(function(Nt,dt){var nn,vn,zn=Nt.id,qn=Nt.prefixCls,Ft=Nt.className,Bn=Nt.showSearch,Kn=Nt.tagRender,Ci=Nt.direction,En=Nt.omitDomProps,un=Nt.displayValues,bn=Nt.onDisplayValuesChange,Ei=Nt.emptyOptions,Ni=Nt.notFoundContent,mi=Ni===void 0?"Not Found":Ni,Di=Nt.onClear,Ai=Nt.mode,gr=Nt.disabled,Or=Nt.loading,Hr=Nt.getInputElement,jn=Nt.getRawInputElement,Po=Nt.open,Wr=Nt.defaultOpen,ro=Nt.onDropdownVisibleChange,Mn=Nt.activeValue,ii=Nt.onActiveValueChange,Hi=Nt.activeDescendantId,xr=Nt.searchValue,qi=Nt.autoClearSearchValue,pr=Nt.onSearch,Vr=Nt.onSearchSplit,jr=Nt.tokenSeparators,kr=Nt.allowClear,Kr=Nt.suffixIcon,Yn=Nt.clearIcon,Ho=Nt.OptionList,Xn=Nt.animation,Ao=Nt.transitionName,Qo=Nt.dropdownStyle,nr=Nt.dropdownClassName,qo=Nt.dropdownMatchSelectWidth,Go=Nt.dropdownRender,Br=Nt.dropdownAlign,Er=Nt.placement,mo=Nt.builtinPlacements,Yo=Nt.getPopupContainer,Ki=Nt.showAction,ot=Ki===void 0?[]:Ki,sa=Nt.onFocus,va=Nt.onBlur,Ma=Nt.onKeyUp,hs=Nt.onKeyDown,Ga=Nt.onMouseDown,Lo=(0,ct.Z)(Nt,at),po=Pe(Ai),la=(Bn!==void 0?Bn:po)||Ai==="combobox",Eo=(0,st.Z)({},Lo);Re.forEach(function(Bi){delete Eo[Bi]}),En==null||En.forEach(function(Bi){delete Eo[Bi]});var Na=Ge.useState(!1),os=(0,We.Z)(Na,2),xo=os[0],Yr=os[1];Ge.useEffect(function(){Yr((0,De.Z)())},[]);var vi=Ge.useRef(null),no=Ge.useRef(null),io=Ge.useRef(null),Ja=Ge.useRef(null),Ca=Ge.useRef(null),fa=Le(),$a=(0,We.Z)(fa,3),Qa=$a[0],Es=$a[1],ys=$a[2];Ge.useImperativeHandle(dt,function(){var Bi,Jr;return{focus:(Bi=Ja.current)===null||Bi===void 0?void 0:Bi.focus,blur:(Jr=Ja.current)===null||Jr===void 0?void 0:Jr.blur,scrollTo:function(ma){var ya;return(ya=Ca.current)===null||ya===void 0?void 0:ya.scrollTo(ma)}}});var Zs=Ge.useMemo(function(){var Bi;if(Ai!=="combobox")return xr;var Jr=(Bi=un[0])===null||Bi===void 0?void 0:Bi.value;return typeof Jr=="string"||typeof Jr=="number"?String(Jr):""},[xr,Ai,un]),Dn=Ai==="combobox"&&typeof Hr=="function"&&Hr()||null,Ss=typeof jn=="function"&&jn(),ra=(0,ee.x1)(no,Ss==null||(nn=Ss.props)===null||nn===void 0?void 0:nn.ref),hl=Ge.useState(!1),Ol=(0,We.Z)(hl,2),ns=Ol[0],yu=Ol[1];(0,yt.Z)(function(){yu(!0)},[]);var eu=(0,bt.Z)(!1,{defaultValue:Wr,value:Po}),ps=(0,We.Z)(eu,2),Ba=ps[0],tu=ps[1],Do=ns?Ba:!1,Ea=!mi&&Ei;(gr||Ea&&Do&&Ai==="combobox")&&(Do=!1);var ca=Ea?!1:Do,dr=Ge.useCallback(function(Bi){var Jr=Bi!==void 0?Bi:!Do;gr||(tu(Jr),Do!==Jr&&(ro==null||ro(Jr)))},[gr,Do,tu,ro]),Rs=Ge.useMemo(function(){return(jr||[]).some(function(Bi){return[`
`,`\r
`].includes(Bi)})},[jr]),ls=function(Jr,Vo,ma){var ya=!0,bo=Jr;ii==null||ii(null);var oa=ma?null:ht(Jr,jr);return Ai!=="combobox"&&oa&&(bo="",Vr==null||Vr(oa),dr(!1),ya=!1),pr&&Zs!==bo&&pr(bo,{source:Vo?"typing":"effect"}),ya},sl=function(Jr){!Jr||!Jr.trim()||pr(Jr,{source:"submit"})};Ge.useEffect(function(){!Do&&!po&&Ai!=="combobox"&&ls("",!1,!1)},[Do]),Ge.useEffect(function(){Ba&&gr&&tu(!1),gr&&Es(!1)},[gr]);var jl=Ne(),ou=(0,We.Z)(jl,2),Ji=ou[0],Cs=ou[1],Us=function(Jr){var Vo=Ji(),ma=Jr.which;if(ma===te.Z.ENTER&&(Ai!=="combobox"&&Jr.preventDefault(),Do||dr(!0)),Cs(!!Zs),ma===te.Z.BACKSPACE&&!Vo&&po&&!Zs&&un.length){for(var ya=(0,Te.Z)(un),bo=null,oa=ya.length-1;oa>=0;oa-=1){var Io=ya[oa];if(!Io.disabled){ya.splice(oa,1),bo=Io;break}}bo&&bn(ya,{type:"remove",values:[bo]})}for(var Ar=arguments.length,Da=new Array(Ar>1?Ar-1:0),Ha=1;Ha<Ar;Ha++)Da[Ha-1]=arguments[Ha];if(Do&&Ca.current){var La;(La=Ca.current).onKeyDown.apply(La,[Jr].concat(Da))}hs==null||hs.apply(void 0,[Jr].concat(Da))},$l=function(Jr){for(var Vo=arguments.length,ma=new Array(Vo>1?Vo-1:0),ya=1;ya<Vo;ya++)ma[ya-1]=arguments[ya];if(Do&&Ca.current){var bo;(bo=Ca.current).onKeyUp.apply(bo,[Jr].concat(ma))}Ma==null||Ma.apply(void 0,[Jr].concat(ma))},kl=function(Jr){var Vo=un.filter(function(ma){return ma!==Jr});bn(Vo,{type:"remove",values:[Jr]})},Vl=Ge.useRef(!1),Oo=function(){Es(!0),gr||(sa&&!Vl.current&&sa.apply(void 0,arguments),ot.includes("focus")&&dr(!0)),Vl.current=!0},ic=function(){Es(!1,function(){Vl.current=!1,dr(!1)}),!gr&&(Zs&&(Ai==="tags"?pr(Zs,{source:"submit"}):Ai==="multiple"&&pr("",{source:"blur"})),va&&va.apply(void 0,arguments))},zl=[];Ge.useEffect(function(){return function(){zl.forEach(function(Bi){return clearTimeout(Bi)}),zl.splice(0,zl.length)}},[]);var Ln=function(Jr){var Vo,ma=Jr.target,ya=(Vo=io.current)===null||Vo===void 0?void 0:Vo.getPopupElement();if(ya&&ya.contains(ma)){var bo=setTimeout(function(){var Da=zl.indexOf(bo);if(Da!==-1&&zl.splice(Da,1),ys(),!xo&&!ya.contains(document.activeElement)){var Ha;(Ha=Ja.current)===null||Ha===void 0||Ha.focus()}});zl.push(bo)}for(var oa=arguments.length,Io=new Array(oa>1?oa-1:0),Ar=1;Ar<oa;Ar++)Io[Ar-1]=arguments[Ar];Ga==null||Ga.apply(void 0,[Jr].concat(Io))},On=Ge.useState({}),ai=(0,We.Z)(On,2),Qi=ai[1];function Vi(){Qi({})}var Ri;Ss&&(Ri=function(Jr){dr(Jr)}),je(function(){var Bi;return[vi.current,(Bi=io.current)===null||Bi===void 0?void 0:Bi.getPopupElement()]},ca,dr,!!Ss);var _i=Ge.useMemo(function(){return(0,st.Z)((0,st.Z)({},Nt),{},{notFoundContent:mi,open:Do,triggerOpen:ca,id:zn,showSearch:la,multiple:po,toggleOpen:dr})},[Nt,mi,ca,Do,zn,la,po,dr]),oi=!!Kr||Or,Li;oi&&(Li=Ge.createElement(se,{className:mt()("".concat(qn,"-arrow"),(0,He.Z)({},"".concat(qn,"-arrow-loading"),Or)),customizeIcon:Kr,customizeIconProps:{loading:Or,searchValue:Zs,open:Do,focused:Qa,showSearch:la}}));var ur=function(){var Jr;Di==null||Di(),(Jr=Ja.current)===null||Jr===void 0||Jr.focus(),bn([],{type:"clear",values:un}),ls("",!1,!1)},zr=he(qn,ur,un,kr,Yn,gr,Zs,Ai),ga=zr.allowClear,$o=zr.clearIcon,Ua=Ge.createElement(Ho,{ref:Ca}),Va=mt()(qn,Ft,(vn={},(0,He.Z)(vn,"".concat(qn,"-focused"),Qa),(0,He.Z)(vn,"".concat(qn,"-multiple"),po),(0,He.Z)(vn,"".concat(qn,"-single"),!po),(0,He.Z)(vn,"".concat(qn,"-allow-clear"),kr),(0,He.Z)(vn,"".concat(qn,"-show-arrow"),oi),(0,He.Z)(vn,"".concat(qn,"-disabled"),gr),(0,He.Z)(vn,"".concat(qn,"-loading"),Or),(0,He.Z)(vn,"".concat(qn,"-open"),Do),(0,He.Z)(vn,"".concat(qn,"-customize-input"),Dn),(0,He.Z)(vn,"".concat(qn,"-show-search"),la),vn)),No=Ge.createElement($t,{ref:io,disabled:gr,prefixCls:qn,visible:ca,popupElement:Ua,animation:Xn,transitionName:Ao,dropdownStyle:Qo,dropdownClassName:nr,direction:Ci,dropdownMatchSelectWidth:qo,dropdownRender:Go,dropdownAlign:Br,placement:Er,builtinPlacements:mo,getPopupContainer:Yo,empty:Ei,getTriggerDOMNode:function(){return no.current},onPopupVisibleChange:Ri,onPopupMouseEnter:Vi},Ss?Ge.cloneElement(Ss,{ref:ra}):Ge.createElement(Zn,(0,le.Z)({},Nt,{domRef:no,prefixCls:qn,inputElement:Dn,ref:Ja,id:zn,showSearch:la,autoClearSearchValue:qi,mode:Ai,activeDescendantId:Hi,tagRender:Kn,values:un,open:Do,onToggleOpen:dr,activeValue:Mn,searchValue:Zs,onSearch:ls,onSearchSubmit:sl,onRemove:kl,tokenWithEnter:Rs}))),Xr;return Ss?Xr=No:Xr=Ge.createElement("div",(0,le.Z)({className:Va},Eo,{ref:vi,onMouseDown:Ln,onKeyDown:Us,onKeyUp:$l,onFocus:Oo,onBlur:ic}),Qa&&!Do&&Ge.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(un.map(function(Bi){var Jr=Bi.label,Vo=Bi.value;return["number","string"].includes((0,Me.Z)(Jr))?Jr:Vo}).join(", "))),No,Li,ga&&$o),Ge.createElement(ve.Provider,{value:_i},Xr)}),Oe=ye,Ke=function(Nt,dt){var nn=Ge.useRef({values:new Map,options:new Map}),vn=Ge.useMemo(function(){var qn=nn.current,Ft=qn.values,Bn=qn.options,Kn=Nt.map(function(un){if(un.label===void 0){var bn;return(0,st.Z)((0,st.Z)({},un),{},{label:(bn=Ft.get(un.value))===null||bn===void 0?void 0:bn.label})}return un}),Ci=new Map,En=new Map;return Kn.forEach(function(un){Ci.set(un.value,un),En.set(un.value,dt.get(un.value)||Bn.get(un.value))}),nn.current.values=Ci,nn.current.options=En,Kn},[Nt,dt]),zn=Ge.useCallback(function(qn){return dt.get(qn)||nn.current.options.get(qn)},[dt]);return[vn,zn]};function Fe(Nt,dt){return Lt(Nt).join("").toUpperCase().includes(dt)}var Et=function(Nt,dt,nn,vn,zn){return Ge.useMemo(function(){if(!nn||vn===!1)return Nt;var qn=dt.options,Ft=dt.label,Bn=dt.value,Kn=[],Ci=typeof vn=="function",En=nn.toUpperCase(),un=Ci?vn:function(Ei,Ni){return zn?Fe(Ni[zn],En):Ni[qn]?Fe(Ni[Ft!=="children"?Ft:"label"],En):Fe(Ni[Bn],En)},bn=Ci?function(Ei){return Ht(Ei)}:function(Ei){return Ei};return Nt.forEach(function(Ei){if(Ei[qn]){var Ni=un(nn,bn(Ei));if(Ni)Kn.push(Ei);else{var mi=Ei[qn].filter(function(Di){return un(nn,bn(Di))});mi.length&&Kn.push((0,st.Z)((0,st.Z)({},Ei),{},(0,He.Z)({},qn,mi)))}return}un(nn,bn(Ei))&&Kn.push(Ei)}),Kn},[Nt,vn,zn,nn,dt])},sn=me(17115),pn=me(11592),en=["children","value"],wn=["children"];function hi(Nt){var dt=Nt,nn=dt.key,vn=dt.props,zn=vn.children,qn=vn.value,Ft=(0,ct.Z)(vn,en);return(0,st.Z)({key:nn,value:qn!==void 0?qn:nn,children:zn},Ft)}function Rn(Nt){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,pn.Z)(Nt).map(function(nn,vn){if(!Ge.isValidElement(nn)||!nn.type)return null;var zn=nn,qn=zn.type.isSelectOptGroup,Ft=zn.key,Bn=zn.props,Kn=Bn.children,Ci=(0,ct.Z)(Bn,wn);return dt||!qn?hi(nn):(0,st.Z)((0,st.Z)({key:"__RC_SELECT_GRP__".concat(Ft===null?vn:Ft,"__"),label:Ft},Ci),{},{options:Rn(Kn)})}).filter(function(nn){return nn})}function Sn(Nt,dt,nn,vn,zn){return Ge.useMemo(function(){var qn=Nt,Ft=!Nt;Ft&&(qn=Rn(dt));var Bn=new Map,Kn=new Map,Ci=function(bn,Ei,Ni){Ni&&typeof Ni=="string"&&bn.set(Ei[Ni],Ei)};function En(un){for(var bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ei=0;Ei<un.length;Ei+=1){var Ni=un[Ei];!Ni[nn.options]||bn?(Bn.set(Ni[nn.value],Ni),Ci(Kn,Ni,nn.label),Ci(Kn,Ni,vn),Ci(Kn,Ni,zn)):En(Ni[nn.options],!0)}}return En(qn),{options:qn,valueOptions:Bn,labelOptions:Kn}},[Nt,dt,nn,vn,zn])}function Pi(Nt){var dt=Ge.useRef();dt.current=Nt;var nn=Ge.useCallback(function(){return dt.current.apply(dt,arguments)},[]);return nn}var zi=function(){return null};zi.isSelectOptGroup=!0;var Zi=zi,ir=function(){return null};ir.isSelectOption=!0;var Nr=ir,pi=me(80547),li=me(2738),xi=me(45680),Gi=Ge.createContext(null),Oi=Gi;function to(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var eo=["disabled","title","children","style","className"];function Be(Nt){return typeof Nt=="string"||typeof Nt=="number"}var Fi=function(dt,nn){var vn=Ee(),zn=vn.prefixCls,qn=vn.id,Ft=vn.open,Bn=vn.multiple,Kn=vn.mode,Ci=vn.searchValue,En=vn.toggleOpen,un=vn.notFoundContent,bn=vn.onPopupScroll,Ei=Ge.useContext(Oi),Ni=Ei.flattenOptions,mi=Ei.onActiveValue,Di=Ei.defaultActiveFirstOption,Ai=Ei.onSelect,gr=Ei.menuItemSelectedIcon,Or=Ei.rawValues,Hr=Ei.fieldNames,jn=Ei.virtual,Po=Ei.direction,Wr=Ei.listHeight,ro=Ei.listItemHeight,Mn="".concat(zn,"-item"),ii=(0,pi.Z)(function(){return Ni},[Ft,Ni],function(Br,Er){return Er[0]&&Br[1]!==Er[1]}),Hi=Ge.useRef(null),xr=function(Er){Er.preventDefault()},qi=function(Er){Hi.current&&Hi.current.scrollTo(typeof Er=="number"?{index:Er}:Er)},pr=function(Er){for(var mo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Yo=ii.length,Ki=0;Ki<Yo;Ki+=1){var ot=(Er+Ki*mo+Yo)%Yo,sa=ii[ot],va=sa.group,Ma=sa.data;if(!va&&!Ma.disabled)return ot}return-1},Vr=Ge.useState(function(){return pr(0)}),jr=(0,We.Z)(Vr,2),kr=jr[0],Kr=jr[1],Yn=function(Er){var mo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Kr(Er);var Yo={source:mo?"keyboard":"mouse"},Ki=ii[Er];if(!Ki){mi(null,-1,Yo);return}mi(Ki.value,Er,Yo)};(0,Ge.useEffect)(function(){Yn(Di!==!1?pr(0):-1)},[ii.length,Ci]);var Ho=Ge.useCallback(function(Br){return Or.has(Br)&&Kn!=="combobox"},[Kn,(0,Te.Z)(Or).toString(),Or.size]);(0,Ge.useEffect)(function(){var Br=setTimeout(function(){if(!Bn&&Ft&&Or.size===1){var mo=Array.from(Or)[0],Yo=ii.findIndex(function(Ki){var ot=Ki.data;return ot.value===mo});Yo!==-1&&(Yn(Yo),qi(Yo))}});if(Ft){var Er;(Er=Hi.current)===null||Er===void 0||Er.scrollTo(void 0)}return function(){return clearTimeout(Br)}},[Ft,Ci,Ni.length]);var Xn=function(Er){Er!==void 0&&Ai(Er,{selected:!Or.has(Er)}),Bn||En(!1)};if(Ge.useImperativeHandle(nn,function(){return{onKeyDown:function(Er){var mo=Er.which,Yo=Er.ctrlKey;switch(mo){case te.Z.N:case te.Z.P:case te.Z.UP:case te.Z.DOWN:{var Ki=0;if(mo===te.Z.UP?Ki=-1:mo===te.Z.DOWN?Ki=1:to()&&Yo&&(mo===te.Z.N?Ki=1:mo===te.Z.P&&(Ki=-1)),Ki!==0){var ot=pr(kr+Ki,Ki);qi(ot),Yn(ot,!0)}break}case te.Z.ENTER:{var sa=ii[kr];sa&&!sa.data.disabled?Xn(sa.value):Xn(void 0),Ft&&Er.preventDefault();break}case te.Z.ESC:En(!1),Ft&&Er.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Er){qi(Er)}}}),ii.length===0)return Ge.createElement("div",{role:"listbox",id:"".concat(qn,"_list"),className:"".concat(Mn,"-empty"),onMouseDown:xr},un);var Ao=Object.keys(Hr).map(function(Br){return Hr[Br]}),Qo=function(Er){return Er.label};function nr(Br,Er){var mo=Br.group;return{role:mo?"presentation":"option",id:"".concat(qn,"_list_").concat(Er)}}var qo=function(Er){var mo=ii[Er];if(!mo)return null;var Yo=mo.data||{},Ki=Yo.value,ot=mo.group,sa=(0,ze.Z)(Yo,!0),va=Qo(mo);return mo?Ge.createElement("div",(0,le.Z)({"aria-label":typeof va=="string"&&!ot?va:null},sa,{key:Er},nr(mo,Er),{"aria-selected":Ho(Ki)}),Ki):null},Go={role:"listbox",id:"".concat(qn,"_list")};return Ge.createElement(Ge.Fragment,null,jn&&Ge.createElement("div",(0,le.Z)({},Go,{style:{height:0,width:0,overflow:"hidden"}}),qo(kr-1),qo(kr),qo(kr+1)),Ge.createElement(xi.Z,{itemKey:"key",ref:Hi,data:ii,height:Wr,itemHeight:ro,fullHeight:!1,onMouseDown:xr,onScroll:bn,virtual:jn,direction:Po,innerProps:jn?null:Go},function(Br,Er){var mo,Yo=Br.group,Ki=Br.groupOption,ot=Br.data,sa=Br.label,va=Br.value,Ma=ot.key;if(Yo){var hs,Ga=(hs=ot.title)!==null&&hs!==void 0?hs:Be(sa)?sa.toString():void 0;return Ge.createElement("div",{className:mt()(Mn,"".concat(Mn,"-group")),title:Ga},sa!==void 0?sa:Ma)}var Lo=ot.disabled,po=ot.title,la=ot.children,Eo=ot.style,Na=ot.className,os=(0,ct.Z)(ot,eo),xo=(0,li.Z)(os,Ao),Yr=Ho(va),vi="".concat(Mn,"-option"),no=mt()(Mn,vi,Na,(mo={},(0,He.Z)(mo,"".concat(vi,"-grouped"),Ki),(0,He.Z)(mo,"".concat(vi,"-active"),kr===Er&&!Lo),(0,He.Z)(mo,"".concat(vi,"-disabled"),Lo),(0,He.Z)(mo,"".concat(vi,"-selected"),Yr),mo)),io=Qo(Br),Ja=!gr||typeof gr=="function"||Yr,Ca=typeof io=="number"?io:io||va,fa=Be(Ca)?Ca.toString():void 0;return po!==void 0&&(fa=po),Ge.createElement("div",(0,le.Z)({},(0,ze.Z)(xo),jn?{}:nr(Br,Er),{"aria-selected":Yr,className:no,title:fa,onMouseMove:function(){kr===Er||Lo||Yn(Er)},onClick:function(){Lo||Xn(va)},style:Eo}),Ge.createElement("div",{className:"".concat(vi,"-content")},Ca),Ge.isValidElement(gr)||Yr,Ja&&Ge.createElement(se,{className:"".concat(Mn,"-option-state"),customizeIcon:gr,customizeIconProps:{isSelected:Yr}},Yr?"\u2713":null))}))},wr=Ge.forwardRef(Fi);wr.displayName="OptionList";var Fn=wr;function wi(Nt){var dt=Nt.mode,nn=Nt.options,vn=Nt.children,zn=Nt.backfill,qn=Nt.allowClear,Ft=Nt.placeholder,Bn=Nt.getInputElement,Kn=Nt.showSearch,Ci=Nt.onSearch,En=Nt.defaultOpen,un=Nt.autoFocus,bn=Nt.labelInValue,Ei=Nt.value,Ni=Nt.inputValue,mi=Nt.optionLabelProp,Di=isMultiple(dt),Ai=Kn!==void 0?Kn:Di||dt==="combobox",gr=nn||convertChildrenToData(vn);if(warning(dt!=="tags"||gr.every(function(Po){return!Po.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),dt==="tags"||dt==="combobox"){var Or=gr.some(function(Po){return Po.options?Po.options.some(function(Wr){return typeof("value"in Wr?Wr.value:Wr.key)=="number"}):typeof("value"in Po?Po.value:Po.key)=="number"});warning(!Or,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(dt!=="combobox"||!mi,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(dt==="combobox"||!zn,"`backfill` only works with `combobox` mode."),warning(dt==="combobox"||!Bn,"`getInputElement` only work with `combobox` mode."),noteOnce(dt!=="combobox"||!Bn||!qn||!Ft,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ci&&!Ai&&dt!=="combobox"&&dt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!En||un,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ei!=null){var Hr=toArray(Ei);warning(!bn||Hr.every(function(Po){return _typeof(Po)==="object"&&("key"in Po||"value"in Po)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Di||Array.isArray(Ei),"`value` should be array when `mode` is `multiple` or `tags`")}if(vn){var jn=null;toNodeArray(vn).some(function(Po){if(!React.isValidElement(Po)||!Po.type)return!1;var Wr=Po,ro=Wr.type;if(ro.isSelectOption)return!1;if(ro.isSelectOptGroup){var Mn=toNodeArray(Po.props.children).every(function(ii){return!React.isValidElement(ii)||!Po.type||ii.type.isSelectOption?!0:(jn=ii.type,!1)});return!Mn}return jn=ro,!0}),jn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(jn.displayName||jn.name||jn,"`.")),warning(Ni===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function $i(Nt,dt){if(Nt){var nn=function vn(zn){for(var qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ft=0;Ft<zn.length;Ft++){var Bn=zn[Ft];if(Bn[dt==null?void 0:dt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!qn&&Array.isArray(Bn[dt==null?void 0:dt.options])&&vn(Bn[dt==null?void 0:dt.options],!0))break}};nn(Nt)}}var tr=null,ei=["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"],$n=["inputValue"];function zt(Nt){return!Nt||(0,Me.Z)(Nt)!=="object"}var Vt=Ge.forwardRef(function(Nt,dt){var nn=Nt.id,vn=Nt.mode,zn=Nt.prefixCls,qn=zn===void 0?"rc-select":zn,Ft=Nt.backfill,Bn=Nt.fieldNames,Kn=Nt.inputValue,Ci=Nt.searchValue,En=Nt.onSearch,un=Nt.autoClearSearchValue,bn=un===void 0?!0:un,Ei=Nt.onSelect,Ni=Nt.onDeselect,mi=Nt.dropdownMatchSelectWidth,Di=mi===void 0?!0:mi,Ai=Nt.filterOption,gr=Nt.filterSort,Or=Nt.optionFilterProp,Hr=Nt.optionLabelProp,jn=Nt.options,Po=Nt.children,Wr=Nt.defaultActiveFirstOption,ro=Nt.menuItemSelectedIcon,Mn=Nt.virtual,ii=Nt.direction,Hi=Nt.listHeight,xr=Hi===void 0?200:Hi,qi=Nt.listItemHeight,pr=qi===void 0?20:qi,Vr=Nt.value,jr=Nt.defaultValue,kr=Nt.labelInValue,Kr=Nt.onChange,Yn=(0,ct.Z)(Nt,ei),Ho=(0,sn.ZP)(nn),Xn=Pe(vn),Ao=!!(!jn&&Po),Qo=Ge.useMemo(function(){return Ai===void 0&&vn==="combobox"?!1:Ai},[Ai,vn]),nr=Ge.useMemo(function(){return $e(Bn,Ao)},[JSON.stringify(Bn),Ao]),qo=(0,bt.Z)("",{value:Ci!==void 0?Ci:Kn,postState:function(Ea){return Ea||""}}),Go=(0,We.Z)(qo,2),Br=Go[0],Er=Go[1],mo=Sn(jn,Po,nr,Or,Hr),Yo=mo.valueOptions,Ki=mo.labelOptions,ot=mo.options,sa=Ge.useCallback(function(Do){var Ea=Lt(Do);return Ea.map(function(ca){var dr,Rs,ls,sl,jl;if(zt(ca))dr=ca;else{var ou;ls=ca.key,Rs=ca.label,dr=(ou=ca.value)!==null&&ou!==void 0?ou:ls}var Ji=Yo.get(dr);if(Ji){var Cs;if(Rs===void 0&&(Rs=Ji==null?void 0:Ji[Hr||nr.label]),ls===void 0&&(ls=(Cs=Ji==null?void 0:Ji.key)!==null&&Cs!==void 0?Cs:dr),sl=Ji==null?void 0:Ji.disabled,jl=Ji==null?void 0:Ji.title,0)var Us}return{label:Rs,value:dr,key:ls,disabled:sl,title:jl}})},[nr,Hr,Yo]),va=(0,bt.Z)(jr,{value:Vr}),Ma=(0,We.Z)(va,2),hs=Ma[0],Ga=Ma[1],Lo=Ge.useMemo(function(){var Do,Ea=sa(hs);return vn==="combobox"&&Dt((Do=Ea[0])===null||Do===void 0?void 0:Do.value)?[]:Ea},[hs,sa,vn]),po=Ke(Lo,Yo),la=(0,We.Z)(po,2),Eo=la[0],Na=la[1],os=Ge.useMemo(function(){if(!vn&&Eo.length===1){var Do=Eo[0];if(Do.value===null&&(Do.label===null||Do.label===void 0))return[]}return Eo.map(function(Ea){var ca;return(0,st.Z)((0,st.Z)({},Ea),{},{label:(ca=Ea.label)!==null&&ca!==void 0?ca:Ea.value})})},[vn,Eo]),xo=Ge.useMemo(function(){return new Set(Eo.map(function(Do){return Do.value}))},[Eo]);Ge.useEffect(function(){if(vn==="combobox"){var Do,Ea=(Do=Eo[0])===null||Do===void 0?void 0:Do.value;Er(wt(Ea)?String(Ea):"")}},[Eo]);var Yr=Pi(function(Do,Ea){var ca,dr=Ea!=null?Ea:Do;return ca={},(0,He.Z)(ca,nr.value,Do),(0,He.Z)(ca,nr.label,dr),ca}),vi=Ge.useMemo(function(){if(vn!=="tags")return ot;var Do=(0,Te.Z)(ot),Ea=function(dr){return Yo.has(dr)};return(0,Te.Z)(Eo).sort(function(ca,dr){return ca.value<dr.value?-1:1}).forEach(function(ca){var dr=ca.value;Ea(dr)||Do.push(Yr(dr,ca.label))}),Do},[Yr,ot,Yo,Eo,vn]),no=Et(vi,nr,Br,Qo,Or),io=Ge.useMemo(function(){return vn!=="tags"||!Br||no.some(function(Do){return Do[Or||"value"]===Br})||no.some(function(Do){return Do[nr.value]===Br})?no:[Yr(Br)].concat((0,Te.Z)(no))},[Yr,Or,vn,no,Br,nr]),Ja=Ge.useMemo(function(){return gr?(0,Te.Z)(io).sort(function(Do,Ea){return gr(Do,Ea)}):io},[io,gr]),Ca=Ge.useMemo(function(){return Gt(Ja,{fieldNames:nr,childrenAsData:Ao})},[Ja,nr,Ao]),fa=function(Ea){var ca=sa(Ea);if(Ga(ca),Kr&&(ca.length!==Eo.length||ca.some(function(ls,sl){var jl;return((jl=Eo[sl])===null||jl===void 0?void 0:jl.value)!==(ls==null?void 0:ls.value)}))){var dr=kr?ca:ca.map(function(ls){return ls.value}),Rs=ca.map(function(ls){return Ht(Na(ls.value))});Kr(Xn?dr:dr[0],Xn?Rs:Rs[0])}},$a=Ge.useState(null),Qa=(0,We.Z)($a,2),Es=Qa[0],ys=Qa[1],Zs=Ge.useState(0),Dn=(0,We.Z)(Zs,2),Ss=Dn[0],ra=Dn[1],hl=Wr!==void 0?Wr:vn!=="combobox",Ol=Ge.useCallback(function(Do,Ea){var ca=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},dr=ca.source,Rs=dr===void 0?"keyboard":dr;ra(Ea),Ft&&vn==="combobox"&&Do!==null&&Rs==="keyboard"&&ys(String(Do))},[Ft,vn]),ns=function(Ea,ca,dr){var Rs=function(){var Vl,Oo=Na(Ea);return[kr?{label:Oo==null?void 0:Oo[nr.label],value:Ea,key:(Vl=Oo==null?void 0:Oo.key)!==null&&Vl!==void 0?Vl:Ea}:Ea,Ht(Oo)]};if(ca&&Ei){var ls=Rs(),sl=(0,We.Z)(ls,2),jl=sl[0],ou=sl[1];Ei(jl,ou)}else if(!ca&&Ni&&dr!=="clear"){var Ji=Rs(),Cs=(0,We.Z)(Ji,2),Us=Cs[0],$l=Cs[1];Ni(Us,$l)}},yu=Pi(function(Do,Ea){var ca,dr=Xn?Ea.selected:!0;dr?ca=Xn?[].concat((0,Te.Z)(Eo),[Do]):[Do]:ca=Eo.filter(function(Rs){return Rs.value!==Do}),fa(ca),ns(Do,dr),vn==="combobox"?ys(""):(!Pe||bn)&&(Er(""),ys(""))}),eu=function(Ea,ca){fa(Ea);var dr=ca.type,Rs=ca.values;(dr==="remove"||dr==="clear")&&Rs.forEach(function(ls){ns(ls.value,!1,dr)})},ps=function(Ea,ca){if(Er(Ea),ys(null),ca.source==="submit"){var dr=(Ea||"").trim();if(dr){var Rs=Array.from(new Set([].concat((0,Te.Z)(xo),[dr])));fa(Rs),ns(dr,!0),Er("")}return}ca.source!=="blur"&&(vn==="combobox"&&fa(Ea),En==null||En(Ea))},Ba=function(Ea){var ca=Ea;vn!=="tags"&&(ca=Ea.map(function(Rs){var ls=Ki.get(Rs);return ls==null?void 0:ls.value}).filter(function(Rs){return Rs!==void 0}));var dr=Array.from(new Set([].concat((0,Te.Z)(xo),(0,Te.Z)(ca))));fa(dr),dr.forEach(function(Rs){ns(Rs,!0)})},tu=Ge.useMemo(function(){var Do=Mn!==!1&&Di!==!1;return(0,st.Z)((0,st.Z)({},mo),{},{flattenOptions:Ca,onActiveValue:Ol,defaultActiveFirstOption:hl,onSelect:yu,menuItemSelectedIcon:ro,rawValues:xo,fieldNames:nr,virtual:Do,direction:ii,listHeight:xr,listItemHeight:pr,childrenAsData:Ao})},[mo,Ca,Ol,hl,yu,ro,xo,nr,Mn,Di,xr,pr,Ao]);return Ge.createElement(Oi.Provider,{value:tu},Ge.createElement(Oe,(0,le.Z)({},Yn,{id:Ho,prefixCls:qn,ref:dt,omitDomProps:$n,mode:vn,displayValues:os,onDisplayValuesChange:eu,direction:ii,searchValue:Br,onSearch:ps,autoClearSearchValue:bn,onSearchSplit:Ba,dropdownMatchSelectWidth:Di,OptionList:Fn,emptyOptions:!Ca.length,activeValue:Es,activeDescendantId:"".concat(Ho,"_list_").concat(Ss)})))}),Qe=Vt;Qe.Option=Nr,Qe.OptGroup=Zi;var an=Qe,dn=an},9296:function(_n,yn,me){"use strict";me.r(yn),me.d(yn,{ResizableTextArea:function(){return lt},default:function(){return Dt}});var le=me(72308),Te=me(77321),He=me(49618),st=me(62853),We=me(52487),ct=me(74416),Me=me(80702),bt=me(92310),Pt=me.n(bt),Ge=me(93681),ut=me(5643),mt=me(18929),yt=me(59301),De=me(29301),te=me(34280),ee=me(16089),ce=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,se=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],he={},ve;function Ee(Wt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=Wt.getAttribute("id")||Wt.getAttribute("data-reactid")||Wt.getAttribute("name");if(Mt&&he[et])return he[et];var Ue=window.getComputedStyle(Wt),Rt=Ue.getPropertyValue("box-sizing")||Ue.getPropertyValue("-moz-box-sizing")||Ue.getPropertyValue("-webkit-box-sizing"),Pn=parseFloat(Ue.getPropertyValue("padding-bottom"))+parseFloat(Ue.getPropertyValue("padding-top")),xn=parseFloat(Ue.getPropertyValue("border-bottom-width"))+parseFloat(Ue.getPropertyValue("border-top-width")),_t=se.map(function(cn){return"".concat(cn,":").concat(Ue.getPropertyValue(cn))}).join(";"),qt={sizingStyle:_t,paddingSize:Pn,borderSize:xn,boxSizing:Rt};return Mt&&et&&(he[et]=qt),qt}function Le(Wt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ve||(ve=document.createElement("textarea"),ve.setAttribute("tab-index","-1"),ve.setAttribute("aria-hidden","true"),document.body.appendChild(ve)),Wt.getAttribute("wrap")?ve.setAttribute("wrap",Wt.getAttribute("wrap")):ve.removeAttribute("wrap");var Rt=Ee(Wt,Mt),Pn=Rt.paddingSize,xn=Rt.borderSize,_t=Rt.boxSizing,qt=Rt.sizingStyle;ve.setAttribute("style","".concat(qt,";").concat(ce)),ve.value=Wt.value||Wt.placeholder||"";var cn=void 0,Gn=void 0,gn,Zn=ve.scrollHeight;if(_t==="border-box"?Zn+=xn:_t==="content-box"&&(Zn-=Pn),et!==null||Ue!==null){ve.value=" ";var Ct=ve.scrollHeight-Pn;et!==null&&(cn=Ct*et,_t==="border-box"&&(cn=cn+Pn+xn),Zn=Math.max(cn,Zn)),Ue!==null&&(Gn=Ct*Ue,_t==="border-box"&&(Gn=Gn+Pn+xn),gn=Zn>Gn?"":"hidden",Zn=Math.min(Gn,Zn))}var Wn={height:Zn,overflowY:gn,resize:"none"};return cn&&(Wn.minHeight=cn),Gn&&(Wn.maxHeight=Gn),Wn}var Ne=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],je=0,ze=1,Ye=2,Xe=yt.forwardRef(function(Wt,Mt){var et=Wt,Ue=et.prefixCls,Rt=et.onPressEnter,Pn=et.defaultValue,xn=et.value,_t=et.autoSize,qt=et.onResize,cn=et.className,Gn=et.style,gn=et.disabled,Zn=et.onChange,Ct=et.onInternalAutoSize,Wn=(0,ct.Z)(et,Ne),di=(0,mt.Z)(Pn,{value:xn,postState:function(Zi){return Zi!=null?Zi:""}}),Kt=(0,We.Z)(di,2),ln=Kt[0],$t=Kt[1],Tt=function(Zi){$t(Zi.target.value),Zn==null||Zn(Zi)},ft=yt.useRef();yt.useImperativeHandle(Mt,function(){return{textArea:ft.current}});var $e=yt.useMemo(function(){return _t&&(0,st.Z)(_t)==="object"?[_t.minRows,_t.maxRows]:[]},[_t]),Gt=(0,We.Z)($e,2),Ht=Gt[0],ht=Gt[1],at=!!_t,Re=function(){try{if(document.activeElement===ft.current){var Zi=ft.current,ir=Zi.selectionStart,Nr=Zi.selectionEnd,pi=Zi.scrollTop;ft.current.setSelectionRange(ir,Nr),ft.current.scrollTop=pi}}catch(li){}},Pe=yt.useState(Ye),ye=(0,We.Z)(Pe,2),Oe=ye[0],Ke=ye[1],Fe=yt.useState(),Et=(0,We.Z)(Fe,2),sn=Et[0],pn=Et[1],en=function(){Ke(je)};(0,te.Z)(function(){at&&en()},[xn,Ht,ht,at]),(0,te.Z)(function(){if(Oe===je)Ke(ze);else if(Oe===ze){var zi=Le(ft.current,!1,Ht,ht);Ke(Ye),pn(zi)}else Re()},[Oe]);var wn=yt.useRef(),hi=function(){ee.Z.cancel(wn.current)},Rn=function(Zi){Oe===Ye&&(qt==null||qt(Zi),_t&&(hi(),wn.current=(0,ee.Z)(function(){en()})))};yt.useEffect(function(){return hi},[]);var Sn=at?sn:null,Pi=(0,Te.Z)((0,Te.Z)({},Gn),Sn);return(Oe===je||Oe===ze)&&(Pi.overflowY="hidden",Pi.overflowX="hidden"),yt.createElement(De.Z,{onResize:Rn,disabled:!(_t||qt)},yt.createElement("textarea",(0,le.Z)({},Wn,{ref:ft,style:Pi,className:Pt()(Ue,cn,(0,He.Z)({},"".concat(Ue,"-disabled"),gn)),disabled:gn,value:ln,onChange:Tt})))}),lt=Xe,Ze=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Lt(Wt,Mt){return(0,Me.Z)(Wt||"").slice(0,Mt).join("")}function rt(Wt,Mt,et,Ue){var Rt=et;return Wt?Rt=Lt(et,Ue):(0,Me.Z)(Mt||"").length<et.length&&(0,Me.Z)(et||"").length>Ue&&(Rt=Mt),Rt}var Ot=yt.forwardRef(function(Wt,Mt){var et,Ue=Wt.defaultValue,Rt=Wt.value,Pn=Wt.onFocus,xn=Wt.onBlur,_t=Wt.onChange,qt=Wt.allowClear,cn=Wt.maxLength,Gn=Wt.onCompositionStart,gn=Wt.onCompositionEnd,Zn=Wt.suffix,Ct=Wt.prefixCls,Wn=Ct===void 0?"rc-textarea":Ct,di=Wt.classes,Kt=Wt.showCount,ln=Wt.className,$t=Wt.style,Tt=Wt.disabled,ft=Wt.hidden,$e=Wt.classNames,Gt=Wt.styles,Ht=Wt.onResize,ht=(0,ct.Z)(Wt,Ze),at=(0,mt.Z)(Ue,{value:Rt,defaultValue:Ue}),Re=(0,We.Z)(at,2),Pe=Re[0],ye=Re[1],Oe=(0,yt.useRef)(null),Ke=yt.useState(!1),Fe=(0,We.Z)(Ke,2),Et=Fe[0],sn=Fe[1],pn=yt.useState(!1),en=(0,We.Z)(pn,2),wn=en[0],hi=en[1],Rn=yt.useRef(),Sn=yt.useRef(0),Pi=yt.useState(null),zi=(0,We.Z)(Pi,2),Zi=zi[0],ir=zi[1],Nr=function(){var zt;(zt=Oe.current)===null||zt===void 0||zt.textArea.focus()};(0,yt.useImperativeHandle)(Mt,function(){return{resizableTextArea:Oe.current,focus:Nr,blur:function(){var zt;(zt=Oe.current)===null||zt===void 0||zt.textArea.blur()}}}),(0,yt.useEffect)(function(){sn(function($n){return!Tt&&$n})},[Tt]);var pi=Number(cn)>0,li=function(zt){hi(!0),Rn.current=Pe,Sn.current=zt.currentTarget.selectionStart,Gn==null||Gn(zt)},xi=function(zt){hi(!1);var Vt=zt.currentTarget.value;if(pi){var Qe,an=Sn.current>=cn+1||Sn.current===((Qe=Rn.current)===null||Qe===void 0?void 0:Qe.length);Vt=rt(an,Rn.current,Vt,cn)}Vt!==Pe&&(ye(Vt),(0,ut.rJ)(zt.currentTarget,zt,_t,Vt)),gn==null||gn(zt)},Gi=function(zt){var Vt=zt.target.value;if(!wn&&pi){var Qe=zt.target.selectionStart>=cn+1||zt.target.selectionStart===Vt.length||!zt.target.selectionStart;Vt=rt(Qe,Pe,Vt,cn)}ye(Vt),(0,ut.rJ)(zt.currentTarget,zt,_t,Vt)},Oi=function(zt){var Vt=ht.onPressEnter,Qe=ht.onKeyDown;zt.key==="Enter"&&Vt&&Vt(zt),Qe==null||Qe(zt)},to=function(zt){sn(!0),Pn==null||Pn(zt)},eo=function(zt){sn(!1),xn==null||xn(zt)},Be=function(zt){var Vt;ye(""),Nr(),(0,ut.rJ)((Vt=Oe.current)===null||Vt===void 0?void 0:Vt.textArea,zt,_t)},Fi=(0,ut.D7)(Pe);!wn&&pi&&Rt==null&&(Fi=Lt(Fi,cn));var wr=Zn,Fn;if(Kt){var wi=(0,Me.Z)(Fi).length;(0,st.Z)(Kt)==="object"?Fn=Kt.formatter({value:Fi,count:wi,maxLength:cn}):Fn="".concat(wi).concat(pi?" / ".concat(cn):""),wr=yt.createElement(yt.Fragment,null,wr,yt.createElement("span",{className:Pt()("".concat(Wn,"-data-count"),$e==null?void 0:$e.count),style:Gt==null?void 0:Gt.count},Fn))}var $i=function(zt){var Vt;Ht==null||Ht(zt),(Vt=Oe.current)!==null&&Vt!==void 0&&Vt.textArea.style.height&&ir(!0)},tr=!ht.autoSize&&!Kt&&!qt,ei=yt.createElement(Ge.BaseInput,{value:Fi,allowClear:qt,handleReset:Be,suffix:wr,prefixCls:Wn,classes:{affixWrapper:Pt()(di==null?void 0:di.affixWrapper,(et={},(0,He.Z)(et,"".concat(Wn,"-show-count"),Kt),(0,He.Z)(et,"".concat(Wn,"-textarea-allow-clear"),qt),et))},disabled:Tt,focused:Et,className:ln,style:(0,Te.Z)((0,Te.Z)({},$t),Zi&&!tr?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Fn=="string"?Fn:void 0}},hidden:ft,inputElement:yt.createElement(lt,(0,le.Z)({},ht,{onKeyDown:Oi,onChange:Gi,onFocus:to,onBlur:eo,onCompositionStart:li,onCompositionEnd:xi,className:$e==null?void 0:$e.textarea,style:(0,Te.Z)((0,Te.Z)({},Gt==null?void 0:Gt.textarea),{},{resize:$t==null?void 0:$t.resize}),disabled:Tt,prefixCls:Wn,onResize:$i,ref:Oe}))});return ei}),wt=Ot,Dt=wt},39417:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return ze}});var le=me(72308),Te=me(49618),He=me(74416),st=me(77321),We=me(96949),ct=me(55090),Me=me(80237),bt=me(77205),Pt=me(38793),Ge=me(92310),ut=me.n(Ge),mt=me(26112),yt=me(59301),De=me(39378),te=function(Xe){for(var lt=Xe.prefixCls,Ze=Xe.level,Lt=Xe.isStart,rt=Xe.isEnd,Ot="".concat(lt,"-indent-unit"),wt=[],Dt=0;Dt<Ze;Dt+=1){var Wt;wt.push(yt.createElement("span",{key:Dt,className:ut()(Ot,(Wt={},(0,Te.Z)(Wt,"".concat(Ot,"-start"),Lt[Dt]),(0,Te.Z)(Wt,"".concat(Ot,"-end"),rt[Dt]),Wt))}))}return yt.createElement("span",{"aria-hidden":"true",className:"".concat(lt,"-indent")},wt)},ee=yt.memo(te),ce=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",Le="---",Ne=function(Ye){(0,bt.Z)(lt,Ye);var Xe=(0,Pt.Z)(lt);function lt(){var Ze;(0,We.Z)(this,lt);for(var Lt=arguments.length,rt=new Array(Lt),Ot=0;Ot<Lt;Ot++)rt[Ot]=arguments[Ot];return Ze=Xe.call.apply(Xe,[this].concat(rt)),Ze.state={dragNodeHighlight:!1},Ze.selectHandle=void 0,Ze.cacheIndent=void 0,Ze.onSelectorClick=function(wt){var Dt=Ze.props.context.onNodeClick;Dt(wt,(0,se.F)(Ze.props)),Ze.isSelectable()?Ze.onSelect(wt):Ze.onCheck(wt)},Ze.onSelectorDoubleClick=function(wt){var Dt=Ze.props.context.onNodeDoubleClick;Dt(wt,(0,se.F)(Ze.props))},Ze.onSelect=function(wt){if(!Ze.isDisabled()){var Dt=Ze.props.context.onNodeSelect;Dt(wt,(0,se.F)(Ze.props))}},Ze.onCheck=function(wt){if(!Ze.isDisabled()){var Dt=Ze.props,Wt=Dt.disableCheckbox,Mt=Dt.checked,et=Ze.props.context.onNodeCheck;if(!(!Ze.isCheckable()||Wt)){var Ue=!Mt;et(wt,(0,se.F)(Ze.props),Ue)}}},Ze.onMouseEnter=function(wt){var Dt=Ze.props.context.onNodeMouseEnter;Dt(wt,(0,se.F)(Ze.props))},Ze.onMouseLeave=function(wt){var Dt=Ze.props.context.onNodeMouseLeave;Dt(wt,(0,se.F)(Ze.props))},Ze.onContextMenu=function(wt){var Dt=Ze.props.context.onNodeContextMenu;Dt(wt,(0,se.F)(Ze.props))},Ze.onDragStart=function(wt){var Dt=Ze.props.context.onNodeDragStart;wt.stopPropagation(),Ze.setState({dragNodeHighlight:!0}),Dt(wt,(0,Me.Z)(Ze));try{wt.dataTransfer.setData("text/plain","")}catch(Wt){}},Ze.onDragEnter=function(wt){var Dt=Ze.props.context.onNodeDragEnter;wt.preventDefault(),wt.stopPropagation(),Dt(wt,(0,Me.Z)(Ze))},Ze.onDragOver=function(wt){var Dt=Ze.props.context.onNodeDragOver;wt.preventDefault(),wt.stopPropagation(),Dt(wt,(0,Me.Z)(Ze))},Ze.onDragLeave=function(wt){var Dt=Ze.props.context.onNodeDragLeave;wt.stopPropagation(),Dt(wt,(0,Me.Z)(Ze))},Ze.onDragEnd=function(wt){var Dt=Ze.props.context.onNodeDragEnd;wt.stopPropagation(),Ze.setState({dragNodeHighlight:!1}),Dt(wt,(0,Me.Z)(Ze))},Ze.onDrop=function(wt){var Dt=Ze.props.context.onNodeDrop;wt.preventDefault(),wt.stopPropagation(),Ze.setState({dragNodeHighlight:!1}),Dt(wt,(0,Me.Z)(Ze))},Ze.onExpand=function(wt){var Dt=Ze.props,Wt=Dt.loading,Mt=Dt.context.onNodeExpand;Wt||Mt(wt,(0,se.F)(Ze.props))},Ze.setSelectHandle=function(wt){Ze.selectHandle=wt},Ze.getNodeState=function(){var wt=Ze.props.expanded;return Ze.isLeaf()?null:wt?ve:Ee},Ze.hasChildren=function(){var wt=Ze.props.eventKey,Dt=Ze.props.context.keyEntities,Wt=(0,ce.Z)(Dt,wt)||{},Mt=Wt.children;return!!(Mt||[]).length},Ze.isLeaf=function(){var wt=Ze.props,Dt=wt.isLeaf,Wt=wt.loaded,Mt=Ze.props.context.loadData,et=Ze.hasChildren();return Dt===!1?!1:Dt||!Mt&&!et||Mt&&Wt&&!et},Ze.isDisabled=function(){var wt=Ze.props.disabled,Dt=Ze.props.context.disabled;return!!(Dt||wt)},Ze.isCheckable=function(){var wt=Ze.props.checkable,Dt=Ze.props.context.checkable;return!Dt||wt===!1?!1:Dt},Ze.syncLoadData=function(wt){var Dt=wt.expanded,Wt=wt.loading,Mt=wt.loaded,et=Ze.props.context,Ue=et.loadData,Rt=et.onNodeLoad;Wt||Ue&&Dt&&!Ze.isLeaf()&&!Ze.hasChildren()&&!Mt&&Rt((0,se.F)(Ze.props))},Ze.isDraggable=function(){var wt=Ze.props,Dt=wt.data,Wt=wt.context.draggable;return!!(Wt&&(!Wt.nodeDraggable||Wt.nodeDraggable(Dt)))},Ze.renderDragHandler=function(){var wt=Ze.props.context,Dt=wt.draggable,Wt=wt.prefixCls;return Dt!=null&&Dt.icon?yt.createElement("span",{className:"".concat(Wt,"-draggable-icon")},Dt.icon):null},Ze.renderSwitcherIconDom=function(wt){var Dt=Ze.props.switcherIcon,Wt=Ze.props.context.switcherIcon,Mt=Dt||Wt;return typeof Mt=="function"?Mt((0,st.Z)((0,st.Z)({},Ze.props),{},{isLeaf:wt})):Mt},Ze.renderSwitcher=function(){var wt=Ze.props.expanded,Dt=Ze.props.context.prefixCls;if(Ze.isLeaf()){var Wt=Ze.renderSwitcherIconDom(!0);return Wt!==!1?yt.createElement("span",{className:ut()("".concat(Dt,"-switcher"),"".concat(Dt,"-switcher-noop"))},Wt):null}var Mt=ut()("".concat(Dt,"-switcher"),"".concat(Dt,"-switcher_").concat(wt?ve:Ee)),et=Ze.renderSwitcherIconDom(!1);return et!==!1?yt.createElement("span",{onClick:Ze.onExpand,className:Mt},et):null},Ze.renderCheckbox=function(){var wt=Ze.props,Dt=wt.checked,Wt=wt.halfChecked,Mt=wt.disableCheckbox,et=Ze.props.context.prefixCls,Ue=Ze.isDisabled(),Rt=Ze.isCheckable();if(!Rt)return null;var Pn=typeof Rt!="boolean"?Rt:null;return yt.createElement("span",{className:ut()("".concat(et,"-checkbox"),Dt&&"".concat(et,"-checkbox-checked"),!Dt&&Wt&&"".concat(et,"-checkbox-indeterminate"),(Ue||Mt)&&"".concat(et,"-checkbox-disabled")),onClick:Ze.onCheck},Pn)},Ze.renderIcon=function(){var wt=Ze.props.loading,Dt=Ze.props.context.prefixCls;return yt.createElement("span",{className:ut()("".concat(Dt,"-iconEle"),"".concat(Dt,"-icon__").concat(Ze.getNodeState()||"docu"),wt&&"".concat(Dt,"-icon_loading"))})},Ze.renderSelector=function(){var wt=Ze.state.dragNodeHighlight,Dt=Ze.props,Wt=Dt.title,Mt=Wt===void 0?Le:Wt,et=Dt.selected,Ue=Dt.icon,Rt=Dt.loading,Pn=Dt.data,xn=Ze.props.context,_t=xn.prefixCls,qt=xn.showIcon,cn=xn.icon,Gn=xn.loadData,gn=xn.titleRender,Zn=Ze.isDisabled(),Ct="".concat(_t,"-node-content-wrapper"),Wn;if(qt){var di=Ue||cn;Wn=di?yt.createElement("span",{className:ut()("".concat(_t,"-iconEle"),"".concat(_t,"-icon__customize"))},typeof di=="function"?di(Ze.props):di):Ze.renderIcon()}else Gn&&Rt&&(Wn=Ze.renderIcon());var Kt;typeof Mt=="function"?Kt=Mt(Pn):gn?Kt=gn(Pn):Kt=Mt;var ln=yt.createElement("span",{className:"".concat(_t,"-title")},Kt);return yt.createElement("span",{ref:Ze.setSelectHandle,title:typeof Mt=="string"?Mt:"",className:ut()("".concat(Ct),"".concat(Ct,"-").concat(Ze.getNodeState()||"normal"),!Zn&&(et||wt)&&"".concat(_t,"-node-selected")),onMouseEnter:Ze.onMouseEnter,onMouseLeave:Ze.onMouseLeave,onContextMenu:Ze.onContextMenu,onClick:Ze.onSelectorClick,onDoubleClick:Ze.onSelectorDoubleClick},Wn,ln,Ze.renderDropIndicator())},Ze.renderDropIndicator=function(){var wt=Ze.props,Dt=wt.disabled,Wt=wt.eventKey,Mt=Ze.props.context,et=Mt.draggable,Ue=Mt.dropLevelOffset,Rt=Mt.dropPosition,Pn=Mt.prefixCls,xn=Mt.indent,_t=Mt.dropIndicatorRender,qt=Mt.dragOverNodeKey,cn=Mt.direction,Gn=!!et,gn=!Dt&&Gn&&qt===Wt,Zn=xn!=null?xn:Ze.cacheIndent;return Ze.cacheIndent=xn,gn?_t({dropPosition:Rt,dropLevelOffset:Ue,indent:Zn,prefixCls:Pn,direction:cn}):null},Ze}return(0,ct.Z)(lt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Lt=this.props.selectable,rt=this.props.context.selectable;return typeof Lt=="boolean"?Lt:rt}},{key:"render",value:function(){var Lt,rt=this.props,Ot=rt.eventKey,wt=rt.className,Dt=rt.style,Wt=rt.dragOver,Mt=rt.dragOverGapTop,et=rt.dragOverGapBottom,Ue=rt.isLeaf,Rt=rt.isStart,Pn=rt.isEnd,xn=rt.expanded,_t=rt.selected,qt=rt.checked,cn=rt.halfChecked,Gn=rt.loading,gn=rt.domRef,Zn=rt.active,Ct=rt.data,Wn=rt.onMouseMove,di=rt.selectable,Kt=(0,He.Z)(rt,he),ln=this.props.context,$t=ln.prefixCls,Tt=ln.filterTreeNode,ft=ln.keyEntities,$e=ln.dropContainerKey,Gt=ln.dropTargetKey,Ht=ln.draggingNodeKey,ht=this.isDisabled(),at=(0,mt.Z)(Kt,{aria:!0,data:!0}),Re=(0,ce.Z)(ft,Ot)||{},Pe=Re.level,ye=Pn[Pn.length-1],Oe=this.isDraggable(),Ke=!ht&&Oe,Fe=Ht===Ot,Et=di!==void 0?{"aria-selected":!!di}:void 0;return yt.createElement("div",(0,le.Z)({ref:gn,className:ut()(wt,"".concat($t,"-treenode"),(Lt={},(0,Te.Z)(Lt,"".concat($t,"-treenode-disabled"),ht),(0,Te.Z)(Lt,"".concat($t,"-treenode-switcher-").concat(xn?"open":"close"),!Ue),(0,Te.Z)(Lt,"".concat($t,"-treenode-checkbox-checked"),qt),(0,Te.Z)(Lt,"".concat($t,"-treenode-checkbox-indeterminate"),cn),(0,Te.Z)(Lt,"".concat($t,"-treenode-selected"),_t),(0,Te.Z)(Lt,"".concat($t,"-treenode-loading"),Gn),(0,Te.Z)(Lt,"".concat($t,"-treenode-active"),Zn),(0,Te.Z)(Lt,"".concat($t,"-treenode-leaf-last"),ye),(0,Te.Z)(Lt,"".concat($t,"-treenode-draggable"),Oe),(0,Te.Z)(Lt,"dragging",Fe),(0,Te.Z)(Lt,"drop-target",Gt===Ot),(0,Te.Z)(Lt,"drop-container",$e===Ot),(0,Te.Z)(Lt,"drag-over",!ht&&Wt),(0,Te.Z)(Lt,"drag-over-gap-top",!ht&&Mt),(0,Te.Z)(Lt,"drag-over-gap-bottom",!ht&&et),(0,Te.Z)(Lt,"filter-node",Tt&&Tt((0,se.F)(this.props))),Lt)),style:Dt,draggable:Ke,"aria-grabbed":Fe,onDragStart:Ke?this.onDragStart:void 0,onDragEnter:Oe?this.onDragEnter:void 0,onDragOver:Oe?this.onDragOver:void 0,onDragLeave:Oe?this.onDragLeave:void 0,onDrop:Oe?this.onDrop:void 0,onDragEnd:Oe?this.onDragEnd:void 0,onMouseMove:Wn},Et,at),yt.createElement(ee,{prefixCls:$t,level:Pe,isStart:Rt,isEnd:Pn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),lt}(yt.Component),je=function(Xe){return yt.createElement(De.k.Consumer,null,function(lt){return yt.createElement(Ne,(0,le.Z)({},Xe,{context:lt}))})};je.displayName="TreeNode",je.isTreeNode=1;var ze=je},39378:function(_n,yn,me){"use strict";me.d(yn,{k:function(){return Te}});var le=me(59301),Te=le.createContext(null)},54844:function(_n,yn,me){"use strict";me.d(yn,{O:function(){return ze.Z},Z:function(){return ln}});var le=me(72308),Te=me(49618),He=me(62853),st=me(77321),We=me(80702),ct=me(96949),Me=me(55090),bt=me(80237),Pt=me(77205),Ge=me(38793),ut=me(92310),mt=me.n(ut),yt=me(10228),De=me(26112),te=me(48736),ee=me(59301),ce=me(39378);function se($t){var Tt=$t.dropPosition,ft=$t.dropLevelOffset,$e=$t.indent,Gt={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Tt){case-1:Gt.top=0,Gt.left=-ft*$e;break;case 1:Gt.bottom=0,Gt.left=-ft*$e;break;case 0:Gt.bottom=0,Gt.left=$e;break}return ee.createElement("div",{style:Gt})}function he($t){if($t==null)throw new TypeError("Cannot destructure "+$t)}var ve=me(52487),Ee=me(74416),Le=me(34280),Ne=me(45680),je=me(77900),ze=me(39417);function Ye($t,Tt){var ft=ee.useState(!1),$e=(0,ve.Z)(ft,2),Gt=$e[0],Ht=$e[1];ee.useLayoutEffect(function(){if(Gt)return $t(),function(){Tt()}},[Gt]),ee.useLayoutEffect(function(){return Ht(!0),function(){Ht(!1)}},[])}var Xe=me(71430),lt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ze=function(Tt,ft){var $e=Tt.className,Gt=Tt.style,Ht=Tt.motion,ht=Tt.motionNodes,at=Tt.motionType,Re=Tt.onMotionStart,Pe=Tt.onMotionEnd,ye=Tt.active,Oe=Tt.treeNodeRequiredProps,Ke=(0,Ee.Z)(Tt,lt),Fe=ee.useState(!0),Et=(0,ve.Z)(Fe,2),sn=Et[0],pn=Et[1],en=ee.useContext(ce.k),wn=en.prefixCls,hi=ht&&at!=="hide";(0,Le.Z)(function(){ht&&hi!==sn&&pn(hi)},[ht]);var Rn=function(){ht&&Re()},Sn=ee.useRef(!1),Pi=function(){ht&&!Sn.current&&(Sn.current=!0,Pe())};Ye(Rn,Pi);var zi=function(ir){hi===ir&&Pi()};return ht?ee.createElement(je.default,(0,le.Z)({ref:ft,visible:sn},Ht,{motionAppear:at==="show",onVisibleChanged:zi}),function(Zi,ir){var Nr=Zi.className,pi=Zi.style;return ee.createElement("div",{ref:ir,className:mt()("".concat(wn,"-treenode-motion"),Nr),style:pi},ht.map(function(li){var xi=(0,le.Z)({},(he(li.data),li.data)),Gi=li.title,Oi=li.key,to=li.isStart,eo=li.isEnd;delete xi.children;var Be=(0,Xe.H8)(Oi,Oe);return ee.createElement(ze.Z,(0,le.Z)({},xi,Be,{title:Gi,active:ye,data:li.data,key:Oi,isStart:to,isEnd:eo}))}))}):ee.createElement(ze.Z,(0,le.Z)({domRef:ft,className:$e,style:Gt},Ke,{active:ye}))};Ze.displayName="MotionTreeNode";var Lt=ee.forwardRef(Ze),rt=Lt;function Ot(){var $t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ft=$t.length,$e=Tt.length;if(Math.abs(ft-$e)!==1)return{add:!1,key:null};function Gt(Ht,ht){var at=new Map;Ht.forEach(function(Pe){at.set(Pe,!0)});var Re=ht.filter(function(Pe){return!at.has(Pe)});return Re.length===1?Re[0]:null}return ft<$e?{add:!0,key:Gt($t,Tt)}:{add:!1,key:Gt(Tt,$t)}}function wt($t,Tt,ft){var $e=$t.findIndex(function(at){return at.key===ft}),Gt=$t[$e+1],Ht=Tt.findIndex(function(at){return at.key===ft});if(Gt){var ht=Tt.findIndex(function(at){return at.key===Gt.key});return Tt.slice(Ht+1,ht)}return Tt.slice(Ht+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},Mt=function(){},et="RC_TREE_MOTION_".concat(Math.random()),Ue={key:et},Rt={key:et,level:0,index:0,pos:"0",node:Ue,nodes:[Ue]},Pn={parent:null,children:[],pos:Rt.pos,data:Ue,title:null,key:et,isStart:[],isEnd:[]};function xn($t,Tt,ft,$e){return Tt===!1||!ft?$t:$t.slice(0,Math.ceil(ft/$e)+1)}function _t($t){var Tt=$t.key,ft=$t.pos;return(0,Xe.km)(Tt,ft)}function qt($t){for(var Tt=String($t.data.key),ft=$t;ft.parent;)ft=ft.parent,Tt="".concat(ft.data.key," > ").concat(Tt);return Tt}var cn=ee.forwardRef(function($t,Tt){var ft=$t.prefixCls,$e=$t.data,Gt=$t.selectable,Ht=$t.checkable,ht=$t.expandedKeys,at=$t.selectedKeys,Re=$t.checkedKeys,Pe=$t.loadedKeys,ye=$t.loadingKeys,Oe=$t.halfCheckedKeys,Ke=$t.keyEntities,Fe=$t.disabled,Et=$t.dragging,sn=$t.dragOverNodeKey,pn=$t.dropPosition,en=$t.motion,wn=$t.height,hi=$t.itemHeight,Rn=$t.virtual,Sn=$t.focusable,Pi=$t.activeItem,zi=$t.focused,Zi=$t.tabIndex,ir=$t.onKeyDown,Nr=$t.onFocus,pi=$t.onBlur,li=$t.onActiveChange,xi=$t.onListChangeStart,Gi=$t.onListChangeEnd,Oi=(0,Ee.Z)($t,Dt),to=ee.useRef(null),eo=ee.useRef(null);ee.useImperativeHandle(Tt,function(){return{scrollTo:function(un){to.current.scrollTo(un)},getIndentWidth:function(){return eo.current.offsetWidth}}});var Be=ee.useState(ht),Fi=(0,ve.Z)(Be,2),wr=Fi[0],Fn=Fi[1],wi=ee.useState($e),$i=(0,ve.Z)(wi,2),tr=$i[0],ei=$i[1],$n=ee.useState($e),zt=(0,ve.Z)($n,2),Vt=zt[0],Qe=zt[1],an=ee.useState([]),dn=(0,ve.Z)(an,2),Nt=dn[0],dt=dn[1],nn=ee.useState(null),vn=(0,ve.Z)(nn,2),zn=vn[0],qn=vn[1],Ft=ee.useRef($e);Ft.current=$e;function Bn(){var En=Ft.current;ei(En),Qe(En),dt([]),qn(null),Gi()}(0,Le.Z)(function(){Fn(ht);var En=Ot(wr,ht);if(En.key!==null)if(En.add){var un=tr.findIndex(function(Ai){var gr=Ai.key;return gr===En.key}),bn=xn(wt(tr,$e,En.key),Rn,wn,hi),Ei=tr.slice();Ei.splice(un+1,0,Pn),Qe(Ei),dt(bn),qn("show")}else{var Ni=$e.findIndex(function(Ai){var gr=Ai.key;return gr===En.key}),mi=xn(wt($e,tr,En.key),Rn,wn,hi),Di=$e.slice();Di.splice(Ni+1,0,Pn),Qe(Di),dt(mi),qn("hide")}else tr!==$e&&(ei($e),Qe($e))},[ht,$e]),ee.useEffect(function(){Et||Bn()},[Et]);var Kn=en?Vt:$e,Ci={expandedKeys:ht,selectedKeys:at,loadedKeys:Pe,loadingKeys:ye,checkedKeys:Re,halfCheckedKeys:Oe,dragOverNodeKey:sn,dropPosition:pn,keyEntities:Ke};return ee.createElement(ee.Fragment,null,zi&&Pi&&ee.createElement("span",{style:Wt,"aria-live":"assertive"},qt(Pi)),ee.createElement("div",null,ee.createElement("input",{style:Wt,disabled:Sn===!1||Fe,tabIndex:Sn!==!1?Zi:null,onKeyDown:ir,onFocus:Nr,onBlur:pi,value:"",onChange:Mt,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(ft,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(ft,"-indent")},ee.createElement("div",{ref:eo,className:"".concat(ft,"-indent-unit")}))),ee.createElement(Ne.Z,(0,le.Z)({},Oi,{data:Kn,itemKey:_t,height:wn,fullHeight:!1,virtual:Rn,itemHeight:hi,prefixCls:"".concat(ft,"-list"),ref:to,onVisibleChange:function(un,bn){var Ei=new Set(un),Ni=bn.filter(function(mi){return!Ei.has(mi)});Ni.some(function(mi){return _t(mi)===et})&&Bn()}}),function(En){var un=En.pos,bn=(0,le.Z)({},(he(En.data),En.data)),Ei=En.title,Ni=En.key,mi=En.isStart,Di=En.isEnd,Ai=(0,Xe.km)(Ni,un);delete bn.key,delete bn.children;var gr=(0,Xe.H8)(Ai,Ci);return ee.createElement(rt,(0,le.Z)({},bn,gr,{title:Ei,active:!!Pi&&Ni===Pi.key,pos:un,data:En.data,isStart:mi,isEnd:Di,motion:en,motionNodes:Ni===et?Nt:null,motionType:zn,onMotionStart:xi,onMotionEnd:Bn,treeNodeRequiredProps:Ci,onMouseMove:function(){li(null)}}))}))});cn.displayName="NodeList";var Gn=cn,gn=me(35654),Zn=me(90782),Ct=me(67841),Wn=10,di=function($t){(0,Pt.Z)(ft,$t);var Tt=(0,Ge.Z)(ft);function ft(){var $e;(0,ct.Z)(this,ft);for(var Gt=arguments.length,Ht=new Array(Gt),ht=0;ht<Gt;ht++)Ht[ht]=arguments[ht];return $e=Tt.call.apply(Tt,[this].concat(Ht)),$e.destroyed=!1,$e.delayedDragEnterLogic=void 0,$e.loadingRetryTimes={},$e.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$)()},$e.dragStartMousePosition=null,$e.dragNode=void 0,$e.currentMouseOverDroppableNodeKey=null,$e.listRef=ee.createRef(),$e.onNodeDragStart=function(at,Re){var Pe=$e.state,ye=Pe.expandedKeys,Oe=Pe.keyEntities,Ke=$e.props.onDragStart,Fe=Re.props.eventKey;$e.dragNode=Re,$e.dragStartMousePosition={x:at.clientX,y:at.clientY};var Et=(0,gn._5)(ye,Fe);$e.setState({draggingNodeKey:Fe,dragChildrenKeys:(0,gn.wA)(Fe,Oe),indent:$e.listRef.current.getIndentWidth()}),$e.setExpandedKeys(Et),window.addEventListener("dragend",$e.onWindowDragEnd),Ke==null||Ke({event:at,node:(0,Xe.F)(Re.props)})},$e.onNodeDragEnter=function(at,Re){var Pe=$e.state,ye=Pe.expandedKeys,Oe=Pe.keyEntities,Ke=Pe.dragChildrenKeys,Fe=Pe.flattenNodes,Et=Pe.indent,sn=$e.props,pn=sn.onDragEnter,en=sn.onExpand,wn=sn.allowDrop,hi=sn.direction,Rn=Re.props,Sn=Rn.pos,Pi=Rn.eventKey,zi=(0,bt.Z)($e),Zi=zi.dragNode;if($e.currentMouseOverDroppableNodeKey!==Pi&&($e.currentMouseOverDroppableNodeKey=Pi),!Zi){$e.resetDragState();return}var ir=(0,gn.OM)(at,Zi,Re,Et,$e.dragStartMousePosition,wn,Fe,Oe,ye,hi),Nr=ir.dropPosition,pi=ir.dropLevelOffset,li=ir.dropTargetKey,xi=ir.dropContainerKey,Gi=ir.dropTargetPos,Oi=ir.dropAllowed,to=ir.dragOverNodeKey;if(Ke.indexOf(li)!==-1||!Oi){$e.resetDragState();return}if($e.delayedDragEnterLogic||($e.delayedDragEnterLogic={}),Object.keys($e.delayedDragEnterLogic).forEach(function(eo){clearTimeout($e.delayedDragEnterLogic[eo])}),Zi.props.eventKey!==Re.props.eventKey&&(at.persist(),$e.delayedDragEnterLogic[Sn]=window.setTimeout(function(){if($e.state.draggingNodeKey!==null){var eo=(0,We.Z)(ye),Be=(0,Ct.Z)(Oe,Re.props.eventKey);Be&&(Be.children||[]).length&&(eo=(0,gn.L0)(ye,Re.props.eventKey)),"expandedKeys"in $e.props||$e.setExpandedKeys(eo),en==null||en(eo,{node:(0,Xe.F)(Re.props),expanded:!0,nativeEvent:at.nativeEvent})}},800)),Zi.props.eventKey===li&&pi===0){$e.resetDragState();return}$e.setState({dragOverNodeKey:to,dropPosition:Nr,dropLevelOffset:pi,dropTargetKey:li,dropContainerKey:xi,dropTargetPos:Gi,dropAllowed:Oi}),pn==null||pn({event:at,node:(0,Xe.F)(Re.props),expandedKeys:ye})},$e.onNodeDragOver=function(at,Re){var Pe=$e.state,ye=Pe.dragChildrenKeys,Oe=Pe.flattenNodes,Ke=Pe.keyEntities,Fe=Pe.expandedKeys,Et=Pe.indent,sn=$e.props,pn=sn.onDragOver,en=sn.allowDrop,wn=sn.direction,hi=(0,bt.Z)($e),Rn=hi.dragNode;if(Rn){var Sn=(0,gn.OM)(at,Rn,Re,Et,$e.dragStartMousePosition,en,Oe,Ke,Fe,wn),Pi=Sn.dropPosition,zi=Sn.dropLevelOffset,Zi=Sn.dropTargetKey,ir=Sn.dropContainerKey,Nr=Sn.dropAllowed,pi=Sn.dropTargetPos,li=Sn.dragOverNodeKey;ye.indexOf(Zi)!==-1||!Nr||(Rn.props.eventKey===Zi&&zi===0?$e.state.dropPosition===null&&$e.state.dropLevelOffset===null&&$e.state.dropTargetKey===null&&$e.state.dropContainerKey===null&&$e.state.dropTargetPos===null&&$e.state.dropAllowed===!1&&$e.state.dragOverNodeKey===null||$e.resetDragState():Pi===$e.state.dropPosition&&zi===$e.state.dropLevelOffset&&Zi===$e.state.dropTargetKey&&ir===$e.state.dropContainerKey&&pi===$e.state.dropTargetPos&&Nr===$e.state.dropAllowed&&li===$e.state.dragOverNodeKey||$e.setState({dropPosition:Pi,dropLevelOffset:zi,dropTargetKey:Zi,dropContainerKey:ir,dropTargetPos:pi,dropAllowed:Nr,dragOverNodeKey:li}),pn==null||pn({event:at,node:(0,Xe.F)(Re.props)}))}},$e.onNodeDragLeave=function(at,Re){$e.currentMouseOverDroppableNodeKey===Re.props.eventKey&&!at.currentTarget.contains(at.relatedTarget)&&($e.resetDragState(),$e.currentMouseOverDroppableNodeKey=null);var Pe=$e.props.onDragLeave;Pe==null||Pe({event:at,node:(0,Xe.F)(Re.props)})},$e.onWindowDragEnd=function(at){$e.onNodeDragEnd(at,null,!0),window.removeEventListener("dragend",$e.onWindowDragEnd)},$e.onNodeDragEnd=function(at,Re){var Pe=$e.props.onDragEnd;$e.setState({dragOverNodeKey:null}),$e.cleanDragState(),Pe==null||Pe({event:at,node:(0,Xe.F)(Re.props)}),$e.dragNode=null,window.removeEventListener("dragend",$e.onWindowDragEnd)},$e.onNodeDrop=function(at,Re){var Pe,ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Oe=$e.state,Ke=Oe.dragChildrenKeys,Fe=Oe.dropPosition,Et=Oe.dropTargetKey,sn=Oe.dropTargetPos,pn=Oe.dropAllowed;if(pn){var en=$e.props.onDrop;if($e.setState({dragOverNodeKey:null}),$e.cleanDragState(),Et!==null){var wn=(0,st.Z)((0,st.Z)({},(0,Xe.H8)(Et,$e.getTreeNodeRequiredProps())),{},{active:((Pe=$e.getActiveItem())===null||Pe===void 0?void 0:Pe.key)===Et,data:(0,Ct.Z)($e.state.keyEntities,Et).node}),hi=Ke.indexOf(Et)!==-1;(0,te.ZP)(!hi,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Rn=(0,gn.yx)(sn),Sn={event:at,node:(0,Xe.F)(wn),dragNode:$e.dragNode?(0,Xe.F)($e.dragNode.props):null,dragNodesKeys:[$e.dragNode.props.eventKey].concat(Ke),dropToGap:Fe!==0,dropPosition:Fe+Number(Rn[Rn.length-1])};ye||en==null||en(Sn),$e.dragNode=null}}},$e.cleanDragState=function(){var at=$e.state.draggingNodeKey;at!==null&&$e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),$e.dragStartMousePosition=null,$e.currentMouseOverDroppableNodeKey=null},$e.triggerExpandActionExpand=function(at,Re){var Pe=$e.state,ye=Pe.expandedKeys,Oe=Pe.flattenNodes,Ke=Re.expanded,Fe=Re.key,Et=Re.isLeaf;if(!(Et||at.shiftKey||at.metaKey||at.ctrlKey)){var sn=Oe.filter(function(en){return en.key===Fe})[0],pn=(0,Xe.F)((0,st.Z)((0,st.Z)({},(0,Xe.H8)(Fe,$e.getTreeNodeRequiredProps())),{},{data:sn.data}));$e.setExpandedKeys(Ke?(0,gn._5)(ye,Fe):(0,gn.L0)(ye,Fe)),$e.onNodeExpand(at,pn)}},$e.onNodeClick=function(at,Re){var Pe=$e.props,ye=Pe.onClick,Oe=Pe.expandAction;Oe==="click"&&$e.triggerExpandActionExpand(at,Re),ye==null||ye(at,Re)},$e.onNodeDoubleClick=function(at,Re){var Pe=$e.props,ye=Pe.onDoubleClick,Oe=Pe.expandAction;Oe==="doubleClick"&&$e.triggerExpandActionExpand(at,Re),ye==null||ye(at,Re)},$e.onNodeSelect=function(at,Re){var Pe=$e.state.selectedKeys,ye=$e.state,Oe=ye.keyEntities,Ke=ye.fieldNames,Fe=$e.props,Et=Fe.onSelect,sn=Fe.multiple,pn=Re.selected,en=Re[Ke.key],wn=!pn;wn?sn?Pe=(0,gn.L0)(Pe,en):Pe=[en]:Pe=(0,gn._5)(Pe,en);var hi=Pe.map(function(Rn){var Sn=(0,Ct.Z)(Oe,Rn);return Sn?Sn.node:null}).filter(function(Rn){return Rn});$e.setUncontrolledState({selectedKeys:Pe}),Et==null||Et(Pe,{event:"select",selected:wn,node:Re,selectedNodes:hi,nativeEvent:at.nativeEvent})},$e.onNodeCheck=function(at,Re,Pe){var ye=$e.state,Oe=ye.keyEntities,Ke=ye.checkedKeys,Fe=ye.halfCheckedKeys,Et=$e.props,sn=Et.checkStrictly,pn=Et.onCheck,en=Re.key,wn,hi={event:"check",node:Re,checked:Pe,nativeEvent:at.nativeEvent};if(sn){var Rn=Pe?(0,gn.L0)(Ke,en):(0,gn._5)(Ke,en),Sn=(0,gn._5)(Fe,en);wn={checked:Rn,halfChecked:Sn},hi.checkedNodes=Rn.map(function(pi){return(0,Ct.Z)(Oe,pi)}).filter(function(pi){return pi}).map(function(pi){return pi.node}),$e.setUncontrolledState({checkedKeys:Rn})}else{var Pi=(0,Zn.S)([].concat((0,We.Z)(Ke),[en]),!0,Oe),zi=Pi.checkedKeys,Zi=Pi.halfCheckedKeys;if(!Pe){var ir=new Set(zi);ir.delete(en);var Nr=(0,Zn.S)(Array.from(ir),{checked:!1,halfCheckedKeys:Zi},Oe);zi=Nr.checkedKeys,Zi=Nr.halfCheckedKeys}wn=zi,hi.checkedNodes=[],hi.checkedNodesPositions=[],hi.halfCheckedKeys=Zi,zi.forEach(function(pi){var li=(0,Ct.Z)(Oe,pi);if(li){var xi=li.node,Gi=li.pos;hi.checkedNodes.push(xi),hi.checkedNodesPositions.push({node:xi,pos:Gi})}}),$e.setUncontrolledState({checkedKeys:zi},!1,{halfCheckedKeys:Zi})}pn==null||pn(wn,hi)},$e.onNodeLoad=function(at){var Re=at.key,Pe=new Promise(function(ye,Oe){$e.setState(function(Ke){var Fe=Ke.loadedKeys,Et=Fe===void 0?[]:Fe,sn=Ke.loadingKeys,pn=sn===void 0?[]:sn,en=$e.props,wn=en.loadData,hi=en.onLoad;if(!wn||Et.indexOf(Re)!==-1||pn.indexOf(Re)!==-1)return null;var Rn=wn(at);return Rn.then(function(){var Sn=$e.state.loadedKeys,Pi=(0,gn.L0)(Sn,Re);hi==null||hi(Pi,{event:"load",node:at}),$e.setUncontrolledState({loadedKeys:Pi}),$e.setState(function(zi){return{loadingKeys:(0,gn._5)(zi.loadingKeys,Re)}}),ye()}).catch(function(Sn){if($e.setState(function(zi){return{loadingKeys:(0,gn._5)(zi.loadingKeys,Re)}}),$e.loadingRetryTimes[Re]=($e.loadingRetryTimes[Re]||0)+1,$e.loadingRetryTimes[Re]>=Wn){var Pi=$e.state.loadedKeys;(0,te.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),$e.setUncontrolledState({loadedKeys:(0,gn.L0)(Pi,Re)}),ye()}Oe(Sn)}),{loadingKeys:(0,gn.L0)(pn,Re)}})});return Pe.catch(function(){}),Pe},$e.onNodeMouseEnter=function(at,Re){var Pe=$e.props.onMouseEnter;Pe==null||Pe({event:at,node:Re})},$e.onNodeMouseLeave=function(at,Re){var Pe=$e.props.onMouseLeave;Pe==null||Pe({event:at,node:Re})},$e.onNodeContextMenu=function(at,Re){var Pe=$e.props.onRightClick;Pe&&(at.preventDefault(),Pe({event:at,node:Re}))},$e.onFocus=function(){var at=$e.props.onFocus;$e.setState({focused:!0});for(var Re=arguments.length,Pe=new Array(Re),ye=0;ye<Re;ye++)Pe[ye]=arguments[ye];at==null||at.apply(void 0,Pe)},$e.onBlur=function(){var at=$e.props.onBlur;$e.setState({focused:!1}),$e.onActiveChange(null);for(var Re=arguments.length,Pe=new Array(Re),ye=0;ye<Re;ye++)Pe[ye]=arguments[ye];at==null||at.apply(void 0,Pe)},$e.getTreeNodeRequiredProps=function(){var at=$e.state,Re=at.expandedKeys,Pe=at.selectedKeys,ye=at.loadedKeys,Oe=at.loadingKeys,Ke=at.checkedKeys,Fe=at.halfCheckedKeys,Et=at.dragOverNodeKey,sn=at.dropPosition,pn=at.keyEntities;return{expandedKeys:Re||[],selectedKeys:Pe||[],loadedKeys:ye||[],loadingKeys:Oe||[],checkedKeys:Ke||[],halfCheckedKeys:Fe||[],dragOverNodeKey:Et,dropPosition:sn,keyEntities:pn}},$e.setExpandedKeys=function(at){var Re=$e.state,Pe=Re.treeData,ye=Re.fieldNames,Oe=(0,Xe.oH)(Pe,at,ye);$e.setUncontrolledState({expandedKeys:at,flattenNodes:Oe},!0)},$e.onNodeExpand=function(at,Re){var Pe=$e.state.expandedKeys,ye=$e.state,Oe=ye.listChanging,Ke=ye.fieldNames,Fe=$e.props,Et=Fe.onExpand,sn=Fe.loadData,pn=Re.expanded,en=Re[Ke.key];if(!Oe){var wn=Pe.indexOf(en),hi=!pn;if((0,te.ZP)(pn&&wn!==-1||!pn&&wn===-1,"Expand state not sync with index check"),hi?Pe=(0,gn.L0)(Pe,en):Pe=(0,gn._5)(Pe,en),$e.setExpandedKeys(Pe),Et==null||Et(Pe,{node:Re,expanded:hi,nativeEvent:at.nativeEvent}),hi&&sn){var Rn=$e.onNodeLoad(Re);Rn&&Rn.then(function(){var Sn=(0,Xe.oH)($e.state.treeData,Pe,Ke);$e.setUncontrolledState({flattenNodes:Sn})}).catch(function(){var Sn=$e.state.expandedKeys,Pi=(0,gn._5)(Sn,en);$e.setExpandedKeys(Pi)})}}},$e.onListChangeStart=function(){$e.setUncontrolledState({listChanging:!0})},$e.onListChangeEnd=function(){setTimeout(function(){$e.setUncontrolledState({listChanging:!1})})},$e.onActiveChange=function(at){var Re=$e.state.activeKey,Pe=$e.props.onActiveChange;Re!==at&&($e.setState({activeKey:at}),at!==null&&$e.scrollTo({key:at}),Pe==null||Pe(at))},$e.getActiveItem=function(){var at=$e.state,Re=at.activeKey,Pe=at.flattenNodes;return Re===null?null:Pe.find(function(ye){var Oe=ye.key;return Oe===Re})||null},$e.offsetActiveKey=function(at){var Re=$e.state,Pe=Re.flattenNodes,ye=Re.activeKey,Oe=Pe.findIndex(function(Et){var sn=Et.key;return sn===ye});Oe===-1&&at<0&&(Oe=Pe.length),Oe=(Oe+at+Pe.length)%Pe.length;var Ke=Pe[Oe];if(Ke){var Fe=Ke.key;$e.onActiveChange(Fe)}else $e.onActiveChange(null)},$e.onKeyDown=function(at){var Re=$e.state,Pe=Re.activeKey,ye=Re.expandedKeys,Oe=Re.checkedKeys,Ke=Re.fieldNames,Fe=$e.props,Et=Fe.onKeyDown,sn=Fe.checkable,pn=Fe.selectable;switch(at.which){case yt.Z.UP:{$e.offsetActiveKey(-1),at.preventDefault();break}case yt.Z.DOWN:{$e.offsetActiveKey(1),at.preventDefault();break}}var en=$e.getActiveItem();if(en&&en.data){var wn=$e.getTreeNodeRequiredProps(),hi=en.data.isLeaf===!1||!!(en.data[Ke.children]||[]).length,Rn=(0,Xe.F)((0,st.Z)((0,st.Z)({},(0,Xe.H8)(Pe,wn)),{},{data:en.data,active:!0}));switch(at.which){case yt.Z.LEFT:{hi&&ye.includes(Pe)?$e.onNodeExpand({},Rn):en.parent&&$e.onActiveChange(en.parent.key),at.preventDefault();break}case yt.Z.RIGHT:{hi&&!ye.includes(Pe)?$e.onNodeExpand({},Rn):en.children&&en.children.length&&$e.onActiveChange(en.children[0].key),at.preventDefault();break}case yt.Z.ENTER:case yt.Z.SPACE:{sn&&!Rn.disabled&&Rn.checkable!==!1&&!Rn.disableCheckbox?$e.onNodeCheck({},Rn,!Oe.includes(Pe)):!sn&&pn&&!Rn.disabled&&Rn.selectable!==!1&&$e.onNodeSelect({},Rn);break}}}Et==null||Et(at)},$e.setUncontrolledState=function(at){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!$e.destroyed){var ye=!1,Oe=!0,Ke={};Object.keys(at).forEach(function(Fe){if(Fe in $e.props){Oe=!1;return}ye=!0,Ke[Fe]=at[Fe]}),ye&&(!Re||Oe)&&$e.setState((0,st.Z)((0,st.Z)({},Ke),Pe))}},$e.scrollTo=function(at){$e.listRef.current.scrollTo(at)},$e}return(0,Me.Z)(ft,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Gt=this.props.activeKey;Gt!==void 0&&Gt!==this.state.activeKey&&(this.setState({activeKey:Gt}),Gt!==null&&this.scrollTo({key:Gt}))}},{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 Gt,Ht=this.state,ht=Ht.focused,at=Ht.flattenNodes,Re=Ht.keyEntities,Pe=Ht.draggingNodeKey,ye=Ht.activeKey,Oe=Ht.dropLevelOffset,Ke=Ht.dropContainerKey,Fe=Ht.dropTargetKey,Et=Ht.dropPosition,sn=Ht.dragOverNodeKey,pn=Ht.indent,en=this.props,wn=en.prefixCls,hi=en.className,Rn=en.style,Sn=en.showLine,Pi=en.focusable,zi=en.tabIndex,Zi=zi===void 0?0:zi,ir=en.selectable,Nr=en.showIcon,pi=en.icon,li=en.switcherIcon,xi=en.draggable,Gi=en.checkable,Oi=en.checkStrictly,to=en.disabled,eo=en.motion,Be=en.loadData,Fi=en.filterTreeNode,wr=en.height,Fn=en.itemHeight,wi=en.virtual,$i=en.titleRender,tr=en.dropIndicatorRender,ei=en.onContextMenu,$n=en.onScroll,zt=en.direction,Vt=en.rootClassName,Qe=en.rootStyle,an=(0,De.Z)(this.props,{aria:!0,data:!0}),dn;return xi&&((0,He.Z)(xi)==="object"?dn=xi:typeof xi=="function"?dn={nodeDraggable:xi}:dn={}),ee.createElement(ce.k.Provider,{value:{prefixCls:wn,selectable:ir,showIcon:Nr,icon:pi,switcherIcon:li,draggable:dn,draggingNodeKey:Pe,checkable:Gi,checkStrictly:Oi,disabled:to,keyEntities:Re,dropLevelOffset:Oe,dropContainerKey:Ke,dropTargetKey:Fe,dropPosition:Et,dragOverNodeKey:sn,indent:pn,direction:zt,dropIndicatorRender:tr,loadData:Be,filterTreeNode:Fi,titleRender:$i,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:mt()(wn,hi,Vt,(Gt={},(0,Te.Z)(Gt,"".concat(wn,"-show-line"),Sn),(0,Te.Z)(Gt,"".concat(wn,"-focused"),ht),(0,Te.Z)(Gt,"".concat(wn,"-active-focused"),ye!==null),Gt)),style:Qe},ee.createElement(Gn,(0,le.Z)({ref:this.listRef,prefixCls:wn,style:Rn,data:at,disabled:to,selectable:ir,checkable:!!Gi,motion:eo,dragging:Pe!==null,height:wr,itemHeight:Fn,virtual:wi,focusable:Pi,focused:ht,tabIndex:Zi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ei,onScroll:$n},this.getTreeNodeRequiredProps(),an))))}}],[{key:"getDerivedStateFromProps",value:function(Gt,Ht){var ht=Ht.prevProps,at={prevProps:Gt};function Re(Pi){return!ht&&Pi in Gt||ht&&ht[Pi]!==Gt[Pi]}var Pe,ye=Ht.fieldNames;if(Re("fieldNames")&&(ye=(0,Xe.w$)(Gt.fieldNames),at.fieldNames=ye),Re("treeData")?Pe=Gt.treeData:Re("children")&&((0,te.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Pe=(0,Xe.zn)(Gt.children)),Pe){at.treeData=Pe;var Oe=(0,Xe.I8)(Pe,{fieldNames:ye});at.keyEntities=(0,st.Z)((0,Te.Z)({},et,Rt),Oe.keyEntities)}var Ke=at.keyEntities||Ht.keyEntities;if(Re("expandedKeys")||ht&&Re("autoExpandParent"))at.expandedKeys=Gt.autoExpandParent||!ht&&Gt.defaultExpandParent?(0,gn.r7)(Gt.expandedKeys,Ke):Gt.expandedKeys;else if(!ht&&Gt.defaultExpandAll){var Fe=(0,st.Z)({},Ke);delete Fe[et],at.expandedKeys=Object.keys(Fe).map(function(Pi){return Fe[Pi].key})}else!ht&&Gt.defaultExpandedKeys&&(at.expandedKeys=Gt.autoExpandParent||Gt.defaultExpandParent?(0,gn.r7)(Gt.defaultExpandedKeys,Ke):Gt.defaultExpandedKeys);if(at.expandedKeys||delete at.expandedKeys,Pe||at.expandedKeys){var Et=(0,Xe.oH)(Pe||Ht.treeData,at.expandedKeys||Ht.expandedKeys,ye);at.flattenNodes=Et}if(Gt.selectable&&(Re("selectedKeys")?at.selectedKeys=(0,gn.BT)(Gt.selectedKeys,Gt):!ht&&Gt.defaultSelectedKeys&&(at.selectedKeys=(0,gn.BT)(Gt.defaultSelectedKeys,Gt))),Gt.checkable){var sn;if(Re("checkedKeys")?sn=(0,gn.E6)(Gt.checkedKeys)||{}:!ht&&Gt.defaultCheckedKeys?sn=(0,gn.E6)(Gt.defaultCheckedKeys)||{}:Pe&&(sn=(0,gn.E6)(Gt.checkedKeys)||{checkedKeys:Ht.checkedKeys,halfCheckedKeys:Ht.halfCheckedKeys}),sn){var pn=sn,en=pn.checkedKeys,wn=en===void 0?[]:en,hi=pn.halfCheckedKeys,Rn=hi===void 0?[]:hi;if(!Gt.checkStrictly){var Sn=(0,Zn.S)(wn,!0,Ke);wn=Sn.checkedKeys,Rn=Sn.halfCheckedKeys}at.checkedKeys=wn,at.halfCheckedKeys=Rn}}return Re("loadedKeys")&&(at.loadedKeys=Gt.loadedKeys),at}}]),ft}(ee.Component);di.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},di.TreeNode=ze.Z;var Kt=di,ln=Kt},35654:function(_n,yn,me){"use strict";me.d(yn,{BT:function(){return ee},E6:function(){return he},L0:function(){return Ge},OM:function(){return te},_5:function(){return Pt},r7:function(){return ve},wA:function(){return mt},yx:function(){return ut}});var le=me(80702),Te=me(62853),He=me(48736),st=me(59301),We=me(39417),ct=me(67841),Me=me(71430),bt=null;function Pt(Ee,Le){if(!Ee)return[];var Ne=Ee.slice(),je=Ne.indexOf(Le);return je>=0&&Ne.splice(je,1),Ne}function Ge(Ee,Le){var Ne=(Ee||[]).slice();return Ne.indexOf(Le)===-1&&Ne.push(Le),Ne}function ut(Ee){return Ee.split("-")}function mt(Ee,Le){var Ne=[],je=(0,ct.Z)(Le,Ee);function ze(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ye.forEach(function(Xe){var lt=Xe.key,Ze=Xe.children;Ne.push(lt),ze(Ze)})}return ze(je.children),Ne}function yt(Ee){if(Ee.parent){var Le=ut(Ee.pos);return Number(Le[Le.length-1])===Ee.parent.children.length-1}return!1}function De(Ee){var Le=ut(Ee.pos);return Number(Le[Le.length-1])===0}function te(Ee,Le,Ne,je,ze,Ye,Xe,lt,Ze,Lt){var rt,Ot=Ee.clientX,wt=Ee.clientY,Dt=Ee.target.getBoundingClientRect(),Wt=Dt.top,Mt=Dt.height,et=(Lt==="rtl"?-1:1)*(((ze==null?void 0:ze.x)||0)-Ot),Ue=(et-12)/je,Rt=(0,ct.Z)(lt,Ne.props.eventKey);if(wt<Wt+Mt/2){var Pn=Xe.findIndex(function(ln){return ln.key===Rt.key}),xn=Pn<=0?0:Pn-1,_t=Xe[xn].key;Rt=(0,ct.Z)(lt,_t)}var qt=Rt.key,cn=Rt,Gn=Rt.key,gn=0,Zn=0;if(!Ze.includes(qt))for(var Ct=0;Ct<Ue&&yt(Rt);Ct+=1)Rt=Rt.parent,Zn+=1;var Wn=Le.props.data,di=Rt.node,Kt=!0;return De(Rt)&&Rt.level===0&&wt<Wt+Mt/2&&Ye({dragNode:Wn,dropNode:di,dropPosition:-1})&&Rt.key===Ne.props.eventKey?gn=-1:(cn.children||[]).length&&Ze.includes(Gn)?Ye({dragNode:Wn,dropNode:di,dropPosition:0})?gn=0:Kt=!1:Zn===0?Ue>-1.5?Ye({dragNode:Wn,dropNode:di,dropPosition:1})?gn=1:Kt=!1:Ye({dragNode:Wn,dropNode:di,dropPosition:0})?gn=0:Ye({dragNode:Wn,dropNode:di,dropPosition:1})?gn=1:Kt=!1:Ye({dragNode:Wn,dropNode:di,dropPosition:1})?gn=1:Kt=!1,{dropPosition:gn,dropLevelOffset:Zn,dropTargetKey:Rt.key,dropTargetPos:Rt.pos,dragOverNodeKey:Gn,dropContainerKey:gn===0?null:((rt=Rt.parent)===null||rt===void 0?void 0:rt.key)||null,dropAllowed:Kt}}function ee(Ee,Le){if(Ee){var Ne=Le.multiple;return Ne?Ee.slice():Ee.length?[Ee[0]]:Ee}}var ce=function(Le){return Le};function se(Ee,Le){if(!Ee)return[];var Ne=Le||{},je=Ne.processProps,ze=je===void 0?ce:je,Ye=Array.isArray(Ee)?Ee:[Ee];return Ye.map(function(Xe){var lt=Xe.children,Ze=_objectWithoutProperties(Xe,bt),Lt=se(lt,Le);return React.createElement(TreeNode,_extends({key:Ze.key},ze(Ze)),Lt)})}function he(Ee){if(!Ee)return null;var Le;if(Array.isArray(Ee))Le={checkedKeys:Ee,halfCheckedKeys:void 0};else if((0,Te.Z)(Ee)==="object")Le={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 Le}function ve(Ee,Le){var Ne=new Set;function je(ze){if(!Ne.has(ze)){var Ye=(0,ct.Z)(Le,ze);if(Ye){Ne.add(ze);var Xe=Ye.parent,lt=Ye.node;lt.disabled||Xe&&je(Xe.key)}}}return(Ee||[]).forEach(function(ze){je(ze)}),(0,le.Z)(Ne)}},90782:function(_n,yn,me){"use strict";me.d(yn,{S:function(){return Me}});var le=me(48736),Te=me(67841);function He(bt,Pt){var Ge=new Set;return bt.forEach(function(ut){Pt.has(ut)||Ge.add(ut)}),Ge}function st(bt){var Pt=bt||{},Ge=Pt.disabled,ut=Pt.disableCheckbox,mt=Pt.checkable;return!!(Ge||ut)||mt===!1}function We(bt,Pt,Ge,ut){for(var mt=new Set(bt),yt=new Set,De=0;De<=Ge;De+=1){var te=Pt.get(De)||new Set;te.forEach(function(he){var ve=he.key,Ee=he.node,Le=he.children,Ne=Le===void 0?[]:Le;mt.has(ve)&&!ut(Ee)&&Ne.filter(function(je){return!ut(je.node)}).forEach(function(je){mt.add(je.key)})})}for(var ee=new Set,ce=Ge;ce>=0;ce-=1){var se=Pt.get(ce)||new Set;se.forEach(function(he){var ve=he.parent,Ee=he.node;if(!(ut(Ee)||!he.parent||ee.has(he.parent.key))){if(ut(he.parent.node)){ee.add(ve.key);return}var Le=!0,Ne=!1;(ve.children||[]).filter(function(je){return!ut(je.node)}).forEach(function(je){var ze=je.key,Ye=mt.has(ze);Le&&!Ye&&(Le=!1),!Ne&&(Ye||yt.has(ze))&&(Ne=!0)}),Le&&mt.add(ve.key),Ne&&yt.add(ve.key),ee.add(ve.key)}})}return{checkedKeys:Array.from(mt),halfCheckedKeys:Array.from(He(yt,mt))}}function ct(bt,Pt,Ge,ut,mt){for(var yt=new Set(bt),De=new Set(Pt),te=0;te<=ut;te+=1){var ee=Ge.get(te)||new Set;ee.forEach(function(ve){var Ee=ve.key,Le=ve.node,Ne=ve.children,je=Ne===void 0?[]:Ne;!yt.has(Ee)&&!De.has(Ee)&&!mt(Le)&&je.filter(function(ze){return!mt(ze.node)}).forEach(function(ze){yt.delete(ze.key)})})}De=new Set;for(var ce=new Set,se=ut;se>=0;se-=1){var he=Ge.get(se)||new Set;he.forEach(function(ve){var Ee=ve.parent,Le=ve.node;if(!(mt(Le)||!ve.parent||ce.has(ve.parent.key))){if(mt(ve.parent.node)){ce.add(Ee.key);return}var Ne=!0,je=!1;(Ee.children||[]).filter(function(ze){return!mt(ze.node)}).forEach(function(ze){var Ye=ze.key,Xe=yt.has(Ye);Ne&&!Xe&&(Ne=!1),!je&&(Xe||De.has(Ye))&&(je=!0)}),Ne||yt.delete(Ee.key),je&&De.add(Ee.key),ce.add(Ee.key)}})}return{checkedKeys:Array.from(yt),halfCheckedKeys:Array.from(He(De,yt))}}function Me(bt,Pt,Ge,ut){var mt=[],yt;ut?yt=ut:yt=st;var De=new Set(bt.filter(function(se){var he=!!(0,Te.Z)(Ge,se);return he||mt.push(se),he})),te=new Map,ee=0;Object.keys(Ge).forEach(function(se){var he=Ge[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)(!mt.length,"Tree missing follow keys: ".concat(mt.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var ce;return Pt===!0?ce=We(De,te,ee,yt):ce=ct(De,Pt.halfCheckedKeys,te,ee,yt),ce}},67841:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return le}});function le(Te,He){return Te[He]}},71430:function(_n,yn,me){"use strict";me.d(yn,{F:function(){return ve},H8:function(){return he},I8:function(){return se},km:function(){return mt},oH:function(){return ee},w$:function(){return yt},zn:function(){return te}});var le=me(62853),Te=me(80702),He=me(77321),st=me(74416),We=me(11592),ct=me(2738),Me=me(48736),bt=me(67841),Pt=["children"];function Ge(Ee,Le){return"".concat(Ee,"-").concat(Le)}function ut(Ee){return Ee&&Ee.type&&Ee.type.isTreeNode}function mt(Ee,Le){return Ee!=null?Ee:Le}function yt(Ee){var Le=Ee||{},Ne=Le.title,je=Le._title,ze=Le.key,Ye=Le.children,Xe=Ne||"title";return{title:Xe,_title:je||[Xe],key:ze||"key",children:Ye||"children"}}function De(Ee,Le){var Ne=new Map;function je(ze){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(ze||[]).forEach(function(Xe){var lt=Xe[Le.key],Ze=Xe[Le.children];warning(lt!=null,"Tree node must have a certain key: [".concat(Ye).concat(lt,"]"));var Lt=String(lt);warning(!Ne.has(Lt)||lt===null||lt===void 0,"Same 'key' exist in the Tree: ".concat(Lt)),Ne.set(Lt,!0),je(Ze,"".concat(Ye).concat(Lt," > "))})}je(Ee)}function te(Ee){function Le(Ne){var je=(0,We.Z)(Ne);return je.map(function(ze){if(!ut(ze))return(0,Me.ZP)(!ze,"Tree/TreeNode can only accept TreeNode as children."),null;var Ye=ze.key,Xe=ze.props,lt=Xe.children,Ze=(0,st.Z)(Xe,Pt),Lt=(0,He.Z)({key:Ye},Ze),rt=Le(lt);return rt.length&&(Lt.children=rt),Lt}).filter(function(ze){return ze})}return Le(Ee)}function ee(Ee,Le,Ne){var je=yt(Ne),ze=je._title,Ye=je.key,Xe=je.children,lt=new Set(Le===!0?[]:Le),Ze=[];function Lt(rt){var Ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return rt.map(function(wt,Dt){for(var Wt=Ge(Ot?Ot.pos:"0",Dt),Mt=mt(wt[Ye],Wt),et,Ue=0;Ue<ze.length;Ue+=1){var Rt=ze[Ue];if(wt[Rt]!==void 0){et=wt[Rt];break}}var Pn=(0,He.Z)((0,He.Z)({},(0,ct.Z)(wt,[].concat((0,Te.Z)(ze),[Ye,Xe]))),{},{title:et,key:Mt,parent:Ot,pos:Wt,children:null,data:wt,isStart:[].concat((0,Te.Z)(Ot?Ot.isStart:[]),[Dt===0]),isEnd:[].concat((0,Te.Z)(Ot?Ot.isEnd:[]),[Dt===rt.length-1])});return Ze.push(Pn),Le===!0||lt.has(Mt)?Pn.children=Lt(wt[Xe]||[],Pn):Pn.children=[],Pn})}return Lt(Ee),Ze}function ce(Ee,Le,Ne){var je={};(0,le.Z)(Ne)==="object"?je=Ne:je={externalGetKey:Ne},je=je||{};var ze=je,Ye=ze.childrenPropName,Xe=ze.externalGetKey,lt=ze.fieldNames,Ze=yt(lt),Lt=Ze.key,rt=Ze.children,Ot=Ye||rt,wt;Xe?typeof Xe=="string"?wt=function(Mt){return Mt[Xe]}:typeof Xe=="function"&&(wt=function(Mt){return Xe(Mt)}):wt=function(Mt,et){return mt(Mt[Lt],et)};function Dt(Wt,Mt,et,Ue){var Rt=Wt?Wt[Ot]:Ee,Pn=Wt?Ge(et.pos,Mt):"0",xn=Wt?[].concat((0,Te.Z)(Ue),[Wt]):[];if(Wt){var _t=wt(Wt,Pn),qt={node:Wt,index:Mt,pos:Pn,key:_t,parentPos:et.node?et.pos:null,level:et.level+1,nodes:xn};Le(qt)}Rt&&Rt.forEach(function(cn,Gn){Dt(cn,Gn,{node:Wt,pos:Pn,level:et?et.level+1:-1},xn)})}Dt(null)}function se(Ee){var Le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ne=Le.initWrapper,je=Le.processEntity,ze=Le.onProcessFinished,Ye=Le.externalGetKey,Xe=Le.childrenPropName,lt=Le.fieldNames,Ze=arguments.length>2?arguments[2]:void 0,Lt=Ye||Ze,rt={},Ot={},wt={posEntities:rt,keyEntities:Ot};return Ne&&(wt=Ne(wt)||wt),ce(Ee,function(Dt){var Wt=Dt.node,Mt=Dt.index,et=Dt.pos,Ue=Dt.key,Rt=Dt.parentPos,Pn=Dt.level,xn=Dt.nodes,_t={node:Wt,nodes:xn,index:Mt,key:Ue,pos:et,level:Pn},qt=mt(Ue,et);rt[et]=_t,Ot[qt]=_t,_t.parent=rt[Rt],_t.parent&&(_t.parent.children=_t.parent.children||[],_t.parent.children.push(_t)),je&&je(_t,wt)},{externalGetKey:Lt,childrenPropName:Xe,fieldNames:lt}),ze&&ze(wt),wt}function he(Ee,Le){var Ne=Le.expandedKeys,je=Le.selectedKeys,ze=Le.loadedKeys,Ye=Le.loadingKeys,Xe=Le.checkedKeys,lt=Le.halfCheckedKeys,Ze=Le.dragOverNodeKey,Lt=Le.dropPosition,rt=Le.keyEntities,Ot=(0,bt.Z)(rt,Ee),wt={eventKey:Ee,expanded:Ne.indexOf(Ee)!==-1,selected:je.indexOf(Ee)!==-1,loaded:ze.indexOf(Ee)!==-1,loading:Ye.indexOf(Ee)!==-1,checked:Xe.indexOf(Ee)!==-1,halfChecked:lt.indexOf(Ee)!==-1,pos:String(Ot?Ot.pos:""),dragOver:Ze===Ee&&Lt===0,dragOverGapTop:Ze===Ee&&Lt===-1,dragOverGapBottom:Ze===Ee&&Lt===1};return wt}function ve(Ee){var Le=Ee.data,Ne=Ee.expanded,je=Ee.selected,ze=Ee.checked,Ye=Ee.loaded,Xe=Ee.loading,lt=Ee.halfChecked,Ze=Ee.dragOver,Lt=Ee.dragOverGapTop,rt=Ee.dragOverGapBottom,Ot=Ee.pos,wt=Ee.active,Dt=Ee.eventKey,Wt=(0,He.Z)((0,He.Z)({},Le),{},{expanded:Ne,selected:je,checked:ze,loaded:Ye,loading:Xe,halfChecked:lt,dragOver:Ze,dragOverGapTop:Lt,dragOverGapBottom:rt,pos:Ot,active:wt,key:Dt});return"props"in Wt||Object.defineProperty(Wt,"props",{get:function(){return(0,Me.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(_n,yn,me){"use strict";me.d(yn,{Z:function(){return Te}});var le=me(4676);function Te(He,st,We,ct){var Me=le.unstable_batchedUpdates?function(Pt){le.unstable_batchedUpdates(We,Pt)}:We;return He!=null&&He.addEventListener&&He.addEventListener(st,Me,ct),{remove:function(){He!=null&&He.removeEventListener&&He.removeEventListener(st,Me,ct)}}}},55468:function(_n,yn,me){"use strict";me.d(yn,{g1:function(){return ut},os:function(){return yt}});var le=/margin|padding|width|height|max|min|offset/,Te={left:!0,top:!0},He={cssFloat:1,styleFloat:1,float:1};function st(De){return De.nodeType===1?De.ownerDocument.defaultView.getComputedStyle(De,null):{}}function We(De,te,ee){if(te=te.toLowerCase(),ee==="auto"){if(te==="height")return De.offsetHeight;if(te==="width")return De.offsetWidth}return te in Te||(Te[te]=le.test(te)),Te[te]?parseFloat(ee)||0:ee}function ct(De,te){var ee=arguments.length,ce=st(De);return te=He[te]?"cssFloat"in De.style?"cssFloat":"styleFloat":te,ee===1?ce:We(De,te,ce[te]||De.style[te])}function Me(De,te,ee){var ce=arguments.length;if(te=He[te]?"cssFloat"in De.style?"cssFloat":"styleFloat":te,ce===3)return typeof ee=="number"&&le.test(te)&&(ee="".concat(ee,"px")),De.style[te]=ee,ee;for(var se in te)te.hasOwnProperty(se)&&Me(De,se,te[se]);return st(De)}function bt(De){return De===document.body?document.documentElement.clientWidth:De.offsetWidth}function Pt(De){return De===document.body?window.innerHeight||document.documentElement.clientHeight:De.offsetHeight}function Ge(){var De=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),te=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:De,height:te}}function ut(){var De=document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight;return{width:De,height:te}}function mt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function yt(De){var te=De.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(_n,yn,me){"use strict";me.d(yn,{G:function(){return st}});var le=me(47273),Te=function(ct){if((0,le.Z)()&&window.document.documentElement){var Me=Array.isArray(ct)?ct:[ct],bt=window.document.documentElement;return Me.some(function(Pt){return Pt in bt.style})}return!1},He=function(ct,Me){if(!Te(ct))return!1;var bt=document.createElement("div"),Pt=bt.style[ct];return bt.style[ct]=Me,bt.style[ct]!==Pt};function st(We,ct){return!Array.isArray(We)&&ct!==void 0?He(We,ct):Te(We)}},45680:function(_n,yn,me){"use strict";me.d(yn,{Z:function(){return di}});var le=me(72308),Te=me(62853),He=me(77321),st=me(49618),We=me(52487),ct=me(74416),Me=me(92310),bt=me.n(Me),Pt=me(29301),Ge=me(70425),ut=me(34280),mt=me(59301),yt=me(4676),De=mt.forwardRef(function(Kt,ln){var $t=Kt.height,Tt=Kt.offsetY,ft=Kt.offsetX,$e=Kt.children,Gt=Kt.prefixCls,Ht=Kt.onInnerResize,ht=Kt.innerProps,at=Kt.rtl,Re=Kt.extra,Pe={},ye={display:"flex",flexDirection:"column"};return Tt!==void 0&&(Pe={height:$t,position:"relative",overflow:"hidden"},ye=(0,He.Z)((0,He.Z)({},ye),{},(0,st.Z)((0,st.Z)((0,st.Z)((0,st.Z)((0,st.Z)({transform:"translateY(".concat(Tt,"px)")},at?"marginRight":"marginLeft",-ft),"position","absolute"),"left",0),"right",0),"top",0))),mt.createElement("div",{style:Pe},mt.createElement(Pt.Z,{onResize:function(Ke){var Fe=Ke.offsetHeight;Fe&&Ht&&Ht()}},mt.createElement("div",(0,le.Z)({style:ye,className:bt()((0,st.Z)({},"".concat(Gt,"-holder-inner"),Gt)),ref:ln},ht),$e,Re)))});De.displayName="Filler";var te=De;function ee(Kt){var ln=Kt.children,$t=Kt.setRef,Tt=mt.useCallback(function(ft){$t(ft)},[]);return mt.cloneElement(ln,{ref:Tt})}function ce(Kt,ln,$t,Tt,ft,$e,Gt,Ht){var ht=Ht.getKey;return Kt.slice(ln,$t+1).map(function(at,Re){var Pe=ln+Re,ye=Gt(at,Pe,{style:{width:Tt},offsetX:ft}),Oe=ht(at);return mt.createElement(ee,{key:Oe,setRef:function(Fe){return $e(at,Fe)}},ye)})}function se(Kt,ln,$t,Tt){var ft=$t-Kt,$e=ln-$t,Gt=Math.min(ft,$e)*2;if(Tt<=Gt){var Ht=Math.floor(Tt/2);return Tt%2?$t+Ht+1:$t-Ht}return ft>$e?$t-(Tt-$e):$t+(Tt-ft)}function he(Kt,ln,$t){var Tt=Kt.length,ft=ln.length,$e,Gt;if(Tt===0&&ft===0)return null;Tt<ft?($e=Kt,Gt=ln):($e=ln,Gt=Kt);var Ht={__EMPTY_ITEM__:!0};function ht(Ke){return Ke!==void 0?$t(Ke):Ht}for(var at=null,Re=Math.abs(Tt-ft)!==1,Pe=0;Pe<Gt.length;Pe+=1){var ye=ht($e[Pe]),Oe=ht(Gt[Pe]);if(ye!==Oe){at=Pe,Re=Re||ye!==ht(Gt[Pe+1]);break}}return at===null?null:{index:at,multiple:Re}}function ve(Kt,ln,$t){var Tt=mt.useState(Kt),ft=(0,We.Z)(Tt,2),$e=ft[0],Gt=ft[1],Ht=mt.useState(null),ht=(0,We.Z)(Ht,2),at=ht[0],Re=ht[1];return mt.useEffect(function(){var Pe=he($e||[],Kt||[],ln);(Pe==null?void 0:Pe.index)!==void 0&&($t==null||$t(Pe.index),Re(Kt[Pe.index])),Gt(Kt)},[Kt]),[at]}var Ee=me(16089),Le=(typeof navigator=="undefined"?"undefined":(0,Te.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ne=Le,je=function(Kt,ln,$t,Tt){var ft=(0,mt.useRef)(!1),$e=(0,mt.useRef)(null);function Gt(){clearTimeout($e.current),ft.current=!0,$e.current=setTimeout(function(){ft.current=!1},50)}var Ht=(0,mt.useRef)({top:Kt,bottom:ln,left:$t,right:Tt});return Ht.current.top=Kt,Ht.current.bottom=ln,Ht.current.left=$t,Ht.current.right=Tt,function(ht,at){var Re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Pe=ht?at<0&&Ht.current.left||at>0&&Ht.current.right:at<0&&Ht.current.top||at>0&&Ht.current.bottom;return Re&&Pe?(clearTimeout($e.current),ft.current=!1):(!Pe||ft.current)&&Gt(),!ft.current&&Pe}};function ze(Kt,ln,$t,Tt,ft,$e,Gt){var Ht=(0,mt.useRef)(0),ht=(0,mt.useRef)(null),at=(0,mt.useRef)(null),Re=(0,mt.useRef)(!1),Pe=je(ln,$t,Tt,ft);function ye(pn,en){if(Ee.Z.cancel(ht.current),!Pe(!1,en)){var wn=pn;if(!wn._virtualHandled)wn._virtualHandled=!0;else return;Ht.current+=en,at.current=en,Ne||wn.preventDefault(),ht.current=(0,Ee.Z)(function(){var hi=Re.current?10:1;Gt(Ht.current*hi,!1),Ht.current=0})}}function Oe(pn,en){Gt(en,!0),Ne||pn.preventDefault()}var Ke=(0,mt.useRef)(null),Fe=(0,mt.useRef)(null);function Et(pn){if(Kt){Ee.Z.cancel(Fe.current),Fe.current=(0,Ee.Z)(function(){Ke.current=null},2);var en=pn.deltaX,wn=pn.deltaY,hi=pn.shiftKey,Rn=en,Sn=wn;(Ke.current==="sx"||!Ke.current&&hi&&wn&&!en)&&(Rn=wn,Sn=0,Ke.current="sx");var Pi=Math.abs(Rn),zi=Math.abs(Sn);Ke.current===null&&(Ke.current=$e&&Pi>zi?"x":"y"),Ke.current==="y"?ye(pn,Sn):Oe(pn,Rn)}}function sn(pn){Kt&&(Re.current=pn.detail===at.current)}return[Et,sn]}function Ye(Kt,ln,$t,Tt){var ft=mt.useMemo(function(){return[new Map,[]]},[Kt,$t.id,Tt]),$e=(0,We.Z)(ft,2),Gt=$e[0],Ht=$e[1],ht=function(Re){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Re,ye=Gt.get(Re),Oe=Gt.get(Pe);if(ye===void 0||Oe===void 0)for(var Ke=Kt.length,Fe=Ht.length;Fe<Ke;Fe+=1){var Et,sn=Kt[Fe],pn=ln(sn);Gt.set(pn,Fe);var en=(Et=$t.get(pn))!==null&&Et!==void 0?Et:Tt;if(Ht[Fe]=(Ht[Fe-1]||0)+en,pn===Re&&(ye=Fe),pn===Pe&&(Oe=Fe),ye!==void 0&&Oe!==void 0)break}return{top:Ht[ye-1]||0,bottom:Ht[Oe]}};return ht}var Xe=me(96949),lt=me(55090),Ze=function(){function Kt(){(0,Xe.Z)(this,Kt),(0,st.Z)(this,"maps",void 0),(0,st.Z)(this,"id",0),(0,st.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,lt.Z)(Kt,[{key:"set",value:function($t,Tt){this.maps[$t]=Tt,this.id+=1,this.diffKeys.add($t)}},{key:"get",value:function($t){return this.maps[$t]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Kt}(),Lt=Ze;function rt(Kt){var ln=parseFloat(Kt);return isNaN(ln)?0:ln}function Ot(Kt,ln,$t){var Tt=mt.useState(0),ft=(0,We.Z)(Tt,2),$e=ft[0],Gt=ft[1],Ht=(0,mt.useRef)(new Map),ht=(0,mt.useRef)(new Lt),at=(0,mt.useRef)(0);function Re(){at.current+=1}function Pe(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Re();var Ke=function(){var sn=!1;Ht.current.forEach(function(pn,en){if(pn&&pn.offsetParent){var wn=pn.offsetHeight,hi=getComputedStyle(pn),Rn=hi.marginTop,Sn=hi.marginBottom,Pi=rt(Rn),zi=rt(Sn),Zi=wn+Pi+zi;ht.current.get(en)!==Zi&&(ht.current.set(en,Zi),sn=!0)}}),sn&&Gt(function(pn){return pn+1})};if(Oe)Ke();else{at.current+=1;var Fe=at.current;Promise.resolve().then(function(){Fe===at.current&&Ke()})}}function ye(Oe,Ke){var Fe=Kt(Oe),Et=Ht.current.get(Fe);Ke?(Ht.current.set(Fe,Ke),Pe()):Ht.current.delete(Fe),!Et!=!Ke&&(Ke?ln==null||ln(Oe):$t==null||$t(Oe))}return(0,mt.useEffect)(function(){return Re},[]),[ye,Pe,ht.current,$e]}var wt=14/15;function Dt(Kt,ln,$t){var Tt=(0,mt.useRef)(!1),ft=(0,mt.useRef)(0),$e=(0,mt.useRef)(0),Gt=(0,mt.useRef)(null),Ht=(0,mt.useRef)(null),ht,at=function(Oe){if(Tt.current){var Ke=Math.ceil(Oe.touches[0].pageX),Fe=Math.ceil(Oe.touches[0].pageY),Et=ft.current-Ke,sn=$e.current-Fe,pn=Math.abs(Et)>Math.abs(sn);pn?ft.current=Ke:$e.current=Fe;var en=$t(pn,pn?Et:sn,!1,Oe);en&&Oe.preventDefault(),clearInterval(Ht.current),en&&(Ht.current=setInterval(function(){pn?Et*=wt:sn*=wt;var wn=Math.floor(pn?Et:sn);(!$t(pn,wn,!0)||Math.abs(wn)<=.1)&&clearInterval(Ht.current)},16))}},Re=function(){Tt.current=!1,ht()},Pe=function(Oe){ht(),Oe.touches.length===1&&!Tt.current&&(Tt.current=!0,ft.current=Math.ceil(Oe.touches[0].pageX),$e.current=Math.ceil(Oe.touches[0].pageY),Gt.current=Oe.target,Gt.current.addEventListener("touchmove",at,{passive:!1}),Gt.current.addEventListener("touchend",Re,{passive:!0}))};ht=function(){Gt.current&&(Gt.current.removeEventListener("touchmove",at),Gt.current.removeEventListener("touchend",Re))},(0,ut.Z)(function(){return Kt&&ln.current.addEventListener("touchstart",Pe,{passive:!0}),function(){var ye;(ye=ln.current)===null||ye===void 0||ye.removeEventListener("touchstart",Pe),ht(),clearInterval(Ht.current)}},[Kt])}function Wt(Kt){return Math.floor(Math.pow(Kt,.5))}function Mt(Kt,ln){var $t="touches"in Kt?Kt.touches[0]:Kt;return $t[ln?"pageX":"pageY"]-window[ln?"scrollX":"scrollY"]}function et(Kt,ln,$t){mt.useEffect(function(){var Tt=ln.current;if(Kt&&Tt){var ft=!1,$e,Gt,Ht=function(){Ee.Z.cancel($e)},ht=function ye(){Ht(),$e=(0,Ee.Z)(function(){$t(Gt),ye()})},at=function(Oe){if(!(Oe.target.draggable||Oe.button!==0)){var Ke=Oe;Ke._virtualHandled||(Ke._virtualHandled=!0,ft=!0)}},Re=function(){ft=!1,Ht()},Pe=function(Oe){if(ft){var Ke=Mt(Oe,!1),Fe=Tt.getBoundingClientRect(),Et=Fe.top,sn=Fe.bottom;if(Ke<=Et){var pn=Et-Ke;Gt=-Wt(pn),ht()}else if(Ke>=sn){var en=Ke-sn;Gt=Wt(en),ht()}else Ht()}};return Tt.addEventListener("mousedown",at),Tt.ownerDocument.addEventListener("mouseup",Re),Tt.ownerDocument.addEventListener("mousemove",Pe),function(){Tt.removeEventListener("mousedown",at),Tt.ownerDocument.removeEventListener("mouseup",Re),Tt.ownerDocument.removeEventListener("mousemove",Pe),Ht()}}},[Kt])}var Ue=10;function Rt(Kt,ln,$t,Tt,ft,$e,Gt,Ht){var ht=mt.useRef(),at=mt.useState(null),Re=(0,We.Z)(at,2),Pe=Re[0],ye=Re[1];return(0,ut.Z)(function(){if(Pe&&Pe.times<Ue){if(!Kt.current){ye(function(eo){return(0,He.Z)({},eo)});return}$e();var Oe=Pe.targetAlign,Ke=Pe.originAlign,Fe=Pe.index,Et=Pe.offset,sn=Kt.current.clientHeight,pn=!1,en=Oe,wn=null;if(sn){for(var hi=Oe||Ke,Rn=0,Sn=0,Pi=0,zi=Math.min(ln.length-1,Fe),Zi=0;Zi<=zi;Zi+=1){var ir=ft(ln[Zi]);Sn=Rn;var Nr=$t.get(ir);Pi=Sn+(Nr===void 0?Tt:Nr),Rn=Pi}for(var pi=hi==="top"?Et:sn-Et,li=zi;li>=0;li-=1){var xi=ft(ln[li]),Gi=$t.get(xi);if(Gi===void 0){pn=!0;break}if(pi-=Gi,pi<=0)break}switch(hi){case"top":wn=Sn-Et;break;case"bottom":wn=Pi-sn+Et;break;default:{var Oi=Kt.current.scrollTop,to=Oi+sn;Sn<Oi?en="top":Pi>to&&(en="bottom")}}wn!==null&&Gt(wn),wn!==Pe.lastTop&&(pn=!0)}pn&&ye((0,He.Z)((0,He.Z)({},Pe),{},{times:Pe.times+1,targetAlign:en,lastTop:wn}))}},[Pe,Kt.current]),function(Oe){if(Oe==null){Ht();return}if(Ee.Z.cancel(ht.current),typeof Oe=="number")Gt(Oe);else if(Oe&&(0,Te.Z)(Oe)==="object"){var Ke,Fe=Oe.align;"index"in Oe?Ke=Oe.index:Ke=ln.findIndex(function(pn){return ft(pn)===Oe.key});var Et=Oe.offset,sn=Et===void 0?0:Et;ye({times:0,index:Ke,offset:sn,originAlign:Fe})}}}var Pn=mt.forwardRef(function(Kt,ln){var $t=Kt.prefixCls,Tt=Kt.rtl,ft=Kt.scrollOffset,$e=Kt.scrollRange,Gt=Kt.onStartMove,Ht=Kt.onStopMove,ht=Kt.onScroll,at=Kt.horizontal,Re=Kt.spinSize,Pe=Kt.containerSize,ye=Kt.style,Oe=Kt.thumbStyle,Ke=Kt.showScrollBar,Fe=mt.useState(!1),Et=(0,We.Z)(Fe,2),sn=Et[0],pn=Et[1],en=mt.useState(null),wn=(0,We.Z)(en,2),hi=wn[0],Rn=wn[1],Sn=mt.useState(null),Pi=(0,We.Z)(Sn,2),zi=Pi[0],Zi=Pi[1],ir=!Tt,Nr=mt.useRef(),pi=mt.useRef(),li=mt.useState(Ke),xi=(0,We.Z)(li,2),Gi=xi[0],Oi=xi[1],to=mt.useRef(),eo=function(){Ke===!0||Ke===!1||(clearTimeout(to.current),Oi(!0),to.current=setTimeout(function(){Oi(!1)},3e3))},Be=$e-Pe||0,Fi=Pe-Re||0,wr=mt.useMemo(function(){if(ft===0||Be===0)return 0;var Qe=ft/Be;return Qe*Fi},[ft,Be,Fi]),Fn=function(an){an.stopPropagation(),an.preventDefault()},wi=mt.useRef({top:wr,dragging:sn,pageY:hi,startTop:zi});wi.current={top:wr,dragging:sn,pageY:hi,startTop:zi};var $i=function(an){pn(!0),Rn(Mt(an,at)),Zi(wi.current.top),Gt(),an.stopPropagation(),an.preventDefault()};mt.useEffect(function(){var Qe=function(dt){dt.preventDefault()},an=Nr.current,dn=pi.current;return an.addEventListener("touchstart",Qe,{passive:!1}),dn.addEventListener("touchstart",$i,{passive:!1}),function(){an.removeEventListener("touchstart",Qe),dn.removeEventListener("touchstart",$i)}},[]);var tr=mt.useRef();tr.current=Be;var ei=mt.useRef();ei.current=Fi,mt.useEffect(function(){if(sn){var Qe,an=function(dt){var nn=wi.current,vn=nn.dragging,zn=nn.pageY,qn=nn.startTop;Ee.Z.cancel(Qe);var Ft=Nr.current.getBoundingClientRect(),Bn=Pe/(at?Ft.width:Ft.height);if(vn){var Kn=(Mt(dt,at)-zn)*Bn,Ci=qn;!ir&&at?Ci-=Kn:Ci+=Kn;var En=tr.current,un=ei.current,bn=un?Ci/un:0,Ei=Math.ceil(bn*En);Ei=Math.max(Ei,0),Ei=Math.min(Ei,En),Qe=(0,Ee.Z)(function(){ht(Ei,at)})}},dn=function(){pn(!1),Ht()};return window.addEventListener("mousemove",an,{passive:!0}),window.addEventListener("touchmove",an,{passive:!0}),window.addEventListener("mouseup",dn,{passive:!0}),window.addEventListener("touchend",dn,{passive:!0}),function(){window.removeEventListener("mousemove",an),window.removeEventListener("touchmove",an),window.removeEventListener("mouseup",dn),window.removeEventListener("touchend",dn),Ee.Z.cancel(Qe)}}},[sn]),mt.useEffect(function(){return eo(),function(){clearTimeout(to.current)}},[ft]),mt.useImperativeHandle(ln,function(){return{delayHidden:eo}});var $n="".concat($t,"-scrollbar"),zt={position:"absolute",visibility:Gi?null:"hidden"},Vt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return at?(zt.height=8,zt.left=0,zt.right=0,zt.bottom=0,Vt.height="100%",Vt.width=Re,ir?Vt.left=wr:Vt.right=wr):(zt.width=8,zt.top=0,zt.bottom=0,ir?zt.right=0:zt.left=0,Vt.width="100%",Vt.height=Re,Vt.top=wr),mt.createElement("div",{ref:Nr,className:bt()($n,(0,st.Z)((0,st.Z)((0,st.Z)({},"".concat($n,"-horizontal"),at),"".concat($n,"-vertical"),!at),"".concat($n,"-visible"),Gi)),style:(0,He.Z)((0,He.Z)({},zt),ye),onMouseDown:Fn,onMouseMove:eo},mt.createElement("div",{ref:pi,className:bt()("".concat($n,"-thumb"),(0,st.Z)({},"".concat($n,"-thumb-moving"),sn)),style:(0,He.Z)((0,He.Z)({},Vt),Oe),onMouseDown:$i}))}),xn=Pn,_t=20;function qt(){var Kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$t=Kt/ln*Kt;return isNaN($t)&&($t=0),$t=Math.max($t,_t),Math.floor($t)}var cn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Gn=[],gn={overflowY:"auto",overflowAnchor:"none"};function Zn(Kt,ln){var $t=Kt.prefixCls,Tt=$t===void 0?"rc-virtual-list":$t,ft=Kt.className,$e=Kt.height,Gt=Kt.itemHeight,Ht=Kt.fullHeight,ht=Ht===void 0?!0:Ht,at=Kt.style,Re=Kt.data,Pe=Kt.children,ye=Kt.itemKey,Oe=Kt.virtual,Ke=Kt.direction,Fe=Kt.scrollWidth,Et=Kt.component,sn=Et===void 0?"div":Et,pn=Kt.onScroll,en=Kt.onVirtualScroll,wn=Kt.onVisibleChange,hi=Kt.innerProps,Rn=Kt.extraRender,Sn=Kt.styles,Pi=Kt.showScrollBar,zi=Pi===void 0?"optional":Pi,Zi=(0,ct.Z)(Kt,cn),ir=mt.useCallback(function(Lo){return typeof ye=="function"?ye(Lo):Lo==null?void 0:Lo[ye]},[ye]),Nr=Ot(ir,null,null),pi=(0,We.Z)(Nr,4),li=pi[0],xi=pi[1],Gi=pi[2],Oi=pi[3],to=!!(Oe!==!1&&$e&&Gt),eo=mt.useMemo(function(){return Object.values(Gi.maps).reduce(function(Lo,po){return Lo+po},0)},[Gi.id,Gi.maps]),Be=to&&Re&&(Math.max(Gt*Re.length,eo)>$e||!!Fe),Fi=Ke==="rtl",wr=bt()(Tt,(0,st.Z)({},"".concat(Tt,"-rtl"),Fi),ft),Fn=Re||Gn,wi=(0,mt.useRef)(),$i=(0,mt.useRef)(),tr=(0,mt.useRef)(),ei=(0,mt.useState)(0),$n=(0,We.Z)(ei,2),zt=$n[0],Vt=$n[1],Qe=(0,mt.useState)(0),an=(0,We.Z)(Qe,2),dn=an[0],Nt=an[1],dt=(0,mt.useState)(!1),nn=(0,We.Z)(dt,2),vn=nn[0],zn=nn[1],qn=function(){zn(!0)},Ft=function(){zn(!1)},Bn={getKey:ir};function Kn(Lo){Vt(function(po){var la;typeof Lo=="function"?la=Lo(po):la=Lo;var Eo=pr(la);return wi.current.scrollTop=Eo,Eo})}var Ci=(0,mt.useRef)({start:0,end:Fn.length}),En=(0,mt.useRef)(),un=ve(Fn,ir),bn=(0,We.Z)(un,1),Ei=bn[0];En.current=Ei;var Ni=mt.useMemo(function(){if(!to)return{scrollHeight:void 0,start:0,end:Fn.length-1,offset:void 0};if(!Be){var Lo;return{scrollHeight:((Lo=$i.current)===null||Lo===void 0?void 0:Lo.offsetHeight)||0,start:0,end:Fn.length-1,offset:void 0}}for(var po=0,la,Eo,Na,os=Fn.length,xo=0;xo<os;xo+=1){var Yr=Fn[xo],vi=ir(Yr),no=Gi.get(vi),io=po+(no===void 0?Gt:no);io>=zt&&la===void 0&&(la=xo,Eo=po),io>zt+$e&&Na===void 0&&(Na=xo),po=io}return la===void 0&&(la=0,Eo=0,Na=Math.ceil($e/Gt)),Na===void 0&&(Na=Fn.length-1),Na=Math.min(Na+1,Fn.length-1),{scrollHeight:po,start:la,end:Na,offset:Eo}},[Be,to,zt,Fn,Oi,$e]),mi=Ni.scrollHeight,Di=Ni.start,Ai=Ni.end,gr=Ni.offset;Ci.current.start=Di,Ci.current.end=Ai,mt.useLayoutEffect(function(){var Lo=Gi.getRecord();if(Lo.size===1){var po=Array.from(Lo)[0],la=Fn[Di];if(la){var Eo=ir(la);if(Eo===po){var Na=Gi.get(po),os=Na-Gt;Kn(function(xo){return xo+os})}}}Gi.resetRecord()},[mi]);var Or=mt.useState({width:0,height:$e}),Hr=(0,We.Z)(Or,2),jn=Hr[0],Po=Hr[1],Wr=function(po){Po({width:po.offsetWidth,height:po.offsetHeight})},ro=(0,mt.useRef)(),Mn=(0,mt.useRef)(),ii=mt.useMemo(function(){return qt(jn.width,Fe)},[jn.width,Fe]),Hi=mt.useMemo(function(){return qt(jn.height,mi)},[jn.height,mi]),xr=mi-$e,qi=(0,mt.useRef)(xr);qi.current=xr;function pr(Lo){var po=Lo;return Number.isNaN(qi.current)||(po=Math.min(po,qi.current)),po=Math.max(po,0),po}var Vr=zt<=0,jr=zt>=xr,kr=dn<=0,Kr=dn>=Fe,Yn=je(Vr,jr,kr,Kr),Ho=function(){return{x:Fi?-dn:dn,y:zt}},Xn=(0,mt.useRef)(Ho()),Ao=(0,Ge.useEvent)(function(Lo){if(en){var po=(0,He.Z)((0,He.Z)({},Ho()),Lo);(Xn.current.x!==po.x||Xn.current.y!==po.y)&&(en(po),Xn.current=po)}});function Qo(Lo,po){var la=Lo;po?((0,yt.flushSync)(function(){Nt(la)}),Ao()):Kn(la)}function nr(Lo){var po=Lo.currentTarget.scrollTop;po!==zt&&Kn(po),pn==null||pn(Lo),Ao()}var qo=function(po){var la=po,Eo=Fe?Fe-jn.width:0;return la=Math.max(la,0),la=Math.min(la,Eo),la},Go=(0,Ge.useEvent)(function(Lo,po){po?((0,yt.flushSync)(function(){Nt(function(la){var Eo=la+(Fi?-Lo:Lo);return qo(Eo)})}),Ao()):Kn(function(la){var Eo=la+Lo;return Eo})}),Br=ze(to,Vr,jr,kr,Kr,!!Fe,Go),Er=(0,We.Z)(Br,2),mo=Er[0],Yo=Er[1];Dt(to,wi,function(Lo,po,la,Eo){var Na=Eo;return Yn(Lo,po,la)?!1:!Na||!Na._virtualHandled?(Na&&(Na._virtualHandled=!0),mo({preventDefault:function(){},deltaX:Lo?po:0,deltaY:Lo?0:po}),!0):!1}),et(Be,wi,function(Lo){Kn(function(po){return po+Lo})}),(0,ut.Z)(function(){function Lo(la){var Eo=Vr&&la.detail<0,Na=jr&&la.detail>0;to&&!Eo&&!Na&&la.preventDefault()}var po=wi.current;return po.addEventListener("wheel",mo,{passive:!1}),po.addEventListener("DOMMouseScroll",Yo,{passive:!0}),po.addEventListener("MozMousePixelScroll",Lo,{passive:!1}),function(){po.removeEventListener("wheel",mo),po.removeEventListener("DOMMouseScroll",Yo),po.removeEventListener("MozMousePixelScroll",Lo)}},[to,Vr,jr]),(0,ut.Z)(function(){if(Fe){var Lo=qo(dn);Nt(Lo),Ao({x:Lo})}},[jn.width,Fe]);var Ki=function(){var po,la;(po=ro.current)===null||po===void 0||po.delayHidden(),(la=Mn.current)===null||la===void 0||la.delayHidden()},ot=Rt(wi,Fn,Gi,Gt,ir,function(){return xi(!0)},Kn,Ki);mt.useImperativeHandle(ln,function(){return{nativeElement:tr.current,getScrollInfo:Ho,scrollTo:function(po){function la(Eo){return Eo&&(0,Te.Z)(Eo)==="object"&&("left"in Eo||"top"in Eo)}la(po)?(po.left!==void 0&&Nt(qo(po.left)),ot(po.top)):ot(po)}}}),(0,ut.Z)(function(){if(wn){var Lo=Fn.slice(Di,Ai+1);wn(Lo,Fn)}},[Di,Ai,Fn]);var sa=Ye(Fn,ir,Gi,Gt),va=Rn==null?void 0:Rn({start:Di,end:Ai,virtual:Be,offsetX:dn,offsetY:gr,rtl:Fi,getSize:sa}),Ma=ce(Fn,Di,Ai,Fe,dn,li,Pe,Bn),hs=null;$e&&(hs=(0,He.Z)((0,st.Z)({},ht?"height":"maxHeight",$e),gn),to&&(hs.overflowY="hidden",Fe&&(hs.overflowX="hidden"),vn&&(hs.pointerEvents="none")));var Ga={};return Fi&&(Ga.dir="rtl"),mt.createElement("div",(0,le.Z)({ref:tr,style:(0,He.Z)((0,He.Z)({},at),{},{position:"relative"}),className:wr},Ga,Zi),mt.createElement(Pt.Z,{onResize:Wr},mt.createElement(sn,{className:"".concat(Tt,"-holder"),style:hs,ref:wi,onScroll:nr,onMouseEnter:Ki},mt.createElement(te,{prefixCls:Tt,height:mi,offsetX:dn,offsetY:gr,scrollWidth:Fe,onInnerResize:xi,ref:$i,innerProps:hi,rtl:Fi,extra:va},Ma))),Be&&mi>$e&&mt.createElement(xn,{ref:ro,prefixCls:Tt,scrollOffset:zt,scrollRange:mi,rtl:Fi,onScroll:Qo,onStartMove:qn,onStopMove:Ft,spinSize:Hi,containerSize:jn.height,style:Sn==null?void 0:Sn.verticalScrollBar,thumbStyle:Sn==null?void 0:Sn.verticalScrollBarThumb,showScrollBar:zi}),Be&&Fe>jn.width&&mt.createElement(xn,{ref:Mn,prefixCls:Tt,scrollOffset:dn,scrollRange:Fe,rtl:Fi,onScroll:Qo,onStartMove:qn,onStopMove:Ft,spinSize:ii,containerSize:jn.width,horizontal:!0,style:Sn==null?void 0:Sn.horizontalScrollBar,thumbStyle:Sn==null?void 0:Sn.horizontalScrollBarThumb,showScrollBar:zi}))}var Ct=mt.forwardRef(Zn);Ct.displayName="List";var Wn=Ct,di=Wn},12921:function(_n,yn,me){"use strict";me.d(yn,{Z5:function(){return wg},_l:function(){return hu},bK:function(){return Pc}});var le=me(59301),Te=me(60039);function He(Se,Ce){Se.prototype=Object.create(Ce.prototype),Se.prototype.constructor=Se,(0,Te.Z)(Se,Ce)}var st=me(72308),We=me(59781),ct=le.createContext(null),Me=null;function bt(Se){Se()}var Pt=bt,Ge=function(Ce){return Pt=Ce},ut=function(){return Pt};function mt(){var Se=ut(),Ce=null,Ie=null;return{clear:function(){Ce=null,Ie=null},notify:function(){Se(function(){for(var St=Ce;St;)St.callback(),St=St.next})},get:function(){for(var St=[],xt=Ce;xt;)St.push(xt),xt=xt.next;return St},subscribe:function(St){var xt=!0,It=Ie={callback:St,next:null,prev:Ie};return It.prev?It.prev.next=It:Ce=It,function(){!xt||Ce===null||(xt=!1,It.next?It.next.prev=It.prev:Ie=It.prev,It.prev?It.prev.next=It.next:Ce=It.next)}}}}var yt={notify:function(){},get:function(){return[]}};function De(Se,Ce){var Ie,Ve=yt;function St(An){return Cn(),Ve.subscribe(An)}function xt(){Ve.notify()}function It(){kn.onStateChange&&kn.onStateChange()}function Zt(){return!!Ie}function Cn(){Ie||(Ie=Ce?Ce.addNestedSub(It):Se.subscribe(It),Ve=mt())}function Vn(){Ie&&(Ie(),Ie=void 0,Ve.clear(),Ve=yt)}var kn={addNestedSub:St,notifyNestedSubs:xt,handleChangeWrapper:It,isSubscribed:Zt,trySubscribe:Cn,tryUnsubscribe:Vn,getListeners:function(){return Ve}};return kn}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,Ie=Se.context,Ve=Se.children,St=(0,le.useMemo)(function(){var Zt=De(Ce);return{store:Ce,subscription:Zt}},[Ce]),xt=(0,le.useMemo)(function(){return Ce.getState()},[Ce]);te(function(){var Zt=St.subscription;return Zt.onStateChange=Zt.notifyNestedSubs,Zt.trySubscribe(),xt!==Ce.getState()&&Zt.notifyNestedSubs(),function(){Zt.tryUnsubscribe(),Zt.onStateChange=null}},[St,xt]);var It=Ie||ct;return le.createElement(It.Provider,{value:St},Ve)}var ce=ee,se=me(87488),he=me(94266),ve=me.n(he),Ee=me(53410),Le=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Ne=["reactReduxForwardedRef"],je=[],ze=[null,null],Ye=function(Ce){try{return JSON.stringify(Ce)}catch(Ie){return String(Ce)}};function Xe(Se,Ce){var Ie=Se[1];return[Ce.payload,Ie+1]}function lt(Se,Ce,Ie){te(function(){return Se.apply(void 0,Ce)},Ie)}function Ze(Se,Ce,Ie,Ve,St,xt,It){Se.current=Ve,Ce.current=St,Ie.current=!1,xt.current&&(xt.current=null,It())}function Lt(Se,Ce,Ie,Ve,St,xt,It,Zt,Cn,Vn){if(Se){var kn=!1,An=null,Nn=function(){if(!kn){var Gr=Ce.getState(),qr,yo;try{qr=Ve(Gr,St.current)}catch(To){yo=To,An=To}yo||(An=null),qr===xt.current?It.current||Cn():(xt.current=qr,Zt.current=qr,It.current=!0,Vn({type:"STORE_UPDATED",payload:{error:yo}}))}};Ie.onStateChange=Nn,Ie.trySubscribe(),Nn();var ni=function(){if(kn=!0,Ie.tryUnsubscribe(),Ie.onStateChange=null,An)throw An};return ni}}var rt=function(){return[null,0]};function Ot(Se,Ce){Ce===void 0&&(Ce={});var Ie=Ce,Ve=Ie.getDisplayName,St=Ve===void 0?function(ds){return"ConnectAdvanced("+ds+")"}:Ve,xt=Ie.methodName,It=xt===void 0?"connectAdvanced":xt,Zt=Ie.renderCountProp,Cn=Zt===void 0?void 0:Zt,Vn=Ie.shouldHandleStateChanges,kn=Vn===void 0?!0:Vn,An=Ie.storeKey,Nn=An===void 0?"store":An,ni=Ie.withRef,Ti=ni===void 0?!1:ni,Gr=Ie.forwardRef,qr=Gr===void 0?!1:Gr,yo=Ie.context,To=yo===void 0?ct:yo,na=(0,se.Z)(Ie,Le);if(0)var Jo;var Ia=To;return function(Ts){var Ql=Ts.displayName||Ts.name||"Component",Is=St(Ql),Wl=(0,st.Z)({},na,{getDisplayName:St,methodName:It,renderCountProp:Cn,shouldHandleStateChanges:kn,storeKey:Nn,displayName:Is,wrappedComponentName:Ql,WrappedComponent:Ts}),_u=na.pure;function Xu(Il){return Se(Il.dispatch,Wl)}var hd=_u?le.useMemo:function(Il){return Il()};function Lc(Il){var Nd=(0,le.useMemo)(function(){var Tl=Il.reactReduxForwardedRef,zc=(0,se.Z)(Il,Ne);return[Il.context,Tl,zc]},[Il]),Gl=Nd[0],fd=Nd[1],vf=Nd[2],gd=(0,le.useMemo)(function(){return Gl&&Gl.Consumer&&(0,Ee.isContextConsumer)(le.createElement(Gl.Consumer,null))?Gl:Ia},[Gl,Ia]),ha=(0,le.useContext)(gd),Wh=!!Il.store&&!!Il.store.getState&&!!Il.store.dispatch,Lg=!!ha&&!!ha.store,pd=Wh?Il.store:ha.store,Qd=(0,le.useMemo)(function(){return Xu(pd)},[pd]),Fh=(0,le.useMemo)(function(){if(!kn)return ze;var Tl=De(pd,Wh?null:ha.subscription),zc=Tl.notifyNestedSubs.bind(Tl);return[Tl,zc]},[pd,Wh,ha]),Cc=Fh[0],Yf=Fh[1],Xf=(0,le.useMemo)(function(){return Wh?ha:(0,st.Z)({},ha,{subscription:Cc})},[Wh,ha,Cc]),op=(0,le.useReducer)(Xe,je,rt),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]);lt(Ze,[Ag,ap,Sf,vf,Dg,xf,Yf]),lt(Lt,[kn,pd,Cc,Qd,Ag,ap,Sf,xf,Yf,yf],[pd,Cc,Qd]);var Ya=(0,le.useMemo)(function(){return le.createElement(Ts,(0,st.Z)({},Dg,{ref:fd}))},[fd,Ts,Dg]),Ju=(0,le.useMemo)(function(){return kn?le.createElement(gd.Provider,{value:Xf},Ya):Ya},[gd,Ya,Xf]);return Ju}var wc=_u?le.memo(Lc):Lc;if(wc.WrappedComponent=Ts,wc.displayName=Lc.displayName=Is,qr){var gu=le.forwardRef(function(Nd,Gl){return le.createElement(wc,(0,st.Z)({},Nd,{reactReduxForwardedRef:Gl}))});return gu.displayName=Is,gu.WrappedComponent=Ts,ve()(gu,Ts)}return ve()(wc,Ts)}}function wt(Se,Ce){return Se===Ce?Se!==0||Ce!==0||1/Se===1/Ce:Se!==Se&&Ce!==Ce}function Dt(Se,Ce){if(wt(Se,Ce))return!0;if(typeof Se!="object"||Se===null||typeof Ce!="object"||Ce===null)return!1;var Ie=Object.keys(Se),Ve=Object.keys(Ce);if(Ie.length!==Ve.length)return!1;for(var St=0;St<Ie.length;St++)if(!Object.prototype.hasOwnProperty.call(Ce,Ie[St])||!wt(Se[Ie[St]],Ce[Ie[St]]))return!1;return!0}function Wt(Se,Ce){var Ie={},Ve=function(It){var Zt=Se[It];typeof Zt=="function"&&(Ie[It]=function(){return Ce(Zt.apply(void 0,arguments))})};for(var St in Se)Ve(St);return Ie}function Mt(Se){return function(Ie,Ve){var St=Se(Ie,Ve);function xt(){return St}return xt.dependsOnOwnProps=!1,xt}}function et(Se){return Se.dependsOnOwnProps!==null&&Se.dependsOnOwnProps!==void 0?!!Se.dependsOnOwnProps:Se.length!==1}function Ue(Se,Ce){return function(Ve,St){var xt=St.displayName,It=function(Cn,Vn){return It.dependsOnOwnProps?It.mapToProps(Cn,Vn):It.mapToProps(Cn)};return It.dependsOnOwnProps=!0,It.mapToProps=function(Cn,Vn){It.mapToProps=Se,It.dependsOnOwnProps=et(Se);var kn=It(Cn,Vn);return typeof kn=="function"&&(It.mapToProps=kn,It.dependsOnOwnProps=et(kn),kn=It(Cn,Vn)),kn},It}}function Rt(Se){return typeof Se=="function"?Ue(Se,"mapDispatchToProps"):void 0}function Pn(Se){return Se?void 0:Mt(function(Ce){return{dispatch:Ce}})}function xn(Se){return Se&&typeof Se=="object"?Mt(function(Ce){return Wt(Se,Ce)}):void 0}var _t=[Rt,Pn,xn];function qt(Se){return typeof Se=="function"?Ue(Se,"mapStateToProps"):void 0}function cn(Se){return Se?void 0:Mt(function(){return{}})}var Gn=[qt,cn];function gn(Se,Ce,Ie){return(0,st.Z)({},Ie,Se,Ce)}function Zn(Se){return function(Ie,Ve){var St=Ve.displayName,xt=Ve.pure,It=Ve.areMergedPropsEqual,Zt=!1,Cn;return function(kn,An,Nn){var ni=Se(kn,An,Nn);return Zt?(!xt||!It(ni,Cn))&&(Cn=ni):(Zt=!0,Cn=ni),Cn}}}function Ct(Se){return typeof Se=="function"?Zn(Se):void 0}function Wn(Se){return Se?void 0:function(){return gn}}var di=[Ct,Wn],Kt=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ln(Se,Ce,Ie,Ve){return function(xt,It){return Ie(Se(xt,It),Ce(Ve,It),It)}}function $t(Se,Ce,Ie,Ve,St){var xt=St.areStatesEqual,It=St.areOwnPropsEqual,Zt=St.areStatePropsEqual,Cn=!1,Vn,kn,An,Nn,ni;function Ti(na,Jo){return Vn=na,kn=Jo,An=Se(Vn,kn),Nn=Ce(Ve,kn),ni=Ie(An,Nn,kn),Cn=!0,ni}function Gr(){return An=Se(Vn,kn),Ce.dependsOnOwnProps&&(Nn=Ce(Ve,kn)),ni=Ie(An,Nn,kn),ni}function qr(){return Se.dependsOnOwnProps&&(An=Se(Vn,kn)),Ce.dependsOnOwnProps&&(Nn=Ce(Ve,kn)),ni=Ie(An,Nn,kn),ni}function yo(){var na=Se(Vn,kn),Jo=!Zt(na,An);return An=na,Jo&&(ni=Ie(An,Nn,kn)),ni}function To(na,Jo){var Ia=!It(Jo,kn),ds=!xt(na,Vn,Jo,kn);return Vn=na,kn=Jo,Ia&&ds?Gr():Ia?qr():ds?yo():ni}return function(Jo,Ia){return Cn?To(Jo,Ia):Ti(Jo,Ia)}}function Tt(Se,Ce){var Ie=Ce.initMapStateToProps,Ve=Ce.initMapDispatchToProps,St=Ce.initMergeProps,xt=(0,se.Z)(Ce,Kt),It=Ie(Se,xt),Zt=Ve(Se,xt),Cn=St(Se,xt),Vn=xt.pure?$t:ln;return Vn(It,Zt,Cn,Se,xt)}var ft=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function $e(Se,Ce,Ie){for(var Ve=Ce.length-1;Ve>=0;Ve--){var St=Ce[Ve](Se);if(St)return St}return function(xt,It){throw new Error("Invalid value of type "+typeof Se+" for "+Ie+" argument when connecting component "+It.wrappedComponentName+".")}}function Gt(Se,Ce){return Se===Ce}function Ht(Se){var Ce=Se===void 0?{}:Se,Ie=Ce.connectHOC,Ve=Ie===void 0?Ot:Ie,St=Ce.mapStateToPropsFactories,xt=St===void 0?Gn:St,It=Ce.mapDispatchToPropsFactories,Zt=It===void 0?_t:It,Cn=Ce.mergePropsFactories,Vn=Cn===void 0?di:Cn,kn=Ce.selectorFactory,An=kn===void 0?Tt:kn;return function(ni,Ti,Gr,qr){qr===void 0&&(qr={});var yo=qr,To=yo.pure,na=To===void 0?!0:To,Jo=yo.areStatesEqual,Ia=Jo===void 0?Gt:Jo,ds=yo.areOwnPropsEqual,Ts=ds===void 0?Dt:ds,Ql=yo.areStatePropsEqual,Is=Ql===void 0?Dt:Ql,Wl=yo.areMergedPropsEqual,_u=Wl===void 0?Dt:Wl,Xu=(0,se.Z)(yo,ft),hd=$e(ni,xt,"mapStateToProps"),Lc=$e(Ti,Zt,"mapDispatchToProps"),wc=$e(Gr,Vn,"mergeProps");return Ve(An,(0,st.Z)({methodName:"connect",getDisplayName:function(Il){return"Connect("+Il+")"},shouldHandleStateChanges:!!ni,initMapStateToProps:hd,initMapDispatchToProps:Lc,initMergeProps:wc,pure:na,areStatesEqual:Ia,areOwnPropsEqual:Ts,areStatePropsEqual:Is,areMergedPropsEqual:_u},Xu))}}var ht=Ht();function at(){var Se=useContext(ReactReduxContext);return Se}function Re(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(){var Ve=Ce(),St=Ve.store;return St}}var Pe=null;function ye(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultStore:createStoreHook(Se);return function(){var Ve=Ce();return Ve.dispatch}}var Oe=null,Ke=function(Ce,Ie){return Ce===Ie};function Fe(Se,Ce,Ie,Ve){var St=useReducer(function(Ti){return Ti+1},0),xt=St[1],It=useMemo(function(){return createSubscription(Ie,Ve)},[Ie,Ve]),Zt=useRef(),Cn=useRef(),Vn=useRef(),kn=useRef(),An=Ie.getState(),Nn;try{if(Se!==Cn.current||An!==Vn.current||Zt.current){var ni=Se(An);kn.current===void 0||!Ce(ni,kn.current)?Nn=ni:Nn=kn.current}else Nn=kn.current}catch(Ti){throw Zt.current&&(Ti.message+=`
The error may be correlated with this previous error:
`+Zt.current.stack+`
`),Ti}return useIsomorphicLayoutEffect(function(){Cn.current=Se,Vn.current=An,kn.current=Nn,Zt.current=void 0}),useIsomorphicLayoutEffect(function(){function Ti(){try{var Gr=Ie.getState();if(Gr===Vn.current)return;var qr=Cn.current(Gr);if(Ce(qr,kn.current))return;kn.current=qr,Vn.current=Gr}catch(yo){Zt.current=yo}xt()}return It.onStateChange=Ti,It.trySubscribe(),Ti(),function(){return It.tryUnsubscribe()}},[Ie,It]),Nn}function Et(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(Ve,St){St===void 0&&(St=Ke);var xt=Ce(),It=xt.store,Zt=xt.subscription,Cn=Fe(Ve,St,It,Zt);return useDebugValue(Cn),Cn}}var sn=null,pn=me(4676);Ge(pn.unstable_batchedUpdates);function en(Se,Ce){if(Se.length!==Ce.length)return!1;for(var Ie=0;Ie<Se.length;Ie++)if(Se[Ie]!==Ce[Ie])return!1;return!0}function wn(Se,Ce){var Ie=(0,le.useState)(function(){return{inputs:Ce,result:Se()}})[0],Ve=(0,le.useRef)(!0),St=(0,le.useRef)(Ie),xt=Ve.current||!!(Ce&&St.current.inputs&&en(Ce,St.current.inputs)),It=xt?St.current:{inputs:Ce,result:Se()};return(0,le.useEffect)(function(){Ve.current=!1,St.current=It},[It]),It.result}function hi(Se,Ce){return wn(function(){return Se},Ce)}var Rn=wn,Sn=hi,Pi=!0,zi="Invariant failed";function Zi(Se,Ce){if(!Se){if(Pi)throw new Error(zi);var Ie=typeof Ce=="function"?Ce():Ce,Ve=Ie?"".concat(zi,": ").concat(Ie):zi;throw new Error(Ve)}}var ir=function(Ce){var Ie=Ce.top,Ve=Ce.right,St=Ce.bottom,xt=Ce.left,It=Ve-xt,Zt=St-Ie,Cn={top:Ie,right:Ve,bottom:St,left:xt,width:It,height:Zt,x:xt,y:Ie,center:{x:(Ve+xt)/2,y:(St+Ie)/2}};return Cn},Nr=function(Ce,Ie){return{top:Ce.top-Ie.top,left:Ce.left-Ie.left,bottom:Ce.bottom+Ie.bottom,right:Ce.right+Ie.right}},pi=function(Ce,Ie){return{top:Ce.top+Ie.top,left:Ce.left+Ie.left,bottom:Ce.bottom-Ie.bottom,right:Ce.right-Ie.right}},li=function(Ce,Ie){return{top:Ce.top+Ie.y,left:Ce.left+Ie.x,bottom:Ce.bottom+Ie.y,right:Ce.right+Ie.x}},xi={top:0,right:0,bottom:0,left:0},Gi=function(Ce){var Ie=Ce.borderBox,Ve=Ce.margin,St=Ve===void 0?xi:Ve,xt=Ce.border,It=xt===void 0?xi:xt,Zt=Ce.padding,Cn=Zt===void 0?xi:Zt,Vn=ir(Nr(Ie,St)),kn=ir(pi(Ie,It)),An=ir(pi(kn,Cn));return{marginBox:Vn,borderBox:ir(Ie),paddingBox:kn,contentBox:An,margin:St,border:It,padding:Cn}},Oi=function(Ce){var Ie=Ce.slice(0,-2),Ve=Ce.slice(-2);if(Ve!=="px")return 0;var St=Number(Ie);return isNaN(St)&&Zi(!1),St},to=function(){return{x:window.pageXOffset,y:window.pageYOffset}},eo=function(Ce,Ie){var Ve=Ce.borderBox,St=Ce.border,xt=Ce.margin,It=Ce.padding,Zt=li(Ve,Ie);return Gi({borderBox:Zt,border:St,margin:xt,padding:It})},Be=function(Ce,Ie){return Ie===void 0&&(Ie=to()),eo(Ce,Ie)},Fi=function(Ce,Ie){var Ve={top:Oi(Ie.marginTop),right:Oi(Ie.marginRight),bottom:Oi(Ie.marginBottom),left:Oi(Ie.marginLeft)},St={top:Oi(Ie.paddingTop),right:Oi(Ie.paddingRight),bottom:Oi(Ie.paddingBottom),left:Oi(Ie.paddingLeft)},xt={top:Oi(Ie.borderTopWidth),right:Oi(Ie.borderRightWidth),bottom:Oi(Ie.borderBottomWidth),left:Oi(Ie.borderLeftWidth)};return Gi({borderBox:Ce,margin:Ve,padding:St,border:xt})},wr=function(Ce){var Ie=Ce.getBoundingClientRect(),Ve=window.getComputedStyle(Ce);return Fi(Ie,Ve)},Fn=Number.isNaN||function(Ce){return typeof Ce=="number"&&Ce!==Ce};function wi(Se,Ce){return!!(Se===Ce||Fn(Se)&&Fn(Ce))}function $i(Se,Ce){if(Se.length!==Ce.length)return!1;for(var Ie=0;Ie<Se.length;Ie++)if(!wi(Se[Ie],Ce[Ie]))return!1;return!0}function tr(Se,Ce){Ce===void 0&&(Ce=$i);var Ie,Ve=[],St,xt=!1;function It(){for(var Zt=[],Cn=0;Cn<arguments.length;Cn++)Zt[Cn]=arguments[Cn];return xt&&Ie===this&&Ce(Zt,Ve)||(St=Se.apply(this,Zt),xt=!0,Ie=this,Ve=Zt),St}return It}var ei=tr,$n=function(Ce){var Ie=[],Ve=null,St=function(){for(var It=arguments.length,Zt=new Array(It),Cn=0;Cn<It;Cn++)Zt[Cn]=arguments[Cn];Ie=Zt,!Ve&&(Ve=requestAnimationFrame(function(){Ve=null,Ce.apply(void 0,Ie)}))};return St.cancel=function(){Ve&&(cancelAnimationFrame(Ve),Ve=null)},St},zt=$n,Vt=!0,Qe=/[ \t]{2,}/g,an=/^[ \t]*/gm,dn=function(Ce){return Ce.replace(Qe," ").replace(an,"").trim()},Nt=function(Ce){return dn(`
%creact-beautiful-dnd
%c`+dn(Ce)+`
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
`)},dt=function(Ce){return[Nt(Ce),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},nn="__react-beautiful-dnd-disable-dev-warnings";function vn(Se,Ce){var Ie;Vt||typeof window!="undefined"&&window[nn]||(Ie=console)[Se].apply(Ie,dt(Ce))}var zn=vn.bind(null,"warn"),qn=vn.bind(null,"error");function Ft(){}function Bn(Se,Ce){return(0,st.Z)({},Se,{},Ce)}function Kn(Se,Ce,Ie){var Ve=Ce.map(function(St){var xt=Bn(Ie,St.options);return Se.addEventListener(St.eventName,St.fn,xt),function(){Se.removeEventListener(St.eventName,St.fn,xt)}});return function(){Ve.forEach(function(xt){xt()})}}var Ci=!0,En="Invariant failed";function un(Se){this.message=Se}un.prototype.toString=function(){return this.message};function bn(Se,Ce){if(!Se)throw Ci?new un(En):new un(En+": "+(Ce||""))}var Ei=function(Se){He(Ce,Se);function Ce(){for(var Ve,St=arguments.length,xt=new Array(St),It=0;It<St;It++)xt[It]=arguments[It];return Ve=Se.call.apply(Se,[this].concat(xt))||this,Ve.callbacks=null,Ve.unbind=Ft,Ve.onWindowError=function(Zt){var Cn=Ve.getCallbacks();Cn.isDragging()&&Cn.tryAbort();var Vn=Zt.error;Vn instanceof un&&Zt.preventDefault()},Ve.getCallbacks=function(){if(!Ve.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return Ve.callbacks},Ve.setCallbacks=function(Zt){Ve.callbacks=Zt},Ve}var Ie=Ce.prototype;return Ie.componentDidMount=function(){this.unbind=Kn(window,[{eventName:"error",fn:this.onWindowError}])},Ie.componentWillUnmount=function(){this.unbind()},Ie.componentDidCatch=function(St){if(St instanceof un){this.setState({});return}throw St},Ie.render=function(){return this.props.children(this.setCallbacks)},Ce}(le.Component),Ni=`
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
`,mi=function(Ce){return Ce+1},Di=function(Ce){return`
You have lifted an item in position `+mi(Ce.source.index)+`
`},Ai=function(Ce,Ie){var Ve=Ce.droppableId===Ie.droppableId,St=mi(Ce.index),xt=mi(Ie.index);return Ve?`
You have moved the item from position `+St+`
to position `+xt+`
`:`
You have moved the item from position `+St+`
in list `+Ce.droppableId+`
to list `+Ie.droppableId+`
in position `+xt+`
`},gr=function(Ce,Ie,Ve){var St=Ie.droppableId===Ve.droppableId;return St?`
The item `+Ce+`
has been combined with `+Ve.draggableId:`
The item `+Ce+`
in list `+Ie.droppableId+`
has been combined with `+Ve.draggableId+`
in list `+Ve.droppableId+`
`},Or=function(Ce){var Ie=Ce.destination;if(Ie)return Ai(Ce.source,Ie);var Ve=Ce.combine;return Ve?gr(Ce.draggableId,Ce.source,Ve):"You are over an area that cannot be dropped on"},Hr=function(Ce){return`
The item has returned to its starting position
of `+mi(Ce.index)+`
`},jn=function(Ce){if(Ce.reason==="CANCEL")return`
Movement cancelled.
`+Hr(Ce.source)+`
`;var Ie=Ce.destination,Ve=Ce.combine;return Ie?`
You have dropped the item.
`+Ai(Ce.source,Ie)+`
`:Ve?`
You have dropped the item.
`+gr(Ce.draggableId,Ce.source,Ve)+`
`:`
The item has been dropped while not over a drop area.
`+Hr(Ce.source)+`
`},Po={dragHandleUsageInstructions:Ni,onDragStart:Di,onDragUpdate:Or,onDragEnd:jn},Wr={x:0,y:0},ro=function(Ce,Ie){return{x:Ce.x+Ie.x,y:Ce.y+Ie.y}},Mn=function(Ce,Ie){return{x:Ce.x-Ie.x,y:Ce.y-Ie.y}},ii=function(Ce,Ie){return Ce.x===Ie.x&&Ce.y===Ie.y},Hi=function(Ce){return{x:Ce.x!==0?-Ce.x:0,y:Ce.y!==0?-Ce.y:0}},xr=function(Ce,Ie,Ve){var St;return Ve===void 0&&(Ve=0),St={},St[Ce]=Ie,St[Ce==="x"?"y":"x"]=Ve,St},qi=function(Ce,Ie){return Math.sqrt(Math.pow(Ie.x-Ce.x,2)+Math.pow(Ie.y-Ce.y,2))},pr=function(Ce,Ie){return Math.min.apply(Math,Ie.map(function(Ve){return qi(Ce,Ve)}))},Vr=function(Ce){return function(Ie){return{x:Ce(Ie.x),y:Ce(Ie.y)}}},jr=function(Se,Ce){var Ie=ir({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 Ie.width<=0||Ie.height<=0?null:Ie},kr=function(Ce,Ie){return{top:Ce.top+Ie.y,left:Ce.left+Ie.x,bottom:Ce.bottom+Ie.y,right:Ce.right+Ie.x}},Kr=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}]},Yn={top:0,right:0,bottom:0,left:0},Ho=function(Ce,Ie){return Ie?kr(Ce,Ie.scroll.diff.displacement):Ce},Xn=function(Ce,Ie,Ve){if(Ve&&Ve.increasedBy){var St;return(0,st.Z)({},Ce,(St={},St[Ie.end]=Ce[Ie.end]+Ve.increasedBy[Ie.line],St))}return Ce},Ao=function(Ce,Ie){return Ie&&Ie.shouldClipSubject?jr(Ie.pageMarginBox,Ce):ir(Ce)},Qo=function(Se){var Ce=Se.page,Ie=Se.withPlaceholder,Ve=Se.axis,St=Se.frame,xt=Ho(Ce.marginBox,St),It=Xn(xt,Ve,Ie),Zt=Ao(It,St);return{page:Ce,withPlaceholder:Ie,active:Zt}},nr=function(Se,Ce){Se.frame||bn(!1);var Ie=Se.frame,Ve=Mn(Ce,Ie.scroll.initial),St=Hi(Ve),xt=(0,st.Z)({},Ie,{scroll:{initial:Ie.scroll.initial,current:Ce,diff:{value:Ve,displacement:St},max:Ie.scroll.max}}),It=Qo({page:Se.subject.page,withPlaceholder:Se.subject.withPlaceholder,axis:Se.axis,frame:xt}),Zt=(0,st.Z)({},Se,{frame:xt,subject:It});return Zt};function qo(Se){return Number.isInteger?Number.isInteger(Se):typeof Se=="number"&&isFinite(Se)&&Math.floor(Se)===Se}function Go(Se){return Object.values?Object.values(Se):Object.keys(Se).map(function(Ce){return Se[Ce]})}function Br(Se,Ce){if(Se.findIndex)return Se.findIndex(Ce);for(var Ie=0;Ie<Se.length;Ie++)if(Ce(Se[Ie]))return Ie;return-1}function Er(Se,Ce){if(Se.find)return Se.find(Ce);var Ie=Br(Se,Ce);if(Ie!==-1)return Se[Ie]}function mo(Se){return Array.prototype.slice.call(Se)}var Yo=ei(function(Se){return Se.reduce(function(Ce,Ie){return Ce[Ie.descriptor.id]=Ie,Ce},{})}),Ki=ei(function(Se){return Se.reduce(function(Ce,Ie){return Ce[Ie.descriptor.id]=Ie,Ce},{})}),ot=ei(function(Se){return Go(Se)}),sa=ei(function(Se){return Go(Se)}),va=ei(function(Se,Ce){var Ie=sa(Ce).filter(function(Ve){return Se===Ve.descriptor.droppableId}).sort(function(Ve,St){return Ve.descriptor.index-St.descriptor.index});return Ie});function Ma(Se){return Se.at&&Se.at.type==="REORDER"?Se.at.destination:null}function hs(Se){return Se.at&&Se.at.type==="COMBINE"?Se.at.combine:null}var Ga=ei(function(Se,Ce){return Ce.filter(function(Ie){return Ie.descriptor.id!==Se.descriptor.id})}),Lo=function(Se){var Ce=Se.isMovingForward,Ie=Se.draggable,Ve=Se.destination,St=Se.insideDestination,xt=Se.previousImpact;if(!Ve.isCombineEnabled)return null;var It=Ma(xt);if(!It)return null;function Zt(Gr){var qr={type:"COMBINE",combine:{draggableId:Gr,droppableId:Ve.descriptor.id}};return(0,st.Z)({},xt,{at:qr})}var Cn=xt.displaced.all,Vn=Cn.length?Cn[0]:null;if(Ce)return Vn?Zt(Vn):null;var kn=Ga(Ie,St);if(!Vn){if(!kn.length)return null;var An=kn[kn.length-1];return Zt(An.descriptor.id)}var Nn=Br(kn,function(Gr){return Gr.descriptor.id===Vn});Nn===-1&&bn(!1);var ni=Nn-1;if(ni<0)return null;var Ti=kn[ni];return Zt(Ti.descriptor.id)},po=function(Se,Ce){return Se.descriptor.droppableId===Ce.descriptor.id},la={point:Wr,value:0},Eo={invisible:{},visible:{},all:[]},Na={displaced:Eo,displacedBy:la,at:null},os=function(Se,Ce){return function(Ie){return Se<=Ie&&Ie<=Ce}},xo=function(Se){var Ce=os(Se.top,Se.bottom),Ie=os(Se.left,Se.right);return function(Ve){var St=Ce(Ve.top)&&Ce(Ve.bottom)&&Ie(Ve.left)&&Ie(Ve.right);if(St)return!0;var xt=Ce(Ve.top)||Ce(Ve.bottom),It=Ie(Ve.left)||Ie(Ve.right),Zt=xt&&It;if(Zt)return!0;var Cn=Ve.top<Se.top&&Ve.bottom>Se.bottom,Vn=Ve.left<Se.left&&Ve.right>Se.right,kn=Cn&&Vn;if(kn)return!0;var An=Cn&&It||Vn&&xt;return An}},Yr=function(Se){var Ce=os(Se.top,Se.bottom),Ie=os(Se.left,Se.right);return function(Ve){var St=Ce(Ve.top)&&Ce(Ve.bottom)&&Ie(Ve.left)&&Ie(Ve.right);return St}},vi={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},no={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},io=function(Se){return function(Ce){var Ie=os(Ce.top,Ce.bottom),Ve=os(Ce.left,Ce.right);return function(St){return Se===vi?Ie(St.top)&&Ie(St.bottom):Ve(St.left)&&Ve(St.right)}}},Ja=function(Ce,Ie){var Ve=Ie.frame?Ie.frame.scroll.diff.displacement:Wr;return kr(Ce,Ve)},Ca=function(Ce,Ie,Ve){return Ie.subject.active?Ve(Ie.subject.active)(Ce):!1},fa=function(Ce,Ie,Ve){return Ve(Ie)(Ce)},$a=function(Ce){var Ie=Ce.target,Ve=Ce.destination,St=Ce.viewport,xt=Ce.withDroppableDisplacement,It=Ce.isVisibleThroughFrameFn,Zt=xt?Ja(Ie,Ve):Ie;return Ca(Zt,Ve,It)&&fa(Zt,St,It)},Qa=function(Ce){return $a((0,st.Z)({},Ce,{isVisibleThroughFrameFn:xo}))},Es=function(Ce){return $a((0,st.Z)({},Ce,{isVisibleThroughFrameFn:Yr}))},ys=function(Ce){return $a((0,st.Z)({},Ce,{isVisibleThroughFrameFn:io(Ce.destination.axis)}))},Zs=function(Ce,Ie,Ve){if(typeof Ve=="boolean")return Ve;if(!Ie)return!0;var St=Ie.invisible,xt=Ie.visible;if(St[Ce])return!1;var It=xt[Ce];return It?It.shouldAnimate:!0};function Dn(Se,Ce){var Ie=Se.page.marginBox,Ve={top:Ce.point.y,right:0,bottom:0,left:Ce.point.x};return ir(Nr(Ie,Ve))}function Ss(Se){var Ce=Se.afterDragging,Ie=Se.destination,Ve=Se.displacedBy,St=Se.viewport,xt=Se.forceShouldAnimate,It=Se.last;return Ce.reduce(function(Cn,Vn){var kn=Dn(Vn,Ve),An=Vn.descriptor.id;Cn.all.push(An);var Nn=Qa({target:kn,destination:Ie,viewport:St,withDroppableDisplacement:!0});if(!Nn)return Cn.invisible[Vn.descriptor.id]=!0,Cn;var ni=Zs(An,It,xt),Ti={draggableId:An,shouldAnimate:ni};return Cn.visible[An]=Ti,Cn},{all:[],visible:{},invisible:{}})}function ra(Se,Ce){if(!Se.length)return 0;var Ie=Se[Se.length-1].descriptor.index;return Ce.inHomeList?Ie:Ie+1}function hl(Se){var Ce=Se.insideDestination,Ie=Se.inHomeList,Ve=Se.displacedBy,St=Se.destination,xt=ra(Ce,{inHomeList:Ie});return{displaced:Eo,displacedBy:Ve,at:{type:"REORDER",destination:{droppableId:St.descriptor.id,index:xt}}}}function Ol(Se){var Ce=Se.draggable,Ie=Se.insideDestination,Ve=Se.destination,St=Se.viewport,xt=Se.displacedBy,It=Se.last,Zt=Se.index,Cn=Se.forceShouldAnimate,Vn=po(Ce,Ve);if(Zt==null)return hl({insideDestination:Ie,inHomeList:Vn,displacedBy:xt,destination:Ve});var kn=Er(Ie,function(Gr){return Gr.descriptor.index===Zt});if(!kn)return hl({insideDestination:Ie,inHomeList:Vn,displacedBy:xt,destination:Ve});var An=Ga(Ce,Ie),Nn=Ie.indexOf(kn),ni=An.slice(Nn),Ti=Ss({afterDragging:ni,destination:Ve,displacedBy:xt,last:It,viewport:St.frame,forceShouldAnimate:Cn});return{displaced:Ti,displacedBy:xt,at:{type:"REORDER",destination:{droppableId:Ve.descriptor.id,index:Zt}}}}function ns(Se,Ce){return!!Ce.effected[Se]}var yu=function(Se){var Ce=Se.isMovingForward,Ie=Se.destination,Ve=Se.draggables,St=Se.combine,xt=Se.afterCritical;if(!Ie.isCombineEnabled)return null;var It=St.draggableId,Zt=Ve[It],Cn=Zt.descriptor.index,Vn=ns(It,xt);return Vn?Ce?Cn:Cn-1:Ce?Cn+1:Cn},eu=function(Se){var Ce=Se.isMovingForward,Ie=Se.isInHomeList,Ve=Se.insideDestination,St=Se.location;if(!Ve.length)return null;var xt=St.index,It=Ce?xt+1:xt-1,Zt=Ve[0].descriptor.index,Cn=Ve[Ve.length-1].descriptor.index,Vn=Ie?Cn:Cn+1;return It<Zt||It>Vn?null:It},ps=function(Se){var Ce=Se.isMovingForward,Ie=Se.isInHomeList,Ve=Se.draggable,St=Se.draggables,xt=Se.destination,It=Se.insideDestination,Zt=Se.previousImpact,Cn=Se.viewport,Vn=Se.afterCritical,kn=Zt.at;if(kn||bn(!1),kn.type==="REORDER"){var An=eu({isMovingForward:Ce,isInHomeList:Ie,location:kn.destination,insideDestination:It});return An==null?null:Ol({draggable:Ve,insideDestination:It,destination:xt,viewport:Cn,last:Zt.displaced,displacedBy:Zt.displacedBy,index:An})}var Nn=yu({isMovingForward:Ce,destination:xt,displaced:Zt.displaced,draggables:St,combine:kn.combine,afterCritical:Vn});return Nn==null?null:Ol({draggable:Ve,insideDestination:It,destination:xt,viewport:Cn,last:Zt.displaced,displacedBy:Zt.displacedBy,index:Nn})},Ba=function(Se){var Ce=Se.displaced,Ie=Se.afterCritical,Ve=Se.combineWith,St=Se.displacedBy,xt=!!(Ce.visible[Ve]||Ce.invisible[Ve]);return ns(Ve,Ie)?xt?Wr:Hi(St.point):xt?St.point:Wr},tu=function(Se){var Ce=Se.afterCritical,Ie=Se.impact,Ve=Se.draggables,St=hs(Ie);St||bn(!1);var xt=St.draggableId,It=Ve[xt].page.borderBox.center,Zt=Ba({displaced:Ie.displaced,afterCritical:Ce,combineWith:xt,displacedBy:Ie.displacedBy});return ro(It,Zt)},Do=function(Ce,Ie){return Ie.margin[Ce.start]+Ie.borderBox[Ce.size]/2},Ea=function(Ce,Ie){return Ie.margin[Ce.end]+Ie.borderBox[Ce.size]/2},ca=function(Ce,Ie,Ve){return Ie[Ce.crossAxisStart]+Ve.margin[Ce.crossAxisStart]+Ve.borderBox[Ce.crossAxisSize]/2},dr=function(Ce){var Ie=Ce.axis,Ve=Ce.moveRelativeTo,St=Ce.isMoving;return xr(Ie.line,Ve.marginBox[Ie.end]+Do(Ie,St),ca(Ie,Ve.marginBox,St))},Rs=function(Ce){var Ie=Ce.axis,Ve=Ce.moveRelativeTo,St=Ce.isMoving;return xr(Ie.line,Ve.marginBox[Ie.start]-Ea(Ie,St),ca(Ie,Ve.marginBox,St))},ls=function(Ce){var Ie=Ce.axis,Ve=Ce.moveInto,St=Ce.isMoving;return xr(Ie.line,Ve.contentBox[Ie.start]+Do(Ie,St),ca(Ie,Ve.contentBox,St))},sl=function(Se){var Ce=Se.impact,Ie=Se.draggable,Ve=Se.draggables,St=Se.droppable,xt=Se.afterCritical,It=va(St.descriptor.id,Ve),Zt=Ie.page,Cn=St.axis;if(!It.length)return ls({axis:Cn,moveInto:St.page,isMoving:Zt});var Vn=Ce.displaced,kn=Ce.displacedBy,An=Vn.all[0];if(An){var Nn=Ve[An];if(ns(An,xt))return Rs({axis:Cn,moveRelativeTo:Nn.page,isMoving:Zt});var ni=eo(Nn.page,kn.point);return Rs({axis:Cn,moveRelativeTo:ni,isMoving:Zt})}var Ti=It[It.length-1];if(Ti.descriptor.id===Ie.descriptor.id)return Zt.borderBox.center;if(ns(Ti.descriptor.id,xt)){var Gr=eo(Ti.page,Hi(xt.displacedBy.point));return dr({axis:Cn,moveRelativeTo:Gr,isMoving:Zt})}return dr({axis:Cn,moveRelativeTo:Ti.page,isMoving:Zt})},jl=function(Se,Ce){var Ie=Se.frame;return Ie?ro(Ce,Ie.scroll.diff.displacement):Ce},ou=function(Ce){var Ie=Ce.impact,Ve=Ce.draggable,St=Ce.droppable,xt=Ce.draggables,It=Ce.afterCritical,Zt=Ve.page.borderBox.center,Cn=Ie.at;return!St||!Cn?Zt:Cn.type==="REORDER"?sl({impact:Ie,draggable:Ve,draggables:xt,droppable:St,afterCritical:It}):tu({impact:Ie,draggables:xt,afterCritical:It})},Ji=function(Se){var Ce=ou(Se),Ie=Se.droppable,Ve=Ie?jl(Ie,Ce):Ce;return Ve},Cs=function(Se,Ce){var Ie=Mn(Ce,Se.scroll.initial),Ve=Hi(Ie),St=ir({top:Ce.y,bottom:Ce.y+Se.frame.height,left:Ce.x,right:Ce.x+Se.frame.width}),xt={frame:St,scroll:{initial:Se.scroll.initial,max:Se.scroll.max,current:Ce,diff:{value:Ie,displacement:Ve}}};return xt};function Us(Se,Ce){return Se.map(function(Ie){return Ce[Ie]})}function $l(Se,Ce){for(var Ie=0;Ie<Ce.length;Ie++){var Ve=Ce[Ie].visible[Se];if(Ve)return Ve}return null}var kl=function(Se){var Ce=Se.impact,Ie=Se.viewport,Ve=Se.destination,St=Se.draggables,xt=Se.maxScrollChange,It=Cs(Ie,ro(Ie.scroll.current,xt)),Zt=Ve.frame?nr(Ve,ro(Ve.frame.scroll.current,xt)):Ve,Cn=Ce.displaced,Vn=Ss({afterDragging:Us(Cn.all,St),destination:Ve,displacedBy:Ce.displacedBy,viewport:It.frame,last:Cn,forceShouldAnimate:!1}),kn=Ss({afterDragging:Us(Cn.all,St),destination:Zt,displacedBy:Ce.displacedBy,viewport:Ie.frame,last:Cn,forceShouldAnimate:!1}),An={},Nn={},ni=[Cn,Vn,kn];Cn.all.forEach(function(Gr){var qr=$l(Gr,ni);if(qr){Nn[Gr]=qr;return}An[Gr]=!0});var Ti=(0,st.Z)({},Ce,{displaced:{all:Cn.all,invisible:An,visible:Nn}});return Ti},Vl=function(Se,Ce){return ro(Se.scroll.diff.displacement,Ce)},Oo=function(Se){var Ce=Se.pageBorderBoxCenter,Ie=Se.draggable,Ve=Se.viewport,St=Vl(Ve,Ce),xt=Mn(St,Ie.page.borderBox.center);return ro(Ie.client.borderBox.center,xt)},ic=function(Se){var Ce=Se.draggable,Ie=Se.destination,Ve=Se.newPageBorderBoxCenter,St=Se.viewport,xt=Se.withDroppableDisplacement,It=Se.onlyOnMainAxis,Zt=It===void 0?!1:It,Cn=Mn(Ve,Ce.page.borderBox.center),Vn=kr(Ce.page.borderBox,Cn),kn={target:Vn,destination:Ie,withDroppableDisplacement:xt,viewport:St};return Zt?ys(kn):Es(kn)},zl=function(Se){var Ce=Se.isMovingForward,Ie=Se.draggable,Ve=Se.destination,St=Se.draggables,xt=Se.previousImpact,It=Se.viewport,Zt=Se.previousPageBorderBoxCenter,Cn=Se.previousClientSelection,Vn=Se.afterCritical;if(!Ve.isEnabled)return null;var kn=va(Ve.descriptor.id,St),An=po(Ie,Ve),Nn=Lo({isMovingForward:Ce,draggable:Ie,destination:Ve,insideDestination:kn,previousImpact:xt})||ps({isMovingForward:Ce,isInHomeList:An,draggable:Ie,draggables:St,destination:Ve,insideDestination:kn,previousImpact:xt,viewport:It,afterCritical:Vn});if(!Nn)return null;var ni=Ji({impact:Nn,draggable:Ie,droppable:Ve,draggables:St,afterCritical:Vn}),Ti=ic({draggable:Ie,destination:Ve,newPageBorderBoxCenter:ni,viewport:It.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(Ti){var Gr=Oo({pageBorderBoxCenter:ni,draggable:Ie,viewport:It});return{clientSelection:Gr,impact:Nn,scrollJumpRequest:null}}var qr=Mn(ni,Zt),yo=kl({impact:Nn,viewport:It,destination:Ve,draggables:St,maxScrollChange:qr});return{clientSelection:Cn,impact:yo,scrollJumpRequest:qr}},Ln=function(Ce){var Ie=Ce.subject.active;return Ie||bn(!1),Ie},On=function(Se){var Ce=Se.isMovingForward,Ie=Se.pageBorderBoxCenter,Ve=Se.source,St=Se.droppables,xt=Se.viewport,It=Ve.subject.active;if(!It)return null;var Zt=Ve.axis,Cn=os(It[Zt.start],It[Zt.end]),Vn=ot(St).filter(function(An){return An!==Ve}).filter(function(An){return An.isEnabled}).filter(function(An){return!!An.subject.active}).filter(function(An){return xo(xt.frame)(Ln(An))}).filter(function(An){var Nn=Ln(An);return Ce?It[Zt.crossAxisEnd]<Nn[Zt.crossAxisEnd]:Nn[Zt.crossAxisStart]<It[Zt.crossAxisStart]}).filter(function(An){var Nn=Ln(An),ni=os(Nn[Zt.start],Nn[Zt.end]);return Cn(Nn[Zt.start])||Cn(Nn[Zt.end])||ni(It[Zt.start])||ni(It[Zt.end])}).sort(function(An,Nn){var ni=Ln(An)[Zt.crossAxisStart],Ti=Ln(Nn)[Zt.crossAxisStart];return Ce?ni-Ti:Ti-ni}).filter(function(An,Nn,ni){return Ln(An)[Zt.crossAxisStart]===Ln(ni[0])[Zt.crossAxisStart]});if(!Vn.length)return null;if(Vn.length===1)return Vn[0];var kn=Vn.filter(function(An){var Nn=os(Ln(An)[Zt.start],Ln(An)[Zt.end]);return Nn(Ie[Zt.line])});return kn.length===1?kn[0]:kn.length>1?kn.sort(function(An,Nn){return Ln(An)[Zt.start]-Ln(Nn)[Zt.start]})[0]:Vn.sort(function(An,Nn){var ni=pr(Ie,Kr(Ln(An))),Ti=pr(Ie,Kr(Ln(Nn)));return ni!==Ti?ni-Ti:Ln(An)[Zt.start]-Ln(Nn)[Zt.start]})[0]},ai=function(Ce,Ie){var Ve=Ce.page.borderBox.center;return ns(Ce.descriptor.id,Ie)?Mn(Ve,Ie.displacedBy.point):Ve},Qi=function(Ce,Ie){var Ve=Ce.page.borderBox;return ns(Ce.descriptor.id,Ie)?kr(Ve,Hi(Ie.displacedBy.point)):Ve},Vi=function(Se){var Ce=Se.pageBorderBoxCenter,Ie=Se.viewport,Ve=Se.destination,St=Se.insideDestination,xt=Se.afterCritical,It=St.filter(function(Zt){return Es({target:Qi(Zt,xt),destination:Ve,viewport:Ie.frame,withDroppableDisplacement:!0})}).sort(function(Zt,Cn){var Vn=qi(Ce,jl(Ve,ai(Zt,xt))),kn=qi(Ce,jl(Ve,ai(Cn,xt)));return Vn<kn?-1:kn<Vn?1:Zt.descriptor.index-Cn.descriptor.index});return It[0]||null},Ri=ei(function(Ce,Ie){var Ve=Ie[Ce.line];return{value:Ve,point:xr(Ce.line,Ve)}}),_i=function(Ce,Ie,Ve){var St=Ce.axis;if(Ce.descriptor.mode==="virtual")return xr(St.line,Ie[St.line]);var xt=Ce.subject.page.contentBox[St.size],It=va(Ce.descriptor.id,Ve),Zt=It.reduce(function(kn,An){return kn+An.client.marginBox[St.size]},0),Cn=Zt+Ie[St.line],Vn=Cn-xt;return Vn<=0?null:xr(St.line,Vn)},oi=function(Ce,Ie){return(0,st.Z)({},Ce,{scroll:(0,st.Z)({},Ce.scroll,{max:Ie})})},Li=function(Ce,Ie,Ve){var St=Ce.frame;po(Ie,Ce)&&bn(!1),Ce.subject.withPlaceholder&&bn(!1);var xt=Ri(Ce.axis,Ie.displaceBy).point,It=_i(Ce,xt,Ve),Zt={placeholderSize:xt,increasedBy:It,oldFrameMaxScroll:Ce.frame?Ce.frame.scroll.max:null};if(!St){var Cn=Qo({page:Ce.subject.page,withPlaceholder:Zt,axis:Ce.axis,frame:Ce.frame});return(0,st.Z)({},Ce,{subject:Cn})}var Vn=It?ro(St.scroll.max,It):St.scroll.max,kn=oi(St,Vn),An=Qo({page:Ce.subject.page,withPlaceholder:Zt,axis:Ce.axis,frame:kn});return(0,st.Z)({},Ce,{subject:An,frame:kn})},ur=function(Ce){var Ie=Ce.subject.withPlaceholder;Ie||bn(!1);var Ve=Ce.frame;if(!Ve){var St=Qo({page:Ce.subject.page,axis:Ce.axis,frame:null,withPlaceholder:null});return(0,st.Z)({},Ce,{subject:St})}var xt=Ie.oldFrameMaxScroll;xt||bn(!1);var It=oi(Ve,xt),Zt=Qo({page:Ce.subject.page,axis:Ce.axis,frame:It,withPlaceholder:null});return(0,st.Z)({},Ce,{subject:Zt,frame:It})},zr=function(Se){var Ce=Se.previousPageBorderBoxCenter,Ie=Se.moveRelativeTo,Ve=Se.insideDestination,St=Se.draggable,xt=Se.draggables,It=Se.destination,Zt=Se.viewport,Cn=Se.afterCritical;if(!Ie){if(Ve.length)return null;var Vn={displaced:Eo,displacedBy:la,at:{type:"REORDER",destination:{droppableId:It.descriptor.id,index:0}}},kn=Ji({impact:Vn,draggable:St,droppable:It,draggables:xt,afterCritical:Cn}),An=po(St,It)?It:Li(It,St,xt),Nn=ic({draggable:St,destination:An,newPageBorderBoxCenter:kn,viewport:Zt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return Nn?Vn:null}var ni=Ce[It.axis.line]<=Ie.page.borderBox.center[It.axis.line],Ti=function(){var qr=Ie.descriptor.index;return Ie.descriptor.id===St.descriptor.id||ni?qr:qr+1}(),Gr=Ri(It.axis,St.displaceBy);return Ol({draggable:St,insideDestination:Ve,destination:It,viewport:Zt,displacedBy:Gr,last:Eo,index:Ti})},ga=function(Se){var Ce=Se.isMovingForward,Ie=Se.previousPageBorderBoxCenter,Ve=Se.draggable,St=Se.isOver,xt=Se.draggables,It=Se.droppables,Zt=Se.viewport,Cn=Se.afterCritical,Vn=On({isMovingForward:Ce,pageBorderBoxCenter:Ie,source:St,droppables:It,viewport:Zt});if(!Vn)return null;var kn=va(Vn.descriptor.id,xt),An=Vi({pageBorderBoxCenter:Ie,viewport:Zt,destination:Vn,insideDestination:kn,afterCritical:Cn}),Nn=zr({previousPageBorderBoxCenter:Ie,destination:Vn,draggable:Ve,draggables:xt,moveRelativeTo:An,insideDestination:kn,viewport:Zt,afterCritical:Cn});if(!Nn)return null;var ni=Ji({impact:Nn,draggable:Ve,droppable:Vn,draggables:xt,afterCritical:Cn}),Ti=Oo({pageBorderBoxCenter:ni,draggable:Ve,viewport:Zt});return{clientSelection:Ti,impact:Nn,scrollJumpRequest:null}},$o=function(Se){var Ce=Se.at;return Ce?Ce.type==="REORDER"?Ce.destination.droppableId:Ce.combine.droppableId:null},Ua=function(Ce,Ie){var Ve=$o(Ce);return Ve?Ie[Ve]:null},Va=function(Se){var Ce=Se.state,Ie=Se.type,Ve=Ua(Ce.impact,Ce.dimensions.droppables),St=!!Ve,xt=Ce.dimensions.droppables[Ce.critical.droppable.id],It=Ve||xt,Zt=It.axis.direction,Cn=Zt==="vertical"&&(Ie==="MOVE_UP"||Ie==="MOVE_DOWN")||Zt==="horizontal"&&(Ie==="MOVE_LEFT"||Ie==="MOVE_RIGHT");if(Cn&&!St)return null;var Vn=Ie==="MOVE_DOWN"||Ie==="MOVE_RIGHT",kn=Ce.dimensions.draggables[Ce.critical.draggable.id],An=Ce.current.page.borderBoxCenter,Nn=Ce.dimensions,ni=Nn.draggables,Ti=Nn.droppables;return Cn?zl({isMovingForward:Vn,previousPageBorderBoxCenter:An,draggable:kn,destination:It,draggables:ni,viewport:Ce.viewport,previousClientSelection:Ce.current.client.selection,previousImpact:Ce.impact,afterCritical:Ce.afterCritical}):ga({isMovingForward:Vn,previousPageBorderBoxCenter:An,draggable:kn,isOver:It,draggables:ni,droppables:Ti,viewport:Ce.viewport,afterCritical:Ce.afterCritical})};function No(Se){return Se.phase==="DRAGGING"||Se.phase==="COLLECTING"}function Xr(Se){var Ce=os(Se.top,Se.bottom),Ie=os(Se.left,Se.right);return function(St){return Ce(St.y)&&Ie(St.x)}}function Bi(Se,Ce){return Se.left<Ce.right&&Se.right>Ce.left&&Se.top<Ce.bottom&&Se.bottom>Ce.top}function Jr(Se){var Ce=Se.pageBorderBox,Ie=Se.draggable,Ve=Se.candidates,St=Ie.page.borderBox.center,xt=Ve.map(function(It){var Zt=It.axis,Cn=xr(It.axis.line,Ce.center[Zt.line],It.page.borderBox.center[Zt.crossAxisLine]);return{id:It.descriptor.id,distance:qi(St,Cn)}}).sort(function(It,Zt){return Zt.distance-It.distance});return xt[0]?xt[0].id:null}function Vo(Se){var Ce=Se.pageBorderBox,Ie=Se.draggable,Ve=Se.droppables,St=ot(Ve).filter(function(xt){if(!xt.isEnabled)return!1;var It=xt.subject.active;if(!It||!Bi(Ce,It))return!1;if(Xr(It)(Ce.center))return!0;var Zt=xt.axis,Cn=It.center[Zt.crossAxisLine],Vn=Ce[Zt.crossAxisStart],kn=Ce[Zt.crossAxisEnd],An=os(It[Zt.crossAxisStart],It[Zt.crossAxisEnd]),Nn=An(Vn),ni=An(kn);return!Nn&&!ni?!0:Nn?Vn<Cn:kn>Cn});return St.length?St.length===1?St[0].descriptor.id:Jr({pageBorderBox:Ce,draggable:Ie,candidates:St}):null}var ma=function(Ce,Ie){return ir(kr(Ce,Ie))},ya=function(Se,Ce){var Ie=Se.frame;return Ie?ma(Ce,Ie.scroll.diff.value):Ce};function bo(Se){var Ce=Se.displaced,Ie=Se.id;return!!(Ce.visible[Ie]||Ce.invisible[Ie])}function oa(Se){var Ce=Se.draggable,Ie=Se.closest,Ve=Se.inHomeList;return Ie?Ve&&Ie.descriptor.index>Ce.descriptor.index?Ie.descriptor.index-1:Ie.descriptor.index:null}var Io=function(Se){var Ce=Se.pageBorderBoxWithDroppableScroll,Ie=Se.draggable,Ve=Se.destination,St=Se.insideDestination,xt=Se.last,It=Se.viewport,Zt=Se.afterCritical,Cn=Ve.axis,Vn=Ri(Ve.axis,Ie.displaceBy),kn=Vn.value,An=Ce[Cn.start],Nn=Ce[Cn.end],ni=Ga(Ie,St),Ti=Er(ni,function(qr){var yo=qr.descriptor.id,To=qr.page.borderBox.center[Cn.line],na=ns(yo,Zt),Jo=bo({displaced:xt,id:yo});return na?Jo?Nn<=To:An<To-kn:Jo?Nn<=To+kn:An<To}),Gr=oa({draggable:Ie,closest:Ti,inHomeList:po(Ie,Ve)});return Ol({draggable:Ie,insideDestination:St,destination:Ve,viewport:It,last:xt,displacedBy:Vn,index:Gr})},Ar=4,Da=function(Se){var Ce=Se.draggable,Ie=Se.pageBorderBoxWithDroppableScroll,Ve=Se.previousImpact,St=Se.destination,xt=Se.insideDestination,It=Se.afterCritical;if(!St.isCombineEnabled)return null;var Zt=St.axis,Cn=Ri(St.axis,Ce.displaceBy),Vn=Cn.value,kn=Ie[Zt.start],An=Ie[Zt.end],Nn=Ga(Ce,xt),ni=Er(Nn,function(Gr){var qr=Gr.descriptor.id,yo=Gr.page.borderBox,To=yo[Zt.size],na=To/Ar,Jo=ns(qr,It),Ia=bo({displaced:Ve.displaced,id:qr});return Jo?Ia?An>yo[Zt.start]+na&&An<yo[Zt.end]-na:kn>yo[Zt.start]-Vn+na&&kn<yo[Zt.end]-Vn-na:Ia?An>yo[Zt.start]+Vn+na&&An<yo[Zt.end]+Vn-na:kn>yo[Zt.start]+na&&kn<yo[Zt.end]-na});if(!ni)return null;var Ti={displacedBy:Cn,displaced:Ve.displaced,at:{type:"COMBINE",combine:{draggableId:ni.descriptor.id,droppableId:St.descriptor.id}}};return Ti},Ha=function(Se){var Ce=Se.pageOffset,Ie=Se.draggable,Ve=Se.draggables,St=Se.droppables,xt=Se.previousImpact,It=Se.viewport,Zt=Se.afterCritical,Cn=ma(Ie.page.borderBox,Ce),Vn=Vo({pageBorderBox:Cn,draggable:Ie,droppables:St});if(!Vn)return Na;var kn=St[Vn],An=va(kn.descriptor.id,Ve),Nn=ya(kn,Cn);return Da({pageBorderBoxWithDroppableScroll:Nn,draggable:Ie,previousImpact:xt,destination:kn,insideDestination:An,afterCritical:Zt})||Io({pageBorderBoxWithDroppableScroll:Nn,draggable:Ie,destination:kn,insideDestination:An,last:xt.displaced,viewport:It,afterCritical:Zt})},La=function(Se,Ce){var Ie;return(0,st.Z)({},Se,(Ie={},Ie[Ce.descriptor.id]=Ce,Ie))},fl=function(Ce){var Ie=Ce.previousImpact,Ve=Ce.impact,St=Ce.droppables,xt=$o(Ie),It=$o(Ve);if(!xt||xt===It)return St;var Zt=St[xt];if(!Zt.subject.withPlaceholder)return St;var Cn=ur(Zt);return La(St,Cn)},xu=function(Se){var Ce=Se.draggable,Ie=Se.draggables,Ve=Se.droppables,St=Se.previousImpact,xt=Se.impact,It=fl({previousImpact:St,impact:xt,droppables:Ve}),Zt=$o(xt);if(!Zt)return It;var Cn=Ve[Zt];if(po(Ce,Cn)||Cn.subject.withPlaceholder)return It;var Vn=Li(Cn,Ce,Ie);return La(It,Vn)},tn=function(Se){var Ce=Se.state,Ie=Se.clientSelection,Ve=Se.dimensions,St=Se.viewport,xt=Se.impact,It=Se.scrollJumpRequest,Zt=St||Ce.viewport,Cn=Ve||Ce.dimensions,Vn=Ie||Ce.current.client.selection,kn=Mn(Vn,Ce.initial.client.selection),An={offset:kn,selection:Vn,borderBoxCenter:ro(Ce.initial.client.borderBoxCenter,kn)},Nn={selection:ro(An.selection,Zt.scroll.current),borderBoxCenter:ro(An.borderBoxCenter,Zt.scroll.current),offset:ro(An.offset,Zt.scroll.diff.value)},ni={client:An,page:Nn};if(Ce.phase==="COLLECTING")return(0,st.Z)({phase:"COLLECTING"},Ce,{dimensions:Cn,viewport:Zt,current:ni});var Ti=Cn.draggables[Ce.critical.draggable.id],Gr=xt||Ha({pageOffset:Nn.offset,draggable:Ti,draggables:Cn.draggables,droppables:Cn.droppables,previousImpact:Ce.impact,viewport:Zt,afterCritical:Ce.afterCritical}),qr=xu({draggable:Ti,impact:Gr,previousImpact:Ce.impact,draggables:Cn.draggables,droppables:Cn.droppables}),yo=(0,st.Z)({},Ce,{current:ni,dimensions:{draggables:Cn.draggables,droppables:qr},impact:Gr,viewport:Zt,scrollJumpRequest:It||null,forceShouldAnimate:It?!1:null});return yo};function Jt(Se,Ce){return Se.map(function(Ie){return Ce[Ie]})}var Tn=function(Se){var Ce=Se.impact,Ie=Se.viewport,Ve=Se.draggables,St=Se.destination,xt=Se.forceShouldAnimate,It=Ce.displaced,Zt=Jt(It.all,Ve),Cn=Ss({afterDragging:Zt,destination:St,displacedBy:Ce.displacedBy,viewport:Ie.frame,forceShouldAnimate:xt,last:It});return(0,st.Z)({},Ce,{displaced:Cn})},tt=function(Se){var Ce=Se.impact,Ie=Se.draggable,Ve=Se.droppable,St=Se.draggables,xt=Se.viewport,It=Se.afterCritical,Zt=Ji({impact:Ce,draggable:Ie,draggables:St,droppable:Ve,afterCritical:It});return Oo({pageBorderBoxCenter:Zt,draggable:Ie,viewport:xt})},rn=function(Se){var Ce=Se.state,Ie=Se.dimensions,Ve=Se.viewport;Ce.movementMode!=="SNAP"&&bn(!1);var St=Ce.impact,xt=Ve||Ce.viewport,It=Ie||Ce.dimensions,Zt=It.draggables,Cn=It.droppables,Vn=Zt[Ce.critical.draggable.id],kn=$o(St);kn||bn(!1);var An=Cn[kn],Nn=Tn({impact:St,viewport:xt,destination:An,draggables:Zt}),ni=tt({impact:Nn,draggable:Vn,droppable:An,draggables:Zt,viewport:xt,afterCritical:Ce.afterCritical});return tn({impact:Nn,clientSelection:ni,state:Ce,dimensions:It,viewport:xt})},sr=function(Se){return{index:Se.index,droppableId:Se.droppableId}},Dr=function(Se){var Ce=Se.draggable,Ie=Se.home,Ve=Se.draggables,St=Se.viewport,xt=Ri(Ie.axis,Ce.displaceBy),It=va(Ie.descriptor.id,Ve),Zt=It.indexOf(Ce);Zt===-1&&bn(!1);var Cn=It.slice(Zt+1),Vn=Cn.reduce(function(ni,Ti){return ni[Ti.descriptor.id]=!0,ni},{}),kn={inVirtualList:Ie.descriptor.mode==="virtual",displacedBy:xt,effected:Vn},An=Ss({afterDragging:Cn,destination:Ie,displacedBy:xt,last:null,viewport:St.frame,forceShouldAnimate:!1}),Nn={displaced:An,displacedBy:xt,at:{type:"REORDER",destination:sr(Ce.descriptor)}};return{impact:Nn,afterCritical:kn}},vr=function(Se,Ce){return{draggables:Se.draggables,droppables:La(Se.droppables,Ce)}},lr=function(Ce){},Mi=function(Ce){},Pr=function(Se){var Ce=Se.draggable,Ie=Se.offset,Ve=Se.initialWindowScroll,St=eo(Ce.client,Ie),xt=Be(St,Ve),It=(0,st.Z)({},Ce,{placeholder:(0,st.Z)({},Ce.placeholder,{client:St}),client:St,page:xt});return It},Qr=function(Se){var Ce=Se.frame;return Ce||bn(!1),Ce},So=function(Se){var Ce=Se.additions,Ie=Se.updatedDroppables,Ve=Se.viewport,St=Ve.scroll.diff.value;return Ce.map(function(xt){var It=xt.descriptor.droppableId,Zt=Ie[It],Cn=Qr(Zt),Vn=Cn.scroll.diff.value,kn=ro(St,Vn),An=Pr({draggable:xt,offset:kn,initialWindowScroll:Ve.scroll.initial});return An})},hr=function(Se){var Ce=Se.state,Ie=Se.published;lr();var Ve=Ie.modified.map(function(na){var Jo=Ce.dimensions.droppables[na.droppableId],Ia=nr(Jo,na.scroll);return Ia}),St=(0,st.Z)({},Ce.dimensions.droppables,{},Yo(Ve)),xt=Ki(So({additions:Ie.additions,updatedDroppables:St,viewport:Ce.viewport})),It=(0,st.Z)({},Ce.dimensions.draggables,{},xt);Ie.removals.forEach(function(na){delete It[na]});var Zt={droppables:St,draggables:It},Cn=$o(Ce.impact),Vn=Cn?Zt.droppables[Cn]:null,kn=Zt.draggables[Ce.critical.draggable.id],An=Zt.droppables[Ce.critical.droppable.id],Nn=Dr({draggable:kn,home:An,draggables:It,viewport:Ce.viewport}),ni=Nn.impact,Ti=Nn.afterCritical,Gr=Vn&&Vn.isCombineEnabled?Ce.impact:ni,qr=Ha({pageOffset:Ce.current.page.offset,draggable:Zt.draggables[Ce.critical.draggable.id],draggables:Zt.draggables,droppables:Zt.droppables,previousImpact:Gr,viewport:Ce.viewport,afterCritical:Ti});Mi();var yo=(0,st.Z)({phase:"DRAGGING"},Ce,{phase:"DRAGGING",impact:qr,onLiftImpact:ni,dimensions:Zt,afterCritical:Ti,forceShouldAnimate:!1});if(Ce.phase==="COLLECTING")return yo;var To=(0,st.Z)({phase:"DROP_PENDING"},yo,{phase:"DROP_PENDING",reason:Ce.reason,isWaiting:!1});return To},mr=function(Ce){return Ce.movementMode==="SNAP"},yr=function(Ce,Ie,Ve){var St=vr(Ce.dimensions,Ie);return!mr(Ce)||Ve?tn({state:Ce,dimensions:St}):rn({state:Ce,dimensions:St})};function ji(Se){return Se.isDragging&&Se.movementMode==="SNAP"?(0,st.Z)({phase:"DRAGGING"},Se,{scrollJumpRequest:null}):Se}var ki={phase:"IDLE",completed:null,shouldFlush:!1},Zr=function(Se,Ce){if(Se===void 0&&(Se=ki),Ce.type==="FLUSH")return(0,st.Z)({},ki,{shouldFlush:!0});if(Ce.type==="INITIAL_PUBLISH"){Se.phase!=="IDLE"&&bn(!1);var Ie=Ce.payload,Ve=Ie.critical,St=Ie.clientSelection,xt=Ie.viewport,It=Ie.dimensions,Zt=Ie.movementMode,Cn=It.draggables[Ve.draggable.id],Vn=It.droppables[Ve.droppable.id],kn={selection:St,borderBoxCenter:Cn.client.borderBox.center,offset:Wr},An={client:kn,page:{selection:ro(kn.selection,xt.scroll.initial),borderBoxCenter:ro(kn.selection,xt.scroll.initial),offset:ro(kn.selection,xt.scroll.diff.value)}},Nn=ot(It.droppables).every(function(Xf){return!Xf.isFixedOnPage}),ni=Dr({draggable:Cn,home:Vn,draggables:It.draggables,viewport:xt}),Ti=ni.impact,Gr=ni.afterCritical,qr={phase:"DRAGGING",isDragging:!0,critical:Ve,movementMode:Zt,dimensions:It,initial:An,current:An,isWindowScrollAllowed:Nn,impact:Ti,afterCritical:Gr,onLiftImpact:Ti,viewport:xt,scrollJumpRequest:null,forceShouldAnimate:null};return qr}if(Ce.type==="COLLECTION_STARTING"){if(Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING")return Se;Se.phase!=="DRAGGING"&&bn(!1);var yo=(0,st.Z)({phase:"COLLECTING"},Se,{phase:"COLLECTING"});return yo}if(Ce.type==="PUBLISH_WHILE_DRAGGING")return Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING"||bn(!1),hr({state:Se,published:Ce.payload});if(Ce.type==="MOVE"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||bn(!1);var To=Ce.payload.client;return ii(To,Se.current.client.selection)?Se:tn({state:Se,clientSelection:To,impact:mr(Se)?Se.impact:null})}if(Ce.type==="UPDATE_DROPPABLE_SCROLL"){if(Se.phase==="DROP_PENDING"||Se.phase==="COLLECTING")return ji(Se);No(Se)||bn(!1);var na=Ce.payload,Jo=na.id,Ia=na.newScroll,ds=Se.dimensions.droppables[Jo];if(!ds)return Se;var Ts=nr(ds,Ia);return yr(Se,Ts,!1)}if(Ce.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||bn(!1);var Ql=Ce.payload,Is=Ql.id,Wl=Ql.isEnabled,_u=Se.dimensions.droppables[Is];_u||bn(!1),_u.isEnabled===Wl&&bn(!1);var Xu=(0,st.Z)({},_u,{isEnabled:Wl});return yr(Se,Xu,!0)}if(Ce.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||bn(!1);var hd=Ce.payload,Lc=hd.id,wc=hd.isCombineEnabled,gu=Se.dimensions.droppables[Lc];gu||bn(!1),gu.isCombineEnabled===wc&&bn(!1);var Il=(0,st.Z)({},gu,{isCombineEnabled:wc});return yr(Se,Il,!0)}if(Ce.type==="MOVE_BY_WINDOW_SCROLL"){if(Se.phase==="DROP_PENDING"||Se.phase==="DROP_ANIMATING")return Se;No(Se)||bn(!1),Se.isWindowScrollAllowed||bn(!1);var Nd=Ce.payload.newScroll;if(ii(Se.viewport.scroll.current,Nd))return ji(Se);var Gl=Cs(Se.viewport,Nd);return mr(Se)?rn({state:Se,viewport:Gl}):tn({state:Se,viewport:Gl})}if(Ce.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!No(Se))return Se;var fd=Ce.payload.maxScroll;if(ii(fd,Se.viewport.scroll.max))return Se;var vf=(0,st.Z)({},Se.viewport,{scroll:(0,st.Z)({},Se.viewport.scroll,{max:fd})});return(0,st.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"&&bn(!1);var gd=Va({state:Se,type:Ce.type});return gd?tn({state:Se,impact:gd.impact,clientSelection:gd.clientSelection,scrollJumpRequest:gd.scrollJumpRequest}):Se}if(Ce.type==="DROP_PENDING"){var ha=Ce.payload.reason;Se.phase!=="COLLECTING"&&bn(!1);var Wh=(0,st.Z)({phase:"DROP_PENDING"},Se,{phase:"DROP_PENDING",isWaiting:!0,reason:ha});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"||bn(!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}},br=function(Ce){return{type:"LIFT",payload:Ce}},Cr=function(Ce){return{type:"INITIAL_PUBLISH",payload:Ce}},Ir=function(Ce){return{type:"PUBLISH_WHILE_DRAGGING",payload:Ce}},Tr=function(){return{type:"COLLECTION_STARTING",payload:null}},fr=function(Ce){return{type:"UPDATE_DROPPABLE_SCROLL",payload:Ce}},Aa=function(Ce){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:Ce}},_o=function(Ce){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:Ce}},xa=function(Ce){return{type:"MOVE",payload:Ce}},Wa=function(Ce){return{type:"MOVE_BY_WINDOW_SCROLL",payload:Ce}},wo=function(Ce){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:Ce}},Oa=function(){return{type:"MOVE_UP",payload:null}},El=function(){return{type:"MOVE_DOWN",payload:null}},Mr=function(){return{type:"MOVE_RIGHT",payload:null}},_s=function(){return{type:"MOVE_LEFT",payload:null}},jo=function(){return{type:"FLUSH",payload:null}},Hs=function(Ce){return{type:"DROP_ANIMATE",payload:Ce}},gl=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(Zt){return Zt.descriptor.index}),Ie={},Ve=1;Ve<Ce.length;Ve++){var St=Ce[Ve],xt=Ce[Ve-1];St!==xt+1&&(Ie[St]=!0)}if(Object.keys(Ie).length)var It=Ce.map(function(Zt){var Cn=!!Ie[Zt];return Cn?"[\u{1F525}"+Zt+"]":""+Zt}).join(", ")}}function vc(Se,Ce){if(0)var Ie}var as=function(Se){return function(Ce){var Ie=Ce.getState,Ve=Ce.dispatch;return function(St){return function(xt){if(xt.type!=="LIFT"){St(xt);return}var It=xt.payload,Zt=It.id,Cn=It.clientSelection,Vn=It.movementMode,kn=Ie();kn.phase==="DROP_ANIMATING"&&Ve(gl({completed:kn.completed})),Ie().phase!=="IDLE"&&bn(!1),Ve(jo()),Ve(zo({draggableId:Zt,movementMode:Vn}));var An={shouldPublishImmediately:Vn==="SNAP"},Nn={draggableId:Zt,scrollOptions:An},ni=Se.startPublishing(Nn),Ti=ni.critical,Gr=ni.dimensions,qr=ni.viewport;vc(Ti,Gr),Ve(Cr({critical:Ti,dimensions:Gr,clientSelection:Cn,movementMode:Vn,viewport:qr}))}}}},du=function(Se){return function(){return function(Ce){return function(Ie){Ie.type==="INITIAL_PUBLISH"&&Se.dragging(),Ie.type==="DROP_ANIMATE"&&Se.dropping(Ie.payload.completed.result.reason),(Ie.type==="FLUSH"||Ie.type==="DROP_COMPLETE")&&Se.resting(),Ce(Ie)}}}},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 Ie=Ce+"s "+Rc.drop;return"transform "+Ie+", opacity "+Ie},outOfTheWay:"transform "+au,placeholder:"height "+au+", width "+au+", margin "+au},Wu=function(Ce){return ii(Ce,Wr)?null:"translate("+Ce.x+"px, "+Ce.y+"px)"},Au={moveTo:Wu,drop:function(Ce,Ie){var Ve=Wu(Ce);return Ve?Ie?Ve+" scale("+ac.scale.drop+")":Ve:null}},yc=Rd.minDropTime,bd=Rd.maxDropTime,_d=bd-yc,Fd=1500,ch=.6,ui=function(Se){var Ce=Se.current,Ie=Se.destination,Ve=Se.reason,St=qi(Ce,Ie);if(St<=0)return yc;if(St>=Fd)return bd;var xt=St/Fd,It=yc+_d*xt,Zt=Ve==="CANCEL"?It*ch:It;return Number(Zt.toFixed(2))},fo=function(Se){var Ce=Se.impact,Ie=Se.draggable,Ve=Se.dimensions,St=Se.viewport,xt=Se.afterCritical,It=Ve.draggables,Zt=Ve.droppables,Cn=$o(Ce),Vn=Cn?Zt[Cn]:null,kn=Zt[Ie.descriptor.droppableId],An=tt({impact:Ce,draggable:Ie,draggables:It,afterCritical:xt,droppable:Vn||kn,viewport:St}),Nn=Mn(An,Ie.client.borderBox.center);return Nn},Xa=function(Se){var Ce=Se.draggables,Ie=Se.reason,Ve=Se.lastImpact,St=Se.home,xt=Se.viewport,It=Se.onLiftImpact;if(!Ve.at||Ie!=="DROP"){var Zt=Tn({draggables:Ce,impact:It,destination:St,viewport:xt,forceShouldAnimate:!0});return{impact:Zt,didDropInsideDroppable:!1}}if(Ve.at.type==="REORDER")return{impact:Ve,didDropInsideDroppable:!0};var Cn=(0,st.Z)({},Ve,{displaced:Eo});return{impact:Cn,didDropInsideDroppable:!0}},it=function(Se){var Ce=Se.getState,Ie=Se.dispatch;return function(Ve){return function(St){if(St.type!=="DROP"){Ve(St);return}var xt=Ce(),It=St.payload.reason;if(xt.phase==="COLLECTING"){Ie(ad({reason:It}));return}if(xt.phase!=="IDLE"){var Zt=xt.phase==="DROP_PENDING"&&xt.isWaiting;Zt&&bn(!1),xt.phase==="DRAGGING"||xt.phase==="DROP_PENDING"||bn(!1);var Cn=xt.critical,Vn=xt.dimensions,kn=Vn.draggables[xt.critical.draggable.id],An=Xa({reason:It,lastImpact:xt.impact,afterCritical:xt.afterCritical,onLiftImpact:xt.onLiftImpact,home:xt.dimensions.droppables[xt.critical.droppable.id],viewport:xt.viewport,draggables:xt.dimensions.draggables}),Nn=An.impact,ni=An.didDropInsideDroppable,Ti=ni?Ma(Nn):null,Gr=ni?hs(Nn):null,qr={index:Cn.draggable.index,droppableId:Cn.droppable.id},yo={draggableId:kn.descriptor.id,type:kn.descriptor.type,source:qr,reason:It,mode:xt.movementMode,destination:Ti,combine:Gr},To=fo({impact:Nn,draggable:kn,dimensions:Vn,viewport:xt.viewport,afterCritical:xt.afterCritical}),na={critical:xt.critical,afterCritical:xt.afterCritical,result:yo,impact:Nn},Jo=!ii(xt.current.client.offset,To)||!!yo.combine;if(!Jo){Ie(gl({completed:na}));return}var Ia=ui({current:xt.current.client.offset,destination:To,reason:It}),ds={newHomeClientOffset:To,dropDuration:Ia,completed:na};Ie(Hs(ds))}}}},qe=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Xt(Se){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(Ie){Ie.target!==window&&Ie.target!==window.document||Se()}}}function Qt(Se){var Ce=Se.onWindowScroll;function Ie(){Ce(qe())}var Ve=zt(Ie),St=Xt(Ve),xt=Ft;function It(){return xt!==Ft}function Zt(){It()&&bn(!1),xt=Kn(window,[St])}function Cn(){It()||bn(!1),Ve.cancel(),xt(),xt=Ft}return{start:Zt,stop:Cn,isActive:It}}var mn=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},on=function(Se){var Ce=Qt({onWindowScroll:function(Ve){Se.dispatch(Wa({newScroll:Ve}))}});return function(Ie){return function(Ve){!Ce.isActive()&&Ve.type==="INITIAL_PUBLISH"&&Ce.start(),Ce.isActive()&&mn(Ve)&&Ce.stop(),Ie(Ve)}}},Un=function(Se){var Ce=!1,Ie=!1,Ve=setTimeout(function(){Ie=!0}),St=function(It){Ce||Ie||(Ce=!0,Se(It),clearTimeout(Ve))};return St.wasCalled=function(){return Ce},St},Hn=function(){var Se=[],Ce=function(xt){var It=Br(Se,function(Vn){return Vn.timerId===xt});It===-1&&bn(!1);var Zt=Se.splice(It,1),Cn=Zt[0];Cn.callback()},Ie=function(xt){var It=setTimeout(function(){return Ce(It)}),Zt={timerId:It,callback:xt};Se.push(Zt)},Ve=function(){if(Se.length){var xt=[].concat(Se);Se.length=0,xt.forEach(function(It){clearTimeout(It.timerId),It.callback()})}};return{add:Ie,flush:Ve}},Jn=function(Ce,Ie){return Ce==null&&Ie==null?!0:Ce==null||Ie==null?!1:Ce.droppableId===Ie.droppableId&&Ce.index===Ie.index},Si=function(Ce,Ie){return Ce==null&&Ie==null?!0:Ce==null||Ie==null?!1:Ce.draggableId===Ie.draggableId&&Ce.droppableId===Ie.droppableId},Qn=function(Ce,Ie){if(Ce===Ie)return!0;var Ve=Ce.draggable.id===Ie.draggable.id&&Ce.draggable.droppableId===Ie.draggable.droppableId&&Ce.draggable.type===Ie.draggable.type&&Ce.draggable.index===Ie.draggable.index,St=Ce.droppable.id===Ie.droppable.id&&Ce.droppable.type===Ie.droppable.type;return Ve&&St},yi=function(Ce,Ie){lr(),Ie(),Mi()},or=function(Ce,Ie){return{draggableId:Ce.draggable.id,type:Ce.droppable.type,source:{droppableId:Ce.droppable.id,index:Ce.draggable.index},mode:Ie}},Ui=function(Ce,Ie,Ve,St){if(!Ce){Ve(St(Ie));return}var xt=Un(Ve),It={announce:xt};Ce(Ie,It),xt.wasCalled()||Ve(St(Ie))},Yi=function(Se,Ce){var Ie=Hn(),Ve=null,St=function(Nn,ni){Ve&&bn(!1),yi("onBeforeCapture",function(){var Ti=Se().onBeforeCapture;if(Ti){var Gr={draggableId:Nn,mode:ni};Ti(Gr)}})},xt=function(Nn,ni){Ve&&bn(!1),yi("onBeforeDragStart",function(){var Ti=Se().onBeforeDragStart;Ti&&Ti(or(Nn,ni))})},It=function(Nn,ni){Ve&&bn(!1);var Ti=or(Nn,ni);Ve={mode:ni,lastCritical:Nn,lastLocation:Ti.source,lastCombine:null},Ie.add(function(){yi("onDragStart",function(){return Ui(Se().onDragStart,Ti,Ce,Po.onDragStart)})})},Zt=function(Nn,ni){var Ti=Ma(ni),Gr=hs(ni);Ve||bn(!1);var qr=!Qn(Nn,Ve.lastCritical);qr&&(Ve.lastCritical=Nn);var yo=!Jn(Ve.lastLocation,Ti);yo&&(Ve.lastLocation=Ti);var To=!Si(Ve.lastCombine,Gr);if(To&&(Ve.lastCombine=Gr),!(!qr&&!yo&&!To)){var na=(0,st.Z)({},or(Nn,Ve.mode),{combine:Gr,destination:Ti});Ie.add(function(){yi("onDragUpdate",function(){return Ui(Se().onDragUpdate,na,Ce,Po.onDragUpdate)})})}},Cn=function(){Ve||bn(!1),Ie.flush()},Vn=function(Nn){Ve||bn(!1),Ve=null,yi("onDragEnd",function(){return Ui(Se().onDragEnd,Nn,Ce,Po.onDragEnd)})},kn=function(){if(Ve){var Nn=(0,st.Z)({},or(Ve.lastCritical,Ve.mode),{combine:null,destination:null,reason:"CANCEL"});Vn(Nn)}};return{beforeCapture:St,beforeStart:xt,start:It,update:Zt,flush:Cn,drop:Vn,abort:kn}},Ur=function(Se,Ce){var Ie=Yi(Se,Ce);return function(Ve){return function(St){return function(xt){if(xt.type==="BEFORE_INITIAL_CAPTURE"){Ie.beforeCapture(xt.payload.draggableId,xt.payload.movementMode);return}if(xt.type==="INITIAL_PUBLISH"){var It=xt.payload.critical;Ie.beforeStart(It,xt.payload.movementMode),St(xt),Ie.start(It,xt.payload.movementMode);return}if(xt.type==="DROP_COMPLETE"){var Zt=xt.payload.completed.result;Ie.flush(),St(xt),Ie.drop(Zt);return}if(St(xt),xt.type==="FLUSH"){Ie.abort();return}var Cn=Ve.getState();Cn.phase==="DRAGGING"&&Ie.update(Cn.critical,Cn.impact)}}}},rr=function(Se){return function(Ce){return function(Ie){if(Ie.type!=="DROP_ANIMATION_FINISHED"){Ce(Ie);return}var Ve=Se.getState();Ve.phase!=="DROP_ANIMATING"&&bn(!1),Se.dispatch(gl({completed:Ve.completed}))}}},Rr=function(Se){var Ce=null,Ie=null;function Ve(){Ie&&(cancelAnimationFrame(Ie),Ie=null),Ce&&(Ce(),Ce=null)}return function(St){return function(xt){if((xt.type==="FLUSH"||xt.type==="DROP_COMPLETE"||xt.type==="DROP_ANIMATION_FINISHED")&&Ve(),St(xt),xt.type==="DROP_ANIMATE"){var It={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Cn=Se.getState();Cn.phase==="DROP_ANIMATING"&&Se.dispatch(Tc())}};Ie=requestAnimationFrame(function(){Ie=null,Ce=Kn(window,[It])})}}}},_r=function(Se){return function(){return function(Ce){return function(Ie){(Ie.type==="DROP_COMPLETE"||Ie.type==="FLUSH"||Ie.type==="DROP_ANIMATE")&&Se.stopPublishing(),Ce(Ie)}}}},vo=function(Se){var Ce=!1;return function(){return function(Ie){return function(Ve){if(Ve.type==="INITIAL_PUBLISH"){Ce=!0,Se.tryRecordFocus(Ve.payload.critical.draggable.id),Ie(Ve),Se.tryRestoreFocusRecorded();return}if(Ie(Ve),!!Ce){if(Ve.type==="FLUSH"){Ce=!1,Se.tryRestoreFocusRecorded();return}if(Ve.type==="DROP_COMPLETE"){Ce=!1;var St=Ve.payload.completed.result;St.combine&&Se.tryShiftRecord(St.draggableId,St.combine.draggableId),Se.tryRestoreFocusRecorded()}}}}}},Ko=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},ua=function(Se){return function(Ce){return function(Ie){return function(Ve){if(Ko(Ve)){Se.stop(),Ie(Ve);return}if(Ve.type==="INITIAL_PUBLISH"){Ie(Ve);var St=Ce.getState();St.phase!=="DRAGGING"&&bn(!1),Se.start(St);return}Ie(Ve),Se.scroll(Ce.getState())}}}},oo=function(Se){return function(Ce){return function(Ie){if(Ce(Ie),Ie.type==="PUBLISH_WHILE_DRAGGING"){var Ve=Se.getState();Ve.phase==="DROP_PENDING"&&(Ve.isWaiting||Se.dispatch(rc({reason:Ve.reason})))}}}},Wo=We.qC,ka=function(Se){var Ce=Se.dimensionMarshal,Ie=Se.focusMarshal,Ve=Se.styleMarshal,St=Se.getResponders,xt=Se.announce,It=Se.autoScroller;return(0,We.MT)(Zr,Wo((0,We.md)(du(Ve),_r(Ce),as(Ce),it,rr,Rr,oo,ua(It),on,vo(Ie),Ur(St,xt))))},uo=function(){return{additions:{},removals:{},modified:{}}};function ko(Se){var Ce=Se.registry,Ie=Se.callbacks,Ve=uo(),St=null,xt=function(){St||(Ie.collectionStarting(),St=requestAnimationFrame(function(){St=null,lr();var kn=Ve,An=kn.additions,Nn=kn.removals,ni=kn.modified,Ti=Object.keys(An).map(function(yo){return Ce.draggable.getById(yo).getDimension(Wr)}).sort(function(yo,To){return yo.descriptor.index-To.descriptor.index}),Gr=Object.keys(ni).map(function(yo){var To=Ce.droppable.getById(yo),na=To.callbacks.getScrollWhileDragging();return{droppableId:yo,scroll:na}}),qr={additions:Ti,removals:Object.keys(Nn),modified:Gr};Ve=uo(),Mi(),Ie.publish(qr)}))},It=function(kn){var An=kn.descriptor.id;Ve.additions[An]=kn,Ve.modified[kn.descriptor.droppableId]=!0,Ve.removals[An]&&delete Ve.removals[An],xt()},Zt=function(kn){var An=kn.descriptor;Ve.removals[An.id]=!0,Ve.modified[An.droppableId]=!0,Ve.additions[An.id]&&delete Ve.additions[An.id],xt()},Cn=function(){St&&(cancelAnimationFrame(St),St=null,Ve=uo())};return{add:It,remove:Zt,stop:Cn}}var co=function(Se){var Ce=Se.scrollHeight,Ie=Se.scrollWidth,Ve=Se.height,St=Se.width,xt=Mn({x:Ie,y:Ce},{x:St,y:Ve}),It={x:Math.max(0,xt.x),y:Math.max(0,xt.y)};return It},Lr=function(){var Se=document.documentElement;return Se||bn(!1),Se},Fo=function(){var Se=Lr(),Ce=co({scrollHeight:Se.scrollHeight,scrollWidth:Se.scrollWidth,width:Se.clientWidth,height:Se.clientHeight});return Ce},ta=function(){var Se=qe(),Ce=Fo(),Ie=Se.y,Ve=Se.x,St=Lr(),xt=St.clientWidth,It=St.clientHeight,Zt=Ve+xt,Cn=Ie+It,Vn=ir({top:Ie,left:Ve,right:Zt,bottom:Cn}),kn={frame:Vn,scroll:{initial:Se,current:Se,max:Ce,diff:{value:Wr,displacement:Wr}}};return kn},Sa=function(Se){var Ce=Se.critical,Ie=Se.scrollOptions,Ve=Se.registry;lr();var St=ta(),xt=St.scroll.current,It=Ce.droppable,Zt=Ve.droppable.getAllByType(It.type).map(function(An){return An.callbacks.getDimensionAndWatchScroll(xt,Ie)}),Cn=Ve.draggable.getAllByType(Ce.draggable.type).map(function(An){return An.getDimension(xt)}),Vn={draggables:Ki(Cn),droppables:Yo(Zt)};Mi();var kn={dimensions:Vn,critical:Ce,viewport:St};return kn};function Pa(Se,Ce,Ie){if(Ie.descriptor.id===Ce.id||Ie.descriptor.type!==Ce.type)return!1;var Ve=Se.droppable.getById(Ie.descriptor.droppableId);return Ve.descriptor.mode==="virtual"}var ao=function(Se,Ce){var Ie=null,Ve=ko({callbacks:{publish:Ce.publishWhileDragging,collectionStarting:Ce.collectionStarting},registry:Se}),St=function(ni,Ti){Se.droppable.exists(ni)||bn(!1),Ie&&Ce.updateDroppableIsEnabled({id:ni,isEnabled:Ti})},xt=function(ni,Ti){Ie&&(Se.droppable.exists(ni)||bn(!1),Ce.updateDroppableIsCombineEnabled({id:ni,isCombineEnabled:Ti}))},It=function(ni,Ti){Ie&&(Se.droppable.exists(ni)||bn(!1),Ce.updateDroppableScroll({id:ni,newScroll:Ti}))},Zt=function(ni,Ti){Ie&&Se.droppable.getById(ni).callbacks.scroll(Ti)},Cn=function(){if(Ie){Ve.stop();var ni=Ie.critical.droppable;Se.droppable.getAllByType(ni.type).forEach(function(Ti){return Ti.callbacks.dragStopped()}),Ie.unsubscribe(),Ie=null}},Vn=function(ni){Ie||bn(!1);var Ti=Ie.critical.draggable;ni.type==="ADDITION"&&Pa(Se,Ti,ni.value)&&Ve.add(ni.value),ni.type==="REMOVAL"&&Pa(Se,Ti,ni.value)&&Ve.remove(ni.value)},kn=function(ni){Ie&&bn(!1);var Ti=Se.draggable.getById(ni.draggableId),Gr=Se.droppable.getById(Ti.descriptor.droppableId),qr={draggable:Ti.descriptor,droppable:Gr.descriptor},yo=Se.subscribe(Vn);return Ie={critical:qr,unsubscribe:yo},Sa({critical:qr,registry:Se,scrollOptions:ni.scrollOptions})},An={updateDroppableIsEnabled:St,updateDroppableIsCombineEnabled:xt,scrollDroppable:Zt,updateDroppableScroll:It,startPublishing:kn,stopPublishing:Cn};return An},Ta=function(Se,Ce){return Se.phase==="IDLE"?!0:Se.phase!=="DROP_ANIMATING"||Se.completed.result.draggableId===Ce?!1:Se.completed.result.reason==="DROP"},Ka=function(Se){window.scrollBy(Se.x,Se.y)},bs=ei(function(Se){return ot(Se).filter(function(Ce){return!(!Ce.isEnabled||!Ce.frame)})}),us=function(Ce,Ie){var Ve=Er(bs(Ie),function(St){return St.frame||bn(!1),Xr(St.frame.pageMarginBox)(Ce)});return Ve},qs=function(Se){var Ce=Se.center,Ie=Se.destination,Ve=Se.droppables;if(Ie){var St=Ve[Ie];return St.frame?St:null}var xt=us(Ce,Ve);return xt},Ls={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(Ce){return Math.pow(Ce,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Za=function(Se,Ce){var Ie=Se[Ce.size]*Ls.startFromPercentage,Ve=Se[Ce.size]*Ls.maxScrollAtPercentage,St={startScrollingFrom:Ie,maxScrollValueAt:Ve};return St},aa=function(Se){var Ce=Se.startOfRange,Ie=Se.endOfRange,Ve=Se.current,St=Ie-Ce;if(St===0)return 0;var xt=Ve-Ce,It=xt/St;return It},fs=1,el=function(Se,Ce){if(Se>Ce.startScrollingFrom)return 0;if(Se<=Ce.maxScrollValueAt)return Ls.maxPixelScroll;if(Se===Ce.startScrollingFrom)return fs;var Ie=aa({startOfRange:Ce.maxScrollValueAt,endOfRange:Ce.startScrollingFrom,current:Se}),Ve=1-Ie,St=Ls.maxPixelScroll*Ls.ease(Ve);return Math.ceil(St)},Ws=Ls.durationDampening.accelerateAt,cl=Ls.durationDampening.stopDampeningAt,ba=function(Se,Ce){var Ie=Ce,Ve=cl,St=Date.now(),xt=St-Ie;if(xt>=cl)return Se;if(xt<Ws)return fs;var It=aa({startOfRange:Ws,endOfRange:Ve,current:xt}),Zt=Se*Ls.ease(It);return Math.ceil(Zt)},da=function(Se){var Ce=Se.distanceToEdge,Ie=Se.thresholds,Ve=Se.dragStartTime,St=Se.shouldUseTimeDampening,xt=el(Ce,Ie);return xt===0?0:St?Math.max(ba(xt,Ve),fs):xt},wa=function(Se){var Ce=Se.container,Ie=Se.distanceToEdges,Ve=Se.dragStartTime,St=Se.axis,xt=Se.shouldUseTimeDampening,It=Za(Ce,St),Zt=Ie[St.end]<Ie[St.start];return Zt?da({distanceToEdge:Ie[St.end],thresholds:It,dragStartTime:Ve,shouldUseTimeDampening:xt}):-1*da({distanceToEdge:Ie[St.start],thresholds:It,dragStartTime:Ve,shouldUseTimeDampening:xt})},Xo=function(Se){var Ce=Se.container,Ie=Se.subject,Ve=Se.proposedScroll,St=Ie.height>Ce.height,xt=Ie.width>Ce.width;return!xt&&!St?Ve:xt&&St?null:{x:xt?0:Ve.x,y:St?0:Ve.y}},Ps=Vr(function(Se){return Se===0?0:Se}),Uo=function(Se){var Ce=Se.dragStartTime,Ie=Se.container,Ve=Se.subject,St=Se.center,xt=Se.shouldUseTimeDampening,It={top:St.y-Ie.top,right:Ie.right-St.x,bottom:Ie.bottom-St.y,left:St.x-Ie.left},Zt=wa({container:Ie,distanceToEdges:It,dragStartTime:Ce,axis:vi,shouldUseTimeDampening:xt}),Cn=wa({container:Ie,distanceToEdges:It,dragStartTime:Ce,axis:no,shouldUseTimeDampening:xt}),Vn=Ps({x:Cn,y:Zt});if(ii(Vn,Wr))return null;var kn=Xo({container:Ie,subject:Ve,proposedScroll:Vn});return kn?ii(kn,Wr)?null:kn:null},Ra=Vr(function(Se){return Se===0?0:Se>0?1:-1}),ss=function(){var Se=function(Ie,Ve){return Ie<0?Ie:Ie>Ve?Ie-Ve:0};return function(Ce){var Ie=Ce.current,Ve=Ce.max,St=Ce.change,xt=ro(Ie,St),It={x:Se(xt.x,Ve.x),y:Se(xt.y,Ve.y)};return ii(It,Wr)?null:It}}(),cs=function(Ce){var Ie=Ce.max,Ve=Ce.current,St=Ce.change,xt={x:Math.max(Ve.x,Ie.x),y:Math.max(Ve.y,Ie.y)},It=Ra(St),Zt=ss({max:xt,current:Ve,change:It});return!Zt||It.x!==0&&Zt.x===0||It.y!==0&&Zt.y===0},Al=function(Ce,Ie){return cs({current:Ce.scroll.current,max:Ce.scroll.max,change:Ie})},bl=function(Ce,Ie){if(!Al(Ce,Ie))return null;var Ve=Ce.scroll.max,St=Ce.scroll.current;return ss({current:St,max:Ve,change:Ie})},Kl=function(Ce,Ie){var Ve=Ce.frame;return Ve?cs({current:Ve.scroll.current,max:Ve.scroll.max,change:Ie}):!1},Fs=function(Ce,Ie){var Ve=Ce.frame;return!Ve||!Kl(Ce,Ie)?null:ss({current:Ve.scroll.current,max:Ve.scroll.max,change:Ie})},Zl=function(Se){var Ce=Se.viewport,Ie=Se.subject,Ve=Se.center,St=Se.dragStartTime,xt=Se.shouldUseTimeDampening,It=Uo({dragStartTime:St,container:Ce.frame,subject:Ie,center:Ve,shouldUseTimeDampening:xt});return It&&Al(Ce,It)?It:null},dl=function(Se){var Ce=Se.droppable,Ie=Se.subject,Ve=Se.center,St=Se.dragStartTime,xt=Se.shouldUseTimeDampening,It=Ce.frame;if(!It)return null;var Zt=Uo({dragStartTime:St,container:It.pageMarginBox,subject:Ie,center:Ve,shouldUseTimeDampening:xt});return Zt&&Kl(Ce,Zt)?Zt:null},Fl=function(Se){var Ce=Se.state,Ie=Se.dragStartTime,Ve=Se.shouldUseTimeDampening,St=Se.scrollWindow,xt=Se.scrollDroppable,It=Ce.current.page.borderBoxCenter,Zt=Ce.dimensions.draggables[Ce.critical.draggable.id],Cn=Zt.page.marginBox;if(Ce.isWindowScrollAllowed){var Vn=Ce.viewport,kn=Zl({dragStartTime:Ie,viewport:Vn,subject:Cn,center:It,shouldUseTimeDampening:Ve});if(kn){St(kn);return}}var An=qs({center:It,destination:$o(Ce.impact),droppables:Ce.dimensions.droppables});if(An){var Nn=dl({dragStartTime:Ie,droppable:An,subject:Cn,center:It,shouldUseTimeDampening:Ve});Nn&&xt(An.descriptor.id,Nn)}},_c=function(Se){var Ce=Se.scrollWindow,Ie=Se.scrollDroppable,Ve=zt(Ce),St=zt(Ie),xt=null,It=function(kn){xt||bn(!1);var An=xt,Nn=An.shouldUseTimeDampening,ni=An.dragStartTime;Fl({state:kn,scrollWindow:Ve,scrollDroppable:St,dragStartTime:ni,shouldUseTimeDampening:Nn})},Zt=function(kn){lr(),xt&&bn(!1);var An=Date.now(),Nn=!1,ni=function(){Nn=!0};Fl({state:kn,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:ni,scrollDroppable:ni}),xt={dragStartTime:An,shouldUseTimeDampening:Nn},Mi(),Nn&&It(kn)},Cn=function(){xt&&(Ve.cancel(),St.cancel(),xt=null)};return{start:Zt,stop:Cn,scroll:It}},Bs=function(Se){var Ce=Se.move,Ie=Se.scrollDroppable,Ve=Se.scrollWindow,St=function(Vn,kn){var An=ro(Vn.current.client.selection,kn);Ce({client:An})},xt=function(Vn,kn){if(!Kl(Vn,kn))return kn;var An=Fs(Vn,kn);if(!An)return Ie(Vn.descriptor.id,kn),null;var Nn=Mn(kn,An);Ie(Vn.descriptor.id,Nn);var ni=Mn(kn,Nn);return ni},It=function(Vn,kn,An){if(!Vn||!Al(kn,An))return An;var Nn=bl(kn,An);if(!Nn)return Ve(An),null;var ni=Mn(An,Nn);Ve(ni);var Ti=Mn(An,ni);return Ti},Zt=function(Vn){var kn=Vn.scrollJumpRequest;if(kn){var An=$o(Vn.impact);An||bn(!1);var Nn=xt(Vn.dimensions.droppables[An],kn);if(Nn){var ni=Vn.viewport,Ti=It(Vn.isWindowScrollAllowed,ni,Nn);Ti&&St(Vn,Ti)}}};return Zt},ks=function(Se){var Ce=Se.scrollDroppable,Ie=Se.scrollWindow,Ve=Se.move,St=_c({scrollWindow:Ie,scrollDroppable:Ce}),xt=Bs({move:Ve,scrollWindow:Ie,scrollDroppable:Ce}),It=function(Vn){if(Vn.phase==="DRAGGING"){if(Vn.movementMode==="FLUID"){St.scroll(Vn);return}Vn.scrollJumpRequest&&xt(Vn)}},Zt={scroll:It,start:St.start,stop:St.stop};return Zt},Ms="data-rbd",Gs=function(){var Se=Ms+"-drag-handle";return{base:Se,draggableId:Se+"-draggable-id",contextId:Se+"-context-id"}}(),pl=function(){var Se=Ms+"-draggable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),is=function(){var Se=Ms+"-droppable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),js={contextId:Ms+"-scroll-container-context-id"},Dl=function(Ce){return function(Ie){return"["+Ie+'="'+Ce+'"]'}},Ul=function(Ce,Ie){return Ce.map(function(Ve){var St=Ve.styles[Ie];return St?Ve.selector+" { "+St+" }":""}).join(" ")},Gu="pointer-events: none;",Du=function(Se){var Ce=Dl(Se),Ie=function(){var Zt=`
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:Zt,dragging:Gu,dropAnimating:Zt}}}(),Ve=function(){var Zt=`
transition: `+su.outOfTheWay+`;
`;return{selector:Ce(pl.contextId),styles:{dragging:Zt,dropAnimating:Zt,userCancel:Zt}}}(),St={selector:Ce(is.contextId),styles:{always:"overflow-anchor: none;"}},xt={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;
`}},It=[Ve,Ie,St,xt];return{always:Ul(It,"always"),resting:Ul(It,"resting"),dragging:Ul(It,"dragging"),dropAnimating:Ul(It,"dropAnimating"),userCancel:Ul(It,"userCancel")}},ml=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||bn(!1),Ce},Ou=function(Ce){var Ie=document.createElement("style");return Ce&&Ie.setAttribute("nonce",Ce),Ie.type="text/css",Ie};function Ns(Se,Ce){var Ie=Rn(function(){return Du(Se)},[Se]),Ve=(0,le.useRef)(null),St=(0,le.useRef)(null),xt=Sn(ei(function(An){var Nn=St.current;Nn||bn(!1),Nn.textContent=An}),[]),It=Sn(function(An){var Nn=Ve.current;Nn||bn(!1),Nn.textContent=An},[]);ml(function(){!Ve.current&&!St.current||bn(!1);var An=Ou(Ce),Nn=Ou(Ce);return Ve.current=An,St.current=Nn,An.setAttribute(Ms+"-always",Se),Nn.setAttribute(Ms+"-dynamic",Se),Iu().appendChild(An),Iu().appendChild(Nn),It(Ie.always),xt(Ie.resting),function(){var ni=function(Gr){var qr=Gr.current;qr||bn(!1),Iu().removeChild(qr),Gr.current=null};ni(Ve),ni(St)}},[Ce,It,xt,Ie.always,Ie.resting,Se]);var Zt=Sn(function(){return xt(Ie.dragging)},[xt,Ie.dragging]),Cn=Sn(function(An){if(An==="DROP"){xt(Ie.dropAnimating);return}xt(Ie.userCancel)},[xt,Ie.dropAnimating,Ie.userCancel]),Vn=Sn(function(){St.current&&xt(Ie.resting)},[xt,Ie.resting]),kn=Rn(function(){return{dragging:Zt,dropping:Cn,resting:Vn}},[Zt,Cn,Vn]);return kn}var Hl=function(Se){return Se&&Se.ownerDocument?Se.ownerDocument.defaultView:window};function $s(Se){return Se instanceof Hl(Se).HTMLElement}function zs(Se,Ce){var Ie="["+Gs.contextId+'="'+Se+'"]',Ve=mo(document.querySelectorAll(Ie));if(!Ve.length)return null;var St=Er(Ve,function(xt){return xt.getAttribute(Gs.draggableId)===Ce});return!St||!$s(St)?null:St}function $u(Se){var Ce=(0,le.useRef)({}),Ie=(0,le.useRef)(null),Ve=(0,le.useRef)(null),St=(0,le.useRef)(!1),xt=Sn(function(Nn,ni){var Ti={id:Nn,focus:ni};return Ce.current[Nn]=Ti,function(){var qr=Ce.current,yo=qr[Nn];yo!==Ti&&delete qr[Nn]}},[]),It=Sn(function(Nn){var ni=zs(Se,Nn);ni&&ni!==document.activeElement&&ni.focus()},[Se]),Zt=Sn(function(Nn,ni){Ie.current===Nn&&(Ie.current=ni)},[]),Cn=Sn(function(){Ve.current||St.current&&(Ve.current=requestAnimationFrame(function(){Ve.current=null;var Nn=Ie.current;Nn&&It(Nn)}))},[It]),Vn=Sn(function(Nn){Ie.current=null;var ni=document.activeElement;ni&&ni.getAttribute(Gs.draggableId)===Nn&&(Ie.current=Nn)},[]);ml(function(){return St.current=!0,function(){St.current=!1;var Nn=Ve.current;Nn&&cancelAnimationFrame(Nn)}},[]);var kn=Rn(function(){return{register:xt,tryRecordFocus:Vn,tryRestoreFocusRecorded:Cn,tryShiftRecord:Zt}},[xt,Vn,Cn,Zt]);return kn}function Kc(){var Se={draggables:{},droppables:{}},Ce=[];function Ie(An){return Ce.push(An),function(){var ni=Ce.indexOf(An);ni!==-1&&Ce.splice(ni,1)}}function Ve(An){Ce.length&&Ce.forEach(function(Nn){return Nn(An)})}function St(An){return Se.draggables[An]||null}function xt(An){var Nn=St(An);return Nn||bn(!1),Nn}var It={register:function(Nn){Se.draggables[Nn.descriptor.id]=Nn,Ve({type:"ADDITION",value:Nn})},update:function(Nn,ni){var Ti=Se.draggables[ni.descriptor.id];Ti&&Ti.uniqueId===Nn.uniqueId&&(delete Se.draggables[ni.descriptor.id],Se.draggables[Nn.descriptor.id]=Nn)},unregister:function(Nn){var ni=Nn.descriptor.id,Ti=St(ni);Ti&&Nn.uniqueId===Ti.uniqueId&&(delete Se.draggables[ni],Ve({type:"REMOVAL",value:Nn}))},getById:xt,findById:St,exists:function(Nn){return!!St(Nn)},getAllByType:function(Nn){return Go(Se.draggables).filter(function(ni){return ni.descriptor.type===Nn})}};function Zt(An){return Se.droppables[An]||null}function Cn(An){var Nn=Zt(An);return Nn||bn(!1),Nn}var Vn={register:function(Nn){Se.droppables[Nn.descriptor.id]=Nn},unregister:function(Nn){var ni=Zt(Nn.descriptor.id);ni&&Nn.uniqueId===ni.uniqueId&&delete Se.droppables[Nn.descriptor.id]},getById:Cn,findById:Zt,exists:function(Nn){return!!Zt(Nn)},getAllByType:function(Nn){return Go(Se.droppables).filter(function(ni){return ni.descriptor.type===Nn})}};function kn(){Se.draggables={},Se.droppables={},Ce.length=0}return{draggable:It,droppable:Vn,subscribe:Ie,clean:kn}}function sc(){var Se=Rn(Kc,[]);return(0,le.useEffect)(function(){return function(){requestAnimationFrame(Se.clean)}},[Se]),Se}var lc=le.createContext(null),Vu=function(){var Se=document.body;return Se||bn(!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%)"},ws=function(Ce){return"rbd-announcement-"+Ce};function Ys(Se){var Ce=Rn(function(){return ws(Se)},[Se]),Ie=(0,le.useRef)(null);(0,le.useEffect)(function(){var xt=document.createElement("div");return Ie.current=xt,xt.id=Ce,xt.setAttribute("aria-live","assertive"),xt.setAttribute("aria-atomic","true"),(0,st.Z)(xt.style,ku),Vu().appendChild(xt),function(){setTimeout(function(){var Cn=Vu();Cn.contains(xt)&&Cn.removeChild(xt),xt===Ie.current&&(Ie.current=null)})}},[Ce]);var Ve=Sn(function(St){var xt=Ie.current;if(xt){xt.textContent=St;return}},[]);return Ve}var vl=0,Xs={separator:"::"};function ms(){vl=0}function yl(Se,Ce){return Ce===void 0&&(Ce=Xs),Rn(function(){return""+Se+Ce.separator+vl++},[Ce.separator,Se])}function Su(Se){var Ce=Se.contextId,Ie=Se.uniqueId;return"rbd-hidden-text-"+Ce+"-"+Ie}function xc(Se){var Ce=Se.contextId,Ie=Se.text,Ve=yl("hidden-text",{separator:"-"}),St=Rn(function(){return Su({contextId:Ce,uniqueId:Ve})},[Ve,Ce]);return(0,le.useEffect)(function(){var It=document.createElement("div");return It.id=St,It.textContent=Ie,It.style.display="none",Vu().appendChild(It),function(){var Cn=Vu();Cn.contains(It)&&Cn.removeChild(It)}},[St,Ie]),St}var jd=le.createContext(null),hn={react:"^16.8.5","react-dom":"^16.8.5"},sd=/(\d+)\.(\d+)\.(\d+)/,Bc=function(Ce){var Ie=sd.exec(Ce);Ie==null&&bn(!1);var Ve=Number(Ie[1]),St=Number(Ie[2]),xt=Number(Ie[3]);return{major:Ve,minor:St,patch:xt,raw:Ce}},df=function(Ce,Ie){return Ie.major>Ce.major?!0:Ie.major<Ce.major?!1:Ie.minor>Ce.minor?!0:Ie.minor<Ce.minor?!1:Ie.patch>=Ce.patch},zd=function(Se,Ce){var Ie=Bc(Se),Ve=Bc(Ce);df(Ie,Ve)},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 Bl(Se,Ce){}function dh(){Bl(function(){zd(hn.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 Ie(It){return It===Se}function Ve(It){Se&&bn(!1);var Zt={abandon:It};return Se=Zt,Zt}function St(){Se||bn(!1),Se=null}function xt(){Se&&(Se.abandon(),St())}return{isClaimed:Ce,isActive:Ie,claim:Ve,release:St,tryAbandon:xt}}var hf=9,Hf=13,fh=27,gh=32,Ku=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],Ie=Er(Ce,function(Ve){return"on"+Ve in document});return Ie||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,Ie=Se.completed,Ve=Se.getPhase,St=Se.setPhase;return[{eventName:"mousemove",fn:function(It){var Zt=It.button,Cn=It.clientX,Vn=It.clientY;if(Zt===ph){var kn={x:Cn,y:Vn},An=Ve();if(An.type==="DRAGGING"){It.preventDefault(),An.actions.move(kn);return}An.type!=="PENDING"&&bn(!1);var Nn=An.point;if(ud(Nn,kn)){It.preventDefault();var ni=An.actions.fluidLift(kn);St({type:"DRAGGING",actions:ni})}}}},{eventName:"mouseup",fn:function(It){var Zt=Ve();if(Zt.type!=="DRAGGING"){Ce();return}It.preventDefault(),Zt.actions.drop({shouldBlockNextClick:!0}),Ie()}},{eventName:"mousedown",fn:function(It){Ve().type==="DRAGGING"&&It.preventDefault(),Ce()}},{eventName:"keydown",fn:function(It){var Zt=Ve();if(Zt.type==="PENDING"){Ce();return}if(It.keyCode===fh){It.preventDefault(),Ce();return}Tu(It)}},{eventName:"resize",fn:Ce},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){Ve().type==="PENDING"&&Ce()}},{eventName:"webkitmouseforcedown",fn:function(It){var Zt=Ve();if(Zt.type==="IDLE"&&bn(!1),Zt.actions.shouldRespectForcePress()){Ce();return}It.preventDefault()}},{eventName:Uc,fn:Ce}]}function Ml(Se){var Ce=(0,le.useRef)(lu),Ie=(0,le.useRef)(Ft),Ve=Rn(function(){return{eventName:"mousedown",fn:function(An){if(!An.defaultPrevented&&An.button===ph&&!(An.ctrlKey||An.metaKey||An.shiftKey||An.altKey)){var Nn=Se.findClosestDraggableId(An);if(Nn){var ni=Se.tryGetLock(Nn,It,{sourceEvent:An});if(ni){An.preventDefault();var Ti={x:An.clientX,y:An.clientY};Ie.current(),Vn(ni,Ti)}}}}}},[Se]),St=Rn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(An){if(!An.defaultPrevented){var Nn=Se.findClosestDraggableId(An);if(Nn){var ni=Se.findOptionsForDraggable(Nn);ni&&(ni.shouldRespectForcePress||Se.canGetLock(Nn)&&An.preventDefault())}}}}},[Se]),xt=Sn(function(){var An={passive:!1,capture:!0};Ie.current=Kn(window,[St,Ve],An)},[St,Ve]),It=Sn(function(){var kn=Ce.current;kn.type!=="IDLE"&&(Ce.current=lu,Ie.current(),xt())},[xt]),Zt=Sn(function(){var kn=Ce.current;It(),kn.type==="DRAGGING"&&kn.actions.cancel({shouldBlockNextClick:!0}),kn.type==="PENDING"&&kn.actions.abort()},[It]),Cn=Sn(function(){var An={capture:!0,passive:!1},Nn=jh({cancel:Zt,completed:It,getPhase:function(){return Ce.current},setPhase:function(Ti){Ce.current=Ti}});Ie.current=Kn(window,Nn,An)},[Zt,It]),Vn=Sn(function(An,Nn){Ce.current.type!=="IDLE"&&bn(!1),Ce.current={type:"PENDING",point:Nn,actions:An},Cn()},[Cn]);ml(function(){return xt(),function(){Ie.current()}},[xt])}var gs;function Js(){}var nu=(gs={},gs[Wd]=!0,gs[Ku]=!0,gs[Mc]=!0,gs[ff]=!0,gs);function uc(Se,Ce){function Ie(){Ce(),Se.cancel()}function Ve(){Ce(),Se.drop()}return[{eventName:"keydown",fn:function(xt){if(xt.keyCode===fh){xt.preventDefault(),Ie();return}if(xt.keyCode===gh){xt.preventDefault(),Ve();return}if(xt.keyCode===Pu){xt.preventDefault(),Se.moveDown();return}if(xt.keyCode===Gd){xt.preventDefault(),Se.moveUp();return}if(xt.keyCode===Bd){xt.preventDefault(),Se.moveRight();return}if(xt.keyCode===ld){xt.preventDefault(),Se.moveLeft();return}if(nu[xt.keyCode]){xt.preventDefault();return}Tu(xt)}},{eventName:"mousedown",fn:Ie},{eventName:"mouseup",fn:Ie},{eventName:"click",fn:Ie},{eventName:"touchstart",fn:Ie},{eventName:"resize",fn:Ie},{eventName:"wheel",fn:Ie,options:{passive:!0}},{eventName:Uc,fn:Ie}]}function cc(Se){var Ce=(0,le.useRef)(Js),Ie=Rn(function(){return{eventName:"keydown",fn:function(xt){if(xt.defaultPrevented||xt.keyCode!==gh)return;var It=Se.findClosestDraggableId(xt);if(!It)return;var Zt=Se.tryGetLock(It,kn,{sourceEvent:xt});if(!Zt)return;xt.preventDefault();var Cn=!0,Vn=Zt.snapLift();Ce.current();function kn(){Cn||bn(!1),Cn=!1,Ce.current(),Ve()}Ce.current=Kn(window,uc(Vn,kn),{capture:!0,passive:!1})}}},[Se]),Ve=Sn(function(){var xt={passive:!1,capture:!0};Ce.current=Kn(window,[Ie],xt)},[Ie]);ml(function(){return Ve(),function(){Ce.current()}},[Ve])}var $d={type:"IDLE"},cd=120,vh=.15;function Sc(Se){var Ce=Se.cancel,Ie=Se.getPhase;return[{eventName:"orientationchange",fn:Ce},{eventName:"resize",fn:Ce},{eventName:"contextmenu",fn:function(St){St.preventDefault()}},{eventName:"keydown",fn:function(St){if(Ie().type!=="DRAGGING"){Ce();return}St.keyCode===fh&&St.preventDefault(),Ce()}},{eventName:Uc,fn:Ce}]}function Yc(Se){var Ce=Se.cancel,Ie=Se.completed,Ve=Se.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(xt){var It=Ve();if(It.type!=="DRAGGING"){Ce();return}It.hasMoved=!0;var Zt=xt.touches[0],Cn=Zt.clientX,Vn=Zt.clientY,kn={x:Cn,y:Vn};xt.preventDefault(),It.actions.move(kn)}},{eventName:"touchend",fn:function(xt){var It=Ve();if(It.type!=="DRAGGING"){Ce();return}xt.preventDefault(),It.actions.drop({shouldBlockNextClick:!0}),Ie()}},{eventName:"touchcancel",fn:function(xt){if(Ve().type!=="DRAGGING"){Ce();return}xt.preventDefault(),Ce()}},{eventName:"touchforcechange",fn:function(xt){var It=Ve();It.type==="IDLE"&&bn(!1);var Zt=xt.touches[0];if(Zt){var Cn=Zt.force>=vh;if(Cn){var Vn=It.actions.shouldRespectForcePress();if(It.type==="PENDING"){Vn&&Ce();return}if(Vn){if(It.hasMoved){xt.preventDefault();return}Ce();return}xt.preventDefault()}}}},{eventName:Uc,fn:Ce}]}function Wf(Se){var Ce=(0,le.useRef)($d),Ie=(0,le.useRef)(Ft),Ve=Sn(function(){return Ce.current},[]),St=Sn(function(ni){Ce.current=ni},[]),xt=Rn(function(){return{eventName:"touchstart",fn:function(ni){if(!ni.defaultPrevented){var Ti=Se.findClosestDraggableId(ni);if(Ti){var Gr=Se.tryGetLock(Ti,Zt,{sourceEvent:ni});if(Gr){var qr=ni.touches[0],yo=qr.clientX,To=qr.clientY,na={x:yo,y:To};Ie.current(),An(Gr,na)}}}}}},[Se]),It=Sn(function(){var ni={capture:!0,passive:!1};Ie.current=Kn(window,[xt],ni)},[xt]),Zt=Sn(function(){var Nn=Ce.current;Nn.type!=="IDLE"&&(Nn.type==="PENDING"&&clearTimeout(Nn.longPressTimerId),St($d),Ie.current(),It())},[It,St]),Cn=Sn(function(){var Nn=Ce.current;Zt(),Nn.type==="DRAGGING"&&Nn.actions.cancel({shouldBlockNextClick:!0}),Nn.type==="PENDING"&&Nn.actions.abort()},[Zt]),Vn=Sn(function(){var ni={capture:!0,passive:!1},Ti={cancel:Cn,completed:Zt,getPhase:Ve},Gr=Kn(window,Yc(Ti),ni),qr=Kn(window,Sc(Ti),ni);Ie.current=function(){Gr(),qr()}},[Cn,Ve,Zt]),kn=Sn(function(){var ni=Ve();ni.type!=="PENDING"&&bn(!1);var Ti=ni.actions.fluidLift(ni.point);St({type:"DRAGGING",actions:Ti,hasMoved:!1})},[Ve,St]),An=Sn(function(ni,Ti){Ve().type!=="IDLE"&&bn(!1);var Gr=setTimeout(kn,cd);St({type:"PENDING",point:Ti,actions:ni,longPressTimerId:Gr}),Vn()},[Vn,Ve,St,kn]);ml(function(){return It(),function(){Ie.current();var Ti=Ve();Ti.type==="PENDING"&&(clearTimeout(Ti.longPressTimerId),St($d))}},[Ve,It,St]),ml(function(){var ni=Kn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return ni},[])}function Gf(Se){}var $f={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Vd(Se,Ce){if(Ce==null)return!1;var Ie=!!$f[Ce.tagName.toLowerCase()];if(Ie)return!0;var Ve=Ce.getAttribute("contenteditable");return Ve==="true"||Ve===""?!0:Ce===Se?!1:Vd(Se,Ce.parentElement)}function hg(Se,Ce){var Ie=Ce.target;return $s(Ie)?Vd(Se,Ie):!1}var fg=function(Se){return ir(Se.getBoundingClientRect()).center};function gg(Se){return Se instanceof Hl(Se).Element}var Xc=function(){var Se="matches";if(typeof document=="undefined")return Se;var Ce=[Se,"msMatchesSelector","webkitMatchesSelector"],Ie=Er(Ce,function(Ve){return Ve in Element.prototype});return Ie||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 Ie=Ce.target;if(!gg(Ie))return null;var Ve=zh(Se),St=mg(Ie,Ve);return!St||!$s(St)?null:St}function vg(Se,Ce){var Ie=yh(Se,Ce);return Ie?Ie.getAttribute(Gs.draggableId):null}function Jc(Se,Ce){var Ie="["+pl.contextId+'="'+Se+'"]',Ve=mo(document.querySelectorAll(Ie)),St=Er(Ve,function(xt){return xt.getAttribute(pl.id)===Ce});return!St||!$s(St)?null:St}function yg(Se){Se.preventDefault()}function xh(Se){var Ce=Se.expected,Ie=Se.phase,Ve=Se.isLockActive,St=Se.shouldWarn;return!(!Ve()||Ce!==Ie)}function xg(Se){var Ce=Se.lockAPI,Ie=Se.store,Ve=Se.registry,St=Se.draggableId;if(Ce.isClaimed())return!1;var xt=Ve.draggable.findById(St);return!(!xt||!xt.options.isEnabled||!Ta(Ie.getState(),St))}function Sg(Se){var Ce=Se.lockAPI,Ie=Se.contextId,Ve=Se.store,St=Se.registry,xt=Se.draggableId,It=Se.forceSensorStop,Zt=Se.sourceEvent,Cn=xg({lockAPI:Ce,store:Ve,registry:St,draggableId:xt});if(!Cn)return null;var Vn=St.draggable.getById(xt),kn=Jc(Ie,Vn.descriptor.id);if(!kn||Zt&&!Vn.options.canDragInteractiveElements&&hg(kn,Zt))return null;var An=Ce.claim(It||Ft),Nn="PRE_DRAG";function ni(){return Vn.options.shouldRespectForcePress}function Ti(){return Ce.isActive(An)}function Gr(ds,Ts){xh({expected:ds,phase:Nn,isLockActive:Ti,shouldWarn:!0})&&Ve.dispatch(Ts())}var qr=Gr.bind(null,"DRAGGING");function yo(ds){function Ts(){Ce.release(),Nn="COMPLETED"}Nn!=="PRE_DRAG"&&(Ts(),Nn!=="PRE_DRAG"&&bn(!1)),Ve.dispatch(br(ds.liftActionArgs)),Nn="DRAGGING";function Ql(Is,Wl){if(Wl===void 0&&(Wl={shouldBlockNextClick:!1}),ds.cleanup(),Wl.shouldBlockNextClick){var _u=Kn(window,[{eventName:"click",fn:yg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(_u)}Ts(),Ve.dispatch(rc({reason:Is}))}return(0,st.Z)({isActive:function(){return xh({expected:"DRAGGING",phase:Nn,isLockActive:Ti,shouldWarn:!1})},shouldRespectForcePress:ni,drop:function(Wl){return Ql("DROP",Wl)},cancel:function(Wl){return Ql("CANCEL",Wl)}},ds.actions)}function To(ds){var Ts=zt(function(Is){qr(function(){return xa({client:Is})})}),Ql=yo({liftActionArgs:{id:xt,clientSelection:ds,movementMode:"FLUID"},cleanup:function(){return Ts.cancel()},actions:{move:Ts}});return(0,st.Z)({},Ql,{move:Ts})}function na(){var ds={moveUp:function(){return qr(Oa)},moveRight:function(){return qr(Mr)},moveDown:function(){return qr(El)},moveLeft:function(){return qr(_s)}};return yo({liftActionArgs:{id:xt,clientSelection:fg(kn),movementMode:"SNAP"},cleanup:Ft,actions:ds})}function Jo(){var ds=xh({expected:"PRE_DRAG",phase:Nn,isLockActive:Ti,shouldWarn:!0});ds&&Ce.release()}var Ia={isActive:function(){return xh({expected:"PRE_DRAG",phase:Nn,isLockActive:Ti,shouldWarn:!1})},shouldRespectForcePress:ni,fluidLift:To,snapLift:na,abort:Jo};return Ia}var Pg=[Ml,cc,Wf];function Hp(Se){var Ce=Se.contextId,Ie=Se.store,Ve=Se.registry,St=Se.customSensors,xt=Se.enableDefaultSensors,It=[].concat(xt?Pg:[],St||[]),Zt=(0,le.useState)(function(){return hh()})[0],Cn=Sn(function(To,na){To.isDragging&&!na.isDragging&&Zt.tryAbandon()},[Zt]);ml(function(){var To=Ie.getState(),na=Ie.subscribe(function(){var Jo=Ie.getState();Cn(To,Jo),To=Jo});return na},[Zt,Ie,Cn]),ml(function(){return Zt.tryAbandon},[Zt.tryAbandon]);var Vn=Sn(function(yo){return xg({lockAPI:Zt,registry:Ve,store:Ie,draggableId:yo})},[Zt,Ve,Ie]),kn=Sn(function(yo,To,na){return Sg({lockAPI:Zt,registry:Ve,contextId:Ce,store:Ie,draggableId:yo,forceSensorStop:To,sourceEvent:na&&na.sourceEvent?na.sourceEvent:null})},[Ce,Zt,Ve,Ie]),An=Sn(function(yo){return vg(Ce,yo)},[Ce]),Nn=Sn(function(yo){var To=Ve.draggable.findById(yo);return To?To.options:null},[Ve.draggable]),ni=Sn(function(){Zt.isClaimed()&&(Zt.tryAbandon(),Ie.getState().phase!=="IDLE"&&Ie.dispatch(jo()))},[Zt,Ie]),Ti=Sn(Zt.isClaimed,[Zt]),Gr=Rn(function(){return{canGetLock:Vn,tryGetLock:kn,findClosestDraggableId:An,findOptionsForDraggable:Nn,tryReleaseLock:ni,isLockClaimed:Ti}},[Vn,kn,An,Nn,ni,Ti]);Gf(It);for(var qr=0;qr<It.length;qr++)It[qr](Gr)}var qg=function(Ce){return{onBeforeCapture:Ce.onBeforeCapture,onBeforeDragStart:Ce.onBeforeDragStart,onDragStart:Ce.onDragStart,onDragEnd:Ce.onDragEnd,onDragUpdate:Ce.onDragUpdate}};function Kd(Se){return Se.current||bn(!1),Se.current}function Vf(Se){var Ce=Se.contextId,Ie=Se.setCallbacks,Ve=Se.sensors,St=Se.nonce,xt=Se.dragHandleUsageInstructions,It=(0,le.useRef)(null);dh();var Zt=Hd(Se),Cn=Sn(function(){return qg(Zt.current)},[Zt]),Vn=Ys(Ce),kn=xc({contextId:Ce,text:xt}),An=Ns(Ce,St),Nn=Sn(function(Is){Kd(It).dispatch(Is)},[]),ni=Rn(function(){return(0,We.DE)({publishWhileDragging:Ir,updateDroppableScroll:fr,updateDroppableIsEnabled:Aa,updateDroppableIsCombineEnabled:_o,collectionStarting:Tr},Nn)},[Nn]),Ti=sc(),Gr=Rn(function(){return ao(Ti,ni)},[Ti,ni]),qr=Rn(function(){return ks((0,st.Z)({scrollWindow:Ka,scrollDroppable:Gr.scrollDroppable},(0,We.DE)({move:xa},Nn)))},[Gr.scrollDroppable,Nn]),yo=$u(Ce),To=Rn(function(){return ka({announce:Vn,autoScroller:qr,dimensionMarshal:Gr,focusMarshal:yo,getResponders:Cn,styleMarshal:An})},[Vn,qr,Gr,yo,Cn,An]);It.current=To;var na=Sn(function(){var Is=Kd(It),Wl=Is.getState();Wl.phase!=="IDLE"&&Is.dispatch(jo())},[]),Jo=Sn(function(){var Is=Kd(It).getState();return Is.isDragging||Is.phase==="DROP_ANIMATING"},[]),Ia=Rn(function(){return{isDragging:Jo,tryAbort:na}},[Jo,na]);Ie(Ia);var ds=Sn(function(Is){return Ta(Kd(It).getState(),Is)},[]),Ts=Sn(function(){return No(Kd(It).getState())},[]),Ql=Rn(function(){return{marshal:Gr,focus:yo,contextId:Ce,canLift:ds,isMovementAllowed:Ts,dragHandleUsageInstructionsId:kn,registry:Ti}},[Ce,Gr,kn,yo,ds,Ts,Ti]);return Hp({contextId:Ce,store:To,registry:Ti,customSensors:Ve,enableDefaultSensors:Se.enableDefaultSensors!==!1}),(0,le.useEffect)(function(){return na},[na]),le.createElement(jd.Provider,{value:Ql},le.createElement(ce,{context:lc,store:To},Se.children))}var gf=0;function ep(){gf=0}function Kf(){return Rn(function(){return""+gf++},[])}function Sh(){ep(),ms()}function wg(Se){var Ce=Kf(),Ie=Se.dragHandleUsageInstructions||Po.dragHandleUsageInstructions;return le.createElement(Ei,null,function(Ve){return le.createElement(Vf,{nonce:Se.nonce,contextId:Ce,setCallbacks:Ve,dragHandleUsageInstructions:Ie,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(Ie){return Ce===Ie}},tp=Ph("scroll"),Uf=Ph("auto"),np=Ph("visible"),As=function(Ce,Ie){return Ie(Ce.overflowX)||Ie(Ce.overflowY)},Zh=function(Ce,Ie){return Ie(Ce.overflowX)&&Ie(Ce.overflowY)},Ud=function(Ce){var Ie=window.getComputedStyle(Ce),Ve={overflowX:Ie.overflowX,overflowY:Ie.overflowY};return As(Ve,tp)||As(Ve,Uf)},iu=function(){return!1;var Ce,Ie,Ve,St},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 Ie=window.getComputedStyle(Ce);return Ie.position==="fixed"?!0:Se(Ce.parentElement)},Eg=function(Se){var Ce=Ru(Se),Ie=Cg(Se);return{closestScrollable:Ce,isFixedOnPage:Ie}},bg=function(Se){var Ce=Se.descriptor,Ie=Se.isEnabled,Ve=Se.isCombineEnabled,St=Se.isFixedOnPage,xt=Se.direction,It=Se.client,Zt=Se.page,Cn=Se.closest,Vn=function(){if(!Cn)return null;var ni=Cn.scrollSize,Ti=Cn.client,Gr=co({scrollHeight:ni.scrollHeight,scrollWidth:ni.scrollWidth,height:Ti.paddingBox.height,width:Ti.paddingBox.width});return{pageMarginBox:Cn.page.marginBox,frameClient:Ti,scrollSize:ni,shouldClipSubject:Cn.shouldClipSubject,scroll:{initial:Cn.scroll,current:Cn.scroll,max:Gr,diff:{value:Wr,displacement:Wr}}}}(),kn=xt==="vertical"?vi:no,An=Qo({page:Zt,withPlaceholder:null,axis:kn,frame:Vn}),Nn={descriptor:Ce,isCombineEnabled:Ve,isFixedOnPage:St,axis:kn,isEnabled:Ie,client:It,page:Zt,frame:Vn,subject:An};return Nn},Fg=function(Ce,Ie){var Ve=wr(Ce);if(!Ie||Ce!==Ie)return Ve;var St=Ve.paddingBox.top-Ie.scrollTop,xt=Ve.paddingBox.left-Ie.scrollLeft,It=St+Ie.scrollHeight,Zt=xt+Ie.scrollWidth,Cn={top:St,right:Zt,bottom:It,left:xt},Vn=Nr(Cn,Ve.border),kn=Gi({borderBox:Vn,margin:Ve.margin,border:Ve.border,padding:Ve.padding});return kn},Bg=function(Se){var Ce=Se.ref,Ie=Se.descriptor,Ve=Se.env,St=Se.windowScroll,xt=Se.direction,It=Se.isDropDisabled,Zt=Se.isCombineEnabled,Cn=Se.shouldClipSubject,Vn=Ve.closestScrollable,kn=Fg(Ce,Vn),An=Be(kn,St),Nn=function(){if(!Vn)return null;var Ti=wr(Vn),Gr={scrollHeight:Vn.scrollHeight,scrollWidth:Vn.scrollWidth};return{client:Ti,page:Be(Ti,St),scroll:wh(Vn),scrollSize:Gr,shouldClipSubject:Cn}}(),ni=bg({descriptor:Ie,isEnabled:!It,isCombineEnabled:Zt,isFixedOnPage:Ve.isFixedOnPage,direction:xt,client:kn,page:An,closest:Nn});return ni},Yd={passive:!1},pf={passive:!0},Ld=function(Se){return Se.shouldPublishImmediately?Yd:pf};function Vs(Se){var Ce=(0,le.useContext)(Se);return Ce||bn(!1),Ce}var Ch=function(Ce){return Ce&&Ce.env.closestScrollable||null};function Mg(Se){var Ce=(0,le.useRef)(null),Ie=Vs(jd),Ve=yl("droppable"),St=Ie.registry,xt=Ie.marshal,It=Hd(Se),Zt=Rn(function(){return{id:Se.droppableId,type:Se.type,mode:Se.mode}},[Se.droppableId,Se.mode,Se.type]),Cn=(0,le.useRef)(Zt),Vn=Rn(function(){return ei(function(Jo,Ia){Ce.current||bn(!1);var ds={x:Jo,y:Ia};xt.updateDroppableScroll(Zt.id,ds)})},[Zt.id,xt]),kn=Sn(function(){var Jo=Ce.current;return!Jo||!Jo.env.closestScrollable?Wr:wh(Jo.env.closestScrollable)},[]),An=Sn(function(){var Jo=kn();Vn(Jo.x,Jo.y)},[kn,Vn]),Nn=Rn(function(){return zt(An)},[An]),ni=Sn(function(){var Jo=Ce.current,Ia=Ch(Jo);Jo&&Ia||bn(!1);var ds=Jo.scrollOptions;if(ds.shouldPublishImmediately){An();return}Nn()},[Nn,An]),Ti=Sn(function(Jo,Ia){Ce.current&&bn(!1);var ds=It.current,Ts=ds.getDroppableRef();Ts||bn(!1);var Ql=Eg(Ts),Is={ref:Ts,descriptor:Zt,env:Ql,scrollOptions:Ia};Ce.current=Is;var Wl=Bg({ref:Ts,descriptor:Zt,env:Ql,windowScroll:Jo,direction:ds.direction,isDropDisabled:ds.isDropDisabled,isCombineEnabled:ds.isCombineEnabled,shouldClipSubject:!ds.ignoreContainerClipping}),_u=Ql.closestScrollable;return _u&&(_u.setAttribute(js.contextId,Ie.contextId),_u.addEventListener("scroll",ni,Ld(Is.scrollOptions))),Wl},[Ie.contextId,Zt,ni,It]),Gr=Sn(function(){var Jo=Ce.current,Ia=Ch(Jo);return Jo&&Ia||bn(!1),wh(Ia)},[]),qr=Sn(function(){var Jo=Ce.current;Jo||bn(!1);var Ia=Ch(Jo);Ce.current=null,Ia&&(Nn.cancel(),Ia.removeAttribute(js.contextId),Ia.removeEventListener("scroll",ni,Ld(Jo.scrollOptions)))},[ni,Nn]),yo=Sn(function(Jo){var Ia=Ce.current;Ia||bn(!1);var ds=Ch(Ia);ds||bn(!1),ds.scrollTop+=Jo.y,ds.scrollLeft+=Jo.x},[]),To=Rn(function(){return{getDimensionAndWatchScroll:Ti,getScrollWhileDragging:Gr,dragStopped:qr,scroll:yo}},[qr,Ti,Gr,yo]),na=Rn(function(){return{uniqueId:Ve,descriptor:Zt,callbacks:To}},[To,Zt,Ve]);ml(function(){return Cn.current=na.descriptor,St.droppable.register(na),function(){Ce.current&&qr(),St.droppable.unregister(na)}},[To,Zt,qr,na,xt,St.droppable]),ml(function(){Ce.current&&xt.updateDroppableIsEnabled(Cn.current.id,!Se.isDropDisabled)},[Se.isDropDisabled,xt]),ml(function(){Ce.current&&xt.updateDroppableIsCombineEnabled(Cn.current.id,Se.isCombineEnabled)},[Se.isCombineEnabled,xt])}function Xd(){}var Eh={width:0,height:0,margin:Yn},mf=function(Ce){var Ie=Ce.isAnimatingOpenOnMount,Ve=Ce.placeholder,St=Ce.animate;return Ie||St==="close"?Eh:{height:Ve.client.borderBox.height,width:Ve.client.borderBox.width,margin:Ve.client.margin}},ip=function(Ce){var Ie=Ce.isAnimatingOpenOnMount,Ve=Ce.placeholder,St=Ce.animate,xt=mf({isAnimatingOpenOnMount:Ie,placeholder:Ve,animate:St});return{display:Ve.display,boxSizing:"border-box",width:xt.width,height:xt.height,marginTop:xt.margin.top,marginRight:xt.margin.right,marginBottom:xt.margin.bottom,marginLeft:xt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:St!=="none"?su.placeholder:null}};function Yl(Se){var Ce=(0,le.useRef)(null),Ie=Sn(function(){Ce.current&&(clearTimeout(Ce.current),Ce.current=null)},[]),Ve=Se.animate,St=Se.onTransitionEnd,xt=Se.onClose,It=Se.contextId,Zt=(0,le.useState)(Se.animate==="open"),Cn=Zt[0],Vn=Zt[1];(0,le.useEffect)(function(){return Cn?Ve!=="open"?(Ie(),Vn(!1),Xd):Ce.current?Xd:(Ce.current=setTimeout(function(){Ce.current=null,Vn(!1)}),Ie):Xd},[Ve,Cn,Ie]);var kn=Sn(function(Nn){Nn.propertyName==="height"&&(St(),Ve==="close"&&xt())},[Ve,xt,St]),An=ip({isAnimatingOpenOnMount:Cn,animate:Se.animate,placeholder:Se.placeholder});return le.createElement(Se.placeholder.tagName,{style:An,"data-rbd-placeholder-context-id":It,onTransitionEnd:kn,ref:Se.innerRef})}var rp=le.memo(Yl),Jd=le.createContext(null);function dd(Se){Se&&$s(Se)||bn(!1)}function bh(Se){return typeof Se=="boolean"}function ie(Se,Ce){Ce.forEach(function(Ie){return Ie(Se)})}var ae=[function(Ce){var Ie=Ce.props;Ie.droppableId||bn(!1),typeof Ie.droppableId!="string"&&bn(!1)},function(Ce){var Ie=Ce.props;bh(Ie.isDropDisabled)||bn(!1),bh(Ie.isCombineEnabled)||bn(!1),bh(Ie.ignoreContainerClipping)||bn(!1)},function(Ce){var Ie=Ce.getDroppableRef;dd(Ie())}],ge=[function(Ce){var Ie=Ce.props,Ve=Ce.getPlaceholderRef;if(Ie.placeholder)var St=Ve()}],fe=[function(Ce){var Ie=Ce.props;Ie.renderClone||bn(!1)},function(Ce){var Ie=Ce.getPlaceholderRef;Ie()&&bn(!1)}];function xe(Se){Bl(function(){ie(Se,ae),Se.props.mode==="standard"&&ie(Se,ge),Se.props.mode==="virtual"&&ie(Se,fe)})}var ke=function(Se){He(Ce,Se);function Ce(){for(var Ve,St=arguments.length,xt=new Array(St),It=0;It<St;It++)xt[It]=arguments[It];return Ve=Se.call.apply(Se,[this].concat(xt))||this,Ve.state={isVisible:!!Ve.props.on,data:Ve.props.on,animate:Ve.props.shouldAnimate&&Ve.props.on?"open":"none"},Ve.onClose=function(){Ve.state.animate==="close"&&Ve.setState({isVisible:!1})},Ve}Ce.getDerivedStateFromProps=function(St,xt){return St.shouldAnimate?St.on?{isVisible:!0,data:St.on,animate:"open"}:xt.isVisible?{isVisible:!0,data:xt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!St.on,data:St.on,animate:"none"}};var Ie=Ce.prototype;return Ie.render=function(){if(!this.state.isVisible)return null;var St={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(St)},Ce}(le.PureComponent),Je={dragging:5e3,dropAnimating:4500},vt=function(Ce,Ie){return Ie?su.drop(Ie.duration):Ce?su.snap:su.fluid},gt=function(Ce,Ie){return Ce?Ie?ac.opacity.drop:ac.opacity.combining:null},jt=function(Ce){return Ce.forceShouldAnimate!=null?Ce.forceShouldAnimate:Ce.mode==="SNAP"};function In(Se){var Ce=Se.dimension,Ie=Ce.client,Ve=Se.offset,St=Se.combineWith,xt=Se.dropping,It=!!St,Zt=jt(Se),Cn=!!xt,Vn=Cn?Au.drop(Ve,It):Au.moveTo(Ve),kn={position:"fixed",top:Ie.marginBox.top,left:Ie.marginBox.left,boxSizing:"border-box",width:Ie.borderBox.width,height:Ie.borderBox.height,transition:vt(Zt,xt),transform:Vn,opacity:gt(It,Cn),zIndex:Cn?Je.dropAnimating:Je.dragging,pointerEvents:"none"};return kn}function Yt(Se){return{transform:Au.moveTo(Se.offset),transition:Se.shouldAnimateDisplacement?null:"none"}}function si(Se){return Se.type==="DRAGGING"?In(Se):Yt(Se)}function ri(Se,Ce,Ie){Ie===void 0&&(Ie=Wr);var Ve=window.getComputedStyle(Ce),St=Ce.getBoundingClientRect(),xt=Fi(St,Ve),It=Be(xt,Ie),Zt={client:xt,tagName:Ce.tagName.toLowerCase(),display:Ve.display},Cn={x:xt.marginBox.width,y:xt.marginBox.height},Vn={descriptor:Se,placeholder:Zt,displaceBy:Cn,client:xt,page:It};return Vn}function er(Se){var Ce=yl("draggable"),Ie=Se.descriptor,Ve=Se.registry,St=Se.getDraggableRef,xt=Se.canDragInteractiveElements,It=Se.shouldRespectForcePress,Zt=Se.isEnabled,Cn=Rn(function(){return{canDragInteractiveElements:xt,shouldRespectForcePress:It,isEnabled:Zt}},[xt,Zt,It]),Vn=Sn(function(ni){var Ti=St();return Ti||bn(!1),ri(Ie,Ti,ni)},[Ie,St]),kn=Rn(function(){return{uniqueId:Ce,descriptor:Ie,options:Cn,getDimension:Vn}},[Ie,Vn,Cn,Ce]),An=(0,le.useRef)(kn),Nn=(0,le.useRef)(!0);ml(function(){return Ve.draggable.register(An.current),function(){return Ve.draggable.unregister(An.current)}},[Ve.draggable]),ml(function(){if(Nn.current){Nn.current=!1;return}var ni=An.current;An.current=kn,Ve.draggable.update(kn,ni)},[kn,Ve.draggable])}function cr(Se,Ce,Ie){Bl(function(){function Ve(xt){return"Draggable[id: "+xt+"]: "}var St=Se.draggableId;St||bn(!1),typeof St!="string"&&bn(!1),qo(Se.index)||bn(!1),Se.mapped.type!=="DRAGGING"&&(dd(Ie()),Se.isEnabled&&(zs(Ce,St)||bn(!1)))})}function Fr(Se){}function so(Se){Se.preventDefault()}function Zo(Se){var Ce=(0,le.useRef)(null),Ie=Sn(function(Is){Ce.current=Is},[]),Ve=Sn(function(){return Ce.current},[]),St=Vs(jd),xt=St.contextId,It=St.dragHandleUsageInstructionsId,Zt=St.registry,Cn=Vs(Jd),Vn=Cn.type,kn=Cn.droppableId,An=Rn(function(){return{id:Se.draggableId,index:Se.index,type:Vn,droppableId:kn}},[Se.draggableId,Se.index,Vn,kn]),Nn=Se.children,ni=Se.draggableId,Ti=Se.isEnabled,Gr=Se.shouldRespectForcePress,qr=Se.canDragInteractiveElements,yo=Se.isClone,To=Se.mapped,na=Se.dropAnimationFinished;if(cr(Se,xt,Ve),Fr(yo),!yo){var Jo=Rn(function(){return{descriptor:An,registry:Zt,getDraggableRef:Ve,canDragInteractiveElements:qr,shouldRespectForcePress:Gr,isEnabled:Ti}},[An,Zt,Ve,qr,Gr,Ti]);er(Jo)}var Ia=Rn(function(){return Ti?{tabIndex:0,role:"button","aria-describedby":It,"data-rbd-drag-handle-draggable-id":ni,"data-rbd-drag-handle-context-id":xt,draggable:!1,onDragStart:so}:null},[xt,It,ni,Ti]),ds=Sn(function(Is){To.type==="DRAGGING"&&To.dropping&&Is.propertyName==="transform"&&na()},[na,To]),Ts=Rn(function(){var Is=si(To),Wl=To.type==="DRAGGING"&&To.dropping?ds:null,_u={innerRef:Ie,draggableProps:{"data-rbd-draggable-context-id":xt,"data-rbd-draggable-id":ni,style:Is,onTransitionEnd:Wl},dragHandleProps:Ia};return _u},[xt,Ia,ni,To,ds,Ie]),Ql=Rn(function(){return{draggableId:An.id,type:An.type,source:{index:An.index,droppableId:An.droppableId}}},[An.droppableId,An.id,An.index,An.type]);return Nn(Ts,To.snapshot,Ql)}var Bo=function(Se,Ce){return Se===Ce},ea=function(Se){var Ce=Se.combine,Ie=Se.destination;return Ie?Ie.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 rs(){var Se=ei(function(St,xt){return{x:St,y:xt}}),Ce=ei(function(St,xt,It,Zt,Cn){return{isDragging:!0,isClone:xt,isDropAnimating:!!Cn,dropAnimation:Cn,mode:St,draggingOver:It,combineWith:Zt,combineTargetFor:null}}),Ie=ei(function(St,xt,It,Zt,Cn,Vn,kn){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Cn,combineWith:Vn,mode:xt,offset:St,dimension:It,forceShouldAnimate:kn,snapshot:Ce(xt,Zt,Cn,Vn,null)}}}),Ve=function(xt,It){if(xt.isDragging){if(xt.critical.draggable.id!==It.draggableId)return null;var Zt=xt.current.client.offset,Cn=xt.dimensions.draggables[It.draggableId],Vn=$o(xt.impact),kn=Mo(xt.impact),An=xt.forceShouldAnimate;return Ie(Se(Zt.x,Zt.y),xt.movementMode,Cn,It.isClone,Vn,kn,An)}if(xt.phase==="DROP_ANIMATING"){var Nn=xt.completed;if(Nn.result.draggableId!==It.draggableId)return null;var ni=It.isClone,Ti=xt.dimensions.draggables[It.draggableId],Gr=Nn.result,qr=Gr.mode,yo=ea(Gr),To=_a(Gr),na=xt.dropDuration,Jo={duration:na,curve:Rc.drop,moveTo:xt.newHomeClientOffset,opacity:To?ac.opacity.drop:null,scale:To?ac.scale.drop:null};return{mapped:{type:"DRAGGING",offset:xt.newHomeClientOffset,dimension:Ti,dropping:Jo,draggingOver:yo,combineWith:To,mode:qr,forceShouldAnimate:null,snapshot:Ce(qr,ni,yo,To,Jo)}}}return null};return Ve}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:Wr,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:rl(null)}};function xl(){var Se=ei(function(It,Zt){return{x:It,y:Zt}}),Ce=ei(rl),Ie=ei(function(It,Zt,Cn){return Zt===void 0&&(Zt=null),{mapped:{type:"SECONDARY",offset:It,combineTargetFor:Zt,shouldAnimateDisplacement:Cn,snapshot:Ce(Zt)}}}),Ve=function(Zt){return Zt?Ie(Wr,Zt,!0):null},St=function(Zt,Cn,Vn,kn){var An=Vn.displaced.visible[Zt],Nn=!!(kn.inVirtualList&&kn.effected[Zt]),ni=hs(Vn),Ti=ni&&ni.draggableId===Zt?Cn:null;if(!An){if(!Nn)return Ve(Ti);if(Vn.displaced.invisible[Zt])return null;var Gr=Hi(kn.displacedBy.point),qr=Se(Gr.x,Gr.y);return Ie(qr,Ti,!0)}if(Nn)return Ve(Ti);var yo=Vn.displacedBy.point,To=Se(yo.x,yo.y);return Ie(To,Ti,An.shouldAnimate)},xt=function(Zt,Cn){if(Zt.isDragging)return Zt.critical.draggable.id===Cn.draggableId?null:St(Cn.draggableId,Zt.critical.draggable.id,Zt.impact,Zt.afterCritical);if(Zt.phase==="DROP_ANIMATING"){var Vn=Zt.completed;return Vn.result.draggableId===Cn.draggableId?null:St(Cn.draggableId,Vn.result.draggableId,Vn.impact,Vn.afterCritical)}return null};return xt}var Uu=function(){var Ce=rs(),Ie=xl(),Ve=function(xt,It){return Ce(xt,It)||Ie(xt,It)||ru};return Ve},wu={dropAnimationFinished:Tc},Xl=ht(Uu,wu,null,{context:lc,pure:!0,areStatePropsEqual:Bo})(Zo);function Yu(Se){var Ce=Vs(Jd),Ie=Ce.isUsingCloneFor;return Ie===Se.draggableId&&!Se.isClone?null:le.createElement(Xl,Se)}function hu(Se){var Ce=typeof Se.isDragDisabled=="boolean"?!Se.isDragDisabled:!0,Ie=!!Se.disableInteractiveElementBlocking,Ve=!!Se.shouldRespectForcePress;return le.createElement(Yu,(0,st.Z)({},Se,{isClone:!1,isEnabled:Ce,canDragInteractiveElements:Ie,shouldRespectForcePress:Ve}))}function Jl(Se){var Ce=(0,le.useContext)(jd);Ce||bn(!1);var Ie=Ce.contextId,Ve=Ce.isMovementAllowed,St=(0,le.useRef)(null),xt=(0,le.useRef)(null),It=Se.children,Zt=Se.droppableId,Cn=Se.type,Vn=Se.mode,kn=Se.direction,An=Se.ignoreContainerClipping,Nn=Se.isDropDisabled,ni=Se.isCombineEnabled,Ti=Se.snapshot,Gr=Se.useClone,qr=Se.updateViewportMaxScroll,yo=Se.getContainerForClone,To=Sn(function(){return St.current},[]),na=Sn(function(Xu){St.current=Xu},[]),Jo=Sn(function(){return xt.current},[]),Ia=Sn(function(Xu){xt.current=Xu},[]);xe({props:Se,getDroppableRef:To,getPlaceholderRef:Jo});var ds=Sn(function(){Ve()&&qr({maxScroll:Fo()})},[Ve,qr]);Mg({droppableId:Zt,type:Cn,mode:Vn,direction:kn,isDropDisabled:Nn,isCombineEnabled:ni,ignoreContainerClipping:An,getDroppableRef:To});var Ts=le.createElement(ke,{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:Ia,animate:wc,contextId:Ie,onTransitionEnd:ds})}),Ql=Rn(function(){return{innerRef:na,placeholder:Ts,droppableProps:{"data-rbd-droppable-id":Zt,"data-rbd-droppable-context-id":Ie}}},[Ie,Zt,Ts,na]),Is=Gr?Gr.dragging.draggableId:null,Wl=Rn(function(){return{droppableId:Zt,type:Cn,isUsingCloneFor:Is}},[Zt,Is,Cn]);function _u(){if(!Gr)return null;var Xu=Gr.dragging,hd=Gr.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 pn.createPortal(Lc,yo())}return le.createElement(Jd.Provider,{value:Wl},It(Ql,Ti),_u())}var Ds=function(Ce,Ie){return Ce===Ie.droppable.type},Sl=function(Ce,Ie){return Ie.draggables[Ce.draggable.id]},uu=function(){var Ce={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},Ie=(0,st.Z)({},Ce,{shouldAnimatePlaceholder:!1}),Ve=ei(function(It){return{draggableId:It.id,type:It.type,source:{index:It.index,droppableId:It.droppableId}}}),St=ei(function(It,Zt,Cn,Vn,kn,An){var Nn=kn.descriptor.id,ni=kn.descriptor.droppableId===It;if(ni){var Ti=An?{render:An,dragging:Ve(kn.descriptor)}:null,Gr={isDraggingOver:Cn,draggingOverWith:Cn?Nn:null,draggingFromThisWith:Nn,isUsingPlaceholder:!0};return{placeholder:kn.placeholder,shouldAnimatePlaceholder:!1,snapshot:Gr,useClone:Ti}}if(!Zt)return Ie;if(!Vn)return Ce;var qr={isDraggingOver:Cn,draggingOverWith:Nn,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:kn.placeholder,shouldAnimatePlaceholder:!0,snapshot:qr,useClone:null}}),xt=function(Zt,Cn){var Vn=Cn.droppableId,kn=Cn.type,An=!Cn.isDropDisabled,Nn=Cn.renderClone;if(Zt.isDragging){var ni=Zt.critical;if(!Ds(kn,ni))return Ie;var Ti=Sl(ni,Zt.dimensions),Gr=$o(Zt.impact)===Vn;return St(Vn,An,Gr,Gr,Ti,Nn)}if(Zt.phase==="DROP_ANIMATING"){var qr=Zt.completed;if(!Ds(kn,qr.critical))return Ie;var yo=Sl(qr.critical,Zt.dimensions);return St(Vn,An,ea(qr.result)===Vn,$o(qr.impact)===Vn,yo,Nn)}if(Zt.phase==="IDLE"&&Zt.completed&&!Zt.shouldFlush){var To=Zt.completed;if(!Ds(kn,To.critical))return Ie;var na=$o(To.impact)===Vn,Jo=!!(To.impact.at&&To.impact.at.type==="COMBINE"),Ia=To.critical.droppable.id===Vn;return na?Jo?Ce:Ie:Ia?Ce:Ie}return Ie};return xt},fu={updateViewportMaxScroll:wo};function jc(){return document.body||bn(!1),document.body}var Pl={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:jc},Pc=ht(uu,fu,null,{context:lc,pure:!0,areStatePropsEqual:Bo})(Jl);Pc.defaultProps=Pl},38486:function(_n,yn){"use strict";var me;var le=60103,Te=60106,He=60107,st=60108,We=60114,ct=60109,Me=60110,bt=60112,Pt=60113,Ge=60120,ut=60115,mt=60116,yt=60121,De=60122,te=60117,ee=60129,ce=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;le=se("react.element"),Te=se("react.portal"),He=se("react.fragment"),st=se("react.strict_mode"),We=se("react.profiler"),ct=se("react.provider"),Me=se("react.context"),bt=se("react.forward_ref"),Pt=se("react.suspense"),Ge=se("react.suspense_list"),ut=se("react.memo"),mt=se("react.lazy"),yt=se("react.block"),De=se("react.server.block"),te=se("react.fundamental"),ee=se("react.debug_trace_mode"),ce=se("react.legacy_hidden")}function he(Lt){if(typeof Lt=="object"&&Lt!==null){var rt=Lt.$$typeof;switch(rt){case le:switch(Lt=Lt.type,Lt){case He:case We:case st:case Pt:case Ge:return Lt;default:switch(Lt=Lt&&Lt.$$typeof,Lt){case Me:case bt:case mt:case ut:case ct:return Lt;default:return rt}}case Te:return rt}}}var ve=ct,Ee=le,Le=bt,Ne=He,je=mt,ze=ut,Ye=Te,Xe=We,lt=st,Ze=Pt;me=Me,me=ve,me=Ee,me=Le,me=Ne,me=je,me=ze,me=Ye,me=Xe,me=lt,me=Ze,me=function(){return!1},me=function(){return!1},yn.isContextConsumer=function(Lt){return he(Lt)===Me},me=function(Lt){return he(Lt)===ct},me=function(Lt){return typeof Lt=="object"&&Lt!==null&&Lt.$$typeof===le},me=function(Lt){return he(Lt)===bt},me=function(Lt){return he(Lt)===He},me=function(Lt){return he(Lt)===mt},me=function(Lt){return he(Lt)===ut},me=function(Lt){return he(Lt)===Te},me=function(Lt){return he(Lt)===We},me=function(Lt){return he(Lt)===st},me=function(Lt){return he(Lt)===Pt},me=function(Lt){return typeof Lt=="string"||typeof Lt=="function"||Lt===He||Lt===We||Lt===ee||Lt===st||Lt===Pt||Lt===Ge||Lt===ce||typeof Lt=="object"&&Lt!==null&&(Lt.$$typeof===mt||Lt.$$typeof===ut||Lt.$$typeof===ct||Lt.$$typeof===Me||Lt.$$typeof===bt||Lt.$$typeof===te||Lt.$$typeof===yt||Lt[0]===De)},me=he},53410:function(_n,yn,me){"use strict";_n.exports=me(38486)},32637:function(_n,yn,me){"use strict";_n.exports=me.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(_n){"use strict";_n.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(_n){"use strict";_n.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},31328:function(_n){"use strict";_n.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(_n){"use strict";_n.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(_n){"use strict";_n.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(_n){"use strict";_n.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(_n,yn,me){"use strict";me.d(yn,{Z:function(){return bt}});const le=Pt=>typeof Pt=="object"&&Pt!=null&&Pt.nodeType===1,Te=(Pt,Ge)=>(!Ge||Pt!=="hidden")&&Pt!=="visible"&&Pt!=="clip",He=(Pt,Ge)=>{if(Pt.clientHeight<Pt.scrollHeight||Pt.clientWidth<Pt.scrollWidth){const ut=getComputedStyle(Pt,null);return Te(ut.overflowY,Ge)||Te(ut.overflowX,Ge)||(mt=>{const yt=(De=>{if(!De.ownerDocument||!De.ownerDocument.defaultView)return null;try{return De.ownerDocument.defaultView.frameElement}catch(te){return null}})(mt);return!!yt&&(yt.clientHeight<mt.scrollHeight||yt.clientWidth<mt.scrollWidth)})(Pt)}return!1},st=(Pt,Ge,ut,mt,yt,De,te,ee)=>De<Pt&&te>Ge||De>Pt&&te<Ge?0:De<=Pt&&ee<=ut||te>=Ge&&ee>=ut?De-Pt-mt:te>Ge&&ee<ut||De<Pt&&ee>ut?te-Ge+yt:0,We=Pt=>{const Ge=Pt.parentElement;return Ge==null?Pt.getRootNode().host||null:Ge},ct=(Pt,Ge)=>{var ut,mt,yt,De;if(typeof document=="undefined")return[];const{scrollMode:te,block:ee,inline:ce,boundary:se,skipOverflowHiddenElements:he}=Ge,ve=typeof se=="function"?se:xn=>xn!==se;if(!le(Pt))throw new TypeError("Invalid target");const Ee=document.scrollingElement||document.documentElement,Le=[];let Ne=Pt;for(;le(Ne)&&ve(Ne);){if(Ne=We(Ne),Ne===Ee){Le.push(Ne);break}Ne!=null&&Ne===document.body&&He(Ne)&&!He(document.documentElement)||Ne!=null&&He(Ne,he)&&Le.push(Ne)}const je=(mt=(ut=window.visualViewport)==null?void 0:ut.width)!=null?mt:innerWidth,ze=(De=(yt=window.visualViewport)==null?void 0:yt.height)!=null?De:innerHeight,{scrollX:Ye,scrollY:Xe}=window,{height:lt,width:Ze,top:Lt,right:rt,bottom:Ot,left:wt}=Pt.getBoundingClientRect(),{top:Dt,right:Wt,bottom:Mt,left:et}=(xn=>{const _t=window.getComputedStyle(xn);return{top:parseFloat(_t.scrollMarginTop)||0,right:parseFloat(_t.scrollMarginRight)||0,bottom:parseFloat(_t.scrollMarginBottom)||0,left:parseFloat(_t.scrollMarginLeft)||0}})(Pt);let Ue=ee==="start"||ee==="nearest"?Lt-Dt:ee==="end"?Ot+Mt:Lt+lt/2-Dt+Mt,Rt=ce==="center"?wt+Ze/2-et+Wt:ce==="end"?rt+Wt:wt-et;const Pn=[];for(let xn=0;xn<Le.length;xn++){const _t=Le[xn],{height:qt,width:cn,top:Gn,right:gn,bottom:Zn,left:Ct}=_t.getBoundingClientRect();if(te==="if-needed"&&Lt>=0&&wt>=0&&Ot<=ze&&rt<=je&&(_t===Ee&&!He(_t)||Lt>=Gn&&Ot<=Zn&&wt>=Ct&&rt<=gn))return Pn;const Wn=getComputedStyle(_t),di=parseInt(Wn.borderLeftWidth,10),Kt=parseInt(Wn.borderTopWidth,10),ln=parseInt(Wn.borderRightWidth,10),$t=parseInt(Wn.borderBottomWidth,10);let Tt=0,ft=0;const $e="offsetWidth"in _t?_t.offsetWidth-_t.clientWidth-di-ln:0,Gt="offsetHeight"in _t?_t.offsetHeight-_t.clientHeight-Kt-$t:0,Ht="offsetWidth"in _t?_t.offsetWidth===0?0:cn/_t.offsetWidth:0,ht="offsetHeight"in _t?_t.offsetHeight===0?0:qt/_t.offsetHeight:0;if(Ee===_t)Tt=ee==="start"?Ue:ee==="end"?Ue-ze:ee==="nearest"?st(Xe,Xe+ze,ze,Kt,$t,Xe+Ue,Xe+Ue+lt,lt):Ue-ze/2,ft=ce==="start"?Rt:ce==="center"?Rt-je/2:ce==="end"?Rt-je:st(Ye,Ye+je,je,di,ln,Ye+Rt,Ye+Rt+Ze,Ze),Tt=Math.max(0,Tt+Xe),ft=Math.max(0,ft+Ye);else{Tt=ee==="start"?Ue-Gn-Kt:ee==="end"?Ue-Zn+$t+Gt:ee==="nearest"?st(Gn,Zn,qt,Kt,$t+Gt,Ue,Ue+lt,lt):Ue-(Gn+qt/2)+Gt/2,ft=ce==="start"?Rt-Ct-di:ce==="center"?Rt-(Ct+cn/2)+$e/2:ce==="end"?Rt-gn+ln+$e:st(Ct,gn,cn,di,ln+$e,Rt,Rt+Ze,Ze);const{scrollLeft:at,scrollTop:Re}=_t;Tt=ht===0?0:Math.max(0,Math.min(Re+Tt/ht,_t.scrollHeight-qt/ht+Gt)),ft=Ht===0?0:Math.max(0,Math.min(at+ft/Ht,_t.scrollWidth-cn/Ht+$e)),Ue+=Re-Tt,Rt+=at-ft}Pn.push({el:_t,top:Tt,left:ft})}return Pn},Me=Pt=>Pt===!1?{block:"end",inline:"nearest"}:(Ge=>Ge===Object(Ge)&&Object.keys(Ge).length!==0)(Pt)?Pt:{block:"start",inline:"nearest"};function bt(Pt,Ge){if(!Pt.isConnected||!(yt=>{let De=yt;for(;De&&De.parentNode;){if(De.parentNode===document)return!0;De=De.parentNode instanceof ShadowRoot?De.parentNode.host:De.parentNode}return!1})(Pt))return;const ut=(yt=>{const De=window.getComputedStyle(yt);return{top:parseFloat(De.scrollMarginTop)||0,right:parseFloat(De.scrollMarginRight)||0,bottom:parseFloat(De.scrollMarginBottom)||0,left:parseFloat(De.scrollMarginLeft)||0}})(Pt);if((yt=>typeof yt=="object"&&typeof yt.behavior=="function")(Ge))return Ge.behavior(ct(Pt,Ge));const mt=typeof Ge=="boolean"||Ge==null?void 0:Ge.behavior;for(const{el:yt,top:De,left:te}of ct(Pt,Me(Ge))){const ee=De-ut.top+ut.bottom,ce=te-ut.left+ut.right;yt.scroll({top:ee,left:ce,behavior:mt})}}}}]);