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(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},59477:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},40001:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},49198:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},87169:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},73331:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},15277:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},52671:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},8657:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},56082:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},33853:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},12893:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},15075:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},32134:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},43531:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},61485:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},38819:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},47472:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function($e,Ft){return Te.createElement(We.Z,(0,le.Z)({},$e,{ref:Ft,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me},78780:function(){"use strict"},19136:function(){"use strict"},11570:function(On,mn){"use strict";mn.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},31687:function(On,mn){"use strict";mn.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},64686:function(On,mn,pe){"use strict";var le=pe(59301),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ue=(Pt,$e,Ft)=>$e in Pt?Te(Pt,$e,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):Pt[$e]=Ft,Me=(Pt,$e)=>{for(var Ft in $e||($e={}))ut.call($e,Ft)&&Ue(Pt,Ft,$e[Ft]);if(He)for(var Ft of He($e))We.call($e,Ft)&&Ue(Pt,Ft,$e[Ft]);return Pt};const Ct=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"})));mn.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},29277:function(){"use strict";function On(Oe,te,ee,de){ee===void 0&&(ee=0),de===void 0&&(de=1/0),this._name=Oe,this._defaultValue=te,this._minimum=ee,this._maximum=de}Object.defineProperty(On.prototype,"name",{get:function(){return this._name},set:function(Oe){if(typeof Oe!="string"||Oe==="")throw new Error("Shape name must be a valid string.");this._name=Oe}}),Object.defineProperty(On.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Oe){if(typeof Oe!="number"||isNaN(Oe))throw new Error("The default value must be a real number, not: "+Oe);this._defaultValue=Oe}}),Object.defineProperty(On.prototype,"minimum",{get:function(){return this._minimum},set:function(Oe){if(typeof Oe!="number"||isNaN(Oe))throw new Error("Minimum must be a real number, not: "+Oe);this._minimum=Oe}}),Object.defineProperty(On.prototype,"maximum",{get:function(){return this._maximum},set:function(Oe){if(typeof Oe!="number"||isNaN(Oe))throw new Error("Maximum must be a real number, not: "+Oe);this._maximum=Oe}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Oe,te){var ee=go.Shape._FigureParameters[Oe];return ee?ee[te]:null},go.Shape.setFigureParameter=function(Oe,te,ee){if(!(ee instanceof On))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+ee);if(ee.defaultValue<ee.minimum||ee.defaultValue>ee.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+ee.defaultValue);var de=go.Shape._FigureParameters[Oe];de||(de=[],go.Shape._FigureParameters[Oe]=de),de[te]=ee};var mn=[];function pe(Oe,te){var ee=mn.pop();return ee===void 0?new go.Point(Oe,te):(ee.x=Oe,ee.y=te,ee)}function le(){var Oe=mn.pop();return Oe===void 0?new go.Point:Oe}function Te(Oe){mn.push(Oe)}function He(Oe,te,ee,de,se,he,ve,Ee,Be){Be||(Be=new go.Point);var Le=Oe-ee,ze=se-ve,je=NaN,Xe=NaN;if(Le===0)if(ze===0)Oe===ee&&(je=Oe,Xe=te);else{var Ye=(he-Ee)/ze,dt=he-Ye*se;je=Oe,Xe=Ye*je+dt}else if(ze===0){var Ze=(te-de)/Le,Nt=te-Ze*Oe;je=se,Xe=Ze*je+Nt}else{var Ze=(te-de)/Le,Ye=(he-Ee)/ze,Nt=te-Ze*Oe,dt=he-Ye*se;je=(dt-Nt)/(Ze-Ye),Xe=Ze*je+Nt}return Be.x=je,Be.y=Xe,Be}function ut(Oe,te,ee,de,se,he,ve,Ee,Be,Le,ze,je,Xe,Ye){var dt=1-Be,Ze=Be,Nt=Oe*dt+ee*Ze,at=te*dt+de*Ze,kt=ee*dt+se*Ze,xt=de*dt+he*Ze,Ot=se*dt+ve*Ze,Gt=he*dt+Ee*Ze,At=Nt*dt+kt*Ze,qe=at*dt+xt*Ze,Ve=kt*dt+Ot*Ze,_t=xt*dt+Gt*Ze,vn=At*dt+Ve*Ze,yn=qe*dt+_t*Ze;Le.x=Nt,Le.y=at,ze.x=At,ze.y=qe,je.x=vn,je.y=yn,Xe.x=Ve,Xe.y=_t,Ye.x=Ot,Ye.y=Gt}var We=new go.Spot(.156,.156),Ue=new go.Spot(.844,.844),Me=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new On("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=5),de=Math.min(de,te/3),de=Math.min(de,ee/3);var se=de*Me,he=new go.Geometry().add(new go.PathFigure(de,0,!0).add(new go.PathSegment(go.PathSegment.Line,te-de,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,de,te-se,0,te,se)).add(new go.PathSegment(go.PathSegment.Line,te,ee-de)).add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,ee-se,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,de,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,se,ee,0,ee-se)).add(new go.PathSegment(go.PathSegment.Line,0,de)).add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,se,se,0).close()));return se>1&&(he.spot1=new go.Spot(0,0,se,se),he.spot2=new go.Spot(1,1,-se,-se)),he}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(te,ee).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Oe,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=0,de.startY=ee/2,de.endX=te,de.endY=ee/2,de}),go.Shape.defineFigureGenerator("LineV",function(Oe,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=te/2,de.startY=0,de.endX=te/2,de.endY=ee,de}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee/2,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("XLine",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LineRight",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(.25*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)))}),go.Shape.defineFigureGenerator("LineDown",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,.25*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)))}),go.Shape.defineFigureGenerator("LineLeft",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(.75*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)))}),go.Shape.defineFigureGenerator("LineUp",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,.75*ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Oe,te,ee){var de=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(de*te,(1-de)*ee,!1).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,de*ee)).add(new go.PathSegment(go.PathSegment.Move,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee/2)).add(new go.PathSegment(go.PathSegment.Line,te,ee/2)).add(new go.PathSegment(go.PathSegment.Move,te/2,0)).add(new go.PathSegment(go.PathSegment.Line,te/2,ee)))}),go.Shape.defineFigureGenerator("CircleLine",function(Oe,te,ee){var de=te/2,se=new go.Geometry().add(new go.PathFigure(te,te/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,de,de,de,de).close()));return se.spot1=We,se.spot2=Ue,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Oe,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=0,de.startY=0,de.endX=te,de.endY=ee,de}),go.Shape.defineFigureGenerator("Line2",function(Oe,te,ee){var de=new go.Geometry(go.Geometry.Line);return de.startX=te,de.startY=0,de.endX=0,de.endY=ee,de}),go.Shape.defineFigureGenerator("Curve1",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Me*te,0,te,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("Curve2",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,te,ee,0,Me*ee,(1-Me)*te,ee)))}),go.Shape.defineFigureGenerator("Curve3",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,Me*ee,Me*te,ee)))}),go.Shape.defineFigureGenerator("Curve4",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,(1-Me)*te,0,0,(1-Me)*ee)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(te,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new On("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=.1:de<-1?de=-1:de>1&&(de=1);var se=Math.abs(de)*te;if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new On("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=10:de<-te?de=-te:de>te&&(de=te);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.setFigureParameter("Trapezoid1",0,new On("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=.2:de<.5?de=-.5:de>.5&&(de=.5);var se=Math.abs(de)*te;if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new On("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=20:de<-te?de=-te/2:de>te&&(de=te/2);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())):he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}}),go.Shape.setFigureParameter("ManualOperation",0,new On("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)?de=10:de<-te?de=-te/2:de>te&&(de=te/2);var se=Math.abs(de);if(de===0){var he=new go.Geometry(go.Geometry.Rectangle);return he.startX=0,he.startY=0,he.endX=te,he.endY=ee,he}else{var he=new go.Geometry;return de>0?he.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te-se,ee)).add(new go.PathSegment(go.PathSegment.Line,se,ee).close())):he.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,te-se,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close())),se<te/2&&he.setSpots(se/te,0,(te-se)/te,1),he}});var Ct=[];function Pt(){var Oe=Ct.pop();return Oe===void 0?[]:Oe}function $e(Oe){Oe.length=0,Ct.push(Oe)}function Ft(Oe){for(var te=Pt(),ee=.5,de=.5,se=Math.PI*1.5,he=0,ve=0;ve<Oe;ve++)he=2*Math.PI/Oe*ve+se,te[ve]=new go.Point(de+ee*Math.cos(he),de+ee*Math.sin(he));return te.push(te[0]),te}function lt(Oe){var te=vt(Oe),ee=Pt();ee[0]=te[0];for(var de=1,se=1;de<te.length;de+=2,se+=3)ee[se]=te[de],ee[se+1]=te[de],ee[se+2]=te[de+1];return $e(te),ee}function vt(Oe){for(var te=Ft(Oe),ee=Pt(),de=Math.floor(te.length/2),se=te.length-1,he=Oe%2===0?2:1,ve=0;ve<se;ve++){var Ee=te[ve],Be=te[ve+1],Le=te[(de+ve-1)%se],ze=te[(de+ve+he)%se];ee[ve*2]=Ee,ee[ve*2+1]=He(Ee.x,Ee.y,Le.x,Le.y,Be.x,Be.y,ze.x,ze.y,new go.Point)}return ee[ee.length]=ee[0],$e(te),ee}go.Shape.defineFigureGenerator("Pentagon",function(Oe,te,ee){var de=Ft(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<5;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Oe,te,ee){var de=Ft(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<6;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Oe,te,ee){var de=Ft(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<7;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Oe,te,ee){var de=Ft(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<8;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Oe,te,ee){var de=Ft(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<9;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Oe,te,ee){var de=Ft(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Oe,te,ee){var de=Ft(12),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Oe,te,ee){var de=vt(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<10;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Oe,te,ee){var de=vt(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<12;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Oe,te,ee){var de=vt(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<14;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Oe,te,ee){var de=vt(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<16;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Oe,te,ee){var de=vt(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<18;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Oe,te,ee){var de=vt(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<20;ve++)he.add(new go.PathSegment(go.PathSegment.Line,de[ve].x*te,de[ve].y*ee));return he.add(new go.PathSegment(go.PathSegment.Line,de[0].x*te,de[0].y*ee).close()),$e(de),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Oe,te,ee){var de=lt(5),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Oe,te,ee){var de=lt(6),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Oe,te,ee){var de=lt(7),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Oe,te,ee){var de=lt(8),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Oe,te,ee){var de=lt(9),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Oe,te,ee){var de=lt(10),se=new go.Geometry,he=new go.PathFigure(de[0].x*te,de[0].y*ee,!0);se.add(he);for(var ve=1;ve<de.length;ve+=3)he.add(new go.PathSegment(go.PathSegment.Bezier,de[ve+2].x*te,de[ve+2].y*ee,de[ve].x*te,de[ve].y*ee,de[ve+1].x*te,de[ve+1].y*ee));return he.segments.last().close(),$e(de),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new On("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new On("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN,se=Oe?Oe.parameter2:NaN;isNaN(de)&&(de=8),isNaN(se)&&(se=8);var he=new go.Geometry,ve=new go.PathFigure(0,0,!0);return he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de<te/2&&se<ee/2&&(ve.add(new go.PathSegment(go.PathSegment.Move,de,se)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,se).close())),he.setSpots(0,0,1,1,de,se,-de,-se),he}),go.Shape.setFigureParameter("Ring",0,new On("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=8);var se=te/2,he=new go.Geometry,ve=new go.PathFigure(te,te/2,!0);he.add(ve),ve.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var Ee=Math.max(se-de,0);return Ee>0&&(ve.add(new go.PathSegment(go.PathSegment.Move,te/2+Ee,te/2)),ve.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,Ee,Ee).close())),he.spot1=We,he.spot2=Ue,he.defaultStretch=go.GraphObject.Uniform,he}),go.Shape.defineFigureGenerator("Cloud",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(.08034461*te,.1944299*ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*te,.05349299*ee,-.09239631*te,.07836421*ee,.1406031*te,-.0542823*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*te,.074219*ee,.2450511*te,-.00697547*ee,.3776197*te,-.01112067*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*te,.07004196*ee,.4539471*te,0,.6066018*te,-.02526587*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*te,.08370865*ee,.6914277*te,-.01904177*ee,.8921095*te,-.01220843*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*te,.3194596*ee,1.036446*te,.04105738*ee,1.020377*te,.3022052*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*te,.562044*ee,1.04448*te,.360238*ee,.992256*te,.5219009*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*te,.8217117*ee,1.032337*te,.5771781*ee,1.018411*te,.8120651*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*te,.9156953*ee,1.028411*te,.9571472*ee,.8556702*te,1.052487*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*te,.9310455*ee,.7431877*te,1.009325*ee,.5624123*te,1.021761*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*te,.9344623*ee,.4820677*te,1.031761*ee,.3030112*te,1.002796*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.870098*ee,.2329994*te,1.01518*ee,.03213784*te,1.01518*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*te,.6545475*ee,-.02812061*te,.9032597*ee,-.01205169*te,.6835638*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*te,.4265613*ee,-.01812061*te,.6089503*ee,-.00606892*te,.4555777*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*te,.1944299*ee,-.01606892*te,.3892545*ee,-.01205169*te,.1944299*ee))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Oe,te,ee){var de=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(de*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,te,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Line,de*te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,(1-de)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,de*ee).close())).setSpots(de/2,de/2,1-de/2,1-de/2)}),go.Shape.setFigureParameter("Pie",0,new On("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new On("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN,se=Oe?Oe.parameter2:NaN;isNaN(de)&&(de=0),isNaN(se)&&(se=315);var he=de%360;he<0&&(he+=360);var ve=se%360,Ee=Math.min(te,ee)/2;return new go.Geometry().add(new go.PathFigure(Ee,Ee).add(new go.PathSegment(go.PathSegment.Arc,he,ve,Ee,Ee,Ee,Ee).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Oe,te,ee){var de=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-de)*ee,(se+de)*te,(he+de)*ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()))}),go.Shape.setFigureParameter("ThickCross",0,new On("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=30);var se=Math.min(de,te)/2,he=te/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new On("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=10);var se=Math.min(de,te)/2,he=te/2,ve=ee/2;return new go.Geometry().add(new go.PathFigure(he-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,he+se,0)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve-se)).add(new go.PathSegment(go.PathSegment.Line,te,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,he+se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ee)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,he-se,ve-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new On("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;if((isNaN(de)||de<0)&&(de=30),te===0||ee===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=te,se.endY=ee,se}else{var he=te/2,ve=ee/2,Ee=Math.atan2(ee,te),Be=de-Math.min(Math.cos(Ee)*de/2,he),Le=de-Math.min(Math.sin(Ee)*de/2,ve),se=new go.Geometry,ze=new go.PathFigure(Be,0,!0);return se.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,he,.2*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,te-Be,0)),ze.add(new go.PathSegment(go.PathSegment.Line,te,Le)),ze.add(new go.PathSegment(go.PathSegment.Line,.8*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,te,ee-Le)),ze.add(new go.PathSegment(go.PathSegment.Line,te-Be,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,he,.8*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,Be,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,0,ee-Le)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Le).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new On("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=10);var se=new go.Geometry,he=new go.PathFigure(.1*te,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new On("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.2);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+de/2)*te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5+de/2)*te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-de/2)*te,(1-de)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(.5-de/2)*te,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,de*ee).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new On("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.5);var se=new go.Geometry,he=new go.PathFigure(0,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,Math.abs(1-de)*te,.25*ee,Math.abs(1-de)*te,.75*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,de*te,.75*ee,de*te,.25*ee).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,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(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,ee,te,0,te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*te,.75*ee,.5*te,.25*ee).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,.1*te,.8*ee,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,0,0,.45*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.55*te,0,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.5*ee,.9*te,.8*ee).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*te,.01*ee)).add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.6*te,.2*ee,te,.25*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.7*ee,te,.8*ee,.6*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,.5*te,.75*ee,.55*te,.95*ee)).add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)).add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.7*ee,.45*te,.95*ee,.5*te,.75*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.4*te,.8*ee,0,.8*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.49*te,.01*ee,0,.25*ee,.4*te,.2*ee).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.4*te,.6*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*te,ee,.5*te,.75*ee,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.6*ee,.55*te,.95*ee,.5*te,.75*ee));var he=.2,ve=.3,Ee=0,Be=he*Me;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Be+Ee)*ee,(.5-Be+ve)*te,(.5+he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+Ee)*ee,(.5+Be+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Be+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve)*te,(.5-Be+Ee)*ee,(.5+Be+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*te,.36771243*ee,(.5-Be+ve)*te,(.5-he+Ee)*ee,(.5-he+ve+.05)*te,(.5-Be+Ee-.02)*ee)),he=.2,ve=0,Ee=-.3,Be=he*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+he+ve)*te,(.5+Ee)*ee,(.5+Be+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Be+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve)*te,(.5-Be+Ee)*ee,(.5+Be+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+Ee)*ee,(.5-Be+ve)*te,(.5-he+Ee)*ee,(.5-he+ve)*te,(.5-Be+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Be+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Be+Ee)*ee,(.5-Be+ve)*te,(.5+he+Ee)*ee)),he=.2,ve=-.3,Ee=0,Be=he*Me,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5-he+Ee)*ee,(1-.5+he+ve-.05)*te,(.5-Be+Ee-.02)*ee,(.5+Be+ve)*te,(.5-he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-he+ve)*te,(.5+Ee)*ee,(.5-Be+ve)*te,(.5-he+Ee)*ee,(.5-he+ve)*te,(.5-Be+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*te,(.5+he+Ee)*ee,(.5-he+ve)*te,(.5+Be+Ee)*ee,(.5-Be+ve)*te,(.5+he+Ee)*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.6*ee,(.5+Be+ve)*te,(.5+he+Ee)*ee,(.5+he+ve)*te,(.5+Be+Ee)*ee).close()),de.setSpots(.06,.33,.93,.68),de}),go.Shape.defineFigureGenerator("YinYang",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.5,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*.5,te*.5,te*.5,te*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,te*.5,te*.75,te*.25,te*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,te*.5,te*.25,te*.25,te*.25));var he=.1,ve=.5,Ee=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ve+he)*te,Ee*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,te*ve,ee*Ee,he*te,he*te).close()),se=new go.PathFigure(te*.5,0,!1),de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*.5,te*.5,te*.5,te*.5)),Ee=.75,se=new go.PathFigure((ve+he)*te,Ee*ee,!0),de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,te*ve,ee*Ee,he*te,he*te).close()),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Peace",function(Oe,te,ee){var de=.8535533905932737,se=.5*te,he=.5*ee;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,he,se,he)).add(new go.PathSegment(go.PathSegment.Line,se,ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,de*ee)).add(new go.PathSegment(go.PathSegment.Move,se,he)).add(new go.PathSegment(go.PathSegment.Line,de*te,de*ee)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=.5,Ee=.5,Be=new go.PathFigure(ve*te,(Ee-he)*ee);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),he=.4,se=Me*.4;var Le=le(),ze=le(),je=le(),Xe=le();ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.42,Le,ze,je,Xe,Xe);var Ye=le(),dt=le(),Ze=le();ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.58,Xe,Xe,Ze,Ye,dt);var Nt=le(),at=le(),kt=le();ut(ve,Ee+he,ve-se,Ee+he,ve-he,Ee+se,ve-he,Ee,.42,Nt,at,kt,Xe,Xe);var xt=le(),Ot=le(),Gt=le();return ut(ve,Ee+he,ve-se,Ee+he,ve-he,Ee+se,ve-he,Ee,.58,Xe,Xe,Gt,xt,Ot),Be.add(new go.PathSegment(go.PathSegment.Move,Gt.x*te,Gt.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,xt.x*te,xt.y*ee,Ot.x*te,Ot.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,je.x*te,je.y*ee,Le.x*te,Le.y*ee,ze.x*te,ze.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,Gt.x*te,Gt.y*ee).close()),Be.add(new go.PathSegment(go.PathSegment.Move,kt.x*te,kt.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,Ze.x*te,Ze.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,Ye.x*te,Ye.y*ee,dt.x*te,dt.y*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,kt.x*te,kt.y*ee,Nt.x*te,Nt.y*ee,at.x*te,at.y*ee).close()),Te(Le),Te(ze),Te(je),Te(Xe),Te(Ye),Te(dt),Te(Ze),Te(Nt),Te(at),Te(kt),Te(xt),Te(Ot),Te(Gt),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("Fragile",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*te,0)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.29*te,.33*ee)).add(new go.PathSegment(go.PathSegment.Line,.35*te,.25*ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.15*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.5*ee,te,.25*ee,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.5*ee,0,.25*ee).close()))}),go.Shape.setFigureParameter("HourGlass",0,new On("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=30),de>te&&(de=te);var se=(te-de)/2,he=se+de;return new go.Geometry().add(new go.PathFigure(he,.5*ee).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)).add(new go.PathSegment(go.PathSegment.Line,se,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,te,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,.55*ee).add(new go.PathSegment(go.PathSegment.Line,.6*te,0)).add(new go.PathSegment(go.PathSegment.Line,.3*te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.45*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.55*ee).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Oe,te,ee){var de=new go.Geometry,se=Me*.4,he=.4,ve=.5,Ee=.5,Be=le(),Le=le(),ze=le(),je=le(),Xe=new go.PathFigure((ve-he)*te,Ee*ee,!1);de.add(Xe),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)),ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.44,ze,je,Le,Be,Be),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*te,Le.y*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee));var Ye=pe(Le.x,Le.y);ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.56,Be,Be,Le,ze,je);var dt=pe(Le.x,Le.y);Xe.add(new go.PathSegment(go.PathSegment.Line,(Ye.x*.1+.95*.9)*te,Ye.y*.1*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.85*te,Ye.y*.1*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,.85*te,0)),Xe.add(new go.PathSegment(go.PathSegment.Line,te,0)),Xe.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(dt.x*.1+.9)*te,.15*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,(dt.x*.1+.9)*te,(dt.y*.1+.05*.9)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Line,dt.x*te,dt.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)),he=.35,se=Me*.35;var Ze=new go.PathFigure(ve*te,(Ee-he)*ee,!1);de.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee));var Nt=new go.PathFigure((ve-he)*te,Ee*ee,!1);return de.add(Nt),Te(Be),Te(Le),Te(ze),Te(je),Te(Ye),Te(dt),de.spot1=new go.Spot(.202,.257),de.spot2=new go.Spot(.792,.739),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("GenderFemale",function(Oe,te,ee){var de=new go.Geometry,se=.375,he=0,ve=-.125,Ee=se*Me,Be=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);de.add(Be),Be.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)),Be.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)),Be.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)),Be.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)),Be.add(new go.PathSegment(go.PathSegment.Line,.475*te,.85*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.425*te,.85*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.425*te,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.475*te,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.475*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.525*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.525*te,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.575*te,.9*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.575*te,.85*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee).close()),se=.325,he=0,ve=-.125,Ee=se*Me;var Be=new go.PathFigure((1-.5+se+he)*te,(.5+ve)*ee,!1);de.add(Be),Be.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)),Be.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)),Be.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)),Be.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 Be=new go.PathFigure((.525+he)*te,(.5+se+ve)*ee,!1);return de.add(Be),de.spot1=new go.Spot(.232,.136),de.spot2=new go.Spot(.682,.611),de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("LogicImplies",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;return isNaN(de)&&(de=.2),new go.Geometry().add(new go.PathFigure((1-de)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;return isNaN(de)&&(de=.2),new go.Geometry().add(new go.PathFigure((1-de)*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,(1-de)*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,de*te,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,de*te,ee))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Oe,te,ee){var de=new go.Geometry().add(new go.PathFigure(.5*te,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*te,.5*ee,.5*te,.5*ee)));return de.defaultStretch=go.GraphObject.Uniform,de}),go.Shape.defineFigureGenerator("LogicTruth",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.5*te,0)).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)).add(new go.PathSegment(go.PathSegment.Move,0,ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Oe,te,ee){var de=.5;return new go.Geometry().add(new go.PathFigure(0,ee,!1).add(new go.PathSegment(go.PathSegment.Line,0,de*ee)).add(new go.PathSegment(go.PathSegment.Arc,180,180,de*te,de*ee,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,te,ee))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Oe,te,ee){var de=.5;return new go.Geometry().add(new go.PathFigure(te,0,!1).add(new go.PathSegment(go.PathSegment.Line,te,de*ee)).add(new go.PathSegment(go.PathSegment.Arc,0,180,de*te,de*ee,de*te,de*ee)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new On("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new On("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.3);var se=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=.3);var he=(1-de)*te,ve=(.5-se/2)*ee,Ee=(.5+se/2)*ee,Be=new go.Geometry,Le=new go.PathFigure(0,ve,!0);Be.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Le.add(new go.PathSegment(go.PathSegment.Line,he,0)),Le.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,he,Ee)),Le.add(new go.PathSegment(go.PathSegment.Line,0,Ee).close()),Be.spot1=new go.Spot(0,ve/ee);var ze=He(0,Ee/ee,1,Ee/ee,he/te,1,1,.5,le());return Be.spot2=new go.Spot(ze.x,ze.y),Te(ze),Be}),go.Shape.setFigureParameter("Arrow2",0,new On("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new On("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=30),de>te&&(de=te);var se=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,ee/2);var he=te-de,ve=(ee-se)/2,Ee=ve+se,Be=new go.Geometry,Le=new go.PathFigure(0,ve,!0);Be.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,he,ve)),Le.add(new go.PathSegment(go.PathSegment.Line,he,0)),Le.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,he,ee)),Le.add(new go.PathSegment(go.PathSegment.Line,he,Ee)),Le.add(new go.PathSegment(go.PathSegment.Line,0,Ee).close()),Be.spot1=new go.Spot(0,ve/ee);var ze=He(0,Ee/ee,1,Ee/ee,he/te,1,1,.5,le());return Be.spot2=new go.Spot(ze.x,ze.y),Te(ze),Be}),go.Shape.defineFigureGenerator("Chevron",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("DoubleArrow",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.214*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.786*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*ee).close()),de}),go.Shape.setFigureParameter("DoubleEndArrow",0,new On("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.3);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.3*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close());var Be=He(0,.5,.3,0,0,se/ee,.1,se/ee,le());return ve.spot1=new go.Spot(Be.x,Be.y),Be=He(.7,1,1,.5,0,he/ee,1,he/ee,Be),ve.spot2=new go.Spot(Be.x,Be.y),Te(Be),ve}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new On("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new On("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=40);var se=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-de)/2,ve=he+de,Ee=(ee-se)/2,Be=Ee+se;(de>ee||se>ee)&&(se>de?(de=de*ee/se,he=(ee-de)/2,ve=he+de,Ee=0,Be=ee):(he=0,ve=ee,Ee=0,Be=ee));var Le=new go.Geometry,ze=new go.PathFigure(te,.5*ee,!0);Le.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*te,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*te,Ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.3*te,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ee).close());var je=He(0,.5,.3,Ee/ee,0,he/ee,1,he/ee,le());return Le.spot1=new go.Spot(je.x,je.y),je=He(.7,Be/ee,1,.5,0,ve/ee,1,ve/ee,je),Le.spot2=new go.Spot(je.x,je.y),Te(je),Le}),go.Shape.setFigureParameter("IBeamArrow",0,new On("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.3);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(0,se/ee);var Be=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Be.x,Be.y),Te(Be),ve}),go.Shape.setFigureParameter("IBeamArrow2",0,new On("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new On("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=40);var se=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=100);var he=(ee-de)/2,ve=he+de,Ee=(ee-se)/2,Be=Ee+se;(de>ee||se>ee)&&(se>de?(de=de*ee/se,he=(ee-de)/2,ve=he+de,Ee=0,Be=ee):(he=0,ve=ee,Ee=0,Be=ee));var Le=new go.Geometry,ze=new go.PathFigure(te,.5*ee,!0);Le.add(ze),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,ve)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Be)),ze.add(new go.PathSegment(go.PathSegment.Line,0,Ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,Ee)),ze.add(new go.PathSegment(go.PathSegment.Line,.2*te,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),ze.add(new go.PathSegment(go.PathSegment.Line,.7*te,Ee).close()),Le.spot1=new go.Spot(0,he/ee);var je=He(.7,Be/ee,1,.5,0,ve/ee,1,ve/ee,le());return Le.spot2=new go.Spot(je.x,je.y),Te(je),Le}),go.Shape.setFigureParameter("Pointer",0,new On("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.1);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(de,.35);var ve=He(.2,.65,1,.65,0,1,1,.5,le());return se.spot2=new go.Spot(ve.x,ve.y),Te(ve),se}),go.Shape.setFigureParameter("RoundedPointer",0,new On("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.3);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,0,0,de*te,.75*ee,de*te,.25*ee).close()),se.spot1=new go.Spot(de,.35);var ve=He(0,.65,1,.65,0,1,1,.5,le());return se.spot2=new go.Spot(ve.x,ve.y),Te(ve),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new On("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.4);var se=(.5-de/2)*ee,he=(.5+de/2)*ee,ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(.2,.3);var Be=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Be.x,Be.y),Te(Be),ve}),go.Shape.setFigureParameter("SplitEndArrow2",0,new On("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=50);var se=(ee-de)/2,he=se+de;de>ee&&(se=0,he=ee);var ve=new go.Geometry,Ee=new go.PathFigure(te,.5*ee,!0);ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,.7*te,0).close()),ve.spot1=new go.Spot(.2,se/ee);var Be=He(.7,1,1,.5,0,he/ee,1,he/ee,le());return ve.spot2=new go.Spot(Be.x,Be.y),Te(Be),ve}),go.Shape.setFigureParameter("SquareArrow",0,new On("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.7);var se=new go.Geometry,he=new go.PathFigure(te,.5*ee,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,de*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(de,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(0,.9*ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee).close()),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.97),de}),go.Shape.defineFigureGenerator("Cone2",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.9*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,ee,.85/.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*ee).close());var he=new go.PathFigure(0,.9*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.9*ee,(1-.85/.9)*te,.8*ee,.85/.9*te,.8*ee)),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.82),de}),go.Shape.defineFigureGenerator("Cube1",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var he=new go.PathFigure(.5*te,ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.15*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(.5,.85),de}),go.Shape.defineFigureGenerator("Cube2",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.3*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0).close());var he=new go.PathFigure(0,.3*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Move,.7*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(.7,1),de}),go.Shape.defineFigureGenerator("Cylinder1",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,ee/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(0,de,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*de,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,1*te,de,(.5+he)*te,0,1*te,Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,1*ee,1*te,ee-Me*de,(.5+he)*te,1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,(.5-he)*te,1*ee,0,ee-Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,0,de));var Ee=new go.PathFigure(te,de,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,2*de,1*te,2*de-Me*de,(.5+he)*te,2*de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,de,(.5-he)*te,2*de,0,2*de-Me*de)),se.spot1=new go.Spot(0,0,0,2*de),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,ee/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(0,ee-de,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,Me*de,(.5-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,de,(.5+he)*te,0,te,Me*de)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-de)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,ee-Me*de,(.5+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-de,(.5-he)*te,ee,0,ee-Me*de));var Ee=new go.PathFigure(0,ee-de,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee-2*de,0,ee-de-Me*de,(.5-he)*te,ee-2*de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te,ee-de,(.5+he)*te,ee-2*de,te,ee-de-Me*de)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*de),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,te/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(de,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*de,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,(.5+he)*ee,te-Me*de,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*de,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,(.5-he)*ee,Me*de,0));var Ee=new go.PathFigure(de,0,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,2*de,.5*ee,de+Me*de,0,2*de,(.5-he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,de,ee,2*de,(.5+he)*ee,de+Me*de,ee)),se.spot1=new go.Spot(0,0,2*de,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=5),de=Math.min(de,te/3);var se=new go.Geometry,he=Me*.5,ve=new go.PathFigure(te-de,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,te-Me*de,0,te,(.5-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te,(.5+he)*ee,te-Me*de,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,de,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,Me*de,ee,0,(.5+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,(.5-he)*ee,Me*de,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te-de,0));var Ee=new go.PathFigure(te-de,0,!1);return se.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-2*de,.5*ee,te-de-Me*de,0,te-2*de,(.5-he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-de,ee,te-2*de,(.5+he)*ee,te-de-Me*de,ee)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*de,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,.25*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(.25*te,.25*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.408,.172),de.spot2=new go.Spot(.833,.662),de}),go.Shape.defineFigureGenerator("Prism2",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.25*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(0,ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.25*te,.5*ee)),de.spot1=new go.Spot(.25,.5),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("Pyramid1",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee).close());var he=new go.PathFigure(.5*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.25,.367),de.spot2=new go.Spot(.75,.875),de}),go.Shape.defineFigureGenerator("Pyramid2",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee).close());var he=new go.PathFigure(.5*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.85*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),de.spot1=new go.Spot(.25,.367),de.spot2=new go.Spot(.75,.875),de}),go.Shape.defineFigureGenerator("Actor",function(Oe,te,ee){var de=new go.Geometry,se=.2,he=.1,ve=Me*se,Ee=Me*he,Be=.5,Le=.1,ze=new go.PathFigure(Be*te,(Le+he)*ee,!0);de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be-se)*te,Le*ee,(Be-ve)*te,(Le+he)*ee,(Be-se)*te,(Le+Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-he)*ee,(Be-se)*te,(Le-Ee)*ee,(Be-ve)*te,(Le-he)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be+se)*te,Le*ee,(Be+ve)*te,(Le-he)*ee,(Be+se)*te,(Le-Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le+he)*ee,(Be+se)*te,(Le+Ee)*ee,(Be+ve)*te,(Le+he)*ee));var je=.05,Xe=Me*je;Be=.05,Le=.25;var Ye=new go.PathFigure(.5*te,.2*ee,!0);return de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.95*te,.2*ee)),Be=.95,Le=.25,Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be+je)*te,Le*ee,(Be+Xe)*te,(Le-je)*ee,(Be+je)*te,(Le-Xe)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.85*te,.35*ee)),je=.025,Xe=Me*je,Be=.825,Le=.35,Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-je)*ee,(Be+je)*te,(Le-Xe)*ee,(Be+Xe)*te,(Le-je)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-je)*te,Le*ee,(Be-Xe)*te,(Le-je)*ee,(Be-je)*te,(Le-Xe)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee)),je=.05,Xe=Me*je,Be=.5,Le=.7,Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-je)*ee,(Be+je)*te,(Le-Xe)*ee,(Be+Xe)*te,(Le-je)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-je)*te,Le*ee,(Be-Xe)*te,(Le-je)*ee,(Be-je)*te,(Le-Xe)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.45*te,ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.2*te,.35*ee)),je=.025,Xe=Me*je,Be=.175,Le=.35,Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-je)*ee,(Be+je)*te,(Le-Xe)*ee,(Be+Xe)*te,(Le-je)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-je)*te,Le*ee,(Be-Xe)*te,(Le-je)*ee,(Be-je)*te,(Le-Xe)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),je=.05,Xe=Me*je,Be=.05,Le=.25,Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-je)*ee,(Be-je)*te,(Le-Xe)*ee,(Be-Xe)*te,(Le-je)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),de.spot1=new go.Spot(.2,.2),de.spot2=new go.Spot(.8,.65),de}),go.Shape.setFigureParameter("Card",0,new On("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;isNaN(de)&&(de=.2);var se=new go.Geometry,he=new go.PathFigure(te,0,!0);return se.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,de*ee)),he.add(new go.PathSegment(go.PathSegment.Line,de*te,0).close()),se.spot1=new go.Spot(0,de),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee));var he=new go.PathFigure(.5*te,.5*ee,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),de.spot1=new go.Spot(.25,0),de.spot2=new go.Spot(.75,.25),de}),go.Shape.defineFigureGenerator("CreateRequest",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),de}),go.Shape.defineFigureGenerator("Database",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(te,.1*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-he)*ee,(.5-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-he)*ee));var Ee=new go.PathFigure(te,.1*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+he)*ee,(.5+se)*te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+he)*ee,(.5+se)*te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.4*ee,te,(.3+he)*ee,(.5+se)*te,.4*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*ee,(.5-se)*te,.4*ee,0,(.3+he)*ee)),de.spot1=new go.Spot(0,.4),de.spot2=new go.Spot(1,.9),de}),go.Shape.defineFigureGenerator("DataStorage",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.9*ee,.25*te,.1*ee).close()),de.spot1=new go.Spot(.226,0),de.spot2=new go.Spot(.81,1),de}),go.Shape.defineFigureGenerator("DiskStorage",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.1,ve=new go.PathFigure(te,.1*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.9+he)*ee,(.5+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,(.5-se)*te,ee,0,(.9+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,(.1-he)*ee,(.5-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,(.5+se)*te,0,te,(.1-he)*ee));var Ee=new go.PathFigure(te,.1*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,te,(.1+he)*ee,(.5+se)*te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*ee,(.5-se)*te,.2*ee,0,(.1+he)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,.2*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.3*ee,te,(.2+he)*ee,(.5+se)*te,.3*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*ee,(.5-se)*te,.3*ee,0,(.2+he)*ee)),de.spot1=new go.Spot(0,.3),de.spot2=new go.Spot(1,.9),de}),go.Shape.defineFigureGenerator("Display",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,ee,te,0,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close()),de.spot1=new go.Spot(.25,0),de.spot2=new go.Spot(.75,1),de}),go.Shape.defineFigureGenerator("DividedEvent",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var he=Me*.2,ve=new go.PathFigure(0,.2*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,0,(.2-he)*ee,(.2-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.2*ee,(.8+he)*te,0,te,(.2-he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,ee,te,(.8+he)*ee,(.8+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*ee,(.2-he)*te,ee,0,(.8+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee));var Ee=new go.PathFigure(0,se*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),de}),go.Shape.defineFigureGenerator("DividedProcess",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(0,se*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,se*ee)),de}),go.Shape.defineFigureGenerator("Document",function(Oe,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(1,.6),de}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,(1-se)*ee)),de}),go.Shape.defineFigureGenerator("ExternalProcess",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var he=new go.PathFigure(.1*te,.4*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.9*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.6*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.4*te,.9*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.9*ee)),de.spot1=new go.Spot(.25,.25),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("File",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(.75*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("Interrupt",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee));var he=new go.PathFigure(te,.5*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,ee));var ve=new go.PathFigure(te,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("InternalStorage",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN,he=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.1);var ve=new go.PathFigure(0,0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var Ee=new go.PathFigure(se*te,0,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,0,he*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he*ee)),de}),go.Shape.defineFigureGenerator("Junction",function(Oe,te,ee){var de=new go.Geometry,se=1/Math.SQRT2,he=(1-1/Math.SQRT2)/2,ve=Me*.5,Ee=.5,Be=new go.PathFigure(te,Ee*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,ee,te,(Ee+ve)*ee,(Ee+ve)*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,Ee*ee,(Ee-ve)*te,ee,0,(Ee+ve)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,0,0,(Ee-ve)*ee,(Ee-ve)*te,0)),Be.add(new go.PathSegment(go.PathSegment.Bezier,te,Ee*ee,(Ee+ve)*te,0,te,(Ee-ve)*ee));var Le=new go.PathFigure((he+se)*te,(he+se)*ee,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,he*te,he*ee)),Le.add(new go.PathSegment(go.PathSegment.Move,he*te,(he+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,(he+se)*te,he*ee)),de}),go.Shape.defineFigureGenerator("LinedDocument",function(Oe,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close());var he=new go.PathFigure(.1*te,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.75*ee)),de.spot1=new go.Spot(.1,0),de.spot2=new go.Spot(1,.6),de}),go.Shape.defineFigureGenerator("LoopLimit",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("MagneticTape",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(.5*te,ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(he+.1)*te,.9*ee,te,(he+se)*ee,(he+se)*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),de.spot1=new go.Spot(.15,.15),de.spot2=new go.Spot(.85,.8),de}),go.Shape.defineFigureGenerator("ManualInput",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("MessageFromUser",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.7);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,se*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,se*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("MicroformRecording",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(1,.75),de}),go.Shape.defineFigureGenerator("MultiDocument",function(Oe,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.44*ee,.96*te,.47*ee,.93*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.54*ee,.86*te,.57*ee,.83*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.4*te,.4*ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0).close());var he=new go.PathFigure(.1*te,.2*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.44*ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.8,.77),de}),go.Shape.defineFigureGenerator("MultiProcess",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,.1*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close());var he=new go.PathFigure(.2*te,.1*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.1*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.1*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.9*ee)),de.spot1=new go.Spot(0,.2),de.spot2=new go.Spot(.8,1),de}),go.Shape.defineFigureGenerator("OfflineStorage",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=1-se,ve=new go.PathFigure(0,0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close());var Ee=new go.PathFigure(.5*se*te,se*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*te,se*ee)),de}),go.Shape.defineFigureGenerator("OffPageConnector",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(.75,1),de}),go.Shape.defineFigureGenerator("Or",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,ee,te,(he+se)*ee,(he+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee));var Ee=new go.PathFigure(te,.5*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),de}),go.Shape.defineFigureGenerator("PaperTape",function(Oe,te,ee){var de=new go.Geometry;ee=ee/.8;var se=new go.PathFigure(0,.7*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.3*ee,.5*te,.6*ee,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*ee,.5*te,.4*ee,.5*te,ee).close()),de.spot1=new go.Spot(0,.49),de.spot2=new go.Spot(1,.75),de}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN,he=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN,he=Oe?Oe.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(he)&&(he=.3);var ve=new go.PathFigure(0,0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("Procedure",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure((1-se)*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,se*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),de}),go.Shape.defineFigureGenerator("Process",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),de.spot2=go.Spot.BottomRight,de}),go.Shape.defineFigureGenerator("Sort",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee).close());var he=new go.PathFigure(0,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),de.spot1=new go.Spot(.25,.25),de.spot2=new go.Spot(.75,.5),de}),go.Shape.defineFigureGenerator("Start",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.25);var he=new go.PathFigure(se*te,0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee));var ve=new go.PathFigure(se*te,0,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*te,ee)),de.spot1=new go.Spot(se,0),de.spot2=new go.Spot(1-se,1),de}),go.Shape.defineFigureGenerator("Terminator",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.25*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*te,.5*ee,.25*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*te,.5*ee,.25*te,.5*ee)),de.spot1=new go.Spot(.23,0),de.spot2=new go.Spot(.77,1),de}),go.Shape.defineFigureGenerator("TransmittalTape",function(Oe,te,ee){var de=new go.Geometry,se=Oe?Oe.parameter1:NaN;isNaN(se)&&(se=.1);var he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,(1-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*ee).close()),de.spot1=go.Spot.TopLeft,de}),go.Shape.defineFigureGenerator("AndGate",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=new go.PathFigure(0,0,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(.5+se)*te,0,te,(.5-se)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,(.5+se)*ee,(.5+se)*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=go.Spot.TopLeft,de.spot2=new go.Spot(.55,1),de}),go.Shape.defineFigureGenerator("Buffer",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("Clock",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=new go.PathFigure(te,he*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,ee,te,(he+se)*ee,(he+se)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,he*ee,(he-se)*te,ee,0,(he+se)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,he*te,0,0,(he-se)*ee,(he-se)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,he*ee,(he+se)*te,0,te,(he-se)*ee));var Ee=new go.PathFigure(te,he*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he*ee));var Be=new go.PathFigure(.8*te,.75*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,.8*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.6*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.6*te,.75*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.4*te,.75*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.4*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,.2*te,.75*ee)),de}),go.Shape.defineFigureGenerator("Ground",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.3*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),de}),go.Shape.defineFigureGenerator("Inverter",function(Oe,te,ee){var de=new go.Geometry,se=Me*.1,he=.1,ve=.9,Ee=.5,Be=new go.PathFigure(.8*te,.5*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,0,ee)),Be.add(new go.PathSegment(go.PathSegment.Line,0,0)),Be.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee));var Le=new go.PathFigure((ve+he)*te,Ee*ee,!0);return de.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)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.4,.75),de}),go.Shape.defineFigureGenerator("NandGate",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=Me*.4,ve=Me*.1,Ee=.1,Be=.9,Le=.5,ze=new go.PathFigure(.8*te,.5*ee,!0);de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,.8*te,(.5+he)*ee,(.4+se)*te,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,0,ee)),ze.add(new go.PathSegment(go.PathSegment.Line,0,0)),ze.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),ze.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(.4+se)*te,0,.8*te,(.5-he)*ee));var je=new go.PathFigure((Be+Ee)*te,Le*ee,!0);return de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le+Ee)*ee,(Be+Ee)*te,(Le+ve)*ee,(Be+ve)*te,(Le+Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te,Le*ee,(Be-ve)*te,(Le+Ee)*ee,(Be-Ee)*te,(Le+ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-Ee)*ee,(Be-Ee)*te,(Le-ve)*ee,(Be-ve)*te,(Le-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te,Le*ee,(Be+ve)*te,(Le-Ee)*ee,(Be+Ee)*te,(Le-ve)*ee)),de.spot1=new go.Spot(0,.05),de.spot2=new go.Spot(.55,.95),de}),go.Shape.defineFigureGenerator("NorGate",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=0,Ee=.5,Be=new go.PathFigure(.8*te,.5*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.7*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.5*ee,(ve+he)*te,(Ee-se)*ee,.7*te,(Ee-he)*ee)),se=.1,he=Me*.1,ve=.9,Ee=.5;var Le=new go.PathFigure((ve-se)*te,Ee*ee,!0);return de.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)),de.spot1=new go.Spot(.2,.25),de.spot2=new go.Spot(.6,.75),de}),go.Shape.defineFigureGenerator("OrGate",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=0,Ee=.5,Be=new go.PathFigure(0,0,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he+he)*te,(Ee-se)*ee,.8*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.8*te,(Ee+he)*ee,(ve+he+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*te,.75*ee,.25*te,.25*ee).close()),de.spot1=new go.Spot(.2,.25),de.spot2=new go.Spot(.75,.75),de}),go.Shape.defineFigureGenerator("XnorGate",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=.2,Ee=.5,Be=new go.PathFigure(.1*te,0,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Le=new go.PathFigure(.8*te,.5*ee,!0);de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.7*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*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 ze=new go.PathFigure((ve-se)*te,Ee*ee,!0);return de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee)),de.spot1=new go.Spot(.4,.25),de.spot2=new go.Spot(.65,.75),de}),go.Shape.defineFigureGenerator("XorGate",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Me*se,ve=.2,Ee=.5,Be=new go.PathFigure(.1*te,0,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,ee,.35*te,.25*ee,.35*te,.75*ee));var Le=new go.PathFigure(.2*te,0,!0);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,(ve+he)*te,(Ee-se)*ee,.9*te,(Ee-he)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,ee,.9*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.2*te,0,.45*te,.75*ee,.45*te,.25*ee).close()),de.spot1=new go.Spot(.4,.25),de.spot2=new go.Spot(.8,.75),de}),go.Shape.defineFigureGenerator("Capacitor",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("Resistor",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Inductor",function(Oe,te,ee){var de=new go.Geometry,se=Me*.1,he=.1,ve=.1,Ee=.5,Be=new go.PathFigure((ve-se*.5)*te,ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.3,Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.5,Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.7,Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,0,(ve-se)*te,ee,(ve-he)*te,0)),ve=.9,Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se*.5)*te,ee,(ve+he)*te,0,(ve+se)*te,ee)),de}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Oe,te,ee){var de=new go.Geometry,se=Me*.5,he=.5,ve=.5,Ee=.5,Be=new go.PathFigure((ve-he)*te,Ee*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,(ve+se)*te,(Ee-he)*ee,(ve+he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-he)*te,Ee*ee,(ve-se)*te,(Ee+he)*ee,(ve-he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Move,(ve-he+.1)*te,Ee*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he-.1)*te,Ee*ee,ve*te,(Ee-he)*ee,ve*te,(Ee+he)*ee)),de}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("Diode",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de.spot1=new go.Spot(0,.25),de.spot2=new go.Spot(.5,.75),de}),go.Shape.defineFigureGenerator("Wifi",function(Oe,te,ee){var de=new go.Geometry,se=te,he=ee;te=te*.38,ee=ee*.6;var ve=Me*.8,Ee=.8,Be=0,Le=.5,ze=(se-te)/2,je=(he-ee)/2,Xe=new go.PathFigure(Be*te+ze,(Le+Ee)*ee+je,!0);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te+ze,Le*ee+je,(Be-ve)*te+ze,(Le+Ee)*ee+je,(Be-Ee)*te+ze,(Le+ve)*ee+je)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee)*te+ze,(Le-ve)*ee+je,(Be-ve)*te+ze,(Le-Ee)*ee+je)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee+ve*.5)*te+ze,Le*ee+je,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee+ve*.5)*te+ze,(Le-ve)*ee+je)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be-Ee+ve*.5)*te+ze,(Le+ve)*ee+je,Be*te+ze,(Le+Ee)*ee+je).close()),ve=Me*.4,Ee=.4,Be=.2,Le=.5;var Ye=new go.PathFigure(Be*te+ze,(Le+Ee)*ee+je,!0);de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te+ze,Le*ee+je,(Be-ve)*te+ze,(Le+Ee)*ee+je,(Be-Ee)*te+ze,(Le+ve)*ee+je)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee)*te+ze,(Le-ve)*ee+je,(Be-ve)*te+ze,(Le-Ee)*ee+je)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee+ve*.5)*te+ze,Le*ee+je,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee+ve*.5)*te+ze,(Le-ve)*ee+je)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be-Ee+ve*.5)*te+ze,(Le+ve)*ee+je,Be*te+ze,(Le+Ee)*ee+je).close()),ve=Me*.2,Ee=.2,Be=.5,Le=.5;var dt=new go.PathFigure((Be-Ee)*te+ze,Le*ee+je,!0);de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be-Ee)*te+ze,(Le-ve)*ee+je,(Be-ve)*te+ze,(Le-Ee)*ee+je)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te+ze,Le*ee+je,(Be+ve)*te+ze,(Le-Ee)*ee+je,(Be+Ee)*te+ze,(Le-ve)*ee+je)),dt.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee)*te+ze,(Le+ve)*ee+je,(Be+ve)*te+ze,(Le+Ee)*ee+je)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Be-Ee)*te+ze,Le*ee+je,(Be-ve)*te+ze,(Le+Ee)*ee+je,(Be-Ee)*te+ze,(Le+ve)*ee+je)),ve=Me*.4,Ee=.4,Be=.8,Le=.5;var Ze=new go.PathFigure(Be*te+ze,(Le-Ee)*ee+je,!0);de.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te+ze,Le*ee+je,(Be+ve)*te+ze,(Le-Ee)*ee+je,(Be+Ee)*te+ze,(Le-ve)*ee+je)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee)*te+ze,(Le+ve)*ee+je,(Be+ve)*te+ze,(Le+Ee)*ee+je)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee-ve*.5)*te+ze,Le*ee+je,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee-ve*.5)*te+ze,(Le+ve)*ee+je)),Ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be+Ee-ve*.5)*te+ze,(Le-ve)*ee+je,Be*te+ze,(Le-Ee)*ee+je).close()),ve=Me*.8,Ee=.8,Be=1,Le=.5;var Nt=new go.PathFigure(Be*te+ze,(Le-Ee)*ee+je,!0);return de.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee)*te+ze,Le*ee+je,(Be+ve)*te+ze,(Le-Ee)*ee+je,(Be+Ee)*te+ze,(Le-ve)*ee+je)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee)*te+ze,(Le+ve)*ee+je,(Be+ve)*te+ze,(Le+Ee)*ee+je)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,(Be+Ee-ve*.5)*te+ze,Le*ee+je,Be*te+ze,(Le+Ee)*ee+je,(Be+Ee-ve*.5)*te+ze,(Le+ve)*ee+je)),Nt.add(new go.PathSegment(go.PathSegment.Bezier,Be*te+ze,(Le-Ee)*ee+je,(Be+Ee-ve*.5)*te+ze,(Le-ve)*ee+je,Be*te+ze,(Le-Ee)*ee+je).close()),de}),go.Shape.defineFigureGenerator("Email",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,0,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,0)),he.add(new go.PathSegment(go.PathSegment.Move,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Move,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.54*ee)),de}),go.Shape.defineFigureGenerator("Ethernet",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.35*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,0).close());var he=new go.PathFigure(.1*te,ee,!0,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var ve=new go.PathFigure(.6*te,ee,!0,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*te,ee).close());var Ee=new go.PathFigure(0,.5*ee,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.5*te,.4*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.75*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.75*te,.6*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,.25*te,.5*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.25*te,.6*ee)),de}),go.Shape.defineFigureGenerator("Power",function(Oe,te,ee){var de=new go.Geometry,se=Me*.4,he=.4,ve=.5,Ee=.5,Be=le(),Le=le(),ze=le(),je=le();ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.5,Be,Be,Le,ze,je);var Xe=pe(Le.x,Le.y),Ye=new go.PathFigure(Le.x*te,Le.y*ee,!0);de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ve+he)*te,Ee*ee,ze.x*te,ze.y*ee,je.x*te,je.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)),ut(ve-he,Ee,ve-he,Ee-se,ve-se,Ee-he,ve,Ee-he,.5,ze,je,Le,Be,Be),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*te,Le.y*ee,ze.x*te,ze.y*ee,je.x*te,je.y*ee)),se=Me*.3,he=.3,ut(ve-he,Ee,ve-he,Ee-se,ve-se,Ee-he,ve,Ee-he,.5,ze,je,Le,Be,Be),Ye.add(new go.PathSegment(go.PathSegment.Line,Le.x*te,Le.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)),ut(ve,Ee-he,ve+se,Ee-he,ve+he,Ee-se,ve+he,Ee,.5,Be,Be,Le,ze,je),Ye.add(new go.PathSegment(go.PathSegment.Bezier,Le.x*te,Le.y*ee,je.x*te,je.y*ee,ze.x*te,ze.y*ee).close());var Ye=new go.PathFigure(.45*te,0,!0);return de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Line,.45*te,.5*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.55*te,.5*ee)),Ye.add(new go.PathSegment(go.PathSegment.Line,.55*te,0).close()),Te(Be),Te(Le),Te(ze),Te(je),Te(Xe),de.spot1=new go.Spot(.25,.45),de.spot2=new go.Spot(.75,.8),de}),go.Shape.defineFigureGenerator("Fallout",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee/2,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,te/2,ee/2,te/2,ee/2));function he(ve,Ee,Be){ve.add(new go.PathSegment(go.PathSegment.Move,(.3+Ee)*te,(.8+Be)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.5+Ee)*te,(.5+Be)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.1+Ee)*te,(.5+Be)*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,(.3+Ee)*te,(.8+Be)*ee).close())}return he(se,0,0),he(se,.4,0),he(se,.2,-.3),de}),go.Shape.defineFigureGenerator("IrritationHazard",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.2*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close()),de.spot1=new go.Spot(.3,.3),de.spot2=new go.Spot(.7,.7),de}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.37*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.11*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.04*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.49*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.37*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.63*te,.86*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.77*te,.91*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.34*te,.78*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.44*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.56*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee).close()),de}),go.Shape.defineFigureGenerator("FireHazard",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*te,0,-.25*te,.63*ee,.45*te,.44*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*te,.42*ee,.48*te,.17*ee,.54*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*te,.18*ee,.59*te,.29*ee,.58*te,.28*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*te,.6*ee,.8*te,.34*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*te,.31*ee,.87*te,.48*ee,.88*te,.43*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,1.17*te,.76*ee,.82*te,.8*ee).close()),de.spot1=new go.Spot(.07,.445),de.spot2=new go.Spot(.884,.958),de}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=0,ve=0,Ee=se*Me,Be=.4*Math.SQRT2/2+.5,Le=.5-.5*Math.SQRT2/2,ze=1,je=.5,Xe=.5,Ye=0,dt=new go.PathFigure(Be*te,(1-Le)*ee,!1);return de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,je*ee,ze*te,.7*ee,ze*te,je*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+he)*te,(Ye+he)*ee,(.5+se+he)*te,(.5-Ee+he)*ee,(.5+Ee+he)*te,(.5-se+he)*ee)),dt.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)),dt.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)),dt.add(new go.PathSegment(go.PathSegment.Move,(.25+he)*te,.8*ee)),dt.add(new go.PathSegment(go.PathSegment.Line,(.35+he)*te,.9*ee)),dt.add(new go.PathSegment(go.PathSegment.Line,(.2+he)*te,.95*ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(te,ee,!1);de.add(he);var ve=new go.PathFigure(0,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.2*te,.35*ee,.3*te,.35*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.7*te,.65*ee,.8*te,.65*ee)),de}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee).close()),de}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee).close());var se=new go.PathFigure(0,.2*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),de}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.7*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,0,.6*te,.5*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,ee,.4*te,.5*ee,te,.5*ee).close());var he=new go.PathFigure(.45*te,.73*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.7*te,.73*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.38*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.63*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.31*te,.27*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.56*te,.27*ee)),de}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(.335*te,(1-.555)*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.335*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.405)*ee)),he.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*te,(1-.555)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,te,.68*ee,(1-.12)*te,.46*ee,(1-.02)*te,.54*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.68*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.335*te,(1-.555)*ee,.02*te,.54*ee,.12*te,.46*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.365*te,(1-.595)*ee));var ve=.5-.285,Ee=.5,Be=ve,Le=Math.PI/4,ze=4*(1-Math.cos(Le))/(3*Math.sin(Le)),je=ze*.5,Xe=ve,Ye=ve,dt=ze*Xe,Ze=ze*Ye;he.add(new go.PathSegment(go.PathSegment.Bezier,(Ee-Xe)*te,Be*ee,(Ee-(dt+Xe)/2)*te,(Be+(Ye+Ze)/2)*ee,(Ee-Xe)*te,(Be+Ze)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,Ee*te,(Be-Ye)*ee,(Ee-Xe)*te,(Be-Ze)*ee,(Ee-dt)*te,(Be-Ye)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(Ee+Xe)*te,Be*ee,(Ee+dt)*te,(Be-Ye)*ee,(Ee+Xe)*te,(Be-Ze)*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*te,(1-.595)*ee,(Ee+Xe)*te,(Be+Ze)*ee,(Ee+(dt+Xe)/2)*te,(Be+(Ye+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 Nt=new go.PathFigure(.2*te,ee,!1);de.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.2*te,.8*ee));var at=new go.PathFigure(.8*te,ee,!1);return de.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,ee).close());var he=new go.PathFigure(.2*te,.2*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.8*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventError",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se);var he=new go.PathFigure(te,ee,!1);de.add(he);var ve=new go.PathFigure(.1*te,ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("Caution",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.05*te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.8*ee,0,ee,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*te,.1*ee,.5*te,0,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,ee,te,ee,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,ee));var he=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-he)*te,.875*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*te,.875*ee,he*te,he*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.325*ee,.575*te,.725*ee,.625*te,.375*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.75*ee,.375*te,.375*ee,.425*te,.725*ee)),de}),go.Shape.defineFigureGenerator("Recycle",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.45*te,.95*ee,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*te,.85*ee,.17*te,.95*ee,.15*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.235*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.3*te,.625*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.275*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.05*te,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*te,.95*ee,0,.675*ee,0,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.45*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.775*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.22*te,.775*ee));var he=new go.PathFigure(.475*te,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.4*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.225*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.275*te,.175*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.325*te,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,.05*ee,.35*te,0,.375*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.575*te,.375*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.525*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.75*te,.475*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.315*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.32*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.65*te,.05*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,0,.65*te,.05*ee,.625*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.38*te,.0105*ee));var ve=new go.PathFigure(.675*te,.575*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.875*te,.525*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.85*te,.95*ee,te,.8*ee,te,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.95*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.85*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.725*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.7*te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,te,.775*ee)),ve.add(new go.PathSegment(go.PathSegment.Move,.675*te,.575*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.775*te,.775*ee)),de}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=new go.PathFigure(te,se*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*te,ee,te,(se+he)*ee,(se+he)*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,se*ee,(se-he)*te,ee,0,(se+he)*ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*te,0,0,(se-he)*ee,(se-he)*te,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te,se*ee,(se+he)*te,0,te,(se-he)*ee));var Ee=new go.PathFigure(se*te,0,!1);return de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,.15*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,se*te,.85*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,0,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.15*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.85*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.58*te,.1*ee)),Ee.add(new go.PathSegment(go.PathSegment.Move,se*te,se*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.78*te,.54*ee)),de}),go.Shape.defineFigureGenerator("Package",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.15*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close());var he=new go.PathFigure(0,.15*ee,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,0)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.65*te,.15*ee).close()),de.spot1=new go.Spot(0,.1),de.spot2=new go.Spot(1,1),de}),go.Shape.defineFigureGenerator("Class",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(0,.5*ee,!1);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee).close()),de}),go.Shape.defineFigureGenerator("Component",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close());var he=new go.PathFigure(0,.2*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.2*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.2*ee).close());var ve=new go.PathFigure(0,.6*ee,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.45*te,.6*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.45*te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee).close()),de}),go.Shape.defineFigureGenerator("Boat Shipment",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.15*te,.6*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.6*ee));var he=new go.PathFigure(.15*te,.6*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.85*te,.6*ee)),de}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.66*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.33*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de}),go.Shape.defineFigureGenerator("Workcell",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.65*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.35*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),de}),go.Shape.defineFigureGenerator("Supermarket",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.33*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Move,te,.66*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),de}),go.Shape.defineFigureGenerator("TruckShipment",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(te,.8*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.6*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee).close());var ve=.1,Ee=Me*.1,Be=.2,Le=.9,ze=new go.PathFigure((Be-ve)*te,Le*ee,!0);de.add(ze),ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-ve)*ee,(Be-ve)*te,(Le-Ee)*ee,(Be-Ee)*te,(Le-ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be+ve)*te,Le*ee,(Be+Ee)*te,(Le-ve)*ee,(Be+ve)*te,(Le-Ee)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le+ve)*ee,(Be+ve)*te,(Le+Ee)*ee,(Be+Ee)*te,(Le+ve)*ee)),ze.add(new go.PathSegment(go.PathSegment.Bezier,(Be-ve)*te,Le*ee,(Be-Ee)*te,(Le+ve)*ee,(Be-ve)*te,(Le+Ee)*ee).close()),ve=.1,Ee=Me*.1,Be=.8,Le=.9;var je=new go.PathFigure((Be-ve)*te,Le*ee,!0);return de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le-ve)*ee,(Be-ve)*te,(Le-Ee)*ee,(Be-Ee)*te,(Le-ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Be+ve)*te,Le*ee,(Be+Ee)*te,(Le-ve)*ee,(Be+ve)*te,(Le-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Be*te,(Le+ve)*ee,(Be+ve)*te,(Le+Ee)*ee,(Be+Ee)*te,(Le+ve)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Be-ve)*te,Le*ee,(Be-Ee)*te,(Le+ve)*ee,(Be-ve)*te,(Le+Ee)*ee).close()),de}),go.Shape.defineFigureGenerator("KanbanPost",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.2*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,ee)),de}),go.Shape.defineFigureGenerator("Forklift",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var he=new go.PathFigure(0,.5*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var ve=new go.PathFigure(.5*te,.8*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.1*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.8*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*te,.8*ee));var Ee=new go.PathFigure(.5*te,.7*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te,.7*ee));var Be=.1,Le=Me*.1,ze=.1,je=.9,Xe=new go.PathFigure((ze-Be)*te,je*ee,!0);de.add(Xe),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,(je-Be)*ee,(ze-Be)*te,(je-Le)*ee,(ze-Le)*te,(je-Be)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Be)*te,je*ee,(ze+Le)*te,(je-Be)*ee,(ze+Be)*te,(je-Le)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,(je+Be)*ee,(ze+Be)*te,(je+Le)*ee,(ze+Le)*te,(je+Be)*ee)),Xe.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Be)*te,je*ee,(ze-Le)*te,(je+Be)*ee,(ze-Be)*te,(je+Le)*ee)),Be=.1,Le=Me*.1,ze=.4,je=.9;var Ye=new go.PathFigure((ze-Be)*te,je*ee,!0);return de.add(Ye),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,(je-Be)*ee,(ze-Be)*te,(je-Le)*ee,(ze-Le)*te,(je-Be)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ze+Be)*te,je*ee,(ze+Le)*te,(je-Be)*ee,(ze+Be)*te,(je-Le)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,ze*te,(je+Be)*ee,(ze+Be)*te,(je+Le)*ee,(ze+Le)*te,(je+Be)*ee)),Ye.add(new go.PathSegment(go.PathSegment.Bezier,(ze-Be)*te,je*ee,(ze-Le)*te,(je+Be)*ee,(ze-Be)*te,(je+Le)*ee)),de}),go.Shape.defineFigureGenerator("RailShipment",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.1*te,.4*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.45*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.4*ee).close());var he=new go.PathFigure(.45*te,.7*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.55*te,.7*ee));var ve=new go.PathFigure(.55*te,.4*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.9*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*te,.4*ee).close());var ze=.05,je=Me*.05,Xe=.175,Ye=.95,Ee=new go.PathFigure((Xe-ze)*te,Ye*ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye-ze)*ee,(Xe-ze)*te,(Ye-je)*ee,(Xe-je)*te,(Ye-ze)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+ze)*te,Ye*ee,(Xe+je)*te,(Ye-ze)*ee,(Xe+ze)*te,(Ye-je)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye+ze)*ee,(Xe+ze)*te,(Ye+je)*ee,(Xe+je)*te,(Ye+ze)*ee)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-ze)*te,Ye*ee,(Xe-je)*te,(Ye+ze)*ee,(Xe-ze)*te,(Ye+je)*ee));var ze=.05,je=Me*.05,Xe=.375,Ye=.95,Be=new go.PathFigure((Xe-ze)*te,Ye*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye-ze)*ee,(Xe-ze)*te,(Ye-je)*ee,(Xe-je)*te,(Ye-ze)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+ze)*te,Ye*ee,(Xe+je)*te,(Ye-ze)*ee,(Xe+ze)*te,(Ye-je)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye+ze)*ee,(Xe+ze)*te,(Ye+je)*ee,(Xe+je)*te,(Ye+ze)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-ze)*te,Ye*ee,(Xe-je)*te,(Ye+ze)*ee,(Xe-ze)*te,(Ye+je)*ee));var ze=.05,je=Me*.05,Xe=.625,Ye=.95,Le=new go.PathFigure((Xe-ze)*te,Ye*ee,!0);de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye-ze)*ee,(Xe-ze)*te,(Ye-je)*ee,(Xe-je)*te,(Ye-ze)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+ze)*te,Ye*ee,(Xe+je)*te,(Ye-ze)*ee,(Xe+ze)*te,(Ye-je)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye+ze)*ee,(Xe+ze)*te,(Ye+je)*ee,(Xe+je)*te,(Ye+ze)*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-ze)*te,Ye*ee,(Xe-je)*te,(Ye+ze)*ee,(Xe-ze)*te,(Ye+je)*ee));var ze=.05,je=Me*.05,Xe=.825,Ye=.95,dt=new go.PathFigure((Xe-ze)*te,Ye*ee,!0);de.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye-ze)*ee,(Xe-ze)*te,(Ye-je)*ee,(Xe-je)*te,(Ye-ze)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe+ze)*te,Ye*ee,(Xe+je)*te,(Ye-ze)*ee,(Xe+ze)*te,(Ye-je)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,Xe*te,(Ye+ze)*ee,(Xe+ze)*te,(Ye+je)*ee,(Xe+je)*te,(Ye+ze)*ee)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(Xe-ze)*te,Ye*ee,(Xe-je)*te,(Ye+ze)*ee,(Xe-ze)*te,(Ye+je)*ee).close());var Ze=new go.PathFigure(0,ee,!1);return de.add(Ze),Ze.add(new go.PathSegment(go.PathSegment.Line,te,ee).close()),de}),go.Shape.defineFigureGenerator("Warehouse",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var he=new go.PathFigure(0,.2*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee).close());var ve=new go.PathFigure(.15*te,ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.15*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*te,.5*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*te,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.15*te,ee).close());var Ee=.05,Be=Me*.05,Le=.35,ze=.775,je=new go.PathFigure((Le-Ee)*te,ze*ee,!0);return de.add(je),je.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(ze-Ee)*ee,(Le-Ee)*te,(ze-Be)*ee,(Le-Be)*te,(ze-Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Le+Ee)*te,ze*ee,(Le+Be)*te,(ze-Ee)*ee,(Le+Ee)*te,(ze-Be)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,Le*te,(ze+Ee)*ee,(Le+Ee)*te,(ze+Be)*ee,(Le+Be)*te,(ze+Ee)*ee)),je.add(new go.PathSegment(go.PathSegment.Bezier,(Le-Ee)*te,ze*ee,(Le-Be)*te,(ze+Ee)*ee,(Le-Ee)*te,(ze+Be)*ee).close()),de}),go.Shape.defineFigureGenerator("ControlCenter",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee).close()),de}),go.Shape.defineFigureGenerator("Bluetooth",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.75*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*ee)),de}),go.Shape.defineFigureGenerator("Bookmark",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de}),go.Shape.defineFigureGenerator("Bookmark",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.2*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.8*te,.4*ee)),de}),go.Shape.defineFigureGenerator("Globe",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.5*ee,.75*te,0,te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,te,.75*ee,.75*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.25*te,ee,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,0,.25*ee,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,ee,.15*te,.25*ee,.15*te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.85*te,.75*ee,.85*te,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.15*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.15*ee,.35*te,.3*ee,.65*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*te,.85*ee,.35*te,.7*ee,.65*te,.7*ee)),de}),go.Shape.defineFigureGenerator("Wave",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.25*ee,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.25*ee,.1*te,0,.2*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.25*ee,.425*te,.5*ee,.575*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.25*ee,.8*te,0,.9*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.75*ee,.1*te,.5*ee,.2*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*te,.75*ee,.425*te,ee,.575*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.75*ee,.8*te,.5*ee,.9*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Operator",function(Oe,te,ee){var de=new go.Geometry,se=.3,he=Me*.3,ve=.5,Ee=.7,Be=new go.PathFigure((ve-se)*te,Ee*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee));var Le=new go.PathFigure(0,.7*ee,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Bezier,te,.7*ee,0,0,te,0)),de}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.5*te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.65*te,.3*ee,.65*te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.35*te,.5*ee,.35*te,.3*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,ee,.3*te,.6*ee,.1*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.2*te,ee,.35*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,ee,.7*te,.6*ee,.9*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.65*ee,.8*te,ee,.65*te,.95*ee)),de}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te,0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,0,.075*ee,0,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*te,ee,0,ee,.4*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.4*ee,.8*te,ee,.85*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,0)),de}),go.Shape.defineFigureGenerator("Battery",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.4*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.1*ee));var he=new go.PathFigure(0,.6*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,0,.4*ee)),he.add(new go.PathSegment(go.PathSegment.Line,te,.4*ee)),de}),go.Shape.defineFigureGenerator("Delete",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=.5,Ee=.5,Be=new go.PathFigure((ve-se)*te,Ee*ee,!0);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee));var Le=new go.PathFigure(.15*te,.5*ee,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,.85*te,.5*ee)),de}),go.Shape.defineFigureGenerator("Flag",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.1*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.1*ee,.15*te,0,.35*te,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,te,.1*ee,.65*te,.2*ee,.85*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.5*ee,.85*te,.6*ee,.65*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*ee,.35*te,.4*ee,.15*te,.4*ee).close()),de}),go.Shape.defineFigureGenerator("Help",function(Oe,te,ee){var de=new go.Geometry,se=.5,he=Me*.5,ve=.5,Ee=.5,Be=new go.PathFigure((ve-se)*te,Ee*ee,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee-se)*ee,(ve-se)*te,(Ee-he)*ee,(ve-he)*te,(Ee-se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*te,Ee*ee,(ve+he)*te,(Ee-se)*ee,(ve+se)*te,(Ee-he)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,ve*te,(Ee+se)*ee,(ve+se)*te,(Ee+he)*ee,(ve+he)*te,(Ee+se)*ee)),Be.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*te,Ee*ee,(ve-he)*te,(Ee+se)*ee,(ve-se)*te,(Ee+he)*ee).close()),se=.05,he=Me*.05,ve=.5,Ee=.8;var Le=new go.PathFigure((ve-se)*te,Ee*ee,!1);return de.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()),Le.add(new go.PathSegment(go.PathSegment.Move,.5*te,.7*ee)),Le.add(new go.PathSegment(go.PathSegment.Line,.5*te,.5*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.5*te,.2*ee,.75*te,.475*ee,.75*te,.225*ee)),Le.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.35*ee,.4*te,.2*ee,.3*te,.25*ee)),de}),go.Shape.defineFigureGenerator("Location",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(.5*te,ee,!0).add(new go.PathSegment(go.PathSegment.Line,.75*te,.5*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5*te,0,.975*te,.025*ee,.5*te,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*te,.5*ee,.5*te,0,.025*te,.025*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*te,.3*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Lock",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var he=new go.PathFigure(.2*te,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.3*ee)),de}),go.Shape.defineFigureGenerator("Unlocked",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,.5*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*ee));var he=new go.PathFigure(.2*te,.5*ee,!1);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Move,.2*te,.5*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.2*te,.3*ee)),he.add(new go.PathSegment(go.PathSegment.Bezier,.8*te,.3*ee,.25*te,0,.75*te,0)),he.add(new go.PathSegment(go.PathSegment.Line,.8*te,.35*ee)),de}),go.Shape.defineFigureGenerator("Gear",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(.9375*te,.56246875*ee,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.80621875*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.763*te,.3316875*ee,.79840625*te,.39915625*ee,.7834375*te,.3635*ee)).add(new go.PathSegment(go.PathSegment.Line,.8566875*te,.23796875*ee)).add(new go.PathSegment(go.PathSegment.Line,.76825*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.67596875*te,.24184375*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*te,.19378125*ee,.64228125*te,.2188125*ee,.603875*te,.2021875*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.0625*ee)).add(new go.PathSegment(go.PathSegment.Line,.4375*te,.19378125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*te,.239375*ee,.39759375*te,.20190625*ee,.36053125*te,.2176875*ee)).add(new go.PathSegment(go.PathSegment.Line,.2379375*te,.14959375*ee)).add(new go.PathSegment(go.PathSegment.Line,.14953125*te,.2379375*ee)).add(new go.PathSegment(go.PathSegment.Line,.23934375*te,.3278125*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*te,.4375*ee,.21765625*te,.36059375*ee,.201875*te,.397625*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.4375*ee)).add(new go.PathSegment(go.PathSegment.Line,.0625*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Line,.1938125*te,.5625*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*te,.67596875*ee,.20221875*te,.603875*ee,.21884375*te,.64228125*ee)).add(new go.PathSegment(go.PathSegment.Line,.1495625*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.238*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.3316875*te,.76296875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*te,.80621875*ee,.36353125*te,.78340625*ee,.3991875*te,.79840625*ee)).add(new go.PathSegment(go.PathSegment.Line,.43753125*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.9375*ee)).add(new go.PathSegment(go.PathSegment.Line,.5625*te,.80621875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*te,.760625*ee,.602375*te,.79809375*ee,.63946875*te,.78234375*ee)).add(new go.PathSegment(go.PathSegment.Line,.76828125*te,.8566875*ee)).add(new go.PathSegment(go.PathSegment.Line,.85671875*te,.76825*ee)).add(new go.PathSegment(go.PathSegment.Line,.76065625*te,.67221875*ee)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*te,.56246875*ee,.78234375*te,.63940625*ee,.798125*te,.602375*ee)).add(new go.PathSegment(go.PathSegment.Line,.9375*te,.56246875*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.5*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*te,.5*ee,.1*te,.1*ee).close()))}),go.Shape.defineFigureGenerator("Hand",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.5*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*te,.3*ee,0,.375*ee,.05*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*te,.075*ee,.3*te,.225*ee,.4*te,.175*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*te,.075*ee,.46*te,.05*ee,.525*te,.05*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*te,.4*ee,.525*te,.275*ee,.475*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.55*ee,te,.4*ee,te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.425*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*te,.7*ee,.675*te,.55*ee,.675*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.575*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*te,.85*ee,.65*te,.7*ee,.65*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.525*te,.85*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*te,ee,.61*te,.85*ee,.61*te,ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*ee,.435*te,ee,0,ee).close()),de}),go.Shape.defineFigureGenerator("Map",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,.2*ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*te,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Move,.5*te,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee)),se.add(new go.PathSegment(go.PathSegment.Move,.75*te,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*te,.8*ee)),de}),go.Shape.defineFigureGenerator("Eject",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te,ee)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.7).close());var he=new go.PathFigure(0,ee*.6,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te,.6*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.5*te,0).close()),de}),go.Shape.defineFigureGenerator("Pencil",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.2*ee).close()))}),go.Shape.defineFigureGenerator("Building",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*1,ee*1,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.3)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*te,ee*.85)),se.add(new go.PathSegment(go.PathSegment.Line,te,ee*.85).close());var he=new go.PathFigure(.126*te,.85*ee,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,.126*te,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*te,.45*ee)),he.add(new go.PathSegment(go.PathSegment.Line,.322*te,.85*ee).close());var ve=new go.PathFigure(.402*te,.85*ee,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.402*te,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*te,.45*ee)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*te,.85*ee).close());var Ee=new go.PathFigure(.678*te,.85*ee,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,.678*te,.45*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.874*te,.45*ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,.874*te,.85*ee).close());var Be=new go.PathFigure(.5*te,.1*ee,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*te,.3*ee)),Be.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*te,.3*ee).close()),de}),go.Shape.defineFigureGenerator("Staircase",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.8)),se.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.6)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.4)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.2)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.15)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*.95).close()),de}),go.Shape.defineFigureGenerator("5Bars",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,ee*1,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.184,ee*(1-.184)).close());var he=new go.PathFigure(te*.204,ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.204,ee*(1-.184))),he.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*(1-.184*2))),he.add(new go.PathSegment(go.PathSegment.Line,te*.388,ee*1).close());var ve=new go.PathFigure(te*.408,ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.408,ee*(1-.184*2))),ve.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*(1-.184*3))),ve.add(new go.PathSegment(go.PathSegment.Line,te*.592,ee*1).close());var Ee=new go.PathFigure(te*.612,ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.612,ee*(1-.184*3))),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*(1-.184*4))),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.796,ee*1).close());var Be=new go.PathFigure(te*.816,ee,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*.816,ee*(1-.184*4))),Be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-.184*5))),Be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1).close()),de}),go.Shape.defineFigureGenerator("PC",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,0).close());var he=new go.PathFigure(te*.055,.07*ee,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.07)),he.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.1).close());var ve=new go.PathFigure(te*.055,.13*ee,!0);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.13)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.16)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.16).close());var Ee=new go.PathFigure(te*.055,.18*ee,!0);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.18)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.245,ee*.21)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.055,ee*.21).close());var Be=new go.PathFigure(te*1,0,!0);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*.4,0)),Be.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.65)),Be.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.65).close()),de}),go.Shape.defineFigureGenerator("Plane",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(.55*te,ee,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.7*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.1*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*te,.525*ee,0,.4*ee,.225*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.4*te,.475*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.15*te,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.2*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.325*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.85*te,.1*ee)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*te,.2*ee,.975*te,0,te,.08*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.7*te,.45*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.6*te,.95*ee)),se.add(new go.PathSegment(go.PathSegment.Line,.55*te,ee).close()),de}),go.Shape.defineFigureGenerator("Key",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*1,ee*.5,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.4*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.2*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*ee)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.15,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,.8*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.65*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,.55*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,.6*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,.575*ee)),se.add(new go.PathSegment(go.PathSegment.Line,te*.9,.6*ee).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*te,.425*ee)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*te,.5*ee,.075*te,.075*ee).close()),de}),go.Shape.defineFigureGenerator("FilmTape",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(0,0,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,te*0,te*.3,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.08,ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*1),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*2),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*3),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*4),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*5),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*6),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*7),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*8),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*9),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*10),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*11),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*12),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*13),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*14),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*.95)),se.add(new go.PathSegment(go.PathSegment.Line,te*(.08+.056*15),ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var he=new go.PathFigure(0,0,!1);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*0)),he.add(new go.PathSegment(go.PathSegment.Arc,270,-180,te*1,te*.3,te*.055)),he.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1));var ve=new go.PathFigure(te*.11,ee*.1,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*0),ee*.8)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.11,ee*.8).close());var Ee=new go.PathFigure(te*(.11+.24133333*1+.028*1),ee*.1,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.1)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*1),ee*.8)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*1+.028*1),ee*.8).close());var Be=new go.PathFigure(te*(.11+.24133333*2+.028*2),ee*.1,!1);return de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.1)),Be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*3+.028*2),ee*.8)),Be.add(new go.PathSegment(go.PathSegment.Line,te*(.11+.24133333*2+.028*2),ee*.8).close()),de}),go.Shape.defineFigureGenerator("FloppyDisk",function(Oe,te,ee){var de=new go.Geometry,se=8,he=se*Me,ve=new go.PathFigure(se,0,!1);de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.86,0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.14)),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-he,te-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,0,se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,he,he,0).close());var Ee=new go.PathFigure(te*.83,0,!1);de.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.3)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.3)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*0).close());var Be=new go.PathFigure(te*.83,ee*1,!1);de.add(Be),Be.add(new go.PathSegment(go.PathSegment.Line,te*.83,ee*.5)),Be.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*.5)),Be.add(new go.PathSegment(go.PathSegment.Line,te*.17,ee*1).close());var Le=new go.PathFigure(te*.78,ee*.05,!1);return de.add(Le),Le.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.05)),Le.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.25)),Le.add(new go.PathSegment(go.PathSegment.Line,te*.78,ee*.25).close()),de}),go.Shape.defineFigureGenerator("SpeechBubble",function(Oe,te,ee){var de=Oe?Oe.parameter1:NaN;(isNaN(de)||de<0)&&(de=15),de=Math.min(de,te/3),de=Math.min(de,ee/3);var se=de*Me,he=ee*.8,ve=new go.Geometry,Ee=new go.PathFigure(de,0,!0);return ve.add(Ee),Ee.add(new go.PathSegment(go.PathSegment.Line,te-de,0)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te,de,te-se,0,te,se)),Ee.add(new go.PathSegment(go.PathSegment.Line,te,he-de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,te-de,he,te,he-se,te-se,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.7,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee)),Ee.add(new go.PathSegment(go.PathSegment.Line,te*.55,he)),Ee.add(new go.PathSegment(go.PathSegment.Line,de,he)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,0,he-de,se,he,0,he-se)),Ee.add(new go.PathSegment(go.PathSegment.Line,0,de)),Ee.add(new go.PathSegment(go.PathSegment.Bezier,de,0,0,se,se,0).close()),se>1?(ve.spot1=new go.Spot(0,0,se,se),ve.spot2=new go.Spot(1,.8,-se,-se)):(ve.spot1=go.Spot.TopLeft,ve.spot2=new go.Spot(1,.8)),ve}),go.Shape.defineFigureGenerator("Repeat",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*.45,!0);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.2,ee*.45).close());var he=new go.PathFigure(te*1,ee*.55,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.55)),he.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.1)),he.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),he.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*.55).close()),de}),go.Shape.defineFigureGenerator("Windows",function(Oe,te,ee){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,te,0)).add(new go.PathSegment(go.PathSegment.Line,te,ee)).add(new go.PathSegment(go.PathSegment.Line,0,ee).close()).add(new go.PathSegment(go.PathSegment.Move,.4*te,.4*ee)).add(new go.PathSegment(go.PathSegment.Line,.4*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.8*ee)).add(new go.PathSegment(go.PathSegment.Line,.9*te,.4*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.2*te,.1*ee)).add(new go.PathSegment(go.PathSegment.Line,.2*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.7*te,.1*ee).close()).add(new go.PathSegment(go.PathSegment.Move,.1*te,.6*ee)).add(new go.PathSegment(go.PathSegment.Line,.1*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.9*ee)).add(new go.PathSegment(go.PathSegment.Line,.5*te,.6*ee).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*.1,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.9)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.9).close());var he=new go.PathFigure(te*.1,ee*.2,!0);de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.25)),he.add(new go.PathSegment(go.PathSegment.Line,te*.22,ee*.285)),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,te*.1,ee*.37)),he.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.32)),he.add(new go.PathSegment(go.PathSegment.Line,te*.275,ee*.25).close());var ve=new go.PathFigure(te*.28,ee*.37,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.37)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.41)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.28,ee*.41).close()),de}),go.Shape.defineFigureGenerator("Beaker",function(Oe,te,ee){var de=new go.Geometry,se=15,he=se*Me,ve=new go.PathFigure(te*.62,ee*.475,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te,ee-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,te-se,ee,te,ee-he,te-he,ee)),ve.add(new go.PathSegment(go.PathSegment.Line,se,ee)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,ee-se,he,ee,0,ee-he)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.475)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.38,ee*.03)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*0)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.62,ee*.03).close()),he>1?(de.spot1=new go.Spot(0,0,he,he),de.spot2=new go.Spot(1,1,-he,-he)):(de.spot1=go.Spot.TopLeft,de.spot2=go.Spot.BottomRight),de}),go.Shape.defineFigureGenerator("Download",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close());var ve=new go.PathFigure(te*.4,ee*0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.66)),ve.add(new go.PathSegment(go.PathSegment.Line,te*(1-.26),ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*0).close()),de}),go.Shape.defineFigureGenerator("Bin",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close()),de}),go.Shape.defineFigureGenerator("Upload",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*0,ee*1,!0);de.add(se);var he=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.8,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.66,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.755,ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*.93,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.64,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.61,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.39,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.36,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*.07,ee*(1-he))),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.755),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*.055)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.66),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*(1-.8),ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*(1-he)).close());var ve=new go.PathFigure(te*.5,ee*0,!0);return de.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,te*.26,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.4,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.6,ee*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,te*.74,ee*.25).close()),de}),go.Shape.defineFigureGenerator("EmptyDrink",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close()),de}),go.Shape.defineFigureGenerator("Drink",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.15,ee*0,!1);de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.85,ee*0)),se.add(new go.PathSegment(go.PathSegment.Line,te*.7,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.3,ee*1).close());var he=new go.PathFigure(te*.235,ee*.28,!0);return de.add(he),he.add(new go.PathSegment(go.PathSegment.Line,te*.765,ee*.28)),he.add(new go.PathSegment(go.PathSegment.Line,te*.655,ee*.97)),he.add(new go.PathSegment(go.PathSegment.Line,te*.345,ee*.97).close()),de}),go.Shape.defineFigureGenerator("4Arrows",function(Oe,te,ee){var de=new go.Geometry,se=new go.PathFigure(te*.5,ee*0,!0);return de.add(se),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*1,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*.75,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.55,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.65,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.5,ee*1)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.75)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.55)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.65)),se.add(new go.PathSegment(go.PathSegment.Line,te*0,ee*.5)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.35)),se.add(new go.PathSegment(go.PathSegment.Line,te*.25,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.45)),se.add(new go.PathSegment(go.PathSegment.Line,te*.45,ee*.25)),se.add(new go.PathSegment(go.PathSegment.Line,te*.35,ee*.25).close()),de}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},5559:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var On={},mn="5.0",pe={},le=null,Te=!1,He=!1,ut=null,We=!1,Ue=null,Me=null,Ct=0;Ct<arguments.length;Ct++){var Pt=arguments[Ct];if(Pt!==null)switch(typeof Pt){case"number":mn=Pt.toFixed(1);break;case"string":Pt.match(new RegExp("^[0-9]\\.[0-9]+$"))?mn=Pt:ut=Pt;break;case"object":typeof Pt.is3D!="undefined"?le=Pt:pe=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},pe.material_id!==void 0&&!He&&(Te=!0)),ut!==null&&pe.id===void 0&&(pe.id=ut);var $e="",Ft="",lt=!1,vt=null,Oe=null,te=null,ee=!1,de=null,se=null,he=null,ve=null,Ee=null;pe.height!==void 0&&(pe.height=Math.round(pe.height)),pe.width!==void 0&&(pe.width=Math.round(pe.width));var Be=function(jt){return parseFloat(jt)>4?parseFloat(jt):5};On.setHTML5Codebase=function(jt,en){Me=jt,_t(jt,en)},On.setJavaCodebase=On.setJavaCodebaseVersion=On.isCompiledInstalled=On.setPreCompiledScriptPath=On.setPreCompiledResourcePath=function(){},On.setHTML5CodebaseVersion=function(jt,en){var ln=parseFloat(jt);if(ln!==NaN&&ln<5){console.log("The GeoGebra HTML5 codebase version "+ln+" is deprecated. Using version latest instead.");return}Ue=jt,Ve(jt,en)},On.getHTML5CodebaseVersion=function(){return Oe},On.getParameters=function(){return pe},On.setFontsCSSURL=function(jt){ve=jt},On.setGiacJSURL=function(jt){},On.setJNLPFile=function(jt){$e=jt},On.setJNLPBaseDir=function(jt){},On.inject=function(){function jt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var en="auto",ln=pe.id,Wn,un=!1,kn=0;kn<arguments.length;kn++){var wt=arguments[kn];typeof wt=="string"?(wt=wt.toLowerCase(),wt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?en=wt:ln=arguments[kn]):typeof wt=="boolean"?un=wt:wt instanceof HTMLElement&&(Wn=wt)}jn();function jn(){if(!We){setTimeout(jn,200);return}en=At(en);var ci=Wn||document.getElementById(ln);if(!ci){console.log("possibly bug on ajax loading? ");return}if(On.removeExistingApplet(ci,!1),pe.width===void 0&&ci.clientWidth&&(pe.width=ci.clientWidth),pe.height===void 0&&ci.clientHeight&&(pe.height=ci.clientHeight),!(pe.width&&pe.height)&&en==="html5"&&(delete pe.width,delete pe.height),vt=en,en==="screenshot")at(ci,pe);else{var Ge=!1;pe.hasOwnProperty("playButton")&&pe.playButton||pe.hasOwnProperty("clickToLoad")&&pe.clickToLoad?Ge=!0:pe.hasOwnProperty("playButtonAutoDecide")&&pe.playButtonAutoDecide&&(Ge=(!Le()||jt())&&ze()),Ge?(vt="screenshot",xt(ci,pe,un,en)):Nt(ci,pe,un)}}};function Le(){try{return window.self!==window.top}catch(jt){return!0}}function ze(){return pe.hasOwnProperty("screenshotGenerator")&&pe.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}On.getViews=function(){return le},On.isJavaInstalled=function(){return!1};var je=function(jt){var en=function(kn){var wt=JSON.parse(kn),jn=function(be){return be.type=="G"||be.type=="E"},ci=wt.elements?wt.elements.filter(jn)[0]:wt;if(!ci||!ci.url){ln();return}pe.fileName=ci.url,Xe(ci.settings||{}),le.is3D=!0;var Ge="https://www.geogebra.org/images/";On.setPreviewImage(de||ci.previewUrl,Ge+"GeoGebra_loading.png",Ge+"applet_play.png"),jt()},ln=function(){pe.onError&&pe.onError(),vn("Error: Fetching material (id "+pe.material_id+") failed.",pe)},Wn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",un="/materials/"+pe.material_id+"?scope=basic";Ye("https://"+Wn+"/api/proxy.php?path="+encodeURIComponent(un),en,ln)};function Xe(jt){var en=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ln){jt[ln]=!!jt[ln]}),en.forEach(function(ln){pe[ln]===void 0&&jt[ln]!==void 0&&(pe[ln]=jt[ln])}),pe.showToolBarHelp===void 0&&(pe.showToolBarHelp=pe.showToolBar)}function Ye(jt,en,ln){var Wn=new XMLHttpRequest;Wn.open("GET",jt),Wn.onload=function(){en(Wn.responseText)},Wn.onerror=ln,Wn.send()}On.isHTML5Installed=function(){return!0},On.getLoadedAppletType=function(){return vt},On.setPreviewImage=function(jt,en,ln){de=jt,se=en,he=ln},On.removeExistingApplet=function(jt,en){var ln;typeof jt=="string"&&(jt=document.getElementById(jt)),vt=null;var Wn=null;for(ln=0;ln<jt.childNodes.length;ln++){var un=jt.childNodes[ln],kn=un.className;kn==="applet_screenshot"?en?(un.style.display="block",vt="screenshot"):un.style.display="none":kn!=="applet_scaler prerender"&&(jt.removeChild(un),Wn=kn&&kn.indexOf("appletParameters")!=-1?un.id:null,ln--)}var wt=pe.id!==void 0?pe.id:Wn,jn=window[wt];jn&&typeof jn.getBase64=="function"&&(jn.remove(),window[wt]=null)},On.refreshHitPoints=function(){if(Be(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var jt=On.getAppletObject();return jt&&typeof jt.recalculateEnvironments=="function"?(jt.recalculateEnvironments(),!0):!1},On.startAnimation=function(){var jt=On.getAppletObject();return jt&&typeof jt.startAnimation=="function"?(jt.startAnimation(),!0):!1},On.stopAnimation=function(){var jt=On.getAppletObject();return jt&&typeof jt.stopAnimation=="function"?(jt.stopAnimation(),!0):!1},On.getAppletObject=function(){var jt=pe.id!==void 0?pe.id:"ggbApplet";return window[jt]},On.resize=function(){};var dt=function(jt,en,ln){var Wn=document.createElement("param");Wn.setAttribute("name",en),Wn.setAttribute("value",ln),jt.appendChild(Wn)},Ze=function(jt){return jt&&jt!=="false"},Nt=function(jt,en,ln){Be(Oe)<=4.2&&(ln=!0);var Wn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Oe||ggbHTML5LoadedCodebaseIsWebSimple&&!ee)&&(Wn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var un=document.createElement("div");un.classList.add("appletParameters","notranslate");var kn=en.width,wt=en.height;if(en.disableAutoScale=en.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():en.disableAutoScale,en.width!==void 0)if(Be(Oe)<=4.4)Ze(en.showToolBar)&&(en.height-=7),Ze(en.showAlgebraInput)&&(en.height-=37),en.width<605&&Ze(en.showToolBar)&&(en.width=605,kn=605);else{var jn=100;(Ze(en.showToolBar)||Ze(en.showMenuBar))&&(en.hasOwnProperty("customToolBar")&&(en.customToolbar=en.customToolBar),jn=Ze(en.showMenuBar)?245:155),kn<jn&&(en.width=jn,kn=jn)}un.style.border="none",un.style.display="inline-block";for(var ci in en)en.hasOwnProperty(ci)&&ci!=="appletOnLoad"&&un.setAttribute("data-param-"+ci,en[ci]);ve&&un.setAttribute("data-param-fontscssurl",ve),On.resize=function(){GGBAppletUtils.responsiveResize(jt,en)},window.addEventListener("resize",function(ft){On.resize()});var Ge=typeof en.appletOnLoad=="function"?en.appletOnLoad:function(){};if(!ln&&en.width!==void 0){en.hasOwnProperty("showSplash")||un.setAttribute("data-param-showSplash","false");var be=jt.querySelector(".applet_scaler.prerender"),Pe=be!==null;if(Pe)var Ne=be.querySelector(".ggb_preview");else{var Ne=Gt(kn,wt,en.borderColor,!1);be=document.createElement("div"),be.className="applet_scaler",be.style.position="relative",be.style.display="block",be.style.width=kn+"px",be.style.height=wt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(be,"66%"),Be(Oe)>=5?(en.appletOnLoad=function(ft){var $t=jt.querySelector(".ggb_preview");$t&&$t.parentNode.removeChild($t),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(be),window.GGBT_wsf_view&&$(window).trigger("resize"),Ge(ft)},Pe||be.appendChild(Ne)):un.appendChild(Ne),be.appendChild(un),Pe||jt.appendChild(be),setTimeout(function(){On.resize()},1)}else{var Ie=document.createElement("div");Ie.className="applet_scaler",Ie.style.position="relative",Ie.style.display="block",Ie.appendChild(un),jt.appendChild(Ie),en.appletOnLoad=function(ft){On.resize(),Ge(ft)}}function xe(ft,$t){$t&&typeof $t.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(ft,$t.appletOnLoad):renderGGBElement(ft),vn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",$t)}function ct(ft,$t){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:ft,params:$t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(xn){xe(xn.article,xn.params)}),html5AppletsToProcess=null)},Be(Oe)<5&&(ft.className+=" geogebraweb")):xe(ft,$t)}if(Wn){scriptLoadStarted=!0;for(var Lt=0;Lt<un.childNodes.length;Lt++){var et=un.childNodes[Lt].tagName;et==="TABLE"&&(un.removeChild(un.childNodes[Lt]),Lt--)}if(ggbHTML5LoadedScript!==null){var it=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');it!=null&&it.parentNode.removeChild(it)}var Bt=document.createElement("script"),Dt=function(){ct(un,en)};Bt.src=Ft+te,ggbHTML5LoadedCodebaseIsWebSimple=ee,ggbHTML5LoadedCodebaseVersion=Oe,ggbHTML5LoadedScript=Bt.src,vn("GeoGebra HTML5 codebase loaded: '"+Ft+"'.",en),!Me&&(!Ue||Ue=="5.0")?(ee?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Dt()):Ft.requirejs?__webpack_require__.e(777).then(function(){var ft=[__webpack_require__(70777)];Dt.apply(null,ft)}.bind(this)).catch(__webpack_require__.oe):(Bt.onload=Dt,jt.appendChild(Bt))}else ct(un,en);en.height=wt,en.width=kn},at=function(jt,en,ln){var Wn=Gt(en.width,en.height,en.borderColor,ln),un=document.createElement("div");un.style.position="relative",un.style.display="block",un.style.width=en.width+"px",un.style.height=en.height+"px",un.className="applet_screenshot applet_scaler"+(ln?" applet_screenshot_play":""),un.appendChild(Wn);var kn=GGBAppletUtils.getScale(en,jt,ln);ln?(jt.appendChild(Ot()),window.GGBT_wsf_view||(jt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(un,"66%"),jt.appendChild(un),kn!==1&&!isNaN(kn)&&(GGBAppletUtils.scaleElement(un,kn),un.style.width=en.width+"px",un.style.height=en.height+"px",un.parentNode.style.width=en.width*kn+"px",un.parentNode.style.height=en.height*kn+"px"),On.resize=function(){kt(jt,Wn,un,ln)},window.addEventListener("resize",function(wt){On.resize()}),On.resize()};function kt(jt,en,ln,Wn){if(jt.contains(en)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(jt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(jt)}var un=GGBAppletUtils.getScale(pe,jt,Wn);ln.parentNode!==null&&(!isNaN(un)&&un!==1?(GGBAppletUtils.scaleElement(ln,un),ln.parentNode.style.width=pe.width*un+"px",ln.parentNode.style.height=pe.height*un+"px"):(GGBAppletUtils.scaleElement(ln,1),ln.parentNode.style.width=pe.width+"px",ln.parentNode.style.height=pe.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(jt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}On.onExitFullscreen=function(jt,en){en.appendChild(jt)};var xt=function(jt,en,ln,Wn){at(jt,en,!0);for(var un=function(){var jn=[];for(wt=0;wt<jt.childNodes.length;wt++)jn.push(jt.childNodes[wt]);if(window.GGBT_wsf_view){var ci=window.GGBT_wsf_view.renderFullScreen(jt,en.id),Ge=document.getElementById("fullscreencontainer"),be=jQuery(jt).find(".fullscreencontent");be.length>0?(ci.remove(),be.attr("id","fullscreencontent").show(),jQuery(Ge).append(be),window.dispatchEvent(new Event("resize"))):Nt(ci,en,!1),window.GGBT_wsf_view.launchFullScreen(Ge)}else vt=Wn,Nt(jt,en,!1);if(!window.GGBT_wsf_view)for(wt=0;wt<jn.length;wt++)jt.removeChild(jn[wt])},kn=jt.getElementsByClassName("ggb_preview_play"),wt=0;wt<kn.length;wt++)kn[wt].addEventListener("click",un,!1),kn[wt].addEventListener("ontouchstart",un,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(jt),ze()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},Ot=function(){var jt=document.createElement("div");if(jt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var en='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',ln=document.createElement("style");ln.styleSheet?ln.styleSheet.cssText=en:ln.appendChild(document.createTextNode(en)),document.getElementsByTagName("head")[0].appendChild(ln)}return jt},Gt=function(jt,en,ln,Wn){var un=document.createElement("div");un.className="ggb_preview",un.style.position="absolute",un.style.zIndex="90",un.style.width=jt-2+"px",un.style.height=en-2+"px",un.style.top="0px",un.style.left="0px",un.style.overflow="hidden",un.style.backgroundColor="white";var kn="lightgrey";ln!==void 0&&(ln==="none"?kn="transparent":kn=ln),un.style.border="1px solid "+kn;var wt=document.createElement("img");if(wt.style.position="relative",wt.style.zIndex="1000",wt.style.top="-1px",wt.style.left="-1px",de!==null&&wt.setAttribute("src",de),wt.style.opacity=.7,se!==null){var jn,ci,Ge;if(!Wn){jn=document.createElement("img"),jn.style.position="absolute",jn.style.zIndex="1001",jn.style.opacity=1,wt.style.opacity=.3,ci=360,ci>jt/4*3&&(ci=jt/4*3),Ge=ci/5.8,jn.setAttribute("src",se),jn.setAttribute("width",ci),jn.setAttribute("height",Ge);var be=(jt-ci)/2,Pe=(en-Ge)/2;jn.style.left=be+"px",jn.style.top=Pe+"px",un.appendChild(jn)}}return un.appendChild(wt),un},At=function(jt){return jt=jt.toLowerCase(),jt==="html5"||jt==="screenshot"?jt:"html5"},qe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ve=function(jt,en){if(Oe=jt,en){_t(Oe,!0);return}var ln=!Te;if(ln){var Wn=Be(Oe);!isNaN(Wn)&&Wn<4.4&&(ln=!1)}var un,kn;window.location.protocol.substr(0,4)==="http"?un=window.location.protocol:un="http:";var wt=Oe.indexOf("//");wt>0?kn=Oe:wt===0?kn=un+Oe:kn="https://www.geogebra.org/apps/5.2.814.0/";for(var jn in qe)if(Oe.slice(qe[jn].length*-1)===qe[jn]||Oe.slice((qe[jn].length+1)*-1)===qe[jn]+"/"){_t(kn,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ln&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!Ze(pe.showToolBar)&&!Ze(pe.showMenuBar)&&!Ze(pe.showAlgebraInput)&&!Ze(pe.enableRightClick)&&(!pe.appName||pe.appName=="classic")?kn+="webSimple/":kn+="web3d/",_t(kn,!1)},_t=function(jt,en){if(jt.requirejs){Ft=jt;return}jt.slice(-1)!=="/"&&(jt+="/"),Ft=jt,en===null&&(en=jt.indexOf("http")===-1),lt=en,te="web.nocache.js",ee=!1;var ln=Ft.split("/");ln.length>1&&(!en&&ln[ln.length-2]==="webSimple"?(te="webSimple.nocache.js",ee=!0):qe.indexOf(ln[ln.length-2])>=0&&(te=ln[ln.length-2]+".nocache.js")),ln=jt.split("/"),Oe=ln[ln.length-3],Oe.substr(0,4)==="test"?Oe=Oe.substr(4,1)+"."+Oe.substr(5,1):(Oe.substr(0,3)==="war"||Oe.substr(0,4)==="beta")&&(Oe="5.0");var Wn=parseFloat(Oe);Wn!==NaN&&Wn<5&&jt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Wn+" is deprecated. Using version latest instead."),Ve("5.0",en))},vn=function(jt,en){window.console&&window.console.log&&(!en||typeof en.showLogging=="undefined"||en.showLogging&&en.showLogging!=="false")&&console.log(jt)};pe.material_id!==void 0?je(yn):yn();function yn(){var jt=mn;Ue!==null?jt=Ue:parseFloat(jt)<5&&(jt="5.0"),Ve(jt,!1),Me!==null&&_t(Me,lt),We=!0}return On},GGBAppletUtils=function(){"use strict";function On(){return window.GGBT_wsf_edit!==void 0}function mn(We,Ue){Ue!=1?(We.style.transformOrigin="0% 0% 0px",We.style.webkitTransformOrigin="0% 0% 0px",We.style.transform="scale("+Ue+","+Ue+")",We.style.webkitTransform="scale("+Ue+","+Ue+")",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 pe(We,Ue,Me,Ct,Pt,$e){var Ft=null;if($e!=null&&$e!="")for(var lt=We.parentNode;lt!=null;)if((" "+lt.className+" ").indexOf(" "+$e+" ")>-1){Ft=lt;break}else lt=lt.parentNode;var vt=0,Oe=0,te=0,ee=0,de=0,se=0,he=0;if(Ft)vt=Ft.offsetWidth,Oe=Math.max(Ct?Ft.offsetWidth:0,Ft.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(vt=Math.min(window.innerWidth,document.documentElement.clientWidth),Oe=Math.min(window.innerHeight,document.documentElement.clientHeight),te=vt):(vt=window.innerWidth,Oe=window.innerHeight,te=window.innerWidth),We){var ve=We.getBoundingClientRect();ve.left>0&&ve.left<=vt&&(Pt===void 0||!Pt)&&(document.dir==="rtl"?(de=vt-ve.width-ve.left,se=te<=480?10:30):(se=ve.left,de=te<=480?10:30),ee=se+de)}if(We&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Ee=We.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ee=40,he=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee=0,he=40)}}return We&&((Me===void 0||!Me)&&Ue>0&&Ue+ee<vt?vt=Ue:vt-=ee,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Me===void 0||!Me)&&(Oe-=he)),{width:vt,height:Oe}}function le(We,Ue,Me,Ct,Pt){if(We.isScreenshoGenerator)return 1;var $e=Ct!==void 0&&Ct,Ft=We.noScaleMargin!=null&&We.noScaleMargin,lt=function(Ee){return Ee&&Ee!=="false"},vt=lt(We.autoHeight),Oe=pe(Ue,We.width,Me,vt,$e&&window.GGBT_wsf_view||Ft,Pt),te=parseInt(Oe.width),ee=We.width,de=We.height;if(ee===void 0){var se=Ue.querySelector(".appletParameters");se&&(ee=se.offsetWidth,de=se.offsetHeight)}var he=te/ee,ve=$e?1:Oe.height/de;return Me!==void 0&&!Me&&(he=Math.min(1,he),ve=Math.min(1,ve)),Math.min(he,ve)}function Te(We,Ue,Me){var Ct=1,Pt,$e=!1;if(We.hasOwnProperty("allowUpscale")&&($e=We.allowUpscale),We.hasOwnProperty("scale")&&(Ct=parseFloat(We.scale),(isNaN(Ct)||Ct===null||Ct===0)&&(Ct=1),Ct>1&&($e=!0)),Ue&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&($e=!0),!(We.hasOwnProperty("disableAutoScale")&&We.disableAutoScale))Pt=le(We,Ue,$e,Me,We.scaleContainerClass);else return Ct;return $e&&(!We.hasOwnProperty("scale")||Ct===1)?Pt:Math.min(Ct,Pt)}function He(We){var Ue=Math.min(window.innerWidth,document.documentElement.clientWidth),Me=Math.min(window.innerHeight,document.documentElement.clientHeight),Ct=We.getBoundingClientRect(),Pt=(Ue-Ct.width)/2,$e=(Me-Ct.height)/2;$e<0&&($e=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=$e+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&($e<40?We.style.top="40px":We.style.top=$e+"px",We.style.left=Pt+"px")}function ut(We,Ue){var Me=We.querySelector(".appletParameters");if(Me){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ue.id!==Me.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(We)}if(Me.parentElement&&/fullscreen/.test(Me.parentElement.className))return;var Ct=Te(Ue,We);On()&&Me.setAttribute("data-param-scale",Ct);for(var Pt=null,$e=0;$e<We.childNodes.length;$e++)if(We.childNodes[$e].className!==void 0&&We.childNodes[$e].className.match(/^applet_scaler/)){Pt=We.childNodes[$e];break}if(Pt!==null&&Pt.querySelector(".noscale")!==null)return;var Ft=Ue.id!==void 0?Ue.id:"ggbApplet",lt=window[Ft];(lt==null||!lt.recalculateEnvironments)&&Pt!==null&&!Pt.className.match(/fullscreen/)&&(Pt.parentNode.style.transform="",!isNaN(Ct)&&Ct!==1?(Pt.parentNode.style.width=Ue.width*Ct+"px",Pt.parentNode.style.height=Ue.height*Ct+"px",mn(Pt,Ct)):(mn(Pt,1),Pt.parentNode.style.width=Ue.width+"px",Pt.parentNode.style.height=Ue.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:ut,isFlexibleWorksheetEditor:On,positionCenter:He,getScale:Te,scaleElement:mn}}();__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 On=n.location.search;return On.indexOf(J)!=-1||On.indexOf(K)!=-1}function q(On,mn){}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(On){var mn=s[L].bindings;s[L].bindings=function(){for(var pe=mn?mn():{},le=On[webModule.__softPermutationId],Te=O;Te<le.length;Te++){var He=le[Te];pe[He[O]]=He[P]}return pe}};var t;function u(){return v(),t}function v(){if(!t){var On=o.createElement(Q);if(On.id=L,On.style.cssText=R+S,On.tabIndex=-1,o.body.appendChild(On),t=On.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var mn=document.compatMode==U?V:W;t.write(mn+X),t.close()}}}function w(On){function mn(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 ut(){if(!He){if(!Te())return;He=!0,le(),o.removeEventListener&&o.removeEventListener(Z,ut,!1),We&&clearInterval(We)}}o.addEventListener&&o.addEventListener(Z,ut,!1);var We=setInterval(function(){ut()},$)}function pe(le){var Te=u(),He=Te.body,ut=Te.createElement(_);ut.language=ab,ut.crossOrigin=W,ut.src=le,webModule.__errFn&&(ut.onerror=function(){webModule.__errFn(L,new Error(bb+le))}),He.appendChild(ut)}mn(function(){pe(On)})}webModule.__startLoadingFragment=function(On){return C(On)},webModule.__installRunAsyncCode=function(On){var mn=u(),pe=mn.body,le=mn.createElement(_);le.language=ab,le.text=On,pe.appendChild(le),pe.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(On){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(On){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(On){var mn=c[On];return mn==null?null:mn},r=d,webModule.__errFn=e}function B(){function On(We){var Ue=We.lastIndexOf(rb);Ue==-1&&(Ue=We.length);var Me=We.indexOf(sb);Me==-1&&(Me=We.length);var Ct=We.lastIndexOf(tb,Math.min(Me,Ue));return Ct>=O?We.substring(O,Ct+P):W}function mn(We){if(!We.match(/^\w+:\/\//)){var Ue=o.createElement(ub);Ue.src=We+vb,We=On(Ue.src)}return We}function pe(){var We=__gwt_getMetaProperty(wb);return We!=null?We:W}function le(){for(var We=o.getElementsByTagName(_),Ue=O;Ue<We.length;++Ue)if(We[Ue].src.indexOf(xb)!=-1)return On(We[Ue].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 ut=pe();return ut==W&&(ut=le()),ut==W&&(ut=Te()),ut==W&&He()&&(ut=On(o.location.href)),ut=mn(ut),ut}function C(On){return On.match(/^\//)||On.match(/^[a-zA-Z]+:\/\//)?On:webModule.__moduleBase+On}function D(){var On=[],mn=O,pe=[],le=[];function Te(We){var Ue=le[We](),Me=pe[We];if(Ue in Me)return Ue;var Ct=[];for(var Pt in Me)Ct[Me[Pt]]=Pt;throw r&&r(We,Ct,Ue),null}if(__gwt_isKnownPropertyValue=function(We,Ue){return Ue in pe[We]},webModule.__getPropMap=function(){var We={};for(var Ue in pe)pe.hasOwnProperty(Ue)&&(We[Ue]=Te(Ue));return We},webModule.__computePropValue=Te,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var He;try{He=Cb;var ut=He.indexOf(Db);ut!=-1&&(mn=parseInt(He.substring(ut+P),$),He=He.substring(O,ut))}catch(We){}return webModule.__softPermutationId=mn,C(He+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},49291:function(On,mn,pe){"use strict";pe.d(mn,{Ax:function(){return ut},Ds:function(){return We},KI:function(){return Me},SI:function(){return He},f1:function(){return Te}});var le=pe(38446);function Te(Ct){let Pt=!0;if(Ct.length>0){for(let $e=0;$e<Ct.length;$e++)if(Ct[$e].compile_success==0||!Ct[$e].compile_success){Pt=!1;break}}else Pt=!1;return Pt}function He(Ct,Pt=""){let $e=[];for(let Ft=0;Ft<Ct.length;Ft++){let lt=Ct[Ft],vt=Pt?`${Pt}/${lt.name}`:`${lt.name}`;$e.push({title:lt.name,type:lt.type,isLeaf:lt.type!=="tree",key:vt})}return $e}function ut(Ct,Pt,$e){for(let Ft=0;Ft<Ct.length;Ft++){let lt=Ct[Ft];if(lt.key===Pt){lt.children=$e;break}lt.children&&ut(lt.children,Pt,$e)}return Ct}function We(Ct,Pt,$e){let Ft;return function(){let lt=this,vt=arguments,Oe=function(){Ft=null,$e||Ct.apply(lt,vt)},te=$e&&!Ft;clearTimeout(Ft),Ft=setTimeout(Oe,Pt),te&&Ct.apply(lt,vt)}}const Ue=!0,Me=le.Z.API_SERVER},75872:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Oe}});var le=pe(3113),Te=pe(59301),He=Object.defineProperty,ut=Object.defineProperties,We=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Pt=(te,ee,de)=>ee in te?He(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:de}):te[ee]=de,$e=(te,ee)=>{for(var de in ee||(ee={}))Me.call(ee,de)&&Pt(te,de,ee[de]);if(Ue)for(var de of Ue(ee))Ct.call(ee,de)&&Pt(te,de,ee[de]);return te},Ft=(te,ee)=>ut(te,We(ee)),lt=(te,ee)=>{var de={};for(var se in te)Me.call(te,se)&&ee.indexOf(se)<0&&(de[se]=te[se]);if(te!=null&&Ue)for(var se of Ue(te))ee.indexOf(se)<0&&Ct.call(te,se)&&(de[se]=te[se]);return de},vt=(te,ee,de)=>new Promise((se,he)=>{var ve=Le=>{try{Be(de.next(Le))}catch(ze){he(ze)}},Ee=Le=>{try{Be(de.throw(Le))}catch(ze){he(ze)}},Be=Le=>Le.done?se(Le.value):Promise.resolve(Le.value).then(ve,Ee);Be((de=de.apply(te,ee)).next())});const Oe=te=>{var ee=te,{children:de}=ee,se=lt(ee,["children"]);const[he,ve]=(0,Te.useState)(!1);return Te.createElement(le.ZP,Ft($e({},se),{loading:he,onClick:Ee=>vt(void 0,null,function*(){try{ve(!0),yield se.onClick(Ee),ve(!1)}catch(Be){console.error(Be),ve(!1)}})}),de)}},95750:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return vt}});var le=pe(59301),Te=pe(8591),He=pe(92832),ut={codeBox:"codeBox___WpkVl"},We=pe(92310),Ue=pe.n(We),Me=Object.defineProperty,Ct=(Oe,te,ee)=>te in Oe?Me(Oe,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Oe[te]=ee,Pt=(Oe,te,ee)=>Ct(Oe,typeof te!="symbol"?te+"":te,ee),$e=(Oe,te,ee)=>new Promise((de,se)=>{var he=Be=>{try{Ee(ee.next(Be))}catch(Le){se(Le)}},ve=Be=>{try{Ee(ee.throw(Be))}catch(Le){se(Le)}},Ee=Be=>Be.done?de(Be.value):Promise.resolve(Be.value).then(he,ve);Ee((ee=ee.apply(Oe,te)).next())});class Ft extends le.Component{constructor(te){super(te),Pt(this,"canvas"),Pt(this,"randomNum",(ee,de)=>Math.floor(Math.random()*(de-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 de=this.randomNum(te,ee),se=this.randomNum(te,ee),he=this.randomNum(te,ee);return`rgb(${de}, ${se}, ${he})`}drawText(te,ee,de){te.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);const se=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);te.font=se+"px SimHei";const he=10,ve=(this.state.contentWidth-40)/(this.state.code.length-1);let Ee=he;de>0&&(Ee=he+de*ve);let Be=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(Be=40);const Le=this.randomNum(-10,10);te.translate(Ee,Be),te.rotate(Le*Math.PI/180),te.fillText(ee,0,0),te.rotate(-Le*Math.PI/180),te.translate(-Ee,-Be)}drawLine(te){for(let ee=0;ee<1;ee++)te.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),te.beginPath(),te.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),te.stroke()}drawDot(te){for(let ee=0;ee<100;ee++)te.fillStyle=this.randomColor(0,255),te.beginPath(),te.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),te.fill()}randomCode(){let te="";const ee="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890";for(let de=0;de<this.state.codeLength;de++){const se=Math.floor(Math.random()*57);te+=ee[se]}this.setState({code:te},()=>{const se=this.canvas.current.getContext("2d");se.textBaseline="bottom",se.fillStyle=this.randomColor(this.state.backgroundColorMin,this.state.backgroundColorMax),se.fillRect(0,0,this.state.contentWidth,this.state.contentHeight);for(let he=0;he<this.state.code.length;he++)this.drawText(se,this.state.code[he],he);this.drawLine(se),this.drawDot(se)})}render(){const{className:te,width:ee=300}=this.props;return le.createElement("div",{className:Ue()(ut.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 lt=(Oe,te)=>{let ee;Modal.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:React.createElement("div",null,React.createElement("p",null,te),React.createElement(Ft,{ref:de=>ee=de})),onOk:()=>$e(void 0,null,function*(){if(ee.onVerify())return Promise.reject();Oe()})})};var vt=Ft},40928:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Pt}});var le=pe(59301),Te=pe(92832),He=pe(12563),ut=pe(8591),We={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},Ue=pe(62772);const{TextArea:Me}=Te.default;class Ct extends le.Component{constructor(Ft){super(Ft),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Ft,onAnswerChange:lt,addChildAnswer:vt,exerciseIsPublish:Oe,answers:te,activeOptionErrorIndex:ee,flex:de="0 0 1000px"}=this.props;console.log("----",te);let{inputVisible:se,EditInputIndex:he}=this.state;return le.createElement("div",{className:We.flex},le.createElement("div",{className:`${We.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Ft+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:Be=>{Be.preventDefault(),(te==null?void 0:te.length)===1&&Ee===0?this.props.deleteChildAnswermain(Ft,Ee):this.props.deleteChildAnswer(Ft,Ee)}},le.createElement("span",{onDoubleClick:Be=>{this.setState({EditInputIndex:Ee}),Be.preventDefault()}},ve)):le.createElement(Te.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Be=>{if(Be.target.value.replaceAll(" ","").length<=0){ut.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}lt(Ft,Ee,Be.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):le.createElement(Te.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Be=>{if(Be.target.value.replaceAll(" ","").length<=0){ut.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}lt(Ft,Ee,Be.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&le.createElement(He.default,{className:"site-tag-plus",onClick:()=>{vt(Ft),this.setState({inputVisible:!0})}},le.createElement(Ue.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var Pt=Ct},60355:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Oe}});var le=pe(59301),Te=pe(64726),He=Object.defineProperty,ut=Object.defineProperties,We=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Pt=(te,ee,de)=>ee in te?He(te,ee,{enumerable:!0,configurable:!0,writable:!0,value:de}):te[ee]=de,$e=(te,ee)=>{for(var de in ee||(ee={}))Me.call(ee,de)&&Pt(te,de,ee[de]);if(Ue)for(var de of Ue(ee))Ct.call(ee,de)&&Pt(te,de,ee[de]);return te},Ft=(te,ee)=>ut(te,We(ee)),lt=(te,ee,de)=>Pt(te,typeof ee!="symbol"?ee+"":ee,de);const vt="\u2581";class Oe extends le.Component{constructor(){super(...arguments),lt(this,"getChCountBeforeCursor",(ee,de)=>{const se=de.line;let he=0;for(let Ee=0;Ee<se;Ee++)he+=ee.getLine(Ee).split(vt).length-1;const ve=ee.getLine(se).substring(0,de.ch);return he+=ve.split(vt).length-1,he}),lt(this,"onCMBeforeChange",(ee,de)=>{const se=ee.getRange(de.from,de.to);let he=0;if(de.text.forEach(ve=>{he+=ve.split(vt).length-1}),se&&se.indexOf(vt)!=-1){const ve=se.split(vt).length-1,Ee=this.getChCountBeforeCursor(ee,de.from);console.log(`\u5220\u9664${ve}\u4E2A\uFF0C \u4E4B\u524D\u6709${Ee}\u4E2A\uFF0C\u65B0\u589E${he}\u4E2A`),this.props.deleteEmptyDisabled?de.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(Ee,ve,he)}else if(he){const ve=this.getChCountBeforeCursor(ee,de.from);console.log(`\u65B0\u589E${he}\u4E2A\uFF0C\u4E4B\u524D\u6709${ve}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ve,0,he)}})}render(){return le.createElement(Te.Z,Ft($e({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},60341:function(On,mn,pe){"use strict";pe.d(mn,{d4:function(){return vt},VP:function(){return Pt}});var le=pe(59301),Te={digitalLabel:"digitalLabel___hkWuZ",active:"active___jawU1",titleEditor:"titleEditor___wX1lW",title:"title___SuT2h",editIcon:"editIcon___XrTIi",paperTab:"paperTab___GUxeB",tabItem:"tabItem___or0fY",dottedLine:"dottedLine___Ln0Xr"};const He=({number:Oe,active:te,className:ee})=>le.createElement("div",{className:`${Te.digitalLabel} ${te?Te.active:""} ${ee}`},Oe);var ut=pe(6848),We=pe(92832),Ue=pe(8591),Me=pe(59301),Ct=(Oe,te,ee)=>new Promise((de,se)=>{var he=Be=>{try{Ee(ee.next(Be))}catch(Le){se(Le)}},ve=Be=>{try{Ee(ee.throw(Be))}catch(Le){se(Le)}},Ee=Be=>Be.done?de(Be.value):Promise.resolve(Be.value).then(he,ve);Ee((ee=ee.apply(Oe,te)).next())});const Pt=({defaultValue:Oe,onFinish:te})=>{const[ee,de]=(0,le.useState)(!1),[se,he]=(0,le.useState)(Oe);return(0,le.useEffect)(()=>{he(Oe)},[Oe]),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:()=>Ct(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){Ue.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&de(!1)}),onPressEnter:()=>Ct(void 0,null,function*(){var ve;if(((ve=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ve.length)<=0){Ue.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield te(se))&&de(!1)})}):Me.createElement("div",{className:Te.title,onDoubleClick:()=>de(!0)},se,Me.createElement(ut.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},Me.createElement("i",{className:`${Te.editIcon} iconfont icon-bianji_Hover`,onClick:()=>de(!0)}))))};var $e=pe(95237),Ft=pe(43604),lt=(Oe,te,ee)=>new Promise((de,se)=>{var he=Be=>{try{Ee(ee.next(Be))}catch(Le){se(Le)}},ve=Be=>{try{Ee(ee.throw(Be))}catch(Le){se(Le)}},Ee=Be=>Be.done?de(Be.value):Promise.resolve(Be.value).then(he,ve);Ee((ee=ee.apply(Oe,te)).next())});const vt=({onChange:Oe=()=>lt(void 0,null,function*(){}),tabs:te,activeKey:ee,defaultActiveKey:de,className:se=""})=>{var he,ve,Ee,Be,Le,ze,je;const[Xe,Ye]=(0,le.useState)(de===void 0?(he=te[0])==null?void 0:he.key:de);return(0,le.useEffect)(()=>{ee!==void 0&&Ye(ee)},[ee]),le.createElement($e.Z,{justify:"center",align:"middle",className:`${Te.paperTab} ${se}`},le.createElement(Ft.Z,{className:`${Te.tabItem} ${Xe===((ve=te[0])==null?void 0:ve.key)?Te.active:""}`,onClick:()=>lt(void 0,null,function*(){var dt;yield Oe(te[0].key),Ye((dt=te[0])==null?void 0:dt.key)})},le.createElement(He,{number:1,active:Xe===((Ee=te[0])==null?void 0:Ee.key),className:"mr10"}),le.createElement("span",null,(Be=te[0])==null?void 0:Be.label)),le.createElement(Ft.Z,{flex:"188px",className:`${Te.dottedLine} ml30 mr30`}),le.createElement(Ft.Z,{className:`${Te.tabItem} ${Xe===((Le=te[1])==null?void 0:Le.key)?Te.active:""}`,onClick:()=>lt(void 0,null,function*(){var dt,Ze;yield Oe((dt=te[1])==null?void 0:dt.key),Ye((Ze=te[1])==null?void 0:Ze.key)})},le.createElement(He,{number:2,active:Xe===((ze=te[1])==null?void 0:ze.key),className:"mr10"}),le.createElement("span",null,(je=te[1])==null?void 0:je.label)))}},72559:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ue}});var le=pe(60324),Te={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},He=pe(32637),ut=pe(59301),Ue=({type:Me,style:Ct})=>{const Pt=ut.createElement("div",{className:Te.wrap,onClick:$e=>{$e.preventDefault(),$e.stopPropagation()}},ut.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",ut.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"),ut.createElement("div",{className:Te.contact},ut.createElement("div",{className:Te.img},ut.createElement("img",{src:He,width:"124px",height:"124px"})),ut.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return ut.createElement(le.Z,{content:Pt},ut.createElement("span",{className:Te.text,style:Ct},"\u9AD8\u6D88\u8017"))}},14573:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ft}});var le=pe(59301),Te={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},He=pe(92310),ut=pe.n(He),We=pe(71418),Ue=pe(2859),Me=pe(7660),Ct=pe(88230),Pt=(lt,vt,Oe)=>new Promise((te,ee)=>{var de=ve=>{try{he(Oe.next(ve))}catch(Ee){ee(Ee)}},se=ve=>{try{he(Oe.throw(ve))}catch(Ee){ee(Ee)}},he=ve=>ve.done?te(ve.value):Promise.resolve(ve.value).then(de,se);he((Oe=Oe.apply(lt,vt)).next())}),Ft=({data:lt,className:vt,fullWidth:Oe,style:te={},onClose:ee,onOk:de,showFullTools:se,noAssociationId:he})=>{const ve=(0,le.useRef)(null),Ee=(0,le.useRef)(null),Be=(0,le.useRef)(null),Le=(0,le.useRef)(null),[ze,je]=(0,le.useState)(!1),[Xe,Ye]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>{Be.current||(Be.current=document.createElement("style"),document.head.appendChild(Be.current)),lt!=null&&lt.visible?(document.body.setAttribute("data-custom","y-hidden"),Be.current.innerHTML=" html { overflow-y: hidden; }",lt!=null&&lt.src&&dt()):(document.body.removeAttribute("data-custom"),Be.current&&(document.head.removeChild(Be.current),Be.current=null))},[lt==null?void 0:lt.visible]);const dt=()=>Pt(void 0,null,function*(){je(!0),Ye("\u6B63\u5728\u52A0\u8F7D\u4E2D");const kt=yield(0,Ct.ZJ)(lt==null?void 0:lt.src);ve.current.src="",ve.current.src=kt,ve.current.onload=function(){at()},je(!1),Ye("")}),Ze=kt=>Pt(void 0,null,function*(){je(!0),Ye("\u6B63\u5728\u4FDD\u5B58\u4E2D");const xt=yield(0,Me.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:lt.title,file:kt.dataUrl}});xt!=null&&xt.id&&!he?(yield(0,Me.ZP)(`/api/attachments/${lt.id}/add_subitem.json`,{method:"post",body:{subitem_id:xt==null?void 0:xt.id,settings:JSON.stringify(kt.state)}})).status===0&&de():xt!=null&&xt.id&&de(xt),je(!1),Ye("")}),Nt=()=>{const kt=document.querySelector('a[href="https://markerjs.com/"]');kt&&kt.parentNode&&(kt.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(Ot=>{const Gt=document.querySelector(Ot.name);Gt&&Gt.setAttribute("title",Ot.title)})},at=()=>{Ee.current=new Ue.hP(ve.current),Ee.current.targetRoot=Le.current,Ee.current.addEventListener("render",Ze),Ee.current.addEventListener("beforeclose",ee),se&&(Ee.current.availableMarkerTypes=Ee.current.ALL_MARKER_TYPES,Ee.current.uiStyleSettings.redoButtonVisible=!0,Ee.current.uiStyleSettings.notesButtonVisible=!0,Ee.current.uiStyleSettings.zoomButtonVisible=!0,Ee.current.uiStyleSettings.zoomOutButtonVisible=!0,Ee.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Ee.current.uiStyleSettings,Ee.current.show(),lt!=null&&lt.snapshotData&&Ee.current.restoreState(lt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Nt()},300)};return le.createElement(le.Fragment,null,(lt==null?void 0:lt.visible)&&le.createElement(We.Z,{spinning:ze,tip:Xe,style:{position:"absolute"}},le.createElement("div",{ref:Le,className:ut()(Te.imageDimensions,vt,Oe?Te.fullWidth:""),style:te},le.createElement("img",{className:Te.img,ref:ve}))))}},72714:function(On,mn,pe){"use strict";var le=pe(59301),Te=pe(11570),He=pe(48136),ut=pe(46531),We=pe(43418),Ue=pe(59301);const Me=(0,le.forwardRef)(({callback:Ct,width:Pt,onChange:$e,disabled:Ft,readOnly:lt,type:vt="",value:Oe="",style:te={}},ee)=>{const de=(0,le.useRef)(),se=(0,le.useRef)(),[he,ve]=(0,le.useState)(0),[Ee,Be]=(0,le.useState)(0),[Le,ze]=(0,le.useState)(!1),je=()=>{var Ze=document.createElement("div");Ze.innerHTML=de.current.getValue();var Nt=Ze.innerText;return Ct&&Ct(Nt),Nt};(0,le.useImperativeHandle)(ee,()=>({getData:je}));const Xe=Ze=>{Ze.preventDefault();const Nt=Ze.clientX-he,at=Ze.clientY-Ee;document.body.onmousemove=kt=>{let xt=kt.clientX-Nt,Ot=kt.clientY-at;const Gt=document.getElementsByClassName("markdown-popup-form")[0],At=window.innerWidth-Gt.offsetWidth,qe=window.innerHeight-Gt.offsetHeight;xt=Math.max(0,Math.min(xt,At)),Ot=Math.max(0,Math.min(Ot,qe)),Ye(kt.clientX,kt.clientY,Nt,at)&&(ve(xt),Be(Ot))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ye=(Ze,Nt,at,kt)=>{const xt=document.body.clientHeight,Ot=document.body.clientWidth;return Ze<20&&at>Ze||Ze>Ot-20&&at<Ze||Nt<20&&kt>Nt||Nt>xt-20&&kt<Nt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,le.useEffect)(()=>{Le&&setTimeout(()=>{const Ze=document.getElementsByClassName("markdown-popup-form")[0],Nt=window.innerWidth/2-Ze.offsetWidth/2,at=window.innerHeight/2-Ze.offsetHeight/2;ve(Nt),Be(at)},0)},[Le]);const dt=()=>{Ft||lt||ze(!0)};return Ue.createElement("div",{style:te},Ue.createElement("div",{style:{width:Pt||"100%",position:"relative"},className:`${Te.Z.mathFillWrap} ${Ft||lt?"cursorDefault":""}`,onClick:()=>dt()},Ue.createElement("math-field",{disabled:Ft,locale:"zh_cn",class:`${Te.Z.mathField} ${vt}`,readOnly:lt,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:de,style:{width:"100%",fontSize:Oe?18:14},value:Oe||""})),Ue.createElement(We.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:he,top:Ee},title:Ue.createElement("div",{style:{cursor:"move"},onMouseDown:Xe},"\u8F93\u5165\u516C\u5F0F"),open:Le,onOk:()=>{const Ze=se.current.getData();de.current.setValue(Ze),$e(Ze),ze(!1)},onCancel:()=>{ze(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Ue.createElement(ut.Z,{value:Oe,ref:se,onChange:$e,showSaveButton:!1})))});mn.Z=Me},46531:function(On,mn,pe){"use strict";var le=pe(59301),Te=pe(95237),He=pe(43604),ut=pe(99313),We=pe(3113),Ue=pe(99325),Me=pe(11570),Ct=pe(48136),Pt=pe(59301);const $e=(0,le.forwardRef)(({callback:Ft,showSaveButton:lt,value:vt=""},Oe)=>{const te=(0,le.useRef)(),ee=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],de=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
x=a + r\\text{cos}\\theta \\ \r
y=b + r\\text{sin}\\theta \r
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\left\\{\\begin{matrix} \r
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
\\end{matrix}\\right. \r
\\end{array} `},{value:`\\begin{array}{l} \r
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
a \\perp \\alpha \\ \r
b \\perp \\alpha \r
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
a \\parallel \\partial ,b \\parallel \\partial \r
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
a \\perp m,a \\perp n \r
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
a^{2}+b^{2}=c^{2} \r
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
\\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
a,b \\in R^{+} \\ \r
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
a,b \\in R \\ \r
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
\\end{array}`},{value:`\\begin{array}{c} \r
H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r
\\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
\\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r
P \\left( \\emptyset \\right) =0 \\\\ \r
P \\left( S \\right) =1 \r
\\end{array}`},{value:`\\begin{array}{c} \r
\\forall A \\in S \\\\ \r
P \\left( A \\right) \\ge 0 \r
\\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
\\end{array}`},{value:`\\begin{array}{c} \r
P_{n}=n! \\\\ \r
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
\\end{array}`}]}]}],se=Ee=>{te.current.setValue(te.current.getValue()+" "+Ee.value+" ")},he=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Pt.createElement(Te.Z,{className:Me.Z.lists,gutter:[10,10]},ee.map((Ee,Be)=>Pt.createElement(He.Z,{flex:"110px",className:Me.Z.item},Pt.createElement("div",null,Pt.createElement(Ue.Z,{value:`$$${Ee.value}$$`}),Ee.name),Pt.createElement("div",{className:Me.Z.children},Ee.children.map((Le,ze)=>Pt.createElement("div",{key:ze},Pt.createElement("h1",null,Le.name),Pt.createElement(Te.Z,{gutter:[10,10]},Le.data.map((je,Xe)=>Pt.createElement(He.Z,{key:Xe,onClick:()=>se(je),className:Me.Z.diamond},Pt.createElement(Ue.Z,{value:"`$$"+je.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Pt.createElement(Te.Z,{className:Me.Z.lists,gutter:[10,10]},de.map((Ee,Be)=>Pt.createElement(He.Z,{flex:"110px",className:Me.Z.item},Pt.createElement("div",null,Pt.createElement(Ue.Z,{value:"`$$"+Ee.value+"$$`"}),Ee.name),Pt.createElement("div",{className:Me.Z.children},Ee.children.map((Le,ze)=>Pt.createElement("div",{key:ze},Le.name&&Pt.createElement("h1",null,Le.name),Pt.createElement(Te.Z,{gutter:[10,10]},Le.data.map((je,Xe)=>Pt.createElement(He.Z,{key:Xe,onClick:()=>se(je),className:Me.Z.diamond},Pt.createElement(Ue.Z,{value:"`$$"+je.value+"$$`"}))))))))))}],ve=()=>{var Ee=document.createElement("div");Ee.innerHTML=te.current.getValue();var Be=Ee.innerText;return Ft&&Ft(Be),Be};return(0,le.useImperativeHandle)(Oe,()=>({getData:ve})),Pt.createElement("div",{className:Me.Z.mathWrap},Pt.createElement(ut.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}},vt||""),lt&&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")))});mn.Z=$e},57816:function(On,mn,pe){"use strict";var le=pe(59301),Te=pe(93314),He=pe(3113),ut=Object.defineProperty,We=Object.defineProperties,Ue=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,Pt=Object.prototype.propertyIsEnumerable,$e=(Oe,te,ee)=>te in Oe?ut(Oe,te,{enumerable:!0,configurable:!0,writable:!0,value:ee}):Oe[te]=ee,Ft=(Oe,te)=>{for(var ee in te||(te={}))Ct.call(te,ee)&&$e(Oe,ee,te[ee]);if(Me)for(var ee of Me(te))Pt.call(te,ee)&&$e(Oe,ee,te[ee]);return Oe},lt=(Oe,te)=>We(Oe,Ue(te));const vt=({img:Oe,buttonProps:te={},styles:ee={},customText:de,ButtonText:se,ButtonClick:he,Buttonclass:ve,ButtonTwo:Ee,imgStyles:Be,loading:Le=!1})=>le.createElement("section",{className:"tc animated fadeIn",style:Ft(Ft({},{color:"#999",margin:"100px auto",visibility:Le?"hidden":"visible"}),ee)},le.createElement("img",{src:Oe||Te,style:lt(Ft({},Be),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},de||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&le.createElement(He.ZP,Ft({className:ve,onClick:he},te),se),Ee&&Ee);mn.Z=vt},90853:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return ve}});var le=pe(59301),Te={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},He=pe(3113),ut=pe(70557),We=pe(57800),Ue=pe(6848),Me=pe(88230),Ct=pe(30897),Pt=pe(57816),$e=pe(38446),Ft=pe(89282),lt=pe(59301),vt=Object.defineProperty,Oe=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(Ee,Be,Le)=>Be in Ee?vt(Ee,Be,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ee[Be]=Le,se=(Ee,Be)=>{for(var Le in Be||(Be={}))te.call(Be,Le)&&de(Ee,Le,Be[Le]);if(Oe)for(var Le of Oe(Be))ee.call(Be,Le)&&de(Ee,Le,Be[Le]);return Ee},he=(Ee,Be,Le)=>new Promise((ze,je)=>{var Xe=Ze=>{try{dt(Le.next(Ze))}catch(Nt){je(Nt)}},Ye=Ze=>{try{dt(Le.throw(Ze))}catch(Nt){je(Nt)}},dt=Ze=>Ze.done?ze(Ze.value):Promise.resolve(Ze.value).then(Xe,Ye);dt((Le=Le.apply(Ee,Be)).next())}),ve=({editOffice:Ee="view",data:Be,theme:Le,type:ze,filename:je,monacoEditor:Xe,className:Ye,style:dt,close:Ze,onClose:Nt,hasMask:at,disabledDownload:kt,onImgDimensions:xt,showNodata:Ot,recordInfo:Gt})=>{const[At,qe]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ve,_t]=(0,le.useState)(""),[vn,yn]=(0,le.useState)(),jt=window.ENV==="build"?"/react/build":"",en=location.host.startsWith("localhost")?$e.Z.PROXY_SERVER:$e.Z.API_SERVER,Wn=10*(1024*1024),un=(0,le.useRef)();Be!=null&&Be.startsWith("/api")&&ze!=="txt"&&(Be=$e.Z.API_SERVER+Be);const kn=Ge=>Ge.substring(Ge.lastIndexOf("/")+1).split(".").pop();je&&Xe&&(Xe.filename=je),(0,le.useEffect)(()=>{var Ge,be;const Pe=(be=(Ge=document.cookie)==null?void 0:Ge.replace(/\s/g,""))==null?void 0:be.split(";");Pe==null||Pe.map(Ne=>{let Ie=Ne.split("=");Ie[0]==="_educoder_session"&&_t(Ie[1])})},[]),(0,le.useEffect)(()=>{ze==="office"&&(Be.indexOf("bigfilescdn.")>-1||Be.indexOf("bigfiles1")>-1?yn({url:Be,fileType:kn(Be),model:Be.indexOf("model=edit")?"edit":"view"}):wt())},[ze,Be]);const wt=()=>he(void 0,null,function*(){console.log("data:",Be);let Ge=Be;Be.startsWith("http")||(Ge=location.origin+Ge);let be=new URL(Ge).pathname.split("/").pop();const Pe=yield(0,Ct.gJ)({attachment_id:be});Pe.url=en+Pe.url,yn(Pe)}),jn=()=>{if(Be.startsWith("http")||Be.startsWith("blob:")){ci();return}(0,Me.Sv)(je||"educoder",Be,je)},ci=()=>{Gt&&(0,Ft.fc)({id:Gt==null?void 0:Gt.id,watch_type:1,course_id:Gt==null?void 0:Gt.course_id}),(0,Me.Nd)(je||"educoder",decodeURIComponent(Be))};return lt.createElement("div",{style:se({},dt||{}),className:`${at&&Te.bgBlack} ${ze?Te.wrp:"hide"}`},Ze&&lt.createElement("div",{className:Te.close,ref:un},!!xt&&lt.createElement(Ue.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>un.current},lt.createElement("span",{onClick:()=>{Nt(),xt()}},lt.createElement("i",{className:"icon-yulanpizhu"}))),!kt&&lt.createElement(Ue.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>un.current},lt.createElement("span",{onClick:ci},lt.createElement("i",{className:"icon-quxiaozhiding"}))),lt.createElement(Ue.Z,{title:"\u5173\u95ED",getPopupContainer:()=>un.current},lt.createElement("span",{className:"",onClick:Nt},lt.createElement("i",{className:"icon-guanbi1"})))),lt.createElement("div",{className:`${Te[Ye]} ${Ye} ${Te.monaco} ${ze==="txt"?"show":"hide"}`},ze==="txt"&&lt.createElement(lt.Fragment,null,lt.createElement(We.ZP,se({},Xe)))),ze==="audio"&&lt.createElement("audio",{src:`${(Be==null?void 0:Be.indexOf("http://"))>-1||(Be==null?void 0:Be.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Be}`,autoPlay:!0}),ze==="video"&&lt.createElement(lt.Fragment,null,(Be==null?void 0:Be.indexOf("http"))>-1?lt.createElement("video",{controls:!0,src:`${Be}`,autoPlay:!0}):lt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Be}`,autoPlay:!0})),ze==="office"&&vn&&lt.createElement("iframe",{src:`${jt}/office.html?key=${vn.key}&url=${btoa(vn.url)}&callbackUrl=${en+(vn.callbackUrl||"")}&fileType=${vn.fileType}&title=${vn.title||""}&model=${Ee}&officeServer=${$e.Z.ONLYOFFICE}&disabledDownload=${!!kt}`}),ze==="html"&&lt.createElement("iframe",{src:Be+"&disposition=inline"}),ze==="pdf"&&lt.createElement("iframe",{src:`${jt}/js/pdfview/index.html?filename=${je||"educoder.pdf"}&url=${encodeURIComponent(Be)}&disabledDownload=${!!kt}`}),ze==="image"&&lt.createElement("img",{src:`${(Be==null?void 0:Be.indexOf("http://"))>-1||(Be==null?void 0:Be.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Be}`}),(ze==="other"||ze==="download")&&lt.createElement(lt.Fragment,null,Ot?lt.createElement(Pt.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:lt.createElement(He.ZP,{icon:lt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:jn,disabled:kt},"\u4E0B\u8F7D")}):lt.createElement(He.ZP,{type:"primary",size:"middle",onClick:jn,disabled:kt},lt.createElement(ut.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},32285:function(On,mn,pe){"use strict";pe.d(mn,{t:function(){return Pe}});var le=pe(59301),Te=pe(92832),He=pe(78241),ut=pe(43418),We=pe(95237),Ue=pe(43604),Me=pe(5871),Ct=pe(57809),Pt=pe(5112),$e=pe(70941),Ft=pe(24459),lt=pe(31687),vt=pe(8591),Oe=pe(3113),te=pe(71418),ee=pe(24334),de={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},se=pe(7660),he=pe(5247),ve=pe(64726),Ee=pe(56102),Be=pe(76826),Le=pe(59301),ze=Object.defineProperty,je=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,Ye=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Nt=(Ne,Ie,xe)=>Ie in Ne?ze(Ne,Ie,{enumerable:!0,configurable:!0,writable:!0,value:xe}):Ne[Ie]=xe,at=(Ne,Ie)=>{for(var xe in Ie||(Ie={}))dt.call(Ie,xe)&&Nt(Ne,xe,Ie[xe]);if(Ye)for(var xe of Ye(Ie))Ze.call(Ie,xe)&&Nt(Ne,xe,Ie[xe]);return Ne},kt=(Ne,Ie)=>je(Ne,Xe(Ie)),xt=(Ne,Ie,xe)=>new Promise((ct,Lt)=>{var et=Dt=>{try{Bt(xe.next(Dt))}catch(ft){Lt(ft)}},it=Dt=>{try{Bt(xe.throw(Dt))}catch(ft){Lt(ft)}},Bt=Dt=>Dt.done?ct(Dt.value):Promise.resolve(Dt.value).then(et,it);Bt((xe=xe.apply(Ne,Ie)).next())}),Gt=({buttonProps:Ne,buttonText:Ie,form:xe,hackIdentifier:ct="",answerKey:Lt,data:et})=>{const[it,Bt]=(0,le.useState)(!1),[Dt,ft]=(0,le.useState)(!1),[$t,xn]=(0,le.useState)(!1),[an,Jt]=(0,le.useState)({}),[Tn,Kn]=(0,le.useState)(""),[dn,Qn]=(0,le.useState)(""),pi=(0,le.useRef)(ct),zn=(0,le.useRef)(""),Nn=(0,le.useRef)(!1);(0,le.useEffect)(()=>{$t&&cr()},[$t]),(0,le.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const yi=()=>new Date().getTime(),Zi=et==null?void 0:et.code,Hi=()=>{var di,wi;let Qi=Zi?et==null?void 0:et.code:(di=xe.getFieldValue("hack_codes"))==null?void 0:di.code,Li=Zi?et==null?void 0:et.answer_content:xe.getFieldValue(Lt),ro=Zi?et==null?void 0:et.input:(wi=xe.getFieldValue("hack_sets"))==null?void 0:wi.input;Li==null||Li.forEach(fr=>{const Ae=fr.value||fr.answer_text||"";Qi=Qi.replace(/(@▁@|@▁▁@)/,Ae)}),Qn(ro),Kn(Qi),Jt({}),xn(!0)},cr=()=>xt(void 0,null,function*(){var di,wi,Qi,Li;const ro=yi(),fr=Zi?et==null?void 0:et.time_limit:(di=xe.getFieldsValue())==null?void 0:di.hack.time_limit,Ae=Zi?(wi=et==null?void 0:et.answer_content)==null?void 0:wi.length:(Li=(Qi=xe.getFieldsValue())==null?void 0:Qi.standard_answers)==null?void 0:Li.length;Bt(!0),yield(0,he.bM)(zn.current,{test_hack_code:Tn,test_input:dn});function Ei(){return xt(this,null,function*(){const{status:Sr,data:Fn}=yield(0,he.rX)(zn.current,"submit"),zi=yi()-ro>(fr+3)*1e3*Ae;if(Nn.current){if(zi){vt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),Bt(!1);return}if(Sr===0){Bt(!1),Jt(kt(at({},Fn),{showText:!0}));return}setTimeout(Ei,1e3)}})}Ei()}),br=()=>xt(void 0,null,function*(){var di,wi,Qi,Li,ro,fr,Ae;if(!et){try{yield xe.validateFields()}catch(xi){(Qi=(wi=(di=xi==null?void 0:xi.errorFields)==null?void 0:di[0])==null?void 0:wi.name)!=null&&Qi.includes("standard_answers")?vt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):vt.ZP.error(xi.errorFields[0].errors[0]),xe.scrollToField(xi.errorFields[0].name,{behavior:"smooth",block:"center"});return}ft(!0);let Sr="";const Fn=xe.getFieldsValue();pi.current?Sr=yield(0,se.ZP)(`/api/problems/${pi.current}.json`,{method:"put",body:kt(at({},Fn),{hack:kt(at({},Fn==null?void 0:Fn.hack),{sub_discipline_id:(Ae=(fr=Fn==null?void 0:Fn.hack)==null?void 0:fr.sub_discipline_id)==null?void 0:Ae[1],difficult:Fn.difficulty,item_banks_group_id:Fn.item_banks_group_id}),hack_codes:kt(at({},Fn.hack_codes),{code:ee.Base64.encode(Fn.hack_codes.code)}),update_hack_sets:[at({},Fn.hack_sets)],is_blank:!0})}):(Sr=yield(0,se.ZP)("/api/problems.json",{method:"post",body:kt(at({},Fn),{hack:kt(at({},Fn==null?void 0:Fn.hack),{sub_discipline_id:(ro=(Li=Fn==null?void 0:Fn.hack)==null?void 0:Li.sub_discipline_id)==null?void 0:ro[1],difficult:Fn.difficulty,item_banks_group_id:Fn.item_banks_group_id}),hack_codes:kt(at({},Fn.hack_codes),{code:ee.Base64.encode(Fn.hack_codes.code)}),hack_sets:[at({},Fn.hack_sets)],is_blank:!0})}),pi.current=Sr==null?void 0:Sr.identifier,sessionStorage.projectFill=Sr==null?void 0:Sr.identifier)}const Ei=yield(0,se.ZP)(`/api/problems/${pi.current}/start.json`,{method:"get"});if((Ei==null?void 0:Ei.status)===0){zn.current=Ei==null?void 0:Ei.identifier,Nn.current=!0,ft(!1),Hi();return}ft(!1)}),gi=di=>{const{status:wi,error_msg:Qi,execute_time:Li,output:ro,input:fr,expected_output:Ae}=di;let Ei=null;switch(wi){case Be.h.OK:Ei=Le.createElement(Le.Fragment,null,Le.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Li/1e3,"\u79D2"),Le.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Be.h.NOMATCH:Ei=Le.createElement(Le.Fragment,null,Le.createElement("div",null,"\u8F93\u5165\uFF1A"),Le.createElement("pre",{style:{fontFamily:"initial"}},fr),Le.createElement("div",null,"\u8F93\u51FA\uFF1A"),Le.createElement("pre",{style:{fontFamily:"initial"}},ro&&ee.Base64.decode(ro)),Le.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Le.createElement("pre",{style:{fontFamily:"initial"}},Ae&&ee.Base64.decode(Ae)));break;case Be.h.EXECUTEFAILURE:Ei=Le.createElement(Le.Fragment,null,Le.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Le.createElement("pre",null,fr)),Le.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Le.createElement("pre",{className:"error"},ee.Base64.decode(Qi)));break;case Be.h.COMPILEFAILURE:Ei=Le.createElement(Le.Fragment,null,Le.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Le.createElement("pre",null,fr)),Le.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Le.createElement("pre",{className:"error"},ee.Base64.decode(Qi)));break;case Be.h.PODFAILURE:Ei=Le.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Be.h.TIMEOUT:Ei=Le.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Le.createElement(Le.Fragment,null," ",Ei," ")};return Le.createElement("div",null,Le.createElement(Oe.ZP,kt(at({loading:Dt},Ne),{onClick:br}),Ie),Le.createElement(ut.default,{open:$t,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:it,cancelButtonProps:{style:{display:"none"}},onOk:()=>cr(),onCancel:()=>{Nn.current=!1,xn(!1)}},Le.createElement("div",{className:de.result},Le.createElement("div",{className:de.left},Le.createElement("div",{className:"mb20"},Le.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!et&&Le.createElement(Ee.CopyToClipboard,{text:Tn,onCopy:()=>vt.ZP.success("\u590D\u5236\u6210\u529F")},Le.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Le.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Le.createElement(ve.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:Tn,onChange:di=>Kn(di)})),Le.createElement("div",{className:de.right},Le.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Le.createElement("div",{className:de.box},Le.createElement("div",{className:de.li},Le.createElement(Te.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:dn,onChange:di=>Qn(di.target.value),bordered:!1,style:{height:180}}))),Le.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Le.createElement("div",{className:de.box},Le.createElement(te.Z,{spinning:it,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Le.createElement("div",{className:de.li,style:{height:196,overflow:"auto",padding:10}},gi(an))))))))},At=pe(87169),qe=pe(59301),Ve=Object.defineProperty,_t=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,ln=(Ne,Ie,xe)=>Ie in Ne?Ve(Ne,Ie,{enumerable:!0,configurable:!0,writable:!0,value:xe}):Ne[Ie]=xe,Wn=(Ne,Ie)=>{for(var xe in Ie||(Ie={}))jt.call(Ie,xe)&&ln(Ne,xe,Ie[xe]);if(yn)for(var xe of yn(Ie))en.call(Ie,xe)&&ln(Ne,xe,Ie[xe]);return Ne},un=(Ne,Ie)=>_t(Ne,vn(Ie)),kn=(Ne,Ie)=>{var xe={};for(var ct in Ne)jt.call(Ne,ct)&&Ie.indexOf(ct)<0&&(xe[ct]=Ne[ct]);if(Ne!=null&&yn)for(var ct of yn(Ne))Ie.indexOf(ct)<0&&en.call(Ne,ct)&&(xe[ct]=Ne[ct]);return xe};const{TextArea:wt}=Te.default,jn=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],ci=({value:Ne,onChange:Ie})=>qe.createElement(Switch,{checked:Ne,onChange:xe=>{Ie(xe)}}),Ge="@\u2581@",be="@\u2581\u2581@",Pe=({questionTitlePlaceholder:Ne,form:Ie,scoreByBlank:xe=!1,hackidentifier:ct,answerKey:Lt})=>{const[et,it]=(0,le.useState)(!1),[Bt,Dt]=(0,le.useState)(!1),$t=(0,Ft.useParams)().type==="edit",xn=(zn,Nn)=>{const yi=Nn.line;let Zi=0;for(let cr=0;cr<yi;cr++)Zi+=zn.getLine(cr).split(Ge).length-1;for(let cr=0;cr<yi;cr++)Zi+=zn.getLine(cr).split(be).length-1;const Hi=zn.getLine(yi).substring(0,Nn.ch);return Zi+=Hi.split(Ge).length-1,Zi+=Hi.split(be).length-1,Zi},an=(zn,Nn,yi,Zi)=>{const Hi=zn.getRange(Nn.from,Nn.to);let cr=0;if(Nn.text.forEach(br=>{cr+=br.split(Ge).length-1}),Nn.text.forEach(br=>{cr+=br.split(be).length-1}),Nn.origin!=="setValue"){if(Hi&&(Hi.indexOf(Ge)!==-1||Hi.indexOf(be)!==-1)){const br=Hi.split(Ge).length-1+Hi.split(be).length-1,gi=xn(zn,Nn.from);if(console.log(`\u5220\u9664${br}\u4E2A\uFF0C \u524D\u9762\u6709${gi}\u4E2A\uFF0C\u65B0\u589E${cr}\u4E2A`),br>1){const di=Array.from({length:br},(wi,Qi)=>gi+Qi);Zi(di)}else Zi(gi)}else if(cr>0){const br=xn(zn,Nn.from);console.log(`\u65B0\u589E${cr}\u4E2A\uFF0C\u4E4B\u524D\u6709${br}\u4E2A`),yi(cr,br)}}},Jt=()=>{const zn=Ie.getFieldValue(Lt);Ie.setFieldsValue({[Lt]:zn==null?void 0:zn.map((Nn,yi)=>un(Wn({},Nn),{position:yi+1}))})},Tn=(0,le.useRef)(),Kn=(zn,Nn)=>{for(let yi=0;yi<zn;yi++)Tn.current({position:null,answer_text:""},Nn+yi);Jt()},dn=(0,le.useRef)(),Qn=zn=>{dn.current(zn),Jt()},pi=He.default.useWatch(Lt,Ie);return qe.createElement("div",{className:lt.Z.wrap},qe.createElement(He.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},qe.createElement($e.h,{scrollId:"name",watch:!0,height:140})),qe.createElement("div",{className:lt.Z.questionTitleEditorWrap},qe.createElement(He.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},qe.createElement($e.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(zn,Nn)=>{const yi=Ie.getFieldValue(Lt);console.log("--preAnswerData",yi,Nn),Ie.setFieldsValue({[Lt]:yi==null?void 0:yi.map((Zi,Hi)=>{var cr;return un(Wn({},Zi),{position:Hi+1,multi_line:(cr=Nn==null?void 0:Nn[Hi])==null?void 0:cr.multiLine})})})},placeholder:Ne,onCMBeforeChange:(zn,Nn)=>{an(zn,Nn,Kn,Qn)}}))),qe.createElement(He.default.List,{name:Lt,rules:[{validator(zn,Nn){if(!(Nn!=null&&Nn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const yi of Nn){const{answer_text:Zi}=yi||{};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()}}]},(zn,{add:Nn,remove:yi},{errors:Zi})=>(Tn.current=Nn,dn.current=yi,qe.createElement(qe.Fragment,null,qe.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},qe.createElement(He.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),qe.createElement("div",{onClick:()=>{ut.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:qe.createElement("div",null,qe.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",qe.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),qe.createElement("div",{style:{marginTop:10}},"2.\u8BD5\u9898\u7B97\u5206\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u5C06\u7A0B\u5E8F\u91CC\u9762\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u7684\u7B54\u6848\u8FDB\u884C\u8BC4\u6D4B\u3002\u8F93\u51FA\u7684\u7ED3\u679C\u4E0E\u6D4B\u8BD5\u96C6\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u6848\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\uFF0C\u5426\u5219\u8BE5\u7A7A\u5F970\u5206\u3002"))})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"}},qe.createElement(At.Z,{style:{marginRight:3,color:"#3061D0"}}),qe.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),zn.map((Hi,cr)=>{var br=Hi,{key:gi,name:di}=br,wi=kn(br,["key","name"]),Qi,Li;return qe.createElement(We.Z,{className:"mb20",key:gi,align:"middle",wrap:!1},qe.createElement(Ue.Z,{flex:"0 0 auto",className:`${lt.Z.blankIndex}`},"\u586B\u7A7A\u9879",cr+1),qe.createElement(Ue.Z,{flex:1},qe.createElement(We.Z,{align:"top",justify:"space-between",wrap:!1},qe.createElement(Ue.Z,null,qe.createElement(He.default.Item,un(Wn({},wi),{name:[di,"answer_text"],noStyle:!0}),(Qi=pi==null?void 0:pi[di])!=null&&Qi.multi_line||(Li=pi==null?void 0:pi[di])!=null&&Li.multiLine?qe.createElement(wt,{spellCheck:!1,style:{marginLeft:10,width:550}}):qe.createElement(Te.default,{style:{marginLeft:10,width:550},className:lt.Z.blankInput,size:"large",maxLength:1e3,onBlur:ro=>{}}))),xe&&qe.createElement(Ue.Z,{flex:"224px"},qe.createElement(He.default.Item,un(Wn({},wi),{name:[di,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),qe.createElement(Me.Z,{size:"large",className:lt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),qe.createElement("div",{onClick:()=>it(!0)},qe.createElement(He.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},qe.createElement($e.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:et}))),qe.createElement(He.default.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},qe.createElement(Ct.default,{size:"large"},jn.map(zn=>qe.createElement(Ct.default.Option,{key:zn.title,value:zn.key}," ",zn.title)))),qe.createElement(He.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},qe.createElement(He.default.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],noStyle:!0},qe.createElement(Me.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),qe.createElement("span",{className:"ml10 font14"},"\u79D2")),qe.createElement(He.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},qe.createElement(Pt.ZP.Group,{style:{marginTop:-10}},qe.createElement(Pt.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),qe.createElement(Pt.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),qe.createElement(Pt.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),qe.createElement(He.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),qe.createElement("div",{style:{background:"#F6F7F9",padding:15}},qe.createElement(He.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},qe.createElement(wt,{rows:4})),qe.createElement(He.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},qe.createElement(wt,{rows:4}))),qe.createElement(Gt,{form:Ie,answerKey:Lt,hackIdentifier:ct,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:qe.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},31674:function(On,mn,pe){"use strict";pe.d(mn,{u:function(){return Le}});var le=pe(59301),Te=pe(95237),He=pe(43604),ut=pe(6848),We=pe(78241),Ue=pe(31687),Me=pe(32134),Ct=pe(12893),Pt=pe(70941),$e=pe(59301),Ft=Object.defineProperty,lt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(ze,je,Xe)=>je in ze?Ft(ze,je,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):ze[je]=Xe,se=(ze,je)=>{for(var Xe in je||(je={}))te.call(je,Xe)&&de(ze,Xe,je[Xe]);if(Oe)for(var Xe of Oe(je))ee.call(je,Xe)&&de(ze,Xe,je[Xe]);return ze},he=(ze,je)=>lt(ze,vt(je)),ve=(ze,je)=>{var Xe={};for(var Ye in ze)te.call(ze,Ye)&&je.indexOf(Ye)<0&&(Xe[Ye]=ze[Ye]);if(ze!=null&&Oe)for(var Ye of Oe(ze))je.indexOf(Ye)<0&&ee.call(ze,Ye)&&(Xe[Ye]=ze[Ye]);return Xe};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"],Be=({value:ze,onChange:je,choiceTextKey:Xe,answerKey:Ye,index:dt,isEdit:Ze,setInputActive:Nt,form:at,choiceOptionsPath:kt,allowChangeMode:xt,showAddIcon:Ot,addItem:Gt,deleteItem:At})=>{console.log(ze,"value");const qe=(ze==null?void 0:ze[Ye])===1,Ve=()=>{const vn=at.getFieldValue(kt);at.setFieldValue(kt,vn.map(yn=>he(se({},yn),{[Ye]:0})))},_t=()=>{qe?je(he(se({},ze),{[Ye]:0})):(xt||Ve(),je(he(se({},ze),{[Ye]:1})))};return $e.createElement(Te.Z,{className:Ue.Z.choiceWrap,align:"middle",wrap:!1},$e.createElement(He.Z,{onClick:_t,className:`${Ue.Z.choiceIndex} ${qe?Ue.Z.activeAnswer:""}`},Ee[dt]),$e.createElement(He.Z,{flex:1,className:`${Ue.Z.editorWrap} ml15`,onClick:Nt},$e.createElement(Pt.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Ze,value:ze==null?void 0:ze[Xe],onChange:vn=>{je(he(se({},ze),{[Xe]:vn}))}})),$e.createElement(He.Z,{flex:"0 0 auto",className:"ml15"},$e.createElement("div",{onClick:_t,className:`${Ue.Z.setAnswerBtn} ${qe?Ue.Z.activeAnswer:""}`},qe?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),$e.createElement(He.Z,{className:Ue.Z.actionWrapper},$e.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},$e.createElement(Me.Z,{className:Ue.Z.addIcon,onClick:Gt,style:{visibility:Ot?"visible":"hidden"}})),$e.createElement(ut.Z,{title:"\u5220\u9664"},$e.createElement(Ct.Z,{className:Ue.Z.deleteIcon,onClick:At,style:{visibility:dt>1?"visible":"hidden"}}))))},Le=({questionTitlePlaceholder:ze,titleKey:je,choiceKey:Xe,analysisKey:Ye,choiceTextKey:dt,answerKey:Ze,choiceOptionsPath:Nt,allowChangeMode:at=!0,form:kt,showAnalysis:xt=!0})=>{const[Ot,Gt]=(0,le.useState)(),[At,qe]=(0,le.useState)(!1);return $e.createElement("div",{className:Ue.Z.wrap},$e.createElement("div",{className:Ue.Z.questionTitleEditorWrap},$e.createElement(We.default.Item,{label:"\u9898\u5E72",name:je,labelCol:{span:24},rules:[{required:!0}]},$e.createElement(Pt.h,{scrollId:Array.isArray(je)?je.join("_"):`${je}`,watch:!0,height:140,placeholder:ze}))),$e.createElement(We.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),$e.createElement(We.default.List,{name:Xe,rules:[{validator(Ve,_t){const vn=_t.some(jt=>jt[Ze]===1),yn=_t.findIndex(jt=>{var en;return((en=jt[dt])==null?void 0:en.length)<=0});return yn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ee[yn]}\u9009\u9879\u7684\u5185\u5BB9`)):vn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ve,{add:_t,remove:vn})=>$e.createElement("div",{id:Array.isArray(Nt)?Nt.join("_"):`${Nt}`},Ve.map((yn,jt)=>{var en=yn,{key:ln,name:Wn}=en,un=ve(en,["key","name"]);const kn=Ot===ln,wt=()=>{Gt(ln)},jn=jt<7&&jt===Ve.length-1,ci=()=>_t({[dt]:"",[Ze]:0}),Ge=()=>vn(Wn);return $e.createElement(We.default.Item,he(se({},un),{key:ln,name:Wn,className:Ue.Z.choiceListWrap,rules:[{validator(be,Pe){return Pe!=null&&Pe.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Ee[jt]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),$e.createElement(Be,{choiceTextKey:dt,answerKey:Ze,index:jt,isEdit:kn,setInputActive:wt,form:kt,choiceOptionsPath:Nt,allowChangeMode:at,showAddIcon:jn,addItem:ci,deleteItem:Ge}))}),Ve.length<8&&$e.createElement("div",{className:`${Ue.Z.addBtn} mb30`,onClick:()=>_t({[dt]:"",[Ze]:0})},"\u6DFB\u52A0\u9009\u9879"))),xt&&$e.createElement("div",{onClick:()=>qe(!0)},$e.createElement(We.default.Item,{name:Ye,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},$e.createElement(Pt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:At}))))}},20386:function(On,mn,pe){"use strict";pe.d(mn,{u:function(){return at}});var le=pe(59301),Te=pe(43418),He=pe(95237),ut=pe(43604),We=pe(92832),Ue=pe(6848),Me=pe(78673),Ct=pe(78241),Pt=pe(5112),$e=pe(5871),Ft=pe(70941),lt=pe(12893),vt=pe(61485),Oe=pe(31687),te=pe(72714),ee=pe(59301),de=Object.defineProperty,se=Object.defineProperties,he=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,Le=(kt,xt,Ot)=>xt in kt?de(kt,xt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):kt[xt]=Ot,ze=(kt,xt)=>{for(var Ot in xt||(xt={}))Ee.call(xt,Ot)&&Le(kt,Ot,xt[Ot]);if(ve)for(var Ot of ve(xt))Be.call(xt,Ot)&&Le(kt,Ot,xt[Ot]);return kt},je=(kt,xt)=>se(kt,he(xt)),Xe=(kt,xt)=>{var Ot={};for(var Gt in kt)Ee.call(kt,Gt)&&xt.indexOf(Gt)<0&&(Ot[Gt]=kt[Gt]);if(kt!=null&&ve)for(var Gt of ve(kt))xt.indexOf(Gt)<0&&Be.call(kt,Gt)&&(Ot[Gt]=kt[Gt]);return Ot};const Ye=({value:kt,onChange:xt})=>{const Ot=At=>{Te.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Oe.Z.modal,onOk:()=>{const qe=[...kt];qe.splice(At,1),xt(qe)}})},Gt=()=>{const At=[...kt];At.push(""),xt(At)};return ee.createElement(He.Z,{className:"ml20"},ee.createElement(ut.Z,{flex:1},kt==null?void 0:kt.map((At,qe)=>ee.createElement(He.Z,{key:`${At}_${qe}`,className:"mb20"},ee.createElement(We.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:At,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ve=>{const _t=[...kt],vn=Ve.target.value.trim();_t[qe]=vn,xt(_t)}}),ee.createElement(Ue.Z,{title:"\u5220\u9664"},ee.createElement(lt.Z,{className:Oe.Z.deleteIcon,style:{marginLeft:15,visibility:qe>0?"visible":"hidden"},onClick:()=>Ot(qe)}))))),ee.createElement(ut.Z,null,ee.createElement("div",{className:`${Oe.Z.addBtn}`,onClick:()=>{Gt()}},"\u65B0\u589E\u7B54\u6848")))},dt=({value:kt,onChange:xt})=>{const Ot=At=>{Te.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Oe.Z.modal,onOk:()=>{const qe=[...kt];qe.splice(At,1),xt(qe)}})},Gt=()=>{const At=[...kt];At.push(""),xt(At)};return ee.createElement(He.Z,{className:"ml20"},ee.createElement(ut.Z,{flex:1},kt==null?void 0:kt.map((At,qe)=>ee.createElement(He.Z,{key:`${At}_${qe}`,align:"middle",className:"mb20"},ee.createElement(te.Z,{value:At,style:{flex:1},onChange:Ve=>{const _t=[...kt];_t[qe]=Ve,xt(_t)}}),ee.createElement(Ue.Z,{title:"\u5220\u9664"},ee.createElement(lt.Z,{className:Oe.Z.deleteIcon,style:{marginLeft:15,visibility:qe>0?"visible":"hidden"},onClick:()=>Ot(qe)}))))),ee.createElement(ut.Z,null,ee.createElement("div",{className:`${Oe.Z.addBtn}`,onClick:()=>{Gt()}},"\u65B0\u589E\u7B54\u6848")))},Ze=({value:kt=!0,onChange:xt})=>ee.createElement(Me.Z,{checked:!kt,onChange:Ot=>{xt(!Ot)}}),Nt="\u2581",at=({questionTitlePlaceholder:kt,form:xt,scoreByBlank:Ot=!1,answerKey:Gt})=>{const[At,qe]=(0,le.useState)(!1),Ve=(un,kn)=>{const wt=kn.line;let jn=0;for(let Ge=0;Ge<wt;Ge++)jn+=un.getLine(Ge).split(Nt).length-1;const ci=un.getLine(wt).substring(0,kn.ch);return jn+=ci.split(Nt).length-1,jn},_t=(un,kn,wt,jn)=>{const ci=un.getRange(kn.from,kn.to);let Ge=0;if(kn.text.forEach(be=>{Ge+=be.split(Nt).length-1}),kn.origin!=="setValue"){if(ci&&ci.indexOf(Nt)!==-1){const be=ci.split(Nt).length-1,Pe=Ve(un,kn.from);if(console.log(`\u5220\u9664${be}\u4E2A\uFF0C \u524D\u9762\u6709${Pe}\u4E2A\uFF0C\u65B0\u589E${Ge}\u4E2A`),be>1){const Ne=Array.from({length:be},(Ie,xe)=>Pe+xe);jn(Ne)}else jn(Pe)}else if(Ge>0){const be=Ve(un,kn.from);console.log(`\u65B0\u589E${Ge}\u4E2A\uFF0C\u4E4B\u524D\u6709${be}\u4E2A`),wt(Ge,be)}}},vn=()=>{const un=xt.getFieldValue(Gt);xt.setFieldsValue({[Gt]:un.map((kn,wt)=>je(ze({},kn),{position:wt+1}))})},yn=(0,le.useRef)(),jt=(un,kn)=>{for(let wt=0;wt<un;wt++)yn.current({position:null,answer_text:[""],model:1},kn+wt);vn()},en=(0,le.useRef)(),ln=un=>{en.current(un),vn()},Wn=Ct.default.useWatch(Gt,xt);return ee.createElement("div",{className:Oe.Z.wrap},ee.createElement("div",{className:Oe.Z.questionTitleEditorWrap},ee.createElement(Ct.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},ee.createElement(Ft.h,{scrollId:"name",watch:!0,height:140,placeholder:kt,showNullButton:!0,onCMBeforeChange:(un,kn)=>{_t(un,kn,jt,ln)}}))),ee.createElement(Ct.default.List,{name:Gt,rules:[{validator(un,kn){if(!(kn!=null&&kn.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const wt of kn){const{answer_text:jn}=wt||{};if(jn!=null&&jn.some(ci=>(ci==null?void 0:ci.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(un,{add:kn,remove:wt},{errors:jn})=>(yn.current=kn,en.current=wt,ee.createElement(ee.Fragment,null,ee.createElement(Ct.default.Item,{label:ee.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(un!=null&&un.length)&&ee.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),un.map((ci,Ge)=>{var be=ci,{key:Pe,name:Ne}=be,Ie=Xe(be,["key","name"]),xe,ct;return ee.createElement("div",{style:{marginBottom:10},key:Pe},ee.createElement(He.Z,{className:"mb20",align:"middle",wrap:!1},ee.createElement(ut.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Oe.Z.blankIndex}`},"\u586B\u7A7A\u9879",Ge+1),ee.createElement(Ct.default.Item,je(ze({},Ie),{name:[Ne,"model"],noStyle:!0}),ee.createElement(Pt.ZP.Group,{onChange:()=>{const Lt=xt.getFieldValue(Gt);xt.setFieldsValue({[Gt]:Lt.map((et,it)=>je(ze({},et),{answer_text:Ne===it?[""]:et.answer_text}))})}},ee.createElement(Pt.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",ee.createElement(Ue.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},ee.createElement(vt.Z,null))),ee.createElement(Pt.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",ee.createElement(Ue.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},ee.createElement(vt.Z,null)))))),ee.createElement(He.Z,{style:{marginLeft:20},align:"middle",wrap:!1},ee.createElement(ut.Z,{flex:1},ee.createElement(He.Z,{align:"top",justify:"space-between",wrap:!1},ee.createElement(ut.Z,{flex:1},ee.createElement(Ct.default.Item,je(ze({},Ie),{name:[Ne,"answer_text"],noStyle:!0}),((ct=(xe=xt.getFieldValue(Gt))==null?void 0:xe[Ne])==null?void 0:ct.model)===1?ee.createElement(Ye,null):ee.createElement(dt,null))),Ot&&ee.createElement(ut.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},ee.createElement(Ct.default.Item,je(ze({},Ie),{name:[Ne,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Oe.Z.blankInputNumberWrapper}),ee.createElement($e.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),ee.createElement(Ct.default.Item,je(ze({},Ie),{name:[Ne,"position"],noStyle:!0}),ee.createElement(We.default,{type:"hidden"})))))})))),ee.createElement(He.Z,{align:"middle"},ee.createElement(Ct.default.Item,{name:"downcase",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(ut.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ee.createElement(He.Z,{align:"middle"},ee.createElement(Ct.default.Item,{name:"no_space",valuePropName:"checked"},ee.createElement(Me.Z,null)),ee.createElement(ut.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Wn==null?void 0:Wn.length)>1&&ee.createElement(He.Z,{align:"middle",className:(Wn==null?void 0:Wn.length)>1?"mb30":`${Oe.Z.hide}`},ee.createElement(Ct.default.Item,{name:"is_ordered"},ee.createElement(Ze,null)),ee.createElement(ut.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),ee.createElement("div",{onClick:()=>qe(!0)},ee.createElement(Ct.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ee.createElement(Ft.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:At}))))}},69269:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return ve}});var le=pe(59301),Te=pe(95237),He=pe(43604),ut=pe(78241),We=pe(31687),Ue=pe(70941),Me=pe(59301),Ct=Object.defineProperty,Pt=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Oe=(Ee,Be,Le)=>Be in Ee?Ct(Ee,Be,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ee[Be]=Le,te=(Ee,Be)=>{for(var Le in Be||(Be={}))lt.call(Be,Le)&&Oe(Ee,Le,Be[Le]);if(Ft)for(var Le of Ft(Be))vt.call(Be,Le)&&Oe(Ee,Le,Be[Le]);return Ee},ee=(Ee,Be)=>Pt(Ee,$e(Be)),de=(Ee,Be)=>{var Le={};for(var ze in Ee)lt.call(Ee,ze)&&Be.indexOf(ze)<0&&(Le[ze]=Ee[ze]);if(Ee!=null&&Ft)for(var ze of Ft(Ee))Be.indexOf(ze)<0&&vt.call(Ee,ze)&&(Le[ze]=Ee[ze]);return Le};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},he=({value:Ee,onChange:Be,form:Le})=>{const ze=(Ee==null?void 0:Ee.is_answer)===1,je=Ee==null?void 0:Ee.choice_text,Xe=()=>{const Ye=Le.getFieldsValue().choices.map(dt=>({choice_text:dt.choice_text,is_answer:0}));Le.setFieldsValue({choices:Ye}),Be(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:Xe,className:`${We.Z.choiceIndex} ${We.Z.judgementIndex} ${ze?We.Z.activeAnswer:""}`},se[je]),Me.createElement(He.Z,{flex:1,className:`${We.Z.editorWrap} ml15`},Me.createElement("div",{className:`${We.Z.inputBorder} ${We.Z.placeholder} ${ze?We.Z.activeJudgementAnswer:""}`},je)),Me.createElement(He.Z,{flex:"0 0 auto",className:"ml15"},Me.createElement("div",{onClick:Xe,className:`${We.Z.setAnswerBtn} ${ze?We.Z.activeAnswer:""}`},ze?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ve=({questionTitlePlaceholder:Ee,choiceKey:Be,form:Le})=>{const[ze,je]=(0,le.useState)(!1);return Me.createElement("div",{className:We.Z.wrap},Me.createElement("div",{className:We.Z.questionTitleEditorWrap},Me.createElement(ut.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Me.createElement(Ue.h,{scrollId:"name",watch:!0,height:140,placeholder:Ee}))),Me.createElement(ut.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Me.createElement(ut.default.List,{name:"choices",rules:[{validator(Xe,Ye){return Ye.some(Ze=>(Ze==null?void 0:Ze.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Xe=>Me.createElement("div",{id:"choices"},Xe.map(Ye=>{var dt=Ye,{key:Ze,name:Nt}=dt,at=de(dt,["key","name"]);return Me.createElement(ut.default.Item,ee(te({},at),{key:Ze,name:Nt,noStyle:!0}),Me.createElement(he,{form:Le}))})))),Me.createElement("div",{onClick:()=>je(!0)},Me.createElement(ut.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Me.createElement(Ue.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ze}))))}},70941:function(On,mn,pe){"use strict";pe.d(mn,{h:function(){return te},x:function(){return ee}});var le=pe(64726),Te=pe(31687),He=pe(99325),ut=pe(59301),We=Object.defineProperty,Ue=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,Ct=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,Ft=(de,se,he)=>se in de?We(de,se,{enumerable:!0,configurable:!0,writable:!0,value:he}):de[se]=he,lt=(de,se)=>{for(var he in se||(se={}))Pt.call(se,he)&&Ft(de,he,se[he]);if(Ct)for(var he of Ct(se))$e.call(se,he)&&Ft(de,he,se[he]);return de},vt=(de,se)=>Ue(de,Me(se)),Oe=(de,se)=>{var he={};for(var ve in de)Pt.call(de,ve)&&se.indexOf(ve)<0&&(he[ve]=de[ve]);if(de!=null&&Ct)for(var ve of Ct(de))se.indexOf(ve)<0&&$e.call(de,ve)&&(he[ve]=de[ve]);return he};const te=de=>{var se=de,{value:he,onChange:ve,scrollId:Ee}=se,Be=Oe(se,["value","onChange","scrollId"]);return ut.createElement("div",{id:Ee||""},ut.createElement(le.Z,vt(lt({},Be),{defaultValue:he,onChange:(Le,ze)=>{ze!=null&&ze.length?ve(Le,ze):ve(Le)}})))},ee=({value:de,onChange:se,placeholder:he,height:ve=140,isEdit:Ee,miniToolbar:Be,watch:Le=!0})=>Ee?ut.createElement(le.Z,{watch:Le,isFocus:!0,height:ve||void 0,placeholder:he,defaultValue:de,onChange:se,miniToolbar:Be}):ut.createElement("div",{style:{cursor:"pointer"}},de?ut.createElement(He.Z,{className:Te.Z.inputBorder,value:de}):ut.createElement("div",{className:`${Te.Z.inputBorder} ${Te.Z.placeholder} inputBorderError`},he))},9489:function(On,mn,pe){"use strict";pe.d(mn,{W:function(){return dt}});var le=pe(59301),Te=pe(8591),He=pe(12563),ut=pe(78241),We=pe(78673),Ue=pe(95237),Me=pe(43604),Ct=pe(6848),Pt=pe(92832),$e=pe(5871),Ft=pe(31687),lt=pe(70941),vt=pe(64726),Oe=pe(61485),te=Object.defineProperty,ee=Object.defineProperties,de=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Ee=(Ze,Nt,at)=>Nt in Ze?te(Ze,Nt,{enumerable:!0,configurable:!0,writable:!0,value:at}):Ze[Nt]=at,Be=(Ze,Nt)=>{for(var at in Nt||(Nt={}))he.call(Nt,at)&&Ee(Ze,at,Nt[at]);if(se)for(var at of se(Nt))ve.call(Nt,at)&&Ee(Ze,at,Nt[at]);return Ze},Le=(Ze,Nt)=>ee(Ze,de(Nt)),ze=(Ze,Nt)=>{var at={};for(var kt in Ze)he.call(Ze,kt)&&Nt.indexOf(kt)<0&&(at[kt]=Ze[kt]);if(Ze!=null&&se)for(var kt of se(Ze))Nt.indexOf(kt)<0&&ve.call(Ze,kt)&&(at[kt]=Ze[kt]);return at};const je=Ze=>{var Nt=Ze,{value:at,onChange:kt}=Nt,xt=ze(Nt,["value","onChange"]);const Ot=Gt=>{kt([Gt])};return le.createElement(vt.Z,Le(Be({},xt),{defaultValue:at==null?void 0:at[0],onChange:Ot}))},Xe=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 Nt=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},Ye=({value:Ze=[],onClose:Nt})=>le.createElement(He.default,{closable:!0,onClose:Nt,className:Ft.Z.keywordTag},le.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Ze.join(" \u6216 "))),dt=({questionTitlePlaceholder:Ze,form:Nt,showKeywords:at,isMustKeyWords:kt=at})=>{const[xt,Ot]=(0,le.useState)(!1),[Gt,At]=(0,le.useState)(""),qe=ut.default.useWatch("use_keywords",Nt),Ve=ut.default.useWatch("question_score",Nt);return le.createElement("div",{className:Ft.Z.wrap},le.createElement("div",{className:Ft.Z.questionTitleEditorWrap},le.createElement(ut.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},le.createElement(lt.h,{scrollId:"name",watch:!0,height:140,placeholder:Ze}))),le.createElement(ut.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},le.createElement(je,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),at&&!kt&&le.createElement(ut.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},le.createElement(We.Z,{defaultChecked:!0})),at&&kt&&le.createElement(Ue.Z,{align:"middle",className:"mb30"},le.createElement(ut.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(Ct.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},le.createElement(Oe.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(qe||!kt)&&le.createElement(ut.default.List,{name:"keywords",rules:[{validator(_t,vn){return kt?vn!=null&&vn.length?(vn==null?void 0:vn.reduce((jt,en)=>jt+en.score,0))>parseFloat(Ve)?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()}}]},(_t,{add:vn,remove:yn})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${Ft.Z.title} mb10`},kt?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(Ue.Z,{align:"middle",className:"font14 mb30"},le.createElement(Me.Z,{flex:1},le.createElement(Pt.default,{value:Gt,onChange:jt=>{At(jt.target.value)},maxLength:50,allowClear:!0,onPressEnter:jt=>{var en,ln,Wn,un;const kn=`${(en=jt.target)==null?void 0:en.value}`,wt=(Wn=(ln=kn==null?void 0:kn.split("|"))==null?void 0:ln.filter(Ge=>!!Ge))==null?void 0:Wn.map(Ge=>Ge==null?void 0:Ge.trim()),jn=Nt.getFieldValue("keywords"),ci=((un=jn==null?void 0:jn.map(Ge=>Ge==null?void 0:Ge.keyword))==null?void 0:un.flat())||[];for(const Ge of wt)if(ci.includes(Ge)){Te.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Xe(kn)&&(vn({keyword:wt,score:1}),At(""))},className:Ft.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")),_t.map(jt=>{var en=jt,{key:ln,name:Wn}=en,un=ze(en,["key","name"]);return le.createElement(Ue.Z,{key:ln,className:"mb20",style:{marginRight:148}},le.createElement(Me.Z,{flex:1},le.createElement(Ue.Z,{align:"middle",justify:"space-between"},le.createElement(ut.default.Item,Le(Be({},un),{name:[Wn,"keyword"]}),le.createElement(Ye,{onClose:()=>yn(Wn)})),kt&&le.createElement(ut.default.Item,Le(Be({},un),{name:[Wn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ft.Z.blankInputNumberWrapper}),le.createElement($e.Z,{className:Ft.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>Ot(!0)},le.createElement(ut.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(lt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:xt}))))}},37542:function(On,mn,pe){"use strict";pe.d(mn,{tc:function(){return br.t},uh:function(){return le.u},rL:function(){return cr},u8:function(){return He.u},ZZ:function(){return Te.Z},Wk:function(){return ut.W}});var le=pe(31674),Te=pe(69269),He=pe(20386),ut=pe(9489),We=pe(59301),Ue=pe(36381),Me=pe(78241),Ct=pe(95237),Pt=pe(43604),$e=pe(5871),Ft=pe(6848),lt=pe(38854),vt=pe(31687),Oe=pe(12893),te=pe(70941),ee=pe(43418),de=pe(92832),se=pe(78673),he=pe(59301),ve=Object.defineProperty,Ee=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Xe=(gi,di,wi)=>di in gi?ve(gi,di,{enumerable:!0,configurable:!0,writable:!0,value:wi}):gi[di]=wi,Ye=(gi,di)=>{for(var wi in di||(di={}))ze.call(di,wi)&&Xe(gi,wi,di[wi]);if(Le)for(var wi of Le(di))je.call(di,wi)&&Xe(gi,wi,di[wi]);return gi},dt=(gi,di)=>Ee(gi,Be(di)),Ze=(gi,di)=>{var wi={};for(var Qi in gi)ze.call(gi,Qi)&&di.indexOf(Qi)<0&&(wi[Qi]=gi[Qi]);if(gi!=null&&Le)for(var Qi of Le(gi))di.indexOf(Qi)<0&&je.call(gi,Qi)&&(wi[Qi]=gi[Qi]);return wi};const Nt=({value:gi,onChange:di})=>{const wi=Li=>{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:vt.Z.modal,onOk:()=>{const ro=[...gi];ro.splice(Li,1),di(ro)}})},Qi=()=>{const Li=[...gi];Li.push(""),di(Li)};return he.createElement(Ct.Z,{className:"ml20"},he.createElement(Pt.Z,{flex:1},gi==null?void 0:gi.map((Li,ro)=>he.createElement(Ct.Z,{key:`${Li}_${ro}`,align:"middle",className:"mb20"},he.createElement(de.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Li,autoSize:{maxRows:3},maxLength:1e3,onBlur:fr=>{const Ae=[...gi],Ei=fr.target.value.trim();Ae[ro]=Ei,di(Ae)}}),he.createElement(Ft.Z,{title:"\u5220\u9664"},he.createElement(Oe.Z,{className:vt.Z.deleteIcon,style:{marginLeft:15,visibility:ro>0?"visible":"hidden"},onClick:()=>wi(ro)}))))),he.createElement(Pt.Z,null,he.createElement("div",{className:`${vt.Z.addBtn}`,onClick:()=>{Qi()}},"\u65B0\u589E\u7B54\u6848")))},at=({value:gi=!0,onChange:di})=>he.createElement(se.Z,{checked:!gi,onChange:wi=>{di(!wi)}}),kt="\u2581",xt=({questionTitlePlaceholder:gi,form:di,name:wi,scoreByBlank:Qi=!1,answerKey:Li,titleKey:ro="name",analysisKey:fr="analysis",isOrdered:Ae="is_ordered"})=>{var Ei,Sr;const[Fn,xi]=(0,We.useState)(!1),zi=(cn,Mt)=>{const ht=Mt.line;let nn=0;for(let _n=0;_n<ht;_n++)nn+=cn.getLine(_n).split(kt).length-1;const gn=cn.getLine(ht).substring(0,Mt.ch);return nn+=gn.split(kt).length-1,nn},qi=(cn,Mt,ht,nn)=>{const gn=cn.getRange(Mt.from,Mt.to);let _n=0;if(Mt.text.forEach(qn=>{_n+=qn.split(kt).length-1}),Mt.origin!=="setValue"){if(gn&&gn.indexOf(kt)!==-1){const qn=gn.split(kt).length-1,Et=zi(cn,Mt.from);if(console.log(`\u5220\u9664${qn}\u4E2A\uFF0C \u524D\u9762\u6709${Et}\u4E2A\uFF0C\u65B0\u589E${_n}\u4E2A`),qn>1){const Pn=Array.from({length:qn},(Xn,Ci)=>Et+Ci);nn(Pn)}else nn(Et)}else if(_n>0){const qn=zi(cn,Mt.from);console.log(`\u65B0\u589E${_n}\u4E2A\uFF0C\u4E4B\u524D\u6709${qn}\u4E2A`),ht(_n,qn)}}},Gn=()=>{const cn=di.getFieldValue(["sub_item_banks",...Li]);di.setFieldValue(["sub_item_banks",...Li],cn==null?void 0:cn.map((Mt,ht)=>dt(Ye({},Mt),{position:ht+1})))},ti=(0,We.useRef)(),Zt=(cn,Mt)=>{for(let ht=0;ht<cn;ht++)ti.current({position:null,answer_text:[""]},Mt+ht);Gn()},Wt=(0,We.useRef)(),Qe=cn=>{Wt.current(cn),Gn()},on=(Sr=(Ei=di.getFieldValue("sub_item_banks"))==null?void 0:Ei[Li==null?void 0:Li[0]])==null?void 0:Sr[Li==null?void 0:Li[1]];return(0,We.useEffect)(()=>{console.log("========",di.getFieldsValue())},[di]),he.createElement("div",{className:vt.Z.wrap},he.createElement("div",{className:vt.Z.questionTitleEditorWrap},he.createElement(Me.default.Item,{label:"\u9898\u5E72",name:ro,labelCol:{span:24},rules:[{required:!0}]},he.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:gi,showNullButton:!0,onCMBeforeChange:(cn,Mt)=>{qi(cn,Mt,Zt,Qe)}}))),he.createElement(Me.default.List,{name:Li,rules:[{validator(cn,Mt){if((Mt==null?void 0:Mt.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const ht of Mt){const{answer_text:nn}=ht||{};if(nn!=null&&nn.some(gn=>(gn==null?void 0:gn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(cn,{add:Mt,remove:ht},{errors:nn})=>(ti.current=Mt,Wt.current=ht,he.createElement(he.Fragment,null,he.createElement(Me.default.Item,{label:he.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(cn!=null&&cn.length)&&he.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),cn.map((gn,_n)=>{var qn=gn,{key:Et,name:Pn}=qn,Xn=Ze(qn,["key","name"]);return he.createElement(Ct.Z,{align:"top",key:Et},he.createElement(Pt.Z,{className:`${vt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",_n+1),he.createElement(Pt.Z,{flex:1},he.createElement(Ct.Z,{align:"top",justify:"space-between"},he.createElement(Pt.Z,{flex:1},he.createElement(Me.default.Item,dt(Ye({},Xn),{name:[Pn,"answer_text"],noStyle:!0}),he.createElement(Nt,null))),Qi&&he.createElement(Pt.Z,{flex:"224px"},he.createElement(Me.default.Item,dt(Ye({},Xn),{name:[Pn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:vt.Z.blankInputNumberWrapper}),he.createElement($e.Z,{className:vt.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,dt(Ye({},Xn),{name:[Pn,"position"],noStyle:!0}),he.createElement(de.default,{type:"hidden"}))))})))),he.createElement(Ct.Z,{align:"middle"},he.createElement(Me.default.Item,{name:[wi,"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(Ct.Z,{align:"middle"},he.createElement(Me.default.Item,{name:[wi,"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")),(on==null?void 0:on.length)>1&&he.createElement(Ct.Z,{align:"middle",className:(on==null?void 0:on.length)>1?"mb30":`${vt.Z.hide}`},he.createElement(Me.default.Item,{name:Ae},he.createElement(at,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:()=>xi(!0)},he.createElement(Me.default.Item,{name:fr,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 Ot=pe(59301),Gt=Object.defineProperty,At=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,vn=Object.prototype.propertyIsEnumerable,yn=(gi,di,wi)=>di in gi?Gt(gi,di,{enumerable:!0,configurable:!0,writable:!0,value:wi}):gi[di]=wi,jt=(gi,di)=>{for(var wi in di||(di={}))_t.call(di,wi)&&yn(gi,wi,di[wi]);if(Ve)for(var wi of Ve(di))vn.call(di,wi)&&yn(gi,wi,di[wi]);return gi},en=(gi,di)=>At(gi,qe(di)),ln=(gi,di)=>{var wi={};for(var Qi in gi)_t.call(gi,Qi)&&di.indexOf(Qi)<0&&(wi[Qi]=gi[Qi]);if(gi!=null&&Ve)for(var Qi of Ve(gi))di.indexOf(Qi)<0&&vn.call(gi,Qi)&&(wi[Qi]=gi[Qi]);return wi};const Wn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},un=({value:gi,onChange:di,form:wi,choiceKey:Qi})=>{const Li=(gi==null?void 0:gi.is_answer)===1,ro=gi==null?void 0:gi.choice_text,fr=()=>{var Ae;const Ei=(Ae=wi==null?void 0:wi.getFieldValue(["sub_item_banks",...Qi]))==null?void 0:Ae.map(Sr=>({choice_text:Sr.choice_text,is_answer:0}));wi==null||wi.setFieldValue(["sub_item_banks",...Qi],Ei),di(en(jt({},gi),{is_answer:1}))};return Ot.createElement(Ct.Z,{className:vt.Z.choiceWrap,align:"middle",wrap:!1},Ot.createElement(Pt.Z,{onClick:fr,className:`${vt.Z.choiceIndex} ${vt.Z.judgementIndex} ${Li?vt.Z.activeAnswer:""}`},Wn[ro]),Ot.createElement(Pt.Z,{flex:1,className:`${vt.Z.editorWrap} ml15`},Ot.createElement("div",{className:`${vt.Z.inputBorder} ${vt.Z.placeholder} ${Li?vt.Z.activeJudgementAnswer:""}`},ro)),Ot.createElement(Pt.Z,{flex:"0 0 auto",className:"ml15"},Ot.createElement("div",{onClick:fr,className:`${vt.Z.setAnswerBtn} ${Li?vt.Z.activeAnswer:""}`},Li?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},kn=({questionTitlePlaceholder:gi,choiceKey:di="choices",form:wi,titleKey:Qi="name",analysisKey:Li="analysis"})=>{const[ro,fr]=(0,We.useState)(!1);return Ot.createElement("div",{className:vt.Z.wrap},Ot.createElement("div",{className:vt.Z.questionTitleEditorWrap},Ot.createElement(Me.default.Item,{label:"\u9898\u5E72",name:Qi,labelCol:{span:24},rules:[{required:!0}]},Ot.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:gi}))),Ot.createElement(Me.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Ot.createElement(Me.default.List,{name:di,rules:[{validator(Ae,Ei){return Ei.some(Fn=>(Fn==null?void 0:Fn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Ae=>Ot.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},Ae.map(Ei=>{var Sr=Ei,{key:Fn,name:xi}=Sr,zi=ln(Sr,["key","name"]);return Ot.createElement(Me.default.Item,en(jt({},zi),{key:Fn,name:xi,noStyle:!0}),Ot.createElement(un,{form:wi,choiceKey:di}))})))),Ot.createElement("div",{className:"mt30",onClick:()=>fr(!0)},Ot.createElement(Me.default.Item,{name:Li,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ot.createElement(te.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ro}))))};var wt=pe(8591),jn=pe(12563),ci=pe(64726),Ge=pe(61485),be=Object.defineProperty,Pe=Object.defineProperties,Ne=Object.getOwnPropertyDescriptors,Ie=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,ct=Object.prototype.propertyIsEnumerable,Lt=(gi,di,wi)=>di in gi?be(gi,di,{enumerable:!0,configurable:!0,writable:!0,value:wi}):gi[di]=wi,et=(gi,di)=>{for(var wi in di||(di={}))xe.call(di,wi)&&Lt(gi,wi,di[wi]);if(Ie)for(var wi of Ie(di))ct.call(di,wi)&&Lt(gi,wi,di[wi]);return gi},it=(gi,di)=>Pe(gi,Ne(di)),Bt=(gi,di)=>{var wi={};for(var Qi in gi)xe.call(gi,Qi)&&di.indexOf(Qi)<0&&(wi[Qi]=gi[Qi]);if(gi!=null&&Ie)for(var Qi of Ie(gi))di.indexOf(Qi)<0&&ct.call(gi,Qi)&&(wi[Qi]=gi[Qi]);return wi};const Dt=gi=>{var di=gi,{value:wi,onChange:Qi}=di,Li=Bt(di,["value","onChange"]);const ro=fr=>{Qi([fr])};return We.createElement(ci.Z,it(et({},Li),{defaultValue:wi==null?void 0:wi[0],onChange:ro}))},ft=gi=>{if(!gi)return!1;let di=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 gi==="|"?(wt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},$t=({value:gi=[],onClose:di})=>We.createElement(jn.default,{closable:!0,onClose:di,className:vt.Z.keywordTag},We.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},gi.join(" \u6216 "))),xn=({questionTitlePlaceholder:gi,form:di,showKeywords:wi,isMustKeyWords:Qi=wi,titleKey:Li="name",analysisKey:ro="analysis",answerTexts:fr="answer_texts",keywords:Ae="keywords",useKeywords:Ei="use_keywords",indexs:Sr})=>{const[Fn,xi]=(0,We.useState)(!1),[zi,qi]=(0,We.useState)(""),[Gn,ti]=(0,We.useState)(!1),Zt=Me.default.useWatch("question_score",di);return We.createElement("div",{className:vt.Z.wrap},We.createElement("div",{className:vt.Z.questionTitleEditorWrap},We.createElement(Me.default.Item,{label:"\u9898\u5E72",name:Li,labelCol:{span:24},rules:[{required:!0}]},We.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:gi}))),We.createElement(Me.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:fr,labelCol:{span:24}},We.createElement(Dt,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),wi&&!Qi&&We.createElement(Me.default.Item,{hidden:!0,name:Ei,valuePropName:"checked"},We.createElement(se.Z,{defaultChecked:!0})),wi&&Qi&&We.createElement(Ct.Z,{align:"middle",className:"mb30"},We.createElement(Me.default.Item,{name:Ei,valuePropName:"checked"},We.createElement(se.Z,{onChange:()=>{var Wt,Qe,on,cn,Mt,ht;console.log(di.getFieldsValue()),ti((on=(Qe=(Wt=di.getFieldsValue())==null?void 0:Wt.sub_item_banks)==null?void 0:Qe[Sr])==null?void 0:on.use_keywords),console.log((ht=(Mt=(cn=di.getFieldsValue())==null?void 0:cn.sub_item_banks)==null?void 0:Mt[Sr])==null?void 0:ht.use_keywords),console.log(Gn)}})),We.createElement(Pt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),We.createElement(Pt.Z,null,We.createElement(Ft.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},We.createElement(Ge.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Gn||!Qi)&&We.createElement(Me.default.List,{name:Ae,rules:[{validator(Wt,Qe){return Qi?Qe!=null&&Qe.length?(Qe==null?void 0:Qe.reduce((cn,Mt)=>cn+Mt.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()}}]},(Wt,{add:Qe,remove:on})=>We.createElement(We.Fragment,null,We.createElement("div",{className:`${vt.Z.title} mb10`},Qi?"\u5173\u952E\u8BCD":We.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),We.createElement(Ct.Z,{align:"middle",className:"font14 mb30"},We.createElement(Pt.Z,{flex:1},We.createElement(de.default,{value:zi,onChange:cn=>{qi(cn.target.value)},maxLength:50,allowClear:!0,onPressEnter:cn=>{var Mt,ht,nn,gn;const _n=`${(Mt=cn.target)==null?void 0:Mt.value}`,qn=(nn=(ht=_n==null?void 0:_n.split("|"))==null?void 0:ht.filter(Xn=>!!Xn))==null?void 0:nn.map(Xn=>Xn==null?void 0:Xn.trim()),Et=di.getFieldValue(["sub_item_banks",...Ae]),Pn=((gn=Et==null?void 0:Et.map(Xn=>Xn==null?void 0:Xn.keyword))==null?void 0:gn.flat())||[];for(const Xn of qn)if(Pn.includes(Xn)){wt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}ft(_n)&&(Qe({keyword:qn,score:1}),qi(""))},className:vt.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")),Wt.map(cn=>{var Mt=cn,{key:ht,name:nn}=Mt,gn=Bt(Mt,["key","name"]);return We.createElement(Ct.Z,{key:ht,className:"mb20",style:{marginRight:148}},We.createElement(Pt.Z,{flex:1},We.createElement(Ct.Z,{align:"middle",justify:"space-between"},We.createElement(Me.default.Item,it(et({},gn),{name:[nn,"keyword"]}),We.createElement($t,{onClose:()=>on(nn)})),Qi&&We.createElement(Me.default.Item,it(et({},gn),{name:[nn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:vt.Z.blankInputNumberWrapper}),We.createElement($e.Z,{className:vt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),We.createElement("div",{onClick:()=>xi(!0)},We.createElement(Me.default.Item,{name:ro,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 an=pe(59301),Jt=Object.defineProperty,Tn=Object.defineProperties,Kn=Object.getOwnPropertyDescriptors,dn=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,zn=(gi,di,wi)=>di in gi?Jt(gi,di,{enumerable:!0,configurable:!0,writable:!0,value:wi}):gi[di]=wi,Nn=(gi,di)=>{for(var wi in di||(di={}))Qn.call(di,wi)&&zn(gi,wi,di[wi]);if(dn)for(var wi of dn(di))pi.call(di,wi)&&zn(gi,wi,di[wi]);return gi},yi=(gi,di)=>Tn(gi,Kn(di)),Zi=(gi,di)=>{var wi={};for(var Qi in gi)Qn.call(gi,Qi)&&di.indexOf(Qi)<0&&(wi[Qi]=gi[Qi]);if(gi!=null&&dn)for(var Qi of dn(gi))di.indexOf(Qi)<0&&pi.call(gi,Qi)&&(wi[Qi]=gi[Qi]);return wi};const{Panel:Hi}=Ue.default,cr=({questionTitlePlaceholder:gi,choiceKey:di,form:wi,withScore:Qi})=>{const[Li,ro]=(0,We.useState)([]),fr=Ae=>{ro(Ae)};return an.createElement("div",{className:vt.Z.wrap},an.createElement("div",{className:vt.Z.questionTitleEditorWrap},an.createElement(Me.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},an.createElement(te.h,{scrollId:"name",watch:!0,height:140,placeholder:gi}))),an.createElement(Me.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),an.createElement(Me.default.List,{name:"sub_item_banks",rules:[{validator(Ae,Ei){return Ei?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Ae,{add:Ei,remove:Sr,move:Fn})=>{const xi=wi.getFieldValue("sub_item_banks");return an.createElement(an.Fragment,null,an.createElement(Ue.default,{className:Ae.length>0?vt.Z.collapseWrapper:"",bordered:!1,activeKey:Li,onChange:fr,expandIcon:({isActive:zi})=>an.createElement("i",{className:`iconfont icon-weizhankai ${zi?vt.Z.open:vt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},Ae.map((zi,qi)=>{var Gn=zi,{key:ti,name:Zt}=Gn,Wt=Zi(Gn,["key","name"]),Qe,on,cn,Mt,ht,nn,gn,_n,qn,Et;return an.createElement(Hi,{className:vt.Z.panel,forceRender:!0,header:an.createElement("div",{className:vt.Z.panelHeader},"\u7B2C",qi+1,"\u5C0F\u9898",an.createElement("span",null,"\uFF08",((Qe=xi==null?void 0:xi[Zt])==null?void 0:Qe.item_type)=="SINGLE"?"\u5355\u9009\u9898":((on=xi==null?void 0:xi[Zt])==null?void 0:on.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((cn=xi==null?void 0:xi[Zt])==null?void 0:cn.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((Mt=xi==null?void 0:xi[Zt])==null?void 0:Mt.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:Zt,extra:an.createElement(Ct.Z,{align:"middle",onClick:Pn=>Pn.stopPropagation()},Qi&&an.createElement(Pt.Z,null,an.createElement(Me.default.Item,yi(Nn({},Wt),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[Zt,"question_score"],className:vt.Z.blankInputNumberWrapper}),an.createElement($e.Z,{className:vt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),an.createElement(Pt.Z,null,an.createElement(Ct.Z,{align:"middle",className:"pl40",justify:"end"},qi!==0&&an.createElement("div",{onClick:()=>{var Pn;Fn(qi,qi-1);const Xn=(Pn=wi.getFieldValue("sub_item_banks"))==null?void 0:Pn.map((Ci,tn)=>(Ae.map((sn,In)=>{tn===In&&(Ci.q_position=Number(sn.name)+1)}),Ci));wi.setFieldValue("sub_item_banks",Xn)}},an.createElement(Ft.Z,{title:"\u4E0A\u79FB"},an.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),qi<Ae.length-1&&an.createElement("div",{onClick:()=>{var Pn;Fn(qi,qi+1);const Xn=(Pn=wi.getFieldValue("sub_item_banks"))==null?void 0:Pn.map((Ci,tn)=>(Ae.map((sn,In)=>{tn===In&&(Ci.q_position=Number(sn.name)+1)}),Ci));wi.setFieldValue("sub_item_banks",Xn)},className:qi===0?"":"ml15"},an.createElement(Ft.Z,{title:"\u4E0B\u79FB"},an.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),an.createElement(Pt.Z,null,an.createElement(Ft.Z,{title:"\u5220\u9664"},an.createElement(Oe.Z,{className:`${vt.Z.deleteIcon} ml15`,onClick:()=>Sr(Zt)}))))},an.createElement(Me.default.Item,yi(Nn({},Wt),{name:Zt}),(((ht=xi==null?void 0:xi[Zt])==null?void 0:ht.item_type)=="SINGLE"||((nn=xi==null?void 0:xi[Zt])==null?void 0:nn.item_type)=="MULTIPLE")&&an.createElement(le.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((gn=xi==null?void 0:xi[Zt])==null?void 0:gn.item_type)=="MULTIPLE",form:wi,choiceKey:[Zt,"choices"],titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],choiceOptionsPath:["sub_item_banks",Zt,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((_n=xi==null?void 0:xi[Zt])==null?void 0:_n.item_type)=="COMPLETION"&&an.createElement(xt,{form:wi,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=xi==null?void 0:xi[Zt])==null?void 0:qn.item_type)=="JUDGMENT"&&an.createElement(kn,{form:wi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],choiceKey:[Zt,"choices"]}),((Et=xi==null?void 0:xi[Zt])==null?void 0:Et.item_type)=="SUBJECTIVE"&&an.createElement(xn,{showKeywords:!0,isMustKeyWords:!1,form:wi,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"})))})),Ae.length<20&&an.createElement(lt.Z,{menu:{items:[{label:an.createElement("div",{onClick:()=>{Ei({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),ro([Ae==null?void 0:Ae.length,...Li])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:an.createElement("div",{onClick:()=>{Ei({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),ro([Ae==null?void 0:Ae.length,...Li])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:an.createElement("div",{onClick:()=>{Ei({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),ro([Ae==null?void 0:Ae.length,...Li])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:an.createElement("div",{onClick:()=>{Ei({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),ro([Ae==null?void 0:Ae.length,...Li])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:an.createElement("div",{onClick:()=>{Ei({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),ro([Ae==null?void 0:Ae.length,...Li])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(zi=>zi.show).map(zi=>({label:zi.label,key:zi.key}))}},an.createElement("div",{className:`${vt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var br=pe(32285)},99325:function(On,mn,pe){"use strict";pe.d(mn,{z:function(){return ze},Z:function(){return je}});var le=pe(59301),Te=pe(2878),He=pe(85187),ut=pe(64018),We=pe(40846),Ue=pe(38446),Me=pe(88230),Ct=pe(15342),Pt=pe(1012),$e=pe(90853),Ft=pe(59301),vt=({html:Xe})=>{const Ye=(0,le.useRef)(null),dt=(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 Nt=Ye.current.attachShadow({mode:"open"});dt.current=document.createElement("div"),dt.current.className="markdown-body",dt.current.innerHTML=Xe,Nt.appendChild(dt.current);const at=document.createElement("style");return at.textContent=Ze,Nt.appendChild(at),()=>{Nt.innerHTML=""}},[]),(0,le.useEffect)(()=>{dt.current&&(dt.current.innerHTML=Xe)},[Xe]),Ft.createElement("div",{ref:Ye})},Oe=Object.defineProperty,te=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,se=(Xe,Ye,dt)=>Ye in Xe?Oe(Xe,Ye,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Xe[Ye]=dt,he=(Xe,Ye)=>{for(var dt in Ye||(Ye={}))ee.call(Ye,dt)&&se(Xe,dt,Ye[dt]);if(te)for(var dt of te(Ye))de.call(Ye,dt)&&se(Xe,dt,Ye[dt]);return Xe};const ve="@\u2581\u2581@",Ee="@\u2581@",Be=/<pre[^>]*>/g;function Le(Xe){let Ye=document.createElement("div");return Ye.innerHTML=Xe,Ye.childNodes.length===0?"":Ye.childNodes[0].nodeValue}const ze=(Xe,Ye)=>{Xe=Xe||"";const dt=/(?: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,Nt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,at=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ye?Xe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(dt,(kt,xt,Ot,Gt,At,qe,Ve)=>{const _t=xt||Gt||qe,vn=Ot||At||Ve||"?";return Ue.Z.API_SERVER+"/api/attachments/"+_t+vn+"&t="+(0,Me.Jn)(_t,Date.now())+(kt.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Xe=Xe.replace(at,(kt,xt,Ot,Gt,At,qe,Ve)=>{const _t=xt||Gt||qe,vn=Ot||At||Ve||"?";return Ue.Z.API_SERVER+"/attachments/download/"+_t+vn+"&t="+(0,Me.Jn)(_t,Date.now())+(kt.indexOf(")")>-1?")":"&")}).replace(dt,(kt,xt,Ot,Gt,At,qe,Ve)=>{const _t=xt||Gt||qe,vn=Ot||At||Ve||"?";return Ue.Z.API_SERVER+"/api/attachments/"+_t+vn+"&t="+(0,Me.Jn)(_t,Date.now())+(kt.indexOf(")")>-1?")":"&")}).replace(Ze,(kt,xt,Ot,Gt,At)=>{const qe=xt||Gt,Ve=Ot||At||"";return'"'+Ue.Z.API_SERVER+"/api/attachments/"+qe+Ve+qe+Ve+"&t="+(0,Me.Jn)(qe,Date.now())}).replace(Nt,(kt,xt,Ot,Gt,At)=>{const qe=xt||Gt,Ve=Ot||At||"";return"("+Ue.Z.API_SERVER+"/files/uploads/"+qe+Ve+qe+Ve+"&t="+(0,Me.Jn)(qe,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Xe)};var je=({value:Xe="",className:Ye,showTextOnly:dt,showLines:Ze,style:Nt={},stylesPrev:at={},highlightKeywords:kt,showProgramFill:xt,isProgramFill:Ot,disabledFill:Gt=!1,programFillValue:At,onFillChange:qe=vn=>{},onFillBlur:Ve=()=>{},onFillFocus:_t=()=>{}})=>{let vn=String(Xe);const[yn,jt]=(0,le.useState)(""),[en,ln]=(0,le.useState)("office"),[Wn,un]=(0,le.useState)([]),kn=(0,le.useRef)("a"+(0,Pt.Z)()),wt={},jn=(Bt,Dt,ft)=>{const $t=document.createElement(Bt===Ee?"input":"textarea");$t.style.width="100%",$t.style.height=Bt===Ee?"40px":"151px",$t.rows=5,$t.spellcheck=!1,$t.name="edu-program-fill",$t.placeholder="\u8BF7\u8F93\u5165",$t.dataset.id=Dt;const xn=Object.keys(wt).length;return wt[xn]=$t,`<span class="edu-program-fill-wrap ${Bt===Ee?"":"show"}" style="width:${Bt===Ee?"400px":"100%"}" title=${ft||""}><span>${$t.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ci(Bt){return Bt=Bt.replace(/!\[.*?\]\(.*?\)/g,""),Bt=Bt.replace(/\[.*?\]\(.*?\)/g,""),Bt=Bt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Bt=Bt.replace(/<embed.*?>/g,""),Bt=Bt.replace(/<img.*?>/g,""),Bt=Bt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Bt=Bt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Bt=Bt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Bt=Bt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Bt}const Ge=Bt=>Bt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Dt,ft){let $t=ft.replace(/(\n|\r)/g,"").split("}"),xn=[];return $t.map(an=>{an!=""&&xn.push(`.${kn.current} ${an}`)}),`<style>${xn.join("}")}</style>`}),be=(0,le.useMemo)(()=>{try{const $t=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,xn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,an=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Jt=/\(\/attachments\/download\//g;vn=vn.replace(Jt,"("+Ue.Z.API_SERVER+"/attachments/download/").replace($t,"("+Ue.Z.API_SERVER+"/api/attachments/").replace(xn,'"'+Ue.Z.API_SERVER+"/api/attachments/").replace(an,'"'+Ue.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($t){}if(xt){let $t=-1;return vn=vn.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(xn,an,Jt){var Tn;return++$t,jn(xn,$t,(Tn=At==null?void 0:At[$t])==null?void 0:Tn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ge(vn||"")}</pre>`}let Bt=Ge(vn);Bt=(0,He.ZP)(Bt);const Dt=(0,He.ez)();vn.match(/\[TOC\]/)&&(Bt=Bt.replace("<p>[TOC]</p>",(0,He.Qv)()),(0,He.Iy)()),Bt=Bt.replace(/(__special_katext_id_\d+__)/g,($t,xn)=>{const{type:an,expression:Jt}=Dt[xn];return(0,Ct.renderToString)(Le(Jt)||"",{displayMode:an==="block",throwOnError:!1,output:"html"})}),Bt=Bt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,He.AL)();const ft=document.createElement("div");if(ft.innerHTML=Bt,dt)return ft.innerText;if(kt){const $t=kt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return xe(ft,$t),ft.innerHTML}return setTimeout(()=>et(),500),ft.innerHTML},[vn,kt]);(0,le.useEffect)(()=>{ct.current&&ct.current.querySelectorAll(["input","textarea"]).forEach(Dt=>{Dt.oninput=Pe,Dt.onblur=Ne,Dt.onfocus=Ie})},[Wn]),(0,le.useEffect)(()=>{var Bt,Dt,ft,$t,xn;if(At!=null&&At.length)try{const an=ct.current.querySelectorAll(".edu-program-fill-score"),Jt=ct.current.querySelectorAll('[name="edu-program-fill"]');for(const[Tn,Kn]of Jt.entries())Kn.value=((Bt=At==null?void 0:At[Tn])==null?void 0:Bt.value)||"",((Dt=At==null?void 0:At[Tn])==null?void 0:Dt.type)==="warning"?Kn.className="program-fill-warning":((ft=At==null?void 0:At[Tn])==null?void 0:ft.type)==="success"?Kn.className="program-fill-success":Kn.className="";for(const[Tn,Kn]of an.entries())Kn.innerHTML=($t=At==null?void 0:At[Tn])!=null&&$t.score?`${(xn=At==null?void 0:At[Tn])==null?void 0:xn.score}\u5206`:"";un(At)}catch(an){console.log(an,"error")}},[At]);const Pe=Bt=>{Wn[Bt.target.dataset.id]=Wn[Bt.target.dataset.id]||{},Wn[Bt.target.dataset.id].value=Bt.target.value,un([...Wn]),qe(Wn,Bt.target.dataset.id)},Ne=Bt=>{Wn[Bt.target.dataset.id]=Wn[Bt.target.dataset.id]||{},Wn[Bt.target.dataset.id].value=Bt.target.value,un([...Wn]),Ve(Wn,Bt.target.dataset.id)},Ie=Bt=>{Wn[Bt.target.dataset.id]=Wn[Bt.target.dataset.id]||{},Wn[Bt.target.dataset.id].value=Bt.target.value,un([...Wn]),_t(Wn,Bt.target.dataset.id)};function xe(Bt,Dt){return Bt.childNodes.forEach(ft=>{var $t;if(ft.childNodes.length>0)xe(ft,Dt);else if(ft.nodeName!=="IMG")if(ft.innerHTML)ft.innerHTML=($t=ft.innerHTML)==null?void 0:$t.replace(new RegExp(Dt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const xn=document.createElement("span");xn.innerHTML=ft.textContent.replace(new RegExp(Dt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ft.replaceWith(xn)}})}const ct=(0,le.useRef)();He.jb.WebkitLineClamp=Ze,Ze&&(Nt=he(he({},Nt),He.jb));function Lt(Bt){let Dt=Bt.target;if(Dt.tagName.toUpperCase()==="A"){let ft=Dt.getAttribute("href");if(ft.indexOf("office")>-1)Bt.preventDefault(),jt(ft),ln("office");else if(ft.indexOf("application/pdf")>-1)Bt.preventDefault(),jt(ft),ln("pdf");else if(ft.indexOf("text/html")>-1)Bt.preventDefault(),jt(ft),ln("html");else if(ft.startsWith("#")){Bt.preventDefault();let $t=document.getElementById(ft.replace("#",""));$t&&$t.scrollIntoView(!0)}}}const et=()=>{var Bt;const Dt=(Bt=ct.current)==null?void 0:Bt.querySelectorAll("video");Dt==null||Dt.forEach(ft=>{if(ft.oncontextmenu=()=>!1,ft.src.indexOf(".m3u8")>-1&&!ft.canPlayType("application/vnd.apple.mpegurl")){if(We.ZP.isSupported()){var $t=new We.ZP;$t.loadSource(ft.src),$t.attachMedia(ft)}}})};(0,le.useEffect)(()=>{if(ct.current&&be&&be.match(Be)&&window.PR.prettyPrint(),ct.current)return ct.current.addEventListener("click",Lt),()=>{var Bt;(Bt=ct.current)==null||Bt.removeEventListener("click",Lt),(0,He.AL)(),(0,He.Iy)()}},[be,ct.current,Lt]),(0,le.useEffect)(()=>{var Bt;const Dt=ft=>{ft.preventDefault(),ft.clipboardData.setData("text",window.getSelection().toString())};return(Bt=ct.current)==null||Bt.addEventListener("copy",Dt),()=>{var ft;(ft=ct.current)==null||ft.removeEventListener("copy",Dt)}},[ct.current]);const it=Bt=>/<style[\s\S]*?>/i.test(Bt||"");return le.createElement(le.Fragment,null,dt&&le.createElement("div",{ref:ct},be),!dt&&!it(be)&&le.createElement("div",{ref:ct,style:he({},Nt),className:`${Ye||""} ${Gt?"disabled-fill":""} markdown-body ${kn.current}`,dangerouslySetInnerHTML:{__html:be}}),!dt&&it(be)&&le.createElement(vt,{html:be}),le.createElement($e.Z,{close:!0,data:yn,type:yn!=null&&yn.length?en:"",style:he({},at),onClose:()=>jt("")}))}},65532:function(On,mn,pe){"use strict";pe.d(mn,{C:function(){return xt}});var le=pe(59301),Te={recalculation:"recalculation____i9AE",tips:"tips___GoMu8",filter:"filter___Vx7VO",input:"input___OEMMv",operating:"operating___TS9iA",operatingItem:"operatingItem___AT84q"},He=pe(92310),ut=pe.n(He),We=pe(24905),Ue=pe(95237),Me=pe(8591),Ct=pe(6848),Pt=pe(3113),$e=pe(43418),Ft=pe(1710),lt=pe(5871),vt=pe(78241),Oe=pe(71418),te=pe(88230),ee=pe(7660),de=pe(73898),se=pe(95750),he=pe(15965),ve=Object.defineProperty,Ee=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,Le=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Xe=(Ot,Gt,At)=>Gt in Ot?ve(Ot,Gt,{enumerable:!0,configurable:!0,writable:!0,value:At}):Ot[Gt]=At,Ye=(Ot,Gt)=>{for(var At in Gt||(Gt={}))ze.call(Gt,At)&&Xe(Ot,At,Gt[At]);if(Le)for(var At of Le(Gt))je.call(Gt,At)&&Xe(Ot,At,Gt[At]);return Ot},dt=(Ot,Gt)=>Ee(Ot,Be(Gt)),Ze=(Ot,Gt,At)=>new Promise((qe,Ve)=>{var _t=jt=>{try{yn(At.next(jt))}catch(en){Ve(en)}},vn=jt=>{try{yn(At.throw(jt))}catch(en){Ve(en)}},yn=jt=>jt.done?qe(jt.value):Promise.resolve(jt.value).then(_t,vn);yn((At=At.apply(Ot,Gt)).next())});const Nt=We.default.Group,at=({className:Ot,title:Gt,items:At=[],value:qe,onChange:Ve})=>{const _t=(At==null?void 0:At.length)===(qe==null?void 0:qe.length),vn=(qe==null?void 0:qe.length)>0&&(qe==null?void 0:qe.length)<(At==null?void 0:At.length),yn=jt=>{const en=At.map(ln=>ln.id);Ve(jt.target.checked?en:[])};return le.createElement(Ue.Z,{align:"middle",className:Ot},!!Gt&&le.createElement("div",{className:"mr20",style:{color:"#5F6368"}},Gt),le.createElement(We.default,{indeterminate:vn,onChange:yn,checked:_t},"\u5168\u90E8"),le.createElement(Nt,{value:qe,onChange:Ve},At.map(jt=>le.createElement(We.default,{className:"ml30 c-black",key:jt.id,value:jt.id},jt.name,le.createElement("span",null,`(${jt.count})`)))))};var xt=({className:Ot,style:Gt,dataSource:At})=>{var qe,Ve,_t,vn,yn,jt,en;const[ln,Wn]=(0,le.useState)({}),[un,kn]=(0,le.useState)(!0),[wt,jn]=(0,le.useState)(!1),[ci,Ge]=(0,le.useState)(!1),[be,Pe]=(0,le.useState)(null),[Ne,Ie]=(0,le.useState)(0),[xe,ct]=(0,le.useState)({}),[Lt,et]=(0,le.useState)(!0),[it,Bt]=(0,le.useState)(0),[Dt,ft]=(0,le.useState)(0),[$t,xn]=(0,le.useState)(!1),an=(0,le.useRef)(null),[Jt,Tn]=(0,le.useState)(!1),[Kn,dn]=(0,le.useState)(!0),[Qn,pi]=(0,le.useState)([]),zn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[Nn,yi]=(0,le.useState)(Ye({},zn));(0,le.useEffect)(()=>{At!=null&&At.question_id&&Wn(At)},[At==null?void 0:At.question_id]),(0,le.useEffect)(()=>{var Ei;if(((Ei=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ei.status)==="running"){const Sr=setInterval(()=>{cr()},3e3);return()=>clearInterval(Sr)}},[(qe=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:qe.status]),(0,le.useEffect)(()=>{var Ei;ci&&(ci===1&&(Nn.question_status=br.map(Sr=>Sr.value),Nn.review=gi.map(Sr=>Sr.value)),ci===2&&(Nn.exercise_question_resubmit_id=(Ei=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ei.id,be===1&&(Nn.success_status=[1]),be===2&&(Nn.success_status=[0])),yi(Ye({},Nn)),Zi(Nn),ft(ln!=null&&ln.is_mirror?3:10),Bt(ln!=null&&ln.is_mirror?1:5))},[ci]),(0,le.useEffect)(()=>{Jt&&Hi()},[Jt]);const Zi=Ei=>Ze(void 0,null,function*(){kn(!0);const Sr=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_student_list.json`,{method:"get",params:Ei});(Sr==null?void 0:Sr.status)==0&&(ct(Sr||[]),Ie(Sr==null?void 0:Sr.count)),kn(!1)}),Hi=()=>Ze(void 0,null,function*(){dn(!0);const Ei=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_history.json`,{method:"get"});(Ei==null?void 0:Ei.status)==0&&pi((Ei==null?void 0:Ei.data)||[]),dn(!1)}),cr=()=>Ze(void 0,null,function*(){const Ei=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_status.json`,{method:"get"});(Ei==null?void 0:Ei.status)==0&&Wn(dt(Ye({},ln),{show_resubmit_history:!0,exercise_question_resubmit:(Ei==null?void 0:Ei.data)||{}}))}),br=[{label:"\u672A\u8BC4\u6D4B",value:2,color:"#9096A3"},{label:"\u672A\u901A\u5173",value:0,color:"#E30000"},{label:"\u5DF2\u901A\u5173",value:1,color:"#00B187"}],gi=[{label:"\u672A\u8BC4\u9605",value:0,color:"#9096A3"},{label:"\u8BC4\u9605\u4E2D",value:2,color:"#FF9D18"},{label:"\u5DF2\u8BC4\u9605",value:1,color:"#3061D0"}],di=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],wi=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(Ei,Sr,Fn)=>le.createElement("span",{className:"c-black"},Fn+1+(Nn.page-1)*Nn.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:Ei=>le.createElement("span",{className:"c-black"},Ei)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:Ei=>le.createElement("span",{className:"c-grey-666"},Ei||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:Ei=>le.createElement("span",{className:"c-black"},Ei)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:Ei=>{const{label:Sr,color:Fn}=br.find(xi=>xi.value===Ei)||{};return le.createElement("span",{style:{color:Fn}},Sr)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:Ei=>le.createElement("span",{className:"c-black"},Ei)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:Ei=>le.createElement("span",{className:"c-black"},Ei)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:Ei=>{const{label:Sr,color:Fn}=gi.find(xi=>xi.value===Ei)||{};return le.createElement("span",{style:{color:Fn}},Sr)}},ci===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:Ei=>{const{label:Sr,color:Fn}=di.find(xi=>xi.value===Ei)||{};return le.createElement("span",{style:{color:Fn}},Sr)}}].filter(Boolean),Qi=(Ei,Sr,Fn)=>{Nn.page=Ei==null?void 0:Ei.current,Nn.per_page=Ei==null?void 0:Ei.pageSize,Fn!=null&&Fn.order?(Nn.sort_by=Fn==null?void 0:Fn.field,Nn.direction=(Fn==null?void 0:Fn.order)==="ascend"?"asc":"desc"):(Nn.sort_by=null,Nn.direction=null),yi(Ye({},Nn)),Zi(Nn)},Li=()=>{if(!it){Me.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}xn(!0)},ro=()=>Ze(void 0,null,function*(){var Ei,Sr;if((Ei=an.current)!=null&&Ei.onVerify())return;jn(!0);const Fn=yield(0,ee.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit.json`,{method:"post",body:{keyword:Nn.keyword,question_status:Nn.question_status,review:Nn.review_status,success_status:Nn.success_status,use_max_score:Lt,permits:it,exercise_question_resubmit_id:ci===1?null:(Sr=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Sr.id}});(Fn==null?void 0:Fn.status)==0&&(yield cr(),Me.ZP.success("\u64CD\u4F5C\u6210\u529F"),xn(!1),Ge(!1)),jn(!1)}),fr=(Ei,Sr)=>{Nn.page=1,Nn[Sr]=Ei,yi(Ye({},Nn)),Zi(Nn)},Ae=["","\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:ut()(Te.recalculation,Ot),style:Gt},le.createElement(Ct.Z,{title:Ae[(ln==null?void 0:ln.disable_resubmit_reason)||0]},le.createElement(Pt.ZP,{disabled:(ln==null?void 0:ln.disable_resubmit)||((Ve=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ve.status)==="running",onClick:()=>Ge(1),icon:le.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(ln==null?void 0:ln.show_resubmit_history)&&le.createElement(le.Fragment,null,((_t=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:_t.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"},(vn=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:vn.rate)):le.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{onClick:()=>{Ge(2),Pe(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(yn=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:yn.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{onClick:()=>{Ge(2),Pe(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(jt=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:jt.fail_count),"\u4EBA"),le.createElement(Ct.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},le.createElement("i",{onClick:()=>Tn(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),le.createElement($e.default,{centered:!0,open:!!ci,title:`\u91CD\u65B0\u8BC4\u6D4B${ci===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>Ge(!1),onOk:Li,afterClose:()=>{et(!0),Pe(null),yi(Ye({},zn))}},le.createElement("div",{className:Te.filter},ci===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(at,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:(xe==null?void 0:xe.question_status)||[],value:Nn.question_status,onChange:Ei=>fr(Ei,"question_status")}),le.createElement(at,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:(xe==null?void 0:xe.review_status)||[],value:Nn.review,onChange:Ei=>fr(Ei,"review")})),ci===2&&le.createElement(le.Fragment,null,le.createElement(at,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:(xe==null?void 0:xe.success_status)||[],value:Nn.success_status,onChange:Ei=>fr(Ei,"success_status")})),le.createElement(he.t7,{className:Te.input,style:{bottom:ci===1?10:-5},value:Nn.keyword,onChange:Ei=>fr(Ei,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),le.createElement(Ft.default,{className:"mt20",columns:wi,scroll:((en=xe==null?void 0:xe.data)==null?void 0:en.length)>7?{y:300}:{},dataSource:(xe==null?void 0:xe.data)||[],loading:un,onChange:Qi,pagination:{total:Ne,pageSize:Nn.per_page,current:Nn.page,hideOnSinglePage:!Ne,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:te.rU}}),le.createElement(Ue.Z,{justify:"space-between",align:"middle",className:"mt10"},le.createElement(We.default,{className:"c-black",checked:Lt,onChange:Ei=>et(Ei.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,de.Ny)()&&le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",le.createElement(lt.Z,{className:"ml10 mr10",value:it,max:Dt,min:1,precision:0,onChange:Ei=>Bt(Ei)}),"\u4EBA",le.createElement(Ct.Z,{overlayStyle:{maxWidth:450},title:"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A20\u4EBA\uFF08\u81EA\u5B9A\u4E49\u955C\u50CF\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A3\u4EBA\uFF09\u3002"},le.createElement("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"}))))),le.createElement($e.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:$t,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:wt,destroyOnClose:!0,onOk:ro,onCancel:()=>xn(!1)},le.createElement(vt.default.Item,{className:"mb0",colon:!1,label:"\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},le.createElement(se.Z,{ref:Ei=>an.current=Ei}))),le.createElement($e.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:Jt,width:710,onCancel:()=>Tn(!1),footer:null},le.createElement(Oe.Z,{spinning:Kn},le.createElement("div",{className:Te.operating},Qn.map((Ei,Sr)=>le.createElement("div",{key:Sr,className:Te.operatingItem},le.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},Ei==null?void 0:Ei.created_at),le.createElement("div",{className:"c-black"},Ei==null?void 0:Ei.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(Ei==null?void 0:Ei.status)==="running"?le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",le.createElement("span",{className:"c-light-primary ml3"},Ei==null?void 0:Ei.rate)):le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},Ei==null?void 0:Ei.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},Ei==null?void 0:Ei.fail_count),"\u4EBA")))),le.createElement("div",{style:{height:20}}))))}},20527:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(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=pe(43418),ut="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",Ue=(Pt,$e,Ft)=>new Promise((lt,vt)=>{var Oe=de=>{try{ee(Ft.next(de))}catch(se){vt(se)}},te=de=>{try{ee(Ft.throw(de))}catch(se){vt(se)}},ee=de=>de.done?lt(de.value):Promise.resolve(de.value).then(Oe,te);ee((Ft=Ft.apply(Pt,$e)).next())}),Ct=({type:Pt,resdata:$e,onok:Ft,oktext:lt,okloading:vt})=>{const[Oe,te]=(0,le.useState)(!1),{can_copy_list:ee,can_copy_num:de,challenge_type:se,course_data_list:he,no_copy_list:ve,no_copy_num:Ee,no_use_list:Be,no_use_num:Le,repeat_shixun_num:ze,student_count:je,total_num:Xe,use_num:Ye}=$e;let dt=de>0||Pt==="exercise";(0,le.useEffect)(()=>{($e==null?void 0:$e.student_count)>0&&te(!0)},[$e]),console.log("---11",vt),(0,le.useEffect)(()=>{vt||te(!1)},[vt]);const Ze=()=>{if(Pt==="exercise"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Te.orangeColor},je),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Ye),"\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},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Ye),"\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},je),"\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},je),"\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},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Ye),"\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},je)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",le.createElement("span",{className:Te.orangeColor},Ye)," \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},je),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Ye),"\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},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Te.orangeColor},Ye),"\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},je),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",le.createElement("span",{className:Te.orangeColor},Ye),"\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"))},Nt=()=>{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",dt&&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",dt&&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((at,kt)=>le.createElement("a",{href:`/shixuns/${at.identifier}/challenges`,target:"_blank"},"\u300A",at==null?void 0:at.name,"\u300B",kt+1!==Ee&&"\u3001"))))),de>0&&le.createElement("div",{style:{marginTop:20}},le.createElement("span",{className:Te.flex},le.createElement("img",{src:ut,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((at,kt)=>le.createElement("a",{href:`/shixuns/${at.identifier}/challenges`,target:"_blank"},"\u300A",at==null?void 0:at.name,"\u300B",kt+1!==de&&"\u3001"))))));if(Pt==="shixun")return le.createElement("div",{style:{marginTop:20}},de>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return le.createElement(He.default,{open:Oe,onCancel:()=>{te(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!dt&&"none"}},zIndex:1003,confirmLoading:vt,okText:dt?lt:"\u6211\u77E5\u9053\u4E86",onOk:()=>Ue(void 0,null,function*(){dt?yield Ft([...ee,...Be]):te(!1)})},le.createElement("div",{style:{maxHeight:600,overflow:"auto"}},Ze(),Nt()))}},85016:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ue}});var le=pe(59301),Te={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},He=pe(92310),ut=pe.n(He),Ue=({className:Me,style:Ct,state:Pt,onClick:$e})=>{var Ft,lt;return le.createElement("div",{onClick:$e,className:ut()(Pt?(Ft=Te)==null?void 0:Ft.redBtn:(lt=Te)==null?void 0:lt.btn,Me),style:Ct},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")))}},73278:function(On,mn,pe){"use strict";pe.d(mn,{h:function(){return Ee}});var le=pe(59301),Te=pe(57809),He=pe(78241),ut=pe(3113),We=pe(89780),Ue=pe.n(We),Me=pe(78780),Ct=pe(19136),Pt=Object.defineProperty,$e=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertySymbols,vt=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,te=(Be,Le,ze)=>Le in Be?Pt(Be,Le,{enumerable:!0,configurable:!0,writable:!0,value:ze}):Be[Le]=ze,ee=(Be,Le)=>{for(var ze in Le||(Le={}))vt.call(Le,ze)&&te(Be,ze,Le[ze]);if(lt)for(var ze of lt(Le))Oe.call(Le,ze)&&te(Be,ze,Le[ze]);return Be},de=(Be,Le)=>$e(Be,Ft(Le));const se=Te.default.Option,he={labelCol:{span:4},wrapperCol:{span:20}},ve={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};mn.Z=({callback:Be,onCancel:Le})=>{const[ze,je]=(0,le.useState)("python");function Xe(dt){je(ve[dt][1])}function Ye(dt){Be(dt)}return le.createElement(He.default,de(ee({},he),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ye,style:{width:500}}),le.createElement(He.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(Te.default,{getPopupContainer:dt=>dt.parentNode,onChange:Xe},Object.keys(ve).map(dt=>le.createElement(se,{key:dt,value:dt},ve[dt][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:ze})),le.createElement("div",{className:"flex-container flex-end"},le.createElement(ut.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(ut.ZP,{type:"ghost",onClick:Le},"\u53D6\u6D88")))};function Ee({value:Be,onChange:Le,mode:ze,options:je={}}){const Xe=(0,le.useRef)(),[Ye,dt]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Ye){let Ze=function(Nt){const at=Nt.getValue();Le&&Le(at)};return Ye.on("change",Ze),()=>{Ye.off("change",Ze)}}},[Ye,Le]),(0,le.useEffect)(()=>{Ye&&Ye.setOption("mode",ze)},[Ye,ze]),(0,le.useEffect)(()=>{Ye&&(Be!==Ye.getValue()||Be==="")&&setTimeout(()=>{Ye.setValue(Be||"")},300)},[Ye,Be]),(0,le.useEffect)(()=>{if(Xe.current&&!Ye){const Ze=Ue().fromTextArea(Xe.current,ee({mode:ze,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},je));dt(Ze)}},[Xe.current,Ye]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:Xe}))}},64726:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return ti}});var le=pe(59301),Te=pe(89780),He=pe.n(Te),ut=pe(76374),We=pe(78780),Ue=pe(6313),Me=pe(25717),Ct=pe(99498),Pt=pe(25419),$e=pe(67549),Ft=pe(99325),lt=({value:Zt="",className:Wt,showTextOnly:Qe,showLines:on,style:cn={}})=>{const Mt=(0,le.useMemo)(()=>"",[Zt]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:Mt}}))},vt=pe(59301),Oe=Object.defineProperty,te=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(Zt,Wt,Qe)=>Wt in Zt?Oe(Zt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Zt[Wt]=Qe,Ee=(Zt,Wt)=>{for(var Qe in Wt||(Wt={}))se.call(Wt,Qe)&&ve(Zt,Qe,Wt[Qe]);if(de)for(var Qe of de(Wt))he.call(Wt,Qe)&&ve(Zt,Qe,Wt[Qe]);return Zt},Be=(Zt,Wt)=>te(Zt,ee(Wt));let Le=[{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 ze({onActionCallback:Zt,title:Wt,icon:Qe,actionName:on,className:cn="",children:Mt}){function ht(){Zt(on)}return vt.createElement("a",{title:Wt,className:cn,onClick:ht},vt.createElement("i",{className:`${Qe}`}),Mt)}var je=({watch:Zt,showNullButton:Wt,showNullProgramButton:Qe,onActionCallback:on,fullScreen:cn,insertTemp:Mt,hidetoolBar:ht,extraUse:nn})=>{const gn=[...Le,{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 vt.createElement("ul",{className:"markdown-toolbar-container"},!ht&&gn.map((_n,qn)=>vt.createElement("li",{key:qn},_n.actionName?vt.createElement(ze,Be(Ee({},_n),{onActionCallback:on})):vt.createElement("span",{className:"v-line"}))),Wt?vt.createElement("li",null,vt.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:on},vt.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Qe?vt.createElement(vt.Fragment,null,vt.createElement("li",null,vt.createElement(ze,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:on},vt.createElement("span",{className:"fill-tip"},"+\u5355\u884C\u586B\u7A7A\u9879"))),vt.createElement("li",null,vt.createElement(ze,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:on},vt.createElement("span",{className:"fill-tip"},"+\u591A\u884C\u586B\u7A7A\u9879")))):null,Mt&&vt.createElement("li",null,vt.createElement(ze,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Mt}`,onActionCallback:on},vt.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),nn&&vt.createElement("li",null,nn),vt.createElement("li",{className:"btn-full-screen"},vt.createElement(ze,{icon:`${cn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:cn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:on})))},Xe=pe(19647),Ye=pe(78241),dt=pe(92832),Ze=pe(3113),Nt=Object.defineProperty,at=Object.defineProperties,kt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,At=(Zt,Wt,Qe)=>Wt in Zt?Nt(Zt,Wt,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Zt[Wt]=Qe,qe=(Zt,Wt)=>{for(var Qe in Wt||(Wt={}))Ot.call(Wt,Qe)&&At(Zt,Qe,Wt[Qe]);if(xt)for(var Qe of xt(Wt))Gt.call(Wt,Qe)&&At(Zt,Qe,Wt[Qe]);return Zt},Ve=(Zt,Wt)=>at(Zt,kt(Wt));const _t={labelCol:{span:4},wrapperCol:{span:20}};var vn=({callback:Zt,onCancel:Wt})=>{function Qe(on){Zt(on)}return le.createElement(Ye.default,Ve(qe({},_t),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Qe,style:{width:500}}),le.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(dt.default,null)),le.createElement(Ye.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(dt.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:Wt},"\u53D6\u6D88")))},yn=pe(73278),jt=pe(56030),en=pe(43418),ln=pe(95237),Wn=pe(14573),un=pe(59301),kn=({callback:Zt,onCancel:Wt})=>{const Qe=document.createElement("canvas"),on=Qe.getContext("2d");Qe.width=1e3,Qe.height=800,on.fillStyle="#ffffff",on.fillRect(0,0,Qe.width,Qe.height);const cn=Qe.toDataURL("image/png");return un.createElement(en.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},un.createElement(ln.Z,{style:{height:"100vh"}},un.createElement(Wn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:cn,visible:!0,title:String(Date.now())},onOk:Mt=>{Zt({src:Mt.url})},onClose:Wt})))},wt=pe(12378);function jn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(jn,go.CommandHandler),jn.prototype.canAlignSelection=function(){var Zt=this.diagram;return!(Zt===null||Zt.isReadOnly||Zt.isModelReadOnly||Zt.selection.count<2)},jn.prototype.alignLeft=function(){var Zt=this.diagram;Zt.startTransaction("aligning left");var Wt=1/0;Zt.selection.each(function(Qe){Qe instanceof go.Link||(Wt=Math.min(Qe.position.x,Wt))}),Zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Wt,Qe.position.y))}),Zt.commitTransaction("aligning left")},jn.prototype.alignRight=function(){var Zt=this.diagram;Zt.startTransaction("aligning right");var Wt=-1/0;Zt.selection.each(function(Qe){if(!(Qe instanceof go.Link)){var on=Qe.actualBounds.x+Qe.actualBounds.width;Wt=Math.max(on,Wt)}}),Zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Wt-Qe.actualBounds.width,Qe.position.y))}),Zt.commitTransaction("aligning right")},jn.prototype.alignTop=function(){var Zt=this.diagram;Zt.startTransaction("alignTop");var Wt=1/0;Zt.selection.each(function(Qe){Qe instanceof go.Link||(Wt=Math.min(Qe.position.y,Wt))}),Zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Qe.position.x,Wt))}),Zt.commitTransaction("alignTop")},jn.prototype.alignBottom=function(){var Zt=this.diagram;Zt.startTransaction("aligning bottom");var Wt=-1/0;Zt.selection.each(function(Qe){if(!(Qe instanceof go.Link)){var on=Qe.actualBounds.y+Qe.actualBounds.height;Wt=Math.max(on,Wt)}}),Zt.selection.each(function(Qe){Qe instanceof go.Link||Qe.move(new go.Point(Qe.actualBounds.x,Wt-Qe.actualBounds.height))}),Zt.commitTransaction("aligning bottom")},jn.prototype.alignCenterX=function(){var Zt=this.diagram,Wt=Zt.selection.first();if(Wt){Zt.startTransaction("aligning Center X");var Qe=Wt.actualBounds.x+Wt.actualBounds.width/2;Zt.selection.each(function(on){on instanceof go.Link||on.move(new go.Point(Qe-on.actualBounds.width/2,on.actualBounds.y))}),Zt.commitTransaction("aligning Center X")}},jn.prototype.alignCenterY=function(){var Zt=this.diagram,Wt=Zt.selection.first();if(Wt){Zt.startTransaction("aligning Center Y");var Qe=Wt.actualBounds.y+Wt.actualBounds.height/2;Zt.selection.each(function(on){on instanceof go.Link||on.move(new go.Point(on.actualBounds.x,Qe-on.actualBounds.height/2))}),Zt.commitTransaction("aligning Center Y")}},jn.prototype.alignColumn=function(Zt){var Wt=this.diagram;Wt.startTransaction("align Column"),Zt===void 0&&(Zt=0),Zt=parseFloat(Zt);var Qe=new Array;Wt.selection.each(function(nn){nn instanceof go.Link||Qe.push(nn)});for(var on=0;on<Qe.length-1;on++){var cn=Qe[on],Mt=cn.actualBounds.y+cn.actualBounds.height+Zt,ht=Qe[on+1];ht.move(new go.Point(cn.actualBounds.x,Mt))}Wt.commitTransaction("align Column")},jn.prototype.alignRow=function(Zt){Zt===void 0&&(Zt=0),Zt=parseFloat(Zt);var Wt=this.diagram;Wt.startTransaction("align Row");var Qe=new Array;Wt.selection.each(function(nn){nn instanceof go.Link||Qe.push(nn)});for(var on=0;on<Qe.length-1;on++){var cn=Qe[on],Mt=cn.actualBounds.x+cn.actualBounds.width+Zt,ht=Qe[on+1];ht.move(new go.Point(Mt,cn.actualBounds.y))}Wt.commitTransaction("align Row")},jn.prototype.canRotate=function(Zt){var Wt=this.diagram;return!(Wt===null||Wt.isReadOnly||Wt.isModelReadOnly||Wt.selection.count<1)},jn.prototype.rotate=function(Zt){Zt===void 0&&(Zt=90);var Wt=this.diagram;Wt.startTransaction("rotate "+Zt.toString());var Wt=this.diagram;Wt.selection.each(function(Qe){Qe instanceof go.Link||Qe instanceof go.Group||(Qe.angle+=Zt)}),Wt.commitTransaction("rotate "+Zt.toString())},jn.prototype.pullToFront=function(){var Zt=this.diagram;Zt.startTransaction("pullToFront");var Wt=new go.Map;Zt.selection.each(function(Qe){Wt.set(Qe.layer,0)}),Wt.iteratorKeys.each(function(Qe){var on=0;Qe.parts.each(function(cn){if(!cn.isSelected){var Mt=cn.zOrder;isNaN(Mt)?cn.zOrder=0:on=Math.max(on,Mt)}}),Wt.set(Qe,on)}),Zt.selection.each(function(Qe){jn._assignZOrder(Qe,Wt.get(Qe.layer)+1)}),Zt.commitTransaction("pullToFront")},jn.prototype.pushToBack=function(){var Zt=this.diagram;Zt.startTransaction("pushToBack");var Wt=new go.Map;Zt.selection.each(function(Qe){Wt.set(Qe.layer,0)}),Wt.iteratorKeys.each(function(Qe){var on=0;Qe.parts.each(function(cn){if(!cn.isSelected){var Mt=cn.zOrder;isNaN(Mt)?cn.zOrder=0:on=Math.min(on,Mt)}}),Wt.set(Qe,on)}),Zt.selection.each(function(Qe){jn._assignZOrder(Qe,Wt.get(Qe.layer)-1-jn._findGroupDepth(Qe))}),Zt.commitTransaction("pushToBack")},jn._assignZOrder=function(Zt,Wt,Qe){Qe===void 0&&(Qe=Zt),Zt.layer===Qe.layer&&(Zt.zOrder=Wt),Zt instanceof go.Group&&Zt.memberParts.each(function(on){jn._assignZOrder(on,Wt+1,Qe)})},jn._findGroupDepth=function(Zt){if(Zt instanceof go.Group){var Wt=0;return Zt.memberParts.each(function(Qe){Wt=Math.max(Wt,jn._findGroupDepth(Qe))}),Wt+1}else return 0},jn.prototype.doKeyDown=function(){var Zt=this.diagram;if(Zt!==null){var Wt=Zt.lastInput;if(Wt.key==="Up"||Wt.key==="Down"||Wt.key==="Left"||Wt.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)}},jn.prototype._getAllParts=function(){var Zt=new Array;return this.diagram.nodes.each(function(Wt){Zt.push(Wt)}),this.diagram.parts.each(function(Wt){Zt.push(Wt)}),Zt},jn.prototype._arrowKeyMove=function(){var Zt=this.diagram,Wt=Zt.lastInput,Qe=0,on=0;if(Wt.control||Wt.meta)Qe=1,on=1;else if(Zt.grid!==null){var cn=Zt.grid.gridCellSize;on=cn.width,Qe=cn.height}Zt.startTransaction("arrowKeyMove"),Zt.selection.each(function(Mt){Wt.key==="Up"?Mt.move(new go.Point(Mt.actualBounds.x,Mt.actualBounds.y-Qe)):Wt.key==="Down"?Mt.move(new go.Point(Mt.actualBounds.x,Mt.actualBounds.y+Qe)):Wt.key==="Left"?Mt.move(new go.Point(Mt.actualBounds.x-on,Mt.actualBounds.y)):Wt.key==="Right"&&Mt.move(new go.Point(Mt.actualBounds.x+on,Mt.actualBounds.y))}),Zt.commitTransaction("arrowKeyMove")},jn.prototype._arrowKeySelect=function(){var Zt=this.diagram,Wt=Zt.lastInput,Qe=null;Wt.key==="Up"?Qe=this._findNearestPartTowards(270):Wt.key==="Down"?Qe=this._findNearestPartTowards(90):Wt.key==="Left"?Qe=this._findNearestPartTowards(180):Wt.key==="Right"&&(Qe=this._findNearestPartTowards(0)),Qe!==null&&(Wt.shift?Qe.isSelected=!0:Wt.control||Wt.meta?Qe.isSelected=!Qe.isSelected:Zt.select(Qe))},jn.prototype._findNearestPartTowards=function(Zt){var Wt=this.diagram.selection.first();if(Wt===null)return null;for(var Qe=Wt.actualBounds.center,on=this._getAllParts(),cn=1/0,Mt=Wt,ht=0;ht<on.length;ht++){var nn=on[ht];if(nn!==Wt&&nn.canSelect()){var gn=nn.actualBounds.center,_n=Qe.directionPoint(gn),qn=this._angleCloseness(_n,Zt);if(qn<=45){var Et=Qe.distanceSquaredPoint(gn);Et*=1+Math.sin(qn*Math.PI/180),Et<cn&&(cn=Et,Mt=nn)}}}return Mt},jn.prototype._angleCloseness=function(Zt,Wt){return Math.min(Math.abs(Wt-Zt),Math.min(Math.abs(Wt+360-Zt),Math.abs(Wt-360-Zt)))},jn.prototype._arrowKeyTree=function(){var Zt=this.diagram,Wt=Zt.selection.first();if(Wt instanceof go.Node){var Qe=Zt.lastInput;if(Qe.key==="Right"){if(!Wt.isTreeLeaf)if(!Wt.isTreeExpanded)Zt.commandHandler.canExpandTree(Wt)&&Zt.commandHandler.expandTree(Wt);else{var on=this._sortTreeChildrenByY(Wt).first();on!==null&&Zt.select(on)}}else if(Qe.key==="Left")if(!Wt.isTreeLeaf&&Wt.isTreeExpanded)Zt.commandHandler.canCollapseTree(Wt)&&Zt.commandHandler.collapseTree(Wt);else{var cn=Wt.findTreeParentNode();cn!==null&&Zt.select(cn)}else if(Qe.key==="Up"){var cn=Wt.findTreeParentNode();if(cn!==null){var Mt=this._sortTreeChildrenByY(cn),ht=Mt.indexOf(Wt);if(ht>0){for(var nn=Mt.elt(ht-1);nn!==null&&nn.isTreeExpanded&&!nn.isTreeLeaf;){var gn=this._sortTreeChildrenByY(nn);nn=gn.last()}nn!==null&&Zt.select(nn)}else Zt.select(cn)}}else if(Qe.key==="Down")if(Wt.isTreeExpanded&&!Wt.isTreeLeaf){var on=this._sortTreeChildrenByY(Wt).first();on!==null&&Zt.select(on)}else for(;Wt!==null;){var cn=Wt.findTreeParentNode();if(cn===null)break;var Mt=this._sortTreeChildrenByY(cn),ht=Mt.indexOf(Wt);if(ht<Mt.length-1){Zt.select(Mt.elt(ht+1));break}else Wt=cn}var _n=Zt.selection.first();_n!==null&&Zt.scrollToRect(_n.actualBounds)}},jn.prototype._sortTreeChildrenByY=function(Zt){var Wt=new go.List().addAll(Zt.findTreeChildrenNodes());return Wt.sort(function(Qe,on){var cn=Qe.location,Mt=on.location;return cn.y<Mt.y?-1:cn.y>Mt.y?1:cn.x<Mt.x?-1:cn.x>Mt.x?1:0}),Wt},jn.prototype.copyToClipboard=function(Zt){go.CommandHandler.prototype.copyToClipboard.call(this,Zt),this._lastPasteOffset.set(this.pasteOffset)},jn.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(jn.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(jn.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 ci=jn,Ge=pe(29277),be=pe(43604),Pe=pe(7660),Ne={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Ie=pe(73898),xe=pe(59301),ct=(Zt,Wt,Qe)=>new Promise((on,cn)=>{var Mt=gn=>{try{nn(Qe.next(gn))}catch(_n){cn(_n)}},ht=gn=>{try{nn(Qe.throw(gn))}catch(_n){cn(_n)}},nn=gn=>gn.done?on(gn.value):Promise.resolve(gn.value).then(Mt,ht);nn((Qe=Qe.apply(Zt,Wt)).next())});function Lt({onCancel:Zt,callback:Wt}){let Qe=(0,le.useRef)(),on=(0,le.useRef)(),cn=(0,le.useRef)(),Mt=(0,le.useRef)(!1);const ht=(0,le.useRef)(!1),[nn,gn]=(0,le.useState)(0);function _n(){const Et=wt.bx.make,Pn={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 wt.S0(on.current,{padding:20,grid:Et(wt.s_,"Grid",Et(wt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Et(wt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:ri=>{var Ui=ri.diagram.commandHandler.addTopLevelParts(ri.diagram.selection,!0);Ui||ri.diagram.currentTool.doCancel()},commandHandler:Et(ci),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:ri=>{var Ui=ri.subject;Ui.location=Ui.location.copy().snapToGridPoint(ri.diagram.grid.gridOrigin,ri.diagram.grid.gridCellSize),setTimeout(()=>{ri.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:ri=>{var Ui=ri.subject;setTimeout(()=>{ri.diagram.commandHandler.editTextBlock()})},LinkRelinked:ri=>{var Ui=ri.parameter.part;Ui.invalidateConnectedLinks();var Pr=ri.subject;ri.diagram.toolManager.linkingTool.isForwards?Pr.toNode.invalidateConnectedLinks():Pr.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Qe.current.nodeTemplate=Et(wt.NB,"Auto",{locationSpot:wt.z6.Center,locationObjectName:"SHAPE",desiredSize:new wt.$u(120,60),minSize:new wt.$u(40,40),resizable:!0,resizeCellSize:new wt.$u(10,10),rotatable:!0},new wt.KX("location","loc",wt.E9.parse).makeTwoWay(wt.E9.stringify),new wt.KX("desiredSize","size",wt.$u.parse).makeTwoWay(wt.$u.stringify),Et(wt.bn,{name:"SHAPE",fill:Pn.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:wt.z6.AllSides,toSpot:wt.z6.AllSides},new wt.KX("figure"),new wt.KX("fill"),new wt.KX("stroke","borderColor"),new wt.KX("strokeWidth","thickness"),new wt.KX("strokeDashArray","dash")),Et(wt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Et(wt.al,{margin:1,textAlign:"center",overflow:wt.al.OverflowEllipsis,editable:!0},new wt.KX("text").makeTwoWay(),new wt.KX("stroke","color"))),Qe.current.nodeTemplate.toolTip=Et("ToolTip",Et(wt.s_,"Vertical",{maxSize:new wt.$u(200,NaN)},Et(wt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new wt.KX("text")),Et(wt.al,{font:"10pt sans-serif",textAlign:"center"},new wt.KX("text","details"))));function Xn(ri,Ui){var Pr=(er,Cr)=>{er.handled=!0,er.diagram.model.commit(qr=>{var Zr=Cr.part.adornedPart,Ir=new wt.E9().setRectSpot(Zr.actualBounds,ri);Ir.subtract(Zr.location),Ir.scale(2,2),Ir.x+=Math.sign(Ir.x)*130,Ir.y+=Math.sign(Ir.y)*130,Ir.add(Zr.location),Ir.snapToGridPoint(er.diagram.grid.gridOrigin,er.diagram.grid.gridCellSize);var Ur=qr.copyNodeData(Zr.data);qr.setGroupKeyForNodeData(Ur,qr.getGroupKeyForNodeData(Zr.data)),qr.addNodeData(Ur);var Vn={from:Zr.key,to:qr.getKeyForNodeData(Ur)};qr.addLinkData(Vn);var Xo=er.diagram.findNodeForData(Ur);Xo.location=Ir,er.diagram.select(Xo),setTimeout(()=>{er.diagram.commandHandler.editTextBlock()},20)})};return Et(wt.bn,{figure:Ui,alignment:ri,alignmentFocus:ri.opposite(),width:ri.equals(wt.z6.Top)||ri.equals(wt.z6.Bottom)?25:18,height:ri.equals(wt.z6.Top)||ri.equals(wt.z6.Bottom)?18:25,fill:"orange",stroke:Pn.white,strokeWidth:4,mouseEnter:(er,Cr)=>Cr.fill="dodgerblue",mouseLeave:(er,Cr)=>Cr.fill="orange",isActionable:!0,click:Pr,contextClick:Pr})}function Ci(ri){return Et(wt.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:(Ui,Pr)=>Pr.fill="dodgerblue",mouseLeave:(Ui,Pr)=>Pr.fill="orange",click:(Ui,Pr)=>{Ui.diagram.commandHandler.showContextMenu(Pr.part.adornedPart)}},ri||{})}Qe.current.nodeTemplate.selectionAdornmentTemplate=Et(wt.uz,"Spot",Et(wt.Vm,{padding:10}),Xn(wt.z6.Top,"TriangleUp"),Xn(wt.z6.Left,"TriangleLeft"),Xn(wt.z6.Right,"TriangleRight"),Xn(wt.z6.Bottom,"TriangleDown"),Ci({alignment:new wt.z6(.75,0)}));function tn(ri,Ui){return(Pr,er)=>{Pr.handled=!0,Pr.diagram.model.commit(Cr=>{Cr.set(er.part.adornedPart.data,ri,Ui)})}}function sn(ri,Ui){return Ui||(Ui="color"),Et(wt.bn,{width:16,height:16,stroke:"lightgray",fill:ri,margin:1,background:"transparent",mouseEnter:(Pr,er)=>er.stroke="dodgerblue",mouseLeave:(Pr,er)=>er.stroke="lightgray",click:tn(Ui,ri),contextClick:tn(Ui,ri)})}function In(){return[Et("ContextMenuButton",Et(wt.s_,"Horizontal",sn(Pn.white,"fill"),sn(Pn.beige,"fill"),sn(Pn.extralightblue,"fill"),sn(Pn.extralightred,"fill"))),Et("ContextMenuButton",Et(wt.s_,"Horizontal",sn(Pn.lightgray,"fill"),sn(Pn.lightgreen,"fill"),sn(Pn.lightblue,"fill"),sn(Pn.lightred,"fill")))]}function ji(){return[Et("ContextMenuButton",Et(wt.s_,"Horizontal",sn(Pn.black),sn(Pn.green),sn(Pn.blue),sn(Pn.red))),Et("ContextMenuButton",Et(wt.s_,"Horizontal",sn(Pn.white),sn(Pn.magenta),sn(Pn.purple),sn(Pn.orange)))]}function Ai(ri,Ui){return Ui||(Ui="thickness"),Et(wt.bn,"LineH",{width:16,height:16,strokeWidth:ri,margin:1,background:"transparent",mouseEnter:(Pr,er)=>er.background="dodgerblue",mouseLeave:(Pr,er)=>er.background="transparent",click:tn(Ui,ri),contextClick:tn(Ui,ri)})}function Si(ri,Ui){return Ui||(Ui="dash"),Et(wt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:ri,margin:1,background:"transparent",mouseEnter:(Pr,er)=>er.background="dodgerblue",mouseLeave:(Pr,er)=>er.background="transparent",click:tn(Ui,ri),contextClick:tn(Ui,ri)})}function ki(){return[Et("ContextMenuButton",Et(wt.s_,"Horizontal",Ai(1),Ai(2),Ai(3),Ai(4))),Et("ContextMenuButton",Et(wt.s_,"Horizontal",Si(null),Si([2,4]),Si([4,4])))]}function Ni(ri,Ui){return Ui||(Ui="figure"),Et(wt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:ri,margin:1,background:"transparent",mouseEnter:(Pr,er)=>er.fill="dodgerblue",mouseLeave:(Pr,er)=>er.fill="lightgray",click:tn(Ui,ri),contextClick:tn(Ui,ri)})}Qe.current.nodeTemplate.contextMenu=Et("ContextMenu",Et("ContextMenuButton",Et(wt.s_,"Horizontal",Ni("Rectangle"),Ni("RoundedRectangle"),Ni("Ellipse"),Ni("Diamond"))),Et("ContextMenuButton",Et(wt.s_,"Horizontal",Ni("Parallelogram2"),Ni("ManualOperation"),Ni("Procedure"),Ni("Cylinder1"))),Et("ContextMenuButton",Et(wt.s_,"Horizontal",Ni("Terminator"),Ni("CreateRequest"),Ni("Document"),Ni("TriangleDown"))),In(),ji(),ki()),Qe.current.groupTemplate=Et(wt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:wt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(ri,Ui)=>{var Pr=Ui.addMembers(Ui.diagram.selection,!0);Pr||Ui.diagram.currentTool.doCancel()},avoidable:!1},new wt.KX("location","loc",wt.E9.parse).makeTwoWay(wt.E9.stringify),Et(wt.s_,"Auto",{name:"BODY"},Et(wt.bn,{parameter1:10,fill:Pn.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:wt.z6.AllSides,toSpot:wt.z6.AllSides},new wt.KX("fill"),new wt.KX("stroke","color"),new wt.KX("strokeWidth","thickness"),new wt.KX("strokeDashArray","dash")),Et(wt.Vm,{background:"transparent",margin:20})),Et(wt.al,{alignment:wt.z6.Top,alignmentFocus:wt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new wt.KX("text"),new wt.KX("stroke","color"))),Qe.current.groupTemplate.selectionAdornmentTemplate=Et(wt.uz,"Spot",Et(wt.s_,"Auto",Et(wt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Et(wt.Vm,{margin:1.5})),Ci({alignment:wt.z6.TopRight,alignmentFocus:wt.z6.BottomRight})),Qe.current.groupTemplate.contextMenu=Et("ContextMenu",In(),ji(),ki()),Qe.current.linkTemplate=Et(wt.rU,{layerName:"Foreground",routing:wt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new wt.KX("fromSpot","fromSpot",wt.z6.parse),new wt.KX("toSpot","toSpot",wt.z6.parse),new wt.KX("fromShortLength","dir",ri=>ri>=1?10:0),new wt.KX("toShortLength","dir",ri=>ri>=1?10:0),new wt.KX("points").makeTwoWay(),Et(wt.bn,{strokeWidth:2},new wt.KX("stroke","color"),new wt.KX("strokeWidth","thickness"),new wt.KX("strokeDashArray","dash")),Et(wt.bn,{segmentIndex:0,segmentOffset:new wt.E9(15,0),segmentOrientation:wt.rU.OrientAlong,alignmentFocus:wt.z6.Right,figure:"circle",width:10,strokeWidth:0},new wt.KX("fill","color"),new wt.KX("visible","dir",ri=>ri===1)),Et(wt.bn,{segmentIndex:-1,segmentOffset:new wt.E9(-10,6),segmentOrientation:wt.rU.OrientPlus90,alignmentFocus:wt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new wt.KX("fill","color"),new wt.KX("visible","dir",ri=>ri>=1),new wt.KX("width","thickness",ri=>7+3*ri),new wt.KX("height","thickness",ri=>7+3*ri),new wt.KX("segmentOffset","thickness",ri=>new wt.E9(-15,4+1.5*ri))),Et(wt.bn,{segmentIndex:0,segmentOffset:new wt.E9(15,-6),segmentOrientation:wt.rU.OrientMinus90,alignmentFocus:wt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new wt.KX("fill","color"),new wt.KX("visible","dir",ri=>ri===2),new wt.KX("width","thickness",ri=>7+3*ri),new wt.KX("height","thickness",ri=>7+3*ri),new wt.KX("segmentOffset","thickness",ri=>new wt.E9(-15,4+1.5*ri))),Et(wt.al,{alignmentFocus:new wt.z6(0,1,-4,0),editable:!0},new wt.KX("text").makeTwoWay(),new wt.KX("stroke","color"))),Qe.current.linkTemplate.selectionAdornmentTemplate=Et(wt.uz,Et(wt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:ir(2)},new wt.KX("pathPattern","thickness",ir)),Ci({alignmentFocus:new wt.z6(0,0,-6,-4)}));function ir(ri){return Et(wt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(ri+4).toString()+" H3"})}function zr(ri){var Ui="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return ri===0?Ui="M0 0 M16 16 M0 8 L16 8":ri===2&&(Ui="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Et(wt.bn,{geometryString:Ui,margin:2,background:"transparent",mouseEnter:(Pr,er)=>er.background="dodgerblue",mouseLeave:(Pr,er)=>er.background="transparent",click:tn("dir",ri),contextClick:tn("dir",ri)})}function Vr(ri){var Ui=(Pr,er)=>{Pr.handled=!0,Pr.diagram.model.commit(Cr=>{var qr=er.part.adornedPart;Cr.set(qr.data,ri?"toSpot":"fromSpot",wt.z6.stringify(wt.z6.AllSides)),(ri?qr.toNode:qr.fromNode).invalidateConnectedLinks()})};return Et(wt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Pr,er)=>er.background="dodgerblue",mouseLeave:(Pr,er)=>er.background="transparent",click:Ui,contextClick:Ui})}function Zn(ri,Ui){var Pr=0,er=wt.z6.RightSide;ri.equals(wt.z6.Top)?(Pr=270,er=wt.z6.TopSide):ri.equals(wt.z6.Left)?(Pr=180,er=wt.z6.LeftSide):ri.equals(wt.z6.Bottom)&&(Pr=90,er=wt.z6.BottomSide),Ui||(Pr-=180);var Cr=(qr,Zr)=>{qr.handled=!0,qr.diagram.model.commit(Ir=>{var Ur=Zr.part.adornedPart;Ir.set(Ur.data,Ui?"toSpot":"fromSpot",wt.z6.stringify(er)),(Ui?Ur.toNode:Ur.fromNode).invalidateConnectedLinks()})};return Et(wt.bn,{alignment:ri,alignmentFocus:ri.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Pr,background:"transparent",mouseEnter:(qr,Zr)=>Zr.background="dodgerblue",mouseLeave:(qr,Zr)=>Zr.background="transparent",click:Cr,contextClick:Cr})}Qe.current.linkTemplate.contextMenu=Et("ContextMenu",ji(),ki(),Et("ContextMenuButton",Et(wt.s_,"Horizontal",zr(0),zr(1),zr(2))),Et("ContextMenuButton",Et(wt.s_,"Horizontal",Et(wt.s_,"Spot",Vr(!1),Zn(wt.z6.Top,!1),Zn(wt.z6.Left,!1),Zn(wt.z6.Right,!1),Zn(wt.z6.Bottom,!1)),Et(wt.s_,"Spot",{margin:new wt.Zt(0,0,0,2)},Vr(!0),Zn(wt.z6.Top,!0),Zn(wt.z6.Left,!0),Zn(wt.z6.Right,!0),Zn(wt.z6.Bottom,!0)))));const io=`{ "class": "GraphLinksModel",
"nodeDataArray": [
{"text":"Find Problem","key":-9,"loc":"-20 -140","color":"#3358ff","fill":"white","figure":"Procedure","thickness":3},
{"text":"What do we want?","key":-10,"loc":"-65 -324.305","group":-16,"figure":"Ellipse","fill":"white"},
{"text":"What do our users want?","key":-11,"loc":"105 -334.305","group":-20,"figure":"Ellipse","fill":"#ffffff","color":"black"},
{"text":"Meetings","key":-12,"loc":"-65 -444.305","group":-16,"figure":"TriangleDown","fill":"#ffffff"},
{"text":"Reviews","key":-13,"loc":"105 -454.305","group":-20,"figure":"TriangleDown","fill":"#ffffff","color":"black"},
{"text":"Can we solve it?","key":-14,"loc":"190 -140","color":"#7d33ff","fill":"#ffffff","figure":"Diamond","size":"140 80","thickness":3},
{"isGroup":true,"text":"Internal","key":-16,"loc":"-65 -384.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"External","key":-20,"loc":"105 -394.305","fill":"#d5ebff","dash":null,"thickness":1,"group":-22},
{"isGroup":true,"text":"Sources","key":-22,"loc":"20 -400","fill":"#a5d2fa","dash":[4,4],"color":"#3358ff"}
],
"linkDataArray": [
{"from":-12,"to":-10,"points":[-65,-414.305,-65,-404.305,-65,-384.305,-65,-384.305,-65,-364.305,-65,-354.305],"dash":null,"dir":1},
{"from":-13,"to":-11,"points":[105,-424.305,105,-414.305,105,-394.305,105,-394.305,105,-374.305,105,-364.305],"dash":null,"color":"#000000","dir":1},
{"from":-10,"to":-9,"points":[-65,-294.305,-65,-284.305,-65,-232.1525,-40,-232.1525,-40,-180,-40,-170],"dir":2,"dash":[4,4]},
{"from":-11,"to":-9,"points":[105,-304.305,105,-294.305,105,-237.1525,0,-237.1525,0,-180,0,-170],"dash":[4,4],"dir":2},
{"from":-9,"to":-14,"points":[40,-150,58,-150,80,-150,80,-153.33333333333331,102,-153.33333333333331,120,-153.33333333333331],"dir":1,"color":"#3358ff"},
{"from":-14,"to":-9,"points":[190,-100,190,-90,-20,-90,-20,-95,-20,-100,-20,-110],"fromSpot":"BottomSide","toSpot":"BottomSide","text":"No","color":"#ff3333","thickness":2,"dir":1},
{"from":-9,"to":-14,"points":[40,-130,58,-130,80,-130,80,-126.66666666666666,102,-126.66666666666666,120,-126.66666666666666]}
]}`;var Yr=["Rectangle","Square","RoundedRectangle","Border","Ellipse","Circle","TriangleRight","TriangleDown","TriangleLeft","TriangleUp","Triangle","Diamond","LineH","LineV","None","BarH","BarV","MinusLine","PlusLine","XLine","LineRight","LineDown","LineLeft","LineUp"];function Fr(ri){return console.log("shapeName:",ri),Yr.indexOf(ri)>=0}var wn=new wt.YI(cn.current,{maxSelectionCount:1,linkTemplate:Et(wt.rU,{locationSpot:wt.z6.Center,selectionAdornmentTemplate:Et(wt.uz,"Link",{locationSpot:wt.z6.Center},Et(wt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Et(wt.bn,{toArrow:"Standard",stroke:null}))},{routing:wt.rU.AvoidsNodes,curve:wt.rU.JumpOver,corner:5,toShortLength:4},new wt.KX("points"),Et(wt.bn,{isPanelMain:!0,strokeWidth:2}),Et(wt.bn,{toArrow:"Standard",stroke:null})),model:new wt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...wt.bn.getFigureGenerators().toArray().map(ri=>({text:"\u672A\u547D\u540D",size:"100 100",figure:ri.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Qe.current.addDiagramListener("TextEdited",function(ri){var Ui;const Pr=ri.subject.part;var er=(Ui=document.activeElement)==null?void 0:Ui.value;typeof er=="string"&&er.trim()===""&&Qe.current.model.commit(function(Cr){Cr.set(Pr.data,"text","\u672A\u547D\u540D"),Qe.current.commandHandler.stopCommand()},"increment")}),wn.nodeTemplate=Et(wt.NB,"Auto",{locationSpot:wt.z6.Center},new wt.KX("location","location",wt.E9.parse).makeTwoWay(wt.E9.stringify),Et(wt.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 wt.KX("stroke").makeTwoWay(),new wt.KX("fill").makeTwoWay(),new wt.KX("figure")),Et(wt.al,{margin:new wt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new wt.$u(16,16),maxSize:new wt.$u(10,NaN),textAlign:"center",editable:!0},new wt.KX("key").makeTwoWay())),setTimeout(()=>{Qe.current.grid=Et(wt.s_,"Grid",Et(wt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Et(wt.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=()=>ct(this,null,function*(){var Et,Pn=Qe.current.makeImage();const Xn=yield(0,Pe.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Pn.src,file_data:JSON.stringify({login:(Et=(0,Ie.eY)())==null?void 0:Et.login,data:JSON.parse(Qe.current.model.toJson())})}});Wt({src:Xn.url})});return(0,le.useEffect)(()=>(setTimeout(()=>{_n()},500),gn(nn+1),()=>{Qe.current=null}),[]),xe.createElement("div",{ref:ht,className:Mt.current?`${Ne.maxH60} body-overflow-initial`:"body-overflow-initial"},xe.createElement(en.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!nn,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:xe.createElement(ln.Z,null,xe.createElement(be.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),xe.createElement(be.Z,{onClick:()=>{var Et,Pn,Xn=Qe.current.selection.first();if(Mt.current=!Mt.current,document.activeElement&&Xn){let Ci=(Pn=(Et=document.activeElement)==null?void 0:Et.value)==null?void 0:Pn.trim();typeof Ci=="string"&&Qe.current.model.commit(function(tn){tn.set(Xn.data,"text",Ci||"\u672A\u547D\u540D"),Qe.current.commandHandler.stopCommand()},"increment")}gn(nn+1)}},xe.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Zt},xe.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:Ne.flowChartWrp},xe.createElement("div",{style:{display:"flex",height:"100%"}},xe.createElement("div",{style:{width:"300px",height:"100%"}},xe.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),xe.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ne.myPaletteDiv,ref:cn})),xe.createElement("div",{style:{flex:1,position:"relative"}},xe.createElement("div",{ref:on,style:{height:"80vh"}}))),xe.createElement("div",{className:"tr"},xe.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 et=Lt,it=pe(5112),Bt=pe(5871);const Dt=it.ZP.Group,ft={margin:"0 8px"};var $t=({callback:Zt,onCancel:Wt})=>{function Qe(on){Zt(on)}return le.createElement(Ye.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:ft},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:ft},"\u884C\u6570"),le.createElement(Ye.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(Bt.Z,null)),le.createElement("span",{style:ft},"\u5217\u6570"),le.createElement(Ye.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(Bt.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:ft},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(Ye.default.Item,{name:"align"},le.createElement(Dt,null,le.createElement(it.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(it.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(it.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(it.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:Wt},"\u53D6\u6D88")))},xn=pe(78673),an=pe(5559),Jt=pe.n(an),Kn=(0,le.forwardRef)(({use3d:Zt,width:Wt,height:Qe,callback:on,showSaveButton:cn},Mt)=>{const ht=(0,le.useRef)(),nn=(0,le.useRef)(),[gn,_n]=(0,le.useState)(!1),qn=(0,le.useRef)({id:ht,appName:"graphing",width:Wt||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(Jt())(qn.current,!0),window.onload=function(){nn.current.inject("applet_container")}},[]);const Et=()=>{var Pn=window.ggbApplet.getPNGBase64(1,!0,72);return on&&on(Pn),Pn};return(0,le.useEffect)(()=>{qn.current.appName=gn?"3D":"graphing",nn.current.inject("applet_container")},[gn]),(0,le.useEffect)(()=>{_n(Zt)},[Zt]),(0,le.useImperativeHandle)(Mt,()=>({getImgData:Et})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ht}),le.createElement(ln.Z,{align:"middle"},le.createElement(be.Z,{flex:1},le.createElement(xn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:gn,onChange:Pn=>_n(Pn)})),le.createElement(be.Z,null,le.createElement(Ze.ZP,{size:"large",onClick:Et,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),dn=pe(46531),Qn=pe(8591);const pi="link",zn="upload-image",Nn="add-flowchart",yi="draw-image",Zi="add-flowchart",Hi="code-block",cr="add-table",br="------------",gi={default:br,left:`:${br}`,center:`:${br}:`,right:`${br}:`};var di=pe(50505);function wi(){}let Qi=0;const Li=1e4,ro="\u2581",fr="@\u2581\u2581@",Ae="@\u2581@",Ei=`
**\u6A21\u677F\u6807\u9898**
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Sr=["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 zi=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",qi={[zi+"-B"]:"bold",[zi+"-I"]:"italic"},Gn={[pi]:"\u6DFB\u52A0\u94FE\u63A5",[Hi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[zn]:"\u6DFB\u52A0\u56FE\u7247",[yi]:"\u6DFB\u52A0\u753B\u56FE",[Nn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[cr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var ti=({defaultValue:Zt="",onChange:Wt,width:Qe="100%",height:on=400,miniToolbar:cn=!1,isFocus:Mt=!1,watch:ht,insertTemp:nn,mode:gn="markdown",id:_n="markdown-editor-id",showResizeBar:qn=!1,noStorage:Et=!1,showNullButton:Pn=!1,showNullProgramButton:Xn=!1,hidetoolBar:Ci=!1,fullScreen:tn=!1,onBlur:sn,onCMBeforeChange:In,onFullScreen:ji,className:Ai="",disablePaste:Si=!1,disabled:ki=!1,disabledFill:Ni=!1,placeholder:ir="",values:zr="",extraUse:Vr})=>{const[Zn,io]=(0,le.useState)(null),[Yr,Fr]=(0,le.useState)(Zt),[wn,ri]=(0,le.useState)(ht),[Ui,Pr]=(0,le.useState)(tn),[er,Cr]=(0,le.useState)(""),[qr,Zr]=(0,le.useState)(0),[Ir,Ur]=(0,le.useState)(on),[Vn,Xo]=(0,le.useState)(!1),[Un,Io]=(0,le.useState)(0),[Go,tr]=(0,le.useState)(0),ia=(0,le.useRef)(),zo=(0,le.useRef)(),Nr=(0,le.useRef)(),Br=(0,le.useRef)();(0,le.useEffect)(()=>{const Eo=window.scrollY||window.pageYOffset;Fr(zr),Zn==null||Zn.setValue(zr),window.scrollTo(0,Eo)},[zr]),(0,le.useEffect)(()=>{ji==null||ji(Ui)},[Ui]),(0,le.useEffect)(()=>{if(ia.current){let Eo=function(mi,oo){var ao;if(Si){oo.preventDefault();return}const Ga=oo.clipboardData;if(Ga){const Ca=Ga.types.toString(),fa=Ga.items;if(Ca==="Files"||Ga.types.indexOf("Files")>-1){if(oo.preventDefault(),gn=="stex")return;try{let Ka=fa[1];((ao=fa[0])==null?void 0:ao.kind)==="file"&&(Ka=fa[0]);const Qa=Ka.getAsFile(),Cs=Qa.name.split(".").pop();(0,jt.I)(Qa,ms=>{var Zs,Bn,ys;ms.id?((Zs=Qa==null?void 0:Qa.type)==null?void 0:Zs.indexOf("image"))>-1?Gr.replaceSelection(`<img width="100%" src="/api/attachments/${ms.id}?type=${ms.content_type})" alt="" />`):((Bn=Qa==null?void 0:Qa.type)==null?void 0:Bn.indexOf("video"))>-1?Gr.replaceSelection(`<video width="100%" controls src="/api/attachments/${ms.id}"></video>`):((ys=Qa==null?void 0:Qa.type)==null?void 0:ys.indexOf("pdf"))>-1?Gr.replaceSelection(`<a href="/api/attachments/${ms.id}?type=${Qa.type}&disposition=inline" target="_blank">${Qa.name}</a>`):Sr.includes(Cs)?Gr.replaceSelection(`<a href="/api/attachments/${ms.id}?type=office&disposition=inline" target="_blank">${Qa.name}</a>`):Gr.replaceSelection(`[${Qa.name}](/api/attachments/${ms.id}?type=${ms.content_type})`):(ms==null?void 0:ms.status)===401&&(document.location.href="/user/login")})}catch(Ka){Qn.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Gr=He().fromTextArea(ia.current,{mode:gn,lineNumbers:!cn,lineWrapping:!0,value:Zt,autoCloseTags:!0,autoCloseBrackets:!0});return Gr.on("keyup",function(mi,oo){oo.keyCode===8&&(mi.getValue()==""?Gr.setOption("placeholder",ir):Gr.setOption("placeholder",null))}),Gr.on("keydown",function(mi,oo){if(oo.keyCode===8){var ao=$o(mi);ao&&oo.preventDefault()}}),Mt&&Gr.focus(),Gr.on("paste",Eo),ki&&Gr.on("beforeChange",function(mi,oo){(oo.origin==="paste"||oo.origin==="+input")&&oo.cancel()}),io(Gr),()=>{Gr.off("paste",Eo)}}},[]);const xo=(0,le.useCallback)(()=>{if(zo.current)try{}catch(Eo){console.log(Eo,"---- to set md editor body height")}},[Ir,zo,Ui]);(0,le.useEffect)(()=>{function Eo(){let Gr=new ut.Z(mi=>{for(let oo of mi)(oo.target.offsetHeight>0||oo.target.offsetWidth>0)&&(xo(),Zn.setSize("100%","100%"),Zn.refresh())});return Gr.observe(ia.current.parentElement),Gr}if(Zn){const Gr=Eo();return()=>{var mi,oo;(mi=ia.current)!=null&&mi.parentElement&&Gr.unobserve((oo=ia.current)==null?void 0:oo.parentElement)}}},[Zn,xo]),(0,le.useEffect)(()=>{if(Zn){let Eo=[];for(const[Gr,mi]of Object.entries(qi)){let oo={[Gr]:()=>{$i(mi)}};Eo.push(oo),Zn.addKeyMap(oo)}return()=>{for(let Gr of Eo)Zn.removeKeyMap(Gr)}}},[Zn]),(0,le.useEffect)(()=>{tn!==Ui&&Pr(tn)},[tn]),(0,di.Z)(()=>{if(!Et&&qr>0){let Eo=new Date().getTime(),Gr=window.sessionStorage.getItem(_n);Eo>=qr+Li&&(!Gr||Gr!==Yr)&&(window.sessionStorage.setItem(_n,Yr),Xo(!0))}},Li),(0,le.useEffect)(()=>{ri(ht)},[Zn,ht]),(0,le.useEffect)(()=>{Zn&&Mt&&Zn.focus()},[Zn,Mt]),(0,le.useEffect)(()=>{if(wn&&Zn){let Eo=function(mi){let oo=mi.target;if(Br.current){let ao=oo.scrollTop/oo.scrollHeight;Br.current.scrollTop=Br.current.scrollHeight*ao}};const Gr=Zn.getScrollerElement();return Gr.addEventListener("scroll",Eo),()=>{Gr.removeEventListener("scroll",Eo)}}},[Zn,wn]),(0,le.useEffect)(()=>{if(Zn&&In){let Eo=function(Gr,mi){In(Gr,mi)};return Zn.on("beforeChange",Eo),()=>{Zn.off("beforeChange",Eo)}}},[Zn,In]),(0,le.useEffect)(()=>{if(Zn&&sn){let Eo=function(){sn(Zn.getValue())};return Zn.on("blur",Eo),()=>{Zn.off("blur",Eo)}}},[Zn,sn]);function $o(Eo,Gr){var mi=Eo.getDoc(),oo=mi.getCursor(),ao=mi.getLine(oo.line),Ga=ao.charAt(oo.ch-1),Ca=ao.lastIndexOf("@\u2581@",oo.ch),fa=ao.lastIndexOf("@\u2581\u2581@",oo.ch),Ka=Ca>fa?Ca:fa,Qa=Ca>fa?3:4;if(fr.indexOf(Ga)===-1)return null;if(console.log("change1:",Gr,Eo,ao,oo,Ka,Ca,fa,Ga),Ka>=0&&oo.ch-Ka<5){var Cs=Ka+Qa;return mi.replaceRange("",{line:oo.line,ch:Ka},{line:oo.line,ch:Cs}),{line:oo.line,ch:Cs}}return null}(0,le.useEffect)(()=>{if(Zn){let Eo=function(Gr,mi){const oo=Gr.getValue();Fr(oo),Zr(new Date().getTime()),Gr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Wt&&(Xn?Wt(oo,bo(oo)):Wt(oo))};return Zn.on("change",Eo),()=>{Zn.off("change",Eo)}}},[Zn,Wt]),(0,le.useEffect)(()=>{if(Zn)if(Zt==null)Zn.setValue(""),Fr("");else{const Eo=window.scrollY||window.pageYOffset;Zt!==Zn.getValue()&&(Zn.setValue(Zt),Fr(Zt),Zn.setCursor(ki?1:Zn.lineCount(),0),window.scrollTo(0,Eo))}},[Zn,Zt]);const $i=(0,le.useCallback)(Eo=>{const Gr=Zn.getCursor(),mi=Zn.getSelection();let oo=mi.split(`
`);switch(Eo){case"bold":return Zn.replaceSelection("**"+mi+"**"),mi===""&&Zn.setCursor(Gr.line,Gr.ch+2),Zn.focus();case"italic":return Zn.replaceSelection("*"+mi+"*"),mi===""&&Zn.setCursor(Gr.line,Gr.ch+1),Zn.focus();case"code":return Zn.replaceSelection("`"+mi+"`"),mi===""&&Zn.setCursor(Gr.line,Gr.ch+1),Zn.focus();case"inline-latex":return Cr("inline-latex"),Zn.focus();case"latex":return Zn.replaceSelection("```latex\n"+mi+"\n```"),Zn.setCursor(Gr.line+1,mi.length+1),Zn.focus();case"line-break":return Zn.replaceSelection(`<br/>
`),Zn.focus();case"list-ul":return mi===""?Zn.replaceSelection("- "+mi):Zn.replaceSelection(oo.map(ao=>ao===""?"":`- ${ao}`).join(`
`)),Zn.focus();case"list-ol":return mi===""?Zn.replaceSelection("1. "+mi):Zn.replaceSelection(oo.map((ao,Ga)=>ao===""?"":`${Ga+1}. ${ao}`).join(`
`)),Zn.focus();case"add-null-ch":return mi===""&&Zn.setCursor(Gr.line,Gr.ch),Zn.replaceSelection(ro),Zn.focus();case"add-signal":return mi===""&&Zn.setCursor(Gr.line,Gr.ch),Zn.replaceSelection(Ae),Zn.focus();case"add-multiple":return mi===""&&Zn.setCursor(Gr.line,Gr.ch),Zn.replaceSelection(fr),Zn.focus();case"inster-template-1":return mi===""&&Zn.setCursor(Gr.line,Gr.ch),Zn.replaceSelection(Ei),Zn.focus();case"eraser":return Zn.setValue(""),Zn.focus();case"trigger-watch":return ri(!wn),Zn.focus();case"trigger-full-screen":return Pr(!Ui),Zn.focus();case pi:Cr(pi);return;case Hi:Cr(Hi);return;case zn:Cr(zn);return;case yi:Cr(yi);return;case"maths-latex":Cr("maths-latex");return;case Nn:Cr(Nn);return;case cr:Cr(cr);return;default:throw new Error}},[Zn,wn,Ui]),st=(0,le.useCallback)((Eo,Gr)=>{var mi,oo,ao,Ga,Ca,fa;switch(Cr(""),er){case pi:const{title:Zs,link:Bn}=Eo;return Zn.replaceSelection(`[${Zs}](${Bn})`),Zn.focus();case Hi:const{language:ys,content:oa}=Eo;return Zn.replaceSelection(["```"+ys,oa,"```"].join(`
`)),Zn.focus();case"maths-latex":for(var Ka=atob(Eo),Qa=new Uint8Array(Ka.length),Cs=0;Cs<Ka.length;Cs++)Qa[Cs]=Ka.charCodeAt(Cs);var ms=new Blob([Qa],{type:"image/png"});(0,jt.I)(ms,Ao=>{Ao.id?Zn.replaceSelection(`![,](/api/attachments/${Ao.id}?type=${Ao.content_type})`):(Ao==null?void 0:Ao.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Zn.replaceSelection("`$$"+Eo+"$$`");break;case zn:case yi:case Zi:const{src:hl,alt:Ol}=Eo,as=Gr,yu=(ao=(oo=(mi=as==null?void 0:as.name)==null?void 0:mi.split("."))==null?void 0:oo.pop)==null?void 0:ao.call(oo);return((Ga=as==null?void 0:as.type)==null?void 0:Ga.indexOf("image"))>-1||!(as!=null&&as.type)?as.align||as.width?Zn.replaceSelection(`<p style="text-align:${as.align||"initial"}"><img width="${as.width?as.width+"%":"initial"}" src="${hl}" alt="${Ol||""}" /></p>`):Zn.replaceSelection(`<img width="100%" src="${hl}" alt="${Ol||""}" />`):((Ca=as==null?void 0:as.type)==null?void 0:Ca.indexOf("video"))>-1?Zn.replaceSelection(`<video width="100%" controls src="${hl}"></video>`):((fa=as==null?void 0:as.type)==null?void 0:fa.indexOf("pdf"))>-1?Zn.replaceSelection(`<a href="${hl}?type=${as.type}&disposition=inline" target="_blank">${as.name}</a>`):Sr.includes(yu)?Zn.replaceSelection(`<a href="${hl}?type=office&disposition=inline" target="_blank">${as.name}</a>`):Zn.replaceSelection(`[${as.name}](${hl})`),Zn.focus();case cr:const{row:eu,col:fs,align:Ba}=Eo;let tu=`
`;for(let Ao=0;Ao<eu;Ao++){let Ea=[],ua=[];for(let hr=0;hr<fs;hr++)Ao===1&&ua.push(gi[Ba]),Ea.push(" ");Ao===1&&(tu+=`| ${ua.join(" | ")} |
`),tu+=`| ${Ea.join(fs===1?"":" | ")} |
`}return Zn.replaceSelection(tu+`
`),Zn.focus();default:throw new Error}},[Zn,er]),ra=(0,le.useMemo)(()=>{switch(er){case pi:return le.createElement(vn,{callback:st,onCancel:va});case Hi:return le.createElement(yn.Z,{callback:st,onCancel:va});case zn:return le.createElement(jt.Z,{callback:st,onCancel:va});case Nn:return le.createElement(et,{callback:st,onCancel:va});case cr:return le.createElement($t,{callback:st,onCancel:va});case"maths-latex":return le.createElement(Kn,{showSaveButton:!0,callback:st});case"inline-latex":return le.createElement(dn.Z,{showSaveButton:!0,callback:st});default:return null}},[er]);function va(){Cr("")}(0,le.useEffect)(()=>{if(Nr.current){let Eo=function(Ca){ao=!0,Ga=Ca.pageY},Gr=function(){ao=!1},mi=function(Ca){if(ao){let fa=Ca.pageY-Ga;fa<0&&(fa=0),fa>300&&(fa=300);let Ka=on+fa+"px";Ur(Ka)}},oo=Nr.current,ao=!1,Ga=0;return oo.addEventListener("mousedown",Eo),document.addEventListener("mousemove",mi),document.addEventListener("mouseup",Gr),()=>{oo.removeEventListener("mousedown",Eo),document.removeEventListener("mousemove",mi),document.removeEventListener("mouseup",Gr)}}},[Zn,Nr]),(0,le.useEffect)(()=>{Ur(on)},[on]);const Ma=Fn(Qe),Ps=Fn(Ir),Ha={width:Ma,height:Ps},Ms=(0,le.useMemo)(()=>{if(qr){let Eo=new Date(qr),Gr=Eo.getHours(),mi=Eo.getMinutes(),oo=Eo.getSeconds();return Gr=Gr<10?"0"+Gr:Gr,mi=mi<10?"0"+mi:mi,oo=oo<10?"0"+oo:oo,`${Gr}:${mi}:${oo}`}return 0},[qr]),bo=Eo=>{const Gr=[];if(Xn){let mi=-1;Eo=Eo.replace(/(@▁▁@|@▁@)/g,function(oo,ao,Ga){Gr.push({multiLine:oo!==Ae})})}return Gr};function wo(){window.sessionStorage.removeItem(_n),Xo(!1),Zr(0)}function Jr(){Xo(!1),Zr(0),Zn.setValue(window.sessionStorage.getItem(_n))}(0,le.useEffect)(()=>{Gn[er]&&er!==yi&&er!==Nn&&setTimeout(()=>{const Eo=document.getElementsByClassName("markdown-popup-form")[0],Gr=window.innerWidth/2-Eo.offsetWidth/2,mi=window.innerHeight/2-Eo.offsetHeight/2;Io(Gr),tr(mi)},0)},[er]);const ha=Eo=>{Eo.preventDefault();const Gr=Eo.clientX-Un,mi=Eo.clientY-Go;document.body.onmousemove=oo=>{let ao=oo.clientX-Gr,Ga=oo.clientY-mi;const Ca=document.getElementsByClassName("markdown-popup-form")[0],fa=window.innerWidth-Ca.offsetWidth,Ka=window.innerHeight-Ca.offsetHeight;ao=Math.max(0,Math.min(ao,fa)),Ga=Math.max(0,Math.min(Ga,Ka)),Ia(oo.clientX,oo.clientY,Gr,mi)&&(Io(ao),tr(Ga))},document.body.onmouseup=function(){document.body.onmousemove=null}},Ia=(Eo,Gr,mi,oo)=>{const ao=document.body.clientHeight,Ga=document.body.clientWidth;return Eo<20&&mi>Eo||Eo>Ga-20&&mi<Eo||Gr<20&&oo>Gr||Gr>ao-20&&oo<Gr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return le.createElement(le.Fragment,null,le.createElement("div",{className:"markdown-editor-wrapper",ref:zo},le.createElement("div",{className:`markdown-editor-container ${Ai} ${wn?"on-preview":""} ${cn?"mini":""} ${Ui?"full-screen":""}`,style:Ha},le.createElement(je,{insertTemp:nn,watch:wn,fullScreen:Ui,showNullButton:Pn,showNullProgramButton:Xn,onActionCallback:$i,hidetoolBar:Ci,extraUse:Vr}),le.createElement("div",{className:"markdown-editor-body"},le.createElement("div",{className:"codemirror-container"},le.createElement("textarea",{ref:ia,placeholder:ir})),wn?le.createElement("div",{ref:Br,className:"preview-container"},gn==="stex"&&le.createElement(lt,{value:Yr}),gn!=="stex"&&le.createElement(Ft.Z,{disabledFill:Ni,showProgramFill:Xn,value:Yr})):null))),qn?le.createElement("a",{ref:Nr,className:"editor-resize"}):null,er===yi&&le.createElement(kn,{callback:st,onCancel:va}),er===Nn&&le.createElement(et,{callback:st,onCancel:va}),le.createElement(Xe.Z,null,Gn[er]&&er!==yi&&er!==Nn?le.createElement(en.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Un,top:Go},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:ha},Gn[er]),open:!0,onCancel:va,footer:null,destroyOnClose:!0,width:er===Nn?"1200px":null,height:er===Nn?"80vh":null,className:"markdown-popup-form"},ra):null))}},56030:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Le},I:function(){return je}});var le=pe(78241),Te=pe(8591),He=pe(92832),ut=pe(81327),We=pe(5871),Ue=pe(5112),Me=pe(3113),Ct=pe(49291),Pt=pe(59301),$e=pe(59301),Ft=Object.defineProperty,lt=Object.defineProperties,vt=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,de=(Xe,Ye,dt)=>Ye in Xe?Ft(Xe,Ye,{enumerable:!0,configurable:!0,writable:!0,value:dt}):Xe[Ye]=dt,se=(Xe,Ye)=>{for(var dt in Ye||(Ye={}))te.call(Ye,dt)&&de(Xe,dt,Ye[dt]);if(Oe)for(var dt of Oe(Ye))ee.call(Ye,dt)&&de(Xe,dt,Ye[dt]);return Xe},he=(Xe,Ye)=>lt(Xe,vt(Ye));const{useForm:ve}=le.default,Ee={width:280,marginRight:10},Be={labelCol:{span:5},wrapperCol:{span:19}};var Le=({callback:Xe,onCancel:Ye})=>{const[dt]=ve();let Ze=(0,Pt.useRef)();function Nt(xt){Ze.current.width=dt.getFieldValue("width"),Ze.current.align=dt.getFieldValue("align"),Xe(xt,Ze.current)}function at(xt,Ot){if(xt.status===-1){Te.ZP.error(xt.message);return}dt.setFieldsValue({src:`/api/attachments/${xt.id}`,type:Ot.type})}function kt(xt){let Ot=xt.target.files[0];Ze.current=Ot,je(Ot,at)}return $e.createElement(le.default,he(se({form:dt},Be),{className:"upload-image-panel",onFinish:Nt,style:{width:470,overflow:"hidden"}}),$e.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},$e.createElement("div",{className:"flex-container"},$e.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},$e.createElement(He.default,{style:Ee})),$e.createElement(ze,{onFileChange:kt}))),$e.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},$e.createElement(He.default,{style:{width:264}})),$e.createElement(le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},$e.createElement(ut.Z,null,$e.createElement(le.default.Item,{name:"width",style:{margin:0}},$e.createElement(We.Z,{style:{width:264}})),$e.createElement("span",{className:"ml8"},"%"))),$e.createElement(le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},$e.createElement(Ue.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"}]})),$e.createElement("aside",null,$e.createElement(le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},$e.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),$e.createElement(Me.ZP,{type:"default",onClick:Ye},"\u53D6\u6D88"))))};function ze({onFileChange:Xe}){return $e.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",$e.createElement("input",{type:"file",onChange:Xe}))}function je(Xe,Ye){if(!Xe)throw new String("\u6CA1\u6709\u6587\u4EF6");let dt=new FormData;dt.append("editormd-image-file",Xe),dt.append("file_param_name","editormd-image-file"),dt.append("byxhr","true");var Ze=new window.XMLHttpRequest;Ze.withCredentials=!0,Ze.addEventListener("load",function(Nt){Ye(JSON.parse(Nt.target.responseText),Xe)},!1),Ze.addEventListener("error",function(Nt){console.error(Nt)},!1),Ze.open("POST",`${Ct.KI}/api/attachments.json`),Ze.send(dt)}},19647:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return He}});var le=pe(59301),Te=pe(4676);class He extends le.Component{constructor(We){super(We);const Ue=window.document;this.node=Ue.createElement("div"),Ue.body.appendChild(this.node)}render(){const{children:We}=this.props;return(0,Te.createPortal)(We,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},57800:function(On,mn,pe){"use strict";pe.d(mn,{SV:function(){return ct},ZP:function(){return xe}});var le=pe(59301),Te=pe(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"]},ut={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},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(`
`)}]},Ue={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 Ct=pe(7947),Pt=pe.n(Ct),$e=Object.defineProperty,Ft=Object.defineProperties,lt=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ee=(Lt,et,it)=>et in Lt?$e(Lt,et,{enumerable:!0,configurable:!0,writable:!0,value:it}):Lt[et]=it,de=(Lt,et)=>{for(var it in et||(et={}))Oe.call(et,it)&&ee(Lt,it,et[it]);if(vt)for(var it of vt(et))te.call(et,it)&&ee(Lt,it,et[it]);return Lt},se=(Lt,et)=>Ft(Lt,lt(et)),he=(Lt,et,it)=>new Promise((Bt,Dt)=>{var ft=an=>{try{xn(it.next(an))}catch(Jt){Dt(Jt)}},$t=an=>{try{xn(it.throw(an))}catch(Jt){Dt(Jt)}},xn=an=>an.done?Bt(an.value):Promise.resolve(an.value).then(ft,$t);xn((it=it.apply(Lt,et)).next())});const ve={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},Ee=(Lt,et)=>et.map(it=>({label:it,kind:Lt.languages.CompletionItemKind.Keyword,insertText:it})),Be=Lt=>Object.keys(ve.tables).map(et=>({label:et,kind:Lt.languages.CompletionItemKind.Variable,insertText:et})),Le=(Lt,et)=>{const it=ve.tables[Lt];return it?it.map(Bt=>({label:Bt,kind:et.languages.CompletionItemKind.Field,insertText:Bt})):[]};function ze(Lt,et,it,Bt,Dt){let ft=et.getWordUntilPosition(it),$t={startLineNumber:it.lineNumber,endLineNumber:it.lineNumber,startColumn:ft.startColumn,endColumn:ft.endColumn},xn=Bt.map(an=>({label:an,kind:Lt.languages.CompletionItemKind.Keyword,insertText:an,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:$t}));return Dt.map(an=>{xn.push(se(de({},an),{range:$t}))}),xn}var je=Lt=>{ve.languages.map(Dt=>(Lt.languages.registerDocumentFormattingEditProvider(Dt,{provideDocumentFormattingEdits(ft,$t,xn){return he(this,null,function*(){const an=Pt()(ft.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:ft.getFullModelRange(),text:an}]})}}),Dt));const et=We.quickKey.map(Dt=>({label:Dt.label,kind:Lt.languages.CompletionItemKind.Method,insertText:Dt.content,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),it=Ue.quickKey.map(Dt=>({label:Dt.label,kind:Lt.languages.CompletionItemKind.Method,insertText:Dt.content,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Bt=ut.quickKey.map(Dt=>({label:Dt.label,kind:Lt.languages.CompletionItemKind.Method,insertText:Dt.content,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet}));Lt.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Dt,ft){var $t=Dt.getWordUntilPosition(ft),xn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:$t.startColumn,endColumn:$t.endColumn},an=Dt.getLineContent(ft.lineNumber).substring($t.startColumn-2,$t.endColumn);return{suggestions:[...We.keywords.map(Jt=>({label:Jt,kind:Lt.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn})),...We.quickKey.map(Jt=>({label:Jt.label,kind:Lt.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:an.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn}))]}}}),Lt.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Dt,ft){var $t=Dt.getWordUntilPosition(ft),xn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:$t.startColumn,endColumn:$t.endColumn};return{suggestions:[...He.keywords.map(an=>({label:an,kind:Lt.languages.CompletionItemKind.Function,documentation:an,insertText:an,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn}))]}}}),Lt.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Dt,ft){var $t=Dt.getWordUntilPosition(ft),xn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:$t.startColumn,endColumn:$t.endColumn},an=Dt.getLineContent(ft.lineNumber).substring($t.startColumn-2,$t.endColumn);return{suggestions:[...ut.keywords.map(Jt=>({label:Jt,kind:Lt.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn})),...ut.quickKey.map(Jt=>({label:Jt.label,kind:Lt.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:an.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn}))]}}}),Lt.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Dt,ft){var $t=Dt.getWordUntilPosition(ft),xn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:$t.startColumn,endColumn:$t.endColumn},an=Dt.getLineContent(ft.lineNumber).substring($t.startColumn-2,$t.endColumn);return{suggestions:[...Me.keywords.map(Jt=>({label:Jt,kind:Lt.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn})),...Me.quickKey.map(Jt=>({label:Jt.label,kind:Lt.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:an.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn}))]}}}),Lt.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Dt,ft){var $t=Dt.getWordUntilPosition(ft),xn={startLineNumber:ft.lineNumber,endLineNumber:ft.lineNumber,startColumn:$t.startColumn,endColumn:$t.endColumn},an=Dt.getLineContent(ft.lineNumber).substring($t.startColumn-2,$t.endColumn);return{suggestions:[...Ue.keywords.map(Jt=>({label:Jt,kind:Lt.languages.CompletionItemKind.Function,documentation:Jt,insertText:Jt,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn})),...Ue.quickKey.map(Jt=>({label:Jt.label,kind:Lt.languages.CompletionItemKind.Function,documentation:Jt.content,insertText:an.startsWith("#")?Jt.content.replace(/#/,""):Jt.content,insertTextRules:Lt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:xn}))]}}})};const Xe="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ye=Object.defineProperty,dt=(Lt,et,it)=>et in Lt?Ye(Lt,et,{enumerable:!0,configurable:!0,writable:!0,value:it}):Lt[et]=it,Ze=(Lt,et,it)=>dt(Lt,typeof et!="symbol"?et+"":et,it);const Nt=class mS{constructor(et,it,Bt){this.placeholder=et,this.editor=it,this.monaco=Bt,it.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mS.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};Ze(Nt,"ID","editor.widget.placeholderHint");var kt=Nt,xt=pe(96236),Ot=pe(8591),Gt=pe(6848),At=pe(89392),qe=pe(50484),Ve=pe(56102),_t=Object.defineProperty,vn=Object.defineProperties,yn=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,Wn=(Lt,et,it)=>et in Lt?_t(Lt,et,{enumerable:!0,configurable:!0,writable:!0,value:it}):Lt[et]=it,un=(Lt,et)=>{for(var it in et||(et={}))en.call(et,it)&&Wn(Lt,it,et[it]);if(jt)for(var it of jt(et))ln.call(et,it)&&Wn(Lt,it,et[it]);return Lt},kn=(Lt,et)=>vn(Lt,yn(et)),wt=(Lt,et)=>{var it={};for(var Bt in Lt)en.call(Lt,Bt)&&et.indexOf(Bt)<0&&(it[Bt]=Lt[Bt]);if(Lt!=null&&jt)for(var Bt of jt(Lt))et.indexOf(Bt)<0&&ln.call(Lt,Bt)&&(it[Bt]=Lt[Bt]);return it},jn=(Lt,et,it)=>new Promise((Bt,Dt)=>{var ft=an=>{try{xn(it.next(an))}catch(Jt){Dt(Jt)}},$t=an=>{try{xn(it.throw(an))}catch(Jt){Dt(Jt)}},xn=an=>an.done?Bt(an.value):Promise.resolve(an.value).then(ft,$t);xn((it=it.apply(Lt,et)).next())});function ci(Lt){return/^\d+$/.test(Lt)?`${Lt}px`:Lt}function Ge(){}let be=!1;const Pe={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Ne(Lt=[]){let et=Lt;if(Array.isArray(Lt)){for(let it=0;it<Lt.length;it++){let Bt=Pe[Lt[it]];if(Bt)return Bt}return et[0]}return Pe[et]||et}let Ie=null;var xe=Lt=>{var et=Lt,{width:it="100%",height:Bt="100%",value:Dt,language:ft="javascript",style:$t={},options:xn={},overrideServices:an={},theme:Jt="vs-dark",onEditBlur:Tn,isCopy:Kn=!1,onSave:dn,autoHeight:Qn=!1,forbidCopy:pi=!1,onChange:zn=Ge,editorDidMount:Nn=Ge,onFocus:yi=Ge,onBreakPoint:Zi=Ge,breakPointValue:Hi=[],filename:cr="educoder.txt",errorLine:br,errorContent:gi="",highlightLine:di,openBreakPoint:wi=!1,placeholder:Qi=""}=et,Li=wt(et,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const ro=(0,le.useRef)(),fr=(0,le.useRef)({}),Ae=(0,le.useRef)(),Ei=(0,le.useRef)(),Sr=(0,le.useRef)([]),Fn=(0,le.useRef)(!1),xi=(0,le.useRef)(),zi=(0,le.useRef)(),qi=(0,le.useRef)(!1),[Gn,ti]=(0,le.useState)(!1);function Zt(){let tn;return ro.current&&(tn=new Te.Z(sn=>{for(let In of sn)(In.target.offsetHeight>0||In.target.offsetWidth>0)&&fr.current.instance.layout()}),tn.observe(ro.current)),tn}function Wt(){Ot.ZP.warning({content:decodeURIComponent(Xe),key:"monaco-editor-tip"})}const Qe=()=>{let tn=fr.current.instance;if(Dt!=null&&tn&&Gn){const sn=tn.getModel();sn&&Dt!==sn.getValue()&&(be=!0,sn.setValue(Dt),tn.layout(),be=!1)}};(0,le.useEffect)(()=>{const tn=qe.Z.subscribe("formatDocument",sn=>{var In;let ji=fr.current.instance;(In=ji==null?void 0:ji.getAction)==null||In.call(ji,"editor.action.formatDocument").run()});return window.updateMonacoValue=sn=>{zn(sn)},tn},[]),(0,le.useEffect)(()=>{var tn;let sn=fr.current.instance;Ei.current&&clearTimeout(Ei.current),Ei.current=setTimeout(()=>{Qe()},500),Dt&&(Dt!=null&&Dt.length)&&((tn=sn==null?void 0:sn.updateOptions)==null||tn.call(sn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Dt.split(/\r\n|\r|\n/g).length))+3,5)}))},[Dt,Gn,fr.current]),(0,le.useEffect)(()=>{if(br&&fr.current&&fr.current.instance){let sn=fr.current.instance;sn.changeViewZones(function(In){var ji=document.createElement("div");ji.style.padding="10px 20px",ji.style.width="calc(100% - 20px)",ji.className="my-error-line-wrp",ji.innerHTML=gi,In.addZone({afterLineNumber:br||11,heightInLines:3,domNode:ji})});var tn={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};sn.addOverlayWidget(tn),sn.revealPositionInCenter({lineNumber:20,column:1})}},[br,fr.current,Gn]);const on=(tn="",sn)=>{if(!tn||tn.trim()==="")return!0;const ji=fr.current.instance.getModel().getLineTokens(sn);let Ai=!1;for(let Si=0;Si<2;Si++)ji.getStandardTokenType(Si)===1&&(Ai=!0);return Ai};(0,le.useEffect)(()=>{var tn;const sn=(tn=fr.current)==null?void 0:tn.instance;if(sn&&Gn&&pi){const In=sn.onDidBlurEditorWidget(()=>{qi.current=!1}),ji=sn.onDidFocusEditorText(()=>{qi.current=!0});return()=>{In.dispose(),ji.dispose()}}},[fr.current,Gn,pi]),(0,le.useEffect)(()=>{var tn;if((tn=fr.current)!=null&&tn.instance&&Gn&&wi){let sn=fr.current.instance,In=sn.getModel();if(!In)return;(()=>{var Fr;let wn=[],ri=[];const Ui=In.getAllDecorations();for(let er of Ui)er.options.className==="highlighted-line"&&(wn.push((Fr=er==null?void 0:er.range)==null?void 0:Fr.startLineNumber),ri.push(er==null?void 0:er.id));if(di===wn[0])return;In.deltaDecorations(ri,[]);const Pr=In.getLineCount();di&&di<=Pr&&(sn.deltaDecorations([],[{range:new Ie.Range(di,1,di,In.getLineMaxColumn(di)),options:{isWholeLine:!0,className:"highlighted-line"}}]),sn.revealLineInCenter(di))})();const Ai=(Fr=!1)=>{var wn;let ri=[],Ui=[];const Pr=In.getAllDecorations();for(let er of Pr)er.options.linesDecorationsClassName==="breakpoints-select"&&(ri.push((wn=er==null?void 0:er.range)==null?void 0:wn.startLineNumber),Ui.push(er==null?void 0:er.id));if(Fr)return{lines:ri,ids:Ui};Zi(ri)},Si=Fr=>jn(void 0,null,function*(){let wn={range:new Ie.Range(Fr,1,Fr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield In.deltaDecorations([],[wn]),Ai()}),ki=Fr=>jn(void 0,null,function*(){let wn=[];const ri=sn.getLineDecorations(Fr);for(let Ui of ri)Ui.options.linesDecorationsClassName==="breakpoints-select"&&wn.push(Ui.id);yield In.deltaDecorations(wn,[]),Ai()}),Ni=Fr=>{let wn=sn.getLineDecorations(Fr);for(let ri of wn)if(ri.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,At.isEqual)(Hi,Ai(!0).lines)){In.deltaDecorations(Ai(!0).ids,[]);const Fr=Hi.map(wn=>({range:new Ie.Range(wn,1,wn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));In.deltaDecorations([],Fr)}const ir=sn.onDidChangeModelContent(Fr=>{let wn=sn.getPosition();if(wn){let ri=wn.lineNumber;clearTimeout(zi.current),zi.current=setTimeout(()=>{on(In.getLineContent(ri),ri)?ki(ri):Ni(ri)?(ki(ri),Si(ri)):Ai()},100)}}),zr=sn.onMouseDown(Fr=>{var wn,ri,Ui;if(Fr.target.detail&&((Ui=(ri=(wn=Fr.target)==null?void 0:wn.element)==null?void 0:ri.className)!=null&&Ui.includes("line-numbers"))){let Pr=Fr.target.position.lineNumber;if(on(In.getLineContent(Pr),Pr))return;Ni(Pr)?ki(Pr):Si(Pr)}}),Vr=Fr=>{let wn={range:new Ie.Range(Fr,1,Fr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Sr.current=sn.deltaDecorations(Sr.current,[wn])},Zn=()=>{Sr.current=sn.deltaDecorations(Sr.current,[])},io=sn.onMouseMove(Fr=>{var wn,ri,Ui;if(Zn(),Fr.target.detail&&((Ui=(ri=(wn=Fr.target)==null?void 0:wn.element)==null?void 0:ri.className)!=null&&Ui.includes("line-numbers"))){let Pr=Fr.target.position.lineNumber;if(on(In.getLineContent(Pr),Pr))return;Vr(Pr)}}),Yr=sn.onMouseLeave(()=>{Zn()});return()=>{ir.dispose(),zr.dispose(),io.dispose(),Yr.dispose()}}},[fr.current,Gn,Hi,di,wi,ft]),(0,le.useEffect)(()=>{var tn;(tn=fr.current)!=null&&tn.instance&&wi&&fr.current.instance.setPosition({lineNumber:0,column:0})},[di]);function cn(){let tn=fr.current.instance;if(tn){const sn=tn.getSelection(),In=fr.current.pastePos||{},ji=new Ie.Range(In.startLineNumber||sn.endLineNumber,In.startColumn||sn.endColumn,In.endLineNumber||sn.endLineNumber,In.endColumn||sn.endColumn);setTimeout(()=>{tn.executeEdits("",[{range:ji,text:""}])},300)}}function Mt(tn){(window.navigator.platform.match("Mac")?tn.metaKey:tn.ctrlKey)&&tn.keyCode==83&&(tn.preventDefault(),dn())}const ht=()=>{if(Qn&&fr.current.instance){const tn=fr.current.instance.getContentHeight();Xn(tn<Bt?Bt:tn)}else Xn(Bt)};function nn(tn){var sn=document.createEvent("MouseEvents");sn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),tn.dispatchEvent(sn)}const gn=tn=>{if(!qi.current)return;const{keyCode:sn,ctrlKey:In,metaKey:ji,target:Ai,type:Si}=tn;return(Si==="paste"||(sn===67||sn===86)&&(ji||In))&&Ai.nodeName==="TEXTAREA"&&(Wt(),tn.preventDefault()),!1};function _n(tn,sn){var In=window.URL||window.webkitURL||window,ji=new Blob([sn]),Ai=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ai.href=In.createObjectURL(ji),Ai.download=tn,nn(Ai)}(0,le.useEffect)(()=>{ht()},[ht]),(0,le.useEffect)(()=>{ro.current&&!Gn&&Promise.all([pe.e(8909),pe.e(6894)]).then(pe.bind(pe,71448)).then(tn=>{try{Ie=tn,fr.current.instance=Ie.editor.create(ro.current,{value:Dt,language:Ne(ft),theme:Jt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},an);const sn=fr.current.instance;let Ai=[...xt.BH._menuItems].find(ir=>ir[0]._debugName=="EditorContext")[1],Si=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],ki=(ir,zr)=>{var Vr,Zn;let io=ir._first;do zr.includes((Zn=(Vr=io.element)==null?void 0:Vr.command)==null?void 0:Zn.id)&&ir._remove(io);while(io=io.next)};if(Nn(sn,Ie),setTimeout(()=>{ht(),fr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{_n(cr||"educoder.txt",sn.getValue())}})},500),fr.current.subscription=sn.onDidChangeModelContent(ir=>{Fn.current?clearTimeout(xi.current):(ht(),zn(sn.getValue(),ir)),xi.current=setTimeout(()=>{Fn.current=!1},500)}),window.Monaco||je(Ie,Ne(ft)),pi&&(ki(Ai,Si),ro.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",gn),window.removeEventListener("paste",gn),window.addEventListener("keydown",gn),window.addEventListener("paste",gn)),window.Monaco=Ie,Tn&&sn.onDidBlurEditorWidget(()=>{Tn(sn.getValue())}),yi&&sn.onDidFocusEditorText(()=>{yi(sn.getValue())}),pi)try{sn.onDidPaste(ir=>{const zr=sn.getSelection(),Vr=fr.current.pastePos||{},Zn=new Ie.Range(Vr.startLineNumber||zr.endLineNumber,Vr.startColumn||zr.endColumn,Vr.endLineNumber||zr.endLineNumber,Vr.endColumn||zr.endColumn);sn.executeEdits("",[{range:ir.range,text:""}])})}catch(ir){}let Ni=Zt();return Qi&&typeof Qi=="string"&&new kt(Qi,sn,Ie),ti(!0),()=>{const ir=fr.current.instance;ir.dispose();const zr=ir.getModel();zr&&zr.dispose(),fr.current.subscription&&fr.current.subscription.dispose(),Ni.unobserve(ro.current)}}catch(sn){}})},[]),(0,le.useEffect)(()=>{if(fr.current.instance&&Gn)return document.addEventListener("keydown",Mt,!1),()=>{document.removeEventListener("keydown",Mt)}},[dn,Gn]),(0,le.useEffect)(()=>{let tn=fr.current.instance;if(tn&&Gn){let sn=Ne(ft);Ie.editor.setModelLanguage(tn.getModel(),sn)}},[ft,Gn]),(0,le.useEffect)(()=>{fr.current.instance&&Gn&&Ie.editor.setTheme(Jt)},[Jt,Gn]),(0,le.useEffect)(()=>{let tn=fr.current.instance;Ae.current=xn,tn&&Gn&&(tn.updateOptions(un({},xn)),setTimeout(()=>{tn.getModel().updateOptions(un({},xn))},200))},[JSON.stringify(xn),Gn]),(0,le.useEffect)(()=>{let tn=fr.current.instance;tn&&Gn&&tn.layout()},[it,Bt,Gn]);const[qn,Et]=(0,le.useState)(ci(it)),[Pn,Xn]=(0,le.useState)(ci(Bt)),Ci=kn(un({},$t),{width:qn,height:Pn,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:ro,style:Ci},Kn&&le.createElement(Ve.CopyToClipboard,{text:Dt,onCopy:()=>Ot.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(Gt.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 ct({width:Lt="100%",height:et="100%",original:it,modified:Bt,language:Dt,options:ft={}}){const $t=(0,le.useRef)(),[xn,an]=(0,le.useState)(null);function Jt(Qn){let pi;return $t.current&&(pi=new Te.Z(zn=>{for(let Nn of zn)(Nn.target.offsetHeight>0||Nn.target.offsetWidth>0)&&Qn.layout()}),pi.observe($t.current)),pi}(0,le.useEffect)(()=>($t.current&&Promise.all([pe.e(8909),pe.e(9404)]).then(pe.bind(pe,2550)).then(Qn=>{Ie=Qn;const pi=Ie.editor.createDiffEditor($t.current,kn(un({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},ft),{wordWrap:!0}));an(pi);let zn=Jt(pi);return()=>{pi.dispose();const Nn=pi.getModel();Nn&&Nn.dispose(),zn.unobserve($t.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{xn&&xn.setModel({original:Ie.editor.createModel(it,Dt),modified:Ie.editor.createModel(Bt,Dt)})},[it,Bt,Dt,xn]);const Tn=ci(Lt),Kn=ci(et),dn={width:Tn,height:Kn};return le.createElement("div",{className:"my-diff-editor",ref:$t,style:dn})}},15965:function(On,mn,pe){"use strict";pe.d(mn,{jL:function(){return We},w9:function(){return en},QD:function(){return zn},cQ:function(){return Ve},op:function(){return Jt},O5:function(){return qi},_b:function(){return br},t7:function(){return se},Gi:function(){return jn},YG:function(){return kn},qp:function(){return Ft},vr:function(){return Zi},qE:function(){return dn},Je:function(){return Ee},wb:function(){return xt},cq:function(){return Ie},tp:function(){return Oe}});var le=pe(59301),Te={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},He="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",We=({dataSource:Gn=[],img:ti,imgWidth:Zt=346,title:Wt,sunTitle:Qe,bannerExtraContent:on})=>le.createElement("div",{className:Te.banner},le.createElement("div",{className:Te.content},le.createElement("aside",null,le.createElement("p",null,le.createElement("b",null,Wt),le.createElement("span",null,Qe)),Gn.length>0&&le.createElement("div",{className:Te.btns},Gn.map((cn,Mt)=>le.createElement("div",{key:Mt,onClick:cn.click},cn.name,cn.sign?le.createElement("img",{src:He,width:39}):null))),on),ti&&le.createElement("img",{style:{marginTop:33,marginRight:38},src:ti,width:Zt}))),Ue={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=pe(92310),Ct=pe.n(Me),Pt=pe(89392),Ft=({dataSource:Gn=[],value:ti,onChange:Zt,onTitleChange:Wt,className:Qe,title:on,titleWidth:cn=41,style:Mt={},fontColor:ht="#6A7283",showCount:nn})=>{const[gn,_n]=(0,le.useState)(0),[qn,Et]=(0,le.useState)(!1),Pn=(0,le.useRef)(null),Xn=(0,le.useRef)(null);return(0,le.useEffect)(()=>{var Ci;Gn.length!==0&&(((Ci=Pn==null?void 0:Pn.current)==null?void 0:Ci.clientHeight)>97?_n(1):_n(0)),Gn.length===0&&_n(0),Et(!1)},[Gn]),le.createElement("div",{className:Ct()(Ue.row,Qe),style:Mt},le.createElement("div",{onClick:(0,Pt.throttle)(()=>Wt==null?void 0:Wt(),2e3),style:{width:cn,marginTop:qn?12:4},className:`${Ue.title} ${Wt?"current":""}`},on),le.createElement("div",{className:qn?`${Ue.tagsWrap} ${Ue.tagsBorderWrap}`:Ue.tagsWrap},le.createElement("div",{className:Ue.bar,ref:Xn,style:gn>0?{height:gn===1?97:"auto",overflow:gn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},le.createElement("div",{className:Ue.tag,ref:Pn},Gn==null?void 0:Gn.map(Ci=>le.createElement("span",{onClick:()=>Zt(Ci.id),key:Ci.id,style:{color:ht},className:ti===Ci.id?Ue.active:""},le.createElement("span",{title:Ci.name,className:Ue.name},Ci.name),!!nn&&le.createElement("span",{className:Ue.num},Ci.count))))),!!gn&&le.createElement(le.Fragment,null,gn===1?le.createElement("div",{onClick:()=>{var Ci;_n(2),((Ci=Pn==null?void 0:Pn.current)==null?void 0:Ci.clientHeight)>245?Et(!0):Et(!1)},className:Ue.action},"\u5C55\u5F00",le.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):le.createElement("div",{onClick:()=>{Xn.current.scrollTop=0,_n(1),Et(!1)},className:Ue.action},"\u6536\u8D77",le.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},lt={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},Oe=({dataSource:Gn=[],value:ti,onChange:Zt,className:Wt,style:Qe={}})=>le.createElement("div",{style:Qe,className:Ct()(lt.tabs,Wt)},Gn.map(on=>le.createElement("span",{onClick:()=>Zt(on.id),className:ti===on.id?lt.active:"",key:on.id},on.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=pe(92832),se=({dataSource:Gn=[],value:ti="",onChange:Zt,onInputChange:Wt=()=>{},className:Qe,style:on={},placeholder:cn,allowClear:Mt=!1})=>{var ht;const[nn,gn]=(0,le.useState)(""),[_n,qn]=(0,le.useState)("");(0,le.useEffect)(()=>{var Xn;let Ci=ti;(Xn=JSON.stringify(ti))!=null&&Xn.includes("{")&&(gn(ti.id),Ci=ti.value||"");try{qn(decodeURIComponent(Ci||""))}catch(tn){qn(decodeURIComponent(Ci||""))}},[ti]);const Et=()=>{Zt(encodeURIComponent(_n),nn||null)},Pn=Xn=>{Xn!==nn&&(gn(Xn),Zt(encodeURIComponent(_n),Xn))};return le.createElement("div",{className:Ct()(te.input,Qe),style:on},!!Gn.length&&le.createElement("div",{className:te.dropdown},le.createElement("div",{className:te.text},(ht=Gn.find(Xn=>Xn.id===nn))==null?void 0:ht.name,le.createElement("i",{className:"iconfont icon-zhankai4"}),le.createElement("b",{className:te.b1}),le.createElement("b",{className:te.b2})),le.createElement("div",{className:te.menu},Gn.map((Xn,Ci)=>le.createElement("div",{key:Ci,onClick:()=>Pn(Xn.id)},Xn.name)))),le.createElement(ee.default,{onPressEnter:Et,value:_n,onChange:Xn=>{qn(Xn.target.value),Wt(encodeURIComponent(Xn.target.value),nn||null)},bordered:!1,placeholder:cn}),le.createElement("i",{onClick:Et,className:"iconfont icon-sousuo9 font14 pl10 current"}))},he={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},Ee=({value:Gn,onChange:ti,className:Zt,total:Wt,pageSize:Qe,style:on={}})=>{const cn=Gn<2,Mt=Gn>=Math.ceil(Wt/Qe);return Wt<=Qe?le.createElement(le.Fragment,null):le.createElement("div",{className:Ct()(he.quickPager,Zt),style:on},le.createElement("div",{onClick:()=>{cn||ti(Gn-1,"prev")},className:cn?he.disabled:""},"\u4E0A\u4E00\u9875"),le.createElement("div",{onClick:()=>{Mt||ti(Gn+1,"next")},className:Mt?he.disabled:""},"\u4E0B\u4E00\u9875"))},Be={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},Le=pe(71418),ze=pe(6848),je=pe(13570),Xe=pe(38446),Ye=pe(88230),dt=pe(96908),Ze=pe(57177),Nt=pe(81378),at=pe(57816),xt=({className:Gn,dataSource:ti=[],col:Zt=4,right:Wt,bottom:Qe=23,precision:on=0,wrapWidth:cn=1200,trackEventItems:Mt,loading:ht})=>{const nn=Math.floor((cn-(Zt-1)*Wt)/Zt);return le.createElement(Le.Z,{spinning:ht},le.createElement("div",{className:Ct()(Be.list,Gn)},!!ti.length&&ti.map((gn,_n)=>{const{name:qn,id:Et,identifier:Pn,power:Xn,cover_image_id:Ci,pic:tn}=gn;return le.createElement("div",{className:Be.wrap,key:Et,style:{width:nn,marginRight:(1+_n)%Zt===0?0:Wt+on,marginBottom:Qe}},le.createElement("a",{target:"_blank",href:`/shixuns/${Pn}/challenges`,className:Be.li,onClick:sn=>{sn.preventDefault(),Mt&&(0,Ye.L9)([Mt]),Xn&&(0,Ye.xg)(`/shixuns/${Pn}/challenges`)}},le.createElement("div",{className:Be.img},le.createElement("img",{className:Be.cover,src:`${tn}`}),gn.is_jupyter&&le.createElement("img",{className:Be.sign,src:dt}),gn.is_jupyter_lab&&le.createElement("img",{className:Be.sign,src:Ze}),gn.is_unity_3d&&le.createElement("img",{className:Be.sign,src:Nt})),le.createElement("div",{className:Be.name},le.createElement(ze.Z,{title:qn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},le.createElement("span",{className:Be.e},qn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),le.createElement("div",{className:Be.tags},le.createElement(ze.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},le.createElement("span",null,le.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),le.createElement("span",null,gn.challenges_count))),!!gn.myshixuns_count&&le.createElement(ze.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,gn.myshixuns_count))),le.createElement(ze.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},le.createElement("span",null,le.createElement("span",null,gn.level))),le.createElement("div",{className:Be.rate},le.createElement(je.Z,{allowHalf:!0,disabled:!0,defaultValue:gn.score_info}),le.createElement("span",null,"\xA0",gn.score_info?`${gn.score_info}\u5206`:"5\u5206")))),!Xn&&le.createElement("div",{className:Be.lockWrap},le.createElement("img",{src:`${Xe.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")))}),!ti.length&&le.createElement(at.Z,null)))},Ot={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"},Gt=pe(73898),At=pe(59301),Ve=({className:Gn,dataSource:ti=[],col:Zt=4,right:Wt,bottom:Qe=23,precision:on=0,wrapWidth:cn=1200,trackEventItems:Mt,loading:ht,onRemove:nn=()=>{},isCurrent:gn=!0,showAlias:_n=!1})=>{const qn=Math.floor((cn-(Zt-1)*Wt)/Zt),Et=[{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 At.createElement(Le.Z,{spinning:ht},At.createElement("div",{className:Ct()(Ot.list,Gn)},!!(ti!=null&&ti.length)&&(ti==null?void 0:ti.map((Pn,Xn)=>{var Ci;const{name:tn,id:sn,identifier:In,featured:ji,school_name:Ai,image_url:Si,excellent:ki,is_plan:Ni}=Pn;return At.createElement("div",{key:sn,className:Ot.wrap,style:{width:qn,marginRight:(1+Xn)%Zt===0?0:Wt+on,marginBottom:Qe}},At.createElement("a",{className:Ot.li,onClick:ir=>{ir.preventDefault(),ir.stopPropagation(),Mt&&(0,Ye.L9)([Mt]),(0,Ye.xg)(`/paths/${In}`)}},At.createElement("div",{className:Ot.img},At.createElement("img",{className:Ot.cover,src:`${Si}`}),gn&&(0,Gt.bg)()&&(Pn==null?void 0:Pn.studying)&&At.createElement("div",{className:`${Ot.movebq} user-path-items`,onClick:ir=>{ir.stopPropagation(),nn(Pn)}},At.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),At.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ci=Pn==null?void 0:Pn.subject_tags)==null?void 0:Ci.map((ir,zr)=>{var Vr,Zn;if(zr===0){const Yr=(Vr=Et.find(Fr=>Fr.name==ir))==null?void 0:Vr.swimg;return At.createElement("img",{className:Ot.sign,src:Yr,style:{left:"-4px"}})}const io=(Zn=Et.find(Yr=>Yr.name==ir))==null?void 0:Zn.ptimg;return At.createElement("img",{className:Ot.sign,src:io,style:{left:`${48+52*(zr-1)+2*zr}px`}})}),At.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Pn==null?void 0:Pn.excellent)&&At.createElement("div",{className:Ot.bq},"\u5F00\u653E\u8BFE\u7A0B"))),At.createElement("div",{className:Ot.name},At.createElement(ze.Z,{title:_n&&(Pn!=null&&Pn.excellent_alias_name)?At.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${tn}`,At.createElement("br",null),At.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Pn==null?void 0:Pn.excellent_alias_name}`)):tn},At.createElement("span",{className:Ot.e},_n&&(Pn==null?void 0:Pn.excellent_alias_name)||tn))),At.createElement(ze.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Ai}`},At.createElement("div",{className:Ot.unit},At.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Ai)),At.createElement("div",{className:Ot.tags},At.createElement("div",null,At.createElement(ze.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},At.createElement("span",null,At.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),At.createElement("span",null,Pn.stages_count))),At.createElement(ze.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},At.createElement("span",null,At.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),At.createElement("span",null,Pn.members_count)))))))})),!ti.length&&At.createElement(at.Z,null)))},_t={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"},vn="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",yn=pe(59301),en=({className:Gn,dataSource:ti=[],col:Zt=4,right:Wt,bottom:Qe=23,precision:on=0,wrapWidth:cn=1200,trackEventItems:Mt,loading:ht,handleVery:nn=()=>{}})=>{const gn=Math.floor((cn-(Zt-1)*Wt)/Zt);return yn.createElement(Le.Z,{spinning:ht},yn.createElement("div",{className:Ct()(_t.list,Gn)},!!ti.length&&ti.map((_n,qn)=>{const{subject_identifier:Et,id:Pn,identifier:Xn,power:Ci}=_n,tn=_n.is_public!=0&&_n.is_public;return yn.createElement("div",{className:_t.wrap,key:Pn,style:{width:gn,marginRight:(1+qn)%Zt===0?0:Wt+on,marginBottom:Qe}},yn.createElement("a",{className:_t.li,onClick:sn=>{sn.preventDefault(),nn(_n==null?void 0:_n.first_category_url)}},yn.createElement("div",{className:_t.top},yn.createElement(ze.Z,{title:_n.name},yn.createElement("div",{className:_t.name},_n.name)),yn.createElement("img",{className:_t.img,src:Xe.Z.IMG_SERVER+"/images/"+_n.avatar_url}),yn.createElement("div",{className:_t.text,title:_n.creator},_n.creator),Et&&yn.createElement("div",{className:_t.btns},yn.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),yn.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),tn&&yn.createElement("div",{className:_t.sign},"\u516C\u5F00")),yn.createElement("div",{className:_t.bottom},_n.visits>0&&yn.createElement(ze.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},yn.createElement("span",null,yn.createElement("i",{className:"iconfont icon-liulanyan"}),yn.createElement("span",null,_n.visits))),_n.course_members_count>0&&yn.createElement(ze.Z,{title:"\u6210\u5458",placement:"bottom"},yn.createElement("span",null,yn.createElement("i",{className:"iconfont icon-chengyuan"}),_n.course_members_count)),_n.tasks_count>0&&yn.createElement(ze.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},yn.createElement("span",null,yn.createElement("i",{className:"iconfont icon-zuoye"}),_n.tasks_count)),_n.is_end?yn.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):yn.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!_n.is_accessible&&yn.createElement("div",{className:_t.lockWrap},yn.createElement("img",{src:`${Xe.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),yn.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!ti.length&&yn.createElement(at.Z,null)))},ln={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Wn=pe(24459),kn=({dataSource:Gn=[],value:ti,onChange:Zt,className:Wt,style:Qe={},tabBarExtraContent:on})=>le.createElement("div",{className:Ct()(ln.tabs,Wt),style:Qe},le.createElement("div",{className:ln.tabsWrap},Gn.map((cn,Mt)=>!(cn!=null&&cn.hide)&&le.createElement("aside",{className:ln.tab,onClick:()=>{Zt(cn.id),cn.link&&Wn.history.push(cn.link)},key:Mt},le.createElement("div",{className:ti===cn.id?ln.active:""},cn.name),(cn==null?void 0:cn.resetCount)==null&&(cn==null?void 0:cn.total)!==void 0&&le.createElement("span",null,"\uFF08",cn==null?void 0:cn.total,"\uFF09"),(cn==null?void 0:cn.resetCount)!==void 0&&(cn==null?void 0:cn.total)!==void 0&&le.createElement(ze.Z,{title:(cn==null?void 0:cn.tip)!=null?cn==null?void 0:cn.tip:""},le.createElement("span",{style:{color:"#9096A3"}},"\uFF08",le.createElement("span",{style:{color:"#000"}},cn==null?void 0:cn.resetCount),"/",le.createElement("span",null,cn==null?void 0:cn.total),"\uFF09"))))),le.createElement("div",{className:ln.tabBar},on)),jn=({className:Gn,style:ti={},children:Zt})=>le.createElement("div",{className:Ct()(Gn),style:ti},Zt),ci={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},Ge=pe(38854),be=pe(20834);const Pe=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var Ie=({sortValue:Gn,dropValue:ti,className:Zt,onSort:Wt,onDrop:Qe,dataSource:on=Pe})=>{var cn;return le.createElement("div",{className:Ct()(ci.orderWrap,Zt)},le.createElement(Ge.Z,{dropdownRender:()=>le.createElement(be.default,null,on.map((Mt,ht)=>le.createElement(be.default.Item,{key:ht,onClick:()=>Qe(Mt.id)},Mt.name)))},le.createElement("span",{className:ci.orderTextWrap},(cn=on.find(Mt=>ti===Mt.id))==null?void 0:cn.name)),le.createElement("span",{className:ci.orderIconWrap},le.createElement("span",{className:ci.orderAsc},le.createElement("i",{className:Gn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${ci.cursorPointer} ${ci.active}`:`iconfont icon-sanjiaoxing-up font12 ${ci.cursorPointer}`,onClick:()=>Wt(Gn==="asc"?"desc":"asc")})),le.createElement("span",{className:ci.orderDesc},le.createElement("i",{className:Gn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${ci.cursorPointer} ${ci.active}`:`iconfont icon-sanjiaoxing-down font12 ${ci.cursorPointer}`,onClick:()=>Wt(Gn==="asc"?"desc":"asc")}))))},xe={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},ct=pe(3113),Lt=Object.defineProperty,et=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Dt=(Gn,ti,Zt)=>ti in Gn?Lt(Gn,ti,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Gn[ti]=Zt,ft=(Gn,ti)=>{for(var Zt in ti||(ti={}))it.call(ti,Zt)&&Dt(Gn,Zt,ti[Zt]);if(et)for(var Zt of et(ti))Bt.call(ti,Zt)&&Dt(Gn,Zt,ti[Zt]);return Gn},$t=(Gn,ti)=>{var Zt={};for(var Wt in Gn)it.call(Gn,Wt)&&ti.indexOf(Wt)<0&&(Zt[Wt]=Gn[Wt]);if(Gn!=null&&et)for(var Wt of et(Gn))ti.indexOf(Wt)<0&&Bt.call(Gn,Wt)&&(Zt[Wt]=Gn[Wt]);return Zt},xn=(Gn,ti,Zt)=>new Promise((Wt,Qe)=>{var on=ht=>{try{Mt(Zt.next(ht))}catch(nn){Qe(nn)}},cn=ht=>{try{Mt(Zt.throw(ht))}catch(nn){Qe(nn)}},Mt=ht=>ht.done?Wt(ht.value):Promise.resolve(ht.value).then(on,cn);Mt((Zt=Zt.apply(Gn,ti)).next())}),Jt=Gn=>{var ti=Gn,{className:Zt,style:Wt,children:Qe,loading:on=!1,openLoading:cn,onClick:Mt=()=>{},size:ht="middle",shape:nn="round"}=ti,gn=$t(ti,["className","style","children","loading","openLoading","onClick","size","shape"]);const[_n,qn]=(0,le.useState)(!1);return le.createElement(ct.ZP,ft({onClick:(0,Pt.throttle)(Et=>xn(void 0,null,function*(){cn&&qn(!0);try{yield Mt(Et)}catch(Pn){console.log("error",Pn)}cn&&qn(!1)}),2e3,{leading:!0,trailing:!1}),className:Ct()(xe.btn,xe[`${ht}-${nn}`],Zt),style:Wt,size:ht,shape:nn,loading:_n||on},gn),Qe)},Tn={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"},dn=({className:Gn,style:ti,children:Zt=null,onClick:Wt,title:Qe})=>le.createElement("div",{className:Ct()(Tn.head,Gn),style:ti},le.createElement("span",{className:"primary-hover",onClick:Wt},le.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),le.createElement("b",{title:Qe},Qe),le.createElement("div",{className:Tn.node},Zt)),Qn={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"},zn=({confirmShow:Gn=!0,confirmTitle:ti,confirmClick:Zt,cancelShow:Wt=!0,cancelTitle:Qe,cancelClick:on,className:cn,style:Mt,confirmLoading:ht=!1})=>le.createElement("div",{className:Ct()(Qn.btns,cn),style:Mt},Gn&&le.createElement(ct.ZP,{loading:ht,onClick:Zt,type:"primary",className:Qn.confirm},ti),Wt&&le.createElement(ct.ZP,{onClick:on,className:Qn.cancel},Qe)),Nn={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:Gn,style:ti={},LeftContent:Zt,children:Wt,RightContent:Qe})=>le.createElement("div",{className:Ct()(Nn.fixedBottom,Gn),style:ti},le.createElement("div",{className:Nn.wrap},le.createElement("div",{className:Nn.left},Zt),le.createElement("div",{className:Nn.center},Wt),le.createElement("div",{className:Nn.right},Qe))),Hi={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"},br=({className:Gn,style:ti={},dataSource:Zt=[]})=>le.createElement("div",{className:Ct()(Hi.crumbs,Gn),style:ti},Zt.map((Wt,Qe)=>Qe<Zt.length-1?le.createElement(le.Fragment,{key:Qe},Wt.path||Wt.onClick?le.createElement("span",{className:Hi.hover,onClick:Wt!=null&&Wt.onClick?Wt.onClick:()=>Wn.history.push(Wt.path)},Wt.name):le.createElement("span",null,Wt.name),le.createElement("span",null,"\xA0",">","\xA0")):le.createElement("span",{key:Qe,style:{color:"#5F6368"}},Wt.name))),gi=pe(31797),di=Object.defineProperty,wi=Object.defineProperties,Qi=Object.getOwnPropertyDescriptors,Li=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,fr=Object.prototype.propertyIsEnumerable,Ae=(Gn,ti,Zt)=>ti in Gn?di(Gn,ti,{enumerable:!0,configurable:!0,writable:!0,value:Zt}):Gn[ti]=Zt,Ei=(Gn,ti)=>{for(var Zt in ti||(ti={}))ro.call(ti,Zt)&&Ae(Gn,Zt,ti[Zt]);if(Li)for(var Zt of Li(ti))fr.call(ti,Zt)&&Ae(Gn,Zt,ti[Zt]);return Gn},Sr=(Gn,ti)=>wi(Gn,Qi(ti)),Fn=(Gn,ti)=>{var Zt={};for(var Wt in Gn)ro.call(Gn,Wt)&&ti.indexOf(Wt)<0&&(Zt[Wt]=Gn[Wt]);if(Gn!=null&&Li)for(var Wt of Li(Gn))ti.indexOf(Wt)<0&&fr.call(Gn,Wt)&&(Zt[Wt]=Gn[Wt]);return Zt};const{Countdown:xi}=gi.default;var qi=Gn=>{var ti=Gn,{onChange:Zt}=ti,Wt=Fn(ti,["onChange"]);const[Qe,on]=(0,le.useState)(null);(0,le.useEffect)(()=>{typeof Qe=="number"&&Qe>=0&&Zt(Qe)},[Qe]);const cn=Mt=>{const ht=Math.floor(Mt/1e3);on(ht)};return le.createElement(xi,Sr(Ei({},Wt),{onChange:cn}))}},50505:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Te}});var le=pe(59301);function Te(He,ut){const We=(0,le.useRef)();(0,le.useEffect)(()=>{We.current=He}),(0,le.useEffect)(()=>{function Ue(){We.current()}if(ut!==null){let Me=setInterval(Ue,ut);return()=>clearInterval(Me)}},[ut])}},76826:function(On,mn,pe){"use strict";pe.d(mn,{h:function(){return le}});var le=(Te=>(Te[Te.NOMATCH=-1]="NOMATCH",Te[Te.OK=0]="OK",Te[Te.TIMEOUT=2]="TIMEOUT",Te[Te.PODFAILURE=3]="PODFAILURE",Te[Te.COMPILEFAILURE=4]="COMPILEFAILURE",Te[Te.EXECUTEFAILURE=5]="EXECUTEFAILURE",Te[Te.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Te))(le||{})},5247:function(On,mn,pe){"use strict";pe.d(mn,{H7:function(){return te},MK:function(){return Oe},MU:function(){return $e},X6:function(){return lt},bM:function(){return Pt},fi:function(){return ee},fu:function(){return Ct},n4:function(){return de},rX:function(){return vt},vl:function(){return se},zO:function(){return Ft}});var le=pe(7660),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ue=(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={}))ut.call(ve,Ee)&&Ue(he,Ee,ve[Ee]);if(He)for(var Ee of He(ve))We.call(ve,Ee)&&Ue(he,Ee,ve[Ee]);return he};function Ct(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 $e(he,ve){return(0,le.v_)(`myproblems/${he}/code_debug.json`,ve)}function Ft(he,ve){return ve.language&&(ve.language=encodeURIComponent(ve.language)),(0,le.U2)(`myproblems/${he}/submit_records.json`,ve)}function lt(he){return(0,le.U2)("myproblems/record_detail.json",{id:he})}function vt(he,ve){return(0,le.U2)(`myproblems/${he}/result.json`,{mode:ve})}function Oe(he,ve){return(0,le.v_)(`myproblems/${he}/add_notes.json`,ve)}function te(he,ve){return(0,le.v_)(`myproblems/${he}/restore_initial_code.json`,ve)}function ee(he){return(0,le.v_)(`myproblems/${he}/sync_code.json`)}function de(he,ve){return(0,le.v_)(`myproblems/${he}/update_code.json`,ve)}function se(he,ve){return(0,le.v_)(`discusses/${he}/plus.json`,ve)}},78978:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return xu}});var le=pe(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=pe(78241),ut=pe(6848),We=pe(3113),Ue=pe(43418),Me=pe(5871),Ct=pe(8591),Pt=pe(92832),$e=pe(28103),Ft=pe(24905),lt=pe(95237),vt=pe(43604),Oe=pe(58421),te=pe(60324),ee=Object.defineProperty,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(Qt,Yt,Dn)=>Yt in Qt?ee(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,Ee=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))se.call(Yt,Dn)&&ve(Qt,Dn,Yt[Dn]);if(de)for(var Dn of de(Yt))he.call(Yt,Dn)&&ve(Qt,Dn,Yt[Dn]);return Qt};const Be=Qt=>React.createElement("svg",Ee({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Qt),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 Le="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",ze=pe(99325),je=pe(24459),Xe=pe(88230),Ye=pe(7660),dt=Object.defineProperty,Ze=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,kt=(Qt,Yt,Dn)=>Yt in Qt?dt(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,xt=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))Nt.call(Yt,Dn)&&kt(Qt,Dn,Yt[Dn]);if(Ze)for(var Dn of Ze(Yt))at.call(Yt,Dn)&&kt(Qt,Dn,Yt[Dn]);return Qt};const Ot=Qt=>React.createElement("svg",xt({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Qt),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 Gt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",At=Object.defineProperty,qe=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,vn=(Qt,Yt,Dn)=>Yt in Qt?At(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,yn=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))Ve.call(Yt,Dn)&&vn(Qt,Dn,Yt[Dn]);if(qe)for(var Dn of qe(Yt))_t.call(Yt,Dn)&&vn(Qt,Dn,Yt[Dn]);return Qt};const jt=Qt=>React.createElement("svg",yn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},Qt),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 en="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",ln=pe(64686),Wn=pe(64726),un=pe(60355),kn=pe(40928),wt={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"},jn=pe(59301),ci=Object.defineProperty,Ge=Object.defineProperties,be=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Ne=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,xe=(Qt,Yt,Dn)=>Yt in Qt?ci(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,ct=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))Ne.call(Yt,Dn)&&xe(Qt,Dn,Yt[Dn]);if(Pe)for(var Dn of Pe(Yt))Ie.call(Yt,Dn)&&xe(Qt,Dn,Yt[Dn]);return Qt},Lt=(Qt,Yt)=>Ge(Qt,be(Yt)),et=(Qt,Yt)=>{var Dn={};for(var nt in Qt)Ne.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&Pe)for(var nt of Pe(Qt))Yt.indexOf(nt)<0&&Ie.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const it=null,Bt=(Qt,Yt)=>{var Dn=Qt,{globalSetting:nt,loading:qt,dispatch:sr,isEdit:kr,editData:vr}=Dn,lr=et(Dn,["globalSetting","loading","dispatch","isEdit","editData"]);const[Bi,wr]=(0,le.useState)(""),[to,So]=(0,le.useState)(""),[gr,mr]=(0,le.useState)([]),[yr,_i]=(0,le.useState)(""),[Ii,Wr]=(0,le.useState)(),[Zo,Mr]=(0,le.useState)(!1),[Er,Tr]=(0,le.useState)({}),[Rr,pr]=(0,le.useState)([]);(0,le.useEffect)(()=>{!vr||!kr||(wr(vr==null?void 0:vr.name),So(vr==null?void 0:vr.analysis),Wr(vr==null?void 0:vr.is_ordered),Tr(vr),Mr(!0))},[vr]),(0,le.useEffect)(()=>{if(!Zo)return;const Ar=vr==null?void 0:vr.standard_answer.map(jo=>jo==null?void 0:jo.answer_text);mr(Ar);const _s=vr==null?void 0:vr.standard_answer.map(jo=>jo==null?void 0:jo.score);pr(_s),Mr(!1)},[Zo]),(0,le.useImperativeHandle)(Yt,()=>({onSave:Na,Clear:_o}));const Na=()=>{let Ar=[],_s=!1;return Bi?(gr.forEach((jo,Hs)=>{Ar.push({position:Hs+1,answer_text:[],score:Rr[Hs]}),jo==null||jo.forEach((gl,rc)=>{Ar[Hs].answer_text.push(gl),(!gl||!(0,Xe.eR)(gl,1e4))&&(_i(`${Hs}-${rc}`),Ct.ZP.info(gl?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),_s=!0)})}),_s?!1:(Ar==null?void 0:Ar.length)>20?(Ct.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Bi,analysis:to,standard_answers:Ar,is_ordered:Ii,downcase:Er==null?void 0:Er.downcase,no_space:Er==null?void 0:Er.no_space,use_blank_score:Er==null?void 0:Er.use_blank_score}):(Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},_o=()=>{wr(""),So(""),mr([]),Wr(!1)},xa=(Ar,_s,jo)=>{const Hs=gr.slice();if(_s&&Hs.splice(Ar,_s),jo)for(let gl=0;gl<jo;gl++)Hs.splice(Ar+gl,0,[""]);mr(Hs)},$a=(Ar,_s,jo)=>{_i("");let Hs=gr.slice();Hs[Ar][_s]=jo,mr(Hs)},Po=Ar=>{let _s=gr.slice();_s[Ar]=[..._s[Ar],""],mr(_s)},Oa=(Ar,_s)=>{let jo=gr.slice();if(!jo[Ar][_s]){jo[Ar]=jo[Ar].filter((Hs,gl)=>gl!==_s),mr(jo);return}Ue.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:wt.modal,onOk:()=>{jo[Ar]=jo[Ar].filter((Hs,gl)=>gl!==_s),mr(jo)}})},El=Ar=>{Ue.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:wt.modal,onOk:()=>{let _s=gr.slice();_s=gr.filter((jo,Hs)=>Ar!==Hs),mr(_s)}})};return jn.createElement("section",{className:wt.wrap},jn.createElement("p",{className:wt.titleWrap},jn.createElement("span",{className:wt.required},"*"),jn.createElement("span",{className:wt.title},"\u9898\u5E72\uFF1A")),jn.createElement("div",null,jn.createElement(un.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Bi,onChange:Ar=>wr(Ar),showNullButton:!0,onPlaceholderChange:xa})),jn.createElement("div",{className:"mt20"},gr.map((Ar,_s)=>jn.createElement("div",{style:{display:"flex"}},jn.createElement("div",{style:{flex:1}},jn.createElement(kn.Z,{key:_s,answers:Ar,index:_s,flex:1,is_md:!0,activeOptionErrorIndex:yr,onAnswerChange:$a,addChildAnswer:Po,deleteChildAnswer:Oa,deleteChildAnswermain:El})),Er.use_blank_score&&jn.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},jn.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",jn.createElement(Me.Z,{style:{width:"100px"},size:"large",defaultValue:Rr[_s],onBlur:jo=>{Rr[_s]=jo.target.value,pr([...Rr])}}))))),jn.createElement("div",null,jn.createElement(Ft.default,{className:`${wt.color333} font14 mt20`,checked:Er.use_blank_score,onChange:Ar=>Tr(Lt(ct({},Er),{use_blank_score:Ar.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),jn.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")),jn.createElement("div",null,jn.createElement(Ft.default,{className:`${wt.color333} font14 mt20`,checked:Er.downcase,onChange:Ar=>Tr(Lt(ct({},Er),{downcase:Ar.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),jn.createElement("div",null,jn.createElement(Ft.default,{className:`${wt.color333} font14 mt20`,checked:Er.no_space,onChange:Ar=>Tr(Lt(ct({},Er),{no_space:Ar.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),jn.createElement("div",{className:"mt20"},(gr==null?void 0:gr.length)>1&&jn.createElement("span",null,jn.createElement(Ft.default,{checked:Ii,onChange:Ar=>Wr(Ar.target.checked),className:`${wt.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),jn.createElement("span",{className:`${wt.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"))),jn.createElement("p",{className:wt.titleWrap},jn.createElement("span",{className:wt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),jn.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:to,onChange:Ar=>So(Ar)}))};var Dt=(0,je.connect)(({loading:Qt,globalSetting:Yt})=>({globalSetting:Yt,loading:Qt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Bt)),ft=pe(5112),$t=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,an=Object.prototype.propertyIsEnumerable,Jt=(Qt,Yt)=>{var Dn={};for(var nt in Qt)xn.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&$t)for(var nt of $t(Qt))Yt.indexOf(nt)<0&&an.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const Tn=null,Kn=(Qt,Yt)=>{var Dn=Qt,{globalSetting:nt,loading:qt,editData:sr,dispatch:kr,onRef:vr=()=>{},isEdit:lr}=Dn,Bi=Jt(Dn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)(),[So,gr]=(0,le.useState)(""),[mr,yr]=(0,le.useState)("");(0,le.useEffect)(()=>{if(!sr||!lr)return;gr(sr==null?void 0:sr.name),yr(sr==null?void 0:sr.analysis);const Wr=sr==null?void 0:sr.choices.find(Zo=>Zo.is_answer);to(Wr.choice_text==="\u6B63\u786E"?"0":"1")},[sr]),(0,le.useImperativeHandle)(Yt,()=>({onSave:_i,Clear:Ii}));const _i=()=>So?wr?{name:So,choices:[{choice_text:"\u6B63\u786E",is_answer:wr==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:wr==="1"?1:0}],analysis:mr}:(Ct.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),Ii=()=>{gr(""),yr(""),to("")};return le.createElement("section",{className:wt.wrap},le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.required},"*"),le.createElement("span",{className:wt.title},"\u9898\u5E72\uFF1A")),le.createElement(Wn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:So,onChange:Wr=>gr(Wr)}),le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.required},"*"),le.createElement("span",{className:wt.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:wt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),le.createElement(ft.ZP.Group,{buttonStyle:"solid",value:wr,onChange:Wr=>to(Wr.target.value)},le.createElement(ft.ZP.Button,{value:"0",className:`${wt.radio} mr40`},"\u6B63\u786E"),le.createElement(ft.ZP.Button,{value:"1",className:wt.radio},"\u9519\u8BEF")),le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:mr,onChange:Wr=>yr(Wr)}))};var dn=(0,je.connect)(({loading:Qt,globalSetting:Yt})=>({globalSetting:Yt,loading:Qt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Kn)),Qn=Object.getOwnPropertySymbols,pi=Object.prototype.hasOwnProperty,zn=Object.prototype.propertyIsEnumerable,Nn=(Qt,Yt)=>{var Dn={};for(var nt in Qt)pi.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&Qn)for(var nt of Qn(Qt))Yt.indexOf(nt)<0&&zn.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const yi=null,Zi=(Qt,Yt)=>{var Dn=Qt,{globalSetting:nt,loading:qt,editData:sr,dispatch:kr,onRef:vr=()=>{},isEdit:lr}=Dn,Bi=Nn(Dn,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)([]);(0,le.useEffect)(()=>{var yr;if(!sr||!lr)return;const _i=(yr=sr==null?void 0:sr.shixun)==null?void 0:yr.challenges.map(Ii=>({id:Ii==null?void 0:Ii.id,score:Ii.score}));to(_i)},[sr]),(0,le.useImperativeHandle)(Yt,()=>({onSave:So,Clear:gr}));const So=()=>({challenges:[...wr]}),gr=()=>{to([])};console.log("editData--",sr);const mr=yr=>{var _i,Ii;return le.createElement("div",null,(Ii=(_i=yr==null?void 0:yr.shixun)==null?void 0:_i.challenges)==null?void 0:Ii.map((Wr,Zo)=>{var Mr;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(ut.Z,{key:Zo,title:Wr==null?void 0:Wr.challenge_name},le.createElement("span",null,(0,Xe.Pq)(Wr==null?void 0:Wr.challenge_name,44)))),le.createElement("p",{style:{marginBottom:0}},le.createElement("span",{className:wt.required},"*"),le.createElement("span",{className:wt.title},"\u5206\u503C\uFF1A"),le.createElement(Me.Z,{precision:1,min:1,max:100,className:wt.baseFormItem,style:{width:176},value:(Mr=wr.find(Er=>Er.id===Wr.id))==null?void 0:Mr.score,onChange:Er=>{wr.find(Tr=>Tr.id===Wr.id).score=Er,to([...wr])}})))}),le.createElement("div",{style:{clear:"both"}}))};return le.createElement("section",{className:wt.wrap},le.createElement(ze.Z,{style:{paddingRight:10},className:wt.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:wt.required},"*"),le.createElement("span",{className:wt.title},"\u5173\u5361")),mr(sr))};var Hi=(0,je.connect)(({loading:Qt,globalSetting:Yt})=>({globalSetting:Yt,loading:Qt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Zi)),cr=Object.getOwnPropertySymbols,br=Object.prototype.hasOwnProperty,gi=Object.prototype.propertyIsEnumerable,di=(Qt,Yt)=>{var Dn={};for(var nt in Qt)br.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&cr)for(var nt of cr(Qt))Yt.indexOf(nt)<0&&gi.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const wi=["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"],Qi=(Qt,Yt)=>{var Dn=Qt,{editData:nt,globalSetting:qt,loading:sr,dispatch:kr,onRef:vr=()=>{},isEdit:lr}=Dn,Bi=di(Dn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)([]),[So,gr]=(0,le.useState)(),[mr,yr]=(0,le.useState)([]),[_i,Ii]=(0,le.useState)(""),[Wr,Zo]=(0,le.useState)("");(0,le.useEffect)(()=>{to(["","","",""])},[]),(0,le.useEffect)(()=>{if(!nt||!lr)return;Ii(nt==null?void 0:nt.name),Zo(nt==null?void 0:nt.analysis),to(nt==null?void 0:nt.choices.map(Rr=>Rr.choice_text));const Tr=[];nt==null||nt.choices.map((Rr,pr)=>{Rr.is_answer&&Tr.push(pr)}),yr(Tr)},[nt]),(0,le.useImperativeHandle)(Yt,()=>({onSave:Mr,Clear:Er}));const Mr=()=>{if(!_i)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Tr=wr.findIndex(pr=>!pr);if(Tr>-1)return Ct.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${wi[Tr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!mr.length)return Ct.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(mr.length<2)return Ct.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const Rr=wr.map((pr,Na)=>({choice_text:pr,is_answer:mr.includes(Na)?1:0}));return{name:_i,choices:Rr,analysis:Wr}},Er=()=>{to(["","","",""]),Ii(""),Zo(""),yr("")};return le.createElement("section",{className:wt.wrap},le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.required},"*"),le.createElement("span",{className:wt.title},"\u9898\u5E72\uFF1A")),le.createElement(Wn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:_i,onChange:Tr=>Ii(Tr)}),le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.required},"*"),le.createElement("span",{className:wt.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:wt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),wr.map((Tr,Rr)=>le.createElement("div",{className:wt.choiceWrap,key:Rr},le.createElement(ut.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${wt.answer} ${mr.includes(Rr)?wt.activeAnswer:""}`,onClick:()=>{mr.includes(Rr)?yr(mr.filter(pr=>pr!==Rr)):yr([...mr,Rr])}},wi[Rr])),le.createElement("div",{className:wt.editorWrap},So===Rr?le.createElement(Wn.Z,{id:`single-question-option-${Rr}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Tr,onChange:pr=>{wr[Rr]=pr,to(wr)}}):le.createElement("div",{className:wt.htmlWrap,onClick:()=>gr(Rr)},le.createElement(ze.Z,{value:Tr}))),Rr>1&&le.createElement(ut.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${wt.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{to(wr.filter((pr,Na)=>Na!==Rr)),mr.includes(Rr)?yr(mr.filter(pr=>pr!==Rr)):yr([...mr,Rr])}})),Rr<7&&Rr===wr.length-1&&le.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${wt.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>to([...wr,""])})))),le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Wr,onChange:Tr=>Zo(Tr)}))};var Li=(0,je.connect)(({loading:Qt,globalSetting:Yt})=>({globalSetting:Yt,loading:Qt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Qi)),ro=Object.getOwnPropertySymbols,fr=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,Ei=(Qt,Yt)=>{var Dn={};for(var nt in Qt)fr.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&ro)for(var nt of ro(Qt))Yt.indexOf(nt)<0&&Ae.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const Sr=["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=(Qt,Yt)=>{var Dn=Qt,{editData:nt,globalSetting:qt,loading:sr,dispatch:kr,onRef:vr=()=>{},isEdit:lr}=Dn,Bi=Ei(Dn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)([]),[So,gr]=(0,le.useState)(),[mr,yr]=(0,le.useState)(),[_i,Ii]=(0,le.useState)(""),[Wr,Zo]=(0,le.useState)("");(0,le.useEffect)(()=>{to(["","","",""])},[]),(0,le.useEffect)(()=>{if(!nt||!lr)return;const Tr=[],Rr=[];nt==null||nt.choices.forEach((pr,Na)=>{Tr.push(pr.choice_text),pr.is_answer&&Rr.push(Na)}),Ii(nt==null?void 0:nt.name),Zo(nt==null?void 0:nt.analysis),to(Tr),yr(Rr)},[nt]),(0,le.useImperativeHandle)(Yt,()=>({onSave:Mr,Clear:Er}));const Mr=()=>{if(!_i)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Tr=wr.findIndex(pr=>!pr);if(Tr>-1)return Ct.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Sr[Tr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray(mr))return Ct.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;const Rr=wr.map((pr,Na)=>({choice_text:pr,is_answer:mr.includes(Na)?1:0}));return{name:_i,choices:Rr,analysis:Wr}},Er=()=>{to(["","","",""]),Ii(""),Zo(""),yr("")};return le.createElement("section",{className:wt.wrap},le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.required},"*"),le.createElement("span",{className:wt.title},"\u9898\u5E72\uFF1A")),le.createElement(Wn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:_i,onChange:Tr=>Ii(Tr)}),le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.required},"*"),le.createElement("span",{className:wt.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:wt.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),wr.map((Tr,Rr)=>le.createElement("div",{className:wt.choiceWrap,key:Rr},le.createElement(ut.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${wt.answer} ${mr!=null&&mr.includes(Rr)?wt.activeAnswer:""}`,onClick:()=>yr([Rr])},Sr[Rr])),le.createElement("div",{className:wt.editorWrap},So===Rr?le.createElement(Wn.Z,{id:`single-question-option-${Rr}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Tr,onChange:pr=>{wr[Rr]=pr,to(wr)}}):le.createElement("div",{className:wt.htmlWrap,onClick:()=>gr(Rr)},le.createElement(ze.Z,{value:Tr}))),Rr>1&&le.createElement(ut.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${wt.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{to(wr.filter((pr,Na)=>Na!==Rr)),Rr===mr&&yr(null)}})),Rr<7&&Rr===wr.length-1&&le.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${wt.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>to([...wr,""])})))),le.createElement("p",{className:wt.titleWrap},le.createElement("span",{className:wt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Wr,onChange:Tr=>Zo(Tr)}))};var xi=(0,je.connect)(({loading:Qt,globalSetting:Yt})=>({globalSetting:Yt,loading:Qt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Fn)),zi=pe(12563),qi=pe(78673),Gn=pe(61485),ti=pe(59301),Zt=Object.defineProperty,Wt=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,on=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,ht=(Qt,Yt,Dn)=>Yt in Qt?Zt(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,nn=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))cn.call(Yt,Dn)&&ht(Qt,Dn,Yt[Dn]);if(on)for(var Dn of on(Yt))Mt.call(Yt,Dn)&&ht(Qt,Dn,Yt[Dn]);return Qt},gn=(Qt,Yt)=>Wt(Qt,Qe(Yt)),_n=(Qt,Yt)=>{var Dn={};for(var nt in Qt)cn.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&on)for(var nt of on(Qt))Yt.indexOf(nt)<0&&Mt.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn},qn=(Qt,Yt,Dn)=>new Promise((nt,qt)=>{var sr=lr=>{try{vr(Dn.next(lr))}catch(Bi){qt(Bi)}},kr=lr=>{try{vr(Dn.throw(lr))}catch(Bi){qt(Bi)}},vr=lr=>lr.done?nt(lr.value):Promise.resolve(lr.value).then(sr,kr);vr((Dn=Dn.apply(Qt,Yt)).next())});const Et=Qt=>{if(!Qt)return!1;if(/^s*$/.test(Qt)||Qt.trim()===""){Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Yt=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 Qt==="|"?(Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Pn=({value:Qt=[],onClose:Yt})=>ti.createElement(zi.default,{closable:!0,onClose:Yt,className:wt.keywordTag},ti.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},Qt.join(" \u6216 "))),Xn=(Qt,Yt)=>{var Dn=Qt,{editData:nt,globalSetting:qt,loading:sr,dispatch:kr,onRef:vr=()=>{},isEdit:lr}=Dn,Bi=_n(Dn,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[wr,to]=(0,le.useState)(""),[So,gr]=(0,le.useState)(""),[mr,yr]=(0,le.useState)(""),[_i,Ii]=(0,le.useState)(""),[Wr]=He.default.useForm(),Zo=He.default.useWatch("use_keywords",Wr);(0,le.useEffect)(()=>{var Rr;!nt||!lr||(to(nt==null?void 0:nt.name),gr(nt==null?void 0:nt.analysis),yr((Rr=nt==null?void 0:nt.answer_texts)==null?void 0:Rr[0]),Wr.setFieldsValue(nn({},nt)))},[nt]),(0,le.useImperativeHandle)(Yt,()=>({onSave:Mr,Clear:Er}));const Mr=()=>qn(void 0,null,function*(){if(!wr)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Wr.validateFields()}catch(pr){Ct.ZP.error(pr.errorFields[0].errors[0]);return}const Rr=Wr.getFieldsValue();return console.log(Rr,"values"),nn({name:wr,answer_texts:[mr],analysis:So},Rr)}),Er=()=>{to(""),gr(""),yr(""),Wr.resetFields()},Tr=nt==null?void 0:nt.score;return ti.createElement("section",{className:wt.wrap},ti.createElement("p",{className:wt.titleWrap},ti.createElement("span",{className:wt.required},"*"),ti.createElement("span",{className:wt.title},"\u9898\u5E72\uFF1A")),ti.createElement(Wn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:wr,onChange:Rr=>to(Rr)}),ti.createElement("p",{className:wt.titleWrap},ti.createElement("span",{className:wt.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),ti.createElement(Wn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:mr,onChange:Rr=>yr(Rr)}),ti.createElement("p",{className:wt.titleWrap},ti.createElement("span",{className:wt.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),ti.createElement(Wn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:So,onChange:Rr=>gr(Rr)}),ti.createElement(He.default,{form:Wr,size:"large",onFinishFailed:Rr=>qn(void 0,null,function*(){var pr,Na;Ct.ZP.error(Rr.errorFields[0].errors[0]),Wr.scrollToField((Na=(pr=Rr==null?void 0:Rr.errorFields)==null?void 0:pr[0])==null?void 0:Na.name,{behavior:"smooth",block:"center"})})},ti.createElement(lt.Z,{align:"middle",className:"mb30 mt20"},ti.createElement(He.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},ti.createElement(qi.Z,null)),ti.createElement(vt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ti.createElement(vt.Z,null,ti.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"},ti.createElement(Gn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),Zo&&ti.createElement(He.default.List,{name:"keywords",rules:[{validator(Rr,pr){return pr!=null&&pr.length?(pr==null?void 0:pr.reduce((_o,xa)=>_o+xa.score,0))>parseFloat(Tr)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD"))}}]},(Rr,{add:pr,remove:Na})=>ti.createElement(ti.Fragment,null,ti.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),ti.createElement(lt.Z,{align:"middle",className:"font14 mb30"},ti.createElement(vt.Z,{flex:1},ti.createElement(Pt.default,{value:_i,onChange:_o=>{Ii(_o.target.value)},maxLength:50,allowClear:!0,onPressEnter:_o=>{var xa,$a,Po,Oa;const El=`${(xa=_o.target)==null?void 0:xa.value}`,Ar=(Po=($a=El==null?void 0:El.split("|"))==null?void 0:$a.filter(Hs=>!!Hs))==null?void 0:Po.map(Hs=>Hs==null?void 0:Hs.trim()),_s=Wr.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 Ar)if(jo.includes(Hs)){Ct.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Et(El)&&(pr({keyword:Ar,score:1}),Ii(""))},className:wt.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"})),ti.createElement(vt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Rr.map(_o=>{var xa=_o,{key:$a,name:Po}=xa,Oa=_n(xa,["key","name"]);return ti.createElement(lt.Z,{key:$a,style:{marginRight:148}},ti.createElement(vt.Z,{flex:1},ti.createElement(lt.Z,{align:"middle",justify:"space-between"},ti.createElement(He.default.Item,gn(nn({},Oa),{name:[Po,"keyword"]}),ti.createElement(Pn,{onClose:()=>Na(Po)})),ti.createElement(He.default.Item,gn(nn({},Oa),{name:[Po,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),ti.createElement(Me.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var Ci=(0,je.connect)(({loading:Qt,globalSetting:Yt})=>({globalSetting:Yt,loading:Qt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Xn)),tn=pe(36381),sn={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"},In=pe(32134),ji=pe(12893),Ai=Object.defineProperty,Si=Object.defineProperties,ki=Object.getOwnPropertyDescriptors,Ni=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Vr=(Qt,Yt,Dn)=>Yt in Qt?Ai(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,Zn=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))ir.call(Yt,Dn)&&Vr(Qt,Dn,Yt[Dn]);if(Ni)for(var Dn of Ni(Yt))zr.call(Yt,Dn)&&Vr(Qt,Dn,Yt[Dn]);return Qt},io=(Qt,Yt)=>Si(Qt,ki(Yt)),Yr=(Qt,Yt)=>{var Dn={};for(var nt in Qt)ir.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&Ni)for(var nt of Ni(Qt))Yt.indexOf(nt)<0&&zr.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const Fr=Qt=>{var Yt=Qt,{value:Dn,onChange:nt,scrollId:qt}=Yt,sr=Yr(Yt,["value","onChange","scrollId"]);return le.createElement("div",{id:qt||""},le.createElement(Wn.Z,io(Zn({},sr),{defaultValue:Dn,onChange:(kr,vr)=>{vr!=null&&vr.length?nt(kr,vr):nt(kr)}})))},wn=({value:Qt,onChange:Yt,placeholder:Dn,height:nt=140,isEdit:qt})=>qt?le.createElement(Wn.Z,{watch:!0,isFocus:!0,height:nt,placeholder:Dn,defaultValue:Qt,onChange:Yt}):le.createElement("div",{style:{cursor:"pointer"}},Qt?le.createElement(ze.Z,{className:sn.inputBorder,value:Qt}):le.createElement("div",{className:`${sn.inputBorder} ${sn.placeholder}`},Dn));var ri=pe(59301),Ui=Object.defineProperty,Pr=Object.defineProperties,er=Object.getOwnPropertyDescriptors,Cr=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,Zr=Object.prototype.propertyIsEnumerable,Ir=(Qt,Yt,Dn)=>Yt in Qt?Ui(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,Ur=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))qr.call(Yt,Dn)&&Ir(Qt,Dn,Yt[Dn]);if(Cr)for(var Dn of Cr(Yt))Zr.call(Yt,Dn)&&Ir(Qt,Dn,Yt[Dn]);return Qt},Vn=(Qt,Yt)=>Pr(Qt,er(Yt)),Xo=(Qt,Yt)=>{var Dn={};for(var nt in Qt)qr.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&Cr)for(var nt of Cr(Qt))Yt.indexOf(nt)<0&&Zr.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const Un=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Io=({value:Qt,onChange:Yt,choiceTextKey:Dn,answerKey:nt,index:qt,isEdit:sr,setInputActive:kr,form:vr,choiceOptionsPath:lr,allowChangeMode:Bi,showAddIcon:wr,addItem:to,deleteItem:So})=>{const gr=(Qt==null?void 0:Qt[nt])===!0,mr=()=>{const _i=vr.getFieldValue(lr);vr.setFieldValue(lr,_i.map(Ii=>Vn(Ur({},Ii),{[nt]:!1})))},yr=()=>{gr?Yt(Vn(Ur({},Qt),{[nt]:!1})):(Bi||mr(),Yt(Vn(Ur({},Qt),{[nt]:!0})))};return ri.createElement(lt.Z,{className:sn.choiceWrap,align:"middle",wrap:!1},ri.createElement(vt.Z,{onClick:yr,className:`${sn.choiceIndex} ${gr?sn.activeAnswer:""}`},Un[qt]),ri.createElement(vt.Z,{flex:1,className:`${sn.editorWrap} ml15`,onClick:kr},ri.createElement(wn,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:sr,value:Qt==null?void 0:Qt[Dn],onChange:_i=>{Yt(Vn(Ur({},Qt),{[Dn]:_i}))}})),ri.createElement(vt.Z,{flex:"0 0 auto",className:"ml15"},ri.createElement("div",{onClick:yr,className:`${sn.setAnswerBtn} ${gr?sn.activeAnswer:""}`},gr?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),ri.createElement(vt.Z,{className:sn.actionWrapper},ri.createElement(ut.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},ri.createElement(In.Z,{className:sn.addIcon,onClick:to,style:{visibility:wr?"visible":"hidden"}})),ri.createElement(ut.Z,{title:"\u5220\u9664"},ri.createElement(ji.Z,{className:sn.deleteIcon,onClick:So,style:{visibility:qt>1?"visible":"hidden"}}))))},Go=({questionTitlePlaceholder:Qt,titleKey:Yt,choiceKey:Dn,analysisKey:nt,choiceTextKey:qt,answerKey:sr,choiceOptionsPath:kr,allowChangeMode:vr=!0,form:lr,showAnalysis:Bi=!0})=>{const[wr,to]=(0,le.useState)(),[So,gr]=(0,le.useState)(!1);return ri.createElement("div",{className:sn.wrap},ri.createElement("div",{className:sn.questionTitleEditorWrap},ri.createElement(He.default.Item,{label:"\u9898\u5E72",name:Yt,labelCol:{span:24},rules:[{required:!0}]},ri.createElement(Fr,{scrollId:Array.isArray(Yt)?Yt.join("_"):`${Yt}`,watch:!0,height:140,placeholder:Qt}))),ri.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),ri.createElement(He.default.List,{name:Dn,rules:[{validator(mr,yr){const _i=yr.some(Wr=>Wr[sr]),Ii=yr.findIndex(Wr=>{var Zo;return((Zo=Wr[qt])==null?void 0:Zo.length)<=0});return Ii!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Un[Ii]}\u9009\u9879\u7684\u5185\u5BB9`)):_i?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(mr,{add:yr,remove:_i})=>ri.createElement("div",{id:Array.isArray(kr)?kr.join("_"):`${kr}`},mr.map((Ii,Wr)=>{var Zo=Ii,{key:Mr,name:Er}=Zo,Tr=Xo(Zo,["key","name"]);const Rr=wr===Mr,pr=()=>{to(Mr)},Na=Wr<7&&Wr===mr.length-1,_o=()=>yr({[qt]:"",[sr]:0}),xa=()=>_i(Er);return ri.createElement(He.default.Item,Vn(Ur({},Tr),{key:Mr,name:Er,noStyle:!0}),ri.createElement(Io,{choiceTextKey:qt,answerKey:sr,index:Wr,isEdit:Rr,setInputActive:pr,form:lr,choiceOptionsPath:kr,allowChangeMode:vr,showAddIcon:Na,addItem:_o,deleteItem:xa}))}),mr.length<8&&ri.createElement("div",{className:`${sn.addBtn} mb30`,onClick:()=>yr({[qt]:"",[sr]:0})},"\u6DFB\u52A0\u9009\u9879"))),Bi&&ri.createElement("div",{onClick:()=>gr(!0)},ri.createElement(He.default.Item,{name:nt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ri.createElement(wn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:So}))))};var tr=pe(59301),ia=Object.defineProperty,zo=Object.defineProperties,Nr=Object.getOwnPropertyDescriptors,Br=Object.getOwnPropertySymbols,xo=Object.prototype.hasOwnProperty,$o=Object.prototype.propertyIsEnumerable,$i=(Qt,Yt,Dn)=>Yt in Qt?ia(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,st=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))xo.call(Yt,Dn)&&$i(Qt,Dn,Yt[Dn]);if(Br)for(var Dn of Br(Yt))$o.call(Yt,Dn)&&$i(Qt,Dn,Yt[Dn]);return Qt},ra=(Qt,Yt)=>zo(Qt,Nr(Yt)),va=(Qt,Yt)=>{var Dn={};for(var nt in Qt)xo.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&Br)for(var nt of Br(Qt))Yt.indexOf(nt)<0&&$o.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const Ma=({value:Qt,onChange:Yt})=>{const Dn=qt=>{Ue.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:sn.modal,onOk:()=>{const sr=[...Qt];sr.splice(qt,1),Yt(sr)}})},nt=()=>{const qt=[...Qt];qt.push(""),Yt(qt)};return tr.createElement(lt.Z,{align:"middle",className:"ml20",gutter:[40,20]},Qt==null?void 0:Qt.map((qt,sr)=>tr.createElement(vt.Z,{key:`${qt}_${sr}`,className:sn.blankWrapper},tr.createElement(Pt.default,{className:sn.blankInput,defaultValue:qt,maxLength:1e3,onBlur:kr=>{const vr=[...Qt],lr=kr.target.value.trim();vr[sr]=lr,Yt(vr)}}),tr.createElement(ut.Z,{title:"\u5220\u9664"},tr.createElement(ji.Z,{className:sn.deleteIcon,style:{marginLeft:15,visibility:sr>0?"visible":"hidden"},onClick:()=>Dn(sr)})))),tr.createElement(vt.Z,null,tr.createElement("div",{className:`${sn.addBtn}`,onClick:()=>{nt()}},"\u65B0\u589E\u7B54\u6848")))},Ps=({value:Qt=!0,onChange:Yt})=>tr.createElement(qi.Z,{checked:!Qt,onChange:Dn=>{Yt(!Dn)}}),Ha="\u2581",Ms=({questionTitlePlaceholder:Qt,form:Yt,name:Dn,scoreByBlank:nt="use_blank_score",answerKey:qt,titleKey:sr="name",analysisKey:kr="analysis",isOrdered:vr="is_ordered"})=>{var lr,Bi;const[wr,to]=(0,le.useState)(!1),So=(Mr,Er)=>{const Tr=Er.line;let Rr=0;for(let Na=0;Na<Tr;Na++)Rr+=Mr.getLine(Na).split(Ha).length-1;const pr=Mr.getLine(Tr).substring(0,Er.ch);return Rr+=pr.split(Ha).length-1,Rr},gr=(Mr,Er,Tr,Rr)=>{const pr=Mr.getRange(Er.from,Er.to);let Na=0;if(Er.text.forEach(_o=>{Na+=_o.split(Ha).length-1}),Er.origin!=="setValue"){if(pr&&pr.indexOf(Ha)!==-1){const _o=pr.split(Ha).length-1,xa=So(Mr,Er.from);if(console.log(`\u5220\u9664${_o}\u4E2A\uFF0C \u524D\u9762\u6709${xa}\u4E2A\uFF0C\u65B0\u589E${Na}\u4E2A`),_o>1){const $a=Array.from({length:_o},(Po,Oa)=>xa+Oa);Rr($a)}else Rr(xa)}else if(Na>0){const _o=So(Mr,Er.from);console.log(`\u65B0\u589E${Na}\u4E2A\uFF0C\u4E4B\u524D\u6709${_o}\u4E2A`),Tr(Na,_o)}}},mr=()=>{const Mr=Yt.getFieldValue(["sub_item_banks",...qt]);Yt.setFieldValue(["sub_item_banks",...qt],Mr==null?void 0:Mr.map((Er,Tr)=>ra(st({},Er),{position:Tr+1})))},yr=(0,le.useRef)(),_i=(Mr,Er)=>{for(let Tr=0;Tr<Mr;Tr++)yr.current({position:null,answer_text:[""]},Er+Tr);mr()},Ii=(0,le.useRef)(),Wr=Mr=>{Ii.current(Mr),mr()},Zo=(Bi=(lr=Yt.getFieldValue("sub_item_banks"))==null?void 0:lr[qt==null?void 0:qt[0]])==null?void 0:Bi[qt==null?void 0:qt[1]];return tr.createElement("div",{className:sn.wrap},tr.createElement("div",{className:sn.questionTitleEditorWrap},tr.createElement(He.default.Item,{label:"\u9898\u5E72",name:sr,labelCol:{span:24},rules:[{required:!0}]},tr.createElement(Fr,{scrollId:"name",watch:!0,height:140,placeholder:Qt,showNullButton:!0,onCMBeforeChange:(Mr,Er)=>{gr(Mr,Er,_i,Wr)}}))),tr.createElement(He.default.List,{name:qt,rules:[{validator(Mr,Er){if((Er==null?void 0:Er.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Tr of Er){const{answer_text:Rr}=Tr||{};if(Rr!=null&&Rr.some(pr=>(pr==null?void 0:pr.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Mr,{add:Er,remove:Tr},{errors:Rr})=>(yr.current=Er,Ii.current=Tr,tr.createElement(tr.Fragment,null,tr.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Mr.map((pr,Na)=>{var _o=pr,{key:xa,name:$a}=_o,Po=va(_o,["key","name"]);return tr.createElement(lt.Z,{className:"mb20",key:xa,align:"middle",wrap:!1},tr.createElement(vt.Z,{flex:"0 0 auto",className:`${sn.blankIndex}`},"\u586B\u7A7A\u9879",Na+1),tr.createElement(vt.Z,{flex:1},tr.createElement(lt.Z,{align:"top",justify:"space-between",wrap:!1},tr.createElement(vt.Z,null,tr.createElement(He.default.Item,ra(st({},Po),{name:[$a,"answer_text"],noStyle:!0}),tr.createElement(Ma,null))),(Yt==null?void 0:Yt.getFieldValue(["sub_item_banks",...nt]))&&tr.createElement(vt.Z,{flex:"224px"},tr.createElement(He.default.Item,ra(st({},Po),{name:[$a,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:sn.blankInputNumberWrapper}),tr.createElement(Me.Z,{className:sn.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),tr.createElement(He.default.Item,ra(st({},Po),{name:[$a,"position"],noStyle:!0}),tr.createElement(Pt.default,{type:"hidden"}))))})))),tr.createElement(lt.Z,{align:"middle"},tr.createElement(He.default.Item,{name:[Dn,"downcase"],valuePropName:"checked"},tr.createElement(qi.Z,null)),tr.createElement(vt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),tr.createElement(lt.Z,{align:"middle"},tr.createElement(He.default.Item,{name:[Dn,"no_space"],valuePropName:"checked"},tr.createElement(qi.Z,null)),tr.createElement(vt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Zo==null?void 0:Zo.length)>1&&tr.createElement(lt.Z,{align:"middle",className:(Zo==null?void 0:Zo.length)>1?"mb30":`${sn.hide}`},tr.createElement(He.default.Item,{name:vr},tr.createElement(Ps,null)),tr.createElement(vt.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")),tr.createElement("div",{onClick:()=>to(!0)},tr.createElement(He.default.Item,{name:kr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},tr.createElement(wn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:wr}))))};var bo=Object.defineProperty,wo=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,Ia=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,Gr=(Qt,Yt,Dn)=>Yt in Qt?bo(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,mi=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))Ia.call(Yt,Dn)&&Gr(Qt,Dn,Yt[Dn]);if(ha)for(var Dn of ha(Yt))Eo.call(Yt,Dn)&&Gr(Qt,Dn,Yt[Dn]);return Qt},oo=(Qt,Yt)=>wo(Qt,Jr(Yt)),ao=(Qt,Yt)=>{var Dn={};for(var nt in Qt)Ia.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&ha)for(var nt of ha(Qt))Yt.indexOf(nt)<0&&Eo.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const Ga={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Ca=({value:Qt,onChange:Yt,form:Dn,choiceKey:nt})=>{const qt=(Qt==null?void 0:Qt.is_answer)===!0,sr=Qt==null?void 0:Qt.choice_text,kr=()=>{var vr;const lr=(vr=Dn==null?void 0:Dn.getFieldValue(["sub_item_banks",...nt]))==null?void 0:vr.map(Bi=>({choice_text:Bi==null?void 0:Bi.choice_text,is_answer:!1}));Dn==null||Dn.setFieldValue(["sub_item_banks",...nt],lr),Yt(oo(mi({},Qt),{is_answer:!0}))};return le.createElement(lt.Z,{className:sn.choiceWrap,align:"middle",wrap:!1},le.createElement(vt.Z,{onClick:kr,className:`${sn.choiceIndex} ${sn.judgementIndex} ${qt?sn.activeAnswer:""}`},Ga[sr]),le.createElement(vt.Z,{flex:1,className:`${sn.editorWrap} ml15`},le.createElement("div",{className:`${sn.inputBorder} ${sn.placeholder} ${qt?sn.activeJudgementAnswer:""}`},sr)),le.createElement(vt.Z,{flex:"0 0 auto",className:"ml15"},le.createElement("div",{onClick:kr,className:`${sn.setAnswerBtn} ${qt?sn.activeAnswer:""}`},qt?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},fa=({questionTitlePlaceholder:Qt,choiceKey:Yt="choices",form:Dn,titleKey:nt="name",analysisKey:qt="analysis"})=>{const[sr,kr]=(0,le.useState)(!1);return le.createElement("div",{className:sn.wrap},le.createElement("div",{className:sn.questionTitleEditorWrap},le.createElement(He.default.Item,{label:"\u9898\u5E72",name:nt,labelCol:{span:24},rules:[{required:!0}]},le.createElement(Fr,{scrollId:"name",watch:!0,height:140,placeholder:Qt}))),le.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},le.createElement(He.default.List,{name:Yt,rules:[{validator(vr,lr){return lr.some(wr=>(wr==null?void 0:wr.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},vr=>le.createElement("div",{id:"choices"},vr.map(lr=>{var Bi=lr,{key:wr,name:to}=Bi,So=ao(Bi,["key","name"]);return le.createElement(He.default.Item,oo(mi({},So),{key:wr,name:to,noStyle:!0}),le.createElement(Ca,{form:Dn,choiceKey:Yt}))})))),le.createElement("div",{onClick:()=>kr(!0)},le.createElement(He.default.Item,{name:qt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(wn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:sr}))))};var Ka=Object.defineProperty,Qa=Object.defineProperties,Cs=Object.getOwnPropertyDescriptors,ms=Object.getOwnPropertySymbols,Zs=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,ys=(Qt,Yt,Dn)=>Yt in Qt?Ka(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,oa=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))Zs.call(Yt,Dn)&&ys(Qt,Dn,Yt[Dn]);if(ms)for(var Dn of ms(Yt))Bn.call(Yt,Dn)&&ys(Qt,Dn,Yt[Dn]);return Qt},hl=(Qt,Yt)=>Qa(Qt,Cs(Yt)),Ol=(Qt,Yt)=>{var Dn={};for(var nt in Qt)Zs.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&ms)for(var nt of ms(Qt))Yt.indexOf(nt)<0&&Bn.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn};const as=Qt=>{var Yt=Qt,{value:Dn,onChange:nt}=Yt,qt=Ol(Yt,["value","onChange"]);const sr=kr=>{nt([kr])};return le.createElement(Wn.Z,hl(oa({},qt),{defaultValue:Dn==null?void 0:Dn[0],onChange:sr}))},yu=Qt=>{if(!Qt)return!1;let Yt=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 Qt==="|"?(Ct.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},eu=({value:Qt=[],onClose:Yt})=>le.createElement(zi.default,{closable:!0,onClose:Yt,className:sn.keywordTag},Qt==null?void 0:Qt.join(" \u6216 ")),fs=({questionTitlePlaceholder:Qt,form:Yt,showKeywords:Dn,isMustKeyWords:nt=Dn,titleKey:qt="name",analysisKey:sr="analysis",answerTexts:kr="answer_texts",keywords:vr="keywords",useKeywords:lr="use_keywords",indexs:Bi})=>{const[wr,to]=(0,le.useState)(!1),[So,gr]=(0,le.useState)(""),mr=He.default.useWatch("sub_item_banks",Yt),{use_keywords:yr,score:_i}=(mr==null?void 0:mr[Bi])||{};return console.log(yr,_i,"itemValues"),le.createElement("div",{className:sn.wrap},le.createElement("div",{className:sn.questionTitleEditorWrap},le.createElement(He.default.Item,{label:"\u9898\u5E72",name:qt,labelCol:{span:24},rules:[{required:!0}]},le.createElement(Fr,{scrollId:"name",watch:!0,height:140,placeholder:Qt}))),le.createElement(He.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:kr,labelCol:{span:24}},le.createElement(as,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Dn&&!nt&&le.createElement(He.default.Item,{hidden:!0,name:lr,valuePropName:"checked"},le.createElement(qi.Z,{defaultChecked:!0})),Dn&&nt&&le.createElement(lt.Z,{align:"middle",className:"mb30"},le.createElement(He.default.Item,{name:lr,valuePropName:"checked"},le.createElement(qi.Z,null)),le.createElement(vt.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(vt.Z,null,le.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"},le.createElement(Gn.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(yr||!nt)&&le.createElement(He.default.List,{name:vr,rules:[{validator(Ii,Wr){return nt?Wr!=null&&Wr.length?(Wr==null?void 0:Wr.reduce((Mr,Er)=>Mr+Er.score,0))>parseFloat(_i)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Ii,{add:Wr,remove:Zo})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${sn.title} mb10`},nt?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(lt.Z,{align:"middle",className:"font14 mb30"},le.createElement(vt.Z,{flex:1},le.createElement(Pt.default,{value:So,onChange:Mr=>{gr(Mr.target.value)},maxLength:50,allowClear:!0,onPressEnter:Mr=>{var Er,Tr,Rr,pr;const Na=`${(Er=Mr.target)==null?void 0:Er.value}`,_o=(Rr=(Tr=Na==null?void 0:Na.split("|"))==null?void 0:Tr.filter(Po=>!!Po))==null?void 0:Rr.map(Po=>Po==null?void 0:Po.trim()),xa=Yt.getFieldValue(["sub_item_banks",...vr]),$a=((pr=xa==null?void 0:xa.map(Po=>Po==null?void 0:Po.keyword))==null?void 0:pr.flat())||[];for(const Po of _o)if($a.includes(Po)){Ct.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}yu(Na)&&(Wr({keyword:_o,score:1}),gr(""))},className:sn.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(vt.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Ii.map(Mr=>{var Er=Mr,{key:Tr,name:Rr}=Er,pr=Ol(Er,["key","name"]);return le.createElement(lt.Z,{key:Tr,className:"mb20",style:{marginRight:148}},le.createElement(vt.Z,{flex:1},le.createElement(lt.Z,{align:"middle",justify:"space-between"},le.createElement(He.default.Item,hl(oa({},pr),{name:[Rr,"keyword"]}),le.createElement(eu,{onClose:()=>Zo(Rr)})),nt&&le.createElement(He.default.Item,hl(oa({},pr),{name:[Rr,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:sn.blankInputNumberWrapper}),le.createElement(Me.Z,{className:sn.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>to(!0)},le.createElement(He.default.Item,{name:sr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(wn,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:wr}))))};var Ba=pe(59301),tu=Object.defineProperty,Ao=Object.defineProperties,Ea=Object.getOwnPropertyDescriptors,ua=Object.getOwnPropertySymbols,hr=Object.prototype.hasOwnProperty,Rs=Object.prototype.propertyIsEnumerable,ss=(Qt,Yt,Dn)=>Yt in Qt?tu(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,sl=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))hr.call(Yt,Dn)&&ss(Qt,Dn,Yt[Dn]);if(ua)for(var Dn of ua(Yt))Rs.call(Yt,Dn)&&ss(Qt,Dn,Yt[Dn]);return Qt},jl=(Qt,Yt)=>Ao(Qt,Ea(Yt)),ou=(Qt,Yt)=>{var Dn={};for(var nt in Qt)hr.call(Qt,nt)&&Yt.indexOf(nt)<0&&(Dn[nt]=Qt[nt]);if(Qt!=null&&ua)for(var nt of ua(Qt))Yt.indexOf(nt)<0&&Rs.call(Qt,nt)&&(Dn[nt]=Qt[nt]);return Dn},Xi=(Qt,Yt,Dn)=>new Promise((nt,qt)=>{var sr=lr=>{try{vr(Dn.next(lr))}catch(Bi){qt(Bi)}},kr=lr=>{try{vr(Dn.throw(lr))}catch(Bi){qt(Bi)}},vr=lr=>lr.done?nt(lr.value):Promise.resolve(lr.value).then(sr,kr);vr((Dn=Dn.apply(Qt,Yt)).next())});const{Panel:ws}=tn.default,Us=null,$l=(Qt,Yt)=>{var Dn=Qt,{globalSetting:nt,loading:qt,dispatch:sr,editData:kr,onRef:vr=()=>{},isEdit:lr}=Dn,Bi=ou(Dn,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[wr,to]=(0,le.useState)(""),[So,gr]=(0,le.useState)([]),[mr]=He.default.useForm();(0,le.useEffect)(()=>{!kr||!lr||(to(kr==null?void 0:kr.name),gr(kr==null?void 0:kr.sub_item_banks),mr.setFieldsValue(sl({},kr)))},[kr]),(0,le.useEffect)(()=>{gr(mr.getFieldValue("sub_item_banks"))},[He.default.useWatch("sub_item_banks",mr)]),(0,le.useImperativeHandle)(Yt,()=>({onSave:yr,Clear:_i}));const yr=()=>Xi(void 0,null,function*(){if(!wr)return Ct.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield mr.validateFields()}catch(Tr){return console.log(Tr,"errInfo"),Ct.ZP.error(Tr.errorFields[0].errors[0]),!1}const Er=So.map(Tr=>sl({id:Tr.id>1?Tr.id:null},Tr));return{name:wr,sub_item_banks:Er}}),_i=()=>{to(""),gr([])},Ii={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},Wr=({value:Er})=>Ba.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},Er),[Zo,Mr]=(0,le.useState)();return Ba.createElement("section",{className:wt.wrap},Ba.createElement("p",{className:wt.titleWrap},Ba.createElement("span",{className:wt.required},"*"),Ba.createElement("span",{className:wt.title},"\u9898\u5E72\uFF1A")),Ba.createElement(Wn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:wr,onChange:Er=>to(Er)}),Ba.createElement(He.default,{form:mr,autoComplete:"off"},Ba.createElement(He.default.List,{name:"sub_item_banks",rules:[{validator(Er,Tr){return Tr?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Er,{add:Tr,remove:Rr})=>{const pr=mr.getFieldValue("sub_item_banks");return Ba.createElement(Ba.Fragment,null,Ba.createElement(tn.default,{className:Er.length>0?wt.collapseWrapper:"",bordered:!1,expandIcon:({isActive:Na})=>Ba.createElement("i",{className:`iconfont icon-weizhankai ${Na?wt.open:wt.close}`,style:{fontSize:14,transition:"all .2s"}})},Er.map((Na,_o)=>{var xa=Na,{key:$a,name:Po}=xa,Oa=ou(xa,["key","name"]),El,Ar,_s,jo,Hs,gl,rc,ad,Tc,oc,vc,rs;return Ba.createElement(ws,{className:wt.panel,forceRender:!0,header:Ba.createElement("div",{className:wt.panelHeader},"\u7B2C",_o+1,"\u5C0F\u9898",Ba.createElement("span",null,"\uFF08",Ii[(El=pr==null?void 0:pr[Po])==null?void 0:El.item_type],"\uFF09")),extra:Ba.createElement(lt.Z,{align:"middle",onClick:du=>du.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Ar=pr==null?void 0:pr[Po])==null?void 0:Ar.item_type)=="completion"&&Ba.createElement(He.default.Item,jl(sl({},Oa),{name:[Po,"score"],className:wt.blankInputNumberWrapper,style:{marginBottom:0}}),((_s=pr==null?void 0:pr[Po])==null?void 0:_s.item_type)=="completion"&&Ba.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Ba.createElement(Wr,{value:(jo=pr==null?void 0:pr[Po])==null?void 0:jo.score}),"\u5206")),((Hs=pr==null?void 0:pr[Po])==null?void 0:Hs.item_type)=="completion"&&Ba.createElement(Ba.Fragment,null,Ba.createElement(ft.ZP.Group,{defaultValue:(gl=pr==null?void 0:pr[Po])==null?void 0:gl.use_blank_score,className:wt.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",Po,"use_blank_score"],(Rc=du==null?void 0:du.target)==null?void 0:Rc.value),Mr(new Date)}}),Ba.createElement(ut.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:$a},Ba.createElement(He.default.Item,jl(sl({},Oa),{name:Po}),(((rc=pr==null?void 0:pr[Po])==null?void 0:rc.item_type)=="single"||((ad=pr==null?void 0:pr[Po])==null?void 0:ad.item_type)=="multiple")&&Ba.createElement(Go,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Tc=pr==null?void 0:pr[Po])==null?void 0:Tc.item_type)!="single",form:mr,choiceKey:[Po,"choices"],titleKey:[Po,"name"],analysisKey:[Po,"analysis"],choiceOptionsPath:["sub_item_banks",Po,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((oc=pr==null?void 0:pr[Po])==null?void 0:oc.item_type)=="completion"&&Ba.createElement(Ms,{form:mr,name:Po,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[Po,"use_blank_score"],titleKey:[Po,"name"],analysisKey:[Po,"analysis"],isOrdered:[Po,"is_ordered"],answerKey:[Po,"standard_answer"],key:Zo}),((vc=pr==null?void 0:pr[Po])==null?void 0:vc.item_type)=="judgement"&&Ba.createElement(fa,{form:mr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Po,"name"],analysisKey:[Po,"analysis"],choiceKey:[Po,"choices"]}),((rs=pr==null?void 0:pr[Po])==null?void 0:rs.item_type)=="subjective"&&Ba.createElement(fs,{showKeywords:!0,form:mr,titleKey:[Po,"name"],analysisKey:[Po,"analysis"],answerTexts:[Po,"answer_texts"],useKeywords:[Po,"use_keywords"],keywords:[Po,"keywords"],indexs:Po,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var kl=(0,je.connect)(({loading:Qt,globalSetting:Yt})=>({globalSetting:Yt,loading:Qt.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)($l)),Kl=pe(75872),Oo=pe(19842),ic=pe(57809),zl=pe(1710),Cn={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"},Ln=pe(15965),ai=pe(38389),Ji=pe(94811),Gi=pe(59579),Ti=pe(57816),Ri=pe(72559),Mi=({open:Qt,onCancel:Yt,onOk:Dn})=>{const nt=(0,ai.g)(),[qt,sr,kr,vr]=(0,Gi.U)(Ji.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[lr,Bi]=(0,le.useState)(!1);(0,le.useEffect)(()=>{Qt&&kr({page:1,limit:10,type:0},!0).then(mr=>{(mr==null?void 0:mr.shixuns_count)===0&&Bi(!0)})},[Qt]);const[wr,to]=(0,le.useState)([]),[So,gr]=(0,le.useState)([]);return le.createElement(Ue.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:Qt,width:948,centered:!0,closable:!0,onCancel:Yt,onOk:()=>Dn(So),destroyOnClose:!0},le.createElement(lt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(vt.Z,null,le.createElement(Oo.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:nt,onChange:mr=>{kr({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=>kr({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=>kr({page:1,shixun_publish_status:mr})})),le.createElement(Ln.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:mr=>{kr({keyword:mr,page:1})}})),lr?le.createElement("div",null,le.createElement(Ti.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,Xe.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?Cn.title:"",title:mr||"--"},le.createElement(ze.Z,{key:1,showLines:1,showTextOnly:!0,value:mr||"--"})),(yr==null?void 0:yr.high_resources_consume)&&le.createElement(Ri.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(mr,yr,_i)=>le.createElement("span",null,mr||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(ut.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement(Gn.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(mr,yr,_i)=>le.createElement("span",null,mr||"- -")},{title:"\u64CD\u4F5C",render(mr,yr){const{title:_i,challenge_names:Ii,author_name:Wr,identifier:Zo,author_school_name:Mr,study_count:Er}=yr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Ue.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(ze.Z,{value:_i,style:{marginBottom:18}}),le.createElement("div",{className:Cn.challengeNameWrapper},Ii.map((Tr,Rr)=>le.createElement("div",{className:Cn.challengeName,key:Rr},"\u7B2C",(0,Xe.EM)(Rr+1),"\u9898\xA0",Tr))),le.createElement(lt.Z,{className:Cn.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(vt.Z,{className:Cn.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:Cn.shixunInfo},Wr.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:Cn.shixunInfo},Mr),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:Cn.shixunInfo},Er)),le.createElement(We.ZP,{type:"primary",className:Cn.btnToDetail,onClick:()=>(0,Xe.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:wr,preserveSelectedRowKeys:!0,getCheckboxProps:mr=>({disabled:mr.shixun_tag_num===1}),onChange(mr,yr){var _i,Ii,Wr;console.log(mr),to(mr);const Zo=[];for(const Er of So)mr.includes(Er.id)&&Zo.push(Er);const Mr=Zo.map(Er=>Er.id);for(const Er of yr)Er&&mr.includes(Er.id)&&!Mr.includes(Er.id)&&Zo.push({id:Er.id,difficulty:Er.level,identifier:Er.identifier,name:Er.name,real_name:(_i=Er==null?void 0:Er.author_name)==null?void 0:_i.split("\u3001")[0],school_name:Er.author_school_name,challenge_names:Er.challenge_names,challenges:(Ii=Er.challenge_names)==null?void 0:Ii.map((Tr,Rr)=>({subject:Tr,id:Rr,score:5})),score:((Wr=Er.challenge_names)==null?void 0:Wr.length)*5,study_count:Er.study_count,challenges_count:Er.challenges_count});gr(Zo)}},pagination:{current:qt.page,pageSize:qt.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){kr({page:mr,limit:yr})},size:"default"},scroll:{y:400}}))},ur=pe(20527),Hr=pe(49898),ga=(Qt,Yt,Dn)=>new Promise((nt,qt)=>{var sr=lr=>{try{vr(Dn.next(lr))}catch(Bi){qt(Bi)}},kr=lr=>{try{vr(Dn.throw(lr))}catch(Bi){qt(Bi)}},vr=lr=>lr.done?nt(lr.value):Promise.resolve(lr.value).then(sr,kr);vr((Dn=Dn.apply(Qt,Yt)).next())}),Ya=({visible:Qt,getdata:Yt,onCancel:Dn,onRandomExchange:nt,selectFromProblemSet:qt,questionParams:sr})=>{const[kr,vr]=(0,le.useState)(!1),[lr,Bi]=(0,le.useState)(!1),[wr,to]=(0,le.useState)({}),So=(0,je.useParams)(),[gr,mr]=(0,le.useState)(),yr=(_i,Ii)=>ga(void 0,null,function*(){Bi(!0);const Wr=yield(0,Ye.ZP)(`/api/exercises/${So.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:sr.id,item_bank_id:_i,shixuns_info:[{id:_i,is_copy:Ii!=1,is_use:Ii!=1}]}});Bi(!1),Wr!=null&&Wr.status||(Ct.ZP.info("\u6362\u9898\u6210\u529F"),Dn(),Yt())});return le.createElement(Ue.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:Qt,onCancel:Dn,centered:!0,maskClosable:!0,footer:null},le.createElement(lt.Z,{justify:"center",className:"pb20"},le.createElement(Kl.Z,{onClick:nt},"\u968F\u673A\u66F4\u6362"),(sr==null?void 0:sr.type)!=="PRACTICAL"&&le.createElement(We.ZP,{style:{marginLeft:24},onClick:qt},"\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(Mi,{open:kr,onCancel:()=>vr(!1),onOk:_i=>ga(void 0,null,function*(){if(console.log("----selectedRows",_i,So),(_i==null?void 0:_i.length)<=0){Ct.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let Ii=_i==null?void 0:_i.map(Zo=>Zo==null?void 0:Zo.id),Wr=yield(0,Hr.Tr)({id:[...Ii],course_id:So.coursesId,type:"shixun"});(Wr==null?void 0:Wr.student_count)===0?yr(Ii==null?void 0:Ii[0],1):(mr(Ii),to(Wr)),vr(!1)})}),le.createElement(ur.Z,{resdata:wr,type:"shixun",okloading:lr,oktext:(wr==null?void 0:wr.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:_i=>ga(void 0,null,function*(){yr(gr==null?void 0:gr[0],2)})}))},Va=pe(37542),No=pe(24334),Qr=pe(85016),Fi=pe(65532),eo=pe(149),Vo=Object.defineProperty,ma=Object.defineProperties,ya=Object.getOwnPropertyDescriptors,Fo=Object.getOwnPropertySymbols,aa=Object.prototype.hasOwnProperty,Do=Object.prototype.propertyIsEnumerable,Or=(Qt,Yt,Dn)=>Yt in Qt?Vo(Qt,Yt,{enumerable:!0,configurable:!0,writable:!0,value:Dn}):Qt[Yt]=Dn,Aa=(Qt,Yt)=>{for(var Dn in Yt||(Yt={}))aa.call(Yt,Dn)&&Or(Qt,Dn,Yt[Dn]);if(Fo)for(var Dn of Fo(Yt))Do.call(Yt,Dn)&&Or(Qt,Dn,Yt[Dn]);return Qt},Wa=(Qt,Yt)=>ma(Qt,ya(Yt)),La=(Qt,Yt,Dn)=>new Promise((nt,qt)=>{var sr=lr=>{try{vr(Dn.next(lr))}catch(Bi){qt(Bi)}},kr=lr=>{try{vr(Dn.throw(lr))}catch(Bi){qt(Bi)}},vr=lr=>lr.done?nt(lr.value):Promise.resolve(lr.value).then(sr,kr);vr((Dn=Dn.apply(Qt,Yt)).next())}),xu=({data:Qt,submit:Yt,goBack:Dn,loading:nt,onTypeScore:qt,editPreview:sr=!1,onSkipExamination:kr,selectValue:vr,onExchange:lr,getdata:Bi,handleMarkWrongQuestion:wr})=>{var to,So,gr,mr,yr,_i,Ii,Wr,Zo,Mr,Er;const Tr=(0,le.useRef)(),[Rr,pr]=(0,le.useState)(null),[Na,_o]=(0,le.useState)(!1),[xa,$a]=(0,le.useState)(!1),Po=(0,le.useRef)(),[Oa]=He.default.useForm(),El=(0,je.useParams)(),[Ar,_s]=(0,le.useState)(!1);(0,le.useEffect)(()=>{_o(!0)},[]),(0,le.useEffect)(()=>{sr||(0,Xe.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=li=>{var mo;const Ja=[];return le.createElement(le.Fragment,null,le.createElement("aside",{className:Te.single},(mo=li==null?void 0:li.choices)==null?void 0:mo.map((ot,tt)=>(ot.is_answer&&Ja.push(eo.k4[tt]),le.createElement("ul",{key:tt},le.createElement("li",null,eo.k4[tt],"\u3001"),le.createElement("li",null,le.createElement(ze.Z,{value:ot.choice_text})))))),le.createElement("div",{className:Te.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Ja.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",jo[li.difficulty])),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.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:"),`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:li==null?void 0:li.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:"),li==null?void 0:li.tag_discipline_name)))))},ad=(li,mo)=>{var Ja;const ot=(Ja=li==null?void 0:li.standard_answer)==null?void 0:Ja.map((tt,Ut)=>{var Xt;return le.createElement("div",{key:Ut},`\u7B54\u6848\uFF08\u586B\u7A7A${tt==null?void 0:tt.position}\uFF09\uFF1A${(Xt=tt==null?void 0:tt.answer_text)==null?void 0:Xt.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,ot)),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.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:"),mo?`${(mo==null?void 0:mo.discipline_name)||"--"}/${mo==null?void 0:mo.sub_discipline_name}`:`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:mo?mo==null?void 0:mo.tag_discipline_name:li==null?void 0:li.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:"),mo?mo==null?void 0:mo.tag_discipline_name:li==null?void 0:li.tag_discipline_name)))))},Tc=li=>{var mo;const Ja=(mo=li==null?void 0:li.standard_answer)==null?void 0:mo.map((ot,tt)=>le.createElement("div",{key:tt},`\u7B54\u6848\uFF08\u586B\u7A7A${(ot==null?void 0:ot.position)||(ot==null?void 0:ot.exercise_choice_id)}\uFF09\uFF1A${ot==null?void 0:ot.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,Ja)),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.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:"),`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:li==null?void 0:li.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:"),li==null?void 0:li.tag_discipline_name)))))},oc=(li,mo)=>{var Ja;return le.createElement("div",{className:Te.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(Ja=li==null?void 0:li.answer_texts)==null?void 0:Ja[0]),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.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:"),mo?`${(mo==null?void 0:mo.discipline_name)||"--"}/${mo==null?void 0:mo.sub_discipline_name}`:`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:mo?mo==null?void 0:mo.tag_discipline_name:li==null?void 0:li.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:"),mo?mo==null?void 0:mo.tag_discipline_name:li==null?void 0:li.tag_discipline_name))))},vc=li=>{var mo,Ja;return le.createElement("div",{className:Te.analysis},le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u9884\u671F\u8F93\u51FA:"),le.createElement(ze.Z,{value:(mo=li==null?void 0:li.program_attr)==null?void 0:mo.description})),le.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((Ja=li==null?void 0:li.program_attr)==null?void 0:Ja.answer_text)||"--"),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:li.analysis?li.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:"),`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:li==null?void 0:li.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:"),li==null?void 0:li.tag_discipline_name))))},rs=(li,mo)=>{var Ja;return le.createElement("div",null,(Ja=li==null?void 0:li.sub_item_banks)==null?void 0:Ja.map((ot,tt)=>{var Ut,Xt;const pn=[];return le.createElement(le.Fragment,null,le.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},mo+1+"."+(tt+1),"\uFF08",Hs[ot.item_type]||gl[ot.item_type],"\uFF09",ot.name),(ot.item_type=="SINGLE"||ot.item_type=="MULTIPLE"||ot.item_type=="JUDGMENT"||ot.item_type=="single"||ot.item_type=="multiple"||ot.item_type=="judgement")&&le.createElement(le.Fragment,null,le.createElement("aside",{className:Te.single},(Ut=ot==null?void 0:ot.choices)==null?void 0:Ut.map((rn,$n)=>(rn.is_answer&&pn.push(eo.k4[$n]),le.createElement("ul",{key:$n},le.createElement("li",null,eo.k4[$n],"\u3001"),le.createElement("li",null,le.createElement(ze.Z,{value:rn.choice_text})))))),le.createElement("div",{className:Te.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",pn.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",jo[ot.difficulty])),le.createElement("aside",null,le.createElement("span",{className:Te.text},"\u89E3\u6790:"),le.createElement(ze.Z,{value:ot.analysis?ot.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:"),`${(li==null?void 0:li.discipline_name)||"--"}/${li==null?void 0:li.sub_discipline_name}`),le.createElement(ut.Z,{title:li==null?void 0:li.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:"),li==null?void 0:li.tag_discipline_name))))),(ot.item_type=="COMPLETION"||ot.item_type=="completion")&&ad(ot,li),(ot.item_type=="SUBJECTIVE"||ot.item_type=="subjective")&&oc(ot,li),((Xt=Qt==null?void 0:Qt.exam)==null?void 0:Xt.exercise_status)===3&&le.createElement("div",{className:"flex gap-20px mt20"},le.createElement(Qr.Z,{state:ot==null?void 0:ot.is_wrong,onClick:()=>{wr==null||wr({value:Wa(Aa({},ot),{question_id:ot==null?void 0:ot.id,question_score:ot==null?void 0:ot.score})})}}),ot.item_type=="single"&&le.createElement(We.ZP,{style:{color:"#3061D0"},onClick:()=>{_d({value:ot})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},du=li=>{var mo,Ja,ot;return le.createElement("div",{style:{marginTop:"12px"}},(Ja=(mo=li==null?void 0:li.shixun)==null?void 0:mo.challenges)==null?void 0:Ja.map((tt,Ut)=>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",Ut+1,"\u5173"),le.createElement(ut.Z,{key:Ut,title:tt==null?void 0:tt.challenge_name},le.createElement("span",null,(0,Xe.Pq)(tt==null?void 0:tt.challenge_name,44)))),sr&&le.createElement("div",null,"\u5206\u503C\uFF1A",tt.score,"\u5206"))),le.createElement(je.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(ot=li==null?void 0:li.shixun)==null?void 0:ot.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),le.createElement("div",{style:{clear:"both"}}))},Rc=li=>{let mo=li.questions_score/li.questions_count;Ue.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,li==null?void 0:li.name,"\uFF1A"),le.createElement(Me.Z,{min:0,precision:1,defaultValue:mo,onChange:Ja=>{mo=Ja}}),le.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){var Ja;if(!mo)return Ct.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const ot={type:li==null?void 0:li.type,score:mo,scoreTotal:Number((Ja=mo*li.questions_count)==null?void 0:Ja.toFixed(1))};qt(ot)})})},ac=()=>{let li="";Ue.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:le.createElement("div",{className:Te.modalColumn},le.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},le.createElement("img",{style:{marginRight:5},src:ln.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),le.createElement("div",{className:Te.modalRow,style:{marginTop:20}},le.createElement("sup",{className:Te.sup},"*"),le.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),le.createElement(Pt.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:li,onChange:mo=>{li=mo.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>La(void 0,null,function*(){var mo;if(!li)return Ct.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Ja=[],ot=[],tt=[],Ut=[];(mo=Qt==null?void 0:Qt.questionList)==null||mo.forEach(pn=>{var rn;(rn=pn.questions)==null||rn.forEach($n=>{let Rn=pn.questions_score/pn.questions_count;Rn=Rn&&Rn.toFixed(1),pn.type==="COMBINATION"&&tt.push({id:$n.id,sub_item_bank_ids:$n.sub_item_banks.map(Yn=>Yn.id)}),pn.type==="PRACTICAL"?Ut.push($n.id):(Ja.push($n.id),ot.push(Rn))})}),console.log("-----",tt),yield Yt({item_bank_ids:Ja,item_bank_scores:ot,name:li,combination_item_banks:tt,shixun_ids:Ut})})})},Rd=(li,mo,Ja,ot)=>{var tt;const Ut=`${location.pathname}${location.search}`,Xt=(tt=ot.questions)==null?void 0:tt.map(pn=>pn==null?void 0:pn.id);if(Ut.includes("exercise"))Po.current={id:li,ids:Xt,type:mo,index:Ja},$a(!0);else{let pn=Ue.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*(){pn.update({cancelButtonProps:{disabled:!0}}),yield lr({single_question_id:li,seleted_item_bank_ids:Xt},{type:mo,index:Ja}),pn.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},au=li=>{var mo;const Ja=(mo=li.questions)==null?void 0:mo.map(Ut=>Ut==null?void 0:Ut.id),ot=li.name;let tt=Ue.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${ot}\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*(){tt.update({cancelButtonProps:{disabled:!0}}),yield lr({seleted_item_bank_ids:Ja},{type:li.type}),tt.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${ot}\u8BD5\u9898`)})})},su=()=>{let li=Ue.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*(){li.update({cancelButtonProps:{disabled:!0}}),yield lr(),li.update({cancelButtonProps:{disabled:!1}}),Ct.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},Wu=li=>{console.log(li,"key"),kr(li-1)},Au=(li,mo)=>{var Ja,ot;if(mo==="SINGLE")return le.createElement(le.Fragment,null,le.createElement(xi,{ref:Tr,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(mo==="MULTIPLE")return le.createElement(le.Fragment,null,le.createElement(Li,{ref:Tr,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(mo==="JUDGMENT")return le.createElement(le.Fragment,null,le.createElement(dn,{ref:Tr,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(mo==="COMPLETION")return le.createElement(le.Fragment,null,le.createElement(Dt,{ref:Tr,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(mo==="SUBJECTIVE")return le.createElement(le.Fragment,null,le.createElement(Ci,{ref:Tr,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(mo==="COMBINATION")return le.createElement(le.Fragment,null,le.createElement(kl,{ref:Tr,editData:li,isEdit:!0}),le.createElement($e.Z,null));if(mo==="BPROGRAM")return le.createElement(le.Fragment,null,le.createElement(He.default,{form:Oa,style:{marginTop:20},onFinishFailed:tt=>{var Ut,Xt;tt.errorFields[0].name.includes("standard_answers")?Ct.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):Ct.ZP.error(tt.errorFields[0].errors[0]),Oa.scrollToField((Xt=(Ut=tt==null?void 0:tt.errorFields)==null?void 0:Ut[0])==null?void 0:Xt.name,{behavior:"smooth",block:"center"})},onFinish:tt=>La(void 0,null,function*(){var Ut;let Xt=Wa(Aa({question_score:li.score},tt),{question_type:8,hack:Wa(Aa({},tt.hack),{difficult:li.program_attr.difficult}),hack_codes:Wa(Aa({},tt.hack_codes),{code:No.Base64.encode((Ut=tt.hack_codes)==null?void 0:Ut.code)})});Ar&&(Xt.is_cover=1);const pn=yield(0,Ye.ZP)(`/api/exercise_questions/${li.id}.json`,{method:"put",body:Xt});(pn==null?void 0:pn.status)===0&&(Ct.ZP.success("\u7F16\u8F91\u6210\u529F"),Wu(vr+1)),pr(null)})},le.createElement(Va.tc,{form:Oa,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(Ja=li==null?void 0:li.program_attr)==null?void 0:Ja.identifier,answerKey:"standard_answers"}),le.createElement($e.Z,null)));if(mo==="PROGRAM"&&je.history.push(`/problems/${(ot=li==null?void 0:li.program_attr)==null?void 0:ot.identifier}/edit?type=exercises&express_id=${El.categoryId}&question_id=${li==null?void 0:li.id}&score=${li==null?void 0:li.score}&callback_url=${location.pathname}&select=${vr}&exercise=true`),mo==="PRACTICAL")return le.createElement(le.Fragment,null,le.createElement(Hi,{ref:Tr,editData:li,isEdit:!0}),le.createElement($e.Z,null))},yc=(li,mo)=>La(void 0,null,function*(){var Ja,ot,tt,Ut,Xt,pn;const rn=yield(Ja=Tr.current)==null?void 0:Ja.onSave();if(!rn)return;const $n=Jn=>{const vi=Jn.map(Ki=>Ki.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(vi).size!==vi.length},Rn={question_score:mo.score,analysis:rn.analysis};if(li==="SINGLE"||li==="MULTIPLE"||li==="JUDGMENT"){if(li!=="JUDGMENT"&&$n(rn==null?void 0:rn.choices)){Ct.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const Jn=[],vi=[];Rn.question_type=li==="JUDGMENT"?2:1,Rn.question_title=rn==null?void 0:rn.name,(ot=rn==null?void 0:rn.choices)==null||ot.forEach((or,Ki)=>{Jn.push(or.choice_text),or!=null&&or.is_answer&&vi.push(Ki+1)}),Rn.question_choices=Jn,Rn.standard_answers=vi}if(li==="COMPLETION"){let Jn=(tt=rn==null?void 0:rn.standard_answers)==null?void 0:tt.map((Ki,Vi)=>(Ki==null?void 0:Ki.score)<=0?Vi+1:null).filter(Ki=>Ki!==null);if((Jn==null?void 0:Jn.length)>0)return Ct.ZP.warning(`\u7B2C${Jn.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let vi=(Ut=rn==null?void 0:rn.standard_answers)==null?void 0:Ut.reduce((Ki,Vi)=>Ki+(Number(Vi==null?void 0:Vi.score)||0),0);if(parseFloat(vi.toFixed(2))!=(Rn==null?void 0:Rn.question_score))return Ct.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;Rn.is_ordered=rn.is_ordered,Rn.question_title=rn==null?void 0:rn.name,Rn.use_blank_score=rn==null?void 0:rn.use_blank_score,Rn.question_type=3;const or=[];(Xt=rn==null?void 0:rn.standard_answers)==null||Xt.forEach((Ki,Vi)=>{or.push({choice_id:Ki.position,answer_text:Ki.answer_text,score:Ki.score})}),Rn.standard_answers=or,Rn.downcase=rn==null?void 0:rn.downcase,Rn.no_space=rn==null?void 0:rn.no_space}if(li==="SUBJECTIVE"&&(console.log("editorData"),console.log(rn),Rn.question_title=rn==null?void 0:rn.name,Rn.question_type=4,Rn.answer_texts=rn==null?void 0:rn.answer_texts,Rn.use_keywords=rn==null?void 0:rn.use_keywords,Rn.keywords=rn==null?void 0:rn.keywords),li==="COMBINATION"){Rn.question_title=rn==null?void 0:rn.name,Rn.question_type=7;try{Rn.sub_questions=(pn=rn==null?void 0:rn.sub_item_banks)==null?void 0:pn.map((Jn,vi)=>{var or,Ki,Vi;if((Jn==null?void 0:Jn.item_type)=="single"||(Jn==null?void 0:Jn.item_type)=="multiple"){if($n(Jn==null?void 0:Jn.choices))throw new Error(`\u7B2C${vi+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const Xr=[],rr=[];return(or=Jn==null?void 0:Jn.choices)==null||or.forEach((_r,jr)=>{Xr.push(_r.choice_text),_r!=null&&_r.is_answer&&rr.push(jr+1)}),{id:Jn.id,question_id:Jn.id,question_title:Jn.name,difficulty:Jn.difficulty,question_type:(Jn==null?void 0:Jn.item_type)=="single"?0:(Jn==null?void 0:Jn.item_type)=="multiple"?1:2,question_choices:Xr,standard_answers:rr,analysis:Jn.analysis,question_score:Jn==null?void 0:Jn.score}}else if((Jn==null?void 0:Jn.item_type)=="completion"){let Xr=(Ki=Jn==null?void 0:Jn.standard_answer)==null?void 0:Ki.reduce((_r,jr)=>_r+(Number(jr==null?void 0:jr.score)||0),0);if(parseFloat(Xr.toFixed(2))!=(Jn==null?void 0:Jn.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const rr=[];return(Vi=Jn==null?void 0:Jn.standard_answer)==null||Vi.forEach((_r,jr)=>{rr.push({choice_id:_r.position,answer_text:_r.answer_text,score:_r.score})}),{id:Jn.id,question_id:Jn.id,is_ordered:Jn.is_ordered,question_title:Jn.name,difficulty:Jn.difficulty,question_type:3,standard_answers:rr,use_blank_score:Jn.use_blank_score,analysis:Jn.analysis,downcase:Jn==null?void 0:Jn.downcase,no_space:Jn==null?void 0:Jn.no_space,question_score:Jn==null?void 0:Jn.score}}else if((Jn==null?void 0:Jn.item_type)=="subjective")return{id:Jn.id,question_id:Jn.id,question_title:Jn.name,question_type:4,difficulty:Jn.difficulty,answer_texts:Jn==null?void 0:Jn.answer_texts,analysis:Jn.analysis,question_score:Jn==null?void 0:Jn.score,use_keywords:Jn.use_keywords,keywords:Jn==null?void 0:Jn.keywords}})}catch(Jn){Ct.ZP.warning(Jn.message);return}delete Rn.analysis}let Yn=!1;(mo==null?void 0:mo.is_my)===1&&(Yn=yield new Promise((vi,or)=>{Ue.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:()=>{vi(!0)},onCancel:()=>{vi(!1)}})})),Yn&&(Rn.is_cover=1);const Pi=li!=="PRACTICAL"?yield(0,Ye.ZP)(`/api/exercise_questions/${mo.id}.json`,{method:"put",body:Rn}):yield(0,Ye.ZP)(`/api/exercise_questions/${mo.id}/update_shixun_score.json`,{method:"post",body:Aa({},rn)});(Pi==null?void 0:Pi.status)===0&&(Ct.ZP.success("\u7F16\u8F91\u6210\u529F"),Wu(vr+1),pr(null))}),bd=()=>La(void 0,null,function*(){(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,Ye.ZP)(`/api/exercises/${El.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield kr(vr),Ct.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,je.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),_d=({value:li}={})=>{var mo;const Ja=[];let ot=[];const tt=(mo=li==null?void 0:li.choices)==null?void 0:mo.map((Xt,pn)=>{var rn;const $n=pn+1;return Xt!=null&&Xt.is_answer&&(Ja.push($n),ot.push($n)),{value:$n,label:le.createElement(ze.Z,{className:"c-black font14",value:`${(rn=eo.k4)==null?void 0:rn[pn]}. ${Xt==null?void 0:Xt.choice_text}`}),disabled:Xt==null?void 0:Xt.origin_standard_answer}}),Ut=Ue.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 ",Ja==null?void 0:Ja.map(Xt=>{var pn;return(pn=eo.k4)==null?void 0:pn[Xt-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(Ft.default.Group,{className:"flex-col mt20",options:tt,defaultValue:ot,onChange:Xt=>{ot=Xt}})),onOk:()=>La(void 0,null,function*(){const Xt=yield(0,Ye.ZP)(`/api/exercises/${El.categoryId}/questions/${li==null?void 0:li.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:ot}});(Xt==null?void 0:Xt.status)===0&&(Ct.ZP.success("\u4FEE\u6539\u6210\u529F"),Wu(vr+1))})})},Fd=(to=Qt==null?void 0:Qt.questionList)==null?void 0:to.reduce((li,mo)=>li+Number(mo.questions_score),0),ch=sr&&((So=Qt==null?void 0:Qt.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:li=>{const mo=document.getElementById("id_left_preview");mo.style.overflowY="auto"},onMouseLeave:li=>{const mo=document.getElementById("id_left_preview");mo.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:Gt}),le.createElement("span",null,"\u9898\u6570(\u9053)"),le.createElement("aside",null,Qt==null?void 0:Qt.all_questions_count)),le.createElement("div",{className:"mr30 ml30"},le.createElement("img",{src:en}),le.createElement("span",null,"\u603B\u5206(\u5206)"),le.createElement("aside",null,Fd&&Fd.toFixed(1))),le.createElement("div",null,le.createElement("img",{src:Le}),le.createElement("span",null,"\u65F6\u957F(\u5206)"),le.createElement("aside",null,((gr=Qt==null?void 0:Qt.exam)==null?void 0:gr.time)===-1||((mr=Qt==null?void 0:Qt.exam)==null?void 0:mr.time)===null?"\u4E0D\u9650":(yr=Qt==null?void 0:Qt.exam)==null?void 0:yr.time))),(_i=Qt==null?void 0:Qt.questionList)==null?void 0:_i.map((li,mo)=>{var Ja;return le.createElement("div",{className:Te.list,key:mo},le.createElement("div",{className:Te.name},le.createElement("b",null),le.createElement("span",null,li.name)),le.createElement("aside",null,le.createElement("div",null,"\u5171",le.createElement("span",{className:Te.b},li.questions_count),"\u9898 ",le.createElement("span",{className:Te.l},"|"),"\u5171",le.createElement("span",{className:Te.r},li.questions_score),"\u5206"),le.createElement("div",{className:Te.answerSheet},(Ja=li==null?void 0:li.questions)==null?void 0:Ja.map((ot,tt)=>le.createElement("div",{onClick:()=>{const Ut=`Anchor_${ot==null?void 0:ot.id}`;let Xt=document.getElementById(Ut);Xt&&setTimeout(()=>Xt.scrollIntoView({block:"center",behavior:"smooth"}))},key:ot==null?void 0:ot.id,className:Te.tag},tt+1)))))})),le.createElement("div",{className:Te.right},le.createElement("div",{className:Te.examName,id:"examName"},le.createElement("div",{className:Te.name},le.createElement(ut.Z,{title:(Ii=Qt==null?void 0:Qt.exam)==null?void 0:Ii.name,getPopupContainer:li=>li.parentNode},le.createElement("span",{className:Te.t},(Wr=Qt==null?void 0:Qt.exam)==null?void 0:Wr.name))),sr&&((Zo=Qt==null?void 0:Qt.exam)==null?void 0:Zo.exercise_status)===1&&le.createElement(Ln.op,{openLoading:!0,shape:"default",onClick:()=>{Ue.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},(Mr=Qt==null?void 0:Qt.questionList)==null?void 0:Mr.map((li,mo)=>{var Ja,ot;return le.createElement(le.Fragment,{key:mo},le.createElement("div",{className:Te.head,style:mo===0?{border:0,marginTop:-16}:{}},le.createElement("div",{className:Te.name},le.createElement("b",null),le.createElement("span",null,li.name)),le.createElement("div",{className:Te.so},"\u5171",le.createElement("span",{className:Te.b},li.questions_count," "),"\u9898 ",li.type==="COMBINATION"&&`\uFF08\u5305\u542B${(Ja=li==null?void 0:li.questions)==null?void 0:Ja.map(tt=>{var Ut;return(Ut=tt==null?void 0:tt.sub_item_banks)==null?void 0:Ut.length}).reduce((tt,Ut)=>tt+Ut)}\u5C0F\u9898\uFF09`,le.createElement("span",{className:Te.l},"|"),"\u5171",le.createElement("span",{className:Te.r},li.questions_score),"\u5206"),!sr&&le.createElement("div",{className:Te.btn},le.createElement(We.ZP,{onClick:()=>{Rc(li)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),le.createElement(We.ZP,{onClick:()=>au(li),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(ot=li==null?void 0:li.questions)==null?void 0:ot.map((tt,Ut)=>{var Xt,pn,rn,$n;return Rr===(tt==null?void 0:tt.id)?le.createElement("div",{id:`Anchor_${tt==null?void 0:tt.id}`,className:Te.content,style:{padding:0,marginTop:24},key:tt==null?void 0:tt.id},le.createElement("div",{style:{float:"right",marginTop:`${(li==null?void 0:li.type)==="PRACTICAL"?"-2px":"-6px"}`}},le.createElement(We.ZP,{onClick:()=>pr(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),le.createElement(We.ZP,{onClick:()=>{yc(li==null?void 0:li.type,tt)},type:"primary"},"\u4FDD\u5B58")),Au(tt,li.type)):le.createElement("div",{id:`Anchor_${tt==null?void 0:tt.id}`,className:Te.content,key:tt==null?void 0:tt.id},le.createElement("div",{className:Te.titleWrap},(tt==null?void 0:tt.item_type)==="bprogram"?le.createElement(ze.Z,{style:{paddingRight:10},value:Ut+1+"\u3001"+((Xt=tt==null?void 0:tt.program_attr)==null?void 0:Xt.description)}):le.createElement(ze.Z,{style:{paddingRight:10},className:Te.titleHtml,value:Ut+1+`\u3001${(tt==null?void 0:tt.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(tt==null?void 0:tt.name)}),sr&&le.createElement(We.ZP,{onClick:()=>{var Rn,Yn,Pi;if(Rr){Ct.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Oa.setFieldsValue({standard_answers:tt==null?void 0:tt.standard_answer,hack:Aa(Aa({},tt),tt==null?void 0:tt.program_attr),hack_codes:Wa(Aa({},tt==null?void 0:tt.program_attr),{code:No.Base64.decode(((Rn=tt==null?void 0:tt.program_attr)==null?void 0:Rn.code)||"")}),hack_sets:Aa({},(Yn=tt==null?void 0:tt.hack_sets)==null?void 0:Yn[0])}),(tt==null?void 0:tt.item_type)=="program"?je.history.push(`/problems/newedit/${(Pi=tt==null?void 0:tt.program_attr)==null?void 0:Pi.identifier}?type=exercises&express_id=${El.categoryId}&question_id=${tt==null?void 0:tt.id}&score=${tt==null?void 0:tt.score}&exercise=true&callback_url=/classrooms/${El.coursesId}/exercise/${El.categoryId}/detail?random=true`):pr(tt==null?void 0:tt.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!ch&&le.createElement(We.ZP,{disabled:ch,className:"ml20",onClick:()=>Rd(tt==null?void 0:tt.id,li.type,Ut,li),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(tt==null?void 0:tt.item_type)==="bprogram"&&le.createElement(ze.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:Te.titleHtml,value:No.Base64.decode(((pn=tt==null?void 0:tt.program_attr)==null?void 0:pn.code)||"")}),(li.type==="SINGLE"||li.type==="JUDGMENT"||li.type==="MULTIPLE")&&rc(tt),li.type==="COMPLETION"&&ad(tt),li.type==="SUBJECTIVE"&&oc(tt),li.type==="PROGRAM"&&vc(tt),li.type==="BPROGRAM"&&Tc(tt),li.type==="COMBINATION"&&rs(tt,Ut),li.type==="PRACTICAL"&&du(tt),le.createElement(lt.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},((rn=Qt==null?void 0:Qt.exam)==null?void 0:rn.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(li.type)&&le.createElement(vt.Z,null,le.createElement(Qr.Z,{state:tt==null?void 0:tt.is_wrong,onClick:()=>{wr==null||wr({value:Wa(Aa({},tt),{question_id:tt==null?void 0:tt.id,question_score:tt==null?void 0:tt.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(li.type)&&(tt==null?void 0:tt.show_resubmit)&&le.createElement(vt.Z,null,le.createElement(Fi.C,{dataSource:Wa(Aa({},tt),{question_id:tt==null?void 0:tt.id})})),(($n=Qt==null?void 0:Qt.exam)==null?void 0:$n.exercise_status)===3&&["SINGLE"].includes(li.type)&&le.createElement(vt.Z,null,le.createElement(We.ZP,{style:{color:"#3061D0"},onClick:()=>{_d({value:tt})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),sr?le.createElement(Ln.vr,null,le.createElement(Oe.Z,{showTotal:Xe.rU,total:(Er=Qt==null?void 0:Qt.exam)==null?void 0:Er.total_num,pageSize:1,current:vr+1,showSizeChanger:!1,onChange:Wu,showQuickJumper:!1,hideOnSinglePage:!1})):le.createElement(Ln.vr,{LeftContent:le.createElement(Ln.op,{onClick:Dn,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:le.createElement(lt.Z,{align:"middle"},le.createElement(te.Z,{color:"#55575D",overlayClassName:Te.popover,open:Na,getPopupContainer:li=>li==null?void 0:li.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(Ln.op,{onMouseEnter:()=>_o(!0),onMouseLeave:()=>_o(!1),onClick:()=>ac(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),le.createElement(Ln.op,{shape:"default",type:"primary",onClick:()=>Yt(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),le.createElement(Ya,{visible:xa,questionParams:Po.current,getdata:Bi,onRandomExchange:()=>La(void 0,null,function*(){const li=Po.current;yield lr({single_question_id:li.id,seleted_item_bank_ids:li.ids},{type:li.type,index:li.index}),$a(!1)}),selectFromProblemSet:()=>{const li=Po.current,mo=`${location.pathname}${location.search}`;mo.includes("exercise")&&je.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${li.id}&qtype=${li.type}&exerciseid=${El.categoryId}&from=${mo}`)},onCancel:()=>{$a(!1)}}))}},56682:function(On,mn,pe){"use strict";pe.r(mn),pe.d(mn,{default:function(){return zl}});var le=pe(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=pe(8591),ut=pe(78241),We=pe(66104),Ue=pe(24459),Me=pe(60341),Ct=pe(71418),Pt=pe(92832),$e=pe(19842),Ft=pe(5112),lt=pe(95237),vt=pe(5871),Oe=pe(3113),te=pe(7660),ee=Object.defineProperty,de=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,ve=(Cn,Ln,ai)=>Ln in Cn?ee(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,Ee=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))se.call(Ln,ai)&&ve(Cn,ai,Ln[ai]);if(de)for(var ai of de(Ln))he.call(Ln,ai)&&ve(Cn,ai,Ln[ai]);return Cn},Be=(Cn,Ln,ai)=>new Promise((Ji,Gi)=>{var Ti=Mi=>{try{oi(ai.next(Mi))}catch(ur){Gi(ur)}},Ri=Mi=>{try{oi(ai.throw(Mi))}catch(ur){Gi(ur)}},oi=Mi=>Mi.done?Ji(Mi.value):Promise.resolve(Mi.value).then(Ti,Ri);oi((ai=ai.apply(Cn,Ln)).next())});function Le(Cn){return Be(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${Cn}/edit_random_exam_new.json`,{method:"get"})})}function ze(Cn,Ln){return Be(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${Cn}/update_random_exam.json`,{method:"post",body:Ln})})}function je(Cn){return Be(this,null,function*(){return(0,te.ZP)("/api/examination_banks/create_random_exam.json",{method:"post",body:Cn})})}function Xe(Cn){return Be(this,null,function*(){return(0,te.ZP)("/api/disciplines.json",{method:"get",params:Cn})})}function Ye(Cn){return Be(this,null,function*(){return(0,te.ZP)("/api/item_banks/item_difficulty_count.json",{method:"get",params:Cn})})}function dt(Cn,Ln){return Be(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${Cn}/set_item_type_score.json`,{method:"post",body:Ln})})}function Ze(Cn,Ln){return Be(this,null,function*(){return(0,te.ZP)(`/api/exercises/${Cn}/set_item_type_score.json`,{method:"post",body:Ln})})}function Nt(Cn,Ln){return Be(this,null,function*(){return(0,te.ZP)(`/api/examination_banks/${Cn}/delete_item_type.json`,{method:"post",body:Ln})})}function at(Cn,Ln){return Be(this,null,function*(){return(0,te.ZP)(`/api/exercises/${Cn}/delete_item_type.json`,{method:"post",body:Ln})})}function kt(Cn){return Be(this,null,function*(){return(0,te.ZP)("/api/examination_banks/preview_random_questions.json",{method:"post",body:Cn})})}function xt(Cn){return Be(this,null,function*(){return(0,te.ZP)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:Cn})})}function Ot(Cn){return Be(this,null,function*(){return(0,te.ZP)("/api/examination_banks/save_question_list.json",{method:"post",body:Cn})})}function Gt(Cn){return Be(this,null,function*(){return(0,te.ZP)(`/api/exercises/${Cn.categoryId}/edit.json`,{method:"get",params:Ee({},Cn)})})}var At=(Cn=>(Cn.OnlyFileFolder="1",Cn.OnlyKnowledge="2",Cn.OnlyDifficulty="3",Cn.FileFolderAndDiff="4",Cn.FileFolderAndKnowledge="5",Cn.KnowledgeAndDiff="6",Cn.All="7",Cn.Shixun="8",Cn))(At||{}),qe=pe(89392),Ve=Object.defineProperty,_t=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,ln=(Cn,Ln,ai)=>Ln in Cn?Ve(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,Wn=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))jt.call(Ln,ai)&&ln(Cn,ai,Ln[ai]);if(yn)for(var ai of yn(Ln))en.call(Ln,ai)&&ln(Cn,ai,Ln[ai]);return Cn},un=(Cn,Ln)=>_t(Cn,vn(Ln)),kn=(Cn=>(Cn[Cn.FileFolder=1]="FileFolder",Cn[Cn.Difficulty=2]="Difficulty",Cn[Cn.Knowledge=3]="Knowledge",Cn))(kn||{});const wt=(0,le.createContext)(null),jn={[At.OnlyFileFolder]:[1],[At.OnlyKnowledge]:[3],[At.OnlyDifficulty]:[2],[At.FileFolderAndDiff]:[1,2],[At.FileFolderAndKnowledge]:[1,3],[At.KnowledgeAndDiff]:[3,2],[At.All]:[3,2,1]},ci=(Cn,Ln)=>{if(Cn.length!==Ln.length)return!1;for(const ai of Ln)if(!Cn.includes(ai))return!1;return!0},Ge=Cn=>{for(const[Ln,ai]of Object.entries(jn))if(ci(Cn,ai))return Ln},be={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",COMPLETION:"\u586B\u7A7A\u9898",JUDGMENT:"\u5224\u65AD\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898"},Pe={1:{label:"\u7B80\u5355",color:"#46B70E"},2:{label:"\u9002\u4E2D",color:"#165DFF"},3:{label:"\u56F0\u96BE",color:"#EE6F1A"}},Ne=Cn=>Cn&&parseFloat(Cn.toFixed(1)),Ie=(Cn,Ln)=>{var ai,Ji,Gi;switch(Ln.type){case"init":return Ln.payload;case"updateBaseInfo":return un(Wn({},Cn),{examination_bank:Ln.payload});case"deleteQuestionType":{const{item_types:Ti}=Cn,Ri=Ti.filter(oi=>oi.item_type!==Ln.payload);return Cn.examination_bank.question_count=Ne(Ri.reduce((oi,Mi)=>oi+Mi.item_bank_count,0)),Cn.examination_bank.total_score=Ne(Ri.reduce((oi,Mi)=>oi+Mi.total_score,0)),un(Wn({},Cn),{item_types:Ri})}case"setQuestionType":{const{item_types:Ti=[]}=Cn,Ri=Ti.map(Mi=>Mi.item_type),oi=Ti.filter(Mi=>Ln.payload.includes(Mi.item_type));for(const Mi of Ln.payload)Ri.includes(Mi)||(Mi==="PRACTICAL"?oi.push({item_type:Mi,contents:[],item_banks:[],item_bank_count:0,item_bank_num:0,item_type_text:be[Mi],random_rule_type:At.Shixun,score:0,total_score:0}):oi.push({item_type:Mi,contents:[],item_bank_count:0,item_type_text:be[Mi],score:0,total_score:0}));return un(Wn({},Cn),{item_types:oi})}case"updateItemTypes":return un(Wn({},Cn),{item_types:Ln.payload});case"deleteRule":{const Ti=(0,qe.cloneDeep)(Cn),Ri=Ti.item_types.find(Mi=>Mi.item_type===Ln.payload.itemType),oi=Ri.contents.find(Mi=>Mi.id===Ln.payload.id&&Mi.is_share==Ln.payload.is_share);return Ri.contents=Ri.contents.filter(Mi=>Mi!==oi),((ai=Ri.contents)==null?void 0:ai.length)===0&&(Ri.random_rule_type=[]),Ri.item_bank_count-=oi==null?void 0:oi.quanlity,Ti.examination_bank.question_count-=oi==null?void 0:oi.quanlity,Ri.total_score-=(oi==null?void 0:oi.quanlity)*Ri.score,Ti.examination_bank.total_score-=(oi==null?void 0:oi.quanlity)*Ri.score,Ri.total_score=Ne(Ri.total_score),Ti.examination_bank.total_score=Ne(Ti.examination_bank.total_score),Ti.contents=Ri.contents,Ti}case"changeQuestionNum":{const Ti=(0,qe.cloneDeep)(Cn),Ri=Ti.item_types.find(ga=>ga.item_type===Ln.payload.itemType),oi=(Ji=Ri==null?void 0:Ri.contents)==null?void 0:Ji.find(ga=>ga.id===Ln.payload.id);if(Ln.payload.itemType==="PRACTICAL")return Ln.payload.num&&(Ti.examination_bank.question_count=Ti.examination_bank.question_count-Ri.item_bank_count+Ln.payload.num,Ti.examination_bank.total_score=Ne(Ti.examination_bank.total_score-Ri.total_score+Ln.payload.num*Ri.score)),Ln.payload.score&&(Ti.examination_bank.total_score=Ne(Ti.examination_bank.total_score-Ri.total_score+Ln.payload.num*Ri.score)),Ri.item_bank_count=Ln.payload.num,Ri.total_score=Ne(Ri.item_bank_count*Ri.score),Ti;Ti.examination_bank.question_count=Ti.examination_bank.question_count-(oi==null?void 0:oi.quanlity)+Ln.payload.num;const Mi=Ri.contents.find(ga=>ga.id===Ln.payload.id&&ga.teacher_group_id===Ln.payload.teacher_group_id);Mi.quanlity=Ln.payload.num;let ur=0,Hr=0;for(const ga of Ri.contents)ur+=ga==null?void 0:ga.quanlity,Hr+=(ga==null?void 0:ga.quanlity)*Ri.score;return Ti.examination_bank.total_score=Ne(Ti.examination_bank.total_score-Ri.total_score+Hr),Ri.item_bank_count=ur,Ri.total_score=Ne(Hr),Ti}case"changeQuestionScore":{const Ti=(0,qe.cloneDeep)(Cn),Ri=Ti.item_types.find(oi=>oi.item_type===Ln.payload.itemType);return Ri.score=Ln.payload.score,Ri.total_score=Ne(Ri.item_bank_count*Ri.score),Ti.examination_bank.total_score=Ne(Ti.item_types.reduce((oi,Mi)=>oi+Mi.total_score,0)),Ti}case"editRule":{const Ti=(0,qe.cloneDeep)(Cn),Ri=Ti.item_types.find(oi=>oi.item_type===Ln.payload.itemType);return Ri.contents=Ln.payload.tableData.map(oi=>un(Wn({},oi),{item_type:Ln.payload.itemType,random_rule_type:Ln.payload.randomRuleType})),Ri.random_rule_type=Ln.payload.randomRuleType,Ri.item_bank_count=Ri.contents.reduce((oi,Mi)=>oi+(Mi==null?void 0:Mi.quanlity),0),Ri.score=Ri.score||1,Ri.total_score=Ne(Ri.item_bank_count*Ri.score),Ti.examination_bank.question_count=Ti.item_types.reduce((oi,Mi)=>oi+Mi.item_bank_count,0),Ti.examination_bank.total_score=Ne(Ti.item_types.reduce((oi,Mi)=>oi+Mi.total_score,0)),Ti}case"addShixun":{const Ti=(0,qe.cloneDeep)(Cn),Ri=Ti.item_types.find(oi=>oi.item_type==="PRACTICAL");return Ri.item_banks=Ln.payload.shixunList,Ti.examination_bank.question_count=Ti.examination_bank.question_count+1,Ri.item_bank_num=Ri.item_banks.length,Ri.item_bank_count=Ri.item_bank_count||1,Ri.score=Ri.score||1,Ri.total_score=Ri.total_score||Ri.score*Ri.item_bank_count,Ti.examination_bank.total_score=(Gi=Ti==null?void 0:Ti.item_types)==null?void 0:Gi.map(oi=>oi.total_score).reduce((oi,Mi)=>oi+Mi),Ti}case"deleteShixunQuestion":{const Ti=(0,qe.cloneDeep)(Cn),Ri=Ti.item_types.find(oi=>oi.item_type==="PRACTICAL");return Ri.item_banks=Ri.item_banks.filter(oi=>oi.id!==Ln.payload.shixunId),Ri.item_bank_num-=1,Ri.item_bank_count>Ri.item_bank_num&&(Ri.item_bank_count-=1,Ri.total_score-=Ri.score,Ri.total_score=Ne(Ri.total_score)),Ti}}};var xe=pe(66231),ct=Object.defineProperty,Lt=Object.defineProperties,et=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,ft=(Cn,Ln,ai)=>Ln in Cn?ct(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,$t=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))Bt.call(Ln,ai)&&ft(Cn,ai,Ln[ai]);if(it)for(var ai of it(Ln))Dt.call(Ln,ai)&&ft(Cn,ai,Ln[ai]);return Cn},xn=(Cn,Ln)=>Lt(Cn,et(Ln)),an=(Cn,Ln,ai)=>new Promise((Ji,Gi)=>{var Ti=Mi=>{try{oi(ai.next(Mi))}catch(ur){Gi(ur)}},Ri=Mi=>{try{oi(ai.throw(Mi))}catch(ur){Gi(ur)}},oi=Mi=>Mi.done?Ji(Mi.value):Promise.resolve(Mi.value).then(Ti,Ri);oi((ai=ai.apply(Cn,Ln)).next())}),Tn=({courseOptions:Cn,setCurrentKey:Ln,loading:ai,form:Ji})=>{const{data:Gi,disabled:Ti,dispatch:Ri}=(0,le.useContext)(wt),oi=(0,Ue.useParams)(),Mi=(0,le.useRef)(!0),[ur,Hr]=(0,le.useState)(!1),ga=(0,le.useMemo)(()=>{var Ko,Ya,Va,No,Qr;if(!Cn.length||!Gi)return;const Fi=(Ko=Gi==null?void 0:Gi.examination_bank)==null?void 0:Ko.sub_discipline_id,eo=((Ya=Gi==null?void 0:Gi.examination_bank)==null?void 0:Ya.time)===-1?void 0:Mi.current?oi.id?(Va=Gi==null?void 0:Gi.examination_bank)==null?void 0:Va.time:((No=Gi==null?void 0:Gi.examination_bank)==null?void 0:No.time)||60:(Qr=Gi==null?void 0:Gi.examination_bank)==null?void 0:Qr.time;Mi.current=!1;let Vo=[];for(const ma of Cn)for(const ya of ma.children)ya.value===Fi&&(Vo=[ma.value,ya.value]);return xn($t({},Gi.examination_bank),{time:eo,course:Vo})},[Gi,Cn]);return(0,le.useEffect)(()=>{Ji.setFieldsValue($t({},ga))},[ga]),le.createElement(Ct.Z,{spinning:ai,size:"large",style:{position:"fixed",maxHeight:"100vh"},className:"mt30"},le.createElement("div",{className:Te.formWrap},le.createElement(ut.default,{form:Ji,autoComplete:"off",colon:!1,labelCol:{span:4},wrapperCol:{span:20},initialValues:ga||{difficulty:2,time:60},onValuesChange:(Ko,Ya)=>{const{course:Va=[]}=Ya,No=xn($t({},Ya),{sub_discipline_id:Va[1]||0});Ri({type:"updateBaseInfo",payload:No})}},le.createElement(ut.default.Item,{name:"name",label:"\u8BD5\u5377\u540D\u79F0",className:Te.baseLineHeight,rules:[{required:!0,validator:(Ko,Ya)=>{var Va;return((Va=Ya==null?void 0:Ya.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(ut.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"course",className:Te.baseLineHeight},le.createElement($e.Z,{className:Te.baseFormItem,disabled:Ti,size:"large",allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Cn,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:()=>Hr(!0)},"\u8054\u7CFB\u6559\u7814\u52A9\u7406")),le.createElement(ut.default.Item,{label:"\u96BE\u5EA6",name:"difficulty",className:Te.radioBtnWrapper,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},le.createElement(Ft.ZP.Group,{disabled:Ti,className:Te.radiogroup},le.createElement(Ft.ZP.Button,{className:Te.easy,value:1},"\u7B80\u5355"),le.createElement(Ft.ZP.Button,{className:Te.medium,value:2},"\u9002\u4E2D"),le.createElement(Ft.ZP.Button,{className:Te.hard,value:3},"\u56F0\u96BE"))),le.createElement(ut.default.Item,{label:"\u7B54\u9898\u65F6\u957F",className:Te.baseLineHeight},le.createElement(lt.Z,{align:"middle"},le.createElement(ut.default.Item,{name:"time",noStyle:!0},le.createElement(vt.Z,{className:Te.baseFormItem,min:1,disabled:Ti,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(ut.default.Item,{label:"\u8BD5\u5377\u987B\u77E5",name:"exam_notes"},le.createElement(Pt.default.TextArea,{rows:6,disabled:Ti,maxLength:65535,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u987B\u77E5"})))),le.createElement("div",{className:Te.fixedBottom},le.createElement(Oe.ZP,{className:`${Te.cancelBtn} mr5`,onClick:()=>{oi.id||window.location.href.indexOf("randompaper")>-1?Ue.history.push("/paperlibrary"):Ue.history.push(`/classrooms/${oi.coursesId}/exercise`)}},"\u53D6\u6D88"),le.createElement(Oe.ZP,{className:`${Te.confirmBtn} ml15`,type:"primary",size:"large",onClick:()=>an(void 0,null,function*(){if(yield Ji.validateFields(),!oi.id&&!oi.coursesId){const Ko=yield je(Gi);Ko.status===0&&(Ue.history.replace(`/randompaper/edit/${Ko==null?void 0:Ko.examination_bank_id}?type=settings`),Ln("settings"))}else Ln("settings")})},"\u4E0B\u4E00\u6B65")),le.createElement(xe.Z,{open:ur,onCancel:()=>{Hr(!1)}}))},Kn=pe(43418),dn=pe(43604),Qn={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"},pi=pe(57816),zn=pe(15965),Nn=pe(24905);const yi=[{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 Hi=({open:Cn,onCancel:Ln,onOk:ai})=>{const{data:Ji,dispatch:Gi}=(0,le.useContext)(wt);(0,le.useEffect)(()=>{if(Cn){const{item_types:oi}=Ji||{};Ri(oi==null?void 0:oi.map(Mi=>Mi.item_type))}},[Cn,Ji]);const[Ti,Ri]=(0,le.useState)([]);return le.createElement(Kn.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:Cn,onCancel:Ln,onOk:()=>ai(Ti)},le.createElement(Nn.default.Group,{value:Ti,onChange:oi=>Ri(oi)},le.createElement(lt.Z,{gutter:[0,20]},yi.map(oi=>le.createElement(dn.Z,{key:oi.value,span:6},le.createElement(Nn.default,{value:oi.value},oi.label))))))},cr=pe(1710),br=Object.defineProperty,gi=Object.getOwnPropertySymbols,di=Object.prototype.hasOwnProperty,wi=Object.prototype.propertyIsEnumerable,Qi=(Cn,Ln,ai)=>Ln in Cn?br(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,Li=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))di.call(Ln,ai)&&Qi(Cn,ai,Ln[ai]);if(gi)for(var ai of gi(Ln))wi.call(Ln,ai)&&Qi(Cn,ai,Ln[ai]);return Cn},fr=({open:Cn,onCancel:Ln,onOk:ai})=>{const{data:Ji}=(0,le.useContext)(wt),[Gi,Ti]=(0,le.useState)();console.log("--xxx-",Gi),(0,le.useEffect)(()=>{Cn&&Ti((0,qe.cloneDeep)(Ji))},[Cn,Ji]);const Ri=(0,le.useMemo)(()=>{var oi;let Mi;return Mi=(oi=Gi==null?void 0:Gi.item_types)==null?void 0:oi.map(ur=>ur.total_score).reduce((ur,Hr)=>parseFloat(ur)+parseFloat(Hr)),Mi==null?void 0:Mi.toFixed(1)},[Gi]);return Cn?le.createElement(Kn.default,{title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C",open:Cn,width:640,centered:!0,closable:!0,onCancel:Ln,onOk:()=>{ai(Gi)}},le.createElement("div",{className:"c-black mb20"},"\u603B\u5206",le.createElement("span",{className:"ml10 c-light-primary"},Ri)),le.createElement(cr.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,Mi){const{score:ur,item_type:Hr}=Mi;return le.createElement("div",{style:{color:"#9096A3"}},"\u6BCF",((Mi==null?void 0:Mi.item_type)==="PRACTICAL","\u9898"),le.createElement(vt.Z,{precision:1,size:"large",className:"ml10 mr10",min:.1,disabled:(Mi==null?void 0:Mi.item_bank_count)===0,max:100,onChange:ga=>{const Ko=Gi,Ya=Ko.item_types.find(No=>No.item_type===Hr);Ya.score=Number(ga);const Va=ga*Ya.item_bank_count;Ya.total_score=Va&&Number(Va.toFixed(1)),Ko.examination_bank.total_score=Ko.item_types.reduce((No,Qr)=>Number(No)+Number(Qr.total_score),0),Ti(Li({},Ko))}}),"\u5206")}}],className:Qn.setScoreModalTable,dataSource:Gi==null?void 0:Gi.item_types,rowKey:"item_type",pagination:!1})):null},Ae=pe(99313),Ei=pe(57809),Sr=pe(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=",xi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA4RJREFUWEftWEtrE1EYPXfSh5VWSlMfNSi4sokLK30pWtuKIChVVBBBWpfiRhcKghii7tp/4FrBBxREXbhQ0Bj7gqokahe+kNZWqa21tLGtk7kymY5J79yZL5NUKNLZZHHnzj33fOec+90wzrkHS/hhywBzrM4ygzkSiP+EwTdtPvDJdnDeCI4KgBPEsGGAPYOn8Bq23A7nwiLNYH+bD+rYSwBlloUYAzgH9F/Zo48pyhMoBVdR3ZkVUBpgV9MNcO24sb7OnA6GYtBEa75rbkCYL24wOcxGAPYUhSUXUH3/Cw0wXDUIziuMJYkFc6mluH+GcRSv2UYDfLxJtSWMwiuOUxsUC6Qot2iAD71q8ruZVNgtYFO/+m+yQKKm2UgGAMvU5GTvbqDyClC4LmUMuw+LTFiYdNDC7FdgIASMG57KHGDNdSB/tVyKltIJAESmRHziBmZHgf5WlwBrb6bihFrQmkdpCSDRiiyu+ozgyJzBujtpy1Jiy9XOAPqOuQRY35mKP8qdFvELBFJu1qH1HnUL8K59iV0DFtwqc3PPIQnAH+3noGmXAK1k4YnhxoaS8joqQgFYOaBUAlBSedbTIgCcuLwBc78+SW3qWnJUzkjG8/yAZ3Nqd937BYDfghvB4x+NQJ5vAMycozRvOVOF+Rk1FaVAkQEquX73PkmJh89EwXngn5+5dhsuPgwopYYZu/ZKAA6dDkLTQhaAlhKLDAsvuJWE+X5RDbCi1jBjpEkCcPCsH4mpmKXEVIksbZiAkDxz5zWZVwaUnjS6pkiDTcx8aI2CscCCRtStJqmjzKmtLD8FeLxAZKcNwPcnguCJ0II1SAYERJSJnUxX0gysagbC2+0YbPNDnY79rZrk6LR+n0DkRsP5a4GK80C4xuEkeXswCvCAfaOawV3E1K2+DGUaUeO+i4AlB9NpeX0gCGihpA6zeahcpBB7W4Bo0IHBgSN+zP2MGVuX1ZiihHKJOC5IpMAHfH7gAFAfetUYBUcgGwIXZc73d0BixqEffNGQ5mYi1yjCSFdLKhIfA6ZHHQBGm/2YmYpJ2bAEN4nAmVRZjKmzwOQQcWnq3focnNdTBwV9n88yhuKj95xb/i5/HdSpRwBbmfpXIRPTCIS5ycF0U3o8O+g7SWR9FebiHeCJXQArkNdKYIiqODXO2G9A6cCeiRANcFEsmf1HlgFmz50xc8kz+AfHHTJwrKNsNwAAAABJRU5ErkJggg==",zi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABWlJREFUWEftV1tsVEUY/ubspUu3W9mWGlttwXqJVRNBbqIFDbyA8mCCkAYtpEaIGBODhBCECiG+UE1EnzTempYqtSAE45saBMX40JC0IRojpd1GKM1uW7bd7V7OOWPmnD3bPTNndxYbE2I6L2dzdubMN9/3/ZchlFIXbuNB5gDOUp05BmdJIP4fDPZcxt2xaRzVgadBUQ3QDDEE5m/2zBkE1whwoYTg461LcX42LEoZZOCiMXoJoBUCHEIASgH2dBqUgijKORfBkW3/EqgUYNsPieMAmtj+Fhb2NIfFXvaFnUhCQBlI6wD8dGcBrisEP5V7fft2NuJvKcC9p6PDoLSa7cwTJgKejZj8WjLm93iWSAG2tI+qEsdlvywl6BZPqBByQgpw44fDKskEAQUF+82e5rBrxCvGz7fWZr+XkZ/ZwFTIbgkKel0K8LkPhlW2uLbSh9UNQfh9btGLIrIZ7E7WyDkaf8xYQsX538cwHE4YgKUAnz0WMgC+/EwNSn1uR5MVEcxZ/xbjUgbyi3PXDNNLAW44FjIk3rOxNpvtCseuCEFCMGcUc/2734YMFaQA178fUhlDB56vy+4s27AYlgrOocA7Z0IG60UDPLypLm8BEQBncnc2X3ITijng4ZMhM8vK+kHGIIuyI5sXZgsGn//ECmOvgMJ8rgA5/f92T8hM8rkAX/psZI+u4yClesAWhhLNhPTBpSMhfeSkF7eLoP5OHzY8FoSizGzU+vWQmXosgLvPTNTGJpNXi8lvPF4hPwoZW0YZsKw+gMWLSrMV1ASYE8V7e27WTUwnB7IzsrFVjOXzdDVWOpfgY+YO+j3YvKrCWMEkP9g9ZHjeJvErnaN9oHhYgCSrYQ5F2echKPcpSGkUE9PU3vXkMeWWJxcg6HcZAA+cGDIosgHc0THaqun0EN8ViFFqdij5SlTT8jKsa5gHJdPF/DaQwCcXotkCme+8y+/zY1m937D/W19yHmSs7eoeb0gm0v1Wi2QBEGpuAcm8buCjF6tmWqyMHPu/iWAkahQlseZm0lKw1I2mRlPm/V2D9iCxZG1pH+2j4GR2KB1lJaaE8TSTUDf88kiNB2sfKsWCMgWlXgVVARfG4xp+/iuBU72xmca7gGW2NlYaMu/vYgxyaYaBbGkPt+pUP5Trw1xGa4Nu7FhdjkULPBlDUwxGVLgVgsFIGj/+MY0rYdXwzzwvQTzFOiDHi4Fj9K14wI+V9/uxr3PQuZLs6hxviKnpfttVI+fERzdVoPoOsWmYiGt4ozsCncnFA+JeFGp0KwJuNK+pwL6OPBKzYzV/npHZoZN/74UK3OUAMJ7S8VpXBJoRsPYgEhBLskLzmkq0nR7OX+q2t4fNaHYYtUEXdq4O4N6MxGzKnzfSiExpqJnvRm8oiYtXkhiJasZqj8vMMCqzaebAsvbsiQf9OHXxRv5+kEXzZFzvt+5qgiQEmO8jhseSGjAW0w0wJW7g8Tovnqovgb+EGO+XLvTCRYBITEd3bxy/DqREQrnmojLgRt/VMaN7z9ssNLeP94GPZotR2d2CECy5x40315XZNIgldbz61U15aSLASHgSqqblB9hyfKpV07WMzHaXi3lS3NPrAnav9ePRGjOgVI3i5KUEvrucEm6HfFix2h6dnMbNqen8AHd1pxpiyWS/mS0lYSncj2cWVJURBHwEI1Ed8VQ+8sSoSasqro9OFL40beuM/UIpXSnczvjbF387484jK+VODDL/3QiPny3YsG7vGFsRT+rfE5BSC6QjB7IWWfY/91FrrwRRV0k76i2fhhcnk2obqN4IQrxOAGWevEV8UIiS1iltO/t69SEpQHnI/bcz5gDOlt/bnsF/AOXAMnuF/cdAAAAAAElFTkSuQmCC",qi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABpxJREFUWAntWE2IHFUQrtfzk5nNbrKbRGPcRSU/oIEkmERjMAQhCBIjKBpFEBER9OZNL4IevOhFbyGHRA9BhKBeouJFIkTNwaxGg16ikN1k0WR3M5ndnf/ptr56r7p7+s1mkYCHkILpev1e1VdfVb3X0zNEt+Qmr4Dpl9+xs9FYq0XvR0SPUETriC9WYI6x72YML0T0By99Gxj68KWd5k/ndEPKiwRy7RadZSKrDEdDVGiRxfnZ9YjJM1MTUScydIwn371Roh7BD042P2Hg5xHRxRON+6R6WlE7m1wzGRjT4ZnTjNOFjQkYIbQ68UlGURhSYIIpTu7k6N7CkWeN6XoE3zoxP8WMuK22kemG6ngxel4CWQeubpw1AmQrkFpnyx9HVg/uy8MuLbPV5uJ7DuloUDhlA8hWSAxS8SSEZy6zi152V2pX3/YJzjVlH8EtYkTDUaAhOobuJ0vZL7XuJWzoKY9gtd6JY5eKAQ0PFOL7/2NQqbWp0eKNCjFmk0fQVsvQ2Opl9Pj2NZQPeGdnWpu5jbtu68zA2uV4QsIll+sAdPigfPXzNF2cafKBCo1HUFF2bRiikQEmx/If9042H49vdm9qTKsDenD9EE1O263mbaaDhy7FeWf3jBe5F5mXe5+b+gyFhiy17rWKK+NVcGQ5ppRjpheZW680/oQQSy5LAiSmGHGpPYKyB/WUZnurvFUDJD32eodFJQXjrGAN4nQ2Hq/4BGHsgtrHChKxAH38BT6+wED8LUCOt/CejSW6czhPF2badPqvJoUO2/o4ew0Y+yaE+xBkVwkEniBrd5KScEsOnwNo1TCjY5fQ6/uG6b51RXWlLWMNOvxdNaZD/J2GEKLF340dP+xZe0xjCPBxQTmIjqHtx67DRIiKDTuDUMb+3jsKPeQQYufdJRrjaiqezR/xgKGYVgM/5ItHEJZog22FHSuCEOZ1DQAbjPvZryz1gWYeQ2XMW0ahBOEYrPFhuFhjDDuvxWBtATi4GCUat7Ls5j0DVwW8tYyOeNBUa4Z0/nLbJQ8QJGu1XlMvd2LnoaQN4NQryBxi9YbbCrRpbYGa7Yh+mWzS7EKXxlbl6ZWHV9DalTn6+twC7V5f4q/LHE3Pd+nIqSrV2VYF1dfvd8xl97yts1o7/eLRf7B1RbSWCaSd5zdmem3vCtrFwVVanYjOTDTpgXuW0e9TLfr4hzmaWQhlew4WDc01JbwUfTF8zGtM4GLcp4JYSiRLDisHtg70kMNcMW+kWsfPzNOJX2uYEkELQQ6CVwCQcK8C8ThNGHYaE9ojCAPZu6xxOBEAGqLjvZvKdqLPFb7qn11WcjEhDNheW6b40BAsewR1EQYIJKApB8ytkJMIC1/WDuX8STfjYJIK4fWfA+BngIiOEdSJ9ywAAQAJmBvrhM5NzCbvjAqk+mKlI4kJDjuoRuI6hsYHotreKTNoe8I9grZmzkDqx4YwFgerPxtfYGAXwSLLFXMHdwzS09uXU6nAGFwe+ZpEmVJjzOm8aqwLpNM69vqx9ck337G8AML8BTsQQKHNL7CX50KavNqljbfnaYDfuiHnptr03jfX6O9qSAe2DNCjm8s034hocrbLEIa2jRVp22iRupxXpY7kBK1HG7wcY4a1EHerMqmXFz6aZW9bHWTBCbmHaTLGHATrq5YbarSJai2usbMt86+EJ7aW6bHNJZq61qU5JrplNPnp8OlPNfryHL8xS1/QFRsPsBg5eMH3WyzRYcJ5S0ZWy5grqho/cjG+WjdU51+/adsG3x8fb9AbX1TlEZMmx8D0zP1ld9A4TioeyTcvYoOWxfcJCrEcB0T3Edhqm5clvtg4TRLjGX4c/jblH6h8ztCawRwFjI1tBI0PyKoW4nzvPWZ03zE7tgGhRMf1tx2xPHt6wlNI2a0b/g/k/BV9hgiUXOq8HS5ei43iPSQJ8r6xiVocv4JBwJ79K5WtEOx0Tny0XdD8QfXPT0f0+dmWvKWAHfbqoe8b1MafGpKN0xiLn2r2z+X0GS6JyeW5o5VmPhfIW2b2y5xduDh44CABFqhUBa9nP1xGWw1dqoRUcy8M6JD6CF7mVLbDqOW1uF5vjpeK+YfEYQkCWYYZc4HQyxU+6Veqeme1Jpuc4t4CNFqdcY9g1yzbX2/WL+QCM9QLhzstl90/S1fUdg2FgWQT6EVLbNHpThjNhaa8Hz6e7DgcFVbPTxwNcrk9JgqH9bBkCWYDZPh7uNmWanuhVfhIVaIwOjUzeNfLZ141XPdbcpNX4F/ikyqlsA/6bwAAAABJRU5ErkJggg==",Gn={ruleCheckBox:"ruleCheckBox___Onj2f",folderAreaWrapper:"folderAreaWrapper___ut2mr",folderAreaHeader:"folderAreaHeader___fOIDA",folderWrapper:"folderWrapper___IpJ50",folderIcon:"folderIcon___zBoRM",shareFolderIcon:"shareFolderIcon____5s3p",treeNodeItem:"treeNodeItem___quqla",treeNodeDifficulty:"treeNodeDifficulty___en0gk"},ti=pe(57973),Zt=Object.defineProperty,Wt=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,on=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,ht=(Cn,Ln,ai)=>Ln in Cn?Zt(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,nn=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))cn.call(Ln,ai)&&ht(Cn,ai,Ln[ai]);if(on)for(var ai of on(Ln))Mt.call(Ln,ai)&&ht(Cn,ai,Ln[ai]);return Cn},gn=(Cn,Ln)=>Wt(Cn,Qe(Ln)),_n=(Cn,Ln,ai)=>new Promise((Ji,Gi)=>{var Ti=Mi=>{try{oi(ai.next(Mi))}catch(ur){Gi(ur)}},Ri=Mi=>{try{oi(ai.throw(Mi))}catch(ur){Gi(ur)}},oi=Mi=>Mi.done?Ji(Mi.value):Promise.resolve(Mi.value).then(Ti,Ri);oi((ai=ai.apply(Cn,Ln)).next())});const qn=(Cn,Ln,ai)=>Cn.map(Ji=>Ji.key===Ln?nn(nn({},Ji),ai):Ji.children?gn(nn({},Ji),{children:qn(Ji.children,Ln,ai)}):Ji),Et={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3},Pn=(Cn,Ln,ai)=>Cn.map(Ji=>{var Gi;const Ti=Ji==null?void 0:Ji.tag_disciplines.map(oi=>{const Mi=oi==null?void 0:oi.difficulty_count.map(ur=>({label:ur==null?void 0:ur.name,value:Et[ur.name]}));return{title:Ge(Ln)===At.All&&Mi.length>0?le.createElement(lt.Z,{justify:"space-between"},le.createElement(dn.Z,null,`${oi.name}\uFF08${oi.child_count}\uFF09`),le.createElement(dn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}_${oi.id}`,"diffValue"]},le.createElement(Nn.default.Group,{style:{columnGap:12},options:Mi})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}_${oi.id}`,"diffNum"],initialValue:oi==null?void 0:oi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}_${oi.id}`,"extra"],initialValue:gn(nn({},Ji),{type:ai})},le.createElement("input",{type:"hidden"})))):`${oi.name}\uFF08${oi.child_count}\uFF09`,key:`${Ji.id}_${oi.id}`,name:oi.name,parentName:Ji.name,item_banks_count:oi.child_count,icon:null,isLeaf:!0,checkable:Ge(Ln)===At.FileFolderAndKnowledge,disableCheckbox:oi.child_count===0}}),Ri=Ji==null?void 0:Ji.difficulty_count.map(oi=>({label:oi==null?void 0:oi.name,value:Et[oi.name]}));return{title:Ge(Ln)===At.FileFolderAndDiff&&Ri.length>0?le.createElement(lt.Z,{justify:"space-between"},le.createElement(dn.Z,null,`${Ji.name}\uFF08${Ji.item_banks_count}\uFF09`),le.createElement(dn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}`,"diffValue"]},le.createElement(Nn.default.Group,{style:{columnGap:12},options:Ri})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}`,"diffNum"],initialValue:Ji==null?void 0:Ji.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}`,"extra"],initialValue:gn(nn({},Ji),{type:ai})},le.createElement("input",{type:"hidden"})))):`${Ji.name}\uFF08${Ji.item_banks_count}\uFF09`,key:`${Ji.id}`,name:Ji.name,item_banks_count:Ji.item_banks_count,icon:oi=>oi.expanded?ai==="0"?le.createElement("img",{src:xi,className:Gn.folderIcon}):le.createElement("img",{src:zi,className:Gn.shareFolderIcon}):ai==="0"?le.createElement("img",{src:Fn,className:Gn.folderIcon}):le.createElement("img",{src:qi,className:Gn.shareFolderIcon}),isLeaf:!Ji.have_child&&!((Gi=Ji.tag_disciplines)!=null&&Gi.length),checkable:Ge(Ln)===At.OnlyFileFolder,disableCheckbox:Ji.item_banks_count===0,children:Ji.children.length?Ge(Ln)===At.All||Ge(Ln)===At.FileFolderAndKnowledge?[...Pn(Ji.children,Ln,ai),...Ti]:Pn(Ji.children,Ln,ai):[]}}),Xn=(Cn,Ln,ai)=>Cn.map(Ji=>{var Gi;const Ti=Ji==null?void 0:Ji.tag_disciplines.map(oi=>{console.log("tagItem:",oi);const Mi=oi==null?void 0:oi.difficulty_count.map(ur=>({label:ur==null?void 0:ur.name,value:Et[ur.name]}));return{title:Ge(Ln)===At.All&&Mi.length>0?le.createElement(lt.Z,{justify:"space-between"},le.createElement(dn.Z,null,`${oi.name}\uFF08${oi.child_count}\uFF09`),le.createElement(dn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}_${oi.id}`,"diffValue"]},le.createElement(Nn.default.Group,{style:{columnGap:12},options:Mi})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}_${oi.id}`,"diffNum"],initialValue:oi==null?void 0:oi.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}_${oi.id}`,"extra"],initialValue:gn(nn({},Ji),{type:ai})},le.createElement("input",{type:"hidden"})))):`${oi.name}\uFF08${oi.child_count}\uFF09`,key:`${Ji.id}_${oi.id}`,name:oi.name,parentName:Ji.name,item_banks_count:oi.child_count,icon:null,isLeaf:!0,checkable:Ge(Ln)===At.FileFolderAndKnowledge,disableCheckbox:oi.child_count===0}}),Ri=Ji==null?void 0:Ji.difficulty_count.map(oi=>({label:oi==null?void 0:oi.name,value:Et[oi.name]}));return{title:Ge(Ln)===At.FileFolderAndDiff&&Ri.length>0?le.createElement(lt.Z,{justify:"space-between"},le.createElement(dn.Z,null,`${Ji.name}\uFF08${Ji.item_banks_count}\uFF09`),le.createElement(dn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}`,"diffValue"]},le.createElement(Nn.default.Group,{style:{columnGap:12},options:Ri})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}`,"diffNum"],initialValue:Ji==null?void 0:Ji.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`${Ji.id}`,"extra"],initialValue:gn(nn({},Ji),{type:ai})},le.createElement("input",{type:"hidden"})))):`${Ji.name}\uFF08${Ji.item_banks_count}\uFF09`,key:`${Ji.id}`,name:Ji.name,item_banks_count:Ji.item_banks_count,icon:oi=>oi.expanded?ai==="0"?le.createElement("img",{src:xi,className:Gn.folderIcon}):le.createElement("img",{src:zi,className:Gn.shareFolderIcon}):ai==="0"?le.createElement("img",{src:Fn,className:Gn.folderIcon}):le.createElement("img",{src:qi,className:Gn.shareFolderIcon}),isLeaf:!Ji.have_child&&!((Gi=Ji.tag_disciplines)!=null&&Gi.length),checkable:Ge(Ln)===At.OnlyFileFolder,disableCheckbox:Ji.item_banks_count===0,children:[...Xn(Ji.children,Ln,ai),...Ti]}});var tn=({ruleValue:Cn,defaultData:Ln,setSelectData:ai,currentItemType:Ji,selectData:Gi})=>{const[Ti,Ri]=(0,le.useState)("1"),[oi,Mi]=(0,le.useState)(!0),[ur]=ut.default.useForm(),[Hr,ga]=(0,le.useState)([]),[Ko,Ya]=(0,le.useState)("all"),Va=(qt,sr,kr)=>{const{checkedNodes:vr}=sr;console.log("type:",kr,vr,Gi),kr==="0"?(Qr(qt),Ge(Cn)===At.OnlyFileFolder?(ai(lr=>gn(nn({},lr),{my:vr.map(Bi=>({id:Bi.key,group_id:Bi.key,group_name:Bi.name,item_bank_num:Bi.item_banks_count,folderType:"0",quanlity:1}))})),nt(vr.reduce((lr,Bi)=>lr+Bi.item_banks_count,0))):(console.log(vr),ai(lr=>gn(nn({},lr),{my:vr.map(Bi=>{const[wr,to]=Bi.key.split("_");return{id:Bi.key,tag_discipline_name:Bi.name,group_id:wr,tag_discipline_id:to,folderType:"0",group_name:Bi.parentName,item_bank_num:Bi.item_banks_count,quanlity:1}})})),nt(vr.reduce((lr,Bi)=>lr+Bi.item_banks_count,0)))):(eo(qt),Ge(Cn)===At.OnlyFileFolder?ai(lr=>(console.log("pre:",lr),gn(nn({},lr),{public:vr.map(Bi=>({id:Bi.key==="0"?"00":Bi.key,teacher_group_name:Bi.name,teacher_group_id:Bi.key,folderType:"3",item_bank_num:Bi.item_banks_count,quanlity:1}))}))):ai(lr=>gn(nn({},lr),{public:vr.map(Bi=>{const[wr,to]=Bi.key.split("_");return{id:Bi.key==="0"?"00":Bi.key,tag_discipline_name:Bi.name,teacher_group_id:wr,tag_discipline_id:to,folderType:"3",teacher_group_name:Bi.parentName,item_bank_num:Bi.item_banks_count,quanlity:1}})})),nt(vr.reduce((lr,Bi)=>lr+Bi.item_banks_count,0)))},[No,Qr]=(0,le.useState)([]),[Fi,eo]=(0,le.useState)([]),[Vo,ma]=(0,le.useState)([]),[ya,Fo]=(0,le.useState)([]),[aa,Do]=(0,le.useState)([]),[Or,Aa]=(0,le.useState)([]),[Wa,La]=(0,le.useState)(!1),[fl,xu]=(0,le.useState)(!1);function Qt(){return _n(this,null,function*(){let qt=yield(0,te.ZP)("/api/teach_group_shares.json",{method:"get"});qt&&ga(qt==null?void 0:qt.groups)})}(0,le.useEffect)(()=>{Qt()},[]);const Yt=qt=>_n(void 0,null,function*(){var sr,kr,vr,lr,Bi,wr,to,So,gr,mr,yr,_i;qt.type==="0"?La(!0):xu(!0);const Ii=yield(0,ti.ex)(qt);qt.type==="0"?La(!1):xu(!1),qt.type==="0"?Do(Ii):Aa(Ii);const Wr=(sr=Ii.navigation[0])==null?void 0:sr.difficulty_count.map(Mr=>({label:Mr==null?void 0:Mr.name,value:Et[Mr.name]})),Zo=(kr=Ii.navigation[0])==null?void 0:kr.tag_disciplines.map(Mr=>{const Er=Mr==null?void 0:Mr.difficulty_count.map(Tr=>({label:Tr==null?void 0:Tr.name,value:Et[Tr.name]}));return{title:Ge(Cn)===At.All&&Er.length>0?le.createElement(lt.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(dn.Z,null,`${Mr.name}\uFF08${Mr.child_count}\uFF09`),le.createElement(dn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:[`0_${Mr.id}`,"diffValue"]},le.createElement(Nn.default.Group,{style:{columnGap:12},options:Er})),le.createElement(ut.default.Item,{noStyle:!0,name:[`0_${Mr.id}`,"diffNum"],initialValue:Mr==null?void 0:Mr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.default.Item,{noStyle:!0,name:[`0_${Mr.id}`,"extra"],initialValue:{tag_discipline_name:Mr.name,name:"\u6839\u76EE\u5F55",type:qt.type}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},Mr.name,"\uFF08",Mr.child_count,"\uFF09"),key:`0_${Mr.id}`,name:Mr.name,parentName:"\u6839\u76EE\u5F55",item_banks_count:Mr.child_count,icon:null,isLeaf:!0,checkable:Ge(Cn)===At.FileFolderAndKnowledge,disableCheckbox:Mr.child_count===0}});if(qt.type==="0"){const Mr=Pn(Ii.data,Cn,"0"),Er=Xn(Ii.data,Cn,"0");console.log("normalChildren2:",Er),ma([{title:Ge(Cn)===At.FileFolderAndDiff?le.createElement(lt.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(dn.Z,null,`\u6839\u76EE\u5F55\uFF08${(vr=Ii.navigation[0])==null?void 0:vr.child_count}\uFF09`),le.createElement(dn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:["0","diffValue"],initialValue:[]},le.createElement(Nn.default.Group,{style:{columnGap:12},options:Wr})),le.createElement(ut.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(lr=Ii.navigation[0])==null?void 0:lr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.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${(Bi=Ii.navigation[0])==null?void 0:Bi.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(wr=Ii.navigation[0])==null?void 0:wr.child_count,disabled:!(((to=Ii.navigation[0])==null?void 0:to.child_count)>0),checkable:Ge(Cn)===At.OnlyFileFolder,icon:Tr=>Tr.expanded?le.createElement("img",{src:xi,className:Gn.folderIcon}):le.createElement("img",{src:Fn,className:Gn.folderIcon}),isLeaf:!1,children:Ge(Cn)===At.OnlyFileFolder||Ge(Cn)===At.FileFolderAndDiff?Mr:[...Er,...Zo]}])}else{const Mr=Pn(Ii.data,Cn,"3");Fo([{title:Ge(Cn)===At.FileFolderAndDiff?le.createElement(lt.Z,{justify:"space-between"},le.createElement(dn.Z,null,`\u6839\u76EE\u5F55\uFF08${(So=Ii.navigation[0])==null?void 0:So.child_count}\uFF09`),le.createElement(dn.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(ut.default.Item,{noStyle:!0,name:["0","diffValue"]},le.createElement(Nn.default.Group,{style:{columnGap:12},options:Wr})),le.createElement(ut.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(gr=Ii.navigation[0])==null?void 0:gr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(ut.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=Ii.navigation[0])==null?void 0:mr.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(yr=Ii.navigation[0])==null?void 0:yr.child_count,checkable:Ge(Cn)===At.OnlyFileFolder,icon:Er=>Er.expanded?le.createElement("img",{src:zi,className:Gn.shareFolderIcon}):le.createElement("img",{src:qi,className:Gn.shareFolderIcon}),isLeaf:!1,disabled:!(((_i=Ii.navigation[0])==null?void 0:_i.child_count)>0),children:Ge(Cn)===At.OnlyFileFolder||Ge(Cn)===At.FileFolderAndDiff?Mr:[...Mr,...Zo]}])}});(0,le.useEffect)(()=>{Ti==="1"?Yt({type:"0",group_id:0,item_type:Ji,show_children:!0}):Ti==="2"&&Yt({type:"3",except_mine:!0,item_type:Ji,show_children:!0,teach_group_id:Ko==="all"?"":Ko})},[Cn,Ti,Ko]),(0,le.useEffect)(()=>{var qt,sr,kr,vr,lr,Bi,wr,to,So,gr,mr,yr;console.log("selectData-active:",Gi,Ln,Ti),Ti==="1"?(Qr((qt=Gi==null?void 0:Gi.my)==null?void 0:qt.map(_i=>_i.id)),nt(((kr=(sr=Gi==null?void 0:Gi.my)==null?void 0:sr.reduce)==null?void 0:kr.call(sr,(_i,Ii)=>_i+Ii.item_bank_num,0))||0)):Ti==="2"&&(eo((vr=Gi==null?void 0:Gi.public)==null?void 0:vr.map(_i=>_i.id)),nt(((Bi=(lr=Gi==null?void 0:Gi.public)==null?void 0:lr.reduce)==null?void 0:Bi.call(lr,(_i,Ii)=>_i+Ii.item_bank_num,0))||0)),Ge(Cn)===At.All&&(Ti==="1"?(Qr((wr=Gi==null?void 0:Gi.my)==null?void 0:wr.map(_i=>_i.id)),nt((Gi==null?void 0:Gi.filter(_i=>!_i.is_share).reduce((_i,Ii)=>_i+Ii.item_bank_num,0))||0),(to=Gi==null?void 0:Gi.filter(_i=>!_i.is_share))==null||to.forEach(_i=>{const Ii=ur.getFieldValue([`${_i.group_id||0}_${_i.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Ii),Ii!=null&&Ii.includes[_i.difficulty]||ur.setFieldValue([`${_i.group_id||0}_${_i.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Ii,_i.difficulty])))})):Ti==="2"&&(eo((So=Gi==null?void 0:Gi.public)==null?void 0:So.map(_i=>_i.id)),nt((Gi==null?void 0:Gi.filter(_i=>!!_i.is_share).reduce((_i,Ii)=>_i+Ii.item_bank_num,0))||0),(gr=Gi==null?void 0:Gi.filter(_i=>!!_i.is_share))==null||gr.forEach(_i=>{const Ii=ur.getFieldValue([`${_i.teacher_group_id||0}_${_i.tag_discipline_id}`,"diffValue"])||[];Ii!=null&&Ii.includes[_i.difficulty]||ur.setFieldValue([`${_i.teacher_group_id||0}_${_i.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Ii,_i.difficulty])))}))),Ge(Cn)===At.FileFolderAndDiff&&(ur.resetFields(),setTimeout(()=>{ai(Gi)},300),Ti==="1"?(nt((Gi==null?void 0:Gi.filter(_i=>!_i.is_share).reduce((_i,Ii)=>_i+Ii.item_bank_num,0))||0),(mr=Gi==null?void 0:Gi.filter(_i=>!_i.is_share))==null||mr.forEach(_i=>{const Ii=ur.getFieldValue([`${_i.group_id}`,"diffValue"])||[];console.log("prev:",Ii),Ii!=null&&Ii.includes[_i.difficulty]||ur.setFieldValue([`${_i.group_id}`,"diffValue"],Array.from(new Set([...Ii,_i.difficulty])))})):(nt((Gi==null?void 0:Gi.filter(_i=>!!_i.is_share).reduce((_i,Ii)=>_i+Ii.item_bank_num,0))||0),(yr=Gi==null?void 0:Gi.filter(_i=>!!_i.is_share))==null||yr.forEach(_i=>{const Ii=ur.getFieldValue([`${_i.teacher_group_id}`,"diffValue"])||[];Ii!=null&&Ii.includes[_i.difficulty]||ur.setFieldValue([`${_i.teacher_group_id}`,"diffValue"],Array.from(new Set([...Ii,_i.difficulty])))})))},[Ti]),console.log("1111111111:",No,Fi),(0,le.useEffect)(()=>{setTimeout(()=>{var qt,sr,kr,vr,lr;switch(Ge(Cn)){case At.OnlyFileFolder:{const Bi=[],wr=[];for(const to of Gi.my||[])Bi.push(to);for(const to of Gi.public||[])wr.push(to);Qr(Bi.map(to=>`${to.group_id}`)),eo(wr.map(to=>`${to.teacher_group_id}`)),nt(Ti==="1"?Bi.reduce((to,So)=>to+So.item_bank_num,0):wr.reduce((to,So)=>to+So.item_bank_num,0));break}case At.FileFolderAndKnowledge:{const Bi=[],wr=[];for(const to of(Gi==null?void 0:Gi.my)||[])Bi.push(to);for(const to of(Gi==null?void 0:Gi.public)||[])wr.push(to);nt((qt=Ti==="1"?Bi:wr)==null?void 0:qt.reduce((to,So)=>to+So.item_bank_num,0)),Qr(Bi.map(to=>`${to.group_id}_${to.tag_discipline_id}`)),eo(wr.map(to=>`${to.teacher_group_id}_${to.tag_discipline_id}`));break}case At.All:{Ti==="1"?(nt((Gi==null?void 0:Gi.filter(Bi=>!Bi.is_share).reduce((Bi,wr)=>Bi+wr.item_bank_num,0))||0),(sr=Gi==null?void 0:Gi.filter(Bi=>!Bi.is_share))==null||sr.forEach(Bi=>{const wr=ur.getFieldValue([`${Bi.group_id||0}_${Bi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",wr,Bi.difficulty,Bi),wr!=null&&wr.includes[Bi.difficulty]||ur.setFieldValue([`${Bi.group_id||0}_${Bi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...wr,Bi.difficulty])))})):(nt((Gi==null?void 0:Gi.filter(Bi=>!!Bi.is_share).reduce((Bi,wr)=>Bi+wr.item_bank_num,0))||0),(kr=Gi==null?void 0:Gi.filter(Bi=>!!Bi.is_share))==null||kr.forEach(Bi=>{const wr=ur.getFieldValue([`${Bi.group_id||0}_${Bi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",wr,Bi.difficulty,Bi),wr!=null&&wr.includes[Bi.difficulty]||ur.setFieldValue([`${Bi.group_id||0}_${Bi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...wr,Bi.difficulty])))}));break}case At.FileFolderAndDiff:{Ti==="1"?(nt((Gi==null?void 0:Gi.filter(Bi=>!Bi.is_share).reduce((Bi,wr)=>Bi+wr.item_bank_num,0))||0),(vr=Gi==null?void 0:Gi.filter(Bi=>!Bi.is_share))==null||vr.forEach(Bi=>{const wr=ur.getFieldValue([`${Bi.group_id}`,"diffValue"])||[];console.log("prev:",wr,Bi.difficulty),wr!=null&&wr.includes[Bi.difficulty]||ur.setFieldValue([`${Bi.group_id}`,"diffValue"],Array.from(new Set([...wr,Bi.difficulty])))})):(nt((Gi==null?void 0:Gi.filter(Bi=>!!Bi.is_share).reduce((Bi,wr)=>Bi+wr.item_bank_num,0))||0),(lr=Gi==null?void 0:Gi.filter(Bi=>!!Bi.is_share))==null||lr.forEach(Bi=>{const wr=ur.getFieldValue([`${Bi.group_id}`,"diffValue"])||[];wr!=null&&wr.includes[Bi.difficulty]||ur.setFieldValue([`${Bi.group_id}`,"diffValue"],Array.from(new Set([...wr,Bi.difficulty])))}));break}}},800)},[Ln,Cn,Vo,ya]);const[Dn,nt]=(0,le.useState)(0);return le.createElement(ut.default,{form:ur,onValuesChange:(qt,sr)=>_n(void 0,null,function*(){var kr,vr,lr,Bi;console.log("onValuesChange:",sr,qt);let wr=0;if(Ge(Cn)===At.FileFolderAndDiff){const to=yield ur.getFieldValue(),So=[],gr=[];for(const yr of Object.keys(to))if((vr=(kr=to[yr])==null?void 0:kr.diffValue)!=null&&vr.length&&yr!=="null"&&yr!==null){const _i=to[yr];So.push(nn({id:yr},_i))}const mr={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"};So.map(yr=>{var _i,Ii,Wr,Zo,Mr;yr.id==0&&(yr.diffNum=Ti==="1"?(Ii=(_i=aa==null?void 0:aa.navigation)==null?void 0:_i[0])==null?void 0:Ii.difficulty_count:(Zo=(Wr=Or==null?void 0:Or.navigation)==null?void 0:Wr[0])==null?void 0:Zo.difficulty_count),(Mr=yr==null?void 0:yr.diffValue)==null||Mr.map(Er=>{var Tr,Rr,pr,Na,_o;const xa={group_name:((Tr=yr.extra)==null?void 0:Tr.name)||"",teacher_group_name:"",id:`${yr.id}_${Er}`,group_id:yr.id,difficulty:Er,item_bank_num:(Na=(pr=(Rr=yr.diffNum)==null?void 0:Rr.filter($a=>$a.name===mr[Er]))==null?void 0:pr[0])==null?void 0:Na.value};Ti==="2"&&(xa.is_share=!0,xa.teacher_group_id=yr.id,xa.teacher_group_name=(_o=yr.extra)==null?void 0:_o.name),gr.push(xa)})}),wr=gr.reduce((yr,_i)=>yr+_i.item_bank_num,0),ai([...gr,...Gi==null?void 0:Gi.filter(yr=>Ti==="1"?yr.is_share:!yr.is_share)])}else if(Ge(Cn)===At.All){const to=[];for(const So of Object.keys(sr)){const{diffNum:gr=[],diffValue:mr=[],extra:yr={}}=sr[So];console.log("---",yr);const[_i,Ii]=So.split("_");let Wr=(Bi=(lr=yr.tag_disciplines)==null?void 0:lr.filter(Zo=>parseInt(Zo.id)===parseInt(Ii)))==null?void 0:Bi[0];mr.forEach(Zo=>{var Mr;const Er={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Tr=(Mr=gr==null?void 0:gr.find(pr=>pr.name===Er[Zo]))==null?void 0:Mr.value,Rr={group_name:"",teacher_group_name:"",tag_discipline_name:(Wr==null?void 0:Wr.name)||yr.tag_discipline_name,id:`${So}_${Zo}`,group_id:_i,is_share:!!(Wr!=null&&Wr.is_share||(yr==null?void 0:yr.type)==="3"),tag_discipline_id:Ii,difficulty:Zo,item_bank_num:Tr};wr+=Tr,yr.type==="0"?Rr.group_name=yr.name:Rr.teacher_group_name=yr.name,Ti==="2"&&(Rr.is_share=!0,Rr.teacher_group_id=yr.id||0,Rr.teacher_group_name=yr.name),Tr>0&&to.push(Rr)})}ai([...to,...Gi==null?void 0:Gi.filter(So=>Ti==="1"?So.is_share:!So.is_share)])}nt(wr)})},le.createElement(Ae.default,{destroyInactiveTabPane:!0,activeKey:Ti,onChange:qt=>Ri(qt),style:{minHeight:260},tabBarExtraContent:{right:Ti==="2"&&(Hr==null?void 0:Hr.length)>0&&le.createElement(Ei.default,{onChange:qt=>{Ya(qt)},value:Ko,style:{width:120}},le.createElement(Ei.default.Option,{key:"all",value:"all"},"\u5168\u90E8"),Hr==null?void 0:Hr.map(qt=>le.createElement(Ei.default.Option,{key:qt==null?void 0:qt.group_id,value:qt==null?void 0:qt.group_id},qt==null?void 0:qt.name)))},items:[{key:"1",label:"\u6211\u521B\u5EFA\u7684",children:(Vo==null?void 0:Vo.length)===0?le.createElement(Ct.Z,{spinning:Wa},le.createElement(pi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:Gn.folderAreaWrapper},le.createElement(lt.Z,{justify:"space-between",align:"middle",className:Gn.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",Dn," "),"\u9898")),le.createElement(Ct.Z,{spinning:Wa},le.createElement("div",{style:{minHeight:200}},Vo.length>0&&le.createElement(Sr.default,{checkable:!0,className:Gn.folderWrapper,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},selectable:!1,onCheck:(qt,sr)=>Va(qt,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(Ct.Z,{spinning:fl},le.createElement(pi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:Gn.folderAreaWrapper},le.createElement(lt.Z,{justify:"space-between",align:"middle",className:Gn.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",Dn||0," "),"\u9898")),le.createElement(Ct.Z,{spinning:fl},le.createElement("div",{style:{minHeight:200}},(ya==null?void 0:ya.length)>0&&le.createElement(Sr.default,{checkable:!0,className:Gn.folderWrapper,selectable:!1,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},onCheck:(qt,sr)=>Va(qt,sr,"3"),checkedKeys:Fi,checkStrictly:!0,treeData:ya,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))}]}))},sn=pe(73802),In=pe(59579),ji=Object.defineProperty,Ai=Object.defineProperties,Si=Object.getOwnPropertyDescriptors,ki=Object.getOwnPropertySymbols,Ni=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,zr=(Cn,Ln,ai)=>Ln in Cn?ji(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,Vr=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))Ni.call(Ln,ai)&&zr(Cn,ai,Ln[ai]);if(ki)for(var ai of ki(Ln))ir.call(Ln,ai)&&zr(Cn,ai,Ln[ai]);return Cn},Zn=(Cn,Ln)=>Ai(Cn,Si(Ln)),io=(Cn,Ln,ai)=>new Promise((Ji,Gi)=>{var Ti=Mi=>{try{oi(ai.next(Mi))}catch(ur){Gi(ur)}},Ri=Mi=>{try{oi(ai.throw(Mi))}catch(ur){Gi(ur)}},oi=Mi=>Mi.done?Ji(Mi.value):Promise.resolve(Mi.value).then(Ti,Ri);oi((ai=ai.apply(Cn,Ln)).next())});const Yr={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var wn=({ruleValue:Cn,setSelectData:Ln,currentItemType:ai,defaultData:Ji,isFirst:Gi})=>{const[Ti,Ri]=(0,le.useState)([]),[oi,Mi,ur,Hr]=(0,In.U)(Xe,{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)(()=>{io(void 0,null,function*(){const Fi=yield ur({},!0);Ri((0,sn.L)(Fi.disciplines))})},[]),console.log(Ji),(0,le.useEffect)(()=>{if(Gi)switch(Ge(Cn)){case At.OnlyKnowledge:{No(Ji.map(Fi=>Fi.tag_discipline_id));break}case At.KnowledgeAndDiff:{const Fi=new Map;Ji.forEach(eo=>{eo&&(Fi.has(eo.tag_discipline_id)?Fi.set(eo.tag_discipline_id,[...Fi.get(eo.tag_discipline_id),eo.difficulty]):Fi.set(eo.tag_discipline_id,[eo.difficulty]))});for(const[eo,Vo]of Fi.entries())ga.setFieldValue([eo,"diff"],Vo);break}}},[Ji,Cn,Gi]);const[ga]=ut.default.useForm(),Ko=(0,le.useMemo)(()=>{const Fi=[];let eo="",Vo="";const ma={};for(const ya of(Hr==null?void 0:Hr.disciplines)||[]){eo=ya.name;for(const Fo of ya.sub_disciplines){Vo=Fo.name;for(const aa of Fo.tag_disciplines){const Do={sub_discipline_name:`${eo}&${Vo}`,sub_discipline_id:Fo.id,tag_discipline_name:aa.name,id:aa.id,item_bank_num:aa.total_count,difficulty_count:aa.difficulty_count,tag_discipline_id:aa.id};Fi.push(Do)}}}return Fi},[Hr,Ji]),Ya=[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",show:!0,render:(Fi,eo)=>{const{item_bank_num:Vo}=eo;return le.createElement("div",null,Fi,`(${Vo})`)}},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",ellipsis:!0,show:!0},{title:"\u96BE\u5EA6",width:"35%",show:Cn.includes(kn.Difficulty),render:(Fi,eo)=>{const{id:Vo,difficulty_count:ma,total_count:ya,sub_discipline_name:Fo,tag_discipline_name:aa}=eo;return le.createElement(le.Fragment,null,le.createElement(ut.default.Item,{name:[Vo,"diff"],noStyle:!0},le.createElement(Nn.default.Group,{style:{columnGap:12},options:ma.map(Do=>({label:Do.name,value:Yr[Do.name]}))})),le.createElement(ut.default.Item,{name:[Vo,"extra"],initialValue:{difficulty_count:ma,total_count:ya,sub_discipline_name:Fo,tag_discipline_name:aa},noStyle:!0},le.createElement("input",{type:"hidden"})))}}].filter(Fi=>Fi.show),[Va,No]=(0,le.useState)([]),Qr=(0,le.useRef)(new Map);return le.createElement("div",{style:{marginTop:12}},le.createElement(lt.Z,{className:"mb20",align:"middle",gutter:20},le.createElement(dn.Z,null,le.createElement($e.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",size:"large",style:{width:240},options:Ti,onChange:Fi=>{ur({sub_discipline_id:Fi==null?void 0:Fi[1]})}})),le.createElement(dn.Z,null,le.createElement(zn.t7,{style:{width:300},placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\u8FDB\u884C\u641C\u7D22",value:oi.keyword,onChange:Fi=>ur({keyword:Fi})}))),le.createElement(ut.default,{form:ga,onValuesChange:(Fi,eo)=>{var Vo;console.log(eo),Qr.current.clear();for(const ma of Object.keys(eo)){const ya={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Fo=eo[ma],{difficulty_count:aa,total_count:Do}=Fo.extra||{};(Vo=Fo==null?void 0:Fo.diff)==null||Vo.forEach(Or=>{var Aa;const Wa=(Aa=aa==null?void 0:aa.find(fl=>fl.name===ya[Or]))==null?void 0:Aa.value,La=Zn(Vr({},Fo.extra),{id:`${ma}_${Or}`,difficulty:Or,item_bank_num:Wa,tag_discipline_id:ma});Wa>0&&Qr.current.set(`${ma}_${Or}`,La)})}Ln([...Qr.current.values()])}},(Ko==null?void 0:Ko.length)===0?le.createElement(pi.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")}):le.createElement(cr.default,{rowSelection:Ge(Cn)===At.OnlyKnowledge?{preserveSelectedRowKeys:!0,type:"checkbox",onChange(Fi,eo){console.log("table-selectedRowKeys:",Fi,eo),No(Fi),Ln(eo)},getCheckboxProps:Fi=>({disabled:Fi.item_bank_num===0}),selectedRowKeys:Va}:void 0,columns:Ya,dataSource:Ko,loading:Mi,scroll:{y:480},rowKey:"id",pagination:!1})))},ri=Object.defineProperty,Ui=Object.defineProperties,Pr=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertySymbols,Cr=Object.prototype.hasOwnProperty,qr=Object.prototype.propertyIsEnumerable,Zr=(Cn,Ln,ai)=>Ln in Cn?ri(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,Ir=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))Cr.call(Ln,ai)&&Zr(Cn,ai,Ln[ai]);if(er)for(var ai of er(Ln))qr.call(Ln,ai)&&Zr(Cn,ai,Ln[ai]);return Cn},Ur=(Cn,Ln)=>Ui(Cn,Pr(Ln)),Vn=(Cn,Ln,ai)=>new Promise((Ji,Gi)=>{var Ti=Mi=>{try{oi(ai.next(Mi))}catch(ur){Gi(ur)}},Ri=Mi=>{try{oi(ai.throw(Mi))}catch(ur){Gi(ur)}},oi=Mi=>Mi.done?Ji(Mi.value):Promise.resolve(Mi.value).then(Ti,Ri);oi((ai=ai.apply(Cn,Ln)).next())});const Xo={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Io=({open:Cn,onCancel:Ln,setVisibleModalType:ai,currentItemType:Ji})=>{var Gi;const{data:Ti,dispatch:Ri}=(0,le.useContext)(wt),[oi,Mi]=(0,le.useState)([]),[ur,Hr]=(0,le.useState)(),ga=(Gi=Ti==null?void 0:Ti.item_types)==null?void 0:Gi.find(Vo=>Vo.item_type===Ji);(0,le.useEffect)(()=>{var Vo,ma,ya;if(Cn){const Fo=(Vo=Ti==null?void 0:Ti.item_types)==null?void 0:Vo.find(aa=>aa.item_type===Ji);if((Fo==null?void 0:Fo.random_rule_type)!==At.Shixun){const aa=jn[Fo==null?void 0:Fo.random_rule_type]||[];Mi(aa);const Do=(ya=(ma=Ti==null?void 0:Ti.item_types)==null?void 0:ma.find(Or=>Or.item_type===Ji))==null?void 0:ya.contents;switch(console.log("----xxx",Ge(aa)),Ge(aa)){case At.OnlyDifficulty:{No(Do.map(Or=>Or.difficulty));break}case At.OnlyFileFolder:{No({my:Do==null?void 0:Do.filter(Or=>parseInt(Or.teacher_group_id)!=="NaN"&&!Or.teacher_group_id&&Or.teacher_group_id!==0),public:Do==null?void 0:Do.filter(Or=>parseInt(Or.teacher_group_id)>=0)}),Hr({my:Do==null?void 0:Do.filter(Or=>parseInt(Or.teacher_group_id)!=="NaN"&&!Or.teacher_group_id&&Or.teacher_group_id!==0),public:Do==null?void 0:Do.filter(Or=>parseInt(Or.teacher_group_id)>=0)});break}case At.FileFolderAndKnowledge:{No({my:Do==null?void 0:Do.filter(Or=>parseInt(Or.teacher_group_id)!=="NaN"&&!Or.teacher_group_id&&Or.teacher_group_id!==0),public:Do==null?void 0:Do.filter(Or=>parseInt(Or.teacher_group_id)>=0)}),Hr({my:Do==null?void 0:Do.filter(Or=>parseInt(Or.teacher_group_id)!=="NaN"&&!Or.teacher_group_id&&Or.teacher_group_id!==0),public:Do==null?void 0:Do.filter(Or=>parseInt(Or.teacher_group_id)>=0)});break}case At.FileFolderAndDiff:{No(Do),Hr(Do);break}case At.All:{No(Do),Hr(Do);break}default:No(Do)}}}},[Cn]);const[Ko,Ya]=(0,le.useState)([]);(0,le.useEffect)(()=>{Cn&&Ye({item_type:Ji}).then(Vo=>{Vo.status===0&&Ya(Vo.data)})},[Cn]),(0,le.useEffect)(()=>{console.log("selectData",ur)},[ur]);const[Va,No]=(0,le.useState)(),[Qr,Fi]=(0,le.useState)(!0);console.log("isFirst:",Qr);const eo=Vo=>{Mi(Vo),Hr([]),No([]),Fi(!1)};return le.createElement(Kn.default,{title:"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219",width:948,closable:!0,centered:!0,open:Cn,onCancel:Ln,destroyOnClose:!0,onOk:()=>Vn(void 0,null,function*(){var Vo,ma,ya,Fo,aa,Do,Or;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 Aa=Ge(oi);switch(Aa){case At.OnlyFileFolder:{Ri({type:"editRule",payload:{itemType:Ji,tableData:[...ur.my||[],...ur.public||[]],randomRuleType:Aa}});break}case At.OnlyDifficulty:{const Wa=(Fo=(ya=Ti==null?void 0:Ti.item_types)==null?void 0:ya.find(fl=>fl.item_type===Ji))==null?void 0:Fo.contents;let La=[{},{value:(aa=Ko.find(fl=>fl.name==="\u7B80\u5355"))==null?void 0:aa.value},{value:(Do=Ko.find(fl=>fl.name==="\u9002\u4E2D"))==null?void 0:Do.value},{value:(Or=Ko.find(fl=>fl.name==="\u56F0\u96BE"))==null?void 0:Or.value}];Ri({type:"editRule",payload:{itemType:Ji,tableData:ur.map((fl,xu)=>{var Qt,Yt,Dn,nt;return{difficulty:fl,id:xu,quanlity:((Yt=(Qt=Wa==null?void 0:Wa.filter(qt=>qt.id===xu))==null?void 0:Qt[0])==null?void 0:Yt.quanlity)||1,item_bank_num:(Ko==null?void 0:Ko.length)===1?(Dn=Ko[0])==null?void 0:Dn.value:(nt=La==null?void 0:La[fl])==null?void 0:nt.value}}),randomRuleType:Aa}});break}case At.OnlyKnowledge:{Ri({type:"editRule",payload:{itemType:Ji,tableData:ur.map(Wa=>Ur(Ir({},Wa),{quanlity:Wa.quanlity||1})),randomRuleType:Aa}});break}case At.KnowledgeAndDiff:{Ri({type:"editRule",payload:{itemType:Ji,tableData:ur.map(Wa=>Ur(Ir({},Wa),{quanlity:Wa.quanlity||1})),randomRuleType:Aa}});break}case At.FileFolderAndDiff:{Ri({type:"editRule",payload:{itemType:Ji,tableData:ur.map(Wa=>Ur(Ir({},Wa),{quanlity:Wa.quanlity||1})),randomRuleType:Aa}});break}case At.FileFolderAndKnowledge:{Ri({type:"editRule",payload:{itemType:Ji,tableData:[...ur.my||[],...ur.public||[]],randomRuleType:Aa}});break}case At.All:{Ri({type:"editRule",payload:{itemType:Ji,tableData:ur.map(Wa=>Ur(Ir({},Wa),{quanlity:Wa.quanlity||1})),randomRuleType:Aa}});break}}ai("")})},le.createElement(Nn.default.Group,{className:`${Gn.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?Kn.default.confirm({title:"\u63D0\u793A",content:"\u5207\u6362\u89C4\u5219\u540E\uFF0C\u4E4B\u524D\u7684\u62BD\u9898\u914D\u7F6E\u5C06\u88AB\u6E05\u7A7A\uFF01",okText:"\u7ACB\u5373\u5207\u6362",cancelText:"\u6682\u4E0D\u5207\u6362",onOk:()=>eo(Vo)}):eo(Vo)},options:[{label:"\u6307\u5B9A\u6587\u4EF6\u5939\u62BD\u9898",value:kn.FileFolder},{label:"\u6307\u5B9A\u96BE\u5EA6\u62BD\u9898",value:kn.Difficulty},{label:"\u6307\u5B9A\u77E5\u8BC6\u70B9\u62BD\u9898",value:kn.Knowledge}]}),oi.includes(kn.FileFolder)?le.createElement(tn,{defaultData:Va,selectData:ur,ruleValue:oi,setSelectData:Hr,currentItemType:Ji}):oi.includes(kn.Knowledge)?le.createElement(wn,{defaultData:Va,isFirst:Qr,ruleValue:oi,setSelectData:Hr,currentItemType:Ji}):oi.includes(kn.Difficulty)?le.createElement("div",{style:{marginTop:12}},le.createElement("span",{className:"mr20",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(Nn.default.Group,{style:{columnGap:12},options:Ko.map(Vo=>({label:Vo.name,value:Xo[Vo.name]})),value:ur||Va,onChange:Vo=>Hr(Vo)})):null)},tr=({open:Cn,onCancel:Ln,setVisibleModalType:ai,currentItemType:Ji})=>Cn?le.createElement(Io,{open:Cn,onCancel:Ln,setVisibleModalType:ai,currentItemType:Ji}):null,ia=pe(6848),zo=pe(38389),Nr=pe(94811),Br=pe(99325),xo=pe(88230),$o=pe(61485),$i=pe(72559),ra=({open:Cn,onCancel:Ln,onOk:ai})=>{const{data:Ji}=(0,le.useContext)(wt),Gi=(0,zo.g)(),[Ti,Ri,oi,Mi]=(0,In.U)(Nr.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[ur,Hr]=(0,le.useState)(!1);(0,le.useEffect)(()=>{if(Cn){oi({page:1,limit:10,type:0},!0).then(Qr=>{(Qr==null?void 0:Qr.shixuns_count)===0&&Hr(!0)});const No=Ji.item_types.find(Qr=>Qr.item_type==="PRACTICAL");Ko(No.item_banks.map(Qr=>Qr.id)),Va(No.item_banks)}},[Cn,Ji]);const[ga,Ko]=(0,le.useState)([]),[Ya,Va]=(0,le.useState)([]);return le.createElement(Kn.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:Cn,width:948,centered:!0,closable:!0,onCancel:Ln,onOk:()=>ai(Ya),destroyOnClose:!0},le.createElement(lt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(dn.Z,null,le.createElement($e.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Gi,onChange:No=>{oi({page:1,discipline_id:No==null?void 0:No[0],sub_discipline_id:No==null?void 0:No[1]})}}),le.createElement(Ei.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u521D\u7EA7",value:1},{label:"\u4E2D\u7EA7",value:2},{label:"\u4E2D\u9AD8\u7EA7",value:3},{label:"\u9AD8\u7EA7",value:4}],onChange:No=>oi({page:1,diff:No})}),le.createElement(Ei.default,{className:"ml20",placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"large",allowClear:!0,options:[{label:"\u672A\u53D1\u5E03",value:"unpublish"},{label:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{label:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],onChange:No=>oi({page:1,shixun_publish_status:No})})),le.createElement(zn.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(pi.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,xo.xg)("/shixuns")})):le.createElement(cr.default,{loading:Ri,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(No,Qr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:Qr!=null&&Qr.high_resources_consume?Qn.title:"",title:No||"--"},le.createElement(Br.Z,{key:1,showLines:1,showTextOnly:!0,value:No||"--"})),(Qr==null?void 0:Qr.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:(No,Qr,Fi)=>le.createElement("span",null,No||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(ia.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement($o.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(No,Qr,Fi)=>le.createElement("span",null,No||"- -")},{title:"\u64CD\u4F5C",render(No,Qr){const{title:Fi,challenge_names:eo,author_name:Vo,identifier:ma,author_school_name:ya,study_count:Fo}=Qr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Kn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(Br.Z,{value:Fi,style:{marginBottom:18}}),le.createElement("div",{className:Qn.challengeNameWrapper},eo.map((aa,Do)=>le.createElement("div",{className:Qn.challengeName,key:Do},"\u7B2C",(0,xo.EM)(Do+1),"\u9898\xA0",aa))),le.createElement(lt.Z,{className:Qn.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(dn.Z,{className:Qn.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:Qn.shixunInfo},Vo.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:Qn.shixunInfo},ya),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:Qn.shixunInfo},Fo)),le.createElement(Oe.ZP,{type:"primary",className:Qn.btnToDetail,onClick:()=>(0,xo.xg)(`/shixuns/${ma}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(Qr==null?void 0:Qr.shixun_tag_num)===1&&le.createElement("a",{target:"_blank",href:`/shixuns/${Qr==null?void 0:Qr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:Mi==null?void 0:Mi.items,rowSelection:{selectedRowKeys:ga,preserveSelectedRowKeys:!0,getCheckboxProps:No=>({disabled:No.shixun_tag_num===1}),onChange(No,Qr){var Fi,eo,Vo;console.log(No),Ko(No);const ma=[];for(const Fo of Ya)No.includes(Fo.id)&&ma.push(Fo);const ya=ma.map(Fo=>Fo.id);for(const Fo of Qr)Fo&&No.includes(Fo.id)&&!ya.includes(Fo.id)&&ma.push({id:Fo.id,difficulty:Fo.level,identifier:Fo.identifier,name:Fo.name,real_name:(Fi=Fo==null?void 0:Fo.author_name)==null?void 0:Fi.split("\u3001")[0],school_name:Fo.author_school_name,challenge_names:Fo.challenge_names,challenges:(eo=Fo.challenge_names)==null?void 0:eo.map((aa,Do)=>({subject:aa,id:Do,score:5})),score:((Vo=Fo.challenge_names)==null?void 0:Vo.length)*5,study_count:Fo.study_count,challenges_count:Fo.challenges_count});Va(ma)}},pagination:{current:Ti.page,pageSize:Ti.limit,total:Mi==null?void 0:Mi.items_count,showTotal:No=>le.createElement("span",null,"\u5171\xA0",le.createElement("span",{style:{color:"#165DFF"}},No),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(No,Qr){oi({page:No,limit:Qr})},size:"default"},scroll:{y:400}}))},va=pe(78113),Ma=pe(59301),Ps=Object.defineProperty,Ha=Object.defineProperties,Ms=Object.getOwnPropertyDescriptors,bo=Object.getOwnPropertySymbols,wo=Object.prototype.hasOwnProperty,Jr=Object.prototype.propertyIsEnumerable,ha=(Cn,Ln,ai)=>Ln in Cn?Ps(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,Ia=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))wo.call(Ln,ai)&&ha(Cn,ai,Ln[ai]);if(bo)for(var ai of bo(Ln))Jr.call(Ln,ai)&&ha(Cn,ai,Ln[ai]);return Cn},Eo=(Cn,Ln)=>Ha(Cn,Ms(Ln)),mi=({onDelete:Cn,list:Ln,onSelect:ai})=>{const[Ji,Gi]=(0,le.useState)(!1),{dispatch:Ti,disabled:Ri}=(0,le.useContext)(wt),oi=(Ko,Ya,Va)=>{const No=Array.from(Ko),[Qr]=No.splice(Ya,1);return No.splice(Va,0,Qr),No},[Mi,ur]=(0,le.useState)(null),[Hr,ga]=(0,le.useState)(!1);return Ma.createElement(va.Z5,{onDragStart:()=>{ga(!0)},onDragEnd:Ko=>{if(ga(!1),!Ko.destination)return;const Ya=oi(Ln,Ko.source.index,Ko.destination.index);Ti({type:"updateItemTypes",payload:Ya})}},Ma.createElement(va.bK,{droppableId:"droppable"},(Ko,Ya)=>Ma.createElement("div",Eo(Ia({},Ko.droppableProps),{ref:Ko.innerRef}),Ma.createElement(Ct.Z,{spinning:Ji},Ln.map((Va,No)=>Ma.createElement(va._l,{key:No,draggableId:No.toString(),index:No,isDragDisabled:Mi!==Va.item_type},(Qr,Fi)=>Ma.createElement(lt.Z,Eo(Ia(Ia({align:"middle",wrap:!1,ref:Qr.innerRef},Qr.draggableProps),Qr.dragHandleProps),{className:`${Qn.dragItem} ${Hr?Qn.dragging:""}`}),Ma.createElement(dn.Z,{className:Qn.contentArea,onClick:()=>{ai(Va.item_type),(0,xo.k3)()}},Ma.createElement("span",{className:Qn.blackText},(0,xo.EM)(No+1),"\u3001\u3010",Va.item_type_text,"\u3011"),Ma.createElement(ia.Z,{title:`\uFF08${Va.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(Va.total_score).toFixed(1)}\u5206\uFF09`},Ma.createElement("span",{className:Qn.greyText},`\uFF08${Va.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(Va.total_score).toFixed(1)}\u5206\uFF09`))),!Ri&&Ma.createElement(Ma.Fragment,null,Ma.createElement(ia.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F",open:Mi===Va.item_type&&!Hr},Ma.createElement("div",{style:{cursor:"grab"},className:`${Qn.iconWrapper} ${Hr?Qn.hidden:""}`,onMouseEnter:()=>{ur(Va.item_type)},onMouseLeave:()=>ur(null)},Ma.createElement("i",{className:`iconfont icon-tuodong1 ${Qn.dragIcon}`}))),Ma.createElement(ia.Z,{title:"\u5220\u9664"},Ma.createElement("div",{className:`${Qn.iconWrapper} ${Hr?Qn.hidden:""}`,style:{cursor:"pointer"},onClick:()=>Cn(Va.item_type)},Ma.createElement("i",{className:`iconfont icon-shanchu12 ${Qn.deleteIcon}`})))))))),Ko.placeholder)))},oo=pe(10777),ao={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"},Ga=pe(73631),Ca=pe(31328);const fa=(Cn,Ln,ai,Ji)=>{const Gi={[At.OnlyDifficulty]:[{title:"\u96BE\u5EA6",key:"difficulty",render(Ti,Ri){const{difficulty:oi}=Ri;return le.createElement("span",{style:{color:Pe[oi].color}},Pe[oi].label)}}],[At.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(Ti,Ri){return`${Ti}`}}],[At.OnlyFileFolder]:[{title:"\u6587\u4EF6\u5939",render(Ti,Ri,oi){const{group_name:Mi,teacher_group_name:ur}=Ri,Hr=Mi||ur,ga=ur?Ca:Ga;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:ga,className:ao.folderIcon})," ",le.createElement(ia.Z,{title:Hr},le.createElement("span",{className:ao.titles},Hr)))}},{title:"\u7C7B\u578B",render(Ti,Ri){const{teacher_group_name:oi}=Ri;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[At.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(Ti,Ri){const{difficulty:oi}=Ri;return le.createElement("span",{style:{color:Pe[oi].color}},Pe[oi].label)}}],[At.FileFolderAndKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(Ti,Ri){const{group_name:oi,teacher_group_name:Mi}=Ri,ur=oi||Mi,Hr=Mi?Ca:Ga;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:Hr,className:ao.folderIcon})," ",le.createElement(ia.Z,{title:ur},le.createElement("span",{className:ao.titles},ur)))}},{title:"\u7C7B\u578B",render(Ti,Ri){const{teacher_group_name:oi}=Ri;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[At.FileFolderAndDiff]:[{title:"\u6587\u4EF6\u5939",render(Ti,Ri){const{group_name:oi,teacher_group_name:Mi}=Ri,ur=oi||Mi,Hr=Mi?Ca:Ga;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:Hr,className:ao.folderIcon})," ",le.createElement(ia.Z,{title:ur},le.createElement("span",{className:ao.titles},ur)))}},{title:"\u7C7B\u578B",render(Ti,Ri){const{teacher_group_name:oi}=Ri;return le.createElement("span",null,oi?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(Ti,Ri){const{difficulty:oi}=Ri;return le.createElement("span",{style:{color:Pe[oi].color}},Pe[oi].label)}}],[At.All]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(Ti,Ri){const{group_name:oi,teacher_group_name:Mi,teacher_group_id:ur}=Ri,Hr=oi||Mi,ga=ur||ur===0?Ca:Ga;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:ga,className:ao.folderIcon})," ",le.createElement(ia.Z,{title:Hr},le.createElement("span",{className:ao.titles},Hr)))}},{title:"\u7C7B\u578B",render(Ti,Ri){const{teacher_group_id:oi}=Ri;return le.createElement("span",null,oi||oi===0?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(Ti,Ri){const{difficulty:oi}=Ri;return le.createElement("span",{style:{color:Pe[oi].color}},Pe[oi].label)}}],[At.Shixun]:[]};for(const Ti of Object.values(Gi))Ti.push({title:"\u62BD\u9898\u6570\u91CF",key:"quanlity",render(Ri,oi){const{item_bank_num:Mi,quanlity:ur,id:Hr,teacher_group_id:ga}=oi||{};return le.createElement(lt.Z,{align:"middle"},le.createElement(vt.Z,{disabled:Ji,min:1,max:Mi,size:"large",precision:0,value:ur,onChange:Ko=>{Ln({type:"changeQuestionNum",payload:{itemType:ai,id:Hr,num:Ko,teacher_group_id:ga}})}}),le.createElement("span",{className:"ml10 font14",style:{color:"#333333"}},"/",Mi))}},{title:"\u64CD\u4F5C",key:"action",align:"right",render(Ri,oi){const{id:Mi,is_share:ur}=oi;return Ji?le.createElement("span",{className:"cursorNotAllowed c-grey-999"},"\u5220\u9664"):le.createElement("span",{className:ao.deleteBtn,onClick:()=>{Ln({type:"deleteRule",payload:{itemType:ai,id:Mi,is_share:ur}})}},"\u5220\u9664")}});return Gi[Cn]},Ka=({setVisibleModalType:Cn})=>{var Ln,ai,Ji,Gi;const{data:Ti,dispatch:Ri,disabled:oi}=(0,le.useContext)(wt),Mi=(Ln=Ti==null?void 0:Ti.item_types)==null?void 0:Ln.find(ur=>ur.item_type==="PRACTICAL");return le.createElement(oo.Z,{className:ao.timelineWrapper,items:[{children:le.createElement("div",{style:{transform:"translateY(-4px)"}},le.createElement(lt.Z,{className:"mb20",align:"middle",justify:"space-between"},le.createElement(dn.Z,null,le.createElement("span",{className:ao.title},"\u9898\u5E93\u9009\u9898"),le.createElement("span",{className:ao.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(zn.op,{style:{width:102},onClick:()=>Cn("selectShixun")},"\u4ECE\u9898\u5E93\u9009\u62E9")),((ai=Mi==null?void 0:Mi.item_banks)==null?void 0:ai.length)===0?le.createElement(pi.Z,{customText:"\u6682\u65E0\u5F85\u62BD\u8BD5\u9898\uFF0C\u8BF7\u5148\u4ECE\u9898\u5E93\u8FDB\u884C\u9009\u62E9\uFF5E"}):le.createElement(cr.default,{rowKey:"id",className:"mb10",columns:[{title:"\u5E8F\u53F7",width:60,render(ur,Hr,ga){return le.createElement("span",null,ga+1)}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"40%",ellipsis:{showTitle:!0},render:(ur,Hr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:Hr!=null&&Hr.high_resources_consume?ao.q_title:"",title:ur||"--"},le.createElement(Br.Z,{key:1,showLines:1,showTextOnly:!0,value:ur})),(Hr==null?void 0:Hr.high_resources_consume)&&le.createElement($i.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,Hr,ga)=>le.createElement("span",null,ur||"- -")},{title:"\u96BE\u5EA6",dataIndex:"difficulty"},{title:"\u64CD\u4F5C",align:"right",width:180,render(ur,Hr,ga){const{id:Ko,identifier:Ya,name:Va,challenge_names:No=[],real_name:Qr,school_name:Fi,study_count:eo,challenges:Vo=[]}=Hr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer",marginLeft:20},onClick:()=>{Kn.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(Br.Z,{value:Va,style:{marginBottom:18}}),le.createElement("div",{className:ao.challengeNameWrapper},Vo==null?void 0:Vo.map((ma,ya)=>le.createElement("div",{className:ao.challengeName,key:ya},"\u7B2C",(0,xo.EM)(ya+1),"\u9898\xA0",ma==null?void 0:ma.subject))),le.createElement(lt.Z,{className:ao.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(dn.Z,{className:ao.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:ao.shixunInfo},Qr),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:ao.shixunInfo},Fi),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:ao.shixunInfo},eo)),le.createElement(Oe.ZP,{type:"primary",className:ao.btnToDetail,onClick:()=>(0,xo.xg)(`/shixuns/${Ya}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),!oi&&le.createElement("span",{onClick:()=>{Ri({type:"deleteShixunQuestion",payload:{shixunId:Ko}})},className:`ml20 ${ao.deleteBtn}`},"\u5220\u9664"))}}],dataSource:(Mi==null?void 0:Mi.item_banks)||[],pagination:!1}))},{children:le.createElement(lt.Z,{style:{transform:(Ji=Mi==null?void 0:Mi.item_banks)!=null&&Ji.length?"translateY(-8px)":"none"},align:"middle",justify:"space-between"},le.createElement("span",{className:ao.title},"\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898"),!!((Gi=Mi==null?void 0:Mi.item_banks)!=null&&Gi.length)&&le.createElement(dn.Z,null,le.createElement(lt.Z,{align:"middle"},le.createElement("span",{className:ao.normalText},"\u62BD\u9898\u6570\u91CF"),le.createElement(vt.Z,{min:0,disabled:oi,max:Mi==null?void 0:Mi.item_bank_num,size:"large",className:"ml10 mr10",value:(Mi==null?void 0:Mi.item_bank_count)||1,onChange:ur=>Ri({type:"changeQuestionNum",payload:{num:ur||1,itemType:"PRACTICAL"}})}),le.createElement("span",{className:`${ao.normalText} mr30`},"/",Mi==null?void 0:Mi.item_bank_num),le.createElement("span",{className:ao.normalText},"\u6BCF\u9898\u5206\u503C"),le.createElement(vt.Z,{disabled:oi,min:0,max:100,size:"large",precision:1,className:"ml10 mr10",value:Mi==null?void 0:Mi.score,onChange:ur=>Ri({type:"changeQuestionScore",payload:{score:ur,itemType:"PRACTICAL"}})}),le.createElement("span",{className:ao.normalText},"\u5206"))))}]})};var Cs=({setVisibleModalType:Cn,currentItemType:Ln,onDelete:ai})=>{var Ji,Gi;const Ti=(0,Ue.useParams)(),{data:Ri,dispatch:oi,disabled:Mi}=(0,le.useContext)(wt),ur=((Ji=Ri==null?void 0:Ri.item_types)==null?void 0:Ji.findIndex(ga=>ga.item_type===Ln))+1,Hr=(Gi=Ri==null?void 0:Ri.item_types)==null?void 0:Gi.find(ga=>ga.item_type===Ln);return le.createElement("div",{className:ao.questionDetailWrapper},le.createElement(lt.Z,{justify:"space-between",align:"middle",className:"mb30"},le.createElement(dn.Z,null,le.createElement("span",{className:ao.questionTitle},`${(0,xo.EM)(ur)}\u3001${Hr==null?void 0:Hr.item_type_text}`),le.createElement("span",{className:ao.questionScoreInfo},"\uFF08",le.createElement("span",{style:{color:"#3061D0"}},Hr==null?void 0:Hr.item_bank_count),"\u5C0F\u9898 ",le.createElement("span",null,"\uFF0C\u5171",le.createElement("span",{style:{color:"#3061D0"}},Hr==null?void 0:Hr.total_score),"\u5206"),"\uFF09")),!Mi&&le.createElement("i",{className:`iconfont icon-shanchutimu ${ao.deleteIcon}`,onClick:()=>ai(Ln)})),Ln==="PRACTICAL"?le.createElement(Ka,{setVisibleModalType:Cn}):le.createElement(le.Fragment,null,(Hr==null?void 0:Hr.contents.length)===0?le.createElement(pi.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:(Ti==null?void 0:Ti.id)&&le.createElement(lt.Z,{justify:"center",className:"mt30"},le.createElement(zn.op,{style:{width:136,marginTop:-10},onClick:()=>Cn("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219"))}):le.createElement(le.Fragment,null,le.createElement(lt.Z,{justify:"space-between",align:"middle",className:"mb20"},le.createElement(dn.Z,null,le.createElement(lt.Z,{align:"middle"},le.createElement("span",{className:`${ao.normalText}`},"\u6BCF\u9898\u5206\u503C"),le.createElement(vt.Z,{disabled:Mi,size:"large",className:"ml10 mr10",min:.1,max:100,value:Hr==null?void 0:Hr.score,precision:1,onChange:ga=>oi({type:"changeQuestionScore",payload:{score:ga,itemType:Ln}})}),le.createElement("span",{className:ao.normalText},"\u5206"))),(Ti==null?void 0:Ti.id)&&le.createElement(zn.op,{onClick:()=>Cn("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219")),le.createElement(cr.default,{columns:fa(Hr==null?void 0:Hr.random_rule_type,oi,Ln,Mi),dataSource:Hr==null?void 0:Hr.contents,pagination:!1,rowKey:"id"}))))},ms=pe(75872),Zs=pe(30897),Bn=pe(73898),ys=pe(32637),oa=pe(59301),hl=Object.defineProperty,Ol=Object.defineProperties,as=Object.getOwnPropertyDescriptors,yu=Object.getOwnPropertySymbols,eu=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,Ba=(Cn,Ln,ai)=>Ln in Cn?hl(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,tu=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))eu.call(Ln,ai)&&Ba(Cn,ai,Ln[ai]);if(yu)for(var ai of yu(Ln))fs.call(Ln,ai)&&Ba(Cn,ai,Ln[ai]);return Cn},Ao=(Cn,Ln)=>Ol(Cn,as(Ln)),Ea=(Cn,Ln,ai)=>new Promise((Ji,Gi)=>{var Ti=Mi=>{try{oi(ai.next(Mi))}catch(ur){Gi(ur)}},Ri=Mi=>{try{oi(ai.throw(Mi))}catch(ur){Gi(ur)}},oi=Mi=>Mi.done?Ji(Mi.value):Promise.resolve(Mi.value).then(Ti,Ri);oi((ai=ai.apply(Cn,Ln)).next())}),hr=({})=>{var Cn,Ln,ai,Ji,Gi,Ti,Ri,oi,Mi,ur,Hr,ga,Ko,Ya,Va;const[No]=(0,Ue.useSearchParams)(),Qr=(0,Ue.useParams)(),{data:Fi,dispatch:eo,setPreview:Vo,getData:ma,handlePreview:ya,disabled:Fo}=(0,le.useContext)(wt),[aa,Do]=(0,le.useState)(""),[Or,Aa]=(0,le.useState)((Ln=(Cn=Fi==null?void 0:Fi.item_types)==null?void 0:Cn[0])==null?void 0:Ln.item_type),[Wa,La]=(0,le.useState)(!0),[fl,xu]=(0,le.useState)(!1),Qt=(qt,sr)=>Ea(void 0,null,function*(){var kr,vr,lr,Bi,wr,to;const So=Fi.item_types.map(Ii=>Ii.item_type_text),gr=(kr=Fi==null?void 0:Fi.item_types)==null?void 0:kr.filter(Ii=>{var Wr,Zo;return((Wr=Ii.contents)==null?void 0:Wr.length)>0||((Zo=Ii==null?void 0:Ii.item_banks)==null?void 0:Zo.length)>0});if(Fi.sort_by_item_type=So,!((vr=Fi.item_types)!=null&&vr.length)){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((gr==null?void 0:gr.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 Ii=(0,qe.cloneDeep)(Fi),{item_types:Wr}=Ii||{};Ii.item_types=Wr.filter(Mr=>Mr.item_type===Or),(yield ze(Qr.id||Qr.categoryId,Ii)).status===0&&(Aa(sr),He.ZP.success("\u4FDD\u5B58\u6210\u529F"),qt||Ue.history.push("/paperlibrary"))}),yr=(Bi=(lr=Fi==null?void 0:Fi.item_types)==null?void 0:lr.filter(Ii=>Ii.item_type_text==="\u5B9E\u8BAD\u9898")[0])==null?void 0:Bi.item_banks,_i=0;yr==null||yr.map(Ii=>{Ii.high_resources_consume&&(_i=_i+1)}),console.log(_i),_i>0?Kn.default.info({centered:!0,icon:null,width:600,okText:"\u6211\u77E5\u9053\u4E86",title:"\u63D0\u793A",content:oa.createElement("div",null,oa.createElement("div",{className:Qn.tipcontent},oa.createElement("div",null,oa.createElement("div",{className:Qn.name},"\u60A8\u597D\uFF01",(wr=(0,Bn.eY)())==null?void 0:wr.username,"\uFF08",(to=(0,Bn.eY)())==null?void 0:to.login,"\uFF09\uFF1A"),oa.createElement("div",{className:Qn.tip},"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",oa.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"),oa.createElement("div",{className:Qn.info},oa.createElement("i",{className:"iconfont icon-xunifangzhenti1 mr10 font26"}),oa.createElement("span",{className:"mr10",style:{color:"#6A7283"}},"\u9AD8\u6D88\u8017\u5B9E\u9A8C"),oa.createElement("span",{style:{color:"#232B40"}},`${_i}\u4E2A`))),oa.createElement("div",null,oa.createElement("div",{className:Qn.img},oa.createElement("img",{src:ys,width:"124px",height:"124px"})),oa.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")))),onOk:()=>{mr()}}):mr()}),Yt=(qt,sr,kr,vr=!1)=>Ea(void 0,null,function*(){console.log(Fi);const lr=Ao(tu(tu({},Fi.exercise),Qr),{exerciseId:Qr.categoryId,sort_by_item_type:Fi.sort_by_item_type,difficulty:Fi.examination_bank.difficulty,exam_notes:Fi.examination_bank.exam_notes,exercise_name:Fi.examination_bank.name,time:Fi.examination_bank.time,changed_item_type:Or,item_types:Fi.item_types,sub_discipline_id:Fi.examination_bank.sub_discipline_id});(!qt||sr===1)&&(lr.is_reset=1);const Bi=yield(0,Zs.wy)(lr);return Bi.status===0&&(vr||He.ZP.success("\u4FEE\u6539\u6210\u529F "),Aa(kr),qt||Ue.history.push(`/classrooms/${Qr.coursesId}/exercise/${Qr.categoryId}/detail?random=true`)),Bi}),Dn=qt=>{Kn.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closable:!0,content:oa.createElement("div",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u9898\u578B\uFF1F"),onOk:()=>Ea(void 0,null,function*(){var sr,kr,vr,lr;if(Qr.id){if((yield Nt(Qr.id,{item_type:[qt]})).status!==0)return}else{const Bi=yield at(Qr.categoryId,{item_type:[qt]});if(ma(),Bi.status!==0)return}if(eo({type:"deleteQuestionType",payload:qt}),qt===Or){const Bi=Ie(Fi,{type:"deleteQuestionType",payload:qt});Aa(Bi.item_types.length?Bi.item_types[0].item_type:(kr=(sr=Fi==null?void 0:Fi.item_types)==null?void 0:sr[0])==null?void 0:kr.item_type)}else Aa((lr=(vr=Fi==null?void 0:Fi.item_types)==null?void 0:vr[0])==null?void 0:lr.item_type)})})};(0,le.useEffect)(()=>{var qt;(qt=Fi==null?void 0:Fi.examination_bank)!=null&&qt.name&&La(!1),(0,xo.Dk)("\u968F\u673A\u7EC4\u5377")},[(ai=Fi==null?void 0:Fi.examination_bank)==null?void 0:ai.name]);const nt=()=>Ea(void 0,null,function*(){var qt;let sr=yield Yt(!0,1,Or,!0);if((sr==null?void 0:sr.status)===0){const kr=yield(0,te.ZP)(`/api/exercises/${Qr==null?void 0:Qr.categoryId}/simulate_start_answer.json`,{method:"get",params:{coursesId:Qr==null?void 0:Qr.coursesId,categoryId:Qr==null?void 0:Qr.categoryId}});(kr==null?void 0:kr.status)!=-1&&window.open(`/classrooms/${Qr.coursesId}/exercise/${Qr.categoryId}/${(qt=(0,Bn.eY)())==null?void 0:qt.login}/initate_answer`)}});return oa.createElement("div",{className:Qn.questionInfo},oa.createElement("div",{className:"tc mb20"},oa.createElement(Me.VP,{defaultValue:(Ji=Fi==null?void 0:Fi.examination_bank)==null?void 0:Ji.name,onFinish:qt=>Ea(void 0,null,function*(){return eo({type:"updateBaseInfo",payload:Ao(tu({},Fi.examination_bank),{name:qt})}),(0,Zs.wy)({exercise_name:qt,exerciseId:Qr==null?void 0:Qr.categoryId}),!0})})),oa.createElement(lt.Z,{justify:"center",className:"mb20"},oa.createElement(dn.Z,{className:"mr30"},oa.createElement("span",{className:Qn.label},"\u7B54\u9898\u65F6\u957F"),oa.createElement("span",null,((Gi=Fi==null?void 0:Fi.examination_bank)==null?void 0:Gi.time)===-1?"\u4E0D\u9650":((Ti=Fi==null?void 0:Fi.examination_bank)==null?void 0:Ti.time)||"\u4E0D\u9650")),oa.createElement(dn.Z,{className:"mr30"},oa.createElement("span",{className:Qn.label},"\u96BE\u5EA6"),oa.createElement("span",null,(oi=Pe[`${(Ri=Fi==null?void 0:Fi.examination_bank)==null?void 0:Ri.difficulty}`])==null?void 0:oi.label)),oa.createElement(dn.Z,{className:"mr30"},oa.createElement("span",{className:Qn.label},"\u8BD5\u9898\u603B\u6570"),oa.createElement("span",null,((Mi=Fi==null?void 0:Fi.examination_bank)==null?void 0:Mi.question_count)||0)),oa.createElement(dn.Z,null,oa.createElement("span",{className:Qn.label},"\u603B\u5206"),oa.createElement("span",null,((Hr=(ur=Fi==null?void 0:Fi.examination_bank)==null?void 0:ur.total_score)==null?void 0:Hr.toFixed(1))||0))),oa.createElement("div",{className:Qn.content,style:{border:((ga=Fi==null?void 0:Fi.item_types)==null?void 0:ga.length)<=0&&"none"}},((Ko=Fi==null?void 0:Fi.item_types)==null?void 0:Ko.length)>0?oa.createElement(lt.Z,{wrap:!1},oa.createElement(dn.Z,{flex:"260px",className:Qn.leftPart},!Fo&&oa.createElement(lt.Z,{className:"mb20"},oa.createElement(zn.op,{style:{margin:"0 15px",borderRadius:2},onClick:()=>Do("setScore")},"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C"),(Qr==null?void 0:Qr.id)&&oa.createElement(zn.op,{shape:"default",onClick:()=>Do("questionType")},"\u6DFB\u52A0\u9898\u578B")),oa.createElement(mi,{list:Fi.item_types,onSelect:qt=>Ea(void 0,null,function*(){if(qt===Or)return;La(!0);const sr=Fi.item_types.find(kr=>kr.item_type===Or);if(Or!=="PRACTICAL"&&sr.contents.length>0&&(Qr!=null&&Qr.id)){const kr=(0,qe.cloneDeep)(Fi),{item_types:vr}=kr||{};kr.item_types=vr.filter(lr=>lr.item_type===Or);try{(yield ze(Qr.id||Qr.categoryId,kr)).status===0&&Aa(qt)}catch(lr){}}else Qr.categoryId?Yt(!0,2,qt):Qt(!0,qt);La(!1)}),onDelete:Dn})),oa.createElement(dn.Z,{flex:1,className:Qn.rightPart},oa.createElement(Ct.Z,{spinning:Wa},oa.createElement(Cs,{setVisibleModalType:Do,currentItemType:Or,onDelete:Dn})))):oa.createElement(pi.Z,{customText:"\u8BF7\u5148\u8BBE\u7F6E\u8BD5\u5377\u9898\u578B",styles:{margin:"70px auto"},ButtonTwo:oa.createElement(lt.Z,{justify:"center",className:"mt20"},(Qr==null?void 0:Qr.id)&&oa.createElement(zn.op,{style:{width:88},onClick:()=>Do("questionType")},"\u6DFB\u52A0\u9898\u578B"))})),!!(Qr!=null&&Qr.id)&&oa.createElement("div",{className:Qn.fixedBottom},oa.createElement(ms.Z,{className:`${Qn.previewBtn} mr20`,onClick:()=>Ea(void 0,null,function*(){var qt,sr;const kr=(qt=Fi==null?void 0:Fi.item_types)==null?void 0:qt.filter(vr=>{var lr,Bi;return((lr=vr.contents)==null?void 0:lr.length)>0||((Bi=vr==null?void 0:vr.item_banks)==null?void 0:Bi.length)>0});if(!((sr=Fi.item_types)!=null&&sr.length)){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((kr==null?void 0:kr.length)===0){He.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}yield Qt(!0,Or),ya()})},"\u8BD5\u5377\u9884\u89C8"),oa.createElement(ms.Z,{type:"primary",className:Qn.confirmBtn,onClick:()=>Qt()},oa.createElement("i",{className:"iconfont icon-baocun1 mr5"}),"\u4FDD\u5B58\u8BD5\u5377")),!!(Qr!=null&&Qr.categoryId)&&oa.createElement("div",{className:Qn.fixedBottom,style:{justifyContent:((Ya=Fi==null?void 0:Fi.exercise)==null?void 0:Ya.exercise_status)!==1?"end":"center"}},oa.createElement(ms.Z,{className:`${Qn.previewBtn} mr20`,onClick:()=>Ea(void 0,null,function*(){var qt,sr;document.body.scrollIntoView(),Ue.history.push(`/classrooms/${Qr.coursesId}/exercise/${(qt=Fi==null?void 0:Fi.exercise)==null?void 0:qt.id}/detail?random=${(sr=Fi==null?void 0:Fi.exercise)==null?void 0:sr.is_random}`)})},"\u8FD4\u56DE"),((Va=Fi==null?void 0:Fi.exercise)==null?void 0:Va.exercise_status)===1&&oa.createElement(ms.Z,{className:`${Qn.previewBtn} mr20`,onClick:nt},"\u6A21\u62DF\u8003\u8BD5"),(Fi==null?void 0:Fi.exercise.exercise_status)===1&&oa.createElement(ms.Z,{type:"primary",className:Qn.confirmBtn,onClick:()=>Yt()},"\u63D0\u4EA4")),oa.createElement(Hi,{open:aa==="questionType",onCancel:()=>Do(""),onOk:qt=>Ea(void 0,null,function*(){var sr,kr;const vr=[],lr=Ie(Fi,{type:"setQuestionType",payload:qt}),Bi=((sr=lr==null?void 0:lr.item_types)==null?void 0:sr.map(wr=>wr.item_type))||[];for(const wr of((kr=Fi==null?void 0:Fi.item_types)==null?void 0:kr.map(to=>to.item_type))||[])Bi.includes(wr)||vr.push(wr);Qr.id&&vr.length>0&&(yield Nt(Qr.id,{item_type:vr})).status!==0||(eo({type:"setQuestionType",payload:qt}),Aa(Or||lr.item_types[0].item_type),Do(""))})}),oa.createElement(fr,{open:aa==="setScore",onCancel:()=>{Do("")},onOk:qt=>Ea(void 0,null,function*(){console.log("---newData",qt);const sr=qt.item_types.map(kr=>({item_type:kr.item_type,score:kr.score}));Qr.id?(yield dt(Qr.id,{score_settings:sr})).status===0&&eo({type:"init",payload:qt}):(yield Ze(Qr.categoryId,{score_settings:sr})).status===0&&eo({type:"init",payload:qt}),Do("")})}),oa.createElement(tr,{open:aa==="rule",onCancel:()=>Do(""),currentItemType:Or,setVisibleModalType:Do}),No.get("type")==="settings"&&oa.createElement(ra,{open:aa==="selectShixun",onCancel:()=>Do(""),onOk:qt=>{if(console.log(qt),(qt==null?void 0:qt.length)<=0){He.ZP.info("\u5B9E\u8BAD\u6570\u4E0D\u80FD\u4E3A0");return}eo({type:"addShixun",payload:{shixunList:[...qt]}}),Do("")}}))},Rs=pe(78978),ss=pe(59301),sl=Object.defineProperty,jl=Object.defineProperties,ou=Object.getOwnPropertyDescriptors,Xi=Object.getOwnPropertySymbols,ws=Object.prototype.hasOwnProperty,Us=Object.prototype.propertyIsEnumerable,$l=(Cn,Ln,ai)=>Ln in Cn?sl(Cn,Ln,{enumerable:!0,configurable:!0,writable:!0,value:ai}):Cn[Ln]=ai,kl=(Cn,Ln)=>{for(var ai in Ln||(Ln={}))ws.call(Ln,ai)&&$l(Cn,ai,Ln[ai]);if(Xi)for(var ai of Xi(Ln))Us.call(Ln,ai)&&$l(Cn,ai,Ln[ai]);return Cn},Kl=(Cn,Ln)=>jl(Cn,ou(Ln)),Oo=(Cn,Ln,ai)=>new Promise((Ji,Gi)=>{var Ti=Mi=>{try{oi(ai.next(Mi))}catch(ur){Gi(ur)}},Ri=Mi=>{try{oi(ai.throw(Mi))}catch(ur){Gi(ur)}},oi=Mi=>Mi.done?Ji(Mi.value):Promise.resolve(Mi.value).then(Ti,Ri);oi((ai=ai.apply(Cn,Ln)).next())}),zl=()=>{var Cn,Ln,ai,Ji;const[Gi,Ti]=(0,le.useState)("baseInfo"),Ri=(0,Ue.useDispatch)();(0,le.useEffect)(()=>{Ri({type:"globalSetting/footerToggle",payload:!1})},[]);const oi=(0,Ue.useParams)(),Mi=!!(oi.id||oi.categoryId),[ur]=(0,Ue.useSearchParams)();(0,le.useEffect)(()=>{ur.get("type")==="settings"&&Ti("settings")},[]);const[Hr,ga]=(0,le.useReducer)(Ie,null),[Ko,Ya]=(0,le.useState)(!1),Va=()=>Oo(void 0,null,function*(){Ya(!0);let Or;oi.categoryId?Or=yield Gt(oi):Or=yield Le(oi.id),Ya(!1),Or.status===0&&ga({type:"init",payload:Or})});(0,le.useEffect)(()=>{Mi?Va():ga({type:"init",payload:{examination_bank:{difficulty:2}}})},[oi]);const[No,Qr]=(0,le.useState)(""),Fi=(Or,Aa)=>Oo(void 0,null,function*(){var Wa,La,fl,xu;const Qt=(Wa=Hr==null?void 0:Hr.item_types)==null?void 0:Wa.filter(nt=>{var qt;return((qt=nt==null?void 0:nt.item_type)==null?void 0:qt.toUpperCase())===(Aa==null?void 0:Aa.type)}),Yt={sort_by_item_type:Hr.sort_by_item_type,difficulty:Hr.examination_bank.difficulty,exam_notes:Hr.examination_bank.exam_notes,name:Hr.examination_bank.name,time:Hr.examination_bank.time,item_types:Hr.item_types};if(Or!==void 0&&!(Or!=null&&Or.single_question_id)){Yt.seleted_item_bank_ids=Or==null?void 0:Or.seleted_item_bank_ids,Yt.item_types=Qt;const nt=yield xt(Yt);if((nt==null?void 0:nt.status)===0){let qt=(0,qe.cloneDeep)(Fo.data);qt.questionList=(La=qt==null?void 0:qt.questionList)==null?void 0:La.map(sr=>{var kr;return sr.type===Aa.type?Kl(kl({},sr),{questions:((kr=nt==null?void 0:nt.questions)==null?void 0:kr.questions)||[]}):sr}),aa({show:!0,data:qt})}return}if(Or!==void 0&&(Or!=null&&Or.single_question_id)){Yt.seleted_item_bank_ids=Or==null?void 0:Or.seleted_item_bank_ids,Yt.single_question_id=Or==null?void 0:Or.single_question_id,Yt.item_types=Qt;const nt=yield xt(Yt);if((nt==null?void 0:nt.status)===0){let qt=(0,qe.cloneDeep)(Fo.data);qt.questionList=(fl=qt==null?void 0:qt.questionList)==null?void 0:fl.map(sr=>{var kr,vr;if(sr.type===Aa.type){const lr=(0,qe.cloneDeep)(sr==null?void 0:sr.questions);return lr.splice(Aa.index,1,(vr=(kr=nt==null?void 0:nt.questions)==null?void 0:kr.questions)==null?void 0:vr[0]),console.log(sr==null?void 0:sr.questions,lr,Aa.index,"new_questions"),Kl(kl({},sr),{questions:lr})}return sr}),aa({show:!0,data:qt})}return}const Dn=yield kt(Yt);if((Dn==null?void 0:Dn.status)===0){const nt=(0,xo.ad)(Dn);let qt=[];(xu=Hr==null?void 0:Hr.item_types)==null||xu.forEach(sr=>{var kr;const vr=(kr=nt==null?void 0:nt.questionList)==null?void 0:kr.find(lr=>sr.item_type===lr.type);qt.push(vr)}),console.log(Hr,"sortList"),qt=(0,qe.compact)(qt),nt.questionList=qt,aa({show:!0,data:nt}),Qr(new Date)}}),eo=Or=>{var Aa;let Wa=(0,qe.cloneDeep)(Fo.data);Wa.questionList=(Aa=Wa==null?void 0:Wa.questionList)==null?void 0:Aa.map(La=>La.type===Or.type?Kl(kl({},La),{questions_score:Or.scoreTotal}):La),ga({type:"changeQuestionScore",payload:{score:Or.score,itemType:Or.type}}),aa({show:!0,data:Wa})},Vo=Or=>Oo(void 0,null,function*(){const Aa={sort_by_item_type:Hr.sort_by_item_type,difficulty:Hr.examination_bank.difficulty,exam_notes:Hr.examination_bank.exam_notes,name:Hr.examination_bank.name,time:Hr.examination_bank.time,item_types:Hr.item_types,sub_discipline_id:Hr.examination_bank.sub_discipline_id};if(Or){(yield Ot(kl(kl({},Aa),Or))).status===0&&He.ZP.success("\u4FDD\u5B58\u6210\u529F");return}(yield ze(oi.id,Aa)).status===0&&(He.ZP.success("\u63D0\u4EA4\u6210\u529F"),Ue.history.push("/paperlibrary?defaultActiveKey=0"))}),ma=(0,zo.g)(),[ya]=ut.default.useForm(),[Fo,aa]=(0,le.useState)({show:!1,data:{}}),Do=!!((Cn=Hr==null?void 0:Hr.exercise)!=null&&Cn.exercise_status)&&((Ln=Hr==null?void 0:Hr.exercise)==null?void 0:Ln.exercise_status)!==1;return ss.createElement(wt.Provider,{value:{data:Hr,disabled:Do,dispatch:ga,setPreview:aa,getData:Va,handlePreview:Fi}},Fo.show?ss.createElement(Rs.Z,{key:No,data:Fo.data,onExchange:Fi,onTypeScore:eo,submit:Vo,goBack:()=>aa({show:!1,data:{}})}):ss.createElement("div",{className:Te.wrapper},ss.createElement("div",{className:"edu-container"},ss.createElement(We.Z,{className:Te.breadCrumbWrapper,separator:">",items:oi!=null&&oi.categoryId?[{title:ss.createElement(Ue.Link,{to:`/classrooms/${oi.coursesId}/exercise`},(Ji=(ai=(0,Bn.eY)())==null?void 0:ai.course)==null?void 0:Ji.course_name)},{title:ss.createElement(Ue.Link,{to:`/classrooms/${oi.coursesId}/exercise`},"\u8BD5\u5377\u5217\u8868")},{title:"\u7F16\u8F91\u8BD5\u5377"}]:[{title:ss.createElement(Ue.Link,{to:"/paperlibrary"},"\u8BD5\u5377\u5E93")},{title:"\u968F\u673A\u7EC4\u5377"}]}),ss.createElement(Me.d4,{activeKey:Gi,tabs:[{key:"baseInfo",label:"\u8BD5\u5377\u57FA\u7840\u4FE1\u606F"},{key:"settings",label:"\u7EC4\u5377\u914D\u7F6E"}],onChange:Or=>Oo(void 0,null,function*(){if(Or==="settings"&&(yield ya.validateFields(),!Mi)){const Aa=yield je(Hr);Aa.status===0&&Ue.history.replace(`/randompaper/edit/${Aa==null?void 0:Aa.examination_bank_id}?type=settings`)}Ti(Or)})}),Gi==="baseInfo"&&ss.createElement(Tn,{courseOptions:ma,setCurrentKey:Ti,loading:Ko,form:ya}),ss.createElement("div",{style:{display:Gi==="settings"?"block":"none"}},Hr&&ss.createElement(hr,null)))))}},66231:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return $e}});var le=pe(43418),Te={ul:"ul___TdfYY"},He=pe(32637),ut=pe(59301),We=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable,Ct=(Ft,lt)=>{var vt={};for(var Oe in Ft)Ue.call(Ft,Oe)&&lt.indexOf(Oe)<0&&(vt[Oe]=Ft[Oe]);if(Ft!=null&&We)for(var Oe of We(Ft))lt.indexOf(Oe)<0&&Me.call(Ft,Oe)&&(vt[Oe]=Ft[Oe]);return vt},$e=Ft=>{var lt=Ft,{open:vt,onCancel:Oe}=lt,te=Ct(lt,["open","onCancel"]);return ut.createElement(le.default,{centered:!0,open:vt,title:ut.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:Oe,footer:null},ut.createElement("div",null,ut.createElement("div",{className:"tc"},ut.createElement("img",{className:"mt10",src:He,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),ut.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),ut.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),ut.createElement("div",{style:{color:"#333"},className:"pt30 font14"},ut.createElement("ul",{className:Te.ul},ut.createElement("li",null,"1\u3001\u89E3\u7B54\u8001\u5E08\u7591\u60D1\u3001\u5E2E\u52A9\u8001\u5E08\u66F4\u5FEB\u719F\u6089\u548C\u4F7F\u7528\u5E73\u53F0\u6559\u5B66\u3002"),ut.createElement("li",null,"2\u3001\u534F\u52A9\u8001\u5E08\u521B\u5EFA\u8BFE\u5802\u3001\u8BFE\u7A0B\u8BBE\u8BA1\u3001\u505A\u597D\u6559\u5B66\u5DE5\u4F5C\u3002"),ut.createElement("li",null,"3\u3001\u6839\u636E\u8001\u5E08\u6559\u5B66\u65B9\u5411\uFF0C\u5206\u4EAB\u5934\u6B4C\u5E73\u53F0C9\u9662\u6821\u3001985\u9AD8\u6821\u3001211\u9AD8\u6821\u3001\u53CC\u4E00\u6D41\u9AD8\u6821\u8001\u5E08\u7ECF\u5178\u5B9E\u8DF5\u6559\u5B66\u6848\u4F8B\u3002")))))}},38389:function(On,mn,pe){"use strict";pe.d(mn,{g:function(){return We}});var le=pe(59301),Te=pe(83609),He=pe(73802),ut=(Ue,Me,Ct)=>new Promise((Pt,$e)=>{var Ft=Oe=>{try{vt(Ct.next(Oe))}catch(te){$e(te)}},lt=Oe=>{try{vt(Ct.throw(Oe))}catch(te){$e(te)}},vt=Oe=>Oe.done?Pt(Oe.value):Promise.resolve(Oe.value).then(Ft,lt);vt((Ct=Ct.apply(Ue,Me)).next())});const We=()=>{const[Ue,Me]=(0,le.useState)([]);return(0,le.useEffect)(()=>{ut(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))})},[]),Ue}},59579:function(On,mn,pe){"use strict";pe.d(mn,{U:function(){return Pt}});var le=pe(59301),Te=Object.defineProperty,He=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Ue=($e,Ft,lt)=>Ft in $e?Te($e,Ft,{enumerable:!0,configurable:!0,writable:!0,value:lt}):$e[Ft]=lt,Me=($e,Ft)=>{for(var lt in Ft||(Ft={}))ut.call(Ft,lt)&&Ue($e,lt,Ft[lt]);if(He)for(var lt of He(Ft))We.call(Ft,lt)&&Ue($e,lt,Ft[lt]);return $e},Ct=($e,Ft,lt)=>new Promise((vt,Oe)=>{var te=se=>{try{de(lt.next(se))}catch(he){Oe(he)}},ee=se=>{try{de(lt.throw(se))}catch(he){Oe(he)}},de=se=>se.done?vt(se.value):Promise.resolve(se.value).then(te,ee);de((lt=lt.apply($e,Ft)).next())});function Pt($e,Ft){const[lt,vt]=(0,le.useState)(Ft),[Oe,te]=(0,le.useState)(!1),[ee,de]=(0,le.useState)();return[lt,Oe,(he,ve=!1)=>Ct(this,null,function*(){const Ee=ve?Ft:Me(Me({},lt),he);te(!0),vt(Ee);const Be=yield $e(Ee);return te(!1),de(Be),Be}),ee,de]}},85187:function(On,mn,pe){"use strict";pe.d(mn,{AL:function(){return Ee},Iy:function(){return Ft},Qv:function(){return Oe},ez:function(){return ve},jb:function(){return lt}});var le=pe(32834),Te=pe.n(le),He=pe(11690),ut=pe.n(He);let We=1;function Ue(Xe,Ye){const dt=Xe.match(/^(\s+)(?:```)/);if(dt===null)return Ye;const Ze=dt[1];return Ye.split(`
`).map(Nt=>{const at=Nt.match(/^\s+/);if(at===null)return Nt;const[kt]=at;return kt.length>=Ze.length?Nt.slice(Ze.length):Nt}).join(`
`)}let Me=[],Ct=["<ul>"];const Pt=new(Te()).Renderer,$e=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ft(){Me.length=0,Ct=["<ul>"]}const lt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function vt(Xe,Ye,dt,Ze){if(Ye>=Xe.length||Xe[Ye].level<=dt)return Ye;var Nt=Xe[Ye];Ze.push("<li><a href='#"+We+Nt.anchor+"'>"+Nt.text+"</a>"),Ye++;var at=[];return Ye=vt(Xe,Ye,Nt.level,at),at.length>0&&(Ze.push("<ul>"),at.forEach(function(kt){Ze.push(kt)}),Ze.push("</ul>")),Ze.push("</li>"),Ye=vt(Xe,Ye,dt,Ze),Ye}function Oe(){return vt(Me,0,0,Ct),Ct.push("</ul>"),Ct.join("")}const te={heading(Xe){const Ye=$e.exec(Xe);if(We+=1,Ye)return{type:"heading",raw:Ye[0],depth:Ye[1].length,text:Ye[2]}},fences(Xe){const Ye=this.rules.block.fences.exec(Xe);if(Ye){const dt=Ye[0];let Ze=Ue(dt,Ye[3]||"");const Nt=Ye[2]?Ye[2].trim():Ye[2];if(["latex","katex","math"].indexOf(Nt)>=0){const at=se(),kt=Ze;Ze=at,he[at]={type:"block",expression:kt}}return{type:"code",raw:dt,lang:Nt,text:Ze}}}},ee=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let de=0;const se=()=>`__special_katext_id_${de++}__`;let he={};function ve(){return he}function Ee(){de=0,he={}}function Be(Xe){return Xe=Xe.replace(ee,(Ye,dt)=>{const Ze=se();return he[Ze]={type:"inline",expression:dt},Ze}),Xe}const Le=Pt.listitem;Pt.listitem=function(Xe){return Le(Be(Xe))};const ze=Pt.paragraph;Pt.paragraph=function(Xe){return ze(Be(Xe))};const je=Pt.tablecell;Pt.tablecell=function(Xe,Ye){return je(Be(Xe),Ye)},Pt.code=function(Xe,Ye,dt){const Ze=(Ye||"").match(/\S*/)[0];return Ze?["latex","katex","math"].indexOf(Ze)>=0?`<p class='editormd-tex'>${Xe}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ye}">${dt?Xe:(0,He.escape)(Xe,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(dt?Xe:(0,He.escape)(Xe,!0))+"</code></pre>"},Pt.heading=function(Xe,Ye,dt){let Ze=this.options.headerPrefix+dt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Me.push({anchor:Ze,level:Ye,text:Xe}),"<h"+Ye+' id="'+We+Ze+'">'+Xe+"</h"+Ye+">"},Te().setOptions({silent:!0,gfm:!0,pedantic:!1}),Te().use({tokenizer:te,renderer:Pt}),mn.ZP=Te()},50371:function(On,mn){"use strict";function pe(){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(ut=>{const We=He[ut];We!==void 0&&(le[ut]=We)})}return le}mn.Z=pe},77578:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return le}});const le=Te=>Te?typeof Te=="function"?Te():Te:null},13845:function(On,mn,pe){"use strict";pe.d(mn,{F:function(){return le},Z:function(){return Te}});function le(He){return He!=null&&He===He.window}function Te(He,ut){var We,Ue;if(typeof window=="undefined")return 0;const Me=ut?"scrollTop":"scrollLeft";let Ct=0;return le(He)?Ct=He[ut?"pageYOffset":"pageXOffset"]:He instanceof Document?Ct=He.documentElement[Me]:(He instanceof HTMLElement||He)&&(Ct=He[Me]),He&&!le(He)&&typeof Ct!="number"&&(Ct=(Ue=((We=He.ownerDocument)!==null&&We!==void 0?We:He).documentElement)===null||Ue===void 0?void 0:Ue[Me]),Ct}},56762:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Te}});var le=pe(59301);function Te(){const[,He]=le.useReducer(ut=>ut+1,0);return He}},68031:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return ut}});var le=pe(16089);function Te(We,Ue,Me,Ct){const Pt=Me-Ue;return We/=Ct/2,We<1?Pt/2*We*We*We+Ue:Pt/2*((We-=2)*We*We+2)+Ue}var He=pe(13845);function ut(We){let Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:Me=()=>window,callback:Ct,duration:Pt=450}=Ue,$e=Me(),Ft=(0,He.Z)($e,!0),lt=Date.now(),vt=()=>{const te=Date.now()-lt,ee=Te(te>Pt?Pt:te,Ft,We,Pt);(0,He.F)($e)?$e.scrollTo(window.pageXOffset,ee):$e instanceof Document||$e.constructor.name==="HTMLDocument"?$e.documentElement.scrollTop=ee:$e.scrollTop=ee,te<Pt?(0,le.Z)(vt):typeof Ct=="function"&&Ct()};(0,le.Z)(vt)}},66104:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return kt}});var le=pe(92310),Te=pe.n(le),He=pe(11592),ut=pe(26112),We=pe(59301),Ue=pe(92343),Me=pe(36355),Ct=pe(84105),Pt=pe(91857);const $e=xt=>{let{children:Ot}=xt;const{getPrefixCls:Gt}=We.useContext(Me.E_),At=Gt("breadcrumb");return We.createElement("li",{className:`${At}-separator`,"aria-hidden":"true"},Ot===""?Ot:Ot||"/")};$e.__ANT_BREADCRUMB_SEPARATOR=!0;var Ft=$e,lt=function(xt,Ot){var Gt={};for(var At in xt)Object.prototype.hasOwnProperty.call(xt,At)&&Ot.indexOf(At)<0&&(Gt[At]=xt[At]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,At=Object.getOwnPropertySymbols(xt);qe<At.length;qe++)Ot.indexOf(At[qe])<0&&Object.prototype.propertyIsEnumerable.call(xt,At[qe])&&(Gt[At[qe]]=xt[At[qe]]);return Gt};function vt(xt,Ot){if(xt.title===void 0||xt.title===null)return null;const Gt=Object.keys(Ot).join("|");return typeof xt.title=="object"?xt.title:String(xt.title).replace(new RegExp(`:(${Gt})`,"g"),(At,qe)=>Ot[qe]||At)}function Oe(xt,Ot,Gt,At){if(Gt==null)return null;const{className:qe,onClick:Ve}=Ot,_t=lt(Ot,["className","onClick"]),vn=Object.assign(Object.assign({},(0,ut.Z)(_t,{data:!0,aria:!0})),{onClick:Ve});return At!==void 0?We.createElement("a",Object.assign({},vn,{className:Te()(`${xt}-link`,qe),href:At}),Gt):We.createElement("span",Object.assign({},vn,{className:Te()(`${xt}-link`,qe)}),Gt)}function te(xt,Ot){return(At,qe,Ve,_t,vn)=>{if(Ot)return Ot(At,qe,Ve,_t);const yn=vt(At,qe);return Oe(xt,At,yn,vn)}}var ee=function(xt,Ot){var Gt={};for(var At in xt)Object.prototype.hasOwnProperty.call(xt,At)&&Ot.indexOf(At)<0&&(Gt[At]=xt[At]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,At=Object.getOwnPropertySymbols(xt);qe<At.length;qe++)Ot.indexOf(At[qe])<0&&Object.prototype.propertyIsEnumerable.call(xt,At[qe])&&(Gt[At[qe]]=xt[At[qe]]);return Gt};const de=xt=>{const{prefixCls:Ot,separator:Gt="/",children:At,menu:qe,overlay:Ve,dropdownProps:_t,href:vn}=xt,jt=(en=>{if(qe||Ve){const ln=Object.assign({},_t);if(qe){const Wn=qe||{},{items:un}=Wn,kn=ee(Wn,["items"]);ln.menu=Object.assign(Object.assign({},kn),{items:un==null?void 0:un.map((wt,jn)=>{var{key:ci,title:Ge,label:be,path:Pe}=wt,Ne=ee(wt,["key","title","label","path"]);let Ie=be!=null?be:Ge;return Pe&&(Ie=We.createElement("a",{href:`${vn}${Pe}`},Ie)),Object.assign(Object.assign({},Ne),{key:ci!=null?ci:jn,label:Ie})})})}else Ve&&(ln.overlay=Ve);return We.createElement(Pt.Z,Object.assign({placement:"bottom"},ln),We.createElement("span",{className:`${Ot}-overlay-link`},en,We.createElement(Ct.Z,null)))}return en})(At);return jt!=null?We.createElement(We.Fragment,null,We.createElement("li",null,jt),Gt&&We.createElement(Ft,null,Gt)):null},se=xt=>{const{prefixCls:Ot,children:Gt,href:At}=xt,qe=ee(xt,["prefixCls","children","href"]),{getPrefixCls:Ve}=We.useContext(Me.E_),_t=Ve("breadcrumb",Ot);return We.createElement(de,Object.assign({},qe,{prefixCls:_t}),Oe(_t,qe,Gt,At))};se.__ANT_BREADCRUMB_ITEM=!0;var he=se,ve=pe(17313),Ee=pe(83116),Be=pe(37613);const Le=xt=>{const{componentCls:Ot,iconCls:Gt}=xt;return{[Ot]:Object.assign(Object.assign({},(0,ve.Wf)(xt)),{color:xt.itemColor,fontSize:xt.fontSize,[Gt]:{fontSize:xt.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:xt.linkColor,transition:`color ${xt.motionDurationMid}`,padding:`0 ${xt.paddingXXS}px`,borderRadius:xt.borderRadiusSM,height:xt.lineHeight*xt.fontSize,display:"inline-block",marginInline:-xt.marginXXS,"&:hover":{color:xt.linkHoverColor,backgroundColor:xt.colorBgTextHover}},(0,ve.Qy)(xt)),"li:last-child":{color:xt.lastItemColor},[`${Ot}-separator`]:{marginInline:xt.separatorMargin,color:xt.separatorColor},[`${Ot}-link`]:{[`
> ${Gt} + span,
> ${Gt} + a
`]:{marginInlineStart:xt.marginXXS}},[`${Ot}-overlay-link`]:{borderRadius:xt.borderRadiusSM,height:xt.lineHeight*xt.fontSize,display:"inline-block",padding:`0 ${xt.paddingXXS}px`,marginInline:-xt.marginXXS,[`> ${Gt}`]:{marginInlineStart:xt.marginXXS,fontSize:xt.fontSizeIcon},"&:hover":{color:xt.linkHoverColor,backgroundColor:xt.colorBgTextHover,a:{color:xt.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${xt.componentCls}-rtl`]:{direction:"rtl"}})}};var ze=(0,Ee.Z)("Breadcrumb",xt=>{const Ot=(0,Be.TS)(xt,{});return[Le(Ot)]},xt=>({itemColor:xt.colorTextDescription,lastItemColor:xt.colorText,iconFontSize:xt.fontSize,linkColor:xt.colorTextDescription,linkHoverColor:xt.colorText,separatorColor:xt.colorTextDescription,separatorMargin:xt.marginXS})),je=function(xt,Ot){var Gt={};for(var At in xt)Object.prototype.hasOwnProperty.call(xt,At)&&Ot.indexOf(At)<0&&(Gt[At]=xt[At]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,At=Object.getOwnPropertySymbols(xt);qe<At.length;qe++)Ot.indexOf(At[qe])<0&&Object.prototype.propertyIsEnumerable.call(xt,At[qe])&&(Gt[At[qe]]=xt[At[qe]]);return Gt};function Xe(xt){const{breadcrumbName:Ot,children:Gt}=xt,At=je(xt,["breadcrumbName","children"]),qe=Object.assign({title:Ot},At);return Gt&&(qe.menu={items:Gt.map(Ve=>{var{breadcrumbName:_t}=Ve,vn=je(Ve,["breadcrumbName"]);return Object.assign(Object.assign({},vn),{title:_t})})}),qe}function Ye(xt,Ot){return(0,We.useMemo)(()=>xt||(Ot?Ot.map(Xe):null),[xt,Ot])}var dt=function(xt,Ot){var Gt={};for(var At in xt)Object.prototype.hasOwnProperty.call(xt,At)&&Ot.indexOf(At)<0&&(Gt[At]=xt[At]);if(xt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var qe=0,At=Object.getOwnPropertySymbols(xt);qe<At.length;qe++)Ot.indexOf(At[qe])<0&&Object.prototype.propertyIsEnumerable.call(xt,At[qe])&&(Gt[At[qe]]=xt[At[qe]]);return Gt};const Ze=(xt,Ot)=>{if(Ot===void 0)return Ot;let Gt=(Ot||"").replace(/^\//,"");return Object.keys(xt).forEach(At=>{Gt=Gt.replace(`:${At}`,xt[At])}),Gt},Nt=xt=>{const{prefixCls:Ot,separator:Gt="/",style:At,className:qe,rootClassName:Ve,routes:_t,items:vn,children:yn,itemRender:jt,params:en={}}=xt,ln=dt(xt,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:Wn,direction:un,breadcrumb:kn}=We.useContext(Me.E_);let wt;const jn=Wn("breadcrumb",Ot),[ci,Ge]=ze(jn),be=Ye(vn,_t),Pe=te(jn,jt);if(be&&be.length>0){const xe=[],ct=vn||_t;wt=be.map((Lt,et)=>{const{path:it,key:Bt,type:Dt,menu:ft,overlay:$t,onClick:xn,className:an,separator:Jt,dropdownProps:Tn}=Lt,Kn=Ze(en,it);Kn!==void 0&&xe.push(Kn);const dn=Bt!=null?Bt:et;if(Dt==="separator")return We.createElement(Ft,{key:dn},Jt);const Qn={},pi=et===be.length-1;ft?Qn.menu=ft:$t&&(Qn.overlay=$t);let{href:zn}=Lt;return xe.length&&Kn!==void 0&&(zn=`#/${xe.join("/")}`),We.createElement(de,Object.assign({key:dn},Qn,(0,ut.Z)(Lt,{data:!0,aria:!0}),{className:an,dropdownProps:Tn,href:zn,separator:pi?"":Gt,onClick:xn,prefixCls:jn}),Pe(Lt,en,ct,xe,zn))})}else if(yn){const xe=(0,He.Z)(yn).length;wt=(0,He.Z)(yn).map((ct,Lt)=>{if(!ct)return ct;const et=Lt===xe-1;return(0,Ue.Tm)(ct,{separator:et?"":Gt,key:Lt})})}const Ne=Te()(jn,kn==null?void 0:kn.className,{[`${jn}-rtl`]:un==="rtl"},qe,Ve,Ge),Ie=Object.assign(Object.assign({},kn==null?void 0:kn.style),At);return ci(We.createElement("nav",Object.assign({className:Ne,style:Ie},ln),We.createElement("ol",null,wt)))};Nt.Item=he,Nt.Separator=Ft;var at=Nt,kt=at},19842:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Sr}});var le=pe(26407),Te=pe(59301),He=pe(33853),ut=pe(58617),We=pe(38819),Ue=pe(92310),Me=pe.n(Ue),Ct=pe(92413),Pt=pe(33606),$e=pe(37061),Ft=pe(77861),lt=pe(17115),vt=pe(90782),Oe=pe(6089),te=pe(18929),ee=Te.createContext(null),de=ee,se=pe(39559),he=pe(400),ve=pe(33708),Ee="__rc_cascader_search_mark__",Be=function(xi,zi,qi){var Gn=qi.label;return zi.some(function(ti){return String(ti[Gn]).toLowerCase().includes(xi.toLowerCase())})},Le=function(xi,zi,qi,Gn){return zi.map(function(ti){return ti[Gn.label]}).join(" / ")},ze=function(Fn,xi,zi,qi,Gn,ti){var Zt=Gn.filter,Wt=Zt===void 0?Be:Zt,Qe=Gn.render,on=Qe===void 0?Le:Qe,cn=Gn.limit,Mt=cn===void 0?50:cn,ht=Gn.sort;return Te.useMemo(function(){var nn=[];if(!Fn)return[];function gn(_n,qn){var Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;_n.forEach(function(Pn){if(!(!ht&&Mt!==!1&&Mt>0&&nn.length>=Mt)){var Xn=[].concat((0,le.Z)(qn),[Pn]),Ci=Pn[zi.children],tn=Et||Pn.disabled;if((!Ci||Ci.length===0||ti)&&Wt(Fn,Xn,{label:zi.label})){var sn;nn.push((0,ve.Z)((0,ve.Z)({},Pn),{},(sn={disabled:tn},(0,he.Z)(sn,zi.label,on(Fn,Xn,qi,zi)),(0,he.Z)(sn,Ee,Xn),(0,he.Z)(sn,zi.children,void 0),sn)))}Ci&&gn(Pn[zi.children],Xn,tn)}})}return gn(xi,[]),ht&&nn.sort(function(_n,qn){return ht(_n[Ee],qn[Ee],Fn,zi)}),Mt!==!1&&Mt>0?nn.slice(0,Mt):nn},[Fn,xi,zi,qi,on,ti,Wt,ht,Mt])},je="__RC_CASCADER_SPLIT__",Xe="SHOW_PARENT",Ye="SHOW_CHILD";function dt(Fn){return Fn.join(je)}function Ze(Fn){return Fn.map(dt)}function Nt(Fn){return Fn.split(je)}function at(Fn){var xi=Fn||{},zi=xi.label,qi=xi.value,Gn=xi.children,ti=qi||"value";return{label:zi||"label",value:ti,key:ti,children:Gn||"children"}}function kt(Fn,xi){var zi,qi;return(zi=Fn.isLeaf)!==null&&zi!==void 0?zi:!((qi=Fn[xi.children])!==null&&qi!==void 0&&qi.length)}function xt(Fn){var xi=Fn.parentElement;if(xi){var zi=Fn.offsetTop-xi.offsetTop;zi-xi.scrollTop<0?xi.scrollTo({top:zi}):zi+Fn.offsetHeight-xi.scrollTop>xi.offsetHeight&&xi.scrollTo({top:zi+Fn.offsetHeight-xi.offsetHeight})}}function Ot(Fn,xi){return Fn.map(function(zi){var qi;return(qi=zi[Ee])===null||qi===void 0?void 0:qi.map(function(Gn){return Gn[xi.value]})})}function Gt(Fn,xi,zi){var qi=new Set(Fn),Gn=xi();return Fn.filter(function(ti){var Zt=Gn[ti],Wt=Zt?Zt.parent:null,Qe=Zt?Zt.children:null;return Zt&&Zt.node.disabled?!0:zi===Ye?!(Qe&&Qe.some(function(on){return on.key&&qi.has(on.key)})):!(Wt&&!Wt.node.disabled&&qi.has(Wt.key))})}function At(Fn,xi,zi){for(var qi=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Gn=xi,ti=[],Zt=function(){var on,cn,Mt,ht=Fn[Wt],nn=(on=Gn)===null||on===void 0?void 0:on.findIndex(function(_n){var qn=_n[zi.value];return qi?String(qn)===String(ht):qn===ht}),gn=nn!==-1?(cn=Gn)===null||cn===void 0?void 0:cn[nn]:null;ti.push({value:(Mt=gn==null?void 0:gn[zi.value])!==null&&Mt!==void 0?Mt:ht,index:nn,option:gn}),Gn=gn==null?void 0:gn[zi.children]},Wt=0;Wt<Fn.length;Wt+=1)Zt();return ti}var qe=function(Fn,xi,zi,qi,Gn){return Te.useMemo(function(){var ti=Gn||function(Zt){var Wt=qi?Zt.slice(-1):Zt,Qe=" / ";return Wt.every(function(on){return["string","number"].includes((0,se.Z)(on))})?Wt.join(Qe):Wt.reduce(function(on,cn,Mt){var ht=Te.isValidElement(cn)?Te.cloneElement(cn,{key:Mt}):cn;return Mt===0?[ht]:[].concat((0,le.Z)(on),[Qe,ht])},[])};return Fn.map(function(Zt){var Wt,Qe,on=At(Zt,xi,zi),cn=ti(on.map(function(ht){var nn,gn=ht.option,_n=ht.value;return(nn=gn==null?void 0:gn[zi.label])!==null&&nn!==void 0?nn:_n}),on.map(function(ht){var nn=ht.option;return nn})),Mt=dt(Zt);return{label:cn,value:Mt,key:Mt,valueCells:Zt,disabled:(Wt=on[on.length-1])===null||Wt===void 0||(Qe=Wt.option)===null||Qe===void 0?void 0:Qe.disabled}})},[Fn,xi,zi,Gn,qi])},Ve=pe(71430),_t=function(Fn,xi){var zi=Te.useRef({options:null,info:null}),qi=Te.useCallback(function(){return zi.current.options!==Fn&&(zi.current.options=Fn,zi.current.info=(0,Ve.I8)(Fn,{fieldNames:xi,initWrapper:function(ti){return(0,ve.Z)((0,ve.Z)({},ti),{},{pathKeyEntities:{}})},processEntity:function(ti,Zt){var Wt=ti.nodes.map(function(Qe){return Qe[xi.value]}).join(je);Zt.pathKeyEntities[Wt]=ti,ti.key=Wt}})),zi.current.info.pathKeyEntities},[xi,Fn]);return qi},vn=function(Fn,xi){return Te.useCallback(function(zi){var qi=[],Gn=[];return zi.forEach(function(ti){var Zt=At(ti,Fn,xi);Zt.every(function(Wt){return Wt.option})?Gn.push(ti):qi.push(ti)}),[Gn,qi]},[Fn,xi])},yn=pe(48736);function jt(Fn){return Te.useMemo(function(){if(!Fn)return[!1,{}];var xi={matchInputWidth:!0,limit:50};return Fn&&(0,se.Z)(Fn)==="object"&&(xi=(0,ve.Z)((0,ve.Z)({},xi),Fn)),xi.limit<=0&&delete xi.limit,[!0,xi]},[Fn])}var en=Te.memo(function(Fn){var xi=Fn.children;return xi},function(Fn,xi){return!xi.open}),ln=en;function Wn(Fn){var xi,zi=Fn.prefixCls,qi=Fn.checked,Gn=Fn.halfChecked,ti=Fn.disabled,Zt=Fn.onClick,Wt=Fn.disableCheckbox,Qe=Te.useContext(de),on=Qe.checkable,cn=typeof on!="boolean"?on:null;return Te.createElement("span",{className:Me()("".concat(zi),(xi={},(0,he.Z)(xi,"".concat(zi,"-checked"),qi),(0,he.Z)(xi,"".concat(zi,"-indeterminate"),!qi&&Gn),(0,he.Z)(xi,"".concat(zi,"-disabled"),ti||Wt),xi)),onClick:Zt},cn)}var un="__cascader_fix_label__";function kn(Fn){var xi=Fn.prefixCls,zi=Fn.multiple,qi=Fn.options,Gn=Fn.activeValue,ti=Fn.prevValuePath,Zt=Fn.onToggleOpen,Wt=Fn.onSelect,Qe=Fn.onActive,on=Fn.checkedSet,cn=Fn.halfCheckedSet,Mt=Fn.loadingKeys,ht=Fn.isSelectable,nn=Fn.searchValue,gn="".concat(xi,"-menu"),_n="".concat(xi,"-menu-item"),qn=Te.useContext(de),Et=qn.fieldNames,Pn=qn.changeOnSelect,Xn=qn.expandTrigger,Ci=qn.expandIcon,tn=qn.loadingIcon,sn=qn.dropdownMenuColumnStyle,In=Xn==="hover",ji=Te.useMemo(function(){return qi.map(function(Ai){var Si,ki=Ai.disabled,Ni=Ai.disableCheckbox,ir=Ai[Ee],zr=(Si=Ai[un])!==null&&Si!==void 0?Si:Ai[Et.label],Vr=Ai[Et.value],Zn=kt(Ai,Et),io=ir?ir.map(function(Ui){return Ui[Et.value]}):[].concat((0,le.Z)(ti),[Vr]),Yr=dt(io),Fr=Mt.includes(Yr),wn=on.has(Yr),ri=cn.has(Yr);return{disabled:ki,label:zr,value:Vr,isLeaf:Zn,isLoading:Fr,checked:wn,halfChecked:ri,option:Ai,disableCheckbox:Ni,fullPath:io,fullPathKey:Yr}})},[qi,on,Et,cn,Mt,ti]);return Te.createElement("ul",{className:gn,role:"menu"},ji.map(function(Ai){var Si,ki=Ai.disabled,Ni=Ai.label,ir=Ai.value,zr=Ai.isLeaf,Vr=Ai.isLoading,Zn=Ai.checked,io=Ai.halfChecked,Yr=Ai.option,Fr=Ai.fullPath,wn=Ai.fullPathKey,ri=Ai.disableCheckbox,Ui=function(){if(!(ki||nn)){var qr=(0,le.Z)(Fr);In&&zr&&qr.pop(),Qe(qr)}},Pr=function(){ht(Yr)&&Wt(Fr,zr)},er;return typeof Yr.title=="string"?er=Yr.title:typeof Ni=="string"&&(er=Ni),Te.createElement("li",{key:wn,className:Me()(_n,(Si={},(0,he.Z)(Si,"".concat(_n,"-expand"),!zr),(0,he.Z)(Si,"".concat(_n,"-active"),Gn===ir||Gn===wn),(0,he.Z)(Si,"".concat(_n,"-disabled"),ki),(0,he.Z)(Si,"".concat(_n,"-loading"),Vr),Si)),style:sn,role:"menuitemcheckbox",title:er,"aria-checked":Zn,"data-path-key":wn,onClick:function(){Ui(),!ri&&(!zi||zr)&&Pr()},onDoubleClick:function(){Pn&&Zt(!1)},onMouseEnter:function(){In&&Ui()},onMouseDown:function(qr){qr.preventDefault()}},zi&&Te.createElement(Wn,{prefixCls:"".concat(xi,"-checkbox"),checked:Zn,halfChecked:io,disabled:ki||ri,disableCheckbox:ri,onClick:function(qr){ri||(qr.stopPropagation(),Pr())}}),Te.createElement("div",{className:"".concat(_n,"-content")},Ni),!Vr&&Ci&&!zr&&Te.createElement("div",{className:"".concat(_n,"-expand-icon")},Ci),Vr&&tn&&Te.createElement("div",{className:"".concat(_n,"-loading-icon")},tn))}))}var wt=function(){var Fn=(0,Ft.lk)(),xi=Fn.multiple,zi=Fn.open,qi=Te.useContext(de),Gn=qi.values,ti=Te.useState([]),Zt=(0,Pt.Z)(ti,2),Wt=Zt[0],Qe=Zt[1];return Te.useEffect(function(){if(zi&&!xi){var on=Gn[0];Qe(on||[])}},[zi]),[Wt,Qe]},jn=pe(10228),ci=function(Fn,xi,zi,qi,Gn,ti){var Zt=(0,Ft.lk)(),Wt=Zt.direction,Qe=Zt.searchValue,on=Zt.toggleOpen,cn=Zt.open,Mt=Wt==="rtl",ht=Te.useMemo(function(){for(var sn=-1,In=xi,ji=[],Ai=[],Si=qi.length,ki=Ot(xi,zi),Ni=function(Yr){var Fr=In.findIndex(function(wn,ri){return(ki[ri]?dt(ki[ri]):wn[zi.value])===qi[Yr]});if(Fr===-1)return"break";sn=Fr,ji.push(sn),Ai.push(qi[Yr]),In=In[sn][zi.children]},ir=0;ir<Si&&In;ir+=1){var zr=Ni(ir);if(zr==="break")break}for(var Vr=xi,Zn=0;Zn<ji.length-1;Zn+=1)Vr=Vr[ji[Zn]][zi.children];return[Ai,sn,Vr,ki]},[qi,zi,xi]),nn=(0,Pt.Z)(ht,4),gn=nn[0],_n=nn[1],qn=nn[2],Et=nn[3],Pn=function(In){Gn(In)},Xn=function(In){var ji=qn.length,Ai=_n;Ai===-1&&In<0&&(Ai=ji);for(var Si=0;Si<ji;Si+=1){Ai=(Ai+In+ji)%ji;var ki=qn[Ai];if(ki&&!ki.disabled){var Ni=gn.slice(0,-1).concat(Et[Ai]?dt(Et[Ai]):ki[zi.value]);Pn(Ni);return}}},Ci=function(){if(gn.length>1){var In=gn.slice(0,-1);Pn(In)}else on(!1)},tn=function(){var In,ji=((In=qn[_n])===null||In===void 0?void 0:In[zi.children])||[],Ai=ji.find(function(ki){return!ki.disabled});if(Ai){var Si=[].concat((0,le.Z)(gn),[Ai[zi.value]]);Pn(Si)}};Te.useImperativeHandle(Fn,function(){return{onKeyDown:function(In){var ji=In.which;switch(ji){case jn.Z.UP:case jn.Z.DOWN:{var Ai=0;ji===jn.Z.UP?Ai=-1:ji===jn.Z.DOWN&&(Ai=1),Ai!==0&&Xn(Ai);break}case jn.Z.LEFT:{if(Qe)break;Mt?tn():Ci();break}case jn.Z.RIGHT:{if(Qe)break;Mt?Ci():tn();break}case jn.Z.BACKSPACE:{Qe||Ci();break}case jn.Z.ENTER:{if(gn.length){var Si=qn[_n],ki=(Si==null?void 0:Si[Ee])||[];ki.length?ti(ki.map(function(Ni){return Ni[zi.value]}),ki[ki.length-1]):ti(gn,qn[_n])}break}case jn.Z.ESC:on(!1),cn&&In.stopPropagation()}},onKeyUp:function(){}}})},Ge=Te.forwardRef(function(Fn,xi){var zi,qi,Gn,ti,Zt=(0,Ft.lk)(),Wt=Zt.prefixCls,Qe=Zt.multiple,on=Zt.searchValue,cn=Zt.toggleOpen,Mt=Zt.notFoundContent,ht=Zt.direction,nn=Zt.open,gn=Te.useRef(),_n=ht==="rtl",qn=Te.useContext(de),Et=qn.options,Pn=qn.values,Xn=qn.halfValues,Ci=qn.fieldNames,tn=qn.changeOnSelect,sn=qn.onSelect,In=qn.searchOptions,ji=qn.dropdownPrefixCls,Ai=qn.loadData,Si=qn.expandTrigger,ki=ji||Wt,Ni=Te.useState([]),ir=(0,Pt.Z)(Ni,2),zr=ir[0],Vr=ir[1],Zn=function(tr){if(!(!Ai||on)){var ia=At(tr,Et,Ci),zo=ia.map(function(xo){var $o=xo.option;return $o}),Nr=zo[zo.length-1];if(Nr&&!kt(Nr,Ci)){var Br=dt(tr);Vr(function(xo){return[].concat((0,le.Z)(xo),[Br])}),Ai(zo)}}};Te.useEffect(function(){zr.length&&zr.forEach(function(Go){var tr=Nt(Go),ia=At(tr,Et,Ci,!0).map(function(Nr){var Br=Nr.option;return Br}),zo=ia[ia.length-1];(!zo||zo[Ci.children]||kt(zo,Ci))&&Vr(function(Nr){return Nr.filter(function(Br){return Br!==Go})})})},[Et,zr,Ci]);var io=Te.useMemo(function(){return new Set(Ze(Pn))},[Pn]),Yr=Te.useMemo(function(){return new Set(Ze(Xn))},[Xn]),Fr=wt(),wn=(0,Pt.Z)(Fr,2),ri=wn[0],Ui=wn[1],Pr=function(tr){Ui(tr),Zn(tr)},er=function(tr){var ia=tr.disabled,zo=kt(tr,Ci);return!ia&&(zo||tn||Qe)},Cr=function(tr,ia){var zo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;sn(tr),!Qe&&(ia||tn&&(Si==="hover"||zo))&&cn(!1)},qr=Te.useMemo(function(){return on?In:Et},[on,In,Et]),Zr=Te.useMemo(function(){for(var Go=[{options:qr}],tr=qr,ia=Ot(tr,Ci),zo=function(){var $o=ri[Nr],$i=tr.find(function(ra,va){return(ia[va]?dt(ia[va]):ra[Ci.value])===$o}),st=$i==null?void 0:$i[Ci.children];if(!(st!=null&&st.length))return"break";tr=st,Go.push({options:st})},Nr=0;Nr<ri.length;Nr+=1){var Br=zo();if(Br==="break")break}return Go},[qr,ri,Ci]),Ir=function(tr,ia){er(ia)&&Cr(tr,kt(ia,Ci),!0)};ci(xi,qr,Ci,ri,Pr,Ir),Te.useEffect(function(){for(var Go=0;Go<ri.length;Go+=1){var tr,ia=ri.slice(0,Go+1),zo=dt(ia),Nr=(tr=gn.current)===null||tr===void 0?void 0:tr.querySelector('li[data-path-key="'.concat(zo.replace(/\\{0,2}"/g,'\\"'),'"]'));Nr&&xt(Nr)}},[ri]);var Ur=!((zi=Zr[0])!==null&&zi!==void 0&&(qi=zi.options)!==null&&qi!==void 0&&qi.length),Vn=[(Gn={},(0,he.Z)(Gn,Ci.value,"__EMPTY__"),(0,he.Z)(Gn,un,Mt),(0,he.Z)(Gn,"disabled",!0),Gn)],Xo=(0,ve.Z)((0,ve.Z)({},Fn),{},{multiple:!Ur&&Qe,onSelect:Cr,onActive:Pr,onToggleOpen:cn,checkedSet:io,halfCheckedSet:Yr,loadingKeys:zr,isSelectable:er}),Un=Ur?[{options:Vn}]:Zr,Io=Un.map(function(Go,tr){var ia=ri.slice(0,tr),zo=ri[tr];return Te.createElement(kn,(0,Ct.Z)({key:tr},Xo,{searchValue:on,prefixCls:ki,options:Go.options,prevValuePath:ia,activeValue:zo}))});return Te.createElement(ln,{open:nn},Te.createElement("div",{className:Me()("".concat(ki,"-menus"),(ti={},(0,he.Z)(ti,"".concat(ki,"-menu-empty"),Ur),(0,he.Z)(ti,"".concat(ki,"-rtl"),_n),ti)),ref:gn},Io))}),be=Ge;function Pe(Fn){var xi=Fn.onPopupVisibleChange,zi=Fn.popupVisible,qi=Fn.popupClassName,Gn=Fn.popupPlacement;warning(!xi,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(zi===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(qi===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(Gn===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Ne(Fn,xi){if(Fn){var zi=function qi(Gn){for(var ti=0;ti<Gn.length;ti++){var Zt=Gn[ti];if(Zt[xi==null?void 0:xi.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Zt[xi==null?void 0:xi.children])&&qi(Zt[xi==null?void 0:xi.children]))return!0}};zi(Fn)}}var Ie=null,xe=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy"];function ct(Fn){return Array.isArray(Fn)&&Array.isArray(Fn[0])}function Lt(Fn){return Fn?ct(Fn)?Fn:(Fn.length===0?[]:[Fn]).map(function(xi){return Array.isArray(xi)?xi:[xi]}):[]}var et=Te.forwardRef(function(Fn,xi){var zi=Fn.id,qi=Fn.prefixCls,Gn=qi===void 0?"rc-cascader":qi,ti=Fn.fieldNames,Zt=Fn.defaultValue,Wt=Fn.value,Qe=Fn.changeOnSelect,on=Fn.onChange,cn=Fn.displayRender,Mt=Fn.checkable,ht=Fn.autoClearSearchValue,nn=ht===void 0?!0:ht,gn=Fn.searchValue,_n=Fn.onSearch,qn=Fn.showSearch,Et=Fn.expandTrigger,Pn=Fn.options,Xn=Fn.dropdownPrefixCls,Ci=Fn.loadData,tn=Fn.popupVisible,sn=Fn.open,In=Fn.popupClassName,ji=Fn.dropdownClassName,Ai=Fn.dropdownMenuColumnStyle,Si=Fn.popupPlacement,ki=Fn.placement,Ni=Fn.onDropdownVisibleChange,ir=Fn.onPopupVisibleChange,zr=Fn.expandIcon,Vr=zr===void 0?">":zr,Zn=Fn.loadingIcon,io=Fn.children,Yr=Fn.dropdownMatchSelectWidth,Fr=Yr===void 0?!1:Yr,wn=Fn.showCheckedStrategy,ri=wn===void 0?Xe:wn,Ui=(0,$e.Z)(Fn,xe),Pr=(0,lt.ZP)(zi),er=!!Mt,Cr=(0,te.Z)(Zt,{value:Wt,postState:Lt}),qr=(0,Pt.Z)(Cr,2),Zr=qr[0],Ir=qr[1],Ur=Te.useMemo(function(){return at(ti)},[JSON.stringify(ti)]),Vn=Te.useMemo(function(){return Pn||[]},[Pn]),Xo=_t(Vn,Ur),Un=Te.useCallback(function(Ca){var fa=Xo();return Ca.map(function(Ka){var Qa=fa[Ka].nodes;return Qa.map(function(Cs){return Cs[Ur.value]})})},[Xo,Ur]),Io=(0,te.Z)("",{value:gn,postState:function(fa){return fa||""}}),Go=(0,Pt.Z)(Io,2),tr=Go[0],ia=Go[1],zo=function(fa,Ka){ia(fa),Ka.source!=="blur"&&_n&&_n(fa)},Nr=jt(qn),Br=(0,Pt.Z)(Nr,2),xo=Br[0],$o=Br[1],$i=ze(tr,Vn,Ur,Xn||Gn,$o,Qe),st=vn(Vn,Ur),ra=Te.useMemo(function(){var Ca=st(Zr),fa=(0,Pt.Z)(Ca,2),Ka=fa[0],Qa=fa[1];if(!er||!Zr.length)return[Ka,[],Qa];var Cs=Ze(Ka),ms=Xo(),Zs=(0,vt.S)(Cs,!0,ms),Bn=Zs.checkedKeys,ys=Zs.halfCheckedKeys;return[Un(Bn),Un(ys),Qa]},[er,Zr,Xo,Un,st]),va=(0,Pt.Z)(ra,3),Ma=va[0],Ps=va[1],Ha=va[2],Ms=Te.useMemo(function(){var Ca=Ze(Ma),fa=Gt(Ca,Xo,ri);return[].concat((0,le.Z)(Ha),(0,le.Z)(Un(fa)))},[Ma,Xo,Un,Ha,ri]),bo=qe(Ms,Vn,Ur,er,cn),wo=(0,Oe.Z)(function(Ca){if(Ir(Ca),on){var fa=Lt(Ca),Ka=fa.map(function(ms){return At(ms,Vn,Ur).map(function(Zs){return Zs.option})}),Qa=er?fa:fa[0],Cs=er?Ka:Ka[0];on(Qa,Cs)}}),Jr=(0,Oe.Z)(function(Ca){if((!er||nn)&&ia(""),!er)wo(Ca);else{var fa=dt(Ca),Ka=Ze(Ma),Qa=Ze(Ps),Cs=Ka.includes(fa),ms=Ha.some(function(eu){return dt(eu)===fa}),Zs=Ma,Bn=Ha;if(ms&&!Cs)Bn=Ha.filter(function(eu){return dt(eu)!==fa});else{var ys=Cs?Ka.filter(function(eu){return eu!==fa}):[].concat((0,le.Z)(Ka),[fa]),oa=Xo(),hl;if(Cs){var Ol=(0,vt.S)(ys,{checked:!1,halfCheckedKeys:Qa},oa);hl=Ol.checkedKeys}else{var as=(0,vt.S)(ys,!0,oa);hl=as.checkedKeys}var yu=Gt(hl,Xo,ri);Zs=Un(yu)}wo([].concat((0,le.Z)(Bn),(0,le.Z)(Zs)))}}),ha=function(fa,Ka){if(Ka.type==="clear"){wo([]);return}var Qa=Ka.values[0],Cs=Qa.valueCells;Jr(Cs)},Ia=sn!==void 0?sn:tn,Eo=ji||In,Gr=ki||Si,mi=function(fa){Ni==null||Ni(fa),ir==null||ir(fa)},oo=Te.useMemo(function(){return{options:Vn,fieldNames:Ur,values:Ma,halfValues:Ps,changeOnSelect:Qe,onSelect:Jr,checkable:Mt,searchOptions:$i,dropdownPrefixCls:Xn,loadData:Ci,expandTrigger:Et,expandIcon:Vr,loadingIcon:Zn,dropdownMenuColumnStyle:Ai}},[Vn,Ur,Ma,Ps,Qe,Jr,Mt,$i,Xn,Ci,Et,Vr,Zn,Ai]),ao=!(tr?$i:Vn).length,Ga=tr&&$o.matchInputWidth||ao?{}:{minWidth:"auto"};return Te.createElement(de.Provider,{value:oo},Te.createElement(Ft.Ac,(0,Ct.Z)({},Ui,{ref:xi,id:Pr,prefixCls:Gn,autoClearSearchValue:nn,dropdownMatchSelectWidth:Fr,dropdownStyle:Ga,displayValues:bo,onDisplayValuesChange:ha,mode:er?"multiple":void 0,searchValue:tr,onSearch:zo,showSearch:xo,OptionList:be,emptyOptions:ao,open:Ia,dropdownClassName:Eo,placement:Gr,onDropdownVisibleChange:mi,getRawInputElement:function(){return io}})))});et.SHOW_PARENT=Xe,et.SHOW_CHILD=Ye;var it=et,Bt=it,Dt=pe(2738),ft=pe(62892),$t=pe(53487),xn=pe(19080),an=pe(36355),Jt=pe(93891),Tn=pe(1684),Kn=pe(19716),dn=pe(32441),Qn=pe(14154),pi=pe(58582),zn=pe(84443),Nn=pe(66339),yi=pe(33234),Zi=pe(98447),Hi=pe(17313),cr=pe(74207),br=pe(83116);const gi=Fn=>{const{prefixCls:xi,componentCls:zi,antCls:qi}=Fn,Gn=`${zi}-menu-item`,ti=`
&${Gn}-expand ${Gn}-expand-icon,
${Gn}-loading-icon
`;return[{[zi]:{width:Fn.controlWidth}},{[`${zi}-dropdown`]:[(0,Zi.C2)(`${xi}-checkbox`,Fn),{[`&${qi}-select-dropdown`]:{padding:0}},{[zi]:{"&-checkbox":{top:0,marginInlineEnd:Fn.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${zi}-menu-empty`]:{[`${zi}-menu`]:{width:"100%",height:"auto",[Gn]:{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({},Hi.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"},[ti]:{color:Fn.colorTextDisabled}},[`&-active:not(${Gn}-disabled)`]:{"&, &:hover":{fontWeight:Fn.optionSelectedFontWeight,backgroundColor:Fn.optionSelectedBg}},"&-content":{flex:"auto"},[ti]:{marginInlineStart:Fn.paddingXXS,color:Fn.colorTextDescription,fontSize:Fn.fontSizeIcon},"&-keyword":{color:Fn.colorHighlight}})}}}]},{[`${zi}-dropdown-rtl`]:{direction:"rtl"}},(0,cr.c)(Fn)]};var di=(0,br.Z)("Cascader",Fn=>[gi(Fn)],Fn=>{const xi=Math.round((Fn.controlHeight-Fn.fontSize*Fn.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:Fn.controlItemBgActive,optionSelectedFontWeight:Fn.fontWeightStrong,optionPadding:`${xi}px ${Fn.paddingSM}px`,menuPadding:Fn.paddingXXS}}),wi=function(Fn,xi){var zi={};for(var qi in Fn)Object.prototype.hasOwnProperty.call(Fn,qi)&&xi.indexOf(qi)<0&&(zi[qi]=Fn[qi]);if(Fn!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gn=0,qi=Object.getOwnPropertySymbols(Fn);Gn<qi.length;Gn++)xi.indexOf(qi[Gn])<0&&Object.prototype.propertyIsEnumerable.call(Fn,qi[Gn])&&(zi[qi[Gn]]=Fn[qi[Gn]]);return zi};const{SHOW_CHILD:Qi,SHOW_PARENT:Li}=Bt;function ro(Fn,xi,zi){const qi=Fn.toLowerCase().split(xi).reduce((Zt,Wt,Qe)=>Qe===0?[Wt]:[].concat((0,le.Z)(Zt),[xi,Wt]),[]),Gn=[];let ti=0;return qi.forEach((Zt,Wt)=>{const Qe=ti+Zt.length;let on=Fn.slice(ti,Qe);ti=Qe,Wt%2===1&&(on=Te.createElement("span",{className:`${zi}-menu-item-keyword`,key:`separator-${Wt}`},on)),Gn.push(on)}),Gn}const fr=(Fn,xi,zi,qi)=>{const Gn=[],ti=Fn.toLowerCase();return xi.forEach((Zt,Wt)=>{Wt!==0&&Gn.push(" / ");let Qe=Zt[qi.label];const on=typeof Qe;(on==="string"||on==="number")&&(Qe=ro(String(Qe),ti,zi)),Gn.push(Qe)}),Gn},Ae=Te.forwardRef((Fn,xi)=>{const{prefixCls:zi,size:qi,disabled:Gn,className:ti,rootClassName:Zt,multiple:Wt,bordered:Qe=!0,transitionName:on,choiceTransitionName:cn="",popupClassName:Mt,dropdownClassName:ht,expandIcon:nn,placement:gn,showSearch:_n,allowClear:qn=!0,notFoundContent:Et,direction:Pn,getPopupContainer:Xn,status:Ci,showArrow:tn,builtinPlacements:sn,style:In}=Fn,ji=wi(Fn,["prefixCls","size","disabled","className","rootClassName","multiple","bordered","transitionName","choiceTransitionName","popupClassName","dropdownClassName","expandIcon","placement","showSearch","allowClear","notFoundContent","direction","getPopupContainer","status","showArrow","builtinPlacements","style"]),Ai=(0,Dt.Z)(ji,["suffixIcon"]),{getPopupContainer:Si,getPrefixCls:ki,renderEmpty:Ni,direction:ir,popupOverflow:zr,cascader:Vr}=Te.useContext(an.E_),Zn=Pn||ir,io=Zn==="rtl",{status:Yr,hasFeedback:Fr,isFormItemInput:wn,feedbackIcon:ri}=Te.useContext(dn.aM),Ui=(0,xn.F)(Yr,Ci),Pr=Et||(Ni==null?void 0:Ni("Cascader"))||Te.createElement(Jt.Z,{componentName:"Cascader"}),er=ki(),Cr=ki("select",zi),qr=ki("cascader",zi),[Zr,Ir]=(0,Qn.Z)(Cr),[Ur]=di(qr),{compactSize:Vn,compactItemClassnames:Xo}=(0,yi.ri)(Cr,Pn),Un=Me()(Mt||ht,`${qr}-dropdown`,{[`${qr}-dropdown-rtl`]:Zn==="rtl"},Zt,Ir),Io=Te.useMemo(()=>{if(!_n)return _n;let Ha={render:fr};return typeof _n=="object"&&(Ha=Object.assign(Object.assign({},Ha),_n)),Ha},[_n]),Go=(0,Kn.Z)(Ha=>{var Ms;return(Ms=qi!=null?qi:Vn)!==null&&Ms!==void 0?Ms:Ha}),tr=Te.useContext(Tn.Z),ia=Gn!=null?Gn:tr;let zo=nn;nn||(zo=io?Te.createElement(He.Z,null):Te.createElement(We.Z,null));const Nr=Te.createElement("span",{className:`${Cr}-menu-item-loading-icon`},Te.createElement(ut.Z,{spin:!0})),Br=Te.useMemo(()=>Wt?Te.createElement("span",{className:`${qr}-checkbox-inner`}):!1,[Wt]),xo=(0,zn.Z)(Fn.suffixIcon,tn),{suffixIcon:$o,removeIcon:$i,clearIcon:st}=(0,Nn.Z)(Object.assign(Object.assign({},Fn),{hasFeedback:Fr,feedbackIcon:ri,showSuffixIcon:xo,multiple:Wt,prefixCls:Cr,componentName:"Cascader"})),ra=Te.useMemo(()=>gn!==void 0?gn:io?"bottomRight":"bottomLeft",[gn,io]),va=(0,pi.Z)(sn,zr),Ma=qn===!0?{clearIcon:st}:qn,Ps=Te.createElement(Bt,Object.assign({prefixCls:Cr,className:Me()(!zi&&qr,{[`${Cr}-lg`]:Go==="large",[`${Cr}-sm`]:Go==="small",[`${Cr}-rtl`]:io,[`${Cr}-borderless`]:!Qe,[`${Cr}-in-form-item`]:wn},(0,xn.Z)(Cr,Ui,Fr),Xo,Vr==null?void 0:Vr.className,ti,Zt,Ir),disabled:ia,style:Object.assign(Object.assign({},Vr==null?void 0:Vr.style),In)},Ai,{builtinPlacements:va,direction:Zn,placement:ra,notFoundContent:Pr,allowClear:Ma,showSearch:Io,expandIcon:zo,suffixIcon:$o,removeIcon:$i,loadingIcon:Nr,checkable:Br,dropdownClassName:Un,dropdownPrefixCls:zi||qr,choiceTransitionName:(0,ft.m)(er,"",cn),transitionName:(0,ft.m)(er,"slide-up",on),getPopupContainer:Xn||Si,ref:xi}));return Ur(Zr(Ps))}),Ei=(0,$t.Z)(Ae);Ae.SHOW_PARENT=Li,Ae.SHOW_CHILD=Qi,Ae._InternalPanelDoNotUseOrYouWillBeFired=Ei;var Sr=Ae},24905:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return ze}});var le=pe(92310),Te=pe.n(le),He=pe(5630),ut=pe(59301),We=pe(36355),Ue=pe(1684),Me=pe(32441),Pt=ut.createContext(null),$e=pe(98447),Ft=pe(14088),lt=pe(4572),vt=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,dt=Object.getOwnPropertySymbols(je);Ze<dt.length;Ze++)Xe.indexOf(dt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[Ze])&&(Ye[dt[Ze]]=je[dt[Ze]]);return Ye};const Oe=(je,Xe)=>{var Ye;const{prefixCls:dt,className:Ze,rootClassName:Nt,children:at,indeterminate:kt=!1,style:xt,onMouseEnter:Ot,onMouseLeave:Gt,skipGroup:At=!1,disabled:qe}=je,Ve=vt(je,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:_t,direction:vn,checkbox:yn}=ut.useContext(We.E_),jt=ut.useContext(Pt),{isFormItemInput:en}=ut.useContext(Me.aM),ln=ut.useContext(Ue.Z),Wn=(Ye=(jt==null?void 0:jt.disabled)||qe)!==null&&Ye!==void 0?Ye:ln,un=ut.useRef(Ve.value);ut.useEffect(()=>{jt==null||jt.registerValue(Ve.value)},[]),ut.useEffect(()=>{if(!At)return Ve.value!==un.current&&(jt==null||jt.cancelValue(un.current),jt==null||jt.registerValue(Ve.value),un.current=Ve.value),()=>jt==null?void 0:jt.cancelValue(Ve.value)},[Ve.value]);const kn=_t("checkbox",dt),[wt,jn]=(0,$e.ZP)(kn),ci=Object.assign({},Ve);jt&&!At&&(ci.onChange=function(){Ve.onChange&&Ve.onChange.apply(Ve,arguments),jt.toggleOption&&jt.toggleOption({label:at,value:Ve.value})},ci.name=jt.name,ci.checked=jt.value.includes(Ve.value));const Ge=Te()(`${kn}-wrapper`,{[`${kn}-rtl`]:vn==="rtl",[`${kn}-wrapper-checked`]:ci.checked,[`${kn}-wrapper-disabled`]:Wn,[`${kn}-wrapper-in-form-item`]:en},yn==null?void 0:yn.className,Ze,Nt,jn),be=Te()({[`${kn}-indeterminate`]:kt},lt.A,jn),Pe=kt?"mixed":void 0;return wt(ut.createElement(Ft.Z,{component:"Checkbox",disabled:Wn},ut.createElement("label",{className:Ge,style:Object.assign(Object.assign({},yn==null?void 0:yn.style),xt),onMouseEnter:Ot,onMouseLeave:Gt},ut.createElement(He.Z,Object.assign({"aria-checked":Pe},ci,{prefixCls:kn,className:be,disabled:Wn,ref:Xe})),at!==void 0&&ut.createElement("span",null,at))))};var ee=ut.forwardRef(Oe),de=pe(26407),se=pe(2738),he=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,dt=Object.getOwnPropertySymbols(je);Ze<dt.length;Ze++)Xe.indexOf(dt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[Ze])&&(Ye[dt[Ze]]=je[dt[Ze]]);return Ye};const ve=(je,Xe)=>{const{defaultValue:Ye,children:dt,options:Ze=[],prefixCls:Nt,className:at,rootClassName:kt,style:xt,onChange:Ot}=je,Gt=he(je,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:At,direction:qe}=ut.useContext(We.E_),[Ve,_t]=ut.useState(Gt.value||Ye||[]),[vn,yn]=ut.useState([]);ut.useEffect(()=>{"value"in Gt&&_t(Gt.value||[])},[Gt.value]);const jt=ut.useMemo(()=>Ze.map(Ne=>typeof Ne=="string"||typeof Ne=="number"?{label:Ne,value:Ne}:Ne),[Ze]),en=Ne=>{yn(Ie=>Ie.filter(xe=>xe!==Ne))},ln=Ne=>{yn(Ie=>[].concat((0,de.Z)(Ie),[Ne]))},Wn=Ne=>{const Ie=Ve.indexOf(Ne.value),xe=(0,de.Z)(Ve);Ie===-1?xe.push(Ne.value):xe.splice(Ie,1),"value"in Gt||_t(xe),Ot==null||Ot(xe.filter(ct=>vn.includes(ct)).sort((ct,Lt)=>{const et=jt.findIndex(Bt=>Bt.value===ct),it=jt.findIndex(Bt=>Bt.value===Lt);return et-it}))},un=At("checkbox",Nt),kn=`${un}-group`,[wt,jn]=(0,$e.ZP)(un),ci=(0,se.Z)(Gt,["value","disabled"]),Ge=Ze.length?jt.map(Ne=>ut.createElement(ee,{prefixCls:un,key:Ne.value.toString(),disabled:"disabled"in Ne?Ne.disabled:Gt.disabled,value:Ne.value,checked:Ve.includes(Ne.value),onChange:Ne.onChange,className:`${kn}-item`,style:Ne.style,title:Ne.title},Ne.label)):dt,be={toggleOption:Wn,value:Ve,disabled:Gt.disabled,name:Gt.name,registerValue:ln,cancelValue:en},Pe=Te()(kn,{[`${kn}-rtl`]:qe==="rtl"},at,kt,jn);return wt(ut.createElement("div",Object.assign({className:Pe,style:xt},ci,{ref:Xe}),ut.createElement(Pt.Provider,{value:be},Ge)))},Ee=ut.forwardRef(ve);var Be=ut.memo(Ee);const Le=ee;Le.Group=Be,Le.__ANT_CHECKBOX=!0;var ze=Le},98447:function(On,mn,pe){"use strict";pe.d(mn,{C2:function(){return We}});var le=pe(17313),Te=pe(37613),He=pe(83116);const ut=Ue=>{const{checkboxCls:Me}=Ue,Ct=`${Me}-wrapper`;return[{[`${Me}-group`]:Object.assign(Object.assign({},(0,le.Wf)(Ue)),{display:"inline-flex",flexWrap:"wrap",columnGap:Ue.marginXS,[`> ${Ue.antCls}-row`]:{flex:1}}),[Ct]:Object.assign(Object.assign({},(0,le.Wf)(Ue)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Ct}`]:{marginInlineStart:0},[`&${Ct}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Me]:Object.assign(Object.assign({},(0,le.Wf)(Ue)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:Ue.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)(Ue))},[`${Me}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:Ue.checkboxSize,height:Ue.checkboxSize,direction:"ltr",backgroundColor:Ue.colorBgContainer,border:`${Ue.lineWidth}px ${Ue.lineType} ${Ue.colorBorder}`,borderRadius:Ue.borderRadiusSM,borderCollapse:"separate",transition:`all ${Ue.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:Ue.checkboxSize/14*5,height:Ue.checkboxSize/14*8,border:`${Ue.lineWidthBold}px solid ${Ue.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${Ue.motionDurationFast} ${Ue.motionEaseInBack}, opacity ${Ue.motionDurationFast}`}},"& + span":{paddingInlineStart:Ue.paddingXS,paddingInlineEnd:Ue.paddingXS}})},{[`
${Ct}:not(${Ct}-disabled),
${Me}:not(${Me}-disabled)
`]:{[`&:hover ${Me}-inner`]:{borderColor:Ue.colorPrimary}},[`${Ct}:not(${Ct}-disabled)`]:{[`&:hover ${Me}-checked:not(${Me}-disabled) ${Me}-inner`]:{backgroundColor:Ue.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Me}-checked:not(${Me}-disabled):after`]:{borderColor:Ue.colorPrimaryHover}}},{[`${Me}-checked`]:{[`${Me}-inner`]:{backgroundColor:Ue.colorPrimary,borderColor:Ue.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${Ue.motionDurationMid} ${Ue.motionEaseOutBack} ${Ue.motionDurationFast}`}}},[`
${Ct}-checked:not(${Ct}-disabled),
${Me}-checked:not(${Me}-disabled)
`]:{[`&:hover ${Me}-inner`]:{backgroundColor:Ue.colorPrimaryHover,borderColor:"transparent"}}},{[Me]:{"&-indeterminate":{[`${Me}-inner`]:{backgroundColor:Ue.colorBgContainer,borderColor:Ue.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:Ue.fontSizeLG/2,height:Ue.fontSizeLG/2,backgroundColor:Ue.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Ct}-disabled`]:{cursor:"not-allowed"},[`${Me}-disabled`]:{[`&, ${Me}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Me}-inner`]:{background:Ue.colorBgContainerDisabled,borderColor:Ue.colorBorder,"&:after":{borderColor:Ue.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:Ue.colorTextDisabled},[`&${Me}-indeterminate ${Me}-inner::after`]:{background:Ue.colorTextDisabled}}}]};function We(Ue,Me){const Ct=(0,Te.TS)(Me,{checkboxCls:`.${Ue}`,checkboxSize:Me.controlInteractiveSize});return[ut(Ct)]}mn.ZP=(0,He.Z)("Checkbox",(Ue,Me)=>{let{prefixCls:Ct}=Me;return[We(Ct,Ue)]})},36381:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return ci}});var le=pe(38819),Te=pe(92310),He=pe.n(Te),ut=pe(92413),We=pe(26407),Ue=pe(33606),Me=pe(39559),Ct=pe(18929),Pt=pe(48736),$e=pe(59301),Ft=pe(37061),lt=pe(11592),vt=pe(400),Oe=pe(77900),te=pe(10228),ee=$e.forwardRef(function(Ge,be){var Pe=Ge.prefixCls,Ne=Ge.forceRender,Ie=Ge.className,xe=Ge.style,ct=Ge.children,Lt=Ge.isActive,et=Ge.role,it=$e.useState(Lt||Ne),Bt=(0,Ue.Z)(it,2),Dt=Bt[0],ft=Bt[1];return $e.useEffect(function(){(Ne||Lt)&&ft(!0)},[Ne,Lt]),Dt?$e.createElement("div",{ref:be,className:He()("".concat(Pe,"-content"),(0,vt.Z)((0,vt.Z)({},"".concat(Pe,"-content-active"),Lt),"".concat(Pe,"-content-inactive"),!Lt),Ie),style:xe,role:et},$e.createElement("div",{className:"".concat(Pe,"-content-box")},ct)):null});ee.displayName="PanelContent";var de=ee,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],he=$e.forwardRef(function(Ge,be){var Pe=Ge.showArrow,Ne=Pe===void 0?!0:Pe,Ie=Ge.headerClass,xe=Ge.isActive,ct=Ge.onItemClick,Lt=Ge.forceRender,et=Ge.className,it=Ge.prefixCls,Bt=Ge.collapsible,Dt=Ge.accordion,ft=Ge.panelKey,$t=Ge.extra,xn=Ge.header,an=Ge.expandIcon,Jt=Ge.openMotion,Tn=Ge.destroyInactivePanel,Kn=Ge.children,dn=(0,Ft.Z)(Ge,se),Qn=Bt==="disabled",pi=Bt==="header",zn=Bt==="icon",Nn=$t!=null&&typeof $t!="boolean",yi=function(){ct==null||ct(ft)},Zi=function(wi){(wi.key==="Enter"||wi.keyCode===te.Z.ENTER||wi.which===te.Z.ENTER)&&yi()},Hi=typeof an=="function"?an(Ge):$e.createElement("i",{className:"arrow"});Hi&&(Hi=$e.createElement("div",{className:"".concat(it,"-expand-icon"),onClick:["header","icon"].includes(Bt)?yi:void 0},Hi));var cr=He()((0,vt.Z)((0,vt.Z)((0,vt.Z)({},"".concat(it,"-item"),!0),"".concat(it,"-item-active"),xe),"".concat(it,"-item-disabled"),Qn),et),br=He()(Ie,(0,vt.Z)((0,vt.Z)((0,vt.Z)({},"".concat(it,"-header"),!0),"".concat(it,"-header-collapsible-only"),pi),"".concat(it,"-icon-collapsible-only"),zn)),gi={className:br,"aria-expanded":xe,"aria-disabled":Qn,onKeyDown:Zi};return!pi&&!zn&&(gi.onClick=yi,gi.role=Dt?"tab":"button",gi.tabIndex=Qn?-1:0),$e.createElement("div",(0,ut.Z)({},dn,{ref:be,className:cr}),$e.createElement("div",gi,Ne&&Hi,$e.createElement("span",{className:"".concat(it,"-header-text"),onClick:Bt==="header"?yi:void 0},xn),Nn&&$e.createElement("div",{className:"".concat(it,"-extra")},$t)),$e.createElement(Oe.default,(0,ut.Z)({visible:xe,leavedClassName:"".concat(it,"-content-hidden")},Jt,{forceRender:Lt,removeOnLeave:Tn}),function(di,wi){var Qi=di.className,Li=di.style;return $e.createElement(de,{ref:wi,prefixCls:it,className:Qi,style:Li,isActive:xe,forceRender:Lt,role:Dt?"tabpanel":void 0},Kn)}))}),ve=he,Ee=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Be=function(be,Pe){var Ne=Pe.prefixCls,Ie=Pe.accordion,xe=Pe.collapsible,ct=Pe.destroyInactivePanel,Lt=Pe.onItemClick,et=Pe.activeKey,it=Pe.openMotion,Bt=Pe.expandIcon;return be.map(function(Dt,ft){var $t=Dt.children,xn=Dt.label,an=Dt.key,Jt=Dt.collapsible,Tn=Dt.onItemClick,Kn=Dt.destroyInactivePanel,dn=(0,Ft.Z)(Dt,Ee),Qn=String(an!=null?an:ft),pi=Jt!=null?Jt:xe,zn=Kn!=null?Kn:ct,Nn=function(Hi){pi!=="disabled"&&(Lt(Hi),Tn==null||Tn(Hi))},yi=!1;return Ie?yi=et[0]===Qn:yi=et.indexOf(Qn)>-1,$e.createElement(ve,(0,ut.Z)({},dn,{prefixCls:Ne,key:Qn,panelKey:Qn,isActive:yi,accordion:Ie,openMotion:it,expandIcon:Bt,header:xn,collapsible:pi,onItemClick:Nn,destroyInactivePanel:zn}),$t)})},Le=function(be,Pe,Ne){if(!be)return null;var Ie=Ne.prefixCls,xe=Ne.accordion,ct=Ne.collapsible,Lt=Ne.destroyInactivePanel,et=Ne.onItemClick,it=Ne.activeKey,Bt=Ne.openMotion,Dt=Ne.expandIcon,ft=be.key||String(Pe),$t=be.props,xn=$t.header,an=$t.headerClass,Jt=$t.destroyInactivePanel,Tn=$t.collapsible,Kn=$t.onItemClick,dn=!1;xe?dn=it[0]===ft:dn=it.indexOf(ft)>-1;var Qn=Tn!=null?Tn:ct,pi=function(yi){Qn!=="disabled"&&(et(yi),Kn==null||Kn(yi))},zn={key:ft,panelKey:ft,header:xn,headerClass:an,isActive:dn,prefixCls:Ie,destroyInactivePanel:Jt!=null?Jt:Lt,openMotion:Bt,accordion:xe,children:be.props.children,onItemClick:pi,expandIcon:Dt,collapsible:Qn};return typeof be.type=="string"?be:(Object.keys(zn).forEach(function(Nn){typeof zn[Nn]=="undefined"&&delete zn[Nn]}),$e.cloneElement(be,zn))};function ze(Ge,be,Pe){return Array.isArray(Ge)?Be(Ge,Pe):(0,lt.Z)(be).map(function(Ne,Ie){return Le(Ne,Ie,Pe)})}var je=ze,Xe=pe(26112);function Ye(Ge){var be=Ge;if(!Array.isArray(be)){var Pe=(0,Me.Z)(be);be=Pe==="number"||Pe==="string"?[be]:[]}return be.map(function(Ne){return String(Ne)})}var dt=$e.forwardRef(function(Ge,be){var Pe=Ge.prefixCls,Ne=Pe===void 0?"rc-collapse":Pe,Ie=Ge.destroyInactivePanel,xe=Ie===void 0?!1:Ie,ct=Ge.style,Lt=Ge.accordion,et=Ge.className,it=Ge.children,Bt=Ge.collapsible,Dt=Ge.openMotion,ft=Ge.expandIcon,$t=Ge.activeKey,xn=Ge.defaultActiveKey,an=Ge.onChange,Jt=Ge.items,Tn=He()(Ne,et),Kn=(0,Ct.Z)([],{value:$t,onChange:function(Zi){return an==null?void 0:an(Zi)},defaultValue:xn,postState:Ye}),dn=(0,Ue.Z)(Kn,2),Qn=dn[0],pi=dn[1],zn=function(Zi){return pi(function(){if(Lt)return Qn[0]===Zi?[]:[Zi];var Hi=Qn.indexOf(Zi),cr=Hi>-1;return cr?Qn.filter(function(br){return br!==Zi}):[].concat((0,We.Z)(Qn),[Zi])})};(0,Pt.ZP)(!it,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Nn=je(Jt,it,{prefixCls:Ne,accordion:Lt,openMotion:Dt,expandIcon:ft,collapsible:Bt,destroyInactivePanel:xe,onItemClick:zn,activeKey:Qn});return $e.createElement("div",(0,ut.Z)({ref:be,className:Tn,style:ct,role:Lt?"tablist":void 0},(0,Xe.Z)(Ge,{aria:!0,data:!0})),Nn)}),Ze=Object.assign(dt,{Panel:ve}),Nt=Ze,at=Ze.Panel,kt=pe(2738),xt=pe(62892),Ot=pe(92343),Gt=pe(36355),At=pe(19716),Ve=$e.forwardRef((Ge,be)=>{const{getPrefixCls:Pe}=$e.useContext(Gt.E_),{prefixCls:Ne,className:Ie,showArrow:xe=!0}=Ge,ct=Pe("collapse",Ne),Lt=He()({[`${ct}-no-arrow`]:!xe},Ie);return $e.createElement(Nt.Panel,Object.assign({ref:be},Ge,{prefixCls:ct,className:Lt}))}),_t=pe(17313),vn=pe(8378),yn=pe(83116),jt=pe(37613);const en=Ge=>{const{componentCls:be,contentBg:Pe,padding:Ne,headerBg:Ie,headerPadding:xe,collapseHeaderPaddingSM:ct,collapseHeaderPaddingLG:Lt,collapsePanelBorderRadius:et,lineWidth:it,lineType:Bt,colorBorder:Dt,colorText:ft,colorTextHeading:$t,colorTextDisabled:xn,fontSize:an,fontSizeLG:Jt,lineHeight:Tn,marginSM:Kn,paddingSM:dn,paddingLG:Qn,paddingXS:pi,motionDurationSlow:zn,fontSizeIcon:Nn,contentPadding:yi}=Ge,Zi=`${it}px ${Bt} ${Dt}`;return{[be]:Object.assign(Object.assign({},(0,_t.Wf)(Ge)),{backgroundColor:Ie,border:Zi,borderBottom:0,borderRadius:`${et}px`,"&-rtl":{direction:"rtl"},[`& > ${be}-item`]:{borderBottom:Zi,"&:last-child":{[`
&,
& > ${be}-header`]:{borderRadius:`0 0 ${et}px ${et}px`}},[`> ${be}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:xe,color:$t,lineHeight:Tn,cursor:"pointer",transition:`all ${zn}, visibility 0s`,[`> ${be}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${be}-expand-icon`]:{height:an*Tn,display:"flex",alignItems:"center",paddingInlineEnd:Kn},[`${be}-arrow`]:Object.assign(Object.assign({},(0,_t.Ro)()),{fontSize:Nn,svg:{transition:`transform ${zn}`}}),[`${be}-header-text`]:{marginInlineEnd:"auto"}},[`${be}-header-collapsible-only`]:{cursor:"default",[`${be}-header-text`]:{flex:"none",cursor:"pointer"}},[`${be}-icon-collapsible-only`]:{cursor:"default",[`${be}-expand-icon`]:{cursor:"pointer"}}},[`${be}-content`]:{color:ft,backgroundColor:Pe,borderTop:Zi,[`& > ${be}-content-box`]:{padding:yi},"&-hidden":{display:"none"}},"&-small":{[`> ${be}-item`]:{[`> ${be}-header`]:{padding:ct,paddingInlineStart:pi,[`> ${be}-expand-icon`]:{marginInlineStart:dn-pi}},[`> ${be}-content > ${be}-content-box`]:{padding:dn}}},"&-large":{[`> ${be}-item`]:{fontSize:Jt,[`> ${be}-header`]:{padding:Lt,paddingInlineStart:Ne,[`> ${be}-expand-icon`]:{height:Jt*Tn,marginInlineStart:Qn-Ne}},[`> ${be}-content > ${be}-content-box`]:{padding:Qn}}},[`${be}-item:last-child`]:{[`> ${be}-content`]:{borderRadius:`0 0 ${et}px ${et}px`}},[`& ${be}-item-disabled > ${be}-header`]:{"\n &,\n & > .arrow\n ":{color:xn,cursor:"not-allowed"}},[`&${be}-icon-position-end`]:{[`& > ${be}-item`]:{[`> ${be}-header`]:{[`${be}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:Kn}}}}})}},ln=Ge=>{const{componentCls:be}=Ge,Pe=`> ${be}-item > ${be}-header ${be}-arrow svg`;return{[`${be}-rtl`]:{[Pe]:{transform:"rotate(180deg)"}}}},Wn=Ge=>{const{componentCls:be,headerBg:Pe,paddingXXS:Ne,colorBorder:Ie}=Ge;return{[`${be}-borderless`]:{backgroundColor:Pe,border:0,[`> ${be}-item`]:{borderBottom:`1px solid ${Ie}`},[`
> ${be}-item:last-child,
> ${be}-item:last-child ${be}-header
`]:{borderRadius:0},[`> ${be}-item:last-child`]:{borderBottom:0},[`> ${be}-item > ${be}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${be}-item > ${be}-content > ${be}-content-box`]:{paddingTop:Ne}}}},un=Ge=>{const{componentCls:be,paddingSM:Pe}=Ge;return{[`${be}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${be}-item`]:{borderBottom:0,[`> ${be}-content`]:{backgroundColor:"transparent",border:0,[`> ${be}-content-box`]:{paddingBlock:Pe}}}}}};var kn=(0,yn.Z)("Collapse",Ge=>{const be=(0,jt.TS)(Ge,{collapseHeaderPaddingSM:`${Ge.paddingXS}px ${Ge.paddingSM}px`,collapseHeaderPaddingLG:`${Ge.padding}px ${Ge.paddingLG}px`,collapsePanelBorderRadius:Ge.borderRadiusLG});return[en(be),Wn(be),un(be),ln(be),(0,vn.Z)(be)]},Ge=>({headerPadding:`${Ge.paddingSM}px ${Ge.padding}px`,headerBg:Ge.colorFillAlter,contentPadding:`${Ge.padding}px 16px`,contentBg:Ge.colorBgContainer})),jn=Object.assign($e.forwardRef((Ge,be)=>{const{getPrefixCls:Pe,direction:Ne,collapse:Ie}=$e.useContext(Gt.E_),{prefixCls:xe,className:ct,rootClassName:Lt,style:et,bordered:it=!0,ghost:Bt,size:Dt,expandIconPosition:ft="start",children:$t,expandIcon:xn}=Ge,an=(0,At.Z)(Zi=>{var Hi;return(Hi=Dt!=null?Dt:Zi)!==null&&Hi!==void 0?Hi:"middle"}),Jt=Pe("collapse",xe),Tn=Pe(),[Kn,dn]=kn(Jt),Qn=$e.useMemo(()=>ft==="left"?"start":ft==="right"?"end":ft,[ft]),pi=function(){let Zi=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const Hi=xn?xn(Zi):$e.createElement(le.Z,{rotate:Zi.isActive?90:void 0});return(0,Ot.Tm)(Hi,()=>({className:He()(Hi.props.className,`${Jt}-arrow`)}))},zn=He()(`${Jt}-icon-position-${Qn}`,{[`${Jt}-borderless`]:!it,[`${Jt}-rtl`]:Ne==="rtl",[`${Jt}-ghost`]:!!Bt,[`${Jt}-${an}`]:an!=="middle"},Ie==null?void 0:Ie.className,ct,Lt,dn),Nn=Object.assign(Object.assign({},(0,xt.Z)(Tn)),{motionAppear:!1,leavedClassName:`${Jt}-content-hidden`}),yi=$e.useMemo(()=>$t?(0,lt.Z)($t).map((Zi,Hi)=>{var cr,br;if(!((cr=Zi.props)===null||cr===void 0)&&cr.disabled){const gi=(br=Zi.key)!==null&&br!==void 0?br:String(Hi),{disabled:di,collapsible:wi}=Zi.props,Qi=Object.assign(Object.assign({},(0,kt.Z)(Zi.props,["disabled"])),{key:gi,collapsible:wi!=null?wi:di?"disabled":void 0});return(0,Ot.Tm)(Zi,Qi)}return Zi}):null,[$t]);return Kn($e.createElement(Nt,Object.assign({ref:be,openMotion:Nn},(0,kt.Z)(Ge,["rootClassName"]),{expandIcon:pi,prefixCls:Jt,className:zn,style:Object.assign(Object.assign({},Ie==null?void 0:Ie.style),et)}),yi))}),{Panel:Ve}),ci=jn},93891:function(On,mn,pe){"use strict";var le=pe(59301),Te=pe(36355),He=pe(64165);const ut=We=>{const{componentName:Ue}=We,{getPrefixCls:Me}=(0,le.useContext)(Te.E_),Ct=Me("empty");switch(Ue){case"Table":case"List":return le.createElement(He.Z,{image:He.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return le.createElement(He.Z,{image:He.Z.PRESENTED_IMAGE_SIMPLE,className:`${Ct}-small`});default:return le.createElement(He.Z,null)}};mn.Z=ut},28103:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return lt}});var le=pe(92310),Te=pe.n(le),He=pe(59301),ut=pe(36355),We=pe(17313),Ue=pe(83116),Me=pe(37613);const Ct=vt=>{const{componentCls:Oe,sizePaddingEdgeHorizontal:te,colorSplit:ee,lineWidth:de,textPaddingInline:se,orientationMargin:he,verticalMarginInline:ve}=vt;return{[Oe]:Object.assign(Object.assign({},(0,We.Wf)(vt)),{borderBlockStart:`${de}px solid ${ee}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:ve,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${de}px solid ${ee}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${vt.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${Oe}-with-text`]:{display:"flex",alignItems:"center",margin:`${vt.dividerHorizontalWithTextGutterMargin}px 0`,color:vt.colorTextHeading,fontWeight:500,fontSize:vt.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${ee}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${de}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${Oe}-with-text-left`]:{"&::before":{width:`${he*100}%`},"&::after":{width:`${100-he*100}%`}},[`&-horizontal${Oe}-with-text-right`]:{"&::before":{width:`${100-he*100}%`},"&::after":{width:`${he*100}%`}},[`${Oe}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:se},"&-dashed":{background:"none",borderColor:ee,borderStyle:"dashed",borderWidth:`${de}px 0 0`},[`&-horizontal${Oe}-with-text${Oe}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${Oe}-dashed`]:{borderInlineStartWidth:de,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${Oe}-with-text`]:{color:vt.colorText,fontWeight:"normal",fontSize:vt.fontSize},[`&-horizontal${Oe}-with-text-left${Oe}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${Oe}-inner-text`]:{paddingInlineStart:te}},[`&-horizontal${Oe}-with-text-right${Oe}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${Oe}-inner-text`]:{paddingInlineEnd:te}}})}};var Pt=(0,Ue.Z)("Divider",vt=>{const Oe=(0,Me.TS)(vt,{dividerHorizontalWithTextGutterMargin:vt.margin,dividerHorizontalGutterMargin:vt.marginLG,sizePaddingEdgeHorizontal:0});return[Ct(Oe)]},vt=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:vt.marginXS})),$e=function(vt,Oe){var te={};for(var ee in vt)Object.prototype.hasOwnProperty.call(vt,ee)&&Oe.indexOf(ee)<0&&(te[ee]=vt[ee]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,ee=Object.getOwnPropertySymbols(vt);de<ee.length;de++)Oe.indexOf(ee[de])<0&&Object.prototype.propertyIsEnumerable.call(vt,ee[de])&&(te[ee[de]]=vt[ee[de]]);return te},lt=vt=>{const{getPrefixCls:Oe,direction:te,divider:ee}=He.useContext(ut.E_),{prefixCls:de,type:se="horizontal",orientation:he="center",orientationMargin:ve,className:Ee,rootClassName:Be,children:Le,dashed:ze,plain:je,style:Xe}=vt,Ye=$e(vt,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),dt=Oe("divider",de),[Ze,Nt]=Pt(dt),at=he.length>0?`-${he}`:he,kt=!!Le,xt=he==="left"&&ve!=null,Ot=he==="right"&&ve!=null,Gt=Te()(dt,ee==null?void 0:ee.className,Nt,`${dt}-${se}`,{[`${dt}-with-text`]:kt,[`${dt}-with-text${at}`]:kt,[`${dt}-dashed`]:!!ze,[`${dt}-plain`]:!!je,[`${dt}-rtl`]:te==="rtl",[`${dt}-no-default-orientation-margin-left`]:xt,[`${dt}-no-default-orientation-margin-right`]:Ot},Ee,Be),At=He.useMemo(()=>typeof ve=="number"?ve:/^\d+$/.test(ve)?Number(ve):ve,[ve]),qe=Object.assign(Object.assign({},xt&&{marginLeft:At}),Ot&&{marginRight:At});return Ze(He.createElement("div",Object.assign({className:Gt,style:Object.assign(Object.assign({},ee==null?void 0:ee.style),Xe)},Ye,{role:"separator"}),Le&&se!=="vertical"&&He.createElement("span",{className:`${dt}-inner-text`,style:qe},Le)))}},91857:function(On,mn,pe){"use strict";var le=pe(59301),Te=pe(38819),He=pe(92310),ut=pe.n(He),We=pe(31561),Ue=pe(70425),Me=pe(18929),Ct=pe(2738),Pt=pe(79676),$e=pe(53487),Ft=pe(92343),lt=pe(36355),vt=pe(20834),Oe=pe(40875),te=pe(88088),ee=pe(47211);const de=null,se=Be=>{const{menu:Le,arrow:ze,prefixCls:je,children:Xe,trigger:Ye,disabled:dt,dropdownRender:Ze,getPopupContainer:Nt,overlayClassName:at,rootClassName:kt,open:xt,onOpenChange:Ot,visible:Gt,onVisibleChange:At,mouseEnterDelay:qe=.15,mouseLeaveDelay:Ve=.1,autoAdjustOverflow:_t=!0,placement:vn="",overlay:yn,transitionName:jt}=Be,{getPopupContainer:en,getPrefixCls:ln,direction:Wn}=le.useContext(lt.E_),un=le.useMemo(()=>{const ft=ln();return jt!==void 0?jt:vn.includes("top")?`${ft}-slide-down`:`${ft}-slide-up`},[ln,vn,jt]),kn=le.useMemo(()=>vn?vn.includes("Center")?vn.slice(0,vn.indexOf("Center")):vn:Wn==="rtl"?"bottomRight":"bottomLeft",[vn,Wn]),wt=ln("dropdown",je),[jn,ci]=(0,ee.Z)(wt),[,Ge]=(0,te.Z)(),be=le.Children.only(Xe),Pe=(0,Ft.Tm)(be,{className:ut()(`${wt}-trigger`,{[`${wt}-rtl`]:Wn==="rtl"},be.props.className),disabled:dt}),Ne=dt?[]:Ye;let Ie;Ne&&Ne.includes("contextMenu")&&(Ie=!0);const[xe,ct]=(0,Me.Z)(!1,{value:xt!=null?xt:Gt}),Lt=(0,Ue.useEvent)(ft=>{Ot==null||Ot(ft),At==null||At(ft),ct(ft)}),et=ut()(at,kt,ci,{[`${wt}-rtl`]:Wn==="rtl"}),it=(0,Pt.Z)({arrowPointAtCenter:typeof ze=="object"&&ze.pointAtCenter,autoAdjustOverflow:_t,offset:Ge.marginXXS,arrowWidth:ze?Ge.sizePopupArrow:0,borderRadius:Ge.borderRadius}),Bt=le.useCallback(()=>{ct(!1)},[]),Dt=()=>{let ft;return Le!=null&&Le.items?ft=le.createElement(vt.default,Object.assign({},Le)):typeof yn=="function"?ft=yn():ft=yn,Ze&&(ft=Ze(ft)),ft=le.Children.only(typeof ft=="string"?le.createElement("span",null,ft):ft),le.createElement(Oe.J,{prefixCls:`${wt}-menu`,expandIcon:le.createElement("span",{className:`${wt}-menu-submenu-arrow`},le.createElement(Te.Z,{className:`${wt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:Bt,validator:$t=>{let{mode:xn}=$t}},ft)};return jn(le.createElement(We.Z,Object.assign({alignPoint:Ie},(0,Ct.Z)(Be,["rootClassName"]),{mouseEnterDelay:qe,mouseLeaveDelay:Ve,visible:xe,builtinPlacements:it,arrow:!!ze,overlayClassName:et,prefixCls:wt,getPopupContainer:Nt||en,transitionName:un,trigger:Ne,overlay:Dt,placement:kn,onVisibleChange:Lt}),Pe))};function he(Be){return Object.assign(Object.assign({},Be),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const ve=(0,$e.Z)(se,"dropdown",Be=>Be,he),Ee=Be=>le.createElement(ve,Object.assign({},Be),le.createElement("span",null));se._InternalPanelDoNotUseOrYouWillBeFired=Ee,mn.Z=se},38854:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return te}});var le=pe(91857),Te=pe(92310),He=pe.n(Te),ut=pe(59301),We=pe(18785),Ue=pe(3113),Me=pe(36355),Ct=pe(81327),Pt=pe(33234),$e=pe(47211),Ft=function(ee,de){var se={};for(var he in ee)Object.prototype.hasOwnProperty.call(ee,he)&&de.indexOf(he)<0&&(se[he]=ee[he]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,he=Object.getOwnPropertySymbols(ee);ve<he.length;ve++)de.indexOf(he[ve])<0&&Object.prototype.propertyIsEnumerable.call(ee,he[ve])&&(se[he[ve]]=ee[he[ve]]);return se};const lt=ee=>{const{getPopupContainer:de,getPrefixCls:se,direction:he}=ut.useContext(Me.E_),{prefixCls:ve,type:Ee="default",danger:Be,disabled:Le,loading:ze,onClick:je,htmlType:Xe,children:Ye,className:dt,menu:Ze,arrow:Nt,autoFocus:at,overlay:kt,trigger:xt,align:Ot,open:Gt,onOpenChange:At,placement:qe,getPopupContainer:Ve,href:_t,icon:vn=ut.createElement(We.Z,null),title:yn,buttonsRender:jt=Dt=>Dt,mouseEnterDelay:en,mouseLeaveDelay:ln,overlayClassName:Wn,overlayStyle:un,destroyPopupOnHide:kn,dropdownRender:wt}=ee,jn=Ft(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"]),ci=se("dropdown",ve),Ge=`${ci}-button`,[be,Pe]=(0,$e.Z)(ci),Ne={menu:Ze,arrow:Nt,autoFocus:at,align:Ot,disabled:Le,trigger:Le?[]:xt,onOpenChange:At,getPopupContainer:Ve||de,mouseEnterDelay:en,mouseLeaveDelay:ln,overlayClassName:Wn,overlayStyle:un,destroyPopupOnHide:kn,dropdownRender:wt},{compactSize:Ie,compactItemClassnames:xe}=(0,Pt.ri)(ci,he),ct=He()(Ge,xe,dt,Pe);"overlay"in ee&&(Ne.overlay=kt),"open"in ee&&(Ne.open=Gt),"placement"in ee?Ne.placement=qe:Ne.placement=he==="rtl"?"bottomLeft":"bottomRight";const Lt=ut.createElement(Ue.ZP,{type:Ee,danger:Be,disabled:Le,loading:ze,onClick:je,htmlType:Xe,href:_t,title:yn},Ye),et=ut.createElement(Ue.ZP,{type:Ee,danger:Be,icon:vn}),[it,Bt]=jt([Lt,et]);return be(ut.createElement(Ct.Z.Compact,Object.assign({className:ct,size:Ie,block:!0},jn),it,ut.createElement(le.Z,Object.assign({},Ne),Bt)))};lt.__ANT_BUTTON=!0;var vt=lt;const Oe=le.Z;Oe.Button=vt;var te=Oe},47211:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ft}});var le=pe(17313),Te=pe(13826),He=pe(92899),ut=pe(29878),We=pe(19447),Ue=pe(83116),Me=pe(37613),Pt=lt=>{const{componentCls:vt,menuCls:Oe,colorError:te,colorTextLightSolid:ee}=lt,de=`${Oe}-item`;return{[`${vt}, ${vt}-menu-submenu`]:{[`${Oe} ${de}`]:{[`&${de}-danger:not(${de}-disabled)`]:{color:te,"&:hover":{color:ee,backgroundColor:te}}}}}};const $e=lt=>{const{componentCls:vt,menuCls:Oe,zIndexPopup:te,dropdownArrowDistance:ee,sizePopupArrow:de,antCls:se,iconCls:he,motionDurationMid:ve,dropdownPaddingVertical:Ee,fontSize:Be,dropdownEdgeChildPadding:Le,colorTextDisabled:ze,fontSizeIcon:je,controlPaddingHorizontal:Xe,colorBgElevated:Ye}=lt;return[{[vt]:Object.assign(Object.assign({},(0,le.Wf)(lt)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:te,display:"block","&::before":{position:"absolute",insetBlock:-ee+de/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${se}-btn`]:{[`& > ${he}-down, & > ${se}-btn-icon > ${he}-down`]:{fontSize:je}},[`${vt}-wrap`]:{position:"relative",[`${se}-btn > ${he}-down`]:{fontSize:je},[`${he}-down::before`]:{transition:`transform ${ve}`}},[`${vt}-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${vt}-placement-bottomLeft,
&${se}-slide-down-appear${se}-slide-down-appear-active${vt}-placement-bottomLeft,
&${se}-slide-down-enter${se}-slide-down-enter-active${vt}-placement-bottom,
&${se}-slide-down-appear${se}-slide-down-appear-active${vt}-placement-bottom,
&${se}-slide-down-enter${se}-slide-down-enter-active${vt}-placement-bottomRight,
&${se}-slide-down-appear${se}-slide-down-appear-active${vt}-placement-bottomRight`]:{animationName:Te.fJ},[`&${se}-slide-up-enter${se}-slide-up-enter-active${vt}-placement-topLeft,
&${se}-slide-up-appear${se}-slide-up-appear-active${vt}-placement-topLeft,
&${se}-slide-up-enter${se}-slide-up-enter-active${vt}-placement-top,
&${se}-slide-up-appear${se}-slide-up-appear-active${vt}-placement-top,
&${se}-slide-up-enter${se}-slide-up-enter-active${vt}-placement-topRight,
&${se}-slide-up-appear${se}-slide-up-appear-active${vt}-placement-topRight`]:{animationName:Te.Qt},[`&${se}-slide-down-leave${se}-slide-down-leave-active${vt}-placement-bottomLeft,
&${se}-slide-down-leave${se}-slide-down-leave-active${vt}-placement-bottom,
&${se}-slide-down-leave${se}-slide-down-leave-active${vt}-placement-bottomRight`]:{animationName:Te.Uw},[`&${se}-slide-up-leave${se}-slide-up-leave-active${vt}-placement-topLeft,
&${se}-slide-up-leave${se}-slide-up-leave-active${vt}-placement-top,
&${se}-slide-up-leave${se}-slide-up-leave-active${vt}-placement-topRight`]:{animationName:Te.ly}})},(0,We.ZP)(lt,{colorBg:Ye,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${vt} ${Oe}`]:{position:"relative",margin:0},[`${Oe}-submenu-popup`]:{position:"absolute",zIndex:te,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${vt}, ${vt}-menu-submenu`]:{[Oe]:Object.assign(Object.assign({padding:Le,listStyleType:"none",backgroundColor:Ye,backgroundClip:"padding-box",borderRadius:lt.borderRadiusLG,outline:"none",boxShadow:lt.boxShadowSecondary},(0,le.Qy)(lt)),{[`${Oe}-item-group-title`]:{padding:`${Ee}px ${Xe}px`,color:lt.colorTextDescription,transition:`all ${ve}`},[`${Oe}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${Oe}-item-icon`]:{minWidth:Be,marginInlineEnd:lt.marginXS,fontSize:lt.fontSizeSM},[`${Oe}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${ve}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${Oe}-item, ${Oe}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${Ee}px ${Xe}px`,color:lt.colorText,fontWeight:"normal",fontSize:Be,lineHeight:lt.lineHeight,cursor:"pointer",transition:`all ${ve}`,borderRadius:lt.borderRadiusSM,"&:hover, &-active":{backgroundColor:lt.controlItemBgHover}},(0,le.Qy)(lt)),{"&-selected":{color:lt.colorPrimary,backgroundColor:lt.controlItemBgActive,"&:hover, &-active":{backgroundColor:lt.controlItemBgActiveHover}},"&-disabled":{color:ze,cursor:"not-allowed","&:hover":{color:ze,backgroundColor:Ye,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${lt.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:lt.colorSplit},[`${vt}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:lt.paddingXS,[`${vt}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:lt.colorTextDescription,fontSize:je,fontStyle:"normal"}}}),[`${Oe}-item-group-list`]:{margin:`0 ${lt.marginXS}px`,padding:0,listStyle:"none"},[`${Oe}-submenu-title`]:{paddingInlineEnd:Xe+lt.fontSizeSM},[`${Oe}-submenu-vertical`]:{position:"relative"},[`${Oe}-submenu${Oe}-submenu-disabled ${vt}-menu-submenu-title`]:{[`&, ${vt}-menu-submenu-arrow-icon`]:{color:ze,backgroundColor:Ye,cursor:"not-allowed"}},[`${Oe}-submenu-selected ${vt}-menu-submenu-title`]:{color:lt.colorPrimary}})}},[(0,Te.oN)(lt,"slide-up"),(0,Te.oN)(lt,"slide-down"),(0,He.Fm)(lt,"move-up"),(0,He.Fm)(lt,"move-down"),(0,ut._y)(lt,"zoom-big")]]};var Ft=(0,Ue.Z)("Dropdown",(lt,vt)=>{let{rootPrefixCls:Oe}=vt;const{marginXXS:te,sizePopupArrow:ee,controlHeight:de,fontSize:se,lineHeight:he,paddingXXS:ve,componentCls:Ee,borderRadiusLG:Be}=lt,Le=(de-se*he)/2,{dropdownArrowOffset:ze}=(0,We.fS)({contentRadius:Be}),je=(0,Me.TS)(lt,{menuCls:`${Ee}-menu`,rootPrefixCls:Oe,dropdownArrowDistance:ee/2+te,dropdownArrowOffset:ze,dropdownPaddingVertical:Le,dropdownEdgeChildPadding:ve});return[$e(je),Pt(je)]},lt=>({zIndexPopup:lt.zIndexPopupBase+50}))},64165:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return ve}});var le=pe(92310),Te=pe.n(le),He=pe(59301),ut=pe(36355),We=pe(9763),Ue=pe(64993),Me=pe(88088),Pt=()=>{const[,Ee]=(0,Me.Z)(),Le=new Ue.C(Ee.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return He.createElement("svg",{style:Le,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"}))))},Ft=()=>{const[,Ee]=(0,Me.Z)(),{colorFill:Be,colorFillTertiary:Le,colorFillQuaternary:ze,colorBgContainer:je}=Ee,{borderColor:Xe,shadowColor:Ye,contentColor:dt}=(0,He.useMemo)(()=>({borderColor:new Ue.C(Be).onBackground(je).toHexShortString(),shadowColor:new Ue.C(Le).onBackground(je).toHexShortString(),contentColor:new Ue.C(ze).onBackground(je).toHexShortString()}),[Be,Le,ze,je]);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:Ye,cx:"32",cy:"33",rx:"32",ry:"7"}),He.createElement("g",{fillRule:"nonzero",stroke:Xe},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:dt}))))},lt=pe(83116),vt=pe(37613);const Oe=Ee=>{const{componentCls:Be,margin:Le,marginXS:ze,marginXL:je,fontSize:Xe,lineHeight:Ye}=Ee;return{[Be]:{marginInline:ze,fontSize:Xe,lineHeight:Ye,textAlign:"center",[`${Be}-image`]:{height:Ee.emptyImgHeight,marginBottom:ze,opacity:Ee.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${Be}-description`]:{color:Ee.colorText},[`${Be}-footer`]:{marginTop:Le},"&-normal":{marginBlock:je,color:Ee.colorTextDisabled,[`${Be}-description`]:{color:Ee.colorTextDisabled},[`${Be}-image`]:{height:Ee.emptyImgHeightMD}},"&-small":{marginBlock:ze,color:Ee.colorTextDisabled,[`${Be}-image`]:{height:Ee.emptyImgHeightSM}}}}};var te=(0,lt.Z)("Empty",Ee=>{const{componentCls:Be,controlHeightLG:Le}=Ee,ze=(0,vt.TS)(Ee,{emptyImgCls:`${Be}-img`,emptyImgHeight:Le*2.5,emptyImgHeightMD:Le,emptyImgHeightSM:Le*.875});return[Oe(ze)]}),ee=function(Ee,Be){var Le={};for(var ze in Ee)Object.prototype.hasOwnProperty.call(Ee,ze)&&Be.indexOf(ze)<0&&(Le[ze]=Ee[ze]);if(Ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,ze=Object.getOwnPropertySymbols(Ee);je<ze.length;je++)Be.indexOf(ze[je])<0&&Object.prototype.propertyIsEnumerable.call(Ee,ze[je])&&(Le[ze[je]]=Ee[ze[je]]);return Le};const de=He.createElement(Pt,null),se=He.createElement(Ft,null),he=Ee=>{var{className:Be,rootClassName:Le,prefixCls:ze,image:je=de,description:Xe,children:Ye,imageStyle:dt,style:Ze}=Ee,Nt=ee(Ee,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:at,direction:kt,empty:xt}=He.useContext(ut.E_),Ot=at("empty",ze),[Gt,At]=te(Ot),[qe]=(0,We.Z)("Empty"),Ve=typeof Xe!="undefined"?Xe:qe==null?void 0:qe.description,_t=typeof Ve=="string"?Ve:"empty";let vn=null;return typeof je=="string"?vn=He.createElement("img",{alt:_t,src:je}):vn=je,Gt(He.createElement("div",Object.assign({className:Te()(At,Ot,xt==null?void 0:xt.className,{[`${Ot}-normal`]:je===se,[`${Ot}-rtl`]:kt==="rtl"},Be,Le),style:Object.assign(Object.assign({},xt==null?void 0:xt.style),Ze)},Nt),He.createElement("div",{className:`${Ot}-image`,style:dt},vn),Ve&&He.createElement("div",{className:`${Ot}-description`},Ve),Ye&&He.createElement("div",{className:`${Ot}-footer`},Ye)))};he.PRESENTED_IMAGE_DEFAULT=de,he.PRESENTED_IMAGE_SIMPLE=se;var ve=he},78241:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return Wt}});var le=pe(26407),Te=pe(92310),He=pe.n(Te),ut=pe(77900),We=pe(59301),Ue=pe(62892),Me=pe(32441);function Ct(Qe){const[on,cn]=We.useState(Qe);return We.useEffect(()=>{const Mt=setTimeout(()=>{cn(Qe)},Qe.length?0:10);return()=>{clearTimeout(Mt)}},[Qe]),on}var Pt=pe(17313),$e=pe(29878),Ft=pe(8378),lt=pe(37613),vt=pe(83116),te=Qe=>{const{componentCls:on}=Qe,cn=`${on}-show-help`,Mt=`${on}-show-help-item`;return{[cn]:{transition:`opacity ${Qe.motionDurationSlow} ${Qe.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Mt]:{overflow:"hidden",transition:`height ${Qe.motionDurationSlow} ${Qe.motionEaseInOut},
opacity ${Qe.motionDurationSlow} ${Qe.motionEaseInOut},
transform ${Qe.motionDurationSlow} ${Qe.motionEaseInOut} !important`,[`&${Mt}-appear, &${Mt}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Mt}-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}}),de=(Qe,on)=>{const{formItemCls:cn}=Qe;return{[cn]:{[`${cn}-label > label`]:{height:on},[`${cn}-control-input`]:{minHeight:on}}}},se=Qe=>{const{componentCls:on}=Qe;return{[Qe.componentCls]:Object.assign(Object.assign(Object.assign({},(0,Pt.Wf)(Qe)),ee(Qe)),{[`${on}-text`]:{display:"inline-block",paddingInlineEnd:Qe.paddingSM},"&-small":Object.assign({},de(Qe,Qe.controlHeightSM)),"&-large":Object.assign({},de(Qe,Qe.controlHeightLG))})}},he=Qe=>{const{formItemCls:on,iconCls:cn,componentCls:Mt,rootPrefixCls:ht,labelRequiredMarkColor:nn,labelColor:gn,labelFontSize:_n,labelHeight:qn,labelColonMarginInlineStart:Et,labelColonMarginInlineEnd:Pn,itemMarginBottom:Xn}=Qe;return{[on]:Object.assign(Object.assign({},(0,Pt.Wf)(Qe)),{marginBottom:Xn,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden.${ht}-row`]:{display:"none"},"&-has-warning":{[`${on}-split`]:{color:Qe.colorError}},"&-has-error":{[`${on}-split`]:{color:Qe.colorWarning}},[`${on}-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:gn,fontSize:_n,[`> ${cn}`]:{fontSize:Qe.fontSize,verticalAlign:"top"},[`&${on}-required:not(${on}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:Qe.marginXXS,color:nn,fontSize:Qe.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Mt}-hide-required-mark &`]:{display:"none"}},[`${on}-optional`]:{display:"inline-block",marginInlineStart:Qe.marginXXS,color:Qe.colorTextDescription,[`${Mt}-hide-required-mark &`]:{display:"none"}},[`${on}-tooltip`]:{color:Qe.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:Qe.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:Et,marginInlineEnd:Pn},[`&${on}-no-colon::after`]:{content:'"\\a0"'}}},[`${on}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${ht}-col-'"]):not([class*="' ${ht}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:Qe.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[on]:{"&-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 ${on}-explain`]:{height:"auto",opacity:1},[`${on}-feedback-icon`]:{fontSize:Qe.fontSize,textAlign:"center",visibility:"visible",animationName:$e.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:on,formItemCls:cn}=Qe;return{[`${on}-horizontal`]:{[`${cn}-label`]:{flexGrow:0},[`${cn}-control`]:{flex:"1 1 0",minWidth:0},[`${cn}-label[class$='-24'], ${cn}-label[class*='-24 ']`]:{[`& + ${cn}-control`]:{minWidth:"unset"}}}}},Ee=Qe=>{const{componentCls:on,formItemCls:cn}=Qe;return{[`${on}-inline`]:{display:"flex",flexWrap:"wrap",[cn]:{flex:"none",marginInlineEnd:Qe.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${cn}-label,
> ${cn}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${cn}-label`]:{flex:"none"},[`${on}-text`]:{display:"inline-block"},[`${cn}-has-feedback`]:{display:"inline-block"}}}}},Be=Qe=>({padding:Qe.verticalLabelPadding,margin:Qe.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),Le=Qe=>{const{componentCls:on,formItemCls:cn,rootPrefixCls:Mt}=Qe;return{[`${cn} ${cn}-label`]:Be(Qe),[on]:{[cn]:{flexWrap:"wrap",[`${cn}-label, ${cn}-control`]:{[`&:not([class*=" ${Mt}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ze=Qe=>{const{componentCls:on,formItemCls:cn,rootPrefixCls:Mt}=Qe;return{[`${on}-vertical`]:{[cn]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${on}-item-control`]:{width:"100%"}}},[`${on}-vertical ${cn}-label,
.${Mt}-col-24${cn}-label,
.${Mt}-col-xl-24${cn}-label`]:Be(Qe),[`@media (max-width: ${Qe.screenXSMax}px)`]:[Le(Qe),{[on]:{[`.${Mt}-col-xs-24${cn}-label`]:Be(Qe)}}],[`@media (max-width: ${Qe.screenSMMax}px)`]:{[on]:{[`.${Mt}-col-sm-24${cn}-label`]:Be(Qe)}},[`@media (max-width: ${Qe.screenMDMax}px)`]:{[on]:{[`.${Mt}-col-md-24${cn}-label`]:Be(Qe)}},[`@media (max-width: ${Qe.screenLGMax}px)`]:{[on]:{[`.${Mt}-col-lg-24${cn}-label`]:Be(Qe)}}}},je=(Qe,on)=>(0,lt.TS)(Qe,{formItemCls:`${Qe.componentCls}-item`,rootPrefixCls:on});var Xe=(0,vt.Z)("Form",(Qe,on)=>{let{rootPrefixCls:cn}=on;const Mt=je(Qe,cn);return[se(Mt),he(Mt),te(Mt),ve(Mt),Ee(Mt),ze(Mt),(0,Ft.Z)(Mt),$e.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 Ye=[];function dt(Qe,on,cn){let Mt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof Qe=="string"?Qe:`${on}-${Mt}`,error:Qe,errorStatus:cn}}var Nt=Qe=>{let{help:on,helpStatus:cn,errors:Mt=Ye,warnings:ht=Ye,className:nn,fieldId:gn,onVisibleChanged:_n}=Qe;const{prefixCls:qn}=We.useContext(Me.Rk),Et=`${qn}-item-explain`,[,Pn]=Xe(qn),Xn=(0,We.useMemo)(()=>(0,Ue.Z)(qn),[qn]),Ci=Ct(Mt),tn=Ct(ht),sn=We.useMemo(()=>on!=null?[dt(on,"help",cn)]:[].concat((0,le.Z)(Ci.map((ji,Ai)=>dt(ji,"error","error",Ai))),(0,le.Z)(tn.map((ji,Ai)=>dt(ji,"warning","warning",Ai)))),[on,cn,Ci,tn]),In={};return gn&&(In.id=`${gn}_help`),We.createElement(ut.default,{motionDeadline:Xn.motionDeadline,motionName:`${qn}-show-help`,visible:!!sn.length,onVisibleChanged:_n},ji=>{const{className:Ai,style:Si}=ji;return We.createElement("div",Object.assign({},In,{className:He()(Et,Ai,nn,Pn),style:Si,role:"alert"}),We.createElement(ut.CSSMotionList,Object.assign({keys:sn},(0,Ue.Z)(qn),{motionName:`${qn}-show-help-item`,component:!1}),ki=>{const{key:Ni,error:ir,errorStatus:zr,className:Vr,style:Zn}=ki;return We.createElement("div",{key:Ni,className:He()(Vr,{[`${Et}-${zr}`]:zr}),style:Zn},ir)}))})},at=pe(95013),kt=pe(36355),xt=pe(1684),Ot=pe(52946),Gt=pe(19716),At=pe(16722);const qe=["parentNode"],Ve="form_item";function _t(Qe){return Qe===void 0||Qe===!1?[]:Array.isArray(Qe)?Qe:[Qe]}function vn(Qe,on){if(!Qe.length)return;const cn=Qe.join("_");return on?`${on}_${cn}`:qe.includes(cn)?`${Ve}_${cn}`:cn}function yn(Qe,on,cn,Mt,ht,nn){let gn=Mt;return nn!==void 0?gn=nn:cn.validating?gn="validating":Qe.length?gn="error":on.length?gn="warning":(cn.touched||ht&&cn.validated)&&(gn="success"),gn}function jt(Qe){return _t(Qe).join("_")}function en(Qe){const[on]=(0,at.useForm)(),cn=We.useRef({}),Mt=We.useMemo(()=>Qe!=null?Qe:Object.assign(Object.assign({},on),{__INTERNAL__:{itemRef:ht=>nn=>{const gn=jt(ht);nn?cn.current[gn]=nn:delete cn.current[gn]}},scrollToField:function(ht){let nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const gn=_t(ht),_n=vn(gn,Mt.__INTERNAL__.name),qn=_n?document.getElementById(_n):null;qn&&(0,At.Z)(qn,Object.assign({scrollMode:"if-needed",block:"nearest"},nn))},getFieldInstance:ht=>{const nn=jt(ht);return cn.current[nn]}}),[Qe,on]);return[Mt]}var ln=pe(28726),Wn=function(Qe,on){var cn={};for(var Mt in Qe)Object.prototype.hasOwnProperty.call(Qe,Mt)&&on.indexOf(Mt)<0&&(cn[Mt]=Qe[Mt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Mt=Object.getOwnPropertySymbols(Qe);ht<Mt.length;ht++)on.indexOf(Mt[ht])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Mt[ht])&&(cn[Mt[ht]]=Qe[Mt[ht]]);return cn};const un=(Qe,on)=>{const cn=We.useContext(xt.Z),{getPrefixCls:Mt,direction:ht,form:nn}=We.useContext(kt.E_),{prefixCls:gn,className:_n,rootClassName:qn,size:Et,disabled:Pn=cn,form:Xn,colon:Ci,labelAlign:tn,labelWrap:sn,labelCol:In,wrapperCol:ji,hideRequiredMark:Ai,layout:Si="horizontal",scrollToFirstError:ki,requiredMark:Ni,onFinishFailed:ir,name:zr,style:Vr,feedbackIcons:Zn}=Qe,io=Wn(Qe,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),Yr=(0,Gt.Z)(Et),Fr=We.useContext(ln.Z),wn=(0,We.useMemo)(()=>Ni!==void 0?Ni:nn&&nn.requiredMark!==void 0?nn.requiredMark:!Ai,[Ai,Ni,nn]),ri=Ci!=null?Ci:nn==null?void 0:nn.colon,Ui=Mt("form",gn),[Pr,er]=Xe(Ui),Cr=He()(Ui,`${Ui}-${Si}`,{[`${Ui}-hide-required-mark`]:wn===!1,[`${Ui}-rtl`]:ht==="rtl",[`${Ui}-${Yr}`]:Yr},er,nn==null?void 0:nn.className,_n,qn),[qr]=en(Xn),{__INTERNAL__:Zr}=qr;Zr.name=zr;const Ir=(0,We.useMemo)(()=>({name:zr,labelAlign:tn,labelCol:In,labelWrap:sn,wrapperCol:ji,vertical:Si==="vertical",colon:ri,requiredMark:wn,itemRef:Zr.itemRef,form:qr,feedbackIcons:Zn}),[zr,tn,In,ji,Si,ri,wn,qr,Zn]);We.useImperativeHandle(on,()=>qr);const Ur=(Xo,Un)=>{if(Xo){let Io={block:"nearest"};typeof Xo=="object"&&(Io=Xo),qr.scrollToField(Un,Io)}},Vn=Xo=>{if(ir==null||ir(Xo),Xo.errorFields.length){const Un=Xo.errorFields[0].name;if(ki!==void 0){Ur(ki,Un);return}nn&&nn.scrollToFirstError!==void 0&&Ur(nn.scrollToFirstError,Un)}};return Pr(We.createElement(xt.n,{disabled:Pn},We.createElement(Ot.q,{size:Yr},We.createElement(Me.RV,Object.assign({},{validateMessages:Fr}),We.createElement(Me.q3.Provider,{value:Ir},We.createElement(at.default,Object.assign({id:zr},io,{name:zr,onFinishFailed:Vn,form:qr,style:Object.assign(Object.assign({},nn==null?void 0:nn.style),Vr),className:Cr})))))))};var wt=We.forwardRef(un),jn=pe(41799),ci=pe(8654),Ge=pe(92343),be=pe(11592);function Pe(Qe){if(typeof Qe=="function")return Qe;const on=(0,be.Z)(Qe);return on.length<=1?on[0]:on}const Ne=()=>{const{status:Qe,errors:on=[],warnings:cn=[]}=(0,We.useContext)(Me.aM);return{status:Qe,errors:on,warnings:cn}};Ne.Context=Me.aM;var Ie=Ne,xe=pe(16089);function ct(Qe){const[on,cn]=We.useState(Qe),Mt=(0,We.useRef)(null),ht=(0,We.useRef)([]),nn=(0,We.useRef)(!1);We.useEffect(()=>(nn.current=!1,()=>{nn.current=!0,xe.Z.cancel(Mt.current),Mt.current=null}),[]);function gn(_n){nn.current||(Mt.current===null&&(ht.current=[],Mt.current=(0,xe.Z)(()=>{Mt.current=null,cn(qn=>{let Et=qn;return ht.current.forEach(Pn=>{Et=Pn(Et)}),Et})})),ht.current.push(_n))}return[on,gn]}function Lt(){const{itemRef:Qe}=We.useContext(Me.q3),on=We.useRef({});function cn(Mt,ht){const nn=ht&&typeof ht=="object"&&ht.ref,gn=Mt.join("_");return(on.current.name!==gn||on.current.originRef!==nn)&&(on.current.name=gn,on.current.originRef=nn,on.current.ref=(0,ci.sQ)(Qe(Mt),nn)),on.current.ref}return cn}var et=pe(29194),it=pe(34280),Bt=pe(2738),Dt=pe(27382),ft=pe(37028);const $t=Qe=>{const{formItemCls:on}=Qe;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${on}-control`]:{display:"flex"}}}};var xn=(0,vt.b)(["Form","item-item"],(Qe,on)=>{let{rootPrefixCls:cn}=on;const Mt=je(Qe,cn);return[$t(Mt)]}),Jt=Qe=>{const{prefixCls:on,status:cn,wrapperCol:Mt,children:ht,errors:nn,warnings:gn,_internalItemRender:_n,extra:qn,help:Et,fieldId:Pn,marginBottom:Xn,onErrorVisibleChanged:Ci}=Qe,tn=`${on}-item`,sn=We.useContext(Me.q3),In=Mt||sn.wrapperCol||{},ji=He()(`${tn}-control`,In.className),Ai=We.useMemo(()=>Object.assign({},sn),[sn]);delete Ai.labelCol,delete Ai.wrapperCol;const Si=We.createElement("div",{className:`${tn}-control-input`},We.createElement("div",{className:`${tn}-control-input-content`},ht)),ki=We.useMemo(()=>({prefixCls:on,status:cn}),[on,cn]),Ni=Xn!==null||nn.length||gn.length?We.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},We.createElement(Me.Rk.Provider,{value:ki},We.createElement(Nt,{fieldId:Pn,errors:nn,warnings:gn,help:Et,helpStatus:cn,className:`${tn}-explain-connected`,onVisibleChanged:Ci})),!!Xn&&We.createElement("div",{style:{width:0,height:Xn}})):null,ir={};Pn&&(ir.id=`${Pn}_extra`);const zr=qn?We.createElement("div",Object.assign({},ir,{className:`${tn}-extra`}),qn):null,Vr=_n&&_n.mark==="pro_table_render"&&_n.render?_n.render(Qe,{input:Si,errorList:Ni,extra:zr}):We.createElement(We.Fragment,null,Si,Ni,zr);return We.createElement(Me.q3.Provider,{value:Ai},We.createElement(ft.Z,Object.assign({},In,{className:ji}),Vr),We.createElement(xn,{prefixCls:on}))},Tn=pe(61485),Kn=pe(31724),dn=pe(9763),Qn=pe(6848),pi=function(Qe,on){var cn={};for(var Mt in Qe)Object.prototype.hasOwnProperty.call(Qe,Mt)&&on.indexOf(Mt)<0&&(cn[Mt]=Qe[Mt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Mt=Object.getOwnPropertySymbols(Qe);ht<Mt.length;ht++)on.indexOf(Mt[ht])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Mt[ht])&&(cn[Mt[ht]]=Qe[Mt[ht]]);return cn};function zn(Qe){return Qe?typeof Qe=="object"&&!We.isValidElement(Qe)?Qe:{title:Qe}:null}var yi=Qe=>{let{prefixCls:on,label:cn,htmlFor:Mt,labelCol:ht,labelAlign:nn,colon:gn,required:_n,requiredMark:qn,tooltip:Et}=Qe;var Pn;const[Xn]=(0,dn.Z)("Form"),{vertical:Ci,labelAlign:tn,labelCol:sn,labelWrap:In,colon:ji}=We.useContext(Me.q3);if(!cn)return null;const Ai=ht||sn||{},Si=nn||tn,ki=`${on}-item-label`,Ni=He()(ki,Si==="left"&&`${ki}-left`,Ai.className,{[`${ki}-wrap`]:!!In});let ir=cn;const zr=gn===!0||ji!==!1&&gn!==!1;zr&&!Ci&&typeof cn=="string"&&cn.trim()!==""&&(ir=cn.replace(/[:|]\s*$/,""));const Zn=zn(Et);if(Zn){const{icon:wn=We.createElement(Tn.Z,null)}=Zn,ri=pi(Zn,["icon"]),Ui=We.createElement(Qn.Z,Object.assign({},ri),We.cloneElement(wn,{className:`${on}-item-tooltip`,title:""}));ir=We.createElement(We.Fragment,null,ir,Ui)}const io=qn==="optional",Yr=typeof qn=="function";Yr?ir=qn(ir,{required:!!_n}):io&&!_n&&(ir=We.createElement(We.Fragment,null,ir,We.createElement("span",{className:`${on}-item-optional`,title:""},(Xn==null?void 0:Xn.optional)||((Pn=Kn.Z.Form)===null||Pn===void 0?void 0:Pn.optional))));const Fr=He()({[`${on}-item-required`]:_n,[`${on}-item-required-mark-optional`]:io||Yr,[`${on}-item-no-colon`]:!zr});return We.createElement(ft.Z,Object.assign({},Ai,{className:Ni}),We.createElement("label",{htmlFor:Mt,className:Fr,title:typeof cn=="string"?cn:""},ir))},Zi=pe(29679),Hi=pe(19248),cr=pe(96512),br=pe(58617);const gi={success:Zi.Z,warning:cr.Z,error:Hi.Z,validating:br.Z};function di(Qe){let{children:on,errors:cn,warnings:Mt,hasFeedback:ht,validateStatus:nn,prefixCls:gn,meta:_n,noStyle:qn}=Qe;const Et=`${gn}-item`,{feedbackIcons:Pn}=We.useContext(Me.q3),Xn=yn(cn,Mt,_n,null,!!ht,nn),{isFormItemInput:Ci,status:tn}=We.useContext(Me.aM),sn=We.useMemo(()=>{var In;let ji;if(ht){const ki=ht!==!0&&ht.icons||Pn,Ni=Xn&&((In=ki==null?void 0:ki({status:Xn,errors:cn,warnings:Mt}))===null||In===void 0?void 0:In[Xn]),ir=Xn&&gi[Xn];ji=Ni!==!1&&ir?We.createElement("span",{className:He()(`${Et}-feedback-icon`,`${Et}-feedback-icon-${Xn}`)},Ni||We.createElement(ir,null)):null}let Ai=!0,Si=Xn||"";return qn&&(Ai=Ci,Si=(Xn!=null?Xn:tn)||""),{status:Si,errors:cn,warnings:Mt,hasFeedback:!!ht,feedbackIcon:ji,isFormItemInput:Ai}},[Xn,ht,qn,Ci,tn]);return We.createElement(Me.aM.Provider,{value:sn},on)}var wi=function(Qe,on){var cn={};for(var Mt in Qe)Object.prototype.hasOwnProperty.call(Qe,Mt)&&on.indexOf(Mt)<0&&(cn[Mt]=Qe[Mt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Mt=Object.getOwnPropertySymbols(Qe);ht<Mt.length;ht++)on.indexOf(Mt[ht])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Mt[ht])&&(cn[Mt[ht]]=Qe[Mt[ht]]);return cn};function Qi(Qe){const{prefixCls:on,className:cn,rootClassName:Mt,style:ht,help:nn,errors:gn,warnings:_n,validateStatus:qn,meta:Et,hasFeedback:Pn,hidden:Xn,children:Ci,fieldId:tn,required:sn,isRequired:In,onSubItemMetaChange:ji}=Qe,Ai=wi(Qe,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),Si=`${on}-item`,{requiredMark:ki}=We.useContext(Me.q3),Ni=We.useRef(null),ir=Ct(gn),zr=Ct(_n),Vr=nn!=null,Zn=!!(Vr||gn.length||_n.length),io=!!Ni.current&&(0,et.Z)(Ni.current),[Yr,Fr]=We.useState(null);(0,it.Z)(()=>{if(Zn&&Ni.current){const er=getComputedStyle(Ni.current);Fr(parseInt(er.marginBottom,10))}},[Zn,io]);const wn=er=>{er||Fr(null)},Ui=function(){let er=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const Cr=er?ir:Et.errors,qr=er?zr:Et.warnings;return yn(Cr,qr,Et,"",!!Pn,qn)}(),Pr=He()(Si,cn,Mt,{[`${Si}-with-help`]:Vr||ir.length||zr.length,[`${Si}-has-feedback`]:Ui&&Pn,[`${Si}-has-success`]:Ui==="success",[`${Si}-has-warning`]:Ui==="warning",[`${Si}-has-error`]:Ui==="error",[`${Si}-is-validating`]:Ui==="validating",[`${Si}-hidden`]:Xn});return We.createElement("div",{className:Pr,style:ht,ref:Ni},We.createElement(Dt.Z,Object.assign({className:`${Si}-row`},(0,Bt.Z)(Ai,["_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(yi,Object.assign({htmlFor:tn},Qe,{requiredMark:ki,required:sn!=null?sn:In,prefixCls:on})),We.createElement(Jt,Object.assign({},Qe,Et,{errors:ir,warnings:zr,prefixCls:on,status:Ui,help:nn,marginBottom:Yr,onErrorVisibleChanged:wn}),We.createElement(Me.qI.Provider,{value:ji},We.createElement(di,{prefixCls:on,meta:Et,errors:Et.errors,warnings:Et.warnings,hasFeedback:Pn,validateStatus:Ui},Ci)))),!!Yr&&We.createElement("div",{className:`${Si}-margin-offset`,style:{marginBottom:-Yr}}))}const Li="__SPLIT__",ro=null,fr=We.memo(Qe=>{let{children:on}=Qe;return on},(Qe,on)=>Qe.value===on.value&&Qe.update===on.update&&Qe.childProps.length===on.childProps.length&&Qe.childProps.every((cn,Mt)=>cn===on.childProps[Mt]));function Ae(Qe){return Qe!=null}function Ei(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function Sr(Qe){const{name:on,noStyle:cn,className:Mt,dependencies:ht,prefixCls:nn,shouldUpdate:gn,rules:_n,children:qn,required:Et,label:Pn,messageVariables:Xn,trigger:Ci="onChange",validateTrigger:tn,hidden:sn,help:In}=Qe,{getPrefixCls:ji}=We.useContext(kt.E_),{name:Ai}=We.useContext(Me.q3),Si=Pe(qn),ki=typeof Si=="function",Ni=We.useContext(Me.qI),{validateTrigger:ir}=We.useContext(at.FieldContext),zr=tn!==void 0?tn:ir,Vr=Ae(on),Zn=ji("form",nn),[io,Yr]=Xe(Zn),Fr=We.useContext(at.ListContext),wn=We.useRef(),[ri,Ui]=ct({}),[Pr,er]=(0,jn.Z)(()=>Ei()),Cr=Un=>{const Io=Fr==null?void 0:Fr.getKey(Un.name);if(er(Un.destroy?Ei():Un,!0),cn&&In!==!1&&Ni){let Go=Un.name;if(Un.destroy)Go=wn.current||Go;else if(Io!==void 0){const[tr,ia]=Io;Go=[tr].concat((0,le.Z)(ia)),wn.current=Go}Ni(Un,Go)}},qr=(Un,Io)=>{Ui(Go=>{const tr=Object.assign({},Go),zo=[].concat((0,le.Z)(Un.name.slice(0,-1)),(0,le.Z)(Io)).join(Li);return Un.destroy?delete tr[zo]:tr[zo]=Un,tr})},[Zr,Ir]=We.useMemo(()=>{const Un=(0,le.Z)(Pr.errors),Io=(0,le.Z)(Pr.warnings);return Object.values(ri).forEach(Go=>{Un.push.apply(Un,(0,le.Z)(Go.errors||[])),Io.push.apply(Io,(0,le.Z)(Go.warnings||[]))}),[Un,Io]},[ri,Pr.errors,Pr.warnings]),Ur=Lt();function Vn(Un,Io,Go){return cn&&!sn?We.createElement(di,{prefixCls:Zn,hasFeedback:Qe.hasFeedback,validateStatus:Qe.validateStatus,meta:Pr,errors:Zr,warnings:Ir,noStyle:!0},Un):We.createElement(Qi,Object.assign({key:"row"},Qe,{className:He()(Mt,Yr),prefixCls:Zn,fieldId:Io,isRequired:Go,errors:Zr,warnings:Ir,meta:Pr,onSubItemMetaChange:qr}),Un)}if(!Vr&&!ki&&!ht)return io(Vn(Si));let Xo={};return typeof Pn=="string"?Xo.label=Pn:on&&(Xo.label=String(on)),Xn&&(Xo=Object.assign(Object.assign({},Xo),Xn)),io(We.createElement(at.Field,Object.assign({},Qe,{messageVariables:Xo,trigger:Ci,validateTrigger:zr,onMetaChange:Cr}),(Un,Io,Go)=>{const tr=_t(on).length&&Io?Io.name:[],ia=vn(tr,Ai),zo=Et!==void 0?Et:!!(_n&&_n.some(xo=>{if(xo&&typeof xo=="object"&&xo.required&&!xo.warningOnly)return!0;if(typeof xo=="function"){const $o=xo(Go);return $o&&$o.required&&!$o.warningOnly}return!1})),Nr=Object.assign({},Un);let Br=null;if(Array.isArray(Si)&&Vr)Br=Si;else if(!(ki&&(!(gn||ht)||Vr))){if(!(ht&&!ki&&!Vr))if((0,Ge.l$)(Si)){const xo=Object.assign(Object.assign({},Si.props),Nr);if(xo.id||(xo.id=ia),In||Zr.length>0||Ir.length>0||Qe.extra){const st=[];(In||Zr.length>0)&&st.push(`${ia}_help`),Qe.extra&&st.push(`${ia}_extra`),xo["aria-describedby"]=st.join(" ")}Zr.length>0&&(xo["aria-invalid"]="true"),zo&&(xo["aria-required"]="true"),(0,ci.Yr)(Si)&&(xo.ref=Ur(tr,Si)),new Set([].concat((0,le.Z)(_t(Ci)),(0,le.Z)(_t(zr)))).forEach(st=>{xo[st]=function(){for(var ra,va,Ma,Ps,Ha,Ms=arguments.length,bo=new Array(Ms),wo=0;wo<Ms;wo++)bo[wo]=arguments[wo];(Ma=Nr[st])===null||Ma===void 0||(ra=Ma).call.apply(ra,[Nr].concat(bo)),(Ha=(Ps=Si.props)[st])===null||Ha===void 0||(va=Ha).call.apply(va,[Ps].concat(bo))}});const $i=[xo["aria-required"],xo["aria-invalid"],xo["aria-describedby"]];Br=We.createElement(fr,{value:Nr[Qe.valuePropName||"value"],update:Si,childProps:$i},(0,Ge.Tm)(Si,xo))}else ki&&(gn||ht)&&!Vr?Br=Si(Go):Br=Si}return Vn(Br,ia,zo)}))}const Fn=Sr;Fn.useStatus=Ie;var xi=Fn,zi=function(Qe,on){var cn={};for(var Mt in Qe)Object.prototype.hasOwnProperty.call(Qe,Mt)&&on.indexOf(Mt)<0&&(cn[Mt]=Qe[Mt]);if(Qe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ht=0,Mt=Object.getOwnPropertySymbols(Qe);ht<Mt.length;ht++)on.indexOf(Mt[ht])<0&&Object.prototype.propertyIsEnumerable.call(Qe,Mt[ht])&&(cn[Mt[ht]]=Qe[Mt[ht]]);return cn},Gn=Qe=>{var{prefixCls:on,children:cn}=Qe,Mt=zi(Qe,["prefixCls","children"]);const{getPrefixCls:ht}=We.useContext(kt.E_),nn=ht("form",on),gn=We.useMemo(()=>({prefixCls:nn,status:"error"}),[nn]);return We.createElement(at.List,Object.assign({},Mt),(_n,qn,Et)=>We.createElement(Me.Rk.Provider,{value:gn},cn(_n.map(Pn=>Object.assign(Object.assign({},Pn),{fieldKey:Pn.key})),qn,{errors:Et.errors,warnings:Et.warnings})))};function ti(){const{form:Qe}=(0,We.useContext)(Me.q3);return Qe}const Zt=wt;Zt.Item=xi,Zt.List=Gn,Zt.ErrorList=Nt,Zt.useForm=en,Zt.useFormInstance=ti,Zt.useWatch=at.useWatch,Zt.Provider=Me.RV,Zt.create=()=>{};var Wt=Zt},8628:function(On,mn,pe){"use strict";var le=pe(59301),Te=pe(34280),He=pe(56762),ut=pe(69507);function We(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const Me=(0,le.useRef)({}),Ct=(0,He.Z)(),Pt=(0,ut.ZP)();return(0,Te.Z)(()=>{const $e=Pt.subscribe(Ft=>{Me.current=Ft,Ue&&Ct()});return()=>Pt.unsubscribe($e)},[]),Me.current}mn.Z=We},9432:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return he},n:function(){return de}});var le=pe(19248),Te=pe(92310),He=pe.n(Te),ut=pe(93681),We=pe(8654),Ue=pe(59301),Me=pe(19080),Ct=pe(36355),Pt=pe(1684),$e=pe(19716),Ft=pe(32441),lt=pe(33234),vt=pe(59412),Oe=pe(9937);function te(ve){return!!(ve.prefix||ve.suffix||ve.allowClear)}var ee=function(ve,Ee){var Be={};for(var Le in ve)Object.prototype.hasOwnProperty.call(ve,Le)&&Ee.indexOf(Le)<0&&(Be[Le]=ve[Le]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ze=0,Le=Object.getOwnPropertySymbols(ve);ze<Le.length;ze++)Ee.indexOf(Le[ze])<0&&Object.prototype.propertyIsEnumerable.call(ve,Le[ze])&&(Be[Le[ze]]=ve[Le[ze]]);return Be};function de(ve,Ee){if(!ve)return;ve.focus(Ee);const{cursor:Be}=Ee||{};if(Be){const Le=ve.value.length;switch(Be){case"start":ve.setSelectionRange(0,0);break;case"end":ve.setSelectionRange(Le,Le);break;default:ve.setSelectionRange(0,Le);break}}}var he=(0,Ue.forwardRef)((ve,Ee)=>{var Be;const{prefixCls:Le,bordered:ze=!0,status:je,size:Xe,disabled:Ye,onBlur:dt,onFocus:Ze,suffix:Nt,allowClear:at,addonAfter:kt,addonBefore:xt,className:Ot,style:Gt,styles:At,rootClassName:qe,onChange:Ve,classNames:_t}=ve,vn=ee(ve,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:yn,direction:jt,input:en}=Ue.useContext(Ct.E_),ln=yn("input",Le),Wn=(0,Ue.useRef)(null),[un,kn]=(0,Oe.ZP)(ln),{compactSize:wt,compactItemClassnames:jn}=(0,lt.ri)(ln,jt),ci=(0,$e.Z)(xn=>{var an;return(an=Xe!=null?Xe:wt)!==null&&an!==void 0?an:xn}),Ge=Ue.useContext(Pt.Z),be=Ye!=null?Ye:Ge,{status:Pe,hasFeedback:Ne,feedbackIcon:Ie}=(0,Ue.useContext)(Ft.aM),xe=(0,Me.F)(Pe,je),ct=te(ve)||!!Ne,Lt=(0,Ue.useRef)(ct);(0,Ue.useEffect)(()=>{var xn;ct&&Lt.current,Lt.current=ct},[ct]);const et=(0,vt.Z)(Wn,!0),it=xn=>{et(),dt==null||dt(xn)},Bt=xn=>{et(),Ze==null||Ze(xn)},Dt=xn=>{et(),Ve==null||Ve(xn)},ft=(Ne||Nt)&&Ue.createElement(Ue.Fragment,null,Nt,Ne&&Ie);let $t;return typeof at=="object"&&(at!=null&&at.clearIcon)?$t=at:at&&($t={clearIcon:Ue.createElement(le.Z,null)}),un(Ue.createElement(ut.default,Object.assign({ref:(0,We.sQ)(Ee,Wn),prefixCls:ln,autoComplete:en==null?void 0:en.autoComplete},vn,{disabled:be,onBlur:it,onFocus:Bt,style:Object.assign(Object.assign({},en==null?void 0:en.style),Gt),styles:Object.assign(Object.assign({},en==null?void 0:en.styles),At),suffix:ft,allowClear:$t,className:He()(Ot,qe,jn,en==null?void 0:en.className),onChange:Dt,addonAfter:kt&&Ue.createElement(lt.BR,null,Ue.createElement(Ft.Ux,{override:!0,status:!0},kt)),addonBefore:xt&&Ue.createElement(lt.BR,null,Ue.createElement(Ft.Ux,{override:!0,status:!0},xt)),classNames:Object.assign(Object.assign(Object.assign({},_t),en==null?void 0:en.classNames),{input:He()({[`${ln}-sm`]:ci==="small",[`${ln}-lg`]:ci==="large",[`${ln}-rtl`]:jt==="rtl",[`${ln}-borderless`]:!ze},!ct&&(0,Me.Z)(ln,xe),_t==null?void 0:_t.input,(Be=en==null?void 0:en.classNames)===null||Be===void 0?void 0:Be.input,kn)}),classes:{affixWrapper:He()({[`${ln}-affix-wrapper-sm`]:ci==="small",[`${ln}-affix-wrapper-lg`]:ci==="large",[`${ln}-affix-wrapper-rtl`]:jt==="rtl",[`${ln}-affix-wrapper-borderless`]:!ze},(0,Me.Z)(`${ln}-affix-wrapper`,xe,Ne),kn),wrapper:He()({[`${ln}-group-rtl`]:jt==="rtl"},kn),group:He()({[`${ln}-group-wrapper-sm`]:ci==="small",[`${ln}-group-wrapper-lg`]:ci==="large",[`${ln}-group-wrapper-rtl`]:jt==="rtl",[`${ln}-group-wrapper-disabled`]:be},(0,Me.Z)(`${ln}-group-wrapper`,xe,Ne),kn)}})))})},1643:function(On,mn,pe){"use strict";var le=pe(19248),Te=pe(92310),He=pe.n(Te),ut=pe(9296),We=pe(59301),Ue=pe(19080),Me=pe(36355),Ct=pe(1684),Pt=pe(19716),$e=pe(32441),Ft=pe(9432),lt=pe(9937),vt=function(te,ee){var de={};for(var se in te)Object.prototype.hasOwnProperty.call(te,se)&&ee.indexOf(se)<0&&(de[se]=te[se]);if(te!=null&&typeof Object.getOwnPropertySymbols=="function")for(var he=0,se=Object.getOwnPropertySymbols(te);he<se.length;he++)ee.indexOf(se[he])<0&&Object.prototype.propertyIsEnumerable.call(te,se[he])&&(de[se[he]]=te[se[he]]);return de};const Oe=(0,We.forwardRef)((te,ee)=>{const{prefixCls:de,bordered:se=!0,size:he,disabled:ve,status:Ee,allowClear:Be,showCount:Le,classNames:ze,rootClassName:je,className:Xe}=te,Ye=vt(te,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:dt,direction:Ze}=We.useContext(Me.E_),Nt=(0,Pt.Z)(he),at=We.useContext(Ct.Z),kt=ve!=null?ve:at,{status:xt,hasFeedback:Ot,feedbackIcon:Gt}=We.useContext($e.aM),At=(0,Ue.F)(xt,Ee),qe=We.useRef(null);We.useImperativeHandle(ee,()=>{var jt;return{resizableTextArea:(jt=qe.current)===null||jt===void 0?void 0:jt.resizableTextArea,focus:en=>{var ln,Wn;(0,Ft.n)((Wn=(ln=qe.current)===null||ln===void 0?void 0:ln.resizableTextArea)===null||Wn===void 0?void 0:Wn.textArea,en)},blur:()=>{var en;return(en=qe.current)===null||en===void 0?void 0:en.blur()}}});const Ve=dt("input",de);let _t;typeof Be=="object"&&(Be!=null&&Be.clearIcon)?_t=Be:Be&&(_t={clearIcon:We.createElement(le.Z,null)});const[vn,yn]=(0,lt.ZP)(Ve);return vn(We.createElement(ut.default,Object.assign({},Ye,{disabled:kt,allowClear:_t,className:He()(Xe,je),classes:{affixWrapper:He()(`${Ve}-textarea-affix-wrapper`,{[`${Ve}-affix-wrapper-rtl`]:Ze==="rtl",[`${Ve}-affix-wrapper-borderless`]:!se,[`${Ve}-affix-wrapper-sm`]:Nt==="small",[`${Ve}-affix-wrapper-lg`]:Nt==="large",[`${Ve}-textarea-show-count`]:Le},(0,Ue.Z)(`${Ve}-affix-wrapper`,At),yn)},classNames:Object.assign(Object.assign({},ze),{textarea:He()({[`${Ve}-borderless`]:!se,[`${Ve}-sm`]:Nt==="small",[`${Ve}-lg`]:Nt==="large"},(0,Ue.Z)(Ve,At),yn,ze==null?void 0:ze.textarea)}),prefixCls:Ve,suffix:Ot&&We.createElement("span",{className:`${Ve}-textarea-suffix`},Gt),showCount:Le,ref:qe})))});mn.Z=Oe},59412:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Te}});var le=pe(59301);function Te(He,ut){const We=(0,le.useRef)([]),Ue=()=>{We.current.push(setTimeout(()=>{var Me,Ct,Pt,$e;!((Me=He.current)===null||Me===void 0)&&Me.input&&((Ct=He.current)===null||Ct===void 0?void 0:Ct.input.getAttribute("type"))==="password"&&(!((Pt=He.current)===null||Pt===void 0)&&Pt.input.hasAttribute("value"))&&(($e=He.current)===null||$e===void 0||$e.input.removeAttribute("value"))}))};return(0,le.useEffect)(()=>(ut&&Ue(),()=>We.current.forEach(Me=>{Me&&clearTimeout(Me)})),[]),Ue}},92832:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return Nt}});var le=pe(92310),Te=pe.n(le),He=pe(59301),ut=pe(36355),We=pe(32441),Ue=pe(9937),Ct=at=>{const{getPrefixCls:kt,direction:xt}=(0,He.useContext)(ut.E_),{prefixCls:Ot,className:Gt}=at,At=kt("input-group",Ot),qe=kt("input"),[Ve,_t]=(0,Ue.ZP)(qe),vn=Te()(At,{[`${At}-lg`]:at.size==="large",[`${At}-sm`]:at.size==="small",[`${At}-compact`]:at.compact,[`${At}-rtl`]:xt==="rtl"},_t,Gt),yn=(0,He.useContext)(We.aM),jt=(0,He.useMemo)(()=>Object.assign(Object.assign({},yn),{isFormItemInput:!1}),[yn]);return Ve(He.createElement("span",{className:vn,style:at.style,onMouseEnter:at.onMouseEnter,onMouseLeave:at.onMouseLeave,onFocus:at.onFocus,onBlur:at.onBlur},He.createElement(We.aM.Provider,{value:jt},at.children)))},Pt=pe(9432),$e=pe(73331),Ft=pe(15277),lt=pe(2738),vt=pe(8654),Oe=pe(59412),te=function(at,kt){var xt={};for(var Ot in at)Object.prototype.hasOwnProperty.call(at,Ot)&&kt.indexOf(Ot)<0&&(xt[Ot]=at[Ot]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,Ot=Object.getOwnPropertySymbols(at);Gt<Ot.length;Gt++)kt.indexOf(Ot[Gt])<0&&Object.prototype.propertyIsEnumerable.call(at,Ot[Gt])&&(xt[Ot[Gt]]=at[Ot[Gt]]);return xt};const ee=at=>at?He.createElement(Ft.Z,null):He.createElement($e.Z,null),de={click:"onClick",hover:"onMouseOver"};var he=He.forwardRef((at,kt)=>{const{visibilityToggle:xt=!0}=at,Ot=typeof xt=="object"&&xt.visible!==void 0,[Gt,At]=(0,He.useState)(()=>Ot?xt.visible:!1),qe=(0,He.useRef)(null);He.useEffect(()=>{Ot&&At(xt.visible)},[Ot,xt]);const Ve=(0,Oe.Z)(qe),_t=()=>{const{disabled:be}=at;be||(Gt&&Ve(),At(Pe=>{var Ne;const Ie=!Pe;return typeof xt=="object"&&((Ne=xt.onVisibleChange)===null||Ne===void 0||Ne.call(xt,Ie)),Ie}))},vn=be=>{const{action:Pe="click",iconRender:Ne=ee}=at,Ie=de[Pe]||"",xe=Ne(Gt),ct={[Ie]:_t,className:`${be}-icon`,key:"passwordIcon",onMouseDown:Lt=>{Lt.preventDefault()},onMouseUp:Lt=>{Lt.preventDefault()}};return He.cloneElement(He.isValidElement(xe)?xe:He.createElement("span",null,xe),ct)},{className:yn,prefixCls:jt,inputPrefixCls:en,size:ln}=at,Wn=te(at,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:un}=He.useContext(ut.E_),kn=un("input",en),wt=un("input-password",jt),jn=xt&&vn(wt),ci=Te()(wt,yn,{[`${wt}-${ln}`]:!!ln}),Ge=Object.assign(Object.assign({},(0,lt.Z)(Wn,["suffix","iconRender","visibilityToggle"])),{type:Gt?"text":"password",className:ci,prefixCls:kn,suffix:jn});return ln&&(Ge.size=ln),He.createElement(Pt.Z,Object.assign({ref:(0,vt.sQ)(kt,qe)},Ge))}),ve=pe(47472),Ee=pe(92343),Be=pe(3113),Le=pe(19716),ze=pe(33234),je=function(at,kt){var xt={};for(var Ot in at)Object.prototype.hasOwnProperty.call(at,Ot)&&kt.indexOf(Ot)<0&&(xt[Ot]=at[Ot]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,Ot=Object.getOwnPropertySymbols(at);Gt<Ot.length;Gt++)kt.indexOf(Ot[Gt])<0&&Object.prototype.propertyIsEnumerable.call(at,Ot[Gt])&&(xt[Ot[Gt]]=at[Ot[Gt]]);return xt},Ye=He.forwardRef((at,kt)=>{const{prefixCls:xt,inputPrefixCls:Ot,className:Gt,size:At,suffix:qe,enterButton:Ve=!1,addonAfter:_t,loading:vn,disabled:yn,onSearch:jt,onChange:en,onCompositionStart:ln,onCompositionEnd:Wn}=at,un=je(at,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:kn,direction:wt}=He.useContext(ut.E_),jn=He.useRef(!1),ci=kn("input-search",xt),Ge=kn("input",Ot),{compactSize:be}=(0,ze.ri)(ci,wt),Pe=(0,Le.Z)(Jt=>{var Tn;return(Tn=At!=null?At:be)!==null&&Tn!==void 0?Tn:Jt}),Ne=He.useRef(null),Ie=Jt=>{Jt&&Jt.target&&Jt.type==="click"&&jt&&jt(Jt.target.value,Jt,{source:"clear"}),en&&en(Jt)},xe=Jt=>{var Tn;document.activeElement===((Tn=Ne.current)===null||Tn===void 0?void 0:Tn.input)&&Jt.preventDefault()},ct=Jt=>{var Tn,Kn;jt&&jt((Kn=(Tn=Ne.current)===null||Tn===void 0?void 0:Tn.input)===null||Kn===void 0?void 0:Kn.value,Jt,{source:"input"})},Lt=Jt=>{jn.current||vn||ct(Jt)},et=typeof Ve=="boolean"?He.createElement(ve.Z,null):null,it=`${ci}-button`;let Bt;const Dt=Ve||{},ft=Dt.type&&Dt.type.__ANT_BUTTON===!0;ft||Dt.type==="button"?Bt=(0,Ee.Tm)(Dt,Object.assign({onMouseDown:xe,onClick:Jt=>{var Tn,Kn;(Kn=(Tn=Dt==null?void 0:Dt.props)===null||Tn===void 0?void 0:Tn.onClick)===null||Kn===void 0||Kn.call(Tn,Jt),ct(Jt)},key:"enterButton"},ft?{className:it,size:Pe}:{})):Bt=He.createElement(Be.ZP,{className:it,type:Ve?"primary":void 0,size:Pe,disabled:yn,key:"enterButton",onMouseDown:xe,onClick:ct,loading:vn,icon:et},Ve),_t&&(Bt=[Bt,(0,Ee.Tm)(_t,{key:"addonAfter"})]);const $t=Te()(ci,{[`${ci}-rtl`]:wt==="rtl",[`${ci}-${Pe}`]:!!Pe,[`${ci}-with-button`]:!!Ve},Gt),xn=Jt=>{jn.current=!0,ln==null||ln(Jt)},an=Jt=>{jn.current=!1,Wn==null||Wn(Jt)};return He.createElement(Pt.Z,Object.assign({ref:(0,vt.sQ)(Ne,kt),onPressEnter:Lt},un,{size:Pe,onCompositionStart:xn,onCompositionEnd:an,prefixCls:Ge,addonAfter:Bt,suffix:qe,onChange:Ie,className:$t,disabled:yn}))}),dt=pe(1643);const Ze=Pt.Z;Ze.Group=Ct,Ze.Search=Ye,Ze.TextArea=dt.Z,Ze.Password=he;var Nt=Ze},45818:function(On,mn,pe){"use strict";pe.d(mn,{D:function(){return ve},Z:function(){return Le}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function(je,Xe){return Te.createElement(We.Z,(0,le.Z)({},je,{ref:Xe,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me,Pt=pe(33853),$e=pe(38819),Ft=pe(92310),lt=pe.n(Ft),vt=pe(2738),te=ze=>!isNaN(parseFloat(ze))&&isFinite(ze),ee=pe(36355),de=pe(84966),se=function(ze,je){var Xe={};for(var Ye in ze)Object.prototype.hasOwnProperty.call(ze,Ye)&&je.indexOf(Ye)<0&&(Xe[Ye]=ze[Ye]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Ye=Object.getOwnPropertySymbols(ze);dt<Ye.length;dt++)je.indexOf(Ye[dt])<0&&Object.prototype.propertyIsEnumerable.call(ze,Ye[dt])&&(Xe[Ye[dt]]=ze[Ye[dt]]);return Xe};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 ze=0;return function(){let je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return ze+=1,`${je}${ze}`}})();var Le=Te.forwardRef((ze,je)=>{const{prefixCls:Xe,className:Ye,trigger:dt,children:Ze,defaultCollapsed:Nt=!1,theme:at="dark",style:kt={},collapsible:xt=!1,reverseArrow:Ot=!1,width:Gt=200,collapsedWidth:At=80,zeroWidthTriggerStyle:qe,breakpoint:Ve,onCollapse:_t,onBreakpoint:vn}=ze,yn=se(ze,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:jt}=(0,Te.useContext)(de.Gs),[en,ln]=(0,Te.useState)("collapsed"in ze?ze.collapsed:Nt),[Wn,un]=(0,Te.useState)(!1);(0,Te.useEffect)(()=>{"collapsed"in ze&&ln(ze.collapsed)},[ze.collapsed]);const kn=(Pe,Ne)=>{"collapsed"in ze||ln(Pe),_t==null||_t(Pe,Ne)},wt=(0,Te.useRef)();wt.current=Pe=>{un(Pe.matches),vn==null||vn(Pe.matches),en!==Pe.matches&&kn(Pe.matches,"responsive")},(0,Te.useEffect)(()=>{function Pe(Ie){return wt.current(Ie)}let Ne;if(typeof window!="undefined"){const{matchMedia:Ie}=window;if(Ie&&Ve&&Ve in he){Ne=Ie(`(max-width: ${he[Ve]})`);try{Ne.addEventListener("change",Pe)}catch(xe){Ne.addListener(Pe)}Pe(Ne)}}return()=>{try{Ne==null||Ne.removeEventListener("change",Pe)}catch(Ie){Ne==null||Ne.removeListener(Pe)}}},[Ve]),(0,Te.useEffect)(()=>{const Pe=Ee("ant-sider-");return jt.addSider(Pe),()=>jt.removeSider(Pe)},[]);const jn=()=>{kn(!en,"clickTrigger")},{getPrefixCls:ci}=(0,Te.useContext)(ee.E_),Ge=()=>{const Pe=ci("layout-sider",Xe),Ne=(0,vt.Z)(yn,["collapsed"]),Ie=en?At:Gt,xe=te(Ie)?`${Ie}px`:String(Ie),ct=parseFloat(String(At||0))===0?Te.createElement("span",{onClick:jn,className:lt()(`${Pe}-zero-width-trigger`,`${Pe}-zero-width-trigger-${Ot?"right":"left"}`),style:qe},dt||Te.createElement(Ct,null)):null,it={expanded:Ot?Te.createElement($e.Z,null):Te.createElement(Pt.Z,null),collapsed:Ot?Te.createElement(Pt.Z,null):Te.createElement($e.Z,null)}[en?"collapsed":"expanded"],Bt=dt!==null?ct||Te.createElement("div",{className:`${Pe}-trigger`,onClick:jn,style:{width:xe}},dt||it):null,Dt=Object.assign(Object.assign({},kt),{flex:`0 0 ${xe}`,maxWidth:xe,minWidth:xe,width:xe}),ft=lt()(Pe,`${Pe}-${at}`,{[`${Pe}-collapsed`]:!!en,[`${Pe}-has-trigger`]:xt&&dt!==null&&!ct,[`${Pe}-below`]:!!Wn,[`${Pe}-zero-width`]:parseFloat(xe)===0},Ye);return Te.createElement("aside",Object.assign({className:ft},Ne,{style:Dt,ref:je}),Te.createElement("div",{className:`${Pe}-children`},Ze),xt||Wn&&ct?Bt:null)},be=Te.useMemo(()=>({siderCollapsed:en}),[en]);return Te.createElement(ve.Provider,{value:be},Ge())})},84966:function(On,mn,pe){"use strict";pe.d(mn,{VY:function(){return ve},$_:function(){return he},h4:function(){return se},Gs:function(){return vt},ZP:function(){return Ee}});var le=pe(26407),Te=pe(92310),He=pe.n(Te),ut=pe(2738),We=pe(59301),Ue=pe(36355),Me=pe(83116),Pt=Be=>{const{componentCls:Le,bodyBg:ze,lightSiderBg:je,lightTriggerBg:Xe,lightTriggerColor:Ye}=Be;return{[`${Le}-sider-light`]:{background:je,[`${Le}-sider-trigger`]:{color:Ye,background:Xe},[`${Le}-sider-zero-width-trigger`]:{color:Ye,background:Xe,border:`1px solid ${ze}`,borderInlineStart:0}}}};const $e=Be=>{const{antCls:Le,componentCls:ze,colorText:je,triggerColor:Xe,footerBg:Ye,triggerBg:dt,headerHeight:Ze,headerPadding:Nt,headerColor:at,footerPadding:kt,triggerHeight:xt,zeroTriggerHeight:Ot,zeroTriggerWidth:Gt,motionDurationMid:At,motionDurationSlow:qe,fontSize:Ve,borderRadius:_t,bodyBg:vn,headerBg:yn,siderBg:jt}=Be;return{[ze]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:vn,"&, *":{boxSizing:"border-box"},[`&${ze}-has-sider`]:{flexDirection:"row",[`> ${ze}, > ${ze}-content`]:{width:0}},[`${ze}-header, &${ze}-footer`]:{flex:"0 0 auto"},[`${ze}-sider`]:{position:"relative",minWidth:0,background:jt,transition:`all ${At}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Le}-menu${Le}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:xt},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:xt,color:Xe,lineHeight:`${xt}px`,textAlign:"center",background:dt,cursor:"pointer",transition:`all ${At}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ze,insetInlineEnd:-Gt,zIndex:1,width:Gt,height:Ot,color:Xe,fontSize:Be.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:jt,borderStartStartRadius:0,borderStartEndRadius:_t,borderEndEndRadius:_t,borderEndStartRadius:0,cursor:"pointer",transition:`background ${qe} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${qe}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-Gt,borderStartStartRadius:_t,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:_t}}}}},Pt(Be)),{"&-rtl":{direction:"rtl"}}),[`${ze}-header`]:{height:Ze,padding:Nt,color:at,lineHeight:`${Ze}px`,background:yn,[`${Le}-menu`]:{lineHeight:"inherit"}},[`${ze}-footer`]:{padding:kt,color:je,fontSize:Ve,background:Ye},[`${ze}-content`]:{flex:"auto",minHeight:0}}};var Ft=(0,Me.Z)("Layout",Be=>[$e(Be)],Be=>{const{colorBgLayout:Le,controlHeight:ze,controlHeightLG:je,colorText:Xe,controlHeightSM:Ye,marginXXS:dt,colorTextLightSolid:Ze,colorBgContainer:Nt}=Be,at=je*1.25;return{colorBgHeader:"#001529",colorBgBody:Le,colorBgTrigger:"#002140",bodyBg:Le,headerBg:"#001529",headerHeight:ze*2,headerPadding:`0 ${at}px`,headerColor:Xe,footerPadding:`${Ye}px ${at}px`,footerBg:Le,siderBg:"#001529",triggerHeight:je+dt*2,triggerBg:"#002140",triggerColor:Ze,zeroTriggerWidth:je,zeroTriggerHeight:je,lightSiderBg:Nt,lightTriggerBg:Nt,lightTriggerColor:Xe}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),lt=function(Be,Le){var ze={};for(var je in Be)Object.prototype.hasOwnProperty.call(Be,je)&&Le.indexOf(je)<0&&(ze[je]=Be[je]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Xe=0,je=Object.getOwnPropertySymbols(Be);Xe<je.length;Xe++)Le.indexOf(je[Xe])<0&&Object.prototype.propertyIsEnumerable.call(Be,je[Xe])&&(ze[je[Xe]]=Be[je[Xe]]);return ze};const vt=We.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function Oe(Be){let{suffixCls:Le,tagName:ze,displayName:je}=Be;return Xe=>We.forwardRef((dt,Ze)=>We.createElement(Xe,Object.assign({ref:Ze,suffixCls:Le,tagName:ze},dt)))}const te=We.forwardRef((Be,Le)=>{const{prefixCls:ze,suffixCls:je,className:Xe,tagName:Ye}=Be,dt=lt(Be,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ze}=We.useContext(Ue.E_),Nt=Ze("layout",ze),[at,kt]=Ft(Nt),xt=je?`${Nt}-${je}`:Nt;return at(We.createElement(Ye,Object.assign({className:He()(ze||xt,Xe,kt),ref:Le},dt)))}),ee=We.forwardRef((Be,Le)=>{const{direction:ze}=We.useContext(Ue.E_),[je,Xe]=We.useState([]),{prefixCls:Ye,className:dt,rootClassName:Ze,children:Nt,hasSider:at,tagName:kt,style:xt}=Be,Ot=lt(Be,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),Gt=(0,ut.Z)(Ot,["suffixCls"]),{getPrefixCls:At,layout:qe}=We.useContext(Ue.E_),Ve=At("layout",Ye),[_t,vn]=Ft(Ve),yn=He()(Ve,{[`${Ve}-has-sider`]:typeof at=="boolean"?at:je.length>0,[`${Ve}-rtl`]:ze==="rtl"},qe==null?void 0:qe.className,dt,Ze,vn),jt=We.useMemo(()=>({siderHook:{addSider:en=>{Xe(ln=>[].concat((0,le.Z)(ln),[en]))},removeSider:en=>{Xe(ln=>ln.filter(Wn=>Wn!==en))}}}),[]);return _t(We.createElement(vt.Provider,{value:jt},We.createElement(kt,Object.assign({ref:Le,className:yn,style:Object.assign(Object.assign({},qe==null?void 0:qe.style),xt)},Gt),Nt)))}),de=Oe({tagName:"div",displayName:"Layout"})(ee),se=Oe({suffixCls:"header",tagName:"header",displayName:"Header"})(te),he=Oe({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(te),ve=Oe({suffixCls:"content",tagName:"main",displayName:"Content"})(te);var Ee=de},40875:function(On,mn,pe){"use strict";pe.d(mn,{J:function(){return Ue}});var le=pe(59301),Te=pe(33234),He=pe(70425),ut=function(Me,Ct){var Pt={};for(var $e in Me)Object.prototype.hasOwnProperty.call(Me,$e)&&Ct.indexOf($e)<0&&(Pt[$e]=Me[$e]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ft=0,$e=Object.getOwnPropertySymbols(Me);Ft<$e.length;Ft++)Ct.indexOf($e[Ft])<0&&Object.prototype.propertyIsEnumerable.call(Me,$e[Ft])&&(Pt[$e[Ft]]=Me[$e[Ft]]);return Pt};const We=le.createContext(null),Ue=le.forwardRef((Me,Ct)=>{const{children:Pt}=Me,$e=ut(Me,["children"]),Ft=le.useContext(We),lt=le.useMemo(()=>Object.assign(Object.assign({},Ft),$e),[Ft,$e.prefixCls,$e.mode,$e.selectable]);return le.createElement(We.Provider,{value:lt},le.createElement(Te.BR,null,(0,He.supportNodeRef)(Pt)?le.cloneElement(Pt,{ref:Ct}):Pt))});mn.Z=We},20834:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return be}});var le=pe(15285),Te=pe(59301),He=pe(45818),ut=pe(92310),We=pe.n(ut),Ue=pe(36355),Me=function(Pe,Ne){var Ie={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ne.indexOf(xe)<0&&(Ie[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,xe=Object.getOwnPropertySymbols(Pe);ct<xe.length;ct++)Ne.indexOf(xe[ct])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ct])&&(Ie[xe[ct]]=Pe[xe[ct]]);return Ie},Pt=Pe=>{const{prefixCls:Ne,className:Ie,dashed:xe}=Pe,ct=Me(Pe,["prefixCls","className","dashed"]),{getPrefixCls:Lt}=Te.useContext(Ue.E_),et=Lt("menu",Ne),it=We()({[`${et}-item-divider-dashed`]:!!xe},Ie);return Te.createElement(le.iz,Object.assign({className:it},ct))},$e=pe(11592),Ft=pe(2738),lt=pe(6848),vt=pe(92343),te=(0,Te.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),de=Pe=>{var Ne;const{className:Ie,children:xe,icon:ct,title:Lt,danger:et}=Pe,{prefixCls:it,firstLevel:Bt,direction:Dt,disableMenuItemTitleTooltip:ft,inlineCollapsed:$t}=Te.useContext(te),xn=Qn=>{const pi=Te.createElement("span",{className:`${it}-title-content`},xe);return(!ct||(0,vt.l$)(xe)&&xe.type==="span")&&xe&&Qn&&Bt&&typeof xe=="string"?Te.createElement("div",{className:`${it}-inline-collapsed-noicon`},xe.charAt(0)):pi},{siderCollapsed:an}=Te.useContext(He.D);let Jt=Lt;typeof Lt=="undefined"?Jt=Bt?xe:"":Lt===!1&&(Jt="");const Tn={title:Jt};!an&&!$t&&(Tn.title=null,Tn.open=!1);const Kn=(0,$e.Z)(xe).length;let dn=Te.createElement(le.ck,Object.assign({},(0,Ft.Z)(Pe,["title","icon","danger"]),{className:We()({[`${it}-item-danger`]:et,[`${it}-item-only-child`]:(ct?Kn+1:Kn)===1},Ie),title:typeof Lt=="string"?Lt:void 0}),(0,vt.Tm)(ct,{className:We()((0,vt.l$)(ct)?(Ne=ct.props)===null||Ne===void 0?void 0:Ne.className:"",`${it}-item-icon`)}),xn($t));return ft||(dn=Te.createElement(lt.Z,Object.assign({},Tn,{placement:Dt==="rtl"?"left":"right",overlayClassName:`${it}-inline-collapsed-tooltip`}),dn)),dn},he=Pe=>{var Ne;const{popupClassName:Ie,icon:xe,title:ct,theme:Lt}=Pe,et=Te.useContext(te),{prefixCls:it,inlineCollapsed:Bt,theme:Dt}=et,ft=(0,le.Xl)();let $t;if(!xe)$t=Bt&&!ft.length&&ct&&typeof ct=="string"?Te.createElement("div",{className:`${it}-inline-collapsed-noicon`},ct.charAt(0)):Te.createElement("span",{className:`${it}-title-content`},ct);else{const an=(0,vt.l$)(ct)&&ct.type==="span";$t=Te.createElement(Te.Fragment,null,(0,vt.Tm)(xe,{className:We()((0,vt.l$)(xe)?(Ne=xe.props)===null||Ne===void 0?void 0:Ne.className:"",`${it}-item-icon`)}),an?ct:Te.createElement("span",{className:`${it}-title-content`},ct))}const xn=Te.useMemo(()=>Object.assign(Object.assign({},et),{firstLevel:!1}),[et]);return Te.createElement(te.Provider,{value:xn},Te.createElement(le.Wd,Object.assign({},(0,Ft.Z)(Pe,["icon"]),{title:$t,popupClassName:We()(it,Ie,`${it}-${Lt||Dt}`)})))},ve=pe(18785),Ee=pe(70425),Be=pe(62892),Le=pe(40875),ze=function(Pe,Ne){var Ie={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ne.indexOf(xe)<0&&(Ie[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,xe=Object.getOwnPropertySymbols(Pe);ct<xe.length;ct++)Ne.indexOf(xe[ct])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ct])&&(Ie[xe[ct]]=Pe[xe[ct]]);return Ie};function je(Pe){return(Pe||[]).map((Ne,Ie)=>{if(Ne&&typeof Ne=="object"){const xe=Ne,{label:ct,children:Lt,key:et,type:it}=xe,Bt=ze(xe,["label","children","key","type"]),Dt=et!=null?et:`tmp-${Ie}`;return Lt||it==="group"?it==="group"?Te.createElement(le.BW,Object.assign({key:Dt},Bt,{title:ct}),je(Lt)):Te.createElement(he,Object.assign({key:Dt},Bt,{title:ct}),je(Lt)):it==="divider"?Te.createElement(Pt,Object.assign({key:Dt},Bt)):Te.createElement(de,Object.assign({key:Dt},Bt),ct)}return null}).filter(Ne=>Ne)}function Xe(Pe){return Te.useMemo(()=>Pe&&je(Pe),[Pe])}var Ye=pe(64993),dt=pe(17313),Ze=pe(8378),Nt=pe(13826),at=pe(29878),kt=pe(83116),xt=pe(37613),Gt=Pe=>{const{componentCls:Ne,motionDurationSlow:Ie,horizontalLineHeight:xe,colorSplit:ct,lineWidth:Lt,lineType:et,itemPaddingInline:it}=Pe;return{[`${Ne}-horizontal`]:{lineHeight:xe,border:0,borderBottom:`${Lt}px ${et} ${ct}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${Ne}-item, ${Ne}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:it},[`> ${Ne}-item:hover,
> ${Ne}-item-active,
> ${Ne}-submenu ${Ne}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${Ne}-item, ${Ne}-submenu-title`]:{transition:[`border-color ${Ie}`,`background ${Ie}`].join(",")},[`${Ne}-submenu-arrow`]:{display:"none"}}}},qe=Pe=>{let{componentCls:Ne,menuArrowOffset:Ie}=Pe;return{[`${Ne}-rtl`]:{direction:"rtl"},[`${Ne}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${Ne}-rtl${Ne}-vertical,
${Ne}-submenu-rtl ${Ne}-vertical`]:{[`${Ne}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${Ie})`},"&::after":{transform:`rotate(45deg) translateY(${Ie})`}}}}};const Ve=Pe=>Object.assign({},(0,dt.oN)(Pe));var vn=(Pe,Ne)=>{const{componentCls:Ie,itemColor:xe,itemSelectedColor:ct,groupTitleColor:Lt,itemBg:et,subMenuItemBg:it,itemSelectedBg:Bt,activeBarHeight:Dt,activeBarWidth:ft,activeBarBorderWidth:$t,motionDurationSlow:xn,motionEaseInOut:an,motionEaseOut:Jt,itemPaddingInline:Tn,motionDurationMid:Kn,itemHoverColor:dn,lineType:Qn,colorSplit:pi,itemDisabledColor:zn,dangerItemColor:Nn,dangerItemHoverColor:yi,dangerItemSelectedColor:Zi,dangerItemActiveBg:Hi,dangerItemSelectedBg:cr,itemHoverBg:br,itemActiveBg:gi,menuSubMenuBg:di,horizontalItemSelectedColor:wi,horizontalItemSelectedBg:Qi,horizontalItemBorderRadius:Li,horizontalItemHoverBg:ro,popupBg:fr}=Pe;return{[`${Ie}-${Ne}, ${Ie}-${Ne} > ${Ie}`]:{color:xe,background:et,[`&${Ie}-root:focus-visible`]:Object.assign({},Ve(Pe)),[`${Ie}-item-group-title`]:{color:Lt},[`${Ie}-submenu-selected`]:{[`> ${Ie}-submenu-title`]:{color:ct}},[`${Ie}-item-disabled, ${Ie}-submenu-disabled`]:{color:`${zn} !important`},[`${Ie}-item:not(${Ie}-item-selected):not(${Ie}-submenu-selected)`]:{[`&:hover, > ${Ie}-submenu-title:hover`]:{color:dn}},[`&:not(${Ie}-horizontal)`]:{[`${Ie}-item:not(${Ie}-item-selected)`]:{"&:hover":{backgroundColor:br},"&:active":{backgroundColor:gi}},[`${Ie}-submenu-title`]:{"&:hover":{backgroundColor:br},"&:active":{backgroundColor:gi}}},[`${Ie}-item-danger`]:{color:Nn,[`&${Ie}-item:hover`]:{[`&:not(${Ie}-item-selected):not(${Ie}-submenu-selected)`]:{color:yi}},[`&${Ie}-item:active`]:{background:Hi}},[`${Ie}-item a`]:{"&, &:hover":{color:"inherit"}},[`${Ie}-item-selected`]:{color:ct,[`&${Ie}-item-danger`]:{color:Zi},"a, a:hover":{color:"inherit"}},[`& ${Ie}-item-selected`]:{backgroundColor:Bt,[`&${Ie}-item-danger`]:{backgroundColor:cr}},[`${Ie}-item, ${Ie}-submenu-title`]:{[`&:not(${Ie}-item-disabled):focus-visible`]:Object.assign({},Ve(Pe))},[`&${Ie}-submenu > ${Ie}`]:{backgroundColor:di},[`&${Ie}-popup > ${Ie}`]:{backgroundColor:fr},[`&${Ie}-horizontal`]:Object.assign(Object.assign({},Ne==="dark"?{borderBottom:0}:{}),{[`> ${Ie}-item, > ${Ie}-submenu`]:{top:$t,marginTop:-$t,marginBottom:0,borderRadius:Li,"&::after":{position:"absolute",insetInline:Tn,bottom:0,borderBottom:`${Dt}px solid transparent`,transition:`border-color ${xn} ${an}`,content:'""'},"&:hover, &-active, &-open":{background:ro,"&::after":{borderBottomWidth:Dt,borderBottomColor:wi}},"&-selected":{color:wi,backgroundColor:Qi,"&:hover":{backgroundColor:Qi},"&::after":{borderBottomWidth:Dt,borderBottomColor:wi}}}}),[`&${Ie}-root`]:{[`&${Ie}-inline, &${Ie}-vertical`]:{borderInlineEnd:`${$t}px ${Qn} ${pi}`}},[`&${Ie}-inline`]:{[`${Ie}-sub${Ie}-inline`]:{background:it},[`${Ie}-item, ${Ie}-submenu-title`]:$t&&ft?{width:`calc(100% + ${$t}px)`}:{},[`${Ie}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ft}px solid ${ct}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${Kn} ${Jt}`,`opacity ${Kn} ${Jt}`].join(","),content:'""'},[`&${Ie}-item-danger`]:{"&::after":{borderInlineEndColor:Zi}}},[`${Ie}-selected, ${Ie}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${Kn} ${an}`,`opacity ${Kn} ${an}`].join(",")}}}}}};const yn=Pe=>{const{componentCls:Ne,itemHeight:Ie,itemMarginInline:xe,padding:ct,menuArrowSize:Lt,marginXS:et,itemMarginBlock:it}=Pe,Bt=ct+Lt+et;return{[`${Ne}-item`]:{position:"relative",overflow:"hidden"},[`${Ne}-item, ${Ne}-submenu-title`]:{height:Ie,lineHeight:`${Ie}px`,paddingInline:ct,overflow:"hidden",textOverflow:"ellipsis",marginInline:xe,marginBlock:it,width:`calc(100% - ${xe*2}px)`},[`> ${Ne}-item,
> ${Ne}-submenu > ${Ne}-submenu-title`]:{height:Ie,lineHeight:`${Ie}px`},[`${Ne}-item-group-list ${Ne}-submenu-title,
${Ne}-submenu-title`]:{paddingInlineEnd:Bt}}};var en=Pe=>{const{componentCls:Ne,iconCls:Ie,itemHeight:xe,colorTextLightSolid:ct,dropdownWidth:Lt,controlHeightLG:et,motionDurationMid:it,motionEaseOut:Bt,paddingXL:Dt,itemMarginInline:ft,fontSizeLG:$t,motionDurationSlow:xn,paddingXS:an,boxShadowSecondary:Jt,collapsedWidth:Tn,collapsedIconSize:Kn}=Pe,dn={height:xe,lineHeight:`${xe}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[Ne]:{"&-inline, &-vertical":Object.assign({[`&${Ne}-root`]:{boxShadow:"none"}},yn(Pe))},[`${Ne}-submenu-popup`]:{[`${Ne}-vertical`]:Object.assign(Object.assign({},yn(Pe)),{boxShadow:Jt})}},{[`${Ne}-submenu-popup ${Ne}-vertical${Ne}-sub`]:{minWidth:Lt,maxHeight:`calc(100vh - ${et*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${Ne}-inline`]:{width:"100%",[`&${Ne}-root`]:{[`${Ne}-item, ${Ne}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${xn}`,`background ${xn}`,`padding ${it} ${Bt}`].join(","),[`> ${Ne}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${Ne}-sub${Ne}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${Ne}-submenu > ${Ne}-submenu-title`]:dn,[`& ${Ne}-item-group-title`]:{paddingInlineStart:Dt}},[`${Ne}-item`]:dn}},{[`${Ne}-inline-collapsed`]:{width:Tn,[`&${Ne}-root`]:{[`${Ne}-item, ${Ne}-submenu ${Ne}-submenu-title`]:{[`> ${Ne}-inline-collapsed-noicon`]:{fontSize:$t,textAlign:"center"}}},[`> ${Ne}-item,
> ${Ne}-item-group > ${Ne}-item-group-list > ${Ne}-item,
> ${Ne}-item-group > ${Ne}-item-group-list > ${Ne}-submenu > ${Ne}-submenu-title,
> ${Ne}-submenu > ${Ne}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${$t/2}px - ${ft}px)`,textOverflow:"clip",[`
${Ne}-submenu-arrow,
${Ne}-submenu-expand-icon
`]:{opacity:0},[`${Ne}-item-icon, ${Ie}`]:{margin:0,fontSize:Kn,lineHeight:`${xe}px`,"+ span":{display:"inline-block",opacity:0}}},[`${Ne}-item-icon, ${Ie}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${Ne}-item-icon, ${Ie}`]:{display:"none"},"a, a:hover":{color:ct}},[`${Ne}-item-group-title`]:Object.assign(Object.assign({},dt.vS),{paddingInline:an})}}]};const ln=Pe=>{const{componentCls:Ne,motionDurationSlow:Ie,motionDurationMid:xe,motionEaseInOut:ct,motionEaseOut:Lt,iconCls:et,iconSize:it,iconMarginInlineEnd:Bt}=Pe;return{[`${Ne}-item, ${Ne}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${Ie}`,`background ${Ie}`,`padding ${Ie} ${ct}`].join(","),[`${Ne}-item-icon, ${et}`]:{minWidth:it,fontSize:it,transition:[`font-size ${xe} ${Lt}`,`margin ${Ie} ${ct}`,`color ${Ie}`].join(","),"+ span":{marginInlineStart:Bt,opacity:1,transition:[`opacity ${Ie} ${ct}`,`margin ${Ie}`,`color ${Ie}`].join(",")}},[`${Ne}-item-icon`]:Object.assign({},(0,dt.Ro)()),[`&${Ne}-item-only-child`]:{[`> ${et}, > ${Ne}-item-icon`]:{marginInlineEnd:0}}},[`${Ne}-item-disabled, ${Ne}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${Ne}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},Wn=Pe=>{const{componentCls:Ne,motionDurationSlow:Ie,motionEaseInOut:xe,borderRadius:ct,menuArrowSize:Lt,menuArrowOffset:et}=Pe;return{[`${Ne}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:Pe.margin,width:Lt,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${Ie} ${xe}, opacity ${Ie}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:Lt*.6,height:Lt*.15,backgroundColor:"currentcolor",borderRadius:ct,transition:[`background ${Ie} ${xe}`,`transform ${Ie} ${xe}`,`top ${Ie} ${xe}`,`color ${Ie} ${xe}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${et})`},"&::after":{transform:`rotate(-45deg) translateY(${et})`}}}}},un=Pe=>{const{antCls:Ne,componentCls:Ie,fontSize:xe,motionDurationSlow:ct,motionDurationMid:Lt,motionEaseInOut:et,paddingXS:it,padding:Bt,colorSplit:Dt,lineWidth:ft,zIndexPopup:$t,borderRadiusLG:xn,subMenuItemBorderRadius:an,menuArrowSize:Jt,menuArrowOffset:Tn,lineType:Kn,menuPanelMaskInset:dn,groupTitleLineHeight:Qn,groupTitleFontSize:pi}=Pe;return[{"":{[`${Ie}`]:Object.assign(Object.assign({},(0,dt.dF)()),{"&-hidden":{display:"none"}})},[`${Ie}-submenu-hidden`]:{display:"none"}},{[Ie]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,dt.Wf)(Pe)),(0,dt.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:xe,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${ct} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${Ie}-item`]:{flex:"none"}},[`${Ie}-item, ${Ie}-submenu, ${Ie}-submenu-title`]:{borderRadius:Pe.itemBorderRadius},[`${Ie}-item-group-title`]:{padding:`${it}px ${Bt}px`,fontSize:pi,lineHeight:Qn,transition:`all ${ct}`},[`&-horizontal ${Ie}-submenu`]:{transition:[`border-color ${ct} ${et}`,`background ${ct} ${et}`].join(",")},[`${Ie}-submenu, ${Ie}-submenu-inline`]:{transition:[`border-color ${ct} ${et}`,`background ${ct} ${et}`,`padding ${Lt} ${et}`].join(",")},[`${Ie}-submenu ${Ie}-sub`]:{cursor:"initial",transition:[`background ${ct} ${et}`,`padding ${ct} ${et}`].join(",")},[`${Ie}-title-content`]:{transition:`color ${ct}`},[`${Ie}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${Ie}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Dt,borderStyle:Kn,borderWidth:0,borderTopWidth:ft,marginBlock:ft,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ln(Pe)),{[`${Ie}-item-group`]:{[`${Ie}-item-group-list`]:{margin:0,padding:0,[`${Ie}-item, ${Ie}-submenu-title`]:{paddingInline:`${xe*2}px ${Bt}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:$t,borderRadius:xn,boxShadow:"none",transformOrigin:"0 0",[`&${Ie}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${dn}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:dn},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:Pe.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:Pe.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:Pe.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:Pe.paddingXS},[`> ${Ie}`]:Object.assign(Object.assign(Object.assign({borderRadius:xn},ln(Pe)),Wn(Pe)),{[`${Ie}-item, ${Ie}-submenu > ${Ie}-submenu-title`]:{borderRadius:an},[`${Ie}-submenu-title::after`]:{transition:`transform ${ct} ${et}`}})}}),Wn(Pe)),{[`&-inline-collapsed ${Ie}-submenu-arrow,
&-inline ${Ie}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${Tn})`},"&::after":{transform:`rotate(45deg) translateX(-${Tn})`}},[`${Ie}-submenu-open${Ie}-submenu-inline > ${Ie}-submenu-title > ${Ie}-submenu-arrow`]:{transform:`translateY(-${Jt*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${Tn})`},"&::before":{transform:`rotate(45deg) translateX(${Tn})`}}})},{[`${Ne}-layout-header`]:{[Ie]:{lineHeight:"inherit"}}}]};var kn=(Pe,Ne)=>(0,kt.Z)("Menu",xe=>{if(Ne===!1)return[];const{colorBgElevated:ct,colorPrimary:Lt,colorTextLightSolid:et,controlHeightLG:it,fontSize:Bt,darkItemColor:Dt,darkDangerItemColor:ft,darkItemBg:$t,darkSubMenuItemBg:xn,darkItemSelectedColor:an,darkItemSelectedBg:Jt,darkDangerItemSelectedBg:Tn,darkItemHoverBg:Kn,darkGroupTitleColor:dn,darkItemHoverColor:Qn,darkItemDisabledColor:pi,darkDangerItemHoverColor:zn,darkDangerItemSelectedColor:Nn,darkDangerItemActiveBg:yi}=xe,Zi=Bt/7*5,Hi=(0,xt.TS)(xe,{menuArrowSize:Zi,menuHorizontalHeight:it*1.15,menuArrowOffset:`${Zi*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:ct}),cr=(0,xt.TS)(Hi,{itemColor:Dt,itemHoverColor:Qn,groupTitleColor:dn,itemSelectedColor:an,itemBg:$t,popupBg:$t,subMenuItemBg:xn,itemActiveBg:"transparent",itemSelectedBg:Jt,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:Kn,itemDisabledColor:pi,dangerItemColor:ft,dangerItemHoverColor:zn,dangerItemSelectedColor:Nn,dangerItemActiveBg:yi,dangerItemSelectedBg:Tn,menuSubMenuBg:xn,horizontalItemSelectedColor:et,horizontalItemSelectedBg:Lt});return[un(Hi),Gt(Hi),en(Hi),vn(Hi,"light"),vn(cr,"dark"),qe(Hi),(0,Ze.Z)(Hi),(0,Nt.oN)(Hi,"slide-up"),(0,Nt.oN)(Hi,"slide-down"),(0,at._y)(Hi,"zoom-big")]},xe=>{const{colorPrimary:ct,colorError:Lt,colorTextDisabled:et,colorErrorBg:it,colorText:Bt,colorTextDescription:Dt,colorBgContainer:ft,colorFillAlter:$t,colorFillContent:xn,lineWidth:an,lineWidthBold:Jt,controlItemBgActive:Tn,colorBgTextHover:Kn,controlHeightLG:dn,lineHeight:Qn,colorBgElevated:pi,marginXXS:zn,padding:Nn,fontSize:yi,controlHeightSM:Zi,fontSizeLG:Hi,colorTextLightSolid:cr,colorErrorHover:br}=xe,gi=new Ye.C(cr).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:xe.zIndexPopupBase+50,radiusItem:xe.borderRadiusLG,itemBorderRadius:xe.borderRadiusLG,radiusSubMenuItem:xe.borderRadiusSM,subMenuItemBorderRadius:xe.borderRadiusSM,colorItemText:Bt,itemColor:Bt,colorItemTextHover:Bt,itemHoverColor:Bt,colorItemTextHoverHorizontal:ct,horizontalItemHoverColor:ct,colorGroupTitle:Dt,groupTitleColor:Dt,colorItemTextSelected:ct,itemSelectedColor:ct,colorItemTextSelectedHorizontal:ct,horizontalItemSelectedColor:ct,colorItemBg:ft,itemBg:ft,colorItemBgHover:Kn,itemHoverBg:Kn,colorItemBgActive:xn,itemActiveBg:Tn,colorSubItemBg:$t,subMenuItemBg:$t,colorItemBgSelected:Tn,itemSelectedBg:Tn,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Jt,activeBarHeight:Jt,colorActiveBarBorderSize:an,activeBarBorderWidth:an,colorItemTextDisabled:et,itemDisabledColor:et,colorDangerItemText:Lt,dangerItemColor:Lt,colorDangerItemTextHover:Lt,dangerItemHoverColor:Lt,colorDangerItemTextSelected:Lt,dangerItemSelectedColor:Lt,colorDangerItemBgActive:it,dangerItemActiveBg:it,colorDangerItemBgSelected:it,dangerItemSelectedBg:it,itemMarginInline:xe.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:dn,groupTitleLineHeight:Qn,collapsedWidth:dn*2,popupBg:pi,itemMarginBlock:zn,itemPaddingInline:Nn,horizontalLineHeight:`${dn*1.15}px`,iconSize:yi,iconMarginInlineEnd:Zi-yi,collapsedIconSize:Hi,groupTitleFontSize:yi,darkItemDisabledColor:new Ye.C(cr).setAlpha(.25).toRgbString(),darkItemColor:gi,darkDangerItemColor:Lt,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:cr,darkItemSelectedBg:ct,darkDangerItemSelectedBg:Lt,darkItemHoverBg:"transparent",darkGroupTitleColor:gi,darkItemHoverColor:cr,darkDangerItemHoverColor:br,darkDangerItemSelectedColor:cr,darkDangerItemActiveBg:Lt}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(Pe),wt=function(Pe,Ne){var Ie={};for(var xe in Pe)Object.prototype.hasOwnProperty.call(Pe,xe)&&Ne.indexOf(xe)<0&&(Ie[xe]=Pe[xe]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,xe=Object.getOwnPropertySymbols(Pe);ct<xe.length;ct++)Ne.indexOf(xe[ct])<0&&Object.prototype.propertyIsEnumerable.call(Pe,xe[ct])&&(Ie[xe[ct]]=Pe[xe[ct]]);return Ie},ci=(0,Te.forwardRef)((Pe,Ne)=>{var Ie,xe;const ct=Te.useContext(Le.Z),Lt=ct||{},{getPrefixCls:et,getPopupContainer:it,direction:Bt,menu:Dt}=Te.useContext(Ue.E_),ft=et(),{prefixCls:$t,className:xn,style:an,theme:Jt="light",expandIcon:Tn,_internalDisableMenuItemTitleTooltip:Kn,inlineCollapsed:dn,siderCollapsed:Qn,items:pi,children:zn,rootClassName:Nn,mode:yi,selectable:Zi,onClick:Hi,overflowedIndicatorPopupClassName:cr}=Pe,br=wt(Pe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),gi=(0,Ft.Z)(br,["collapsedWidth"]),di=Xe(pi)||zn;(Ie=Lt.validator)===null||Ie===void 0||Ie.call(Lt,{mode:yi});const wi=(0,Ee.useEvent)(function(){var qi;Hi==null||Hi.apply(void 0,arguments),(qi=Lt.onClick)===null||qi===void 0||qi.call(Lt)}),Qi=Lt.mode||yi,Li=Zi!=null?Zi:Lt.selectable,ro=Te.useMemo(()=>Qn!==void 0?Qn:dn,[dn,Qn]),fr={horizontal:{motionName:`${ft}-slide-up`},inline:(0,Be.Z)(ft),other:{motionName:`${ft}-zoom-big`}},Ae=et("menu",$t||Lt.prefixCls),[Ei,Sr]=kn(Ae,!ct),Fn=We()(`${Ae}-${Jt}`,Dt==null?void 0:Dt.className,xn);let xi;if(typeof Tn=="function")xi=Tn;else if(Tn===null||Tn===!1)xi=null;else if(Lt.expandIcon===null||Lt.expandIcon===!1)xi=null;else{const qi=Tn!=null?Tn:Lt.expandIcon;xi=(0,vt.Tm)(qi,{className:We()(`${Ae}-submenu-expand-icon`,(0,vt.l$)(qi)?(xe=qi.props)===null||xe===void 0?void 0:xe.className:"")})}const zi=Te.useMemo(()=>({prefixCls:Ae,inlineCollapsed:ro||!1,direction:Bt,firstLevel:!0,theme:Jt,mode:Qi,disableMenuItemTitleTooltip:Kn}),[Ae,ro,Bt,Kn,Jt]);return Ei(Te.createElement(Le.Z.Provider,{value:null},Te.createElement(te.Provider,{value:zi},Te.createElement(le.ZP,Object.assign({getPopupContainer:it,overflowedIndicator:Te.createElement(ve.Z,null),overflowedIndicatorPopupClassName:We()(Ae,`${Ae}-${Jt}`,cr),mode:Qi,selectable:Li,onClick:wi},gi,{inlineCollapsed:ro,style:Object.assign(Object.assign({},Dt==null?void 0:Dt.style),an),className:Fn,prefixCls:Ae,direction:Bt,defaultMotions:fr,expandIcon:xi,ref:Ne,rootClassName:We()(Nn,Sr)}),di))))});const Ge=(0,Te.forwardRef)((Pe,Ne)=>{const Ie=(0,Te.useRef)(null),xe=Te.useContext(He.D);return(0,Te.useImperativeHandle)(Ne,()=>({menu:Ie.current,focus:ct=>{var Lt;(Lt=Ie.current)===null||Lt===void 0||Lt.focus(ct)}})),Te.createElement(ci,Object.assign({ref:Ie},Pe,xe))});Ge.Item=de,Ge.SubMenu=he,Ge.Divider=Pt,Ge.ItemGroup=le.BW;var be=Ge},58421:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Lt}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function(it,Bt){return Te.createElement(We.Z,(0,le.Z)({},it,{ref:Bt,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me,Pt=pe(49198),$e=pe(33853),Ft=pe(38819),lt=pe(92310),vt=pe.n(lt),Oe=pe(400),te=pe(33708),ee=pe(6909),de=pe(4771),se=pe(9427),he=pe(25440),ve=pe(26112),Ee={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Be=Ee,Le=pe(91735),ze=function(et){(0,se.Z)(Bt,et);var it=(0,he.Z)(Bt);function Bt(){var Dt;(0,ee.Z)(this,Bt);for(var ft=arguments.length,$t=new Array(ft),xn=0;xn<ft;xn++)$t[xn]=arguments[xn];return Dt=it.call.apply(it,[this].concat($t)),Dt.state={goInputText:""},Dt.getValidValue=function(){var an=Dt.state.goInputText;return!an||Number.isNaN(an)?void 0:Number(an)},Dt.buildOptionText=function(an){return"".concat(an," ").concat(Dt.props.locale.items_per_page)},Dt.changeSize=function(an){Dt.props.changeSize(Number(an))},Dt.handleChange=function(an){Dt.setState({goInputText:an.target.value})},Dt.handleBlur=function(an){var Jt=Dt.props,Tn=Jt.goButton,Kn=Jt.quickGo,dn=Jt.rootPrefixCls,Qn=Dt.state.goInputText;Tn||Qn===""||(Dt.setState({goInputText:""}),!(an.relatedTarget&&(an.relatedTarget.className.indexOf("".concat(dn,"-item-link"))>=0||an.relatedTarget.className.indexOf("".concat(dn,"-item"))>=0))&&Kn(Dt.getValidValue()))},Dt.go=function(an){var Jt=Dt.state.goInputText;Jt!==""&&(an.keyCode===Be.ENTER||an.type==="click")&&(Dt.setState({goInputText:""}),Dt.props.quickGo(Dt.getValidValue()))},Dt}return(0,de.Z)(Bt,[{key:"getPageSizeOptions",value:function(){var ft=this.props,$t=ft.pageSize,xn=ft.pageSizeOptions;return xn.some(function(an){return an.toString()===$t.toString()})?xn:xn.concat([$t.toString()]).sort(function(an,Jt){var Tn=Number.isNaN(Number(an))?0:Number(an),Kn=Number.isNaN(Number(Jt))?0:Number(Jt);return Tn-Kn})}},{key:"render",value:function(){var ft=this,$t=this.props,xn=$t.pageSize,an=$t.locale,Jt=$t.rootPrefixCls,Tn=$t.changeSize,Kn=$t.quickGo,dn=$t.goButton,Qn=$t.selectComponentClass,pi=$t.buildOptionText,zn=$t.selectPrefixCls,Nn=$t.disabled,yi=this.state.goInputText,Zi="".concat(Jt,"-options"),Hi=Qn,cr=null,br=null,gi=null;if(!Tn&&!Kn)return null;var di=this.getPageSizeOptions();if(Tn&&Hi){var wi=di.map(function(Qi,Li){return Te.createElement(Hi.Option,{key:Li,value:Qi.toString()},(pi||ft.buildOptionText)(Qi))});cr=Te.createElement(Hi,{disabled:Nn,prefixCls:zn,showSearch:!1,className:"".concat(Zi,"-size-changer"),optionLabelProp:"children",popupMatchSelectWidth:!1,value:(xn||di[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Li){return Li.parentNode},"aria-label":an.page_size,defaultOpen:!1},wi)}return Kn&&(dn&&(gi=typeof dn=="boolean"?Te.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Nn,className:"".concat(Zi,"-quick-jumper-button")},an.jump_to_confirm):Te.createElement("span",{onClick:this.go,onKeyUp:this.go},dn)),br=Te.createElement("div",{className:"".concat(Zi,"-quick-jumper")},an.jump_to,Te.createElement("input",{disabled:Nn,type:"text",value:yi,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":an.page}),an.page,gi)),Te.createElement("li",{className:"".concat(Zi)},cr,br)}}]),Bt}(Te.Component);ze.defaultProps={pageSizeOptions:["10","20","50","100"]};var je=ze,Xe=function(it){var Bt,Dt=it.rootPrefixCls,ft=it.page,$t=it.active,xn=it.className,an=it.showTitle,Jt=it.onClick,Tn=it.onKeyPress,Kn=it.itemRender,dn="".concat(Dt,"-item"),Qn=vt()(dn,"".concat(dn,"-").concat(ft),(Bt={},(0,Oe.Z)(Bt,"".concat(dn,"-active"),$t),(0,Oe.Z)(Bt,"".concat(dn,"-disabled"),!ft),(0,Oe.Z)(Bt,it.className,xn),Bt)),pi=function(){Jt(ft)},zn=function(Zi){Tn(Zi,Jt,ft)},Nn=Kn(ft,"page",Te.createElement("a",{rel:"nofollow"},ft));return Nn?Te.createElement("li",{title:an?ft.toString():null,className:Qn,onClick:pi,onKeyPress:zn,tabIndex:0},Nn):null},Ye=Xe;function dt(){}function Ze(et){var it=Number(et);return typeof it=="number"&&!Number.isNaN(it)&&isFinite(it)&&Math.floor(it)===it}var Nt=function(it,Bt,Dt){return Dt};function at(et,it,Bt){var Dt=typeof et=="undefined"?it.pageSize:et;return Math.floor((Bt.total-1)/Dt)+1}var kt=function(et){(0,se.Z)(Bt,et);var it=(0,he.Z)(Bt);function Bt(Dt){var ft;(0,ee.Z)(this,Bt),ft=it.call(this,Dt),ft.paginationNode=Te.createRef(),ft.getJumpPrevPage=function(){return Math.max(1,ft.state.current-(ft.props.showLessItems?3:5))},ft.getJumpNextPage=function(){return Math.min(at(void 0,ft.state,ft.props),ft.state.current+(ft.props.showLessItems?3:5))},ft.getItemIcon=function(Tn,Kn){var dn=ft.props.prefixCls,Qn=Tn||Te.createElement("button",{type:"button","aria-label":Kn,className:"".concat(dn,"-item-link")});return typeof Tn=="function"&&(Qn=Te.createElement(Tn,(0,te.Z)({},ft.props))),Qn},ft.isValid=function(Tn){var Kn=ft.props.total;return Ze(Tn)&&Tn!==ft.state.current&&Ze(Kn)&&Kn>0},ft.shouldDisplayQuickJumper=function(){var Tn=ft.props,Kn=Tn.showQuickJumper,dn=Tn.total,Qn=ft.state.pageSize;return dn<=Qn?!1:Kn},ft.handleKeyDown=function(Tn){(Tn.keyCode===Be.ARROW_UP||Tn.keyCode===Be.ARROW_DOWN)&&Tn.preventDefault()},ft.handleKeyUp=function(Tn){var Kn=ft.getValidValue(Tn),dn=ft.state.currentInputValue;Kn!==dn&&ft.setState({currentInputValue:Kn}),Tn.keyCode===Be.ENTER?ft.handleChange(Kn):Tn.keyCode===Be.ARROW_UP?ft.handleChange(Kn-1):Tn.keyCode===Be.ARROW_DOWN&&ft.handleChange(Kn+1)},ft.handleBlur=function(Tn){var Kn=ft.getValidValue(Tn);ft.handleChange(Kn)},ft.changePageSize=function(Tn){var Kn=ft.state.current,dn=at(Tn,ft.state,ft.props);Kn=Kn>dn?dn:Kn,dn===0&&(Kn=ft.state.current),typeof Tn=="number"&&("pageSize"in ft.props||ft.setState({pageSize:Tn}),"current"in ft.props||ft.setState({current:Kn,currentInputValue:Kn})),ft.props.onShowSizeChange(Kn,Tn),"onChange"in ft.props&&ft.props.onChange&&ft.props.onChange(Kn,Tn)},ft.handleChange=function(Tn){var Kn=ft.props,dn=Kn.disabled,Qn=Kn.onChange,pi=ft.state,zn=pi.pageSize,Nn=pi.current,yi=pi.currentInputValue;if(ft.isValid(Tn)&&!dn){var Zi=at(void 0,ft.state,ft.props),Hi=Tn;return Tn>Zi?Hi=Zi:Tn<1&&(Hi=1),"current"in ft.props||ft.setState({current:Hi}),Hi!==yi&&ft.setState({currentInputValue:Hi}),Qn(Hi,zn),Hi}return Nn},ft.prev=function(){ft.hasPrev()&&ft.handleChange(ft.state.current-1)},ft.next=function(){ft.hasNext()&&ft.handleChange(ft.state.current+1)},ft.jumpPrev=function(){ft.handleChange(ft.getJumpPrevPage())},ft.jumpNext=function(){ft.handleChange(ft.getJumpNextPage())},ft.hasPrev=function(){return ft.state.current>1},ft.hasNext=function(){return ft.state.current<at(void 0,ft.state,ft.props)},ft.runIfEnter=function(Tn,Kn){if(Tn.key==="Enter"||Tn.charCode===13){for(var dn=arguments.length,Qn=new Array(dn>2?dn-2:0),pi=2;pi<dn;pi++)Qn[pi-2]=arguments[pi];Kn.apply(void 0,Qn)}},ft.runIfEnterPrev=function(Tn){ft.runIfEnter(Tn,ft.prev)},ft.runIfEnterNext=function(Tn){ft.runIfEnter(Tn,ft.next)},ft.runIfEnterJumpPrev=function(Tn){ft.runIfEnter(Tn,ft.jumpPrev)},ft.runIfEnterJumpNext=function(Tn){ft.runIfEnter(Tn,ft.jumpNext)},ft.handleGoTO=function(Tn){(Tn.keyCode===Be.ENTER||Tn.type==="click")&&ft.handleChange(ft.state.currentInputValue)},ft.renderPrev=function(Tn){var Kn=ft.props,dn=Kn.prevIcon,Qn=Kn.itemRender,pi=Qn(Tn,"prev",ft.getItemIcon(dn,"prev page")),zn=!ft.hasPrev();return(0,Te.isValidElement)(pi)?(0,Te.cloneElement)(pi,{disabled:zn}):pi},ft.renderNext=function(Tn){var Kn=ft.props,dn=Kn.nextIcon,Qn=Kn.itemRender,pi=Qn(Tn,"next",ft.getItemIcon(dn,"next page")),zn=!ft.hasNext();return(0,Te.isValidElement)(pi)?(0,Te.cloneElement)(pi,{disabled:zn}):pi};var $t=Dt.onChange!==dt,xn="current"in Dt;xn&&!$t&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var an=Dt.defaultCurrent;"current"in Dt&&(an=Dt.current);var Jt=Dt.defaultPageSize;return"pageSize"in Dt&&(Jt=Dt.pageSize),an=Math.min(an,at(Jt,void 0,Dt)),ft.state={current:an,currentInputValue:an,pageSize:Jt},ft}return(0,de.Z)(Bt,[{key:"componentDidUpdate",value:function(ft,$t){var xn=this.props.prefixCls;if($t.current!==this.state.current&&this.paginationNode.current){var an=this.paginationNode.current.querySelector(".".concat(xn,"-item-").concat($t.current));if(an&&document.activeElement===an){var Jt;an==null||(Jt=an.blur)===null||Jt===void 0||Jt.call(an)}}}},{key:"getValidValue",value:function(ft){var $t=ft.target.value,xn=at(void 0,this.state,this.props),an=this.state.currentInputValue,Jt;return $t===""?Jt=$t:Number.isNaN(Number($t))?Jt=an:$t>=xn?Jt=xn:Jt=Number($t),Jt}},{key:"getShowSizeChanger",value:function(){var ft=this.props,$t=ft.showSizeChanger,xn=ft.total,an=ft.totalBoundaryShowSizeChanger;return typeof $t!="undefined"?$t:xn>an}},{key:"render",value:function(){var ft=this.props,$t=ft.prefixCls,xn=ft.className,an=ft.style,Jt=ft.disabled,Tn=ft.hideOnSinglePage,Kn=ft.total,dn=ft.locale,Qn=ft.showQuickJumper,pi=ft.showLessItems,zn=ft.showTitle,Nn=ft.showTotal,yi=ft.simple,Zi=ft.itemRender,Hi=ft.showPrevNextJumpers,cr=ft.jumpPrevIcon,br=ft.jumpNextIcon,gi=ft.selectComponentClass,di=ft.selectPrefixCls,wi=ft.pageSizeOptions,Qi=this.state,Li=Qi.current,ro=Qi.pageSize,fr=Qi.currentInputValue;if(Tn===!0&&Kn<=ro)return null;var Ae=at(void 0,this.state,this.props),Ei=[],Sr=null,Fn=null,xi=null,zi=null,qi=null,Gn=Qn&&Qn.goButton,ti=pi?1:2,Zt=Li-1>0?Li-1:0,Wt=Li+1<Ae?Li+1:Ae,Qe=(0,ve.Z)(this.props,{aria:!0,data:!0}),on=Nn&&Te.createElement("li",{className:"".concat($t,"-total-text")},Nn(Kn,[Kn===0?0:(Li-1)*ro+1,Li*ro>Kn?Kn:Li*ro]));if(yi){Gn&&(typeof Gn=="boolean"?qi=Te.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},dn.jump_to_confirm):qi=Te.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Gn),qi=Te.createElement("li",{title:zn?"".concat(dn.jump_to).concat(Li,"/").concat(Ae):null,className:"".concat($t,"-simple-pager")},qi));var cn=this.renderPrev(Zt);return Te.createElement("ul",(0,le.Z)({className:vt()($t,"".concat($t,"-simple"),(0,Oe.Z)({},"".concat($t,"-disabled"),Jt),xn),style:an,ref:this.paginationNode},Qe),on,cn?Te.createElement("li",{title:zn?dn.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:vt()("".concat($t,"-prev"),(0,Oe.Z)({},"".concat($t,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},cn):null,Te.createElement("li",{title:zn?"".concat(Li,"/").concat(Ae):null,className:"".concat($t,"-simple-pager")},Te.createElement("input",{type:"text",value:fr,disabled:Jt,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:3}),Te.createElement("span",{className:"".concat($t,"-slash")},"/"),Ae),Te.createElement("li",{title:zn?dn.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:vt()("".concat($t,"-next"),(0,Oe.Z)({},"".concat($t,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Wt)),qi)}if(Ae<=3+ti*2){var Mt={locale:dn,rootPrefixCls:$t,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:zn,itemRender:Zi};Ae||Ei.push(Te.createElement(Ye,(0,le.Z)({},Mt,{key:"noPager",page:1,className:"".concat($t,"-item-disabled")})));for(var ht=1;ht<=Ae;ht+=1){var nn=Li===ht;Ei.push(Te.createElement(Ye,(0,le.Z)({},Mt,{key:ht,page:ht,active:nn})))}}else{var gn=pi?dn.prev_3:dn.prev_5,_n=pi?dn.next_3:dn.next_5,qn=Zi(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(cr,"prev page")),Et=Zi(this.getJumpNextPage(),"jump-next",this.getItemIcon(br,"next page"));Hi&&(Sr=qn?Te.createElement("li",{title:zn?gn:null,key:"prev",onClick:this.jumpPrev,tabIndex:0,onKeyPress:this.runIfEnterJumpPrev,className:vt()("".concat($t,"-jump-prev"),(0,Oe.Z)({},"".concat($t,"-jump-prev-custom-icon"),!!cr))},qn):null,Fn=Et?Te.createElement("li",{title:zn?_n:null,key:"next",tabIndex:0,onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:vt()("".concat($t,"-jump-next"),(0,Oe.Z)({},"".concat($t,"-jump-next-custom-icon"),!!br))},Et):null),zi=Te.createElement(Ye,{locale:dn,last:!0,rootPrefixCls:$t,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ae,page:Ae,active:!1,showTitle:zn,itemRender:Zi}),xi=Te.createElement(Ye,{locale:dn,rootPrefixCls:$t,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:zn,itemRender:Zi});var Pn=Math.max(1,Li-ti),Xn=Math.min(Li+ti,Ae);Li-1<=ti&&(Xn=1+ti*2),Ae-Li<=ti&&(Pn=Ae-ti*2);for(var Ci=Pn;Ci<=Xn;Ci+=1){var tn=Li===Ci;Ei.push(Te.createElement(Ye,{locale:dn,rootPrefixCls:$t,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ci,page:Ci,active:tn,showTitle:zn,itemRender:Zi}))}Li-1>=ti*2&&Li!==3&&(Ei[0]=(0,Te.cloneElement)(Ei[0],{className:"".concat($t,"-item-after-jump-prev")}),Ei.unshift(Sr)),Ae-Li>=ti*2&&Li!==Ae-2&&(Ei[Ei.length-1]=(0,Te.cloneElement)(Ei[Ei.length-1],{className:"".concat($t,"-item-before-jump-next")}),Ei.push(Fn)),Pn!==1&&Ei.unshift(xi),Xn!==Ae&&Ei.push(zi)}var sn=!this.hasPrev()||!Ae,In=!this.hasNext()||!Ae,ji=this.renderPrev(Zt),Ai=this.renderNext(Wt);return Te.createElement("ul",(0,le.Z)({className:vt()($t,xn,(0,Oe.Z)({},"".concat($t,"-disabled"),Jt)),style:an,ref:this.paginationNode},Qe),on,ji?Te.createElement("li",{title:zn?dn.prev_page:null,onClick:this.prev,tabIndex:sn?null:0,onKeyPress:this.runIfEnterPrev,className:vt()("".concat($t,"-prev"),(0,Oe.Z)({},"".concat($t,"-disabled"),sn)),"aria-disabled":sn},ji):null,Ei,Ai?Te.createElement("li",{title:zn?dn.next_page:null,onClick:this.next,tabIndex:In?null:0,onKeyPress:this.runIfEnterNext,className:vt()("".concat($t,"-next"),(0,Oe.Z)({},"".concat($t,"-disabled"),In)),"aria-disabled":In},Ai):null,Te.createElement(je,{disabled:Jt,locale:dn,rootPrefixCls:$t,selectComponentClass:gi,selectPrefixCls:di,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Li,pageSize:ro,pageSizeOptions:wi,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Gn}))}}],[{key:"getDerivedStateFromProps",value:function(ft,$t){var xn={};if("current"in ft&&(xn.current=ft.current,ft.current!==$t.current&&(xn.currentInputValue=xn.current)),"pageSize"in ft&&ft.pageSize!==$t.pageSize){var an=$t.current,Jt=at(ft.pageSize,$t,ft);an=an>Jt?Jt:an,"current"in ft||(xn.current=an,xn.currentInputValue=an),xn.pageSize=ft.pageSize}return xn}}]),Bt}(Te.Component);kt.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:dt,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:dt,locale:Le.Z,style:{},itemRender:Nt,totalBoundaryShowSizeChanger:50};var xt=kt,Ot=pe(22075),Gt=pe(36355),At=pe(19716),qe=pe(8628),Ve=pe(9763),_t=pe(57809);const vn=et=>Te.createElement(_t.default,Object.assign({},et,{showSearch:!0,size:"small"})),yn=et=>Te.createElement(_t.default,Object.assign({},et,{showSearch:!0,size:"middle"}));vn.Option=_t.default.Option,yn.Option=_t.default.Option;var jt=pe(9937),en=pe(17313),ln=pe(83116),Wn=pe(37613);const un=et=>{const{componentCls:it}=et;return{[`${it}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${it}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${it}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed"}}},[`&${it}-disabled`]:{cursor:"not-allowed",[`${it}-item`]:{cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},a:{color:et.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:et.colorBorder,backgroundColor:et.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:et.itemActiveBgDisabled},a:{color:et.itemActiveColorDisabled}}},[`${it}-item-link`]:{color:et.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${it}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${it}-simple-pager`]:{color:et.colorTextDisabled},[`${it}-jump-prev, ${it}-jump-next`]:{[`${it}-item-link-icon`]:{opacity:0},[`${it}-item-ellipsis`]:{opacity:1}}},[`&${it}-simple`]:{[`${it}-prev, ${it}-next`]:{[`&${it}-disabled ${it}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},kn=et=>{const{componentCls:it}=et;return{[`&${it}-mini ${it}-total-text, &${it}-mini ${it}-simple-pager`]:{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`},[`&${it}-mini ${it}-item`]:{minWidth:et.itemSizeSM,height:et.itemSizeSM,margin:0,lineHeight:`${et.itemSizeSM-2}px`},[`&${it}-mini:not(${it}-disabled) ${it}-item:not(${it}-item-active)`]:{backgroundColor:"transparent",borderColor:"transparent","&:hover":{backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive}},[`&${it}-mini ${it}-prev, &${it}-mini ${it}-next`]:{minWidth:et.itemSizeSM,height:et.itemSizeSM,margin:0,lineHeight:`${et.itemSizeSM}px`},[`&${it}-mini:not(${it}-disabled)`]:{[`${it}-prev, ${it}-next`]:{[`&:hover ${it}-item-link`]:{backgroundColor:et.colorBgTextHover},[`&:active ${it}-item-link`]:{backgroundColor:et.colorBgTextActive},[`&${it}-disabled:hover ${it}-item-link`]:{backgroundColor:"transparent"}}},[`
&${it}-mini ${it}-prev ${it}-item-link,
&${it}-mini ${it}-next ${it}-item-link
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`}},[`&${it}-mini ${it}-jump-prev, &${it}-mini ${it}-jump-next`]:{height:et.itemSizeSM,marginInlineEnd:0,lineHeight:`${et.itemSizeSM}px`},[`&${it}-mini ${it}-options`]:{marginInlineStart:et.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:et.miniOptionsSizeChangerTop},"&-quick-jumper":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`,input:Object.assign(Object.assign({},(0,jt.x0)(et)),{width:et.paginationMiniQuickJumperInputWidth,height:et.controlHeightSM})}}}},wt=et=>{const{componentCls:it}=et;return{[`
&${it}-simple ${it}-prev,
&${it}-simple ${it}-next
`]:{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`,verticalAlign:"top",[`${it}-item-link`]:{height:et.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive},"&::after":{height:et.itemSizeSM,lineHeight:`${et.itemSizeSM}px`}}},[`&${it}-simple ${it}-simple-pager`]:{display:"inline-block",height:et.itemSizeSM,marginInlineEnd:et.marginXS,input:{boxSizing:"border-box",height:"100%",marginInlineEnd:et.marginXS,padding:`0 ${et.paginationItemPaddingInline}px`,textAlign:"center",backgroundColor:et.itemInputBg,border:`${et.lineWidth}px ${et.lineType} ${et.colorBorder}`,borderRadius:et.borderRadius,outline:"none",transition:`border-color ${et.motionDurationMid}`,color:"inherit","&:hover":{borderColor:et.colorPrimary},"&:focus":{borderColor:et.colorPrimaryHover,boxShadow:`${et.inputOutlineOffset}px 0 ${et.controlOutlineWidth}px ${et.controlOutline}`},"&[disabled]":{color:et.colorTextDisabled,backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,cursor:"not-allowed"}}}}},jn=et=>{const{componentCls:it}=et;return{[`${it}-jump-prev, ${it}-jump-next`]:{outline:0,[`${it}-item-container`]:{position:"relative",[`${it}-item-link-icon`]:{color:et.colorPrimary,fontSize:et.fontSizeSM,opacity:0,transition:`all ${et.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${it}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:et.colorTextDisabled,fontFamily:"Arial, Helvetica, sans-serif",letterSpacing:et.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:et.paginationEllipsisTextIndent,opacity:1,transition:`all ${et.motionDurationMid}`}},"&:hover":{[`${it}-item-link-icon`]:{opacity:1},[`${it}-item-ellipsis`]:{opacity:0}}},[`
${it}-prev,
${it}-jump-prev,
${it}-jump-next
`]:{marginInlineEnd:et.marginXS},[`
${it}-prev,
${it}-next,
${it}-jump-prev,
${it}-jump-next
`]:{display:"inline-block",minWidth:et.itemSize,height:et.itemSize,color:et.colorText,fontFamily:et.fontFamily,lineHeight:`${et.itemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:et.borderRadius,cursor:"pointer",transition:`all ${et.motionDurationMid}`},[`${it}-prev, ${it}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:et.colorText,cursor:"pointer",userSelect:"none"},[`${it}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:et.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${et.lineWidth}px ${et.lineType} transparent`,borderRadius:et.borderRadius,outline:"none",transition:`all ${et.motionDurationMid}`},[`&:hover ${it}-item-link`]:{backgroundColor:et.colorBgTextHover},[`&:active ${it}-item-link`]:{backgroundColor:et.colorBgTextActive},[`&${it}-disabled:hover`]:{[`${it}-item-link`]:{backgroundColor:"transparent"}}},[`${it}-slash`]:{marginInlineEnd:et.paginationSlashMarginInlineEnd,marginInlineStart:et.paginationSlashMarginInlineStart},[`${it}-options`]:{display:"inline-block",marginInlineStart:et.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:et.controlHeight,marginInlineStart:et.marginXS,lineHeight:`${et.controlHeight}px`,verticalAlign:"top",input:Object.assign(Object.assign({},(0,jt.ik)(et)),{width:et.controlHeightLG*1.25,height:et.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:et.marginXS,marginInlineEnd:et.marginXS})}}}},ci=et=>{const{componentCls:it}=et;return{[`${it}-item`]:{display:"inline-block",minWidth:et.itemSize,height:et.itemSize,marginInlineEnd:et.marginXS,fontFamily:et.fontFamily,lineHeight:`${et.itemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${et.lineWidth}px ${et.lineType} transparent`,borderRadius:et.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${et.paginationItemPaddingInline}px`,color:et.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${it}-item-active)`]:{"&:hover":{transition:`all ${et.motionDurationMid}`,backgroundColor:et.colorBgTextHover},"&:active":{backgroundColor:et.colorBgTextActive}},"&-active":{fontWeight:et.fontWeightStrong,backgroundColor:et.itemActiveBg,borderColor:et.colorPrimary,a:{color:et.colorPrimary},"&:hover":{borderColor:et.colorPrimaryHover},"&:hover a":{color:et.colorPrimaryHover}}}}},Ge=et=>{const{componentCls:it}=et;return{[it]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,en.Wf)(et)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${it}-total-text`]:{display:"inline-block",height:et.itemSize,marginInlineEnd:et.marginXS,lineHeight:`${et.itemSize-2}px`,verticalAlign:"middle"}}),ci(et)),jn(et)),wt(et)),kn(et)),un(et)),{[`@media only screen and (max-width: ${et.screenLG}px)`]:{[`${it}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${et.screenSM}px)`]:{[`${it}-options`]:{display:"none"}}}),[`&${et.componentCls}-rtl`]:{direction:"rtl"}}},be=et=>{const{componentCls:it}=et;return{[`${it}${it}-disabled:not(${it}-mini)`]:{"&, &:hover":{[`${it}-item-link`]:{borderColor:et.colorBorder}},"&:focus-visible":{[`${it}-item-link`]:{borderColor:et.colorBorder}},[`${it}-item, ${it}-item-link`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,[`&:hover:not(${it}-item-active)`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,a:{color:et.colorTextDisabled}},[`&${it}-item-active`]:{backgroundColor:et.itemActiveBgDisabled}},[`${it}-prev, ${it}-next`]:{"&:hover button":{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder,color:et.colorTextDisabled},[`${it}-item-link`]:{backgroundColor:et.colorBgContainerDisabled,borderColor:et.colorBorder}}},[`${it}:not(${it}-mini)`]:{[`${it}-prev, ${it}-next`]:{"&:hover button":{borderColor:et.colorPrimaryHover,backgroundColor:et.itemBg},[`${it}-item-link`]:{backgroundColor:et.itemLinkBg,borderColor:et.colorBorder},[`&:hover ${it}-item-link`]:{borderColor:et.colorPrimary,backgroundColor:et.itemBg,color:et.colorPrimary},[`&${it}-disabled`]:{[`${it}-item-link`]:{borderColor:et.colorBorder,color:et.colorTextDisabled}}},[`${it}-item`]:{backgroundColor:et.itemBg,border:`${et.lineWidth}px ${et.lineType} ${et.colorBorder}`,[`&:hover:not(${it}-item-active)`]:{borderColor:et.colorPrimary,backgroundColor:et.itemBg,a:{color:et.colorPrimary}},"&-active":{borderColor:et.colorPrimary}}}}},Pe=et=>{const{componentCls:it}=et;return{[`${it}:not(${it}-disabled)`]:{[`${it}-item`]:Object.assign({},(0,en.Qy)(et)),[`${it}-jump-prev, ${it}-jump-next`]:{"&:focus-visible":Object.assign({[`${it}-item-link-icon`]:{opacity:1},[`${it}-item-ellipsis`]:{opacity:0}},(0,en.oN)(et))},[`${it}-prev, ${it}-next`]:{[`&:focus-visible ${it}-item-link`]:Object.assign({},(0,en.oN)(et))}}}};var Ne=(0,ln.Z)("Pagination",et=>{const it=(0,Wn.TS)(et,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:et.marginXXS/2,paginationMiniQuickJumperInputWidth:et.controlHeightLG*1.1,paginationItemPaddingInline:et.marginXXS*1.5,paginationEllipsisLetterSpacing:et.marginXXS/2,paginationSlashMarginInlineStart:et.marginXXS,paginationSlashMarginInlineEnd:et.marginSM,paginationEllipsisTextIndent:"0.13em"},(0,jt.e5)(et),(0,jt.TM)(et));return[Ge(it),Pe(it),et.wireframe&&be(it)]},et=>({itemBg:et.colorBgContainer,itemSize:et.controlHeight,itemSizeSM:et.controlHeightSM,itemActiveBg:et.colorBgContainer,itemLinkBg:et.colorBgContainer,itemActiveColorDisabled:et.colorTextDisabled,itemActiveBgDisabled:et.controlItemBgActiveDisabled,itemInputBg:et.colorBgContainer,miniOptionsSizeChangerTop:0})),Ie=function(et,it){var Bt={};for(var Dt in et)Object.prototype.hasOwnProperty.call(et,Dt)&&it.indexOf(Dt)<0&&(Bt[Dt]=et[Dt]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ft=0,Dt=Object.getOwnPropertySymbols(et);ft<Dt.length;ft++)it.indexOf(Dt[ft])<0&&Object.prototype.propertyIsEnumerable.call(et,Dt[ft])&&(Bt[Dt[ft]]=et[Dt[ft]]);return Bt},ct=et=>{const{prefixCls:it,selectPrefixCls:Bt,className:Dt,rootClassName:ft,style:$t,size:xn,locale:an,selectComponentClass:Jt,responsive:Tn,showSizeChanger:Kn}=et,dn=Ie(et,["prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","selectComponentClass","responsive","showSizeChanger"]),{xs:Qn}=(0,qe.Z)(Tn),{getPrefixCls:pi,direction:zn,pagination:Nn={}}=Te.useContext(Gt.E_),yi=pi("pagination",it),[Zi,Hi]=Ne(yi),cr=Kn!=null?Kn:Nn.showSizeChanger,br=Te.useMemo(()=>{const Ae=Te.createElement("span",{className:`${yi}-item-ellipsis`},"\u2022\u2022\u2022"),Ei=Te.createElement("button",{className:`${yi}-item-link`,type:"button",tabIndex:-1},zn==="rtl"?Te.createElement(Ft.Z,null):Te.createElement($e.Z,null)),Sr=Te.createElement("button",{className:`${yi}-item-link`,type:"button",tabIndex:-1},zn==="rtl"?Te.createElement($e.Z,null):Te.createElement(Ft.Z,null)),Fn=Te.createElement("a",{className:`${yi}-item-link`},Te.createElement("div",{className:`${yi}-item-container`},zn==="rtl"?Te.createElement(Pt.Z,{className:`${yi}-item-link-icon`}):Te.createElement(Ct,{className:`${yi}-item-link-icon`}),Ae)),xi=Te.createElement("a",{className:`${yi}-item-link`},Te.createElement("div",{className:`${yi}-item-container`},zn==="rtl"?Te.createElement(Ct,{className:`${yi}-item-link-icon`}):Te.createElement(Pt.Z,{className:`${yi}-item-link-icon`}),Ae));return{prevIcon:Ei,nextIcon:Sr,jumpPrevIcon:Fn,jumpNextIcon:xi}},[zn,yi]),[gi]=(0,Ve.Z)("Pagination",Ot.Z),di=Object.assign(Object.assign({},gi),an),wi=(0,At.Z)(xn),Qi=wi==="small"||!!(Qn&&!wi&&Tn),Li=pi("select",Bt),ro=vt()({[`${yi}-mini`]:Qi,[`${yi}-rtl`]:zn==="rtl"},Nn==null?void 0:Nn.className,Dt,ft,Hi),fr=Object.assign(Object.assign({},Nn==null?void 0:Nn.style),$t);return Zi(Te.createElement(xt,Object.assign({},br,dn,{style:fr,prefixCls:yi,selectPrefixCls:Li,className:ro,selectComponentClass:Jt||(Qi?vn:yn),locale:di,showSizeChanger:cr})))},Lt=ct},39722:function(On,mn,pe){"use strict";pe.d(mn,{t5:function(){return $e}});var le=pe(92310),Te=pe.n(le),He=pe(55477),ut=pe(59301),We=pe(36355),Ue=pe(77578),Me=pe(17356),Ct=function(lt,vt){var Oe={};for(var te in lt)Object.prototype.hasOwnProperty.call(lt,te)&&vt.indexOf(te)<0&&(Oe[te]=lt[te]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,te=Object.getOwnPropertySymbols(lt);ee<te.length;ee++)vt.indexOf(te[ee])<0&&Object.prototype.propertyIsEnumerable.call(lt,te[ee])&&(Oe[te[ee]]=lt[te[ee]]);return Oe};const Pt=(lt,vt,Oe)=>{if(!(!vt&&!Oe))return ut.createElement(ut.Fragment,null,vt&&ut.createElement("div",{className:`${lt}-title`},(0,Ue.Z)(vt)),ut.createElement("div",{className:`${lt}-inner-content`},(0,Ue.Z)(Oe)))},$e=lt=>{const{hashId:vt,prefixCls:Oe,className:te,style:ee,placement:de="top",title:se,content:he,children:ve}=lt;return ut.createElement("div",{className:Te()(vt,Oe,`${Oe}-pure`,`${Oe}-placement-${de}`,te),style:ee},ut.createElement("div",{className:`${Oe}-arrow`}),ut.createElement(He.G,Object.assign({},lt,{className:vt,prefixCls:Oe}),ve||Pt(Oe,se,he)))},Ft=lt=>{const{prefixCls:vt}=lt,Oe=Ct(lt,["prefixCls"]),{getPrefixCls:te}=ut.useContext(We.E_),ee=te("popover",vt),[de,se]=(0,Me.Z)(ee);return de(ut.createElement($e,Object.assign({},Oe,{prefixCls:ee,hashId:se})))};mn.ZP=Ft},60324:function(On,mn,pe){"use strict";var le=pe(92310),Te=pe.n(le),He=pe(59301),ut=pe(77578),We=pe(62892),Ue=pe(36355),Me=pe(6848),Ct=pe(39722),Pt=pe(17356),$e=function(vt,Oe){var te={};for(var ee in vt)Object.prototype.hasOwnProperty.call(vt,ee)&&Oe.indexOf(ee)<0&&(te[ee]=vt[ee]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var de=0,ee=Object.getOwnPropertySymbols(vt);de<ee.length;de++)Oe.indexOf(ee[de])<0&&Object.prototype.propertyIsEnumerable.call(vt,ee[de])&&(te[ee[de]]=vt[ee[de]]);return te};const Ft=vt=>{let{title:Oe,content:te,prefixCls:ee}=vt;return He.createElement(He.Fragment,null,Oe&&He.createElement("div",{className:`${ee}-title`},(0,ut.Z)(Oe)),He.createElement("div",{className:`${ee}-inner-content`},(0,ut.Z)(te)))},lt=He.forwardRef((vt,Oe)=>{const{prefixCls:te,title:ee,content:de,overlayClassName:se,placement:he="top",trigger:ve="hover",mouseEnterDelay:Ee=.1,mouseLeaveDelay:Be=.1,overlayStyle:Le={}}=vt,ze=$e(vt,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:je}=He.useContext(Ue.E_),Xe=je("popover",te),[Ye,dt]=(0,Pt.Z)(Xe),Ze=je(),Nt=Te()(se,dt);return Ye(He.createElement(Me.Z,Object.assign({placement:he,trigger:ve,mouseEnterDelay:Ee,mouseLeaveDelay:Be,overlayStyle:Le},ze,{prefixCls:Xe,overlayClassName:Nt,ref:Oe,overlay:ee||de?He.createElement(Ft,{prefixCls:Xe,title:ee,content:de}):null,transitionName:(0,We.m)(Ze,"zoom-big",ze.transitionName),"data-popover-inject":!0})))});lt._InternalPanelDoNotUseOrYouWillBeFired=Ct.ZP,mn.Z=lt},17356:function(On,mn,pe){"use strict";var le=pe(17313),Te=pe(29878),He=pe(19447),ut=pe(33166),We=pe(83116),Ue=pe(37613);const Me=$e=>{const{componentCls:Ft,popoverColor:lt,minWidth:vt,fontWeightStrong:Oe,popoverPadding:te,boxShadowSecondary:ee,colorTextHeading:de,borderRadiusLG:se,zIndexPopup:he,marginXS:ve,colorBgElevated:Ee,popoverBg:Be}=$e;return[{[Ft]:Object.assign(Object.assign({},(0,le.Wf)($e)),{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"},[`${Ft}-content`]:{position:"relative"},[`${Ft}-inner`]:{backgroundColor:Be,backgroundClip:"padding-box",borderRadius:se,boxShadow:ee,padding:te},[`${Ft}-title`]:{minWidth:vt,marginBottom:ve,color:de,fontWeight:Oe},[`${Ft}-inner-content`]:{color:lt}})},(0,He.ZP)($e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${Ft}-pure`]:{position:"relative",maxWidth:"none",margin:$e.sizePopupArrow,display:"inline-block",[`${Ft}-content`]:{display:"inline-block"}}}]},Ct=$e=>{const{componentCls:Ft}=$e;return{[Ft]:ut.i.map(lt=>{const vt=$e[`${lt}6`];return{[`&${Ft}-${lt}`]:{"--antd-arrow-background-color":vt,[`${Ft}-inner`]:{backgroundColor:vt},[`${Ft}-arrow`]:{background:"transparent"}}}})}},Pt=$e=>{const{componentCls:Ft,lineWidth:lt,lineType:vt,colorSplit:Oe,paddingSM:te,controlHeight:ee,fontSize:de,lineHeight:se,padding:he}=$e,ve=ee-Math.round(de*se),Ee=ve/2,Be=ve/2-lt,Le=he;return{[Ft]:{[`${Ft}-inner`]:{padding:0},[`${Ft}-title`]:{margin:0,padding:`${Ee}px ${Le}px ${Be}px`,borderBottom:`${lt}px ${vt} ${Oe}`},[`${Ft}-inner-content`]:{padding:`${te}px ${Le}px`}}}};mn.Z=(0,We.Z)("Popover",$e=>{const{colorBgElevated:Ft,colorText:lt,wireframe:vt}=$e,Oe=(0,Ue.TS)($e,{popoverPadding:12,popoverBg:Ft,popoverColor:lt});return[Me(Oe),Ct(Oe),vt&&Pt(Oe),(0,Te._y)(Oe,"zoom-big")]},$e=>({width:177,minWidth:177,zIndexPopup:$e.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},13570:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ve}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function(vn,yn){return Te.createElement(We.Z,(0,le.Z)({},vn,{ref:yn,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me,Pt=pe(92310),$e=pe.n(Pt),Ft=pe(400),lt=pe(33606),vt=pe(37061),Oe=pe(18929),te=pe(10228),ee=pe(26112);function de(_t,vn){var yn=_t.disabled,jt=_t.prefixCls,en=_t.character,ln=_t.characterRender,Wn=_t.index,un=_t.count,kn=_t.value,wt=_t.allowHalf,jn=_t.focused,ci=_t.onHover,Ge=_t.onClick,be=function(it){ci(it,Wn)},Pe=function(it){Ge(it,Wn)},Ne=function(it){it.keyCode===te.Z.ENTER&&Ge(it,Wn)},Ie=Wn+1,xe=new Set([jt]);kn===0&&Wn===0&&jn?xe.add("".concat(jt,"-focused")):wt&&kn+.5>=Ie&&kn<Ie?(xe.add("".concat(jt,"-half")),xe.add("".concat(jt,"-active")),jn&&xe.add("".concat(jt,"-focused"))):(Ie<=kn?xe.add("".concat(jt,"-full")):xe.add("".concat(jt,"-zero")),Ie===kn&&jn&&xe.add("".concat(jt,"-focused")));var ct=typeof en=="function"?en(_t):en,Lt=Te.createElement("li",{className:$e()(Array.from(xe)),ref:vn},Te.createElement("div",{onClick:yn?null:Pe,onKeyDown:yn?null:Ne,onMouseMove:yn?null:be,role:"radio","aria-checked":kn>Wn?"true":"false","aria-posinset":Wn+1,"aria-setsize":un,tabIndex:yn?-1:0},Te.createElement("div",{className:"".concat(jt,"-first")},ct),Te.createElement("div",{className:"".concat(jt,"-second")},ct)));return ln&&(Lt=ln(Lt,_t)),Lt}var se=Te.forwardRef(de);function he(){var _t=Te.useRef({});function vn(jt){return _t.current[jt]}function yn(jt){return function(en){_t.current[jt]=en}}return[vn,yn]}function ve(_t){var vn=_t.pageXOffset,yn="scrollLeft";if(typeof vn!="number"){var jt=_t.document;vn=jt.documentElement[yn],typeof vn!="number"&&(vn=jt.body[yn])}return vn}function Ee(_t){var vn,yn,jt=_t.ownerDocument,en=jt.body,ln=jt&&jt.documentElement,Wn=_t.getBoundingClientRect();return vn=Wn.left,yn=Wn.top,vn-=ln.clientLeft||en.clientLeft||0,yn-=ln.clientTop||en.clientTop||0,{left:vn,top:yn}}function Be(_t){var vn=Ee(_t),yn=_t.ownerDocument,jt=yn.defaultView||yn.parentWindow;return vn.left+=ve(jt),vn.left}var Le=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function ze(_t,vn){var yn,jt=_t.prefixCls,en=jt===void 0?"rc-rate":jt,ln=_t.className,Wn=_t.defaultValue,un=_t.value,kn=_t.count,wt=kn===void 0?5:kn,jn=_t.allowHalf,ci=jn===void 0?!1:jn,Ge=_t.allowClear,be=Ge===void 0?!0:Ge,Pe=_t.character,Ne=Pe===void 0?"\u2605":Pe,Ie=_t.characterRender,xe=_t.disabled,ct=_t.direction,Lt=ct===void 0?"ltr":ct,et=_t.tabIndex,it=et===void 0?0:et,Bt=_t.autoFocus,Dt=_t.onHoverChange,ft=_t.onChange,$t=_t.onFocus,xn=_t.onBlur,an=_t.onKeyDown,Jt=_t.onMouseLeave,Tn=(0,vt.Z)(_t,Le),Kn=he(),dn=(0,lt.Z)(Kn,2),Qn=dn[0],pi=dn[1],zn=Te.useRef(null),Nn=function(){if(!xe){var ht;(ht=zn.current)===null||ht===void 0||ht.focus()}};Te.useImperativeHandle(vn,function(){return{focus:Nn,blur:function(){if(!xe){var ht;(ht=zn.current)===null||ht===void 0||ht.blur()}}}});var yi=(0,Oe.Z)(Wn||0,{value:un}),Zi=(0,lt.Z)(yi,2),Hi=Zi[0],cr=Zi[1],br=(0,Oe.Z)(null),gi=(0,lt.Z)(br,2),di=gi[0],wi=gi[1],Qi=function(ht,nn){var gn=Lt==="rtl",_n=ht+1;if(ci){var qn=Qn(ht),Et=Be(qn),Pn=qn.clientWidth;(gn&&nn-Et>Pn/2||!gn&&nn-Et<Pn/2)&&(_n-=.5)}return _n},Li=function(ht){cr(ht),ft==null||ft(ht)},ro=Te.useState(!1),fr=(0,lt.Z)(ro,2),Ae=fr[0],Ei=fr[1],Sr=function(){Ei(!0),$t==null||$t()},Fn=function(){Ei(!1),xn==null||xn()},xi=Te.useState(null),zi=(0,lt.Z)(xi,2),qi=zi[0],Gn=zi[1],ti=function(ht,nn){var gn=Qi(nn,ht.pageX);gn!==di&&(Gn(gn),wi(null)),Dt==null||Dt(gn)},Zt=function(ht){xe||(Gn(null),wi(null),Dt==null||Dt(void 0)),ht&&(Jt==null||Jt(ht))},Wt=function(ht,nn){var gn=Qi(nn,ht.pageX),_n=!1;be&&(_n=gn===Hi),Zt(),Li(_n?0:gn),wi(_n?gn:null)},Qe=function(ht){var nn=ht.keyCode,gn=Lt==="rtl",_n=Hi;nn===te.Z.RIGHT&&_n<wt&&!gn?(ci?_n+=.5:_n+=1,Li(_n),ht.preventDefault()):nn===te.Z.LEFT&&_n>0&&!gn||nn===te.Z.RIGHT&&_n>0&&gn?(ci?_n-=.5:_n-=1,Li(_n),ht.preventDefault()):nn===te.Z.LEFT&&_n<wt&&gn&&(ci?_n+=.5:_n+=1,Li(_n),ht.preventDefault()),an==null||an(ht)};Te.useEffect(function(){Bt&&!xe&&Nn()},[]);var on=new Array(wt).fill(0).map(function(Mt,ht){return Te.createElement(se,{ref:pi(ht),index:ht,count:wt,disabled:xe,prefixCls:"".concat(en,"-star"),allowHalf:ci,value:qi===null?Hi:qi,onClick:Wt,onHover:ti,key:Mt||ht,character:Ne,characterRender:Ie,focused:Ae})}),cn=$e()(en,ln,(yn={},(0,Ft.Z)(yn,"".concat(en,"-disabled"),xe),(0,Ft.Z)(yn,"".concat(en,"-rtl"),Lt==="rtl"),yn));return Te.createElement("ul",(0,le.Z)({className:cn,onMouseLeave:Zt,tabIndex:xe?-1:it,onFocus:xe?null:Sr,onBlur:xe?null:Fn,onKeyDown:xe?null:Qe,ref:zn,role:"radiogroup"},(0,ee.Z)(Tn,{aria:!0,data:!0,attr:!0})),on)}var je=Te.forwardRef(ze),Xe=je,Ye=pe(36355),dt=pe(6848),Ze=pe(17313),Nt=pe(83116),at=pe(37613);const kt=_t=>{const{componentCls:vn}=_t;return{[`${vn}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:_t.marginXS},"> div":{transition:`all ${_t.motionDurationMid}, outline 0s`,"&:hover":{transform:_t.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${_t.lineWidth}px dashed ${_t.starColor}`,transform:_t.starHoverScale}},"&-first, &-second":{color:_t.starBg,transition:`all ${_t.motionDurationMid}`,userSelect:"none",[_t.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${vn}-star-first, &-half ${vn}-star-second`]:{opacity:1},[`&-half ${vn}-star-first, &-full ${vn}-star-second`]:{color:"inherit"}}}},xt=_t=>({[`&-rtl${_t.componentCls}`]:{direction:"rtl"}}),Ot=_t=>{const{componentCls:vn}=_t;return{[vn]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,Ze.Wf)(_t)),{display:"inline-block",margin:0,padding:0,color:_t.starColor,fontSize:_t.starSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${vn} ${vn}-star`]:{cursor:"default","> div:hover":{transform:"scale(1)"}}}),kt(_t)),{[`+ ${vn}-text`]:{display:"inline-block",marginInlineStart:_t.marginXS,fontSize:_t.fontSize}}),xt(_t))}};var Gt=(0,Nt.Z)("Rate",_t=>{const vn=(0,at.TS)(_t,{});return[Ot(vn)]},_t=>({starColor:_t.yellow6,starSize:_t.controlHeightLG*.5,starHoverScale:"scale(1.1)",starBg:_t.colorFillContent})),At=function(_t,vn){var yn={};for(var jt in _t)Object.prototype.hasOwnProperty.call(_t,jt)&&vn.indexOf(jt)<0&&(yn[jt]=_t[jt]);if(_t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var en=0,jt=Object.getOwnPropertySymbols(_t);en<jt.length;en++)vn.indexOf(jt[en])<0&&Object.prototype.propertyIsEnumerable.call(_t,jt[en])&&(yn[jt[en]]=_t[jt[en]]);return yn},Ve=Te.forwardRef((_t,vn)=>{const{prefixCls:yn,className:jt,rootClassName:en,style:ln,tooltips:Wn,character:un=Te.createElement(Ct,null)}=_t,kn=At(_t,["prefixCls","className","rootClassName","style","tooltips","character"]),wt=(xe,ct)=>{let{index:Lt}=ct;return Wn?Te.createElement(dt.Z,{title:Wn[Lt]},xe):xe},{getPrefixCls:jn,direction:ci,rate:Ge}=Te.useContext(Ye.E_),be=jn("rate",yn),[Pe,Ne]=Gt(be),Ie=Object.assign(Object.assign({},Ge==null?void 0:Ge.style),ln);return Pe(Te.createElement(Xe,Object.assign({ref:vn,character:un,characterRender:wt},kn,{className:$e()(jt,en,Ne,Ge==null?void 0:Ge.className),style:Ie,prefixCls:be,direction:ci})))})},57809:function(On,mn,pe){"use strict";var le=pe(92310),Te=pe.n(le),He=pe(77861),ut=pe(2738),We=pe(59301),Ue=pe(53487),Me=pe(62892),Ct=pe(19080),Pt=pe(36355),$e=pe(1684),Ft=pe(93891),lt=pe(19716),vt=pe(32441),Oe=pe(33234),te=pe(14154),ee=pe(58582),de=pe(84443),se=pe(66339),he=function(ze,je){var Xe={};for(var Ye in ze)Object.prototype.hasOwnProperty.call(ze,Ye)&&je.indexOf(Ye)<0&&(Xe[Ye]=ze[Ye]);if(ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var dt=0,Ye=Object.getOwnPropertySymbols(ze);dt<Ye.length;dt++)je.indexOf(Ye[dt])<0&&Object.prototype.propertyIsEnumerable.call(ze,Ye[dt])&&(Xe[Ye[dt]]=ze[Ye[dt]]);return Xe};const ve="SECRET_COMBOBOX_MODE_DO_NOT_USE",Ee=(ze,je)=>{var Xe,{prefixCls:Ye,bordered:dt=!0,className:Ze,rootClassName:Nt,getPopupContainer:at,popupClassName:kt,dropdownClassName:xt,listHeight:Ot=256,placement:Gt,listItemHeight:At=24,size:qe,disabled:Ve,notFoundContent:_t,status:vn,builtinPlacements:yn,dropdownMatchSelectWidth:jt,popupMatchSelectWidth:en,direction:ln,style:Wn,allowClear:un}=ze,kn=he(ze,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:wt,getPrefixCls:jn,renderEmpty:ci,direction:Ge,virtual:be,popupMatchSelectWidth:Pe,popupOverflow:Ne,select:Ie}=We.useContext(Pt.E_),xe=jn("select",Ye),ct=jn(),Lt=ln!=null?ln:Ge,{compactSize:et,compactItemClassnames:it}=(0,Oe.ri)(xe,Lt),[Bt,Dt]=(0,te.Z)(xe),ft=We.useMemo(()=>{const{mode:fr}=kn;if(fr!=="combobox")return fr===ve?"combobox":fr},[kn.mode]),$t=ft==="multiple"||ft==="tags",xn=(0,de.Z)(kn.suffixIcon,kn.showArrow),an=(Xe=en!=null?en:jt)!==null&&Xe!==void 0?Xe:Pe,{status:Jt,hasFeedback:Tn,isFormItemInput:Kn,feedbackIcon:dn}=We.useContext(vt.aM),Qn=(0,Ct.F)(Jt,vn);let pi;_t!==void 0?pi=_t:ft==="combobox"?pi=null:pi=(ci==null?void 0:ci("Select"))||We.createElement(Ft.Z,{componentName:"Select"});const{suffixIcon:zn,itemIcon:Nn,removeIcon:yi,clearIcon:Zi}=(0,se.Z)(Object.assign(Object.assign({},kn),{multiple:$t,hasFeedback:Tn,feedbackIcon:dn,showSuffixIcon:xn,prefixCls:xe,showArrow:kn.showArrow,componentName:"Select"})),Hi=un===!0?{clearIcon:Zi}:un,cr=(0,ut.Z)(kn,["suffixIcon","itemIcon"]),br=Te()(kt||xt,{[`${xe}-dropdown-${Lt}`]:Lt==="rtl"},Nt,Dt),gi=(0,lt.Z)(fr=>{var Ae;return(Ae=qe!=null?qe:et)!==null&&Ae!==void 0?Ae:fr}),di=We.useContext($e.Z),wi=Ve!=null?Ve:di,Qi=Te()({[`${xe}-lg`]:gi==="large",[`${xe}-sm`]:gi==="small",[`${xe}-rtl`]:Lt==="rtl",[`${xe}-borderless`]:!dt,[`${xe}-in-form-item`]:Kn},(0,Ct.Z)(xe,Qn,Tn),it,Ie==null?void 0:Ie.className,Ze,Nt,Dt),Li=We.useMemo(()=>Gt!==void 0?Gt:Lt==="rtl"?"bottomRight":"bottomLeft",[Gt,Lt]),ro=(0,ee.Z)(yn,Ne);return Bt(We.createElement(He.ZP,Object.assign({ref:je,virtual:be,showSearch:Ie==null?void 0:Ie.showSearch},cr,{style:Object.assign(Object.assign({},Ie==null?void 0:Ie.style),Wn),dropdownMatchSelectWidth:an,builtinPlacements:ro,transitionName:(0,Me.m)(ct,"slide-up",kn.transitionName),listHeight:Ot,listItemHeight:At,mode:ft,prefixCls:xe,placement:Li,direction:Lt,suffixIcon:zn,menuItemSelectedIcon:Nn,removeIcon:yi,allowClear:Hi,notFoundContent:pi,className:Qi,getPopupContainer:at||wt,dropdownClassName:br,disabled:wi})))},Be=We.forwardRef(Ee),Le=(0,Ue.Z)(Be);Be.SECRET_COMBOBOX_MODE_DO_NOT_USE=ve,Be.Option=He.Wx,Be.OptGroup=He.Xo,Be._InternalPanelDoNotUseOrYouWillBeFired=Le,mn.default=Be},14154:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Be}});var le=pe(17313),Te=pe(74207),He=pe(37613),ut=pe(83116),We=pe(13826),Ue=pe(92899);const Me=Le=>{const{optionHeight:ze,optionFontSize:je,optionLineHeight:Xe,optionPadding:Ye}=Le;return{position:"relative",display:"block",minHeight:ze,padding:Ye,color:Le.colorText,fontWeight:"normal",fontSize:je,lineHeight:Xe,boxSizing:"border-box"}};var Pt=Le=>{const{antCls:ze,componentCls:je}=Le,Xe=`${je}-item`,Ye=`&${ze}-slide-up-enter${ze}-slide-up-enter-active`,dt=`&${ze}-slide-up-appear${ze}-slide-up-appear-active`,Ze=`&${ze}-slide-up-leave${ze}-slide-up-leave-active`,Nt=`${je}-dropdown-placement-`;return[{[`${je}-dropdown`]:Object.assign(Object.assign({},(0,le.Wf)(Le)),{position:"absolute",top:-9999,zIndex:Le.zIndexPopup,boxSizing:"border-box",padding:Le.paddingXXS,overflow:"hidden",fontSize:Le.fontSize,fontVariant:"initial",backgroundColor:Le.colorBgElevated,borderRadius:Le.borderRadiusLG,outline:"none",boxShadow:Le.boxShadowSecondary,[`
${Ye}${Nt}bottomLeft,
${dt}${Nt}bottomLeft
`]:{animationName:We.fJ},[`
${Ye}${Nt}topLeft,
${dt}${Nt}topLeft,
${Ye}${Nt}topRight,
${dt}${Nt}topRight
`]:{animationName:We.Qt},[`${Ze}${Nt}bottomLeft`]:{animationName:We.Uw},[`
${Ze}${Nt}topLeft,
${Ze}${Nt}topRight
`]:{animationName:We.ly},"&-hidden":{display:"none"},[`${Xe}`]:Object.assign(Object.assign({},Me(Le)),{cursor:"pointer",transition:`background ${Le.motionDurationSlow} ease`,borderRadius:Le.borderRadiusSM,"&-group":{color:Le.colorTextDescription,fontSize:Le.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},le.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Xe}-option-disabled)`]:{backgroundColor:Le.optionActiveBg},[`&-selected:not(${Xe}-option-disabled)`]:{color:Le.optionSelectedColor,fontWeight:Le.optionSelectedFontWeight,backgroundColor:Le.optionSelectedBg,[`${Xe}-option-state`]:{color:Le.colorPrimary}},"&-disabled":{[`&${Xe}-option-selected`]:{backgroundColor:Le.colorBgContainerDisabled},color:Le.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:Le.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,We.oN)(Le,"slide-up"),(0,We.oN)(Le,"slide-down"),(0,Ue.Fm)(Le,"move-up"),(0,Ue.Fm)(Le,"move-down")]};const $e=2,Ft=Le=>{let{controlHeightSM:ze,controlHeight:je,lineWidth:Xe}=Le;const Ye=(je-ze)/2-Xe,dt=Math.ceil(Ye/2);return[Ye,dt]};function lt(Le,ze){const{componentCls:je,iconCls:Xe}=Le,Ye=`${je}-selection-overflow`,dt=Le.multipleSelectItemHeight,[Ze]=Ft(Le),Nt=ze?`${je}-${ze}`:"";return{[`${je}-multiple${Nt}`]:{fontSize:Le.fontSize,[Ye]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${je}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${Ze-$e}px ${$e*2}px`,borderRadius:Le.borderRadius,[`${je}-show-search&`]:{cursor:"text"},[`${je}-disabled&`]:{background:Le.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${$e}px 0`,lineHeight:`${dt}px`,visibility:"hidden",content:'"\\a0"'}},[`
&${je}-show-arrow ${je}-selector,
&${je}-allow-clear ${je}-selector
`]:{paddingInlineEnd:Le.fontSizeIcon+Le.controlPaddingHorizontal},[`${je}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:dt,marginTop:$e,marginBottom:$e,lineHeight:`${dt-Le.lineWidth*2}px`,background:Le.multipleItemBg,border:`${Le.lineWidth}px ${Le.lineType} ${Le.multipleItemBorderColor}`,borderRadius:Le.borderRadiusSM,cursor:"default",transition:`font-size ${Le.motionDurationSlow}, line-height ${Le.motionDurationSlow}, height ${Le.motionDurationSlow}`,userSelect:"none",marginInlineEnd:$e*2,paddingInlineStart:Le.paddingXS,paddingInlineEnd:Le.paddingXS/2,[`${je}-disabled&`]:{color:Le.multipleItemColorDisabled,borderColor:Le.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:Le.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,le.Ro)()),{display:"inline-flex",alignItems:"center",color:Le.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Xe}`]:{verticalAlign:"-0.2em"},"&:hover":{color:Le.colorIconHover}})},[`${Ye}-item + ${Ye}-item`]:{[`${je}-selection-search`]:{marginInlineStart:0}},[`${je}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:Le.inputPaddingHorizontalBase-Ze,"\n &-input,\n &-mirror\n ":{height:dt,fontFamily:Le.fontFamily,lineHeight:`${dt}px`,transition:`all ${Le.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${je}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:Le.inputPaddingHorizontalBase,insetInlineEnd:Le.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${Le.motionDurationSlow}`}}}}var Oe=Le=>{const{componentCls:ze}=Le,je=(0,He.TS)(Le,{controlHeight:Le.controlHeightSM,multipleSelectItemHeight:Le.controlHeightXS,borderRadius:Le.borderRadiusSM,borderRadiusSM:Le.borderRadiusXS}),Xe=(0,He.TS)(Le,{fontSize:Le.fontSizeLG,controlHeight:Le.controlHeightLG,multipleSelectItemHeight:Le.multipleItemHeightLG,borderRadius:Le.borderRadiusLG,borderRadiusSM:Le.borderRadius}),[,Ye]=Ft(Le);return[lt(Le),lt(je,"sm"),{[`${ze}-multiple${ze}-sm`]:{[`${ze}-selection-placeholder`]:{insetInline:Le.controlPaddingHorizontalSM-Le.lineWidth},[`${ze}-selection-search`]:{marginInlineStart:Ye}}},lt(Xe,"lg")]};function te(Le,ze){const{componentCls:je,inputPaddingHorizontalBase:Xe,borderRadius:Ye}=Le,dt=Le.controlHeight-Le.lineWidth*2,Ze=Math.ceil(Le.fontSize*1.25),Nt=ze?`${je}-${ze}`:"";return{[`${je}-single${Nt}`]:{fontSize:Le.fontSize,[`${je}-selector`]:Object.assign(Object.assign({},(0,le.Wf)(Le)),{display:"flex",borderRadius:Ye,[`${je}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Xe,insetInlineEnd:Xe,bottom:0,"&-input":{width:"100%"}},[`
${je}-selection-item,
${je}-selection-placeholder
`]:{padding:0,lineHeight:`${dt}px`,transition:`all ${Le.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${dt}px`}},[`${je}-selection-item`]:{position:"relative",userSelect:"none"},[`${je}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${je}-selection-item:after`,`${je}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
&${je}-show-arrow ${je}-selection-item,
&${je}-show-arrow ${je}-selection-placeholder
`]:{paddingInlineEnd:Ze},[`&${je}-open ${je}-selection-item`]:{color:Le.colorTextPlaceholder},[`&:not(${je}-customize-input)`]:{[`${je}-selector`]:{width:"100%",height:Le.controlHeight,padding:`0 ${Xe}px`,[`${je}-selection-search-input`]:{height:dt},"&:after":{lineHeight:`${dt}px`}}},[`&${je}-customize-input`]:{[`${je}-selector`]:{"&:after":{display:"none"},[`${je}-selection-search`]:{position:"static",width:"100%"},[`${je}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Xe}px`,"&:after":{display:"none"}}}}}}}function ee(Le){const{componentCls:ze}=Le,je=Le.controlPaddingHorizontalSM-Le.lineWidth;return[te(Le),te((0,He.TS)(Le,{controlHeight:Le.controlHeightSM,borderRadius:Le.borderRadiusSM}),"sm"),{[`${ze}-single${ze}-sm`]:{[`&:not(${ze}-customize-input)`]:{[`${ze}-selection-search`]:{insetInlineStart:je,insetInlineEnd:je},[`${ze}-selector`]:{padding:`0 ${je}px`},[`&${ze}-show-arrow ${ze}-selection-search`]:{insetInlineEnd:je+Le.fontSize*1.5},[`
&${ze}-show-arrow ${ze}-selection-item,
&${ze}-show-arrow ${ze}-selection-placeholder
`]:{paddingInlineEnd:Le.fontSize*1.5}}}},te((0,He.TS)(Le,{controlHeight:Le.singleItemHeightLG,fontSize:Le.fontSizeLG,borderRadius:Le.borderRadiusLG}),"lg")]}const de=Le=>{const{componentCls:ze,selectorBg:je}=Le;return{position:"relative",backgroundColor:je,border:`${Le.lineWidth}px ${Le.lineType} ${Le.colorBorder}`,transition:`all ${Le.motionDurationMid} ${Le.motionEaseInOut}`,input:{cursor:"pointer"},[`${ze}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${ze}-disabled&`]:{color:Le.colorTextDisabled,background:Le.colorBgContainerDisabled,cursor:"not-allowed",[`${ze}-multiple&`]:{background:Le.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},se=function(Le,ze){let je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Xe,borderHoverColor:Ye,outlineColor:dt,antCls:Ze}=ze,Nt=je?{[`${Xe}-selector`]:{borderColor:Ye}}:{};return{[Le]:{[`&:not(${Xe}-disabled):not(${Xe}-customize-input):not(${Ze}-pagination-size-changer)`]:Object.assign(Object.assign({},Nt),{[`${Xe}-focused& ${Xe}-selector`]:{borderColor:Ye,boxShadow:`0 0 0 ${ze.controlOutlineWidth}px ${dt}`,outline:0},[`&:hover ${Xe}-selector`]:{borderColor:Ye}})}}},he=Le=>{const{componentCls:ze}=Le;return{[`${ze}-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=Le=>{const{componentCls:ze,inputPaddingHorizontalBase:je,iconCls:Xe}=Le;return{[ze]:Object.assign(Object.assign({},(0,le.Wf)(Le)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${ze}-customize-input) ${ze}-selector`]:Object.assign(Object.assign({},de(Le)),he(Le)),[`${ze}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},le.vS),[`${ze}-selection-placeholder`]:Object.assign(Object.assign({},le.vS),{flex:1,color:Le.colorTextPlaceholder,pointerEvents:"none"}),[`${ze}-arrow`]:Object.assign(Object.assign({},(0,le.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,height:Le.fontSizeIcon,marginTop:-Le.fontSizeIcon/2,color:Le.colorTextQuaternary,fontSize:Le.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Xe]:{verticalAlign:"top",transition:`transform ${Le.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${ze}-suffix)`]:{pointerEvents:"auto"}},[`${ze}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${ze}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:je,zIndex:1,display:"inline-block",width:Le.fontSizeIcon,height:Le.fontSizeIcon,marginTop:-Le.fontSizeIcon/2,color:Le.colorTextQuaternary,fontSize:Le.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:Le.clearBg,cursor:"pointer",opacity:0,transition:`color ${Le.motionDurationMid} ease, opacity ${Le.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:Le.colorTextTertiary}},"&:hover":{[`${ze}-clear`]:{opacity:1}}}),[`${ze}-has-feedback`]:{[`${ze}-clear`]:{insetInlineEnd:je+Le.fontSize+Le.paddingXS}}}},Ee=Le=>{const{componentCls:ze}=Le;return[{[ze]:{[`&-borderless ${ze}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${ze}-in-form-item`]:{width:"100%"}}},ve(Le),ee(Le),Oe(Le),Pt(Le),{[`${ze}-rtl`]:{direction:"rtl"}},se(ze,(0,He.TS)(Le,{borderHoverColor:Le.colorPrimaryHover,outlineColor:Le.controlOutline})),se(`${ze}-status-error`,(0,He.TS)(Le,{borderHoverColor:Le.colorErrorHover,outlineColor:Le.colorErrorOutline}),!0),se(`${ze}-status-warning`,(0,He.TS)(Le,{borderHoverColor:Le.colorWarningHover,outlineColor:Le.colorWarningOutline}),!0),(0,Te.c)(Le,{borderElCls:`${ze}-selector`,focusElCls:`${ze}-focused`})]};var Be=(0,ut.Z)("Select",(Le,ze)=>{let{rootPrefixCls:je}=ze;const Xe=(0,He.TS)(Le,{rootPrefixCls:je,inputPaddingHorizontalBase:Le.paddingSM-1,multipleSelectItemHeight:Le.multipleItemHeight});return[Ee(Xe)]},Le=>{const{fontSize:ze,lineHeight:je,controlHeight:Xe,controlPaddingHorizontal:Ye,zIndexPopupBase:dt,colorText:Ze,fontWeightStrong:Nt,controlItemBgActive:at,controlItemBgHover:kt,colorBgContainer:xt,colorFillSecondary:Ot,controlHeightLG:Gt,controlHeightSM:At,colorBgContainerDisabled:qe,colorTextDisabled:Ve}=Le;return{zIndexPopup:dt+50,optionSelectedColor:Ze,optionSelectedFontWeight:Nt,optionSelectedBg:at,optionActiveBg:kt,optionPadding:`${(Xe-ze*je)/2}px ${Ye}px`,optionFontSize:ze,optionLineHeight:je,optionHeight:Xe,selectorBg:xt,clearBg:xt,singleItemHeightLG:Gt,multipleItemBg:Ot,multipleItemBorderColor:"transparent",multipleItemHeight:At,multipleItemHeightLG:Xe,multipleSelectorBgDisabled:qe,multipleItemColorDisabled:Ve,multipleItemBorderColorDisabled:"transparent"}})},58582:function(On,mn,pe){"use strict";pe.d(mn,{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,ut){return He||le(ut)}},84443:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return le}});function le(Te,He){return He!==void 0?He:Te!==null}},66339:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});var le=pe(40001),Te=pe(19248),He=pe(99267),ut=pe(84105),We=pe(58617),Ue=pe(47472),Me=pe(59301);function Ct(Pt){let{suffixIcon:$e,clearIcon:Ft,menuItemSelectedIcon:lt,removeIcon:vt,loading:Oe,multiple:te,hasFeedback:ee,prefixCls:de,showSuffixIcon:se,feedbackIcon:he,showArrow:ve,componentName:Ee}=Pt;const Be=Ft!=null?Ft:Me.createElement(Te.Z,null),Le=Ye=>$e===null&&!ee&&!ve?null:Me.createElement(Me.Fragment,null,se!==!1&&Ye,ee&&he);let ze=null;if($e!==void 0)ze=Le($e);else if(Oe)ze=Le(Me.createElement(We.Z,{spin:!0}));else{const Ye=`${de}-suffix`;ze=dt=>{let{open:Ze,showSearch:Nt}=dt;return Le(Ze&&Nt?Me.createElement(Ue.Z,{className:Ye}):Me.createElement(ut.Z,{className:Ye}))}}let je=null;lt!==void 0?je=lt:te?je=Me.createElement(le.Z,null):je=null;let Xe=null;return vt!==void 0?Xe=vt:Xe=Me.createElement(He.Z,null),{clearIcon:Be,suffixIcon:ze,itemIcon:je,removeIcon:Xe}}},61621:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ne}});var le=pe(92310),Te=pe.n(le),He=pe(59301),ut=pe(36355),We=pe(2738),Me=Ie=>{const{prefixCls:xe,className:ct,style:Lt,size:et,shape:it}=Ie,Bt=Te()({[`${xe}-lg`]:et==="large",[`${xe}-sm`]:et==="small"}),Dt=Te()({[`${xe}-circle`]:it==="circle",[`${xe}-square`]:it==="square",[`${xe}-round`]:it==="round"}),ft=He.useMemo(()=>typeof et=="number"?{width:et,height:et,lineHeight:`${et}px`}:{},[et]);return He.createElement("span",{className:Te()(xe,Bt,Dt,ct),style:Object.assign(Object.assign({},ft),Lt)})},Ct=pe(93083),Pt=pe(83116),$e=pe(37613);const Ft=new Ct.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),lt=Ie=>({height:Ie,lineHeight:`${Ie}px`}),vt=Ie=>Object.assign({width:Ie},lt(Ie)),Oe=Ie=>({background:Ie.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Ft,animationDuration:Ie.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),te=Ie=>Object.assign({width:Ie*5,minWidth:Ie*5},lt(Ie)),ee=Ie=>{const{skeletonAvatarCls:xe,gradientFromColor:ct,controlHeight:Lt,controlHeightLG:et,controlHeightSM:it}=Ie;return{[`${xe}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:ct},vt(Lt)),[`${xe}${xe}-circle`]:{borderRadius:"50%"},[`${xe}${xe}-lg`]:Object.assign({},vt(et)),[`${xe}${xe}-sm`]:Object.assign({},vt(it))}},de=Ie=>{const{controlHeight:xe,borderRadiusSM:ct,skeletonInputCls:Lt,controlHeightLG:et,controlHeightSM:it,gradientFromColor:Bt}=Ie;return{[`${Lt}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Bt,borderRadius:ct},te(xe)),[`${Lt}-lg`]:Object.assign({},te(et)),[`${Lt}-sm`]:Object.assign({},te(it))}},se=Ie=>Object.assign({width:Ie},lt(Ie)),he=Ie=>{const{skeletonImageCls:xe,imageSizeBase:ct,gradientFromColor:Lt,borderRadiusSM:et}=Ie;return{[`${xe}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:Lt,borderRadius:et},se(ct*2)),{[`${xe}-path`]:{fill:"#bfbfbf"},[`${xe}-svg`]:Object.assign(Object.assign({},se(ct)),{maxWidth:ct*4,maxHeight:ct*4}),[`${xe}-svg${xe}-svg-circle`]:{borderRadius:"50%"}}),[`${xe}${xe}-circle`]:{borderRadius:"50%"}}},ve=(Ie,xe,ct)=>{const{skeletonButtonCls:Lt}=Ie;return{[`${ct}${Lt}-circle`]:{width:xe,minWidth:xe,borderRadius:"50%"},[`${ct}${Lt}-round`]:{borderRadius:xe}}},Ee=Ie=>Object.assign({width:Ie*2,minWidth:Ie*2},lt(Ie)),Be=Ie=>{const{borderRadiusSM:xe,skeletonButtonCls:ct,controlHeight:Lt,controlHeightLG:et,controlHeightSM:it,gradientFromColor:Bt}=Ie;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${ct}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Bt,borderRadius:xe,width:Lt*2,minWidth:Lt*2},Ee(Lt))},ve(Ie,Lt,ct)),{[`${ct}-lg`]:Object.assign({},Ee(et))}),ve(Ie,et,`${ct}-lg`)),{[`${ct}-sm`]:Object.assign({},Ee(it))}),ve(Ie,it,`${ct}-sm`))},Le=Ie=>{const{componentCls:xe,skeletonAvatarCls:ct,skeletonTitleCls:Lt,skeletonParagraphCls:et,skeletonButtonCls:it,skeletonInputCls:Bt,skeletonImageCls:Dt,controlHeight:ft,controlHeightLG:$t,controlHeightSM:xn,gradientFromColor:an,padding:Jt,marginSM:Tn,borderRadius:Kn,titleHeight:dn,blockRadius:Qn,paragraphLiHeight:pi,controlHeightXS:zn,paragraphMarginTop:Nn}=Ie;return{[`${xe}`]:{display:"table",width:"100%",[`${xe}-header`]:{display:"table-cell",paddingInlineEnd:Jt,verticalAlign:"top",[`${ct}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:an},vt(ft)),[`${ct}-circle`]:{borderRadius:"50%"},[`${ct}-lg`]:Object.assign({},vt($t)),[`${ct}-sm`]:Object.assign({},vt(xn))},[`${xe}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${Lt}`]:{width:"100%",height:dn,background:an,borderRadius:Qn,[`+ ${et}`]:{marginBlockStart:xn}},[`${et}`]:{padding:0,"> li":{width:"100%",height:pi,listStyle:"none",background:an,borderRadius:Qn,"+ li":{marginBlockStart:zn}}},[`${et}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${xe}-content`]:{[`${Lt}, ${et} > li`]:{borderRadius:Kn}}},[`${xe}-with-avatar ${xe}-content`]:{[`${Lt}`]:{marginBlockStart:Tn,[`+ ${et}`]:{marginBlockStart:Nn}}},[`${xe}${xe}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},Be(Ie)),ee(Ie)),de(Ie)),he(Ie)),[`${xe}${xe}-block`]:{width:"100%",[`${it}`]:{width:"100%"},[`${Bt}`]:{width:"100%"}},[`${xe}${xe}-active`]:{[`
${Lt},
${et} > li,
${ct},
${it},
${Bt},
${Dt}
`]:Object.assign({},Oe(Ie))}}};var ze=(0,Pt.Z)("Skeleton",Ie=>{const{componentCls:xe}=Ie,ct=(0,$e.TS)(Ie,{skeletonAvatarCls:`${xe}-avatar`,skeletonTitleCls:`${xe}-title`,skeletonParagraphCls:`${xe}-paragraph`,skeletonButtonCls:`${xe}-button`,skeletonInputCls:`${xe}-input`,skeletonImageCls:`${xe}-image`,imageSizeBase:Ie.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${Ie.gradientFromColor} 25%, ${Ie.gradientToColor} 37%, ${Ie.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[Le(ct)]},Ie=>{const{colorFillContent:xe,colorFill:ct}=Ie,Lt=xe,et=ct;return{color:Lt,colorGradientEnd:et,gradientFromColor:Lt,gradientToColor:et,titleHeight:Ie.controlHeight/2,blockRadius:Ie.borderRadiusSM,paragraphMarginTop:Ie.marginLG+Ie.marginXXS,paragraphLiHeight:Ie.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Xe=Ie=>{const{prefixCls:xe,className:ct,rootClassName:Lt,active:et,shape:it="circle",size:Bt="default"}=Ie,{getPrefixCls:Dt}=He.useContext(ut.E_),ft=Dt("skeleton",xe),[$t,xn]=ze(ft),an=(0,We.Z)(Ie,["prefixCls","className"]),Jt=Te()(ft,`${ft}-element`,{[`${ft}-active`]:et},ct,Lt,xn);return $t(He.createElement("div",{className:Jt},He.createElement(Me,Object.assign({prefixCls:`${ft}-avatar`,shape:it,size:Bt},an))))},dt=Ie=>{const{prefixCls:xe,className:ct,rootClassName:Lt,active:et,block:it=!1,size:Bt="default"}=Ie,{getPrefixCls:Dt}=He.useContext(ut.E_),ft=Dt("skeleton",xe),[$t,xn]=ze(ft),an=(0,We.Z)(Ie,["prefixCls"]),Jt=Te()(ft,`${ft}-element`,{[`${ft}-active`]:et,[`${ft}-block`]:it},ct,Lt,xn);return $t(He.createElement("div",{className:Jt},He.createElement(Me,Object.assign({prefixCls:`${ft}-button`,size:Bt},an))))};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 at=Ie=>{const{prefixCls:xe,className:ct,rootClassName:Lt,style:et,active:it}=Ie,{getPrefixCls:Bt}=He.useContext(ut.E_),Dt=Bt("skeleton",xe),[ft,$t]=ze(Dt),xn=Te()(Dt,`${Dt}-element`,{[`${Dt}-active`]:it},ct,Lt,$t);return ft(He.createElement("div",{className:xn},He.createElement("div",{className:Te()(`${Dt}-image`,ct),style:et},He.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Dt}-image-svg`},He.createElement("path",{d:Ze,className:`${Dt}-image-path`})))))},xt=Ie=>{const{prefixCls:xe,className:ct,rootClassName:Lt,active:et,block:it,size:Bt="default"}=Ie,{getPrefixCls:Dt}=He.useContext(ut.E_),ft=Dt("skeleton",xe),[$t,xn]=ze(ft),an=(0,We.Z)(Ie,["prefixCls"]),Jt=Te()(ft,`${ft}-element`,{[`${ft}-active`]:et,[`${ft}-block`]:it},ct,Lt,xn);return $t(He.createElement("div",{className:Jt},He.createElement(Me,Object.assign({prefixCls:`${ft}-input`,size:Bt},an))))},Ot=pe(92413),Gt={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"},At=Gt,qe=pe(7657),Ve=function(xe,ct){return He.createElement(qe.Z,(0,Ot.Z)({},xe,{ref:ct,icon:At}))},_t=He.forwardRef(Ve),vn=_t,jt=Ie=>{const{prefixCls:xe,className:ct,rootClassName:Lt,style:et,active:it,children:Bt}=Ie,{getPrefixCls:Dt}=He.useContext(ut.E_),ft=Dt("skeleton",xe),[$t,xn]=ze(ft),an=Te()(ft,`${ft}-element`,{[`${ft}-active`]:it},xn,ct,Lt),Jt=Bt!=null?Bt:He.createElement(vn,null);return $t(He.createElement("div",{className:an},He.createElement("div",{className:Te()(`${ft}-image`,ct),style:et},Jt)))},en=pe(26407),Wn=Ie=>{const xe=Dt=>{const{width:ft,rows:$t=2}=Ie;if(Array.isArray(ft))return ft[Dt];if($t-1===Dt)return ft},{prefixCls:ct,className:Lt,style:et,rows:it}=Ie,Bt=(0,en.Z)(Array(it)).map((Dt,ft)=>He.createElement("li",{key:ft,style:{width:xe(ft)}}));return He.createElement("ul",{className:Te()(ct,Lt),style:et},Bt)},kn=Ie=>{let{prefixCls:xe,className:ct,width:Lt,style:et}=Ie;return He.createElement("h3",{className:Te()(xe,ct),style:Object.assign({width:Lt},et)})};function wt(Ie){return Ie&&typeof Ie=="object"?Ie:{}}function jn(Ie,xe){return Ie&&!xe?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function ci(Ie,xe){return!Ie&&xe?{width:"38%"}:Ie&&xe?{width:"50%"}:{}}function Ge(Ie,xe){const ct={};return(!Ie||!xe)&&(ct.width="61%"),!Ie&&xe?ct.rows=3:ct.rows=2,ct}const be=Ie=>{const{prefixCls:xe,loading:ct,className:Lt,rootClassName:et,style:it,children:Bt,avatar:Dt=!1,title:ft=!0,paragraph:$t=!0,active:xn,round:an}=Ie,{getPrefixCls:Jt,direction:Tn,skeleton:Kn}=He.useContext(ut.E_),dn=Jt("skeleton",xe),[Qn,pi]=ze(dn);if(ct||!("loading"in Ie)){const zn=!!Dt,Nn=!!ft,yi=!!$t;let Zi;if(zn){const br=Object.assign(Object.assign({prefixCls:`${dn}-avatar`},jn(Nn,yi)),wt(Dt));Zi=He.createElement("div",{className:`${dn}-header`},He.createElement(Me,Object.assign({},br)))}let Hi;if(Nn||yi){let br;if(Nn){const di=Object.assign(Object.assign({prefixCls:`${dn}-title`},ci(zn,yi)),wt(ft));br=He.createElement(kn,Object.assign({},di))}let gi;if(yi){const di=Object.assign(Object.assign({prefixCls:`${dn}-paragraph`},Ge(zn,Nn)),wt($t));gi=He.createElement(Wn,Object.assign({},di))}Hi=He.createElement("div",{className:`${dn}-content`},br,gi)}const cr=Te()(dn,{[`${dn}-with-avatar`]:zn,[`${dn}-active`]:xn,[`${dn}-rtl`]:Tn==="rtl",[`${dn}-round`]:an},Kn==null?void 0:Kn.className,Lt,et,pi);return Qn(He.createElement("div",{className:cr,style:Object.assign(Object.assign({},Kn==null?void 0:Kn.style),it)},Zi,Hi))}return typeof Bt!="undefined"?Bt:null};be.Button=dt,be.Avatar=Xe,be.Input=xt,be.Image=at,be.Node=jt;var Pe=be,Ne=Pe},81327:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return de}});var le=pe(59301),Te=pe(92310),He=pe.n(Te),ut=pe(11592),We=pe(36355),Ue=pe(33234);const Me=le.createContext({latestIndex:0}),Ct=Me.Provider;var $e=se=>{let{className:he,index:ve,children:Ee,split:Be,style:Le}=se;const{latestIndex:ze}=le.useContext(Me);return Ee==null?null:le.createElement(le.Fragment,null,le.createElement("div",{className:he,style:Le},Ee),ve<ze&&Be&&le.createElement("span",{className:`${he}-split`},Be))},Ft=pe(2856);function lt(se){return["small","middle","large"].includes(se)}function vt(se){return se?typeof se=="number"&&!Number.isNaN(se):!1}var Oe=function(se,he){var ve={};for(var Ee in se)Object.prototype.hasOwnProperty.call(se,Ee)&&he.indexOf(Ee)<0&&(ve[Ee]=se[Ee]);if(se!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Be=0,Ee=Object.getOwnPropertySymbols(se);Be<Ee.length;Be++)he.indexOf(Ee[Be])<0&&Object.prototype.propertyIsEnumerable.call(se,Ee[Be])&&(ve[Ee[Be]]=se[Ee[Be]]);return ve};const ee=le.forwardRef((se,he)=>{var ve,Ee;const{getPrefixCls:Be,space:Le,direction:ze}=le.useContext(We.E_),{size:je=(Le==null?void 0:Le.size)||"small",align:Xe,className:Ye,rootClassName:dt,children:Ze,direction:Nt="horizontal",prefixCls:at,split:kt,style:xt,wrap:Ot=!1,classNames:Gt,styles:At}=se,qe=Oe(se,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[Ve,_t]=Array.isArray(je)?je:[je,je],vn=lt(_t),yn=lt(Ve),jt=vt(_t),en=vt(Ve),ln=(0,ut.Z)(Ze,{keepEmpty:!0}),Wn=Xe===void 0&&Nt==="horizontal"?"center":Xe,un=Be("space",at),[kn,wt]=(0,Ft.Z)(un),jn=He()(un,Le==null?void 0:Le.className,wt,`${un}-${Nt}`,{[`${un}-rtl`]:ze==="rtl",[`${un}-align-${Wn}`]:Wn,[`${un}-gap-row-${_t}`]:vn,[`${un}-gap-col-${Ve}`]:yn},Ye,dt),ci=He()(`${un}-item`,(ve=Gt==null?void 0:Gt.item)!==null&&ve!==void 0?ve:(Ee=Le==null?void 0:Le.classNames)===null||Ee===void 0?void 0:Ee.item);let Ge=0;const be=ln.map((Ie,xe)=>{var ct,Lt;Ie!=null&&(Ge=xe);const et=Ie&&Ie.key||`${ci}-${xe}`;return le.createElement($e,{className:ci,key:et,index:xe,split:kt,style:(ct=At==null?void 0:At.item)!==null&&ct!==void 0?ct:(Lt=Le==null?void 0:Le.styles)===null||Lt===void 0?void 0:Lt.item},Ie)}),Pe=le.useMemo(()=>({latestIndex:Ge}),[Ge]);if(ln.length===0)return null;const Ne={};return Ot&&(Ne.flexWrap="wrap"),!yn&&en&&(Ne.columnGap=Ve),!vn&&jt&&(Ne.rowGap=_t),kn(le.createElement("div",Object.assign({ref:he,className:jn,style:Object.assign(Object.assign(Object.assign({},Ne),Le==null?void 0:Le.style),xt)},qe),le.createElement(Ct,{value:Pe},be)))});ee.Compact=Ue.ZP;var de=ee},31797:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return ze}});var le=pe(59301),Te=pe(56762),He=pe(92343),ut=pe(92310),We=pe.n(ut),Ue=pe(36355),Me=pe(61621),Pt=je=>{const{value:Xe,formatter:Ye,precision:dt,decimalSeparator:Ze,groupSeparator:Nt="",prefixCls:at}=je;let kt;if(typeof Ye=="function")kt=Ye(Xe);else{const xt=String(Xe),Ot=xt.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Ot||xt==="-")kt=xt;else{const Gt=Ot[1];let At=Ot[2]||"0",qe=Ot[4]||"";At=At.replace(/\B(?=(\d{3})+(?!\d))/g,Nt),typeof dt=="number"&&(qe=qe.padEnd(dt,"0").slice(0,dt>0?dt:0)),qe&&(qe=`${Ze}${qe}`),kt=[le.createElement("span",{key:"int",className:`${at}-content-value-int`},Gt,At),qe&&le.createElement("span",{key:"decimal",className:`${at}-content-value-decimal`},qe)]}}return le.createElement("span",{className:`${at}-content-value`},kt)},$e=pe(17313),Ft=pe(83116),lt=pe(37613);const vt=je=>{const{componentCls:Xe,marginXXS:Ye,padding:dt,colorTextDescription:Ze,titleFontSize:Nt,colorTextHeading:at,contentFontSize:kt,fontFamily:xt}=je;return{[`${Xe}`]:Object.assign(Object.assign({},(0,$e.Wf)(je)),{[`${Xe}-title`]:{marginBottom:Ye,color:Ze,fontSize:Nt},[`${Xe}-skeleton`]:{paddingTop:dt},[`${Xe}-content`]:{color:at,fontSize:kt,fontFamily:xt,[`${Xe}-content-value`]:{display:"inline-block",direction:"ltr"},[`${Xe}-content-prefix, ${Xe}-content-suffix`]:{display:"inline-block"},[`${Xe}-content-prefix`]:{marginInlineEnd:Ye},[`${Xe}-content-suffix`]:{marginInlineStart:Ye}}})}};var Oe=(0,Ft.Z)("Statistic",je=>{const Xe=(0,lt.TS)(je,{});return[vt(Xe)]},je=>{const{fontSizeHeading3:Xe,fontSize:Ye}=je;return{titleFontSize:Ye,contentFontSize:Xe}}),ee=je=>{const{prefixCls:Xe,className:Ye,rootClassName:dt,style:Ze,valueStyle:Nt,value:at=0,title:kt,valueRender:xt,prefix:Ot,suffix:Gt,loading:At=!1,onMouseEnter:qe,onMouseLeave:Ve,decimalSeparator:_t=".",groupSeparator:vn=","}=je,{getPrefixCls:yn,direction:jt,statistic:en}=le.useContext(Ue.E_),ln=yn("statistic",Xe),[Wn,un]=Oe(ln),kn=le.createElement(Pt,Object.assign({decimalSeparator:_t,groupSeparator:vn,prefixCls:ln},je,{value:at})),wt=We()(ln,{[`${ln}-rtl`]:jt==="rtl"},en==null?void 0:en.className,Ye,dt,un);return Wn(le.createElement("div",{className:wt,style:Object.assign(Object.assign({},en==null?void 0:en.style),Ze),onMouseEnter:qe,onMouseLeave:Ve},kt&&le.createElement("div",{className:`${ln}-title`},kt),le.createElement(Me.Z,{paragraph:!1,loading:At,className:`${ln}-skeleton`},le.createElement("div",{style:Nt,className:`${ln}-content`},Ot&&le.createElement("span",{className:`${ln}-content-prefix`},Ot),xt?xt(kn):kn,Gt&&le.createElement("span",{className:`${ln}-content-suffix`},Gt)))))};const de=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function se(je,Xe){let Ye=je;const dt=/\[[^\]]*]/g,Ze=(Xe.match(dt)||[]).map(xt=>xt.slice(1,-1)),Nt=Xe.replace(dt,"[]"),at=de.reduce((xt,Ot)=>{let[Gt,At]=Ot;if(xt.includes(Gt)){const qe=Math.floor(Ye/At);return Ye-=qe*At,xt.replace(new RegExp(`${Gt}+`,"g"),Ve=>{const _t=Ve.length;return qe.toString().padStart(_t,"0")})}return xt},Nt);let kt=0;return at.replace(dt,()=>{const xt=Ze[kt];return kt+=1,xt})}function he(je,Xe){const{format:Ye=""}=Xe,dt=new Date(je).getTime(),Ze=Date.now(),Nt=Math.max(dt-Ze,0);return se(Nt,Ye)}const ve=1e3/30;function Ee(je){return new Date(je).getTime()}const Be=je=>{const{value:Xe,format:Ye="HH:mm:ss",onChange:dt,onFinish:Ze}=je,Nt=(0,Te.Z)(),at=le.useRef(null),kt=()=>{Ze==null||Ze(),at.current&&(clearInterval(at.current),at.current=null)},xt=()=>{const At=Ee(Xe);At>=Date.now()&&(at.current=setInterval(()=>{Nt(),dt==null||dt(At-Date.now()),At<Date.now()&&kt()},ve))};le.useEffect(()=>(xt(),()=>{at.current&&(clearInterval(at.current),at.current=null)}),[Xe]);const Ot=(At,qe)=>he(At,Object.assign(Object.assign({},qe),{format:Ye})),Gt=At=>(0,He.Tm)(At,{title:void 0});return le.createElement(ee,Object.assign({},je,{valueRender:Gt,formatter:Ot}))};var Le=le.memo(Be);ee.Countdown=Le;var ze=ee},15969:function(On,mn,pe){"use strict";pe.d(mn,{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(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Nt}});var le=pe(58617),Te=pe(92310),He=pe.n(Te),ut=pe(92413),We=pe(400),Ue=pe(33606),Me=pe(37061),Ct=pe(59301),Pt=pe(18929),$e=pe(10228),Ft=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],lt=Ct.forwardRef(function(at,kt){var xt,Ot=at.prefixCls,Gt=Ot===void 0?"rc-switch":Ot,At=at.className,qe=at.checked,Ve=at.defaultChecked,_t=at.disabled,vn=at.loadingIcon,yn=at.checkedChildren,jt=at.unCheckedChildren,en=at.onClick,ln=at.onChange,Wn=at.onKeyDown,un=(0,Me.Z)(at,Ft),kn=(0,Pt.Z)(!1,{value:qe,defaultValue:Ve}),wt=(0,Ue.Z)(kn,2),jn=wt[0],ci=wt[1];function Ge(Ie,xe){var ct=jn;return _t||(ct=Ie,ci(ct),ln==null||ln(ct,xe)),ct}function be(Ie){Ie.which===$e.Z.LEFT?Ge(!1,Ie):Ie.which===$e.Z.RIGHT&&Ge(!0,Ie),Wn==null||Wn(Ie)}function Pe(Ie){var xe=Ge(!jn,Ie);en==null||en(xe,Ie)}var Ne=He()(Gt,At,(xt={},(0,We.Z)(xt,"".concat(Gt,"-checked"),jn),(0,We.Z)(xt,"".concat(Gt,"-disabled"),_t),xt));return Ct.createElement("button",(0,ut.Z)({},un,{type:"button",role:"switch","aria-checked":jn,disabled:_t,className:Ne,ref:kt,onKeyDown:be,onClick:Pe}),vn,Ct.createElement("span",{className:"".concat(Gt,"-inner")},Ct.createElement("span",{className:"".concat(Gt,"-inner-checked")},yn),Ct.createElement("span",{className:"".concat(Gt,"-inner-unchecked")},jt)))});lt.displayName="Switch";var vt=lt,Oe=pe(14088),te=pe(36355),ee=pe(1684),de=pe(19716),se=pe(64993),he=pe(17313),ve=pe(83116),Ee=pe(37613);const Be=at=>{const{componentCls:kt,trackHeightSM:xt,trackPadding:Ot,trackMinWidthSM:Gt,innerMinMarginSM:At,innerMaxMarginSM:qe,handleSizeSM:Ve}=at,_t=`${kt}-inner`;return{[kt]:{[`&${kt}-small`]:{minWidth:Gt,height:xt,lineHeight:`${xt}px`,[`${kt}-inner`]:{paddingInlineStart:qe,paddingInlineEnd:At,[`${_t}-checked`]:{marginInlineStart:`calc(-100% + ${Ve+Ot*2}px - ${qe*2}px)`,marginInlineEnd:`calc(100% - ${Ve+Ot*2}px + ${qe*2}px)`},[`${_t}-unchecked`]:{marginTop:-xt,marginInlineStart:0,marginInlineEnd:0}},[`${kt}-handle`]:{width:Ve,height:Ve},[`${kt}-loading-icon`]:{top:(Ve-at.switchLoadingIconSize)/2,fontSize:at.switchLoadingIconSize},[`&${kt}-checked`]:{[`${kt}-inner`]:{paddingInlineStart:At,paddingInlineEnd:qe,[`${_t}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${_t}-unchecked`]:{marginInlineStart:`calc(100% - ${Ve+Ot*2}px + ${qe*2}px)`,marginInlineEnd:`calc(-100% + ${Ve+Ot*2}px - ${qe*2}px)`}},[`${kt}-handle`]:{insetInlineStart:`calc(100% - ${Ve+Ot}px)`}},[`&:not(${kt}-disabled):active`]:{[`&:not(${kt}-checked) ${_t}`]:{[`${_t}-unchecked`]:{marginInlineStart:at.marginXXS/2,marginInlineEnd:-at.marginXXS/2}},[`&${kt}-checked ${_t}`]:{[`${_t}-checked`]:{marginInlineStart:-at.marginXXS/2,marginInlineEnd:at.marginXXS/2}}}}}}},Le=at=>{const{componentCls:kt,handleSize:xt}=at;return{[kt]:{[`${kt}-loading-icon${at.iconCls}`]:{position:"relative",top:(xt-at.fontSize)/2,color:at.switchLoadingIconColor,verticalAlign:"top"},[`&${kt}-checked ${kt}-loading-icon`]:{color:at.switchColor}}}},ze=at=>{const{componentCls:kt,motion:xt,trackPadding:Ot,handleBg:Gt,handleShadow:At,handleSize:qe}=at,Ve=`${kt}-handle`;return{[kt]:{[Ve]:{position:"absolute",top:Ot,insetInlineStart:Ot,width:qe,height:qe,transition:`all ${at.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:Gt,borderRadius:qe/2,boxShadow:At,transition:`all ${at.switchDuration} ease-in-out`,content:'""'}},[`&${kt}-checked ${Ve}`]:{insetInlineStart:`calc(100% - ${qe+Ot}px)`},[`&:not(${kt}-disabled):active`]:xt?{[`${Ve}::before`]:{insetInlineEnd:at.switchHandleActiveInset,insetInlineStart:0},[`&${kt}-checked ${Ve}::before`]:{insetInlineEnd:0,insetInlineStart:at.switchHandleActiveInset}}:{}}}},je=at=>{const{componentCls:kt,trackHeight:xt,trackPadding:Ot,innerMinMargin:Gt,innerMaxMargin:At,handleSize:qe}=at,Ve=`${kt}-inner`;return{[kt]:{[Ve]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:At,paddingInlineEnd:Gt,transition:`padding-inline-start ${at.switchDuration} ease-in-out, padding-inline-end ${at.switchDuration} ease-in-out`,[`${Ve}-checked, ${Ve}-unchecked`]:{display:"block",color:at.colorTextLightSolid,fontSize:at.fontSizeSM,transition:`margin-inline-start ${at.switchDuration} ease-in-out, margin-inline-end ${at.switchDuration} ease-in-out`,pointerEvents:"none"},[`${Ve}-checked`]:{marginInlineStart:`calc(-100% + ${qe+Ot*2}px - ${At*2}px)`,marginInlineEnd:`calc(100% - ${qe+Ot*2}px + ${At*2}px)`},[`${Ve}-unchecked`]:{marginTop:-xt,marginInlineStart:0,marginInlineEnd:0}},[`&${kt}-checked ${Ve}`]:{paddingInlineStart:Gt,paddingInlineEnd:At,[`${Ve}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${Ve}-unchecked`]:{marginInlineStart:`calc(100% - ${qe+Ot*2}px + ${At*2}px)`,marginInlineEnd:`calc(-100% + ${qe+Ot*2}px - ${At*2}px)`}},[`&:not(${kt}-disabled):active`]:{[`&:not(${kt}-checked) ${Ve}`]:{[`${Ve}-unchecked`]:{marginInlineStart:Ot*2,marginInlineEnd:-Ot*2}},[`&${kt}-checked ${Ve}`]:{[`${Ve}-checked`]:{marginInlineStart:-Ot*2,marginInlineEnd:Ot*2}}}}}},Xe=at=>{const{componentCls:kt,trackHeight:xt,trackMinWidth:Ot}=at;return{[kt]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,he.Wf)(at)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:Ot,height:xt,lineHeight:`${xt}px`,verticalAlign:"middle",background:at.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${at.motionDurationMid}`,userSelect:"none",[`&:hover:not(${kt}-disabled)`]:{background:at.colorTextTertiary}}),(0,he.Qy)(at)),{[`&${kt}-checked`]:{background:at.switchColor,[`&:hover:not(${kt}-disabled)`]:{background:at.colorPrimaryHover}},[`&${kt}-loading, &${kt}-disabled`]:{cursor:"not-allowed",opacity:at.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${kt}-rtl`]:{direction:"rtl"}})}};var Ye=(0,ve.Z)("Switch",at=>{const kt=(0,Ee.TS)(at,{switchDuration:at.motionDurationMid,switchColor:at.colorPrimary,switchDisabledOpacity:at.opacityLoading,switchLoadingIconSize:at.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${at.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Xe(kt),je(kt),ze(kt),Le(kt),Be(kt)]},at=>{const{fontSize:kt,lineHeight:xt,controlHeight:Ot,colorWhite:Gt}=at,At=kt*xt,qe=Ot/2,Ve=2,_t=At-Ve*2,vn=qe-Ve*2;return{trackHeight:At,trackHeightSM:qe,trackMinWidth:_t*2+Ve*4,trackMinWidthSM:vn*2+Ve*2,trackPadding:Ve,handleBg:Gt,handleSize:_t,handleSizeSM:vn,handleShadow:`0 2px 4px 0 ${new se.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:_t/2,innerMaxMargin:_t+Ve+Ve*2,innerMinMarginSM:vn/2,innerMaxMarginSM:vn+Ve+Ve*2}}),dt=function(at,kt){var xt={};for(var Ot in at)Object.prototype.hasOwnProperty.call(at,Ot)&&kt.indexOf(Ot)<0&&(xt[Ot]=at[Ot]);if(at!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Gt=0,Ot=Object.getOwnPropertySymbols(at);Gt<Ot.length;Gt++)kt.indexOf(Ot[Gt])<0&&Object.prototype.propertyIsEnumerable.call(at,Ot[Gt])&&(xt[Ot[Gt]]=at[Ot[Gt]]);return xt};const Ze=Ct.forwardRef((at,kt)=>{const{prefixCls:xt,size:Ot,disabled:Gt,loading:At,className:qe,rootClassName:Ve,style:_t}=at,vn=dt(at,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:yn,direction:jt,switch:en}=Ct.useContext(te.E_),ln=Ct.useContext(ee.Z),Wn=(Gt!=null?Gt:ln)||At,un=yn("switch",xt),kn=Ct.createElement("div",{className:`${un}-handle`},At&&Ct.createElement(le.Z,{className:`${un}-loading-icon`})),[wt,jn]=Ye(un),ci=(0,de.Z)(Ot),Ge=He()(en==null?void 0:en.className,{[`${un}-small`]:ci==="small",[`${un}-loading`]:At,[`${un}-rtl`]:jt==="rtl"},qe,Ve,jn),be=Object.assign(Object.assign({},en==null?void 0:en.style),_t);return wt(Ct.createElement(Oe.Z,{component:"Switch"},Ct.createElement(vt,Object.assign({},vn,{prefixCls:un,className:Ge,style:be,disabled:Wn,ref:kt,loadingIcon:kn}))))});Ze.__ANT_SWITCH=!0;var Nt=Ze},1710:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return Ja}});var le={},Te="rc-table-internal-hook",He=pe(33606),ut=pe(6089),We=pe(34280),Ue=pe(13697),Me=pe(59301),Ct=pe(4676);function Pt(ot){var tt=Me.createContext(void 0),Ut=function(pn){var rn=pn.value,$n=pn.children,Rn=Me.useRef(rn);Rn.current=rn;var Yn=Me.useState(function(){return{getValue:function(){return Rn.current},listeners:new Set}}),Pi=(0,He.Z)(Yn,1),Jn=Pi[0];return(0,We.Z)(function(){(0,Ct.unstable_batchedUpdates)(function(){Jn.listeners.forEach(function(vi){vi(rn)})})},[rn]),Me.createElement(tt.Provider,{value:Jn},$n)};return{Context:tt,Provider:Ut,defaultValue:ot}}function $e(ot,tt){var Ut=(0,ut.Z)(typeof tt=="function"?tt:function(vi){if(tt===void 0)return vi;if(!Array.isArray(tt))return vi[tt];var or={};return tt.forEach(function(Ki){or[Ki]=vi[Ki]}),or}),Xt=Me.useContext(ot==null?void 0:ot.Context),pn=Xt||{},rn=pn.listeners,$n=pn.getValue,Rn=Me.useRef();Rn.current=Ut(Xt?$n():ot==null?void 0:ot.defaultValue);var Yn=Me.useState({}),Pi=(0,He.Z)(Yn,2),Jn=Pi[1];return(0,We.Z)(function(){if(!Xt)return;function vi(or){var Ki=Ut(or);(0,Ue.Z)(Rn.current,Ki,!0)||Jn({})}return rn.add(vi),function(){rn.delete(vi)}},[Xt]),Rn.current}var Ft=pe(92413),lt=pe(8654);function vt(){var ot=Me.createContext(null);function tt(){return Me.useContext(ot)}function Ut(pn,rn){var $n=(0,lt.Yr)(pn),Rn=function(Pi,Jn){var vi=$n?{ref:Jn}:{},or=Me.useRef(0),Ki=Me.useRef(Pi),Vi=tt();return Vi!==null?Me.createElement(pn,(0,Ft.Z)({},Pi,vi)):((!rn||rn(Ki.current,Pi))&&(or.current+=1),Ki.current=Pi,Me.createElement(ot.Provider,{value:or.current},Me.createElement(pn,(0,Ft.Z)({},Pi,vi))))};return $n?Me.forwardRef(Rn):Rn}function Xt(pn,rn){var $n=(0,lt.Yr)(pn),Rn=function(Pi,Jn){var vi=$n?{ref:Jn}:{};return tt(),Me.createElement(pn,(0,Ft.Z)({},Pi,vi))};return $n?Me.memo(Me.forwardRef(Rn),rn):Me.memo(Rn,rn)}return{makeImmutable:Ut,responseImmutable:Xt,useImmutableMark:tt}}var Oe=vt(),te=Oe.makeImmutable,ee=Oe.responseImmutable,de=Oe.useImmutableMark,se=vt(),he=se.makeImmutable,ve=se.responseImmutable,Ee=se.useImmutableMark,Be=Pt(),Le=Be;function ze(ot,tt){var Ut=Me.useRef(0);Ut.current+=1;var Xt=Me.useRef(ot),pn=[];Object.keys(ot||{}).map(function($n){var Rn;(ot==null?void 0:ot[$n])!==((Rn=Xt.current)===null||Rn===void 0?void 0:Rn[$n])&&pn.push($n)}),Xt.current=ot;var rn=Me.useRef([]);return pn.length&&(rn.current=pn),Me.useDebugValue(Ut.current),Me.useDebugValue(rn.current.join(", ")),tt&&console.log("".concat(tt,":"),Ut.current,rn.current),Ut.current}var je=null,Xe=Me.memo(function(){var ot=ze();return Me.createElement("h1",null,"Render Times: ",ot)});Xe.displayName="RenderBlock";var Ye=pe(39559),dt=pe(33708),Ze=pe(400),Nt=pe(92310),at=pe.n(Nt),kt=pe(80547),xt=pe(97938),Ot=pe(48736),Gt=Me.createContext({renderWithProps:!1}),At=Gt,qe="RC_TABLE_KEY";function Ve(ot){return ot==null?[]:Array.isArray(ot)?ot:[ot]}function _t(ot){var tt=[],Ut={};return ot.forEach(function(Xt){for(var pn=Xt||{},rn=pn.key,$n=pn.dataIndex,Rn=rn||Ve($n).join("-")||qe;Ut[Rn];)Rn="".concat(Rn,"_next");Ut[Rn]=!0,tt.push(Rn)}),tt}function vn(ot){return ot!=null}function yn(ot){return ot&&(0,Ye.Z)(ot)==="object"&&!Array.isArray(ot)&&!Me.isValidElement(ot)}function jt(ot,tt,Ut,Xt,pn,rn){var $n=Me.useContext(At),Rn=Ee(),Yn=(0,kt.Z)(function(){if(vn(Xt))return[Xt];var Pi=tt==null||tt===""?[]:Array.isArray(tt)?tt:[tt],Jn=(0,xt.Z)(ot,Pi),vi=Jn,or=void 0;if(pn){var Ki=pn(Jn,ot,Ut);yn(Ki)?(vi=Ki.children,or=Ki.props,$n.renderWithProps=!0):vi=Ki}return[vi,or]},[Rn,ot,Xt,tt,pn,Ut],function(Pi,Jn){if(rn){var vi=(0,He.Z)(Pi,2),or=vi[1],Ki=(0,He.Z)(Jn,2),Vi=Ki[1];return rn(Vi,or)}return $n.renderWithProps?!0:!(0,Ue.Z)(Pi,Jn,!0)});return Yn}function en(ot,tt,Ut,Xt){var pn=ot+tt-1;return ot<=Xt&&pn>=Ut}function ln(ot,tt){return $e(Le,function(Ut){var Xt=en(ot,tt||1,Ut.hoverStartRow,Ut.hoverEndRow);return[Xt,Ut.onHover]})}var Wn=function(tt){var Ut=tt.ellipsis,Xt=tt.rowType,pn=tt.children,rn,$n=Ut===!0?{showTitle:!0}:Ut;return $n&&($n.showTitle||Xt==="header")&&(typeof pn=="string"||typeof pn=="number"?rn=pn.toString():Me.isValidElement(pn)&&typeof pn.props.children=="string"&&(rn=pn.props.children)),rn};function un(ot){var tt,Ut,Xt,pn,rn,$n,Rn,Yn,Pi=ot.component,Jn=ot.children,vi=ot.ellipsis,or=ot.scope,Ki=ot.prefixCls,Vi=ot.className,Xr=ot.align,rr=ot.record,_r=ot.render,jr=ot.dataIndex,vo=ot.renderIndex,Uo=ot.shouldCellUpdate,la=ot.index,so=ot.rowType,Wo=ot.colSpan,ka=ot.rowSpan,ho=ot.fixLeft,ko=ot.fixRight,fo=ot.firstFixLeft,Dr=ot.lastFixLeft,Bo=ot.firstFixRight,ea=ot.lastFixRight,Sa=ot.appendNode,Pa=ot.additionalProps,lo=Pa===void 0?{}:Pa,Ta=ot.isSticky,Ua="".concat(Ki,"-cell"),Es=$e(Le,["supportSticky","allColumnsFixedLeft"]),ls=Es.supportSticky,qs=Es.allColumnsFixedLeft,Ls=jt(rr,jr,vo,Jn,_r,Uo),Za=(0,He.Z)(Ls,2),sa=Za[0],ds=Za[1],el={},Ws=typeof ho=="number"&&ls,cl=typeof ko=="number"&&ls;Ws&&(el.position="sticky",el.left=ho),cl&&(el.position="sticky",el.right=ko);var ba=(tt=(Ut=(Xt=ds==null?void 0:ds.colSpan)!==null&&Xt!==void 0?Xt:lo.colSpan)!==null&&Ut!==void 0?Ut:Wo)!==null&&tt!==void 0?tt:1,ca=(pn=(rn=($n=ds==null?void 0:ds.rowSpan)!==null&&$n!==void 0?$n:lo.rowSpan)!==null&&rn!==void 0?rn:ka)!==null&&pn!==void 0?pn:1,wa=ln(la,ca),Jo=(0,He.Z)(wa,2),xs=Jo[0],Yo=Jo[1],Ra=function(dl){var Fl;rr&&Yo(la,la+ca-1),lo==null||(Fl=lo.onMouseEnter)===null||Fl===void 0||Fl.call(lo,dl)},os=function(dl){var Fl;rr&&Yo(-1,-1),lo==null||(Fl=lo.onMouseLeave)===null||Fl===void 0||Fl.call(lo,dl)};if(ba===0||ca===0)return null;var us=(Rn=lo.title)!==null&&Rn!==void 0?Rn:Wn({rowType:so,ellipsis:vi,children:sa}),Al=at()(Ua,Vi,(Yn={},(0,Ze.Z)(Yn,"".concat(Ua,"-fix-left"),Ws&&ls),(0,Ze.Z)(Yn,"".concat(Ua,"-fix-left-first"),fo&&ls),(0,Ze.Z)(Yn,"".concat(Ua,"-fix-left-last"),Dr&&ls),(0,Ze.Z)(Yn,"".concat(Ua,"-fix-left-all"),Dr&&qs&&ls),(0,Ze.Z)(Yn,"".concat(Ua,"-fix-right"),cl&&ls),(0,Ze.Z)(Yn,"".concat(Ua,"-fix-right-first"),Bo&&ls),(0,Ze.Z)(Yn,"".concat(Ua,"-fix-right-last"),ea&&ls),(0,Ze.Z)(Yn,"".concat(Ua,"-ellipsis"),vi),(0,Ze.Z)(Yn,"".concat(Ua,"-with-append"),Sa),(0,Ze.Z)(Yn,"".concat(Ua,"-fix-sticky"),(Ws||cl)&&Ta&&ls),(0,Ze.Z)(Yn,"".concat(Ua,"-row-hover"),!ds&&xs),Yn),lo.className,ds==null?void 0:ds.className),bl={};Xr&&(bl.textAlign=Xr);var Vl=(0,dt.Z)((0,dt.Z)((0,dt.Z)((0,dt.Z)({},el),lo.style),bl),ds==null?void 0:ds.style),bs=sa;return(0,Ye.Z)(bs)==="object"&&!Array.isArray(bs)&&!Me.isValidElement(bs)&&(bs=null),vi&&(Dr||Bo)&&(bs=Me.createElement("span",{className:"".concat(Ua,"-content")},bs)),Me.createElement(Pi,(0,Ft.Z)({},ds,lo,{className:Al,style:Vl,title:us,scope:or,onMouseEnter:Ra,onMouseLeave:os,colSpan:ba!==1?ba:null,rowSpan:ca!==1?ca:null}),Sa,bs)}var kn=Me.memo(un);function wt(ot,tt,Ut,Xt,pn,rn){var $n=Ut[ot]||{},Rn=Ut[tt]||{},Yn,Pi;$n.fixed==="left"?Yn=Xt.left[pn==="rtl"?tt:ot]:Rn.fixed==="right"&&(Pi=Xt.right[pn==="rtl"?ot:tt]);var Jn=!1,vi=!1,or=!1,Ki=!1,Vi=Ut[tt+1],Xr=Ut[ot-1],rr=!(rn!=null&&rn.children);if(pn==="rtl"){if(Yn!==void 0){var _r=Xr&&Xr.fixed==="left";Ki=!_r&&rr}else if(Pi!==void 0){var jr=Vi&&Vi.fixed==="right";or=!jr&&rr}}else if(Yn!==void 0){var vo=Vi&&Vi.fixed==="left";Jn=!vo&&rr}else if(Pi!==void 0){var Uo=Xr&&Xr.fixed==="right";vi=!Uo&&rr}return{fixLeft:Yn,fixRight:Pi,lastFixLeft:Jn,firstFixRight:vi,lastFixRight:or,firstFixLeft:Ki,isSticky:Xt.isSticky}}var jn=Me.createContext({}),ci=jn;function Ge(ot){var tt=ot.className,Ut=ot.index,Xt=ot.children,pn=ot.colSpan,rn=pn===void 0?1:pn,$n=ot.rowSpan,Rn=ot.align,Yn=$e(Le,["prefixCls","direction"]),Pi=Yn.prefixCls,Jn=Yn.direction,vi=Me.useContext(ci),or=vi.scrollColumnIndex,Ki=vi.stickyOffsets,Vi=vi.flattenColumns,Xr=vi.columns,rr=Ut+rn-1,_r=rr+1===or?rn+1:rn,jr=wt(Ut,Ut+_r-1,Vi,Ki,Jn,Xr==null?void 0:Xr[Ut]);return Me.createElement(kn,(0,Ft.Z)({className:tt,index:Ut,component:"td",prefixCls:Pi,record:null,dataIndex:null,align:Rn,colSpan:_r,rowSpan:$n,render:function(){return Xt}},jr))}var be=pe(37061),Pe=["children"];function Ne(ot){var tt=ot.children,Ut=(0,be.Z)(ot,Pe);return Me.createElement("tr",Ut,tt)}function Ie(ot){var tt=ot.children;return tt}Ie.Row=Ne,Ie.Cell=Ge;var xe=Ie;function ct(ot){var tt=ot.children,Ut=ot.stickyOffsets,Xt=ot.flattenColumns,pn=ot.columns,rn=$e(Le,"prefixCls"),$n=Xt.length-1,Rn=Xt[$n],Yn=Me.useMemo(function(){return{stickyOffsets:Ut,flattenColumns:Xt,scrollColumnIndex:Rn!=null&&Rn.scrollbar?$n:null,columns:pn}},[Rn,Xt,$n,Ut,pn]);return Me.createElement(ci.Provider,{value:Yn},Me.createElement("tfoot",{className:"".concat(rn,"-summary")},tt))}var Lt=ve(ct),et=xe,it=pe(70425),Bt=pe(29301),Dt=pe(29194),ft=pe(24514),$t=pe(75152),xn=pe(26112);function an(ot,tt,Ut,Xt,pn,rn,$n){ot.push({record:tt,indent:Ut,index:$n});var Rn=rn(tt),Yn=pn==null?void 0:pn.has(Rn);if(tt&&Array.isArray(tt[Xt])&&Yn)for(var Pi=0;Pi<tt[Xt].length;Pi+=1)an(ot,tt[Xt][Pi],Ut+1,Xt,pn,rn,Pi)}function Jt(ot,tt,Ut,Xt){var pn=Me.useMemo(function(){if(Ut!=null&&Ut.size){for(var rn=[],$n=0;$n<(ot==null?void 0:ot.length);$n+=1){var Rn=ot[$n];an(rn,Rn,0,tt,Ut,Xt,$n)}return rn}return ot==null?void 0:ot.map(function(Yn,Pi){return{record:Yn,indent:0,index:Pi}})},[ot,tt,Ut,Xt]);return pn}function Tn(ot){var tt=ot.prefixCls,Ut=ot.children,Xt=ot.component,pn=ot.cellComponent,rn=ot.className,$n=ot.expanded,Rn=ot.colSpan,Yn=ot.isEmpty,Pi=$e(Le,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Jn=Pi.scrollbarSize,vi=Pi.fixHeader,or=Pi.fixColumn,Ki=Pi.componentWidth,Vi=Pi.horizonScroll,Xr=Ut;return(Yn?Vi&&Ki:or)&&(Xr=Me.createElement("div",{style:{width:Ki-(vi?Jn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(tt,"-expanded-row-fixed")},Xr)),Me.createElement(Xt,{className:rn,style:{display:$n?null:"none"}},Me.createElement(kn,{component:pn,prefixCls:tt,colSpan:Rn},Xr))}var Kn=Tn;function dn(ot,tt,Ut,Xt){var pn=$e(Le,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),rn=pn.flattenColumns,$n=pn.expandableType,Rn=pn.expandedKeys,Yn=pn.childrenColumnName,Pi=pn.onTriggerExpand,Jn=pn.rowExpandable,vi=pn.onRow,or=pn.expandRowByClick,Ki=pn.rowClassName,Vi=$n==="nest",Xr=$n==="row"&&(!Jn||Jn(ot)),rr=Xr||Vi,_r=Rn&&Rn.has(tt),jr=Yn&&ot&&ot[Yn],vo=(0,it.useEvent)(Pi),Uo=vi==null?void 0:vi(ot,Ut),la=Uo==null?void 0:Uo.onClick,so=function(ko){or&&rr&&Pi(ot,ko);for(var fo=arguments.length,Dr=new Array(fo>1?fo-1:0),Bo=1;Bo<fo;Bo++)Dr[Bo-1]=arguments[Bo];la==null||la.apply(void 0,[ko].concat(Dr))},Wo;typeof Ki=="string"?Wo=Ki:typeof Ki=="function"&&(Wo=Ki(ot,Ut,Xt));var ka=_t(rn);return(0,dt.Z)((0,dt.Z)({},pn),{},{columnsKey:ka,nestExpandable:Vi,expanded:_r,hasNestChildren:jr,record:ot,onTriggerExpand:vo,rowSupportExpand:Xr,expandable:rr,rowProps:(0,dt.Z)((0,dt.Z)({},Uo),{},{className:at()(Wo,Uo==null?void 0:Uo.className),onClick:so})})}function Qn(ot,tt,Ut,Xt,pn){var rn=ot.record,$n=ot.prefixCls,Rn=ot.columnsKey,Yn=ot.fixedInfoList,Pi=ot.expandIconColumnIndex,Jn=ot.nestExpandable,vi=ot.indentSize,or=ot.expandIcon,Ki=ot.expanded,Vi=ot.hasNestChildren,Xr=ot.onTriggerExpand,rr=Rn[Ut],_r=Yn[Ut],jr;Ut===(Pi||0)&&Jn&&(jr=Me.createElement(Me.Fragment,null,Me.createElement("span",{style:{paddingLeft:"".concat(vi*Xt,"px")},className:"".concat($n,"-row-indent indent-level-").concat(Xt)}),or({prefixCls:$n,expanded:Ki,expandable:Vi,record:rn,onExpand:Xr})));var vo;return tt.onCell&&(vo=tt.onCell(rn,pn)),{key:rr,fixedInfo:_r,appendCellNode:jr,additionalCellProps:vo||{}}}function pi(ot){var tt=ot.className,Ut=ot.style,Xt=ot.record,pn=ot.index,rn=ot.renderIndex,$n=ot.rowKey,Rn=ot.indent,Yn=Rn===void 0?0:Rn,Pi=ot.rowComponent,Jn=ot.cellComponent,vi=ot.scopeCellComponent,or=dn(Xt,$n,pn,Yn),Ki=or.prefixCls,Vi=or.flattenColumns,Xr=or.expandedRowClassName,rr=or.expandedRowRender,_r=or.rowProps,jr=or.expanded,vo=or.rowSupportExpand,Uo=Me.useState(!1),la=(0,He.Z)(Uo,2),so=la[0],Wo=la[1];Me.useEffect(function(){jr&&Wo(!0)},[jr]);var ka=Me.createElement(Pi,(0,Ft.Z)({},_r,{"data-row-key":$n,className:at()(tt,"".concat(Ki,"-row"),"".concat(Ki,"-row-level-").concat(Yn),_r==null?void 0:_r.className),style:(0,dt.Z)((0,dt.Z)({},Ut),_r==null?void 0:_r.style)}),Vi.map(function(Dr,Bo){var ea=Dr.render,Sa=Dr.dataIndex,Pa=Dr.className,lo=Qn(or,Dr,Bo,Yn,pn),Ta=lo.key,Ua=lo.fixedInfo,Es=lo.appendCellNode,ls=lo.additionalCellProps;return Me.createElement(kn,(0,Ft.Z)({className:Pa,ellipsis:Dr.ellipsis,align:Dr.align,scope:Dr.rowScope,component:Dr.rowScope?vi:Jn,prefixCls:Ki,key:Ta,record:Xt,index:pn,renderIndex:rn,dataIndex:Sa,render:ea,shouldCellUpdate:Dr.shouldCellUpdate},Ua,{appendNode:Es,additionalProps:ls}))})),ho;if(vo&&(so||jr)){var ko=rr(Xt,pn,Yn+1,jr),fo=Xr&&Xr(Xt,pn,Yn);ho=Me.createElement(Kn,{expanded:jr,className:at()("".concat(Ki,"-expanded-row"),"".concat(Ki,"-expanded-row-level-").concat(Yn+1),fo),prefixCls:Ki,component:Pi,cellComponent:Jn,colSpan:Vi.length,isEmpty:!1},ko)}return Me.createElement(Me.Fragment,null,ka,ho)}pi.displayName="BodyRow";var zn=ve(pi);function Nn(ot){var tt=ot.columnKey,Ut=ot.onColumnResize,Xt=Me.useRef();return Me.useEffect(function(){Xt.current&&Ut(tt,Xt.current.offsetWidth)},[]),Me.createElement(Bt.Z,{data:tt},Me.createElement("td",{ref:Xt,style:{padding:0,border:0,height:0}},Me.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function yi(ot){var tt=ot.prefixCls,Ut=ot.columnsKey,Xt=ot.onColumnResize;return Me.createElement("tr",{"aria-hidden":"true",className:"".concat(tt,"-measure-row"),style:{height:0,fontSize:0}},Me.createElement(Bt.Z.Collection,{onBatchResize:function(rn){rn.forEach(function($n){var Rn=$n.data,Yn=$n.size;Xt(Rn,Yn.offsetWidth)})}},Ut.map(function(pn){return Me.createElement(Nn,{key:pn,columnKey:pn,onColumnResize:Xt})})))}function Zi(ot){var tt=ot.data,Ut=ot.measureColumnWidth,Xt=$e(Le,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),pn=Xt.prefixCls,rn=Xt.getComponent,$n=Xt.onColumnResize,Rn=Xt.flattenColumns,Yn=Xt.getRowKey,Pi=Xt.expandedKeys,Jn=Xt.childrenColumnName,vi=Xt.emptyNode,or=Jt(tt,Jn,Pi,Yn),Ki=Me.useRef({renderWithProps:!1}),Vi=rn(["body","wrapper"],"tbody"),Xr=rn(["body","row"],"tr"),rr=rn(["body","cell"],"td"),_r=rn(["body","cell"],"th"),jr;tt.length?jr=or.map(function(Uo,la){var so=Uo.record,Wo=Uo.indent,ka=Uo.index,ho=Yn(so,la);return Me.createElement(zn,{key:ho,rowKey:ho,record:so,index:la,renderIndex:ka,rowComponent:Xr,cellComponent:rr,scopeCellComponent:_r,getRowKey:Yn,indent:Wo})}):jr=Me.createElement(Kn,{expanded:!0,className:"".concat(pn,"-placeholder"),prefixCls:pn,component:Xr,cellComponent:rr,colSpan:Rn.length,isEmpty:!0},vi);var vo=_t(Rn);return Me.createElement(At.Provider,{value:Ki.current},Me.createElement(Vi,{className:"".concat(pn,"-tbody")},Ut&&Me.createElement(yi,{prefixCls:pn,columnsKey:vo,onColumnResize:$n}),jr))}Zi.displayName="Body";var Hi=ve(Zi),cr=["expandable"],br="RC_TABLE_INTERNAL_COL_DEFINE";function gi(ot){var tt=ot.expandable,Ut=(0,be.Z)(ot,cr),Xt;return"expandable"in ot?Xt=(0,dt.Z)((0,dt.Z)({},Ut),tt):Xt=Ut,Xt.showExpandColumn===!1&&(Xt.expandIconColumnIndex=-1),Xt}var di=["columnType"];function wi(ot){for(var tt=ot.colWidths,Ut=ot.columns,Xt=ot.columCount,pn=[],rn=Xt||Ut.length,$n=!1,Rn=rn-1;Rn>=0;Rn-=1){var Yn=tt[Rn],Pi=Ut&&Ut[Rn],Jn=Pi&&Pi[br];if(Yn||Jn||$n){var vi=Jn||{},or=vi.columnType,Ki=(0,be.Z)(vi,di);pn.unshift(Me.createElement("col",(0,Ft.Z)({key:Rn,style:{width:Yn}},Ki))),$n=!0}}return Me.createElement("colgroup",null,pn)}var Qi=wi,Li=pe(26407),ro=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function fr(ot,tt){return(0,Me.useMemo)(function(){for(var Ut=[],Xt=0;Xt<tt;Xt+=1){var pn=ot[Xt];if(pn!==void 0)Ut[Xt]=pn;else return null}return Ut},[ot.join("_"),tt])}var Ae=Me.forwardRef(function(ot,tt){var Ut=ot.className,Xt=ot.noData,pn=ot.columns,rn=ot.flattenColumns,$n=ot.colWidths,Rn=ot.columCount,Yn=ot.stickyOffsets,Pi=ot.direction,Jn=ot.fixHeader,vi=ot.stickyTopOffset,or=ot.stickyBottomOffset,Ki=ot.stickyClassName,Vi=ot.onScroll,Xr=ot.maxContentScroll,rr=ot.children,_r=(0,be.Z)(ot,ro),jr=$e(Le,["prefixCls","scrollbarSize","isSticky"]),vo=jr.prefixCls,Uo=jr.scrollbarSize,la=jr.isSticky,so=la&&!Jn?0:Uo,Wo=Me.useRef(null),ka=Me.useCallback(function(Pa){(0,lt.mH)(tt,Pa),(0,lt.mH)(Wo,Pa)},[]);Me.useEffect(function(){var Pa;function lo(Ta){var Ua=Ta,Es=Ua.currentTarget,ls=Ua.deltaX;ls&&(Vi({currentTarget:Es,scrollLeft:Es.scrollLeft+ls}),Ta.preventDefault())}return(Pa=Wo.current)===null||Pa===void 0||Pa.addEventListener("wheel",lo),function(){var Ta;(Ta=Wo.current)===null||Ta===void 0||Ta.removeEventListener("wheel",lo)}},[]);var ho=Me.useMemo(function(){return rn.every(function(Pa){return Pa.width})},[rn]),ko=rn[rn.length-1],fo={fixed:ko?ko.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(vo,"-cell-scrollbar")}}},Dr=(0,Me.useMemo)(function(){return so?[].concat((0,Li.Z)(pn),[fo]):pn},[so,pn]),Bo=(0,Me.useMemo)(function(){return so?[].concat((0,Li.Z)(rn),[fo]):rn},[so,rn]),ea=(0,Me.useMemo)(function(){var Pa=Yn.right,lo=Yn.left;return(0,dt.Z)((0,dt.Z)({},Yn),{},{left:Pi==="rtl"?[].concat((0,Li.Z)(lo.map(function(Ta){return Ta+so})),[0]):lo,right:Pi==="rtl"?Pa:[].concat((0,Li.Z)(Pa.map(function(Ta){return Ta+so})),[0]),isSticky:la})},[so,Yn,la]),Sa=fr($n,Rn);return Me.createElement("div",{style:(0,dt.Z)({overflow:"hidden"},la?{top:vi,bottom:or}:{}),ref:ka,className:at()(Ut,(0,Ze.Z)({},Ki,!!Ki))},Me.createElement("table",{style:{tableLayout:"fixed",visibility:Xt||Sa?null:"hidden"}},(!Xt||!Xr||ho)&&Me.createElement(Qi,{colWidths:Sa?[].concat((0,Li.Z)(Sa),[so]):[],columCount:Rn+1,columns:Bo}),rr((0,dt.Z)((0,dt.Z)({},_r),{},{stickyOffsets:ea,columns:Dr,flattenColumns:Bo}))))});Ae.displayName="FixedHolder";var Ei=Me.memo(Ae);function Sr(ot){var tt=ot.cells,Ut=ot.stickyOffsets,Xt=ot.flattenColumns,pn=ot.rowComponent,rn=ot.cellComponent,$n=ot.tdCellComponent,Rn=ot.onHeaderRow,Yn=ot.index,Pi=$e(Le,["prefixCls","direction"]),Jn=Pi.prefixCls,vi=Pi.direction,or;Rn&&(or=Rn(tt.map(function(Vi){return Vi.column}),Yn));var Ki=_t(tt.map(function(Vi){return Vi.column}));return Me.createElement(pn,or,tt.map(function(Vi,Xr){var rr=Vi.column,_r=wt(Vi.colStart,Vi.colEnd,Xt,Ut,vi,rr),jr;return rr&&rr.onHeaderCell&&(jr=Vi.column.onHeaderCell(rr)),Me.createElement(kn,(0,Ft.Z)({},Vi,{scope:rr.title?Vi.colSpan>1?"colgroup":"col":null,ellipsis:rr.ellipsis,align:rr.align,component:rr.title?rn:$n,prefixCls:Jn,key:Ki[Xr]},_r,{additionalProps:jr,rowType:"header"}))}))}Sr.displayName="HeaderRow";var Fn=Sr;function xi(ot){var tt=[];function Ut($n,Rn){var Yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;tt[Yn]=tt[Yn]||[];var Pi=Rn,Jn=$n.filter(Boolean).map(function(vi){var or={key:vi.key,className:vi.className||"",children:vi.title,column:vi,colStart:Pi},Ki=1,Vi=vi.children;return Vi&&Vi.length>0&&(Ki=Ut(Vi,Pi,Yn+1).reduce(function(Xr,rr){return Xr+rr},0),or.hasSubColumns=!0),"colSpan"in vi&&(Ki=vi.colSpan),"rowSpan"in vi&&(or.rowSpan=vi.rowSpan),or.colSpan=Ki,or.colEnd=or.colStart+Ki-1,tt[Yn].push(or),Pi+=Ki,Ki});return Jn}Ut(ot,0);for(var Xt=tt.length,pn=function(Rn){tt[Rn].forEach(function(Yn){!("rowSpan"in Yn)&&!Yn.hasSubColumns&&(Yn.rowSpan=Xt-Rn)})},rn=0;rn<Xt;rn+=1)pn(rn);return tt}function zi(ot){var tt=ot.stickyOffsets,Ut=ot.columns,Xt=ot.flattenColumns,pn=ot.onHeaderRow,rn=$e(Le,["prefixCls","getComponent"]),$n=rn.prefixCls,Rn=rn.getComponent,Yn=Me.useMemo(function(){return xi(Ut)},[Ut]),Pi=Rn(["header","wrapper"],"thead"),Jn=Rn(["header","row"],"tr"),vi=Rn(["header","cell"],"th"),or=Rn(["header","cell"],"td");return Me.createElement(Pi,{className:"".concat($n,"-thead")},Yn.map(function(Ki,Vi){var Xr=Me.createElement(Fn,{key:Vi,flattenColumns:Xt,cells:Ki,stickyOffsets:tt,rowComponent:Jn,cellComponent:vi,tdCellComponent:or,onHeaderRow:pn,index:Vi});return Xr}))}var qi=ve(zi),Gn=pe(11592);function ti(ot){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof tt=="number"?tt:tt.endsWith("%")?ot*parseFloat(tt)/100:null}function Zt(ot,tt){return Me.useMemo(function(){if(tt&&tt>0){var Ut=0,Xt=0;ot.forEach(function(Pi){var Jn=ti(tt,Pi.width);Jn?Ut+=Jn:Xt+=1});var pn=tt-Ut,rn=Xt,$n=pn/Xt,Rn=0,Yn=ot.map(function(Pi){var Jn=(0,dt.Z)({},Pi),vi=ti(tt,Jn.width);if(vi)Jn.width=vi;else{var or=Math.floor($n);Jn.width=rn===1?pn:or,pn-=or,rn-=1}return Rn+=Jn.width,Jn});return[Yn,Rn]}return[ot,tt]},[ot,tt])}var Wt=["children"],Qe=["fixed"];function on(ot){return(0,Gn.Z)(ot).filter(function(tt){return Me.isValidElement(tt)}).map(function(tt){var Ut=tt.key,Xt=tt.props,pn=Xt.children,rn=(0,be.Z)(Xt,Wt),$n=(0,dt.Z)({key:Ut},rn);return pn&&($n.children=on(pn)),$n})}function cn(ot){var tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return ot.filter(function(Ut){return Ut&&(0,Ye.Z)(Ut)==="object"}).reduce(function(Ut,Xt,pn){var rn=Xt.fixed,$n=rn===!0?"left":rn,Rn="".concat(tt,"-").concat(pn),Yn=Xt.children;return Yn&&Yn.length>0?[].concat((0,Li.Z)(Ut),(0,Li.Z)(cn(Yn,Rn).map(function(Pi){return(0,dt.Z)({fixed:$n},Pi)}))):[].concat((0,Li.Z)(Ut),[(0,dt.Z)((0,dt.Z)({key:Rn},Xt),{},{fixed:$n})])},[])}function Mt(ot){for(var tt=!0,Ut=0;Ut<ot.length;Ut+=1){var Xt=ot[Ut];if(tt&&Xt.fixed!=="left")tt=!1;else if(!tt&&Xt.fixed==="left"){warning(!1,"Index ".concat(Ut-1," of `columns` missing `fixed='left'` prop."));break}}for(var pn=!0,rn=ot.length-1;rn>=0;rn-=1){var $n=ot[rn];if(pn&&$n.fixed!=="right")pn=!1;else if(!pn&&$n.fixed==="right"){warning(!1,"Index ".concat(rn+1," of `columns` missing `fixed='right'` prop."));break}}}function ht(ot){return ot.map(function(tt){var Ut=tt.fixed,Xt=(0,be.Z)(tt,Qe),pn=Ut;return Ut==="left"?pn="right":Ut==="right"&&(pn="left"),(0,dt.Z)({fixed:pn},Xt)})}function nn(ot,tt){var Ut=ot.prefixCls,Xt=ot.columns,pn=ot.children,rn=ot.expandable,$n=ot.expandedKeys,Rn=ot.columnTitle,Yn=ot.getRowKey,Pi=ot.onTriggerExpand,Jn=ot.expandIcon,vi=ot.rowExpandable,or=ot.expandIconColumnIndex,Ki=ot.direction,Vi=ot.expandRowByClick,Xr=ot.columnWidth,rr=ot.fixed,_r=ot.scrollWidth,jr=Me.useMemo(function(){return Xt||on(pn)},[Xt,pn]),vo=Me.useMemo(function(){if(rn){var ko,fo=jr.slice();if(!fo.includes(le)){var Dr=or||0;Dr>=0&&fo.splice(Dr,0,le)}var Bo=fo.indexOf(le);fo=fo.filter(function(lo,Ta){return lo!==le||Ta===Bo});var ea=jr[Bo],Sa;(rr==="left"||rr)&&!or?Sa="left":(rr==="right"||rr)&&or===jr.length?Sa="right":Sa=ea?ea.fixed:null;var Pa=(ko={},(0,Ze.Z)(ko,br,{className:"".concat(Ut,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),(0,Ze.Z)(ko,"title",Rn),(0,Ze.Z)(ko,"fixed",Sa),(0,Ze.Z)(ko,"className","".concat(Ut,"-row-expand-icon-cell")),(0,Ze.Z)(ko,"width",Xr),(0,Ze.Z)(ko,"render",function(Ta,Ua,Es){var ls=Yn(Ua,Es),qs=$n.has(ls),Ls=vi?vi(Ua):!0,Za=Jn({prefixCls:Ut,expanded:qs,expandable:Ls,record:Ua,onExpand:Pi});return Vi?Me.createElement("span",{onClick:function(ds){return ds.stopPropagation()}},Za):Za}),ko);return fo.map(function(lo){return lo===le?Pa:lo})}return jr.filter(function(lo){return lo!==le})},[rn,jr,Yn,$n,Jn,Ki]),Uo=Me.useMemo(function(){var ko=vo;return tt&&(ko=tt(ko)),ko.length||(ko=[{render:function(){return null}}]),ko},[tt,vo,Ki]),la=Me.useMemo(function(){return Ki==="rtl"?ht(cn(Uo)):cn(Uo)},[Uo,Ki,_r]),so=Zt(la,_r),Wo=(0,He.Z)(so,2),ka=Wo[0],ho=Wo[1];return[Uo,ka,ho]}var gn=nn;function _n(ot){var tt,Ut=ot.prefixCls,Xt=ot.record,pn=ot.onExpand,rn=ot.expanded,$n=ot.expandable,Rn="".concat(Ut,"-row-expand-icon");if(!$n)return Me.createElement("span",{className:at()(Rn,"".concat(Ut,"-row-spaced"))});var Yn=function(Jn){pn(Xt,Jn),Jn.stopPropagation()};return Me.createElement("span",{className:at()(Rn,(tt={},(0,Ze.Z)(tt,"".concat(Ut,"-row-expanded"),rn),(0,Ze.Z)(tt,"".concat(Ut,"-row-collapsed"),!rn),tt)),onClick:Yn})}function qn(ot,tt,Ut){var Xt=[];function pn(rn){(rn||[]).forEach(function($n,Rn){Xt.push(tt($n,Rn)),pn($n[Ut])})}return pn(ot),Xt}function Et(ot,tt,Ut){var Xt=gi(ot),pn=Xt.expandIcon,rn=Xt.expandedRowKeys,$n=Xt.defaultExpandedRowKeys,Rn=Xt.defaultExpandAllRows,Yn=Xt.expandedRowRender,Pi=Xt.onExpand,Jn=Xt.onExpandedRowsChange,vi=Xt.childrenColumnName,or=pn||_n,Ki=vi||"children",Vi=Me.useMemo(function(){return Yn?"row":ot.expandable&&ot.internalHooks===Te&&ot.expandable.__PARENT_RENDER_ICON__||tt.some(function(la){return la&&(0,Ye.Z)(la)==="object"&&la[Ki]})?"nest":!1},[!!Yn,tt]),Xr=Me.useState(function(){return $n||(Rn?qn(tt,Ut,Ki):[])}),rr=(0,He.Z)(Xr,2),_r=rr[0],jr=rr[1],vo=Me.useMemo(function(){return new Set(rn||_r||[])},[rn,_r]),Uo=Me.useCallback(function(la){var so=Ut(la,tt.indexOf(la)),Wo,ka=vo.has(so);ka?(vo.delete(so),Wo=(0,Li.Z)(vo)):Wo=[].concat((0,Li.Z)(vo),[so]),jr(Wo),Pi&&Pi(!ka,la),Jn&&Jn(Wo)},[Ut,vo,tt,Pi,Jn]);return[Xt,Vi,vo,or,Ki,Uo]}function Pn(ot,tt,Ut,Xt){var pn=ot.map(function(rn,$n){return wt($n,$n,ot,tt,Ut,Xt==null?void 0:Xt[$n])});return(0,kt.Z)(function(){return pn},[pn],function(rn,$n){return!(0,Ue.Z)(rn,$n)})}function Xn(ot){var tt=(0,Me.useRef)(ot),Ut=(0,Me.useState)({}),Xt=(0,He.Z)(Ut,2),pn=Xt[1],rn=(0,Me.useRef)(null),$n=(0,Me.useRef)([]);function Rn(Yn){$n.current.push(Yn);var Pi=Promise.resolve();rn.current=Pi,Pi.then(function(){if(rn.current===Pi){var Jn=$n.current,vi=tt.current;$n.current=[],Jn.forEach(function(or){tt.current=or(tt.current)}),rn.current=null,vi!==tt.current&&pn({})}})}return(0,Me.useEffect)(function(){return function(){rn.current=null}},[]),[tt.current,Rn]}function Ci(ot){var tt=(0,Me.useRef)(ot||null),Ut=(0,Me.useRef)();function Xt(){window.clearTimeout(Ut.current)}function pn($n){tt.current=$n,Xt(),Ut.current=window.setTimeout(function(){tt.current=null,Ut.current=void 0},100)}function rn(){return tt.current}return(0,Me.useEffect)(function(){return Xt},[]),[pn,rn]}function tn(){var ot=Me.useState(-1),tt=(0,He.Z)(ot,2),Ut=tt[0],Xt=tt[1],pn=Me.useState(-1),rn=(0,He.Z)(pn,2),$n=rn[0],Rn=rn[1],Yn=Me.useCallback(function(Pi,Jn){Xt(Pi),Rn(Jn)},[]);return[Ut,$n,Yn]}var sn=pe(47273),In=(0,sn.Z)()?window:null;function ji(ot,tt){var Ut=(0,Ye.Z)(ot)==="object"?ot:{},Xt=Ut.offsetHeader,pn=Xt===void 0?0:Xt,rn=Ut.offsetSummary,$n=rn===void 0?0:rn,Rn=Ut.offsetScroll,Yn=Rn===void 0?0:Rn,Pi=Ut.getContainer,Jn=Pi===void 0?function(){return In}:Pi,vi=Jn()||In;return Me.useMemo(function(){var or=!!ot;return{isSticky:or,stickyClassName:or?"".concat(tt,"-sticky-holder"):"",offsetHeader:pn,offsetSummary:$n,offsetScroll:Yn,container:vi}},[Yn,pn,$n,tt,vi])}function Ai(ot,tt,Ut){var Xt=(0,Me.useMemo)(function(){for(var pn=[],rn=[],$n=0,Rn=0,Yn=0;Yn<tt;Yn+=1)if(Ut==="rtl"){rn[Yn]=Rn,Rn+=ot[Yn]||0;var Pi=tt-Yn-1;pn[Pi]=$n,$n+=ot[Pi]||0}else{pn[Yn]=$n,$n+=ot[Yn]||0;var Jn=tt-Yn-1;rn[Jn]=Rn,Rn+=ot[Jn]||0}return{left:pn,right:rn}},[ot,tt,Ut]);return Xt}var Si=Ai;function ki(ot){var tt=ot.className,Ut=ot.children;return Me.createElement("div",{className:tt},Ut)}var Ni=ki,ir=pe(8224),zr=pe(55468),Vr=function(tt,Ut){var Xt,pn,rn=tt.scrollBodyRef,$n=tt.onScroll,Rn=tt.offsetScroll,Yn=tt.container,Pi=$e(Le,"prefixCls"),Jn=((Xt=rn.current)===null||Xt===void 0?void 0:Xt.scrollWidth)||0,vi=((pn=rn.current)===null||pn===void 0?void 0:pn.clientWidth)||0,or=Jn&&vi*(vi/Jn),Ki=Me.useRef(),Vi=Xn({scrollLeft:0,isHiddenScrollBar:!1}),Xr=(0,He.Z)(Vi,2),rr=Xr[0],_r=Xr[1],jr=Me.useRef({delta:0,x:0}),vo=Me.useState(!1),Uo=(0,He.Z)(vo,2),la=Uo[0],so=Uo[1],Wo=function(){so(!1)},ka=function(Bo){Bo.persist(),jr.current.delta=Bo.pageX-rr.scrollLeft,jr.current.x=0,so(!0),Bo.preventDefault()},ho=function(Bo){var ea,Sa=Bo||((ea=window)===null||ea===void 0?void 0:ea.event),Pa=Sa.buttons;if(!la||Pa===0){la&&so(!1);return}var lo=jr.current.x+Bo.pageX-jr.current.x-jr.current.delta;lo<=0&&(lo=0),lo+or>=vi&&(lo=vi-or),$n({scrollLeft:lo/vi*(Jn+2)}),jr.current.x=Bo.pageX},ko=function(){if(rn.current){var Bo=(0,zr.os)(rn.current).top,ea=Bo+rn.current.offsetHeight,Sa=Yn===window?document.documentElement.scrollTop+window.innerHeight:(0,zr.os)(Yn).top+Yn.clientHeight;ea-(0,$t.Z)()<=Sa||Bo>=Sa-Rn?_r(function(Pa){return(0,dt.Z)((0,dt.Z)({},Pa),{},{isHiddenScrollBar:!0})}):_r(function(Pa){return(0,dt.Z)((0,dt.Z)({},Pa),{},{isHiddenScrollBar:!1})})}},fo=function(Bo){_r(function(ea){return(0,dt.Z)((0,dt.Z)({},ea),{},{scrollLeft:Bo/Jn*vi||0})})};return Me.useImperativeHandle(Ut,function(){return{setScrollLeft:fo}}),Me.useEffect(function(){var Dr=(0,ir.Z)(document.body,"mouseup",Wo,!1),Bo=(0,ir.Z)(document.body,"mousemove",ho,!1);return ko(),function(){Dr.remove(),Bo.remove()}},[or,la]),Me.useEffect(function(){var Dr=(0,ir.Z)(Yn,"scroll",ko,!1),Bo=(0,ir.Z)(window,"resize",ko,!1);return function(){Dr.remove(),Bo.remove()}},[Yn]),Me.useEffect(function(){rr.isHiddenScrollBar||_r(function(Dr){var Bo=rn.current;return Bo?(0,dt.Z)((0,dt.Z)({},Dr),{},{scrollLeft:Bo.scrollLeft/Bo.scrollWidth*Bo.clientWidth}):Dr})},[rr.isHiddenScrollBar]),Jn<=vi||!or||rr.isHiddenScrollBar?null:Me.createElement("div",{style:{height:(0,$t.Z)(),width:vi,bottom:Rn},className:"".concat(Pi,"-sticky-scroll")},Me.createElement("div",{onMouseDown:ka,ref:Ki,className:at()("".concat(Pi,"-sticky-scroll-bar"),(0,Ze.Z)({},"".concat(Pi,"-sticky-scroll-bar-active"),la)),style:{width:"".concat(or,"px"),transform:"translate3d(".concat(rr.scrollLeft,"px, 0, 0)")}}))},Zn=Me.forwardRef(Vr);function io(ot){return null}var Yr=io;function Fr(ot){return null}var wn=Fr,ri="rc-table",Ui=[],Pr={};function er(){return"No Data"}function Cr(ot){var tt,Ut=(0,dt.Z)({rowKey:"key",prefixCls:ri,emptyText:er},ot),Xt=Ut.prefixCls,pn=Ut.className,rn=Ut.rowClassName,$n=Ut.style,Rn=Ut.data,Yn=Ut.rowKey,Pi=Ut.scroll,Jn=Ut.tableLayout,vi=Ut.direction,or=Ut.title,Ki=Ut.footer,Vi=Ut.summary,Xr=Ut.caption,rr=Ut.id,_r=Ut.showHeader,jr=Ut.components,vo=Ut.emptyText,Uo=Ut.onRow,la=Ut.onHeaderRow,so=Ut.internalHooks,Wo=Ut.transformColumns,ka=Ut.internalRefs,ho=Ut.tailor,ko=Ut.sticky,fo=Rn||Ui,Dr=!!fo.length,Bo=so===Te,ea=Me.useCallback(function(hs,Js){return(0,xt.Z)(jr,hs)||Js},[jr]),Sa=Me.useMemo(function(){return typeof Yn=="function"?Yn:function(hs){var Js=hs&&hs[Yn];return Js}},[Yn]),Pa=ea(["body"]),lo=tn(),Ta=(0,He.Z)(lo,3),Ua=Ta[0],Es=Ta[1],ls=Ta[2],qs=Et(Ut,fo,Sa),Ls=(0,He.Z)(qs,6),Za=Ls[0],sa=Ls[1],ds=Ls[2],el=Ls[3],Ws=Ls[4],cl=Ls[5],ba=Pi==null?void 0:Pi.x,ca=Me.useState(0),wa=(0,He.Z)(ca,2),Jo=wa[0],xs=wa[1],Yo=gn((0,dt.Z)((0,dt.Z)((0,dt.Z)({},Ut),Za),{},{expandable:!!Za.expandedRowRender,columnTitle:Za.columnTitle,expandedKeys:ds,getRowKey:Sa,onTriggerExpand:cl,expandIcon:el,expandIconColumnIndex:Za.expandIconColumnIndex,direction:vi,scrollWidth:Bo&&ho&&typeof ba=="number"?ba:null}),Bo?Wo:null),Ra=(0,He.Z)(Yo,3),os=Ra[0],us=Ra[1],Al=Ra[2],bl=Al!=null?Al:ba,Vl=Me.useMemo(function(){return{columns:os,flattenColumns:us}},[os,us]),bs=Me.useRef(),Zl=Me.useRef(),dl=Me.useRef(),Fl=Me.useRef(),_c=Me.useRef(),Fs=Me.useState(!1),ks=(0,He.Z)(Fs,2),Bs=ks[0],Gs=ks[1],pl=Me.useState(!1),ns=(0,He.Z)(pl,2),js=ns[0],Dl=ns[1],Ul=Xn(new Map),Gu=(0,He.Z)(Ul,2),Du=Gu[0],ml=Gu[1],Iu=_t(us),Ou=Iu.map(function(hs){return Du.get(hs)}),Ns=Me.useMemo(function(){return Ou},[Ou.join("_")]),Hl=Si(Ns,us.length,vi),$s=Pi&&vn(Pi.y),zs=Pi&&vn(bl)||!!Za.fixed,$u=zs&&us.some(function(hs){var Js=hs.fixed;return Js}),Vc=Me.useRef(),sc=ji(ko,Xt),lc=sc.isSticky,Ku=sc.offsetHeader,ku=sc.offsetSummary,Ss=sc.offsetScroll,Ys=sc.stickyClassName,vl=sc.container,Xs=Me.useMemo(function(){return Vi==null?void 0:Vi(fo)},[Vi,fo]),gs=($s||lc)&&Me.isValidElement(Xs)&&Xs.type===xe&&Xs.props.fixed,yl,Su,xc;$s&&(Su={overflowY:"scroll",maxHeight:Pi.y}),zs&&(yl={overflowX:"auto"},$s||(Su={overflowY:"hidden"}),xc={width:bl===!0?"auto":bl,minWidth:"100%"});var jd=Me.useCallback(function(hs,Js){(0,Dt.Z)(bs.current)&&ml(function(nu){if(nu.get(hs)!==Js){var uc=new Map(nu);return uc.set(hs,Js),uc}return nu})},[]),hn=Ci(null),sd=(0,He.Z)(hn,2),Bc=sd[0],df=sd[1];function zd(hs,Js){Js&&(typeof Js=="function"?Js(hs):Js.scrollLeft!==hs&&(Js.scrollLeft=hs,Js.scrollLeft!==hs&&setTimeout(function(){Js.scrollLeft=hs},0)))}var Zd=(0,ut.Z)(function(hs){var Js=hs.currentTarget,nu=hs.scrollLeft,uc=vi==="rtl",cc=typeof nu=="number"?nu:Js.scrollLeft,$d=Js||Pr;if(!df()||df()===$d){var cd;Bc($d),zd(cc,Zl.current),zd(cc,dl.current),zd(cc,_c.current),zd(cc,(cd=Vc.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!==Jo&&(Rh(),xs(bs.current?bs.current.offsetWidth:nu))},Bl=Me.useRef(!1);Me.useEffect(function(){Bl.current&&Rh()},[zs,Rn,os.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],Vu=fh[1];Me.useEffect(function(){(!ho||!Bo)&&(dl.current instanceof Element?hf((0,$t.o)(dl.current).width):hf((0,$t.o)(Fl.current).width)),Vu((0,ft.G)("position","sticky"))},[]),Me.useEffect(function(){Bo&&ka&&(ka.body.current=dl.current)});var Wd=Me.useCallback(function(hs){return Me.createElement(Me.Fragment,null,Me.createElement(qi,hs),gs==="top"&&Me.createElement(Lt,hs,Xs))},[gs,Xs]),ff=Me.useCallback(function(hs){return Me.createElement(Lt,hs,Xs)},[Xs]),Mc=ea(["table"],"table"),ld=Me.useMemo(function(){return Jn||($u?bl==="max-content"?"auto":"fixed":$s||lc||us.some(function(hs){var Js=hs.ellipsis;return Js})?"fixed":"auto")},[$s,$u,us,Jn,lc]),Gd,Bd={colWidths:Ns,columCount:us.length,stickyOffsets:Hl,onHeaderRow:la,fixHeader:$s,scroll:Pi},Pu=Me.useMemo(function(){return Dr?null:typeof vo=="function"?vo():vo},[Dr,vo]),Md=Me.createElement(Hi,{data:fo,measureColumnWidth:$s||zs||lc}),_h=Me.createElement(Qi,{colWidths:us.map(function(hs){var Js=hs.width;return Js}),columns:us}),Tu=Xr!=null?Me.createElement("caption",{className:"".concat(Xt,"-caption")},Xr):void 0,Uc=(0,xn.Z)(Ut,{data:!0}),ph=(0,xn.Z)(Ut,{aria:!0});if($s||lc){var mh;typeof Pa=="function"?(mh=Pa(fo,{scrollbarSize:hh,ref:dl,onScroll:Zd}),Bd.colWidths=us.map(function(hs,Js){var nu=hs.width,uc=Js===us.length-1?nu-hh:nu;return typeof uc=="number"&&!Number.isNaN(uc)?uc:0})):mh=Me.createElement("div",{style:(0,dt.Z)((0,dt.Z)({},yl),Su),onScroll:Zd,ref:dl,className:at()("".concat(Xt,"-body"))},Me.createElement(Mc,(0,Ft.Z)({style:(0,dt.Z)((0,dt.Z)({},xc),{},{tableLayout:ld})},ph),Tu,_h,Md,!gs&&Xs&&Me.createElement(Lt,{stickyOffsets:Hl,flattenColumns:us,columns:os},Xs)));var ud=(0,dt.Z)((0,dt.Z)((0,dt.Z)({noData:!fo.length,maxContentScroll:zs&&bl==="max-content"},Bd),Vl),{},{direction:vi,stickyClassName:Ys,onScroll:Zd});Gd=Me.createElement(Me.Fragment,null,_r!==!1&&Me.createElement(Ei,(0,Ft.Z)({},ud,{stickyTopOffset:Ku,className:"".concat(Xt,"-header"),ref:Zl}),Wd),mh,gs&&gs!=="top"&&Me.createElement(Ei,(0,Ft.Z)({},ud,{stickyBottomOffset:ku,className:"".concat(Xt,"-summary"),ref:_c}),ff),lc&&Me.createElement(Zn,{ref:Vc,offsetScroll:Ss,scrollBodyRef:dl,onScroll:Zd,container:vl}))}else Gd=Me.createElement("div",{style:(0,dt.Z)((0,dt.Z)({},yl),Su),className:at()("".concat(Xt,"-content")),onScroll:Zd,ref:dl},Me.createElement(Mc,(0,Ft.Z)({style:(0,dt.Z)((0,dt.Z)({},xc),{},{tableLayout:ld})},ph),Tu,_h,_r!==!1&&Me.createElement(qi,(0,Ft.Z)({},Bd,Vl)),Md,Xs&&Me.createElement(Lt,{stickyOffsets:Hl,flattenColumns:us,columns:os},Xs)));var lu=Me.createElement("div",(0,Ft.Z)({className:at()(Xt,pn,(tt={},(0,Ze.Z)(tt,"".concat(Xt,"-rtl"),vi==="rtl"),(0,Ze.Z)(tt,"".concat(Xt,"-ping-left"),Bs),(0,Ze.Z)(tt,"".concat(Xt,"-ping-right"),js),(0,Ze.Z)(tt,"".concat(Xt,"-layout-fixed"),Jn==="fixed"),(0,Ze.Z)(tt,"".concat(Xt,"-fixed-header"),$s),(0,Ze.Z)(tt,"".concat(Xt,"-fixed-column"),$u),(0,Ze.Z)(tt,"".concat(Xt,"-scroll-horizontal"),zs),(0,Ze.Z)(tt,"".concat(Xt,"-has-fix-left"),us[0]&&us[0].fixed),(0,Ze.Z)(tt,"".concat(Xt,"-has-fix-right"),us[us.length-1]&&us[us.length-1].fixed==="right"),tt)),style:$n,id:rr,ref:bs},Uc),or&&Me.createElement(Ni,{className:"".concat(Xt,"-title")},or(fo)),Me.createElement("div",{ref:Fl,className:"".concat(Xt,"-container")},Gd),Ki&&Me.createElement(Ni,{className:"".concat(Xt,"-footer")},Ki(fo)));zs&&(lu=Me.createElement(Bt.Z,{onResize:Qg},lu));var jh=Pn(us,Hl,vi,os),Ml=Me.useMemo(function(){return{scrollX:bl,prefixCls:Xt,getComponent:ea,scrollbarSize:hh,direction:vi,fixedInfoList:jh,isSticky:lc,supportSticky:gh,componentWidth:Jo,fixHeader:$s,fixColumn:$u,horizonScroll:zs,tableLayout:ld,rowClassName:rn,expandedRowClassName:Za.expandedRowClassName,expandIcon:el,expandableType:sa,expandRowByClick:Za.expandRowByClick,expandedRowRender:Za.expandedRowRender,onTriggerExpand:cl,expandIconColumnIndex:Za.expandIconColumnIndex,indentSize:Za.indentSize,allColumnsFixedLeft:us.every(function(hs){return hs.fixed==="left"}),emptyNode:Pu,columns:os,flattenColumns:us,onColumnResize:jd,hoverStartRow:Ua,hoverEndRow:Es,onHover:ls,rowExpandable:Za.rowExpandable,onRow:Uo,getRowKey:Sa,expandedKeys:ds,childrenColumnName:Ws}},[bl,Xt,ea,hh,vi,jh,lc,gh,Jo,$s,$u,zs,ld,rn,Za.expandedRowClassName,el,sa,Za.expandRowByClick,Za.expandedRowRender,cl,Za.expandIconColumnIndex,Za.indentSize,Pu,os,us,jd,Ua,Es,ls,Za.rowExpandable,Uo,Sa,ds,Ws]);return Me.createElement(Le.Provider,{value:Ml},lu)}function qr(ot){return he(Cr,ot)}var Zr=qr();Zr.EXPAND_COLUMN=le,Zr.INTERNAL_HOOKS=Te,Zr.Column=Yr,Zr.ColumnGroup=wn,Zr.Summary=et;var Ir=Zr,Ur=pe(4409),Vn=Pt(null),Xo=Pt(null);function Un(ot,tt,Ut){var Xt=tt||1;return Ut[ot+Xt]-(Ut[ot]||0)}function Io(ot){var tt=ot.rowInfo,Ut=ot.column,Xt=ot.colIndex,pn=ot.indent,rn=ot.index,$n=ot.renderIndex,Rn=ot.record,Yn=ot.style,Pi=ot.className,Jn=ot.inverse,vi=ot.getHeight,or=Ut.render,Ki=Ut.dataIndex,Vi=Ut.className,Xr=Ut.width,rr=$e(Xo,["columnsOffset"]),_r=rr.columnsOffset,jr=Qn(tt,Ut,Xt,pn,rn),vo=jr.key,Uo=jr.fixedInfo,la=jr.appendCellNode,so=jr.additionalCellProps,Wo=so.style,ka=so.colSpan,ho=ka===void 0?1:ka,ko=so.rowSpan,fo=ko===void 0?1:ko,Dr=Xt-1,Bo=Un(Dr,ho,_r),ea=ho>1?Xr-Bo:0,Sa=(0,dt.Z)((0,dt.Z)((0,dt.Z)({},Wo),Yn),{},{flex:"0 0 ".concat(Bo,"px"),width:"".concat(Bo,"px"),marginRight:ea,pointerEvents:"auto"}),Pa=Me.useMemo(function(){return Jn?fo<=1:ho===0||fo===0||fo>1},[fo,ho,Jn]);Pa?Sa.visibility="hidden":Jn&&(Sa.height=vi==null?void 0:vi(fo));var lo=Pa?function(){return null}:or,Ta={};return(fo===0||ho===0)&&(Ta.rowSpan=1,Ta.colSpan=1),Me.createElement(kn,(0,Ft.Z)({className:at()(Vi,Pi),ellipsis:Ut.ellipsis,align:Ut.align,scope:Ut.rowScope,component:"div",prefixCls:tt.prefixCls,key:vo,record:Rn,index:rn,renderIndex:$n,dataIndex:Ki,render:lo,shouldCellUpdate:Ut.shouldCellUpdate},Uo,{appendNode:la,additionalProps:(0,dt.Z)((0,dt.Z)({},so),{},{style:Sa},Ta)}))}var Go=Io,tr=["data","index","className","rowKey","style","extra","getHeight"],ia=Me.forwardRef(function(ot,tt){var Ut=ot.data,Xt=ot.index,pn=ot.className,rn=ot.rowKey,$n=ot.style,Rn=ot.extra,Yn=ot.getHeight,Pi=(0,be.Z)(ot,tr),Jn=Ut.record,vi=Ut.indent,or=Ut.index,Ki=$e(Le,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Vi=Ki.scrollX,Xr=Ki.flattenColumns,rr=Ki.prefixCls,_r=Ki.fixColumn,jr=Ki.componentWidth,vo=dn(Jn,rn,Xt,vi),Uo=vo.rowSupportExpand,la=vo.expanded,so=vo.rowProps,Wo=vo.expandedRowRender,ka=vo.expandedRowClassName,ho;if(Uo&&la){var ko=Wo(Jn,Xt,vi+1,la),fo=ka==null?void 0:ka(Jn,Xt,vi),Dr={};_r&&(Dr={style:(0,Ze.Z)({},"--virtual-width","".concat(jr,"px"))});var Bo="".concat(rr,"-expanded-row-cell");ho=Me.createElement("div",{className:at()("".concat(rr,"-expanded-row"),"".concat(rr,"-expanded-row-level-").concat(vi+1),fo)},Me.createElement(kn,{component:"div",prefixCls:rr,className:at()(Bo,(0,Ze.Z)({},"".concat(Bo,"-fixed"),_r)),additionalProps:Dr},ko))}var ea=(0,dt.Z)((0,dt.Z)({},$n),{},{width:Vi});Rn&&(ea.position="absolute",ea.pointerEvents="none");var Sa=Me.createElement("div",(0,Ft.Z)({},so,Pi,{ref:Uo?null:tt,className:at()(pn,"".concat(rr,"-row"),so==null?void 0:so.className,(0,Ze.Z)({},"".concat(rr,"-row-extra"),Rn)),style:(0,dt.Z)((0,dt.Z)({},ea),so==null?void 0:so.style)}),Xr.map(function(Pa,lo){return Me.createElement(Go,{key:lo,rowInfo:vo,column:Pa,colIndex:lo,indent:vi,index:Xt,renderIndex:or,record:Jn,inverse:Rn,getHeight:Yn})}));return Uo?Me.createElement("div",{ref:tt},Sa,ho):Sa}),zo=ve(ia),Nr=zo,Br=Me.forwardRef(function(ot,tt){var Ut=ot.data,Xt=ot.onScroll,pn=$e(Le,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","emptyNode","scrollX"]),rn=pn.flattenColumns,$n=pn.onColumnResize,Rn=pn.getRowKey,Yn=pn.expandedKeys,Pi=pn.prefixCls,Jn=pn.childrenColumnName,vi=pn.emptyNode,or=pn.scrollX,Ki=$e(Vn),Vi=Ki.scrollY,Xr=Ki.listItemHeight,rr=Me.useRef(),_r=Jt(Ut,Jn,Yn,Rn),jr=Me.useMemo(function(){var ho=0;return rn.map(function(ko){var fo=ko.width,Dr=ko.key;return ho+=fo,[Dr,fo,ho]})},[rn]),vo=Me.useMemo(function(){return jr.map(function(ho){return ho[2]})},[jr]);Me.useEffect(function(){jr.forEach(function(ho){var ko=(0,He.Z)(ho,2),fo=ko[0],Dr=ko[1];$n(fo,Dr)})},[jr]),Me.useImperativeHandle(tt,function(){var ho={};return Object.defineProperty(ho,"scrollLeft",{get:function(){var fo;return((fo=rr.current)===null||fo===void 0?void 0:fo.getScrollInfo().x)||0},set:function(fo){var Dr;(Dr=rr.current)===null||Dr===void 0||Dr.scrollTo({left:fo})}}),ho});var Uo=function(ko,fo){var Dr,Bo=(Dr=_r[fo])===null||Dr===void 0?void 0:Dr.record,ea=ko.onCell;if(ea){var Sa,Pa=ea(Bo,fo);return(Sa=Pa==null?void 0:Pa.rowSpan)!==null&&Sa!==void 0?Sa:1}return 1},la=function(ko){var fo=ko.start,Dr=ko.end,Bo=ko.getSize,ea=ko.offsetY;if(Dr<0)return null;for(var Sa=rn.filter(function(ba){return Uo(ba,fo)===0}),Pa=fo,lo=function(ca){if(Sa=Sa.filter(function(wa){return Uo(wa,ca)===0}),!Sa.length)return Pa=ca,"break"},Ta=fo;Ta>=0;Ta-=1){var Ua=lo(Ta);if(Ua==="break")break}for(var Es=rn.filter(function(ba){return Uo(ba,Dr)!==1}),ls=Dr,qs=function(ca){if(Es=Es.filter(function(wa){return Uo(wa,ca)!==1}),!Es.length)return ls=Math.max(ca-1,Dr),"break"},Ls=Dr;Ls<_r.length;Ls+=1){var Za=qs(Ls);if(Za==="break")break}for(var sa=[],ds=function(ca){var wa=_r[ca];if(!wa)return"continue";rn.some(function(Jo){return Uo(Jo,ca)>1})&&sa.push(ca)},el=Pa;el<=ls;el+=1)var Ws=ds(el);var cl=sa.map(function(ba){var ca=_r[ba],wa=Rn(ca.record,ba),Jo=function(Ra){var os=ba+Ra-1,us=Rn(_r[os].record,os),Al=Bo(wa,us);return Al.bottom-Al.top},xs=Bo(wa);return Me.createElement(Nr,{key:ba,data:ca,rowKey:wa,index:ba,style:{top:-ea+xs.top},extra:!0,getHeight:Jo})});return cl},so=Me.useMemo(function(){return{columnsOffset:vo}},[vo]),Wo="".concat(Pi,"-tbody"),ka;return _r.length?ka=Me.createElement(Ur.Z,{fullHeight:!1,ref:rr,className:at()(Wo,"".concat(Wo,"-virtual")),height:Vi,itemHeight:Xr||24,data:_r,itemKey:function(ko){return Rn(ko.record)},scrollWidth:or,onVirtualScroll:function(ko){var fo=ko.x;Xt({scrollLeft:fo})},extraRender:la},function(ho,ko,fo){var Dr=Rn(ho.record,ko);return Me.createElement(Nr,(0,Ft.Z)({data:ho,rowKey:Dr,index:ko},fo))}):ka=Me.createElement("div",{className:at()("".concat(Pi,"-placeholder"))},Me.createElement(kn,{component:"div",prefixCls:Pi},vi)),Me.createElement(Xo.Provider,{value:so},ka)}),xo=ve(Br),$o=xo,$i=function(tt,Ut){var Xt=Ut.ref,pn=Ut.onScroll;return Me.createElement($o,{ref:Xt,data:tt,onScroll:pn})},st=100;function ra(ot){var tt=ot.columns,Ut=ot.scroll,Xt=ot.prefixCls,pn=Xt===void 0?ri:Xt,rn=ot.className,$n=ot.listItemHeight,Rn=Ut||{},Yn=Rn.x,Pi=Rn.y;typeof Yn!="number"&&(Yn=((tt||[]).length+1)*st),typeof Pi!="number"&&(Pi=500);var Jn=Me.useMemo(function(){return{scrollY:Pi,listItemHeight:$n}},[Pi,$n]);return Me.createElement(Vn.Provider,{value:Jn},Me.createElement(Ir,(0,Ft.Z)({},ot,{className:at()(rn,"".concat(pn,"-virtual")),scroll:(0,dt.Z)((0,dt.Z)({},Ut),{},{x:Yn}),components:{body:$i},columns:tt,internalHooks:Te,tailor:!0})))}function va(ot){return he(ra,ot)}var Ma=va(),Ps=null;function Ha(ot){return null}var Ms=Ha;function bo(ot){return null}var wo=bo,Jr=pe(2738),ha=pe(68031),Ia=pe(36355),Eo=pe(93891),Gr=pe(19716),mi=pe(8628),oo=pe(31724),ao=pe(58421),Ga=pe(71418),Ca=pe(88088);function fa(ot){return function(Ut){let{prefixCls:Xt,onExpand:pn,record:rn,expanded:$n,expandable:Rn}=Ut;const Yn=`${Xt}-row-expand-icon`;return Me.createElement("button",{type:"button",onClick:Pi=>{pn(rn,Pi),Pi.stopPropagation()},className:at()(Yn,{[`${Yn}-spaced`]:!Rn,[`${Yn}-expanded`]:Rn&&$n,[`${Yn}-collapsed`]:Rn&&!$n}),"aria-label":$n?ot.collapse:ot.expand,"aria-expanded":$n})}}var Ka=fa;function Qa(ot,tt){return"key"in ot&&ot.key!==void 0&&ot.key!==null?ot.key:ot.dataIndex?Array.isArray(ot.dataIndex)?ot.dataIndex.join("."):ot.dataIndex:tt}function Cs(ot,tt){return tt?`${tt}-${ot}`:`${ot}`}function ms(ot,tt){return typeof ot=="function"?ot(tt):ot}function Zs(ot,tt){const Ut=ms(ot,tt);return Object.prototype.toString.call(Ut)==="[object Object]"?"":Ut}var Bn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},ys=Bn,oa=pe(7657),hl=function(tt,Ut){return Me.createElement(oa.Z,(0,Ft.Z)({},tt,{ref:Ut,icon:ys}))},Ol=Me.forwardRef(hl),as=Ol,yu=pe(56762);function eu(ot){const tt=Me.useRef(ot),Ut=(0,yu.Z)();return[()=>tt.current,Xt=>{tt.current=Xt,Ut()}]}var fs=pe(3113),Ba=pe(24905),tu=pe(38854),Ao=pe(64165),Ea=pe(20834),ua=pe(40875),hr=pe(5112),Rs=pe(17574),ss=pe(47472),sl=pe(92832);function jl(ot){let{value:tt,onChange:Ut,filterSearch:Xt,tablePrefixCls:pn,locale:rn}=ot;return Xt?Me.createElement("div",{className:`${pn}-filter-dropdown-search`},Me.createElement(sl.default,{prefix:Me.createElement(ss.Z,null),placeholder:rn.filterSearchPlaceholder,onChange:Ut,value:tt,htmlSize:1,className:`${pn}-filter-dropdown-search-input`})):null}var ou=jl,Xi=pe(10228);const ws=ot=>{const{keyCode:tt}=ot;tt===Xi.Z.ENTER&&ot.stopPropagation()};var $l=Me.forwardRef((ot,tt)=>Me.createElement("div",{className:ot.className,onClick:Ut=>Ut.stopPropagation(),onKeyDown:ws,ref:tt},ot.children));function kl(ot){let tt=[];return(ot||[]).forEach(Ut=>{let{value:Xt,children:pn}=Ut;tt.push(Xt),pn&&(tt=[].concat((0,Li.Z)(tt),(0,Li.Z)(kl(pn))))}),tt}function Kl(ot){return ot.some(tt=>{let{children:Ut}=tt;return Ut})}function Oo(ot,tt){return typeof tt=="string"||typeof tt=="number"?tt==null?void 0:tt.toString().toLowerCase().includes(ot.trim().toLowerCase()):!1}function ic(ot){let{filters:tt,prefixCls:Ut,filteredKeys:Xt,filterMultiple:pn,searchValue:rn,filterSearch:$n}=ot;return tt.map((Rn,Yn)=>{const Pi=String(Rn.value);if(Rn.children)return{key:Pi||Yn,label:Rn.text,popupClassName:`${Ut}-dropdown-submenu`,children:ic({filters:Rn.children,prefixCls:Ut,filteredKeys:Xt,filterMultiple:pn,searchValue:rn,filterSearch:$n})};const Jn=pn?Ba.default:hr.ZP,vi={key:Rn.value!==void 0?Pi:Yn,label:Me.createElement(Me.Fragment,null,Me.createElement(Jn,{checked:Xt.includes(Pi)}),Me.createElement("span",null,Rn.text))};return rn.trim()?typeof $n=="function"?$n(rn,Rn)?vi:null:Oo(rn,Rn.text)?vi:null:vi})}function zl(ot){var tt,Ut;const{tablePrefixCls:Xt,prefixCls:pn,column:rn,dropdownPrefixCls:$n,columnKey:Rn,filterMultiple:Yn,filterMode:Pi="menu",filterSearch:Jn=!1,filterState:vi,triggerFilter:or,locale:Ki,children:Vi,getPopupContainer:Xr}=ot,{filterDropdownOpen:rr,onFilterDropdownOpenChange:_r,filterResetToDefaultFilteredValue:jr,defaultFilteredValue:vo,filterDropdownVisible:Uo,onFilterDropdownVisibleChange:la}=rn,[so,Wo]=Me.useState(!1),ka=!!(vi&&(!((tt=vi.filteredKeys)===null||tt===void 0)&&tt.length||vi.forceFiltered)),ho=Yo=>{Wo(Yo),_r==null||_r(Yo),la==null||la(Yo)},ko=(Ut=rr!=null?rr:Uo)!==null&&Ut!==void 0?Ut:so,fo=vi==null?void 0:vi.filteredKeys,[Dr,Bo]=eu(fo||[]),ea=Yo=>{let{selectedKeys:Ra}=Yo;Bo(Ra)},Sa=(Yo,Ra)=>{let{node:os,checked:us}=Ra;ea(Yn?{selectedKeys:Yo}:{selectedKeys:us&&os.key?[os.key]:[]})};Me.useEffect(()=>{so&&ea({selectedKeys:fo||[]})},[fo]);const[Pa,lo]=Me.useState([]),Ta=Yo=>{lo(Yo)},[Ua,Es]=Me.useState(""),ls=Yo=>{const{value:Ra}=Yo.target;Es(Ra)};Me.useEffect(()=>{so||Es("")},[so]);const qs=Yo=>{const Ra=Yo&&Yo.length?Yo:null;if(Ra===null&&(!vi||!vi.filteredKeys)||(0,Ue.Z)(Ra,vi==null?void 0:vi.filteredKeys,!0))return null;or({column:rn,key:Rn,filteredKeys:Ra})},Ls=()=>{ho(!1),qs(Dr())},Za=function(){let{confirm:Yo,closeDropdown:Ra}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};Yo&&qs([]),Ra&&ho(!1),Es(""),Bo(jr?(vo||[]).map(os=>String(os)):[])},sa=function(){let{closeDropdown:Yo}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};Yo&&ho(!1),qs(Dr())},ds=Yo=>{Yo&&fo!==void 0&&Bo(fo||[]),ho(Yo),!Yo&&!rn.filterDropdown&&Ls()},el=at()({[`${$n}-menu-without-submenu`]:!Kl(rn.filters||[])}),Ws=Yo=>{if(Yo.target.checked){const Ra=kl(rn==null?void 0:rn.filters).map(os=>String(os));Bo(Ra)}else Bo([])},cl=Yo=>{let{filters:Ra}=Yo;return(Ra||[]).map((os,us)=>{const Al=String(os.value),bl={title:os.text,key:os.value!==void 0?Al:us};return os.children&&(bl.children=cl({filters:os.children})),bl})},ba=Yo=>{var Ra;return Object.assign(Object.assign({},Yo),{text:Yo.title,value:Yo.key,children:((Ra=Yo.children)===null||Ra===void 0?void 0:Ra.map(os=>ba(os)))||[]})};let ca;if(typeof rn.filterDropdown=="function")ca=rn.filterDropdown({prefixCls:`${$n}-custom`,setSelectedKeys:Yo=>ea({selectedKeys:Yo}),selectedKeys:Dr(),confirm:sa,clearFilters:Za,filters:rn.filters,visible:ko,close:()=>{ho(!1)}});else if(rn.filterDropdown)ca=rn.filterDropdown;else{const Yo=Dr()||[],Ra=()=>(rn.filters||[]).length===0?Me.createElement(Ao.Z,{image:Ao.Z.PRESENTED_IMAGE_SIMPLE,description:Ki.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):Pi==="tree"?Me.createElement(Me.Fragment,null,Me.createElement(ou,{filterSearch:Jn,value:Ua,onChange:ls,tablePrefixCls:Xt,locale:Ki}),Me.createElement("div",{className:`${Xt}-filter-dropdown-tree`},Yn?Me.createElement(Ba.default,{checked:Yo.length===kl(rn.filters).length,indeterminate:Yo.length>0&&Yo.length<kl(rn.filters).length,className:`${Xt}-filter-dropdown-checkall`,onChange:Ws},Ki.filterCheckall):null,Me.createElement(Rs.default,{checkable:!0,selectable:!1,blockNode:!0,multiple:Yn,checkStrictly:!Yn,className:`${$n}-menu`,onCheck:Sa,checkedKeys:Yo,selectedKeys:Yo,showIcon:!1,treeData:cl({filters:rn.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Ua.trim()?us=>typeof Jn=="function"?Jn(Ua,ba(us)):Oo(Ua,us.title):void 0}))):Me.createElement(Me.Fragment,null,Me.createElement(ou,{filterSearch:Jn,value:Ua,onChange:ls,tablePrefixCls:Xt,locale:Ki}),Me.createElement(Ea.default,{selectable:!0,multiple:Yn,prefixCls:`${$n}-menu`,className:el,onSelect:ea,onDeselect:ea,selectedKeys:Yo,getPopupContainer:Xr,openKeys:Pa,onOpenChange:Ta,items:ic({filters:rn.filters||[],filterSearch:Jn,prefixCls:pn,filteredKeys:Dr(),filterMultiple:Yn,searchValue:Ua})})),os=()=>jr?(0,Ue.Z)((vo||[]).map(us=>String(us)),Yo,!0):Yo.length===0;ca=Me.createElement(Me.Fragment,null,Ra(),Me.createElement("div",{className:`${pn}-dropdown-btns`},Me.createElement(fs.ZP,{type:"link",size:"small",disabled:os(),onClick:()=>Za()},Ki.filterReset),Me.createElement(fs.ZP,{type:"primary",size:"small",onClick:Ls},Ki.filterConfirm)))}rn.filterDropdown&&(ca=Me.createElement(ua.J,{selectable:void 0},ca));const wa=()=>Me.createElement($l,{className:`${pn}-dropdown`},ca);let Jo;typeof rn.filterIcon=="function"?Jo=rn.filterIcon(ka):rn.filterIcon?Jo=rn.filterIcon:Jo=Me.createElement(as,null);const{direction:xs}=Me.useContext(Ia.E_);return Me.createElement("div",{className:`${pn}-column`},Me.createElement("span",{className:`${Xt}-column-title`},Vi),Me.createElement(tu.Z,{dropdownRender:wa,trigger:["click"],open:ko,onOpenChange:ds,getPopupContainer:Xr,placement:xs==="rtl"?"bottomLeft":"bottomRight"},Me.createElement("span",{role:"button",tabIndex:-1,className:at()(`${pn}-trigger`,{active:ka}),onClick:Yo=>{Yo.stopPropagation()}},Jo)))}var Cn=zl;function Ln(ot,tt,Ut){let Xt=[];return(ot||[]).forEach((pn,rn)=>{var $n;const Rn=Cs(rn,Ut);if(pn.filters||"filterDropdown"in pn||"onFilter"in pn)if("filteredValue"in pn){let Yn=pn.filteredValue;"filterDropdown"in pn||(Yn=($n=Yn==null?void 0:Yn.map(String))!==null&&$n!==void 0?$n:Yn),Xt.push({column:pn,key:Qa(pn,Rn),filteredKeys:Yn,forceFiltered:pn.filtered})}else Xt.push({column:pn,key:Qa(pn,Rn),filteredKeys:tt&&pn.defaultFilteredValue?pn.defaultFilteredValue:void 0,forceFiltered:pn.filtered});"children"in pn&&(Xt=[].concat((0,Li.Z)(Xt),(0,Li.Z)(Ln(pn.children,tt,Rn))))}),Xt}function ai(ot,tt,Ut,Xt,pn,rn,$n,Rn){return Ut.map((Yn,Pi)=>{const Jn=Cs(Pi,Rn),{filterMultiple:vi=!0,filterMode:or,filterSearch:Ki}=Yn;let Vi=Yn;if(Vi.filters||Vi.filterDropdown){const Xr=Qa(Vi,Jn),rr=Xt.find(_r=>{let{key:jr}=_r;return Xr===jr});Vi=Object.assign(Object.assign({},Vi),{title:_r=>Me.createElement(Cn,{tablePrefixCls:ot,prefixCls:`${ot}-filter`,dropdownPrefixCls:tt,column:Vi,columnKey:Xr,filterState:rr,filterMultiple:vi,filterMode:or,filterSearch:Ki,triggerFilter:rn,locale:pn,getPopupContainer:$n},ms(Yn.title,_r))})}return"children"in Vi&&(Vi=Object.assign(Object.assign({},Vi),{children:ai(ot,tt,Vi.children,Xt,pn,rn,$n,Jn)})),Vi})}function Ji(ot){const tt={};return ot.forEach(Ut=>{let{key:Xt,filteredKeys:pn,column:rn}=Ut;const{filters:$n,filterDropdown:Rn}=rn;if(Rn)tt[Xt]=pn||null;else if(Array.isArray(pn)){const Yn=kl($n);tt[Xt]=Yn.filter(Pi=>pn.includes(String(Pi)))}else tt[Xt]=null}),tt}function Gi(ot,tt){return tt.reduce((Ut,Xt)=>{const{column:{onFilter:pn,filters:rn},filteredKeys:$n}=Xt;return pn&&$n&&$n.length?Ut.filter(Rn=>$n.some(Yn=>{const Pi=kl(rn),Jn=Pi.findIndex(or=>String(or)===String(Yn)),vi=Jn!==-1?Pi[Jn]:Yn;return pn(vi,Rn)})):Ut},ot)}const Ti=ot=>ot.flatMap(tt=>"children"in tt?[tt].concat((0,Li.Z)(Ti(tt.children||[]))):[tt]);function Ri(ot){let{prefixCls:tt,dropdownPrefixCls:Ut,mergedColumns:Xt,onFilterChange:pn,getPopupContainer:rn,locale:$n}=ot;const Rn=Me.useMemo(()=>Ti(Xt||[]),[Xt]),[Yn,Pi]=Me.useState(()=>Ln(Rn,!0)),Jn=Me.useMemo(()=>{const Vi=Ln(Rn,!1);if(Vi.length===0)return Vi;let Xr=!0,rr=!0;if(Vi.forEach(_r=>{let{filteredKeys:jr}=_r;jr!==void 0?Xr=!1:rr=!1}),Xr){const _r=(Rn||[]).map((jr,vo)=>Qa(jr,Cs(vo)));return Yn.filter(jr=>{let{key:vo}=jr;return _r.includes(vo)}).map(jr=>{const vo=Rn[_r.findIndex(Uo=>Uo===jr.key)];return Object.assign(Object.assign({},jr),{column:Object.assign(Object.assign({},jr.column),vo),forceFiltered:vo.filtered})})}return Vi},[Rn,Yn]),vi=Me.useMemo(()=>Ji(Jn),[Jn]),or=Vi=>{const Xr=Jn.filter(rr=>{let{key:_r}=rr;return _r!==Vi.key});Xr.push(Vi),Pi(Xr),pn(Ji(Xr),Xr)};return[Vi=>ai(tt,Ut,Vi,Jn,$n,or,rn),Jn,vi]}var oi=Ri;function Mi(ot,tt,Ut){const Xt=Me.useRef({});function pn(rn){if(!Xt.current||Xt.current.data!==ot||Xt.current.childrenColumnName!==tt||Xt.current.getRowKey!==Ut){let Rn=function(Yn){Yn.forEach((Pi,Jn)=>{const vi=Ut(Pi,Jn);$n.set(vi,Pi),Pi&&typeof Pi=="object"&&tt in Pi&&Rn(Pi[tt]||[])})};const $n=new Map;Rn(ot),Xt.current={data:ot,childrenColumnName:tt,kvMap:$n,getRowKey:Ut}}return Xt.current.kvMap.get(rn)}return[pn]}var ur=pe(50371),Hr=function(ot,tt){var Ut={};for(var Xt in ot)Object.prototype.hasOwnProperty.call(ot,Xt)&&tt.indexOf(Xt)<0&&(Ut[Xt]=ot[Xt]);if(ot!=null&&typeof Object.getOwnPropertySymbols=="function")for(var pn=0,Xt=Object.getOwnPropertySymbols(ot);pn<Xt.length;pn++)tt.indexOf(Xt[pn])<0&&Object.prototype.propertyIsEnumerable.call(ot,Xt[pn])&&(Ut[Xt[pn]]=ot[Xt[pn]]);return Ut};const ga=10;function Ko(ot,tt){const Ut={current:ot.current,pageSize:ot.pageSize};return Object.keys(tt&&typeof tt=="object"?tt:{}).forEach(pn=>{const rn=ot[pn];typeof rn!="function"&&(Ut[pn]=rn)}),Ut}function Ya(ot,tt,Ut){const Xt=Ut&&typeof Ut=="object"?Ut:{},{total:pn=0}=Xt,rn=Hr(Xt,["total"]),[$n,Rn]=(0,Me.useState)(()=>({current:"defaultCurrent"in rn?rn.defaultCurrent:1,pageSize:"defaultPageSize"in rn?rn.defaultPageSize:ga})),Yn=(0,ur.Z)($n,rn,{total:pn>0?pn:ot}),Pi=Math.ceil((pn||ot)/Yn.pageSize);Yn.current>Pi&&(Yn.current=Pi||1);const Jn=(or,Ki)=>{Rn({current:or!=null?or:1,pageSize:Ki||Yn.pageSize})},vi=(or,Ki)=>{var Vi;Ut&&((Vi=Ut.onChange)===null||Vi===void 0||Vi.call(Ut,or,Ki)),Jn(or,Ki),tt(or,Ki||(Yn==null?void 0:Yn.pageSize))};return Ut===!1?[{},()=>{}]:[Object.assign(Object.assign({},Yn),{onChange:vi}),Jn]}var Va=Ya,No=pe(84105),Qr=pe(35654),Fi=pe(90782),eo=pe(71430),Vo=pe(18929);const ma={},ya="SELECT_ALL",Fo="SELECT_INVERT",aa="SELECT_NONE",Do=[],Or=(ot,tt)=>{let Ut=[];return(tt||[]).forEach(Xt=>{Ut.push(Xt),Xt&&typeof Xt=="object"&&ot in Xt&&(Ut=[].concat((0,Li.Z)(Ut),(0,Li.Z)(Or(ot,Xt[ot]))))}),Ut};var Wa=(ot,tt)=>{const{preserveSelectedRowKeys:Ut,selectedRowKeys:Xt,defaultSelectedRowKeys:pn,getCheckboxProps:rn,onChange:$n,onSelect:Rn,onSelectAll:Yn,onSelectInvert:Pi,onSelectNone:Jn,onSelectMultiple:vi,columnWidth:or,type:Ki,selections:Vi,fixed:Xr,renderCell:rr,hideSelectAll:_r,checkStrictly:jr=!0}=tt||{},{prefixCls:vo,data:Uo,pageData:la,getRecordByKey:so,getRowKey:Wo,expandType:ka,childrenColumnName:ho,locale:ko,getPopupContainer:fo}=ot,[Dr,Bo]=(0,Vo.Z)(Xt||pn||Do,{value:Xt}),ea=Me.useRef(new Map),Sa=(0,Me.useCallback)(ba=>{if(Ut){const ca=new Map;ba.forEach(wa=>{let Jo=so(wa);!Jo&&ea.current.has(wa)&&(Jo=ea.current.get(wa)),ca.set(wa,Jo)}),ea.current=ca}},[so,Ut]);Me.useEffect(()=>{Sa(Dr)},[Dr]);const{keyEntities:Pa}=(0,Me.useMemo)(()=>{if(jr)return{keyEntities:null};let ba=Uo;if(Ut){const ca=new Set(Uo.map((Jo,xs)=>Wo(Jo,xs))),wa=Array.from(ea.current).reduce((Jo,xs)=>{let[Yo,Ra]=xs;return ca.has(Yo)?Jo:Jo.concat(Ra)},[]);ba=[].concat((0,Li.Z)(ba),(0,Li.Z)(wa))}return(0,eo.I8)(ba,{externalGetKey:Wo,childrenPropName:ho})},[Uo,Wo,jr,ho,Ut]),lo=(0,Me.useMemo)(()=>Or(ho,la),[ho,la]),Ta=(0,Me.useMemo)(()=>{const ba=new Map;return lo.forEach((ca,wa)=>{const Jo=Wo(ca,wa),xs=(rn?rn(ca):null)||{};ba.set(Jo,xs)}),ba},[lo,Wo,rn]),Ua=(0,Me.useCallback)(ba=>{var ca;return!!(!((ca=Ta.get(Wo(ba)))===null||ca===void 0)&&ca.disabled)},[Ta,Wo]),[Es,ls]=(0,Me.useMemo)(()=>{if(jr)return[Dr||[],[]];const{checkedKeys:ba,halfCheckedKeys:ca}=(0,Fi.S)(Dr,!0,Pa,Ua);return[ba||[],ca]},[Dr,jr,Pa,Ua]),qs=(0,Me.useMemo)(()=>{const ba=Ki==="radio"?Es.slice(0,1):Es;return new Set(ba)},[Es,Ki]),Ls=(0,Me.useMemo)(()=>Ki==="radio"?new Set:new Set(ls),[ls,Ki]),[Za,sa]=(0,Me.useState)(null);Me.useEffect(()=>{tt||Bo(Do)},[!!tt]);const ds=(0,Me.useCallback)((ba,ca)=>{let wa,Jo;Sa(ba),Ut?(wa=ba,Jo=ba.map(xs=>ea.current.get(xs))):(wa=[],Jo=[],ba.forEach(xs=>{const Yo=so(xs);Yo!==void 0&&(wa.push(xs),Jo.push(Yo))})),Bo(wa),$n==null||$n(wa,Jo,{type:ca})},[Bo,so,$n,Ut]),el=(0,Me.useCallback)((ba,ca,wa,Jo)=>{if(Rn){const xs=wa.map(Yo=>so(Yo));Rn(so(ba),ca,xs,Jo)}ds(wa,"single")},[Rn,so,ds]),Ws=(0,Me.useMemo)(()=>!Vi||_r?null:(Vi===!0?[ya,Fo,aa]:Vi).map(ca=>ca===ya?{key:"all",text:ko.selectionAll,onSelect(){ds(Uo.map((wa,Jo)=>Wo(wa,Jo)).filter(wa=>{const Jo=Ta.get(wa);return!(Jo!=null&&Jo.disabled)||qs.has(wa)}),"all")}}:ca===Fo?{key:"invert",text:ko.selectInvert,onSelect(){const wa=new Set(qs);la.forEach((xs,Yo)=>{const Ra=Wo(xs,Yo),os=Ta.get(Ra);os!=null&&os.disabled||(wa.has(Ra)?wa.delete(Ra):wa.add(Ra))});const Jo=Array.from(wa);Pi&&Pi(Jo),ds(Jo,"invert")}}:ca===aa?{key:"none",text:ko.selectNone,onSelect(){Jn==null||Jn(),ds(Array.from(qs).filter(wa=>{const Jo=Ta.get(wa);return Jo==null?void 0:Jo.disabled}),"none")}}:ca).map(ca=>Object.assign(Object.assign({},ca),{onSelect:function(){for(var wa,Jo,xs=arguments.length,Yo=new Array(xs),Ra=0;Ra<xs;Ra++)Yo[Ra]=arguments[Ra];(Jo=ca.onSelect)===null||Jo===void 0||(wa=Jo).call.apply(wa,[ca].concat(Yo)),sa(null)}})),[Vi,qs,la,Wo,Pi,ds]);return[(0,Me.useCallback)(ba=>{var ca;if(!tt)return ba.filter(Fs=>Fs!==ma);let wa=(0,Li.Z)(ba);const Jo=new Set(qs),xs=lo.map(Wo).filter(Fs=>!Ta.get(Fs).disabled),Yo=xs.every(Fs=>Jo.has(Fs)),Ra=xs.some(Fs=>Jo.has(Fs)),os=()=>{const Fs=[];Yo?xs.forEach(Bs=>{Jo.delete(Bs),Fs.push(Bs)}):xs.forEach(Bs=>{Jo.has(Bs)||(Jo.add(Bs),Fs.push(Bs))});const ks=Array.from(Jo);Yn==null||Yn(!Yo,ks.map(Bs=>so(Bs)),Fs.map(Bs=>so(Bs))),ds(ks,"all"),sa(null)};let us;if(Ki!=="radio"){let Fs;if(Ws){const ns={getPopupContainer:fo,items:Ws.map((js,Dl)=>{const{key:Ul,text:Gu,onSelect:Du}=js;return{key:Ul!=null?Ul:Dl,onClick:()=>{Du==null||Du(xs)},label:Gu}})};Fs=Me.createElement("div",{className:`${vo}-selection-extra`},Me.createElement(tu.Z,{menu:ns,getPopupContainer:fo},Me.createElement("span",null,Me.createElement(No.Z,null))))}const ks=lo.map((ns,js)=>{const Dl=Wo(ns,js),Ul=Ta.get(Dl)||{};return Object.assign({checked:Jo.has(Dl)},Ul)}).filter(ns=>{let{disabled:js}=ns;return js}),Bs=!!ks.length&&ks.length===lo.length,Gs=Bs&&ks.every(ns=>{let{checked:js}=ns;return js}),pl=Bs&&ks.some(ns=>{let{checked:js}=ns;return js});us=!_r&&Me.createElement("div",{className:`${vo}-selection`},Me.createElement(Ba.default,{checked:Bs?Gs:!!lo.length&&Yo,indeterminate:Bs?!Gs&&pl:!Yo&&Ra,onChange:os,disabled:lo.length===0||Bs,"aria-label":Fs?"Custom selection":"Select all",skipGroup:!0}),Fs)}let Al;Ki==="radio"?Al=(Fs,ks,Bs)=>{const Gs=Wo(ks,Bs),pl=Jo.has(Gs);return{node:Me.createElement(hr.ZP,Object.assign({},Ta.get(Gs),{checked:pl,onClick:ns=>ns.stopPropagation(),onChange:ns=>{Jo.has(Gs)||el(Gs,!0,[Gs],ns.nativeEvent)}})),checked:pl}}:Al=(Fs,ks,Bs)=>{var Gs;const pl=Wo(ks,Bs),ns=Jo.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:ns,skipGroup:!0,onClick:Gu=>Gu.stopPropagation(),onChange:Gu=>{let{nativeEvent:Du}=Gu;const{shiftKey:ml}=Du;let Iu=-1,Ou=-1;if(ml&&jr){const Ns=new Set([Za,pl]);xs.some((Hl,$s)=>{if(Ns.has(Hl))if(Iu===-1)Iu=$s;else return Ou=$s,!0;return!1})}if(Ou!==-1&&Iu!==Ou&&jr){const Ns=xs.slice(Iu,Ou+1),Hl=[];ns?Ns.forEach(zs=>{Jo.has(zs)&&(Hl.push(zs),Jo.delete(zs))}):Ns.forEach(zs=>{Jo.has(zs)||(Hl.push(zs),Jo.add(zs))});const $s=Array.from(Jo);vi==null||vi(!ns,$s.map(zs=>so(zs)),Hl.map(zs=>so(zs))),ds($s,"multiple")}else{const Ns=Es;if(jr){const Hl=ns?(0,Qr._5)(Ns,pl):(0,Qr.L0)(Ns,pl);el(pl,!ns,Hl,Du)}else{const Hl=(0,Fi.S)([].concat((0,Li.Z)(Ns),[pl]),!0,Pa,Ua),{checkedKeys:$s,halfCheckedKeys:zs}=Hl;let $u=$s;if(ns){const Vc=new Set($s);Vc.delete(pl),$u=(0,Fi.S)(Array.from(Vc),{checked:!1,halfCheckedKeys:zs},Pa,Ua).checkedKeys}el(pl,!ns,$u,Du)}}sa(ns?null:pl)}})),checked:ns}};const bl=(Fs,ks,Bs)=>{const{node:Gs,checked:pl}=Al(Fs,ks,Bs);return rr?rr(pl,ks,Bs,Gs):Gs};if(!wa.includes(ma))if(wa.findIndex(Fs=>{var ks;return((ks=Fs[br])===null||ks===void 0?void 0:ks.columnType)==="EXPAND_COLUMN"})===0){const[Fs,...ks]=wa;wa=[Fs,ma].concat((0,Li.Z)(ks))}else wa=[ma].concat((0,Li.Z)(wa));const Vl=wa.indexOf(ma);wa=wa.filter((Fs,ks)=>Fs!==ma||ks===Vl);const bs=wa[Vl-1],Zl=wa[Vl+1];let dl=Xr;dl===void 0&&((Zl==null?void 0:Zl.fixed)!==void 0?dl=Zl.fixed:(bs==null?void 0:bs.fixed)!==void 0&&(dl=bs.fixed)),dl&&bs&&((ca=bs[br])===null||ca===void 0?void 0:ca.columnType)==="EXPAND_COLUMN"&&bs.fixed===void 0&&(bs.fixed=dl);const Fl=at()(`${vo}-selection-col`,{[`${vo}-selection-col-with-dropdown`]:Vi&&Ki==="checkbox"}),_c={fixed:dl,width:or,className:`${vo}-selection-column`,title:tt.columnTitle||us,render:bl,onCell:tt.onCell,[br]:{className:Fl}};return wa.map(Fs=>Fs===ma?_c:Fs)},[Wo,lo,tt,Es,qs,Ls,or,Ws,ka,Za,Ta,vi,el,Ua]),qs]},La=pe(89489),fl=pe(59477),xu=pe(6848);const Qt="ascend",Yt="descend";function Dn(ot){return typeof ot.sorter=="object"&&typeof ot.sorter.multiple=="number"?ot.sorter.multiple:!1}function nt(ot){return typeof ot=="function"?ot:ot&&typeof ot=="object"&&ot.compare?ot.compare:!1}function qt(ot,tt){return tt?ot[ot.indexOf(tt)+1]:ot[0]}function sr(ot,tt,Ut){let Xt=[];function pn(rn,$n){Xt.push({column:rn,key:Qa(rn,$n),multiplePriority:Dn(rn),sortOrder:rn.sortOrder})}return(ot||[]).forEach((rn,$n)=>{const Rn=Cs($n,Ut);rn.children?("sortOrder"in rn&&pn(rn,Rn),Xt=[].concat((0,Li.Z)(Xt),(0,Li.Z)(sr(rn.children,tt,Rn)))):rn.sorter&&("sortOrder"in rn?pn(rn,Rn):tt&&rn.defaultSortOrder&&Xt.push({column:rn,key:Qa(rn,Rn),multiplePriority:Dn(rn),sortOrder:rn.defaultSortOrder}))}),Xt}function kr(ot,tt,Ut,Xt,pn,rn,$n,Rn){return(tt||[]).map((Yn,Pi)=>{const Jn=Cs(Pi,Rn);let vi=Yn;if(vi.sorter){const or=vi.sortDirections||pn,Ki=vi.showSorterTooltip===void 0?$n:vi.showSorterTooltip,Vi=Qa(vi,Jn),Xr=Ut.find(ka=>{let{key:ho}=ka;return ho===Vi}),rr=Xr?Xr.sortOrder:null,_r=qt(or,rr);let jr;if(Yn.sortIcon)jr=Yn.sortIcon({sortOrder:rr});else{const ka=or.includes(Qt)&&Me.createElement(fl.Z,{className:at()(`${ot}-column-sorter-up`,{active:rr===Qt})}),ho=or.includes(Yt)&&Me.createElement(La.Z,{className:at()(`${ot}-column-sorter-down`,{active:rr===Yt})});jr=Me.createElement("span",{className:at()(`${ot}-column-sorter`,{[`${ot}-column-sorter-full`]:!!(ka&&ho)})},Me.createElement("span",{className:`${ot}-column-sorter-inner`,"aria-hidden":"true"},ka,ho))}const{cancelSort:vo,triggerAsc:Uo,triggerDesc:la}=rn||{};let so=vo;_r===Yt?so=la:_r===Qt&&(so=Uo);const Wo=typeof Ki=="object"?Ki:{title:so};vi=Object.assign(Object.assign({},vi),{className:at()(vi.className,{[`${ot}-column-sort`]:rr}),title:ka=>{const ho=Me.createElement("div",{className:`${ot}-column-sorters`},Me.createElement("span",{className:`${ot}-column-title`},ms(Yn.title,ka)),jr);return Ki?Me.createElement(xu.Z,Object.assign({},Wo),ho):ho},onHeaderCell:ka=>{const ho=Yn.onHeaderCell&&Yn.onHeaderCell(ka)||{},ko=ho.onClick,fo=ho.onKeyDown;ho.onClick=ea=>{Xt({column:Yn,key:Vi,sortOrder:_r,multiplePriority:Dn(Yn)}),ko==null||ko(ea)},ho.onKeyDown=ea=>{ea.keyCode===Xi.Z.ENTER&&(Xt({column:Yn,key:Vi,sortOrder:_r,multiplePriority:Dn(Yn)}),fo==null||fo(ea))};const Dr=Zs(Yn.title,{}),Bo=Dr==null?void 0:Dr.toString();return rr?ho["aria-sort"]=rr==="ascend"?"ascending":"descending":ho["aria-label"]=Bo||"",ho.className=at()(ho.className,`${ot}-column-has-sorters`),ho.tabIndex=0,Yn.ellipsis&&(ho.title=(Dr!=null?Dr:"").toString()),ho}})}return"children"in vi&&(vi=Object.assign(Object.assign({},vi),{children:kr(ot,vi.children,Ut,Xt,pn,rn,$n,Jn)})),vi})}function vr(ot){const{column:tt,sortOrder:Ut}=ot;return{column:tt,order:Ut,field:tt.dataIndex,columnKey:tt.key}}function lr(ot){const tt=ot.filter(Ut=>{let{sortOrder:Xt}=Ut;return Xt}).map(vr);return tt.length===0&&ot.length?Object.assign(Object.assign({},vr(ot[ot.length-1])),{column:void 0}):tt.length<=1?tt[0]||{}:tt}function Bi(ot,tt,Ut){const Xt=tt.slice().sort(($n,Rn)=>Rn.multiplePriority-$n.multiplePriority),pn=ot.slice(),rn=Xt.filter($n=>{let{column:{sorter:Rn},sortOrder:Yn}=$n;return nt(Rn)&&Yn});return rn.length?pn.sort(($n,Rn)=>{for(let Yn=0;Yn<rn.length;Yn+=1){const Pi=rn[Yn],{column:{sorter:Jn},sortOrder:vi}=Pi,or=nt(Jn);if(or&&vi){const Ki=or($n,Rn,vi);if(Ki!==0)return vi===Qt?Ki:-Ki}}return 0}).map($n=>{const Rn=$n[Ut];return Rn?Object.assign(Object.assign({},$n),{[Ut]:Bi(Rn,tt,Ut)}):$n}):pn}function wr(ot){let{prefixCls:tt,mergedColumns:Ut,onSorterChange:Xt,sortDirections:pn,tableLocale:rn,showSorterTooltip:$n}=ot;const[Rn,Yn]=Me.useState(sr(Ut,!0)),Pi=Me.useMemo(()=>{let Vi=!0;const Xr=sr(Ut,!1);if(!Xr.length)return Rn;const rr=[];function _r(vo){Vi?rr.push(vo):rr.push(Object.assign(Object.assign({},vo),{sortOrder:null}))}let jr=null;return Xr.forEach(vo=>{jr===null?(_r(vo),vo.sortOrder&&(vo.multiplePriority===!1?Vi=!1:jr=!0)):(jr&&vo.multiplePriority!==!1||(Vi=!1),_r(vo))}),rr},[Ut,Rn]),Jn=Me.useMemo(()=>{const Vi=Pi.map(Xr=>{let{column:rr,sortOrder:_r}=Xr;return{column:rr,order:_r}});return{sortColumns:Vi,sortColumn:Vi[0]&&Vi[0].column,sortOrder:Vi[0]&&Vi[0].order}},[Pi]);function vi(Vi){let Xr;Vi.multiplePriority===!1||!Pi.length||Pi[0].multiplePriority===!1?Xr=[Vi]:Xr=[].concat((0,Li.Z)(Pi.filter(rr=>{let{key:_r}=rr;return _r!==Vi.key})),[Vi]),Yn(Xr),Xt(lr(Xr),Xr)}return[Vi=>kr(tt,Vi,Pi,vi,pn,rn,$n),Pi,Jn,()=>lr(Pi)]}function to(ot,tt){return ot.map(Ut=>{const Xt=Object.assign({},Ut);return Xt.title=ms(Ut.title,tt),"children"in Xt&&(Xt.children=to(Xt.children,tt)),Xt})}function So(ot){return[Me.useCallback(Ut=>to(Ut,ot),[ot])]}var gr=qr((ot,tt)=>{const{_renderTimes:Ut}=ot,{_renderTimes:Xt}=tt;return Ut!==Xt}),mr=va((ot,tt)=>{const{_renderTimes:Ut}=ot,{_renderTimes:Xt}=tt;return Ut!==Xt}),yr=pe(64993),_i=pe(17313),Ii=pe(83116),Wr=pe(37613),Mr=ot=>{const{componentCls:tt}=ot,Ut=`${ot.lineWidth}px ${ot.lineType} ${ot.tableBorderColor}`,Xt=(pn,rn,$n)=>({[`&${tt}-${pn}`]:{[`> ${tt}-container`]:{[`> ${tt}-content, > ${tt}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${tt}-expanded-row-fixed`]:{margin:`-${rn}px -${$n+ot.lineWidth}px`}}}}}});return{[`${tt}-wrapper`]:{[`${tt}${tt}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${tt}-title`]:{border:Ut,borderBottom:0},[`> ${tt}-container`]:{borderInlineStart:Ut,borderTop:Ut,[`
> ${tt}-content,
> ${tt}-header,
> ${tt}-body,
> ${tt}-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:Ut},"> thead":{"> tr:not(:last-child) > th":{borderBottom:Ut},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${tt}-cell-fix-right-first::after`]:{borderInlineEnd:Ut}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${tt}-expanded-row-fixed`]:{margin:`-${ot.tablePaddingVertical}px -${ot.tablePaddingHorizontal+ot.lineWidth}px`,"&::after":{position:"absolute",top:0,insetInlineEnd:ot.lineWidth,bottom:0,borderInlineEnd:Ut,content:'""'}}}}}},[`&${tt}-scroll-horizontal`]:{[`> ${tt}-container > ${tt}-body`]:{"> table > tbody":{[`
> tr${tt}-expanded-row,
> tr${tt}-placeholder
`]:{"> th, > td":{borderInlineEnd:0}}}}}},Xt("middle",ot.tablePaddingVerticalMiddle,ot.tablePaddingHorizontalMiddle)),Xt("small",ot.tablePaddingVerticalSmall,ot.tablePaddingHorizontalSmall)),{[`> ${tt}-footer`]:{border:Ut,borderTop:0}}),[`${tt}-cell`]:{[`${tt}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${ot.lineWidth}px 0 ${ot.lineWidth}px ${ot.tableHeaderBg}`}},[`${tt}-bordered ${tt}-cell-scrollbar`]:{borderInlineEnd:Ut}}}},Tr=ot=>{const{componentCls:tt}=ot;return{[`${tt}-wrapper`]:{[`${tt}-cell-ellipsis`]:Object.assign(Object.assign({},_i.vS),{wordBreak:"keep-all",[`
&${tt}-cell-fix-left-last,
&${tt}-cell-fix-right-first
`]:{overflow:"visible",[`${tt}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${tt}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},pr=ot=>{const{componentCls:tt}=ot;return{[`${tt}-wrapper`]:{[`${tt}-tbody > tr${tt}-placeholder`]:{textAlign:"center",color:ot.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:ot.colorBgContainer}}}}},Na=pe(15969),xa=ot=>{const{componentCls:tt,antCls:Ut,controlInteractiveSize:Xt,motionDurationSlow:pn,lineWidth:rn,paddingXS:$n,lineType:Rn,tableBorderColor:Yn,tableExpandIconBg:Pi,tableExpandColumnWidth:Jn,borderRadius:vi,fontSize:or,fontSizeSM:Ki,lineHeight:Vi,tablePaddingVertical:Xr,tablePaddingHorizontal:rr,tableExpandedRowBg:_r,paddingXXS:jr}=ot,vo=Xt/2-rn,Uo=vo*2+rn*3,la=`${rn}px ${Rn} ${Yn}`,so=jr-rn;return{[`${tt}-wrapper`]:{[`${tt}-expand-icon-col`]:{width:Jn},[`${tt}-row-expand-icon-cell`]:{textAlign:"center",[`${tt}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${tt}-row-indent`]:{height:1,float:"left"},[`${tt}-row-expand-icon`]:Object.assign(Object.assign({},(0,Na.N)(ot)),{position:"relative",float:"left",boxSizing:"border-box",width:Uo,height:Uo,padding:0,color:"inherit",lineHeight:`${Uo}px`,background:Pi,border:la,borderRadius:vi,transform:`scale(${Xt/Uo})`,transition:`all ${pn}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${pn} ease-out`,content:'""'},"&::before":{top:vo,insetInlineEnd:so,insetInlineStart:so,height:rn},"&::after":{top:so,bottom:so,insetInlineStart:vo,width:rn,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"}}),[`${tt}-row-indent + ${tt}-row-expand-icon`]:{marginTop:(or*Vi-rn*3)/2-Math.ceil((Ki*1.4-rn*3)/2),marginInlineEnd:$n},[`tr${tt}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:_r}},[`${Ut}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${tt}-expanded-row-fixed`]:{position:"relative",margin:`-${Xr}px -${rr}px`,padding:`${Xr}px ${rr}px`}}}},Po=ot=>{const{componentCls:tt,antCls:Ut,iconCls:Xt,tableFilterDropdownWidth:pn,tableFilterDropdownSearchWidth:rn,paddingXXS:$n,paddingXS:Rn,colorText:Yn,lineWidth:Pi,lineType:Jn,tableBorderColor:vi,tableHeaderIconColor:or,fontSizeSM:Ki,tablePaddingHorizontal:Vi,borderRadius:Xr,motionDurationSlow:rr,colorTextDescription:_r,colorPrimary:jr,tableHeaderFilterActiveBg:vo,colorTextDisabled:Uo,tableFilterDropdownBg:la,tableFilterDropdownHeight:so,controlItemBgHover:Wo,controlItemBgActive:ka,boxShadowSecondary:ho,filterDropdownMenuBg:ko}=ot,fo=`${Ut}-dropdown`,Dr=`${tt}-filter-dropdown`,Bo=`${Ut}-tree`,ea=`${Pi}px ${Jn} ${vi}`;return[{[`${tt}-wrapper`]:{[`${tt}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${tt}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-$n,marginInline:`${$n}px ${-Vi/2}px`,padding:`0 ${$n}px`,color:or,fontSize:Ki,borderRadius:Xr,cursor:"pointer",transition:`all ${rr}`,"&:hover":{color:_r,background:vo},"&.active":{color:jr}}}},{[`${Ut}-dropdown`]:{[Dr]:Object.assign(Object.assign({},(0,_i.Wf)(ot)),{minWidth:pn,backgroundColor:la,borderRadius:Xr,boxShadow:ho,overflow:"hidden",[`${fo}-menu`]:{maxHeight:so,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:ko,"&:empty::after":{display:"block",padding:`${Rn}px 0`,color:Uo,fontSize:Ki,textAlign:"center",content:'"Not Found"'}},[`${Dr}-tree`]:{paddingBlock:`${Rn}px 0`,paddingInline:Rn,[Bo]:{padding:0},[`${Bo}-treenode ${Bo}-node-content-wrapper:hover`]:{backgroundColor:Wo},[`${Bo}-treenode-checkbox-checked ${Bo}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:ka}}},[`${Dr}-search`]:{padding:Rn,borderBottom:ea,"&-input":{input:{minWidth:rn},[Xt]:{color:Uo}}},[`${Dr}-checkall`]:{width:"100%",marginBottom:$n,marginInlineStart:$n},[`${Dr}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Rn-Pi}px ${Rn}px`,overflow:"hidden",borderTop:ea}})}},{[`${Ut}-dropdown ${Dr}, ${Dr}-submenu`]:{[`${Ut}-checkbox-wrapper + span`]:{paddingInlineStart:Rn,color:Yn},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},El=ot=>{const{componentCls:tt,lineWidth:Ut,colorSplit:Xt,motionDurationSlow:pn,zIndexTableFixed:rn,tableBg:$n,zIndexTableSticky:Rn}=ot,Yn=Xt;return{[`${tt}-wrapper`]:{[`
${tt}-cell-fix-left,
${tt}-cell-fix-right
`]:{position:"sticky !important",zIndex:rn,background:$n},[`
${tt}-cell-fix-left-first::after,
${tt}-cell-fix-left-last::after
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:-Ut,width:30,transform:"translateX(100%)",transition:`box-shadow ${pn}`,content:'""',pointerEvents:"none"},[`${tt}-cell-fix-left-all::after`]:{display:"none"},[`
${tt}-cell-fix-right-first::after,
${tt}-cell-fix-right-last::after
`]:{position:"absolute",top:0,bottom:-Ut,left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${pn}`,content:'""',pointerEvents:"none"},[`${tt}-container`]:{"&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:Rn+1,width:30,transition:`box-shadow ${pn}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${tt}-ping-left`]:{[`&:not(${tt}-has-fix-left) ${tt}-container`]:{position:"relative","&::before":{boxShadow:`inset 10px 0 8px -8px ${Yn}`}},[`
${tt}-cell-fix-left-first::after,
${tt}-cell-fix-left-last::after
`]:{boxShadow:`inset 10px 0 8px -8px ${Yn}`},[`${tt}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${tt}-ping-right`]:{[`&:not(${tt}-has-fix-right) ${tt}-container`]:{position:"relative","&::after":{boxShadow:`inset -10px 0 8px -8px ${Yn}`}},[`
${tt}-cell-fix-right-first::after,
${tt}-cell-fix-right-last::after
`]:{boxShadow:`inset -10px 0 8px -8px ${Yn}`}}}}},_s=ot=>{const{componentCls:tt,antCls:Ut}=ot;return{[`${tt}-wrapper`]:{[`${tt}-pagination${Ut}-pagination`]:{margin:`${ot.margin}px 0`},[`${tt}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:ot.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},Hs=ot=>{const{componentCls:tt,tableRadius:Ut}=ot;return{[`${tt}-wrapper`]:{[tt]:{[`${tt}-title, ${tt}-header`]:{borderRadius:`${Ut}px ${Ut}px 0 0`},[`${tt}-title + ${tt}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${tt}-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:Ut,borderStartEndRadius:Ut,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:Ut},"> *:last-child":{borderStartEndRadius:Ut}}},"&-footer":{borderRadius:`0 0 ${Ut}px ${Ut}px`}}}}},rc=ot=>{const{componentCls:tt}=ot;return{[`${tt}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${tt}-pagination-left`]:{justifyContent:"flex-end"},[`${tt}-pagination-right`]:{justifyContent:"flex-start"},[`${tt}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${tt}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${tt}-row-indent`]:{float:"right"}}}}},Tc=ot=>{const{componentCls:tt,antCls:Ut,iconCls:Xt,fontSizeIcon:pn,padding:rn,paddingXS:$n,tableHeaderIconColor:Rn,tableHeaderIconColorHover:Yn,tableSelectionColumnWidth:Pi}=ot;return{[`${tt}-wrapper`]:{[`${tt}-selection-col`]:{width:Pi,[`&${tt}-selection-col-with-dropdown`]:{width:Pi+pn+rn/4}},[`${tt}-bordered ${tt}-selection-col`]:{width:Pi+$n*2,[`&${tt}-selection-col-with-dropdown`]:{width:Pi+pn+rn/4+$n*2}},[`
table tr th${tt}-selection-column,
table tr td${tt}-selection-column
`]:{paddingInlineEnd:ot.paddingXS,paddingInlineStart:ot.paddingXS,textAlign:"center",[`${Ut}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${tt}-selection-column${tt}-cell-fix-left`]:{zIndex:ot.zIndexTableFixed+1},[`table tr th${tt}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${tt}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${tt}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${ot.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:`${ot.tablePaddingHorizontal/4}px`,[Xt]:{color:Rn,fontSize:pn,verticalAlign:"baseline","&:hover":{color:Yn}}}}}},vc=ot=>{const{componentCls:tt}=ot,Ut=(Xt,pn,rn,$n)=>({[`${tt}${tt}-${Xt}`]:{fontSize:$n,[`
${tt}-title,
${tt}-footer,
${tt}-cell,
${tt}-thead > tr > th,
${tt}-tbody > tr > th,
${tt}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{padding:`${pn}px ${rn}px`},[`${tt}-filter-trigger`]:{marginInlineEnd:`-${rn/2}px`},[`${tt}-expanded-row-fixed`]:{margin:`-${pn}px -${rn}px`},[`${tt}-tbody`]:{[`${tt}-wrapper:only-child ${tt}`]:{marginBlock:`-${pn}px`,marginInline:`${ot.tableExpandColumnWidth-rn}px -${rn}px`}},[`${tt}-selection-column`]:{paddingInlineStart:`${rn/4}px`}}});return{[`${tt}-wrapper`]:Object.assign(Object.assign({},Ut("middle",ot.tablePaddingVerticalMiddle,ot.tablePaddingHorizontalMiddle,ot.tableFontSizeMiddle)),Ut("small",ot.tablePaddingVerticalSmall,ot.tablePaddingHorizontalSmall,ot.tableFontSizeSmall))}},du=ot=>{const{componentCls:tt,marginXXS:Ut,fontSizeIcon:Xt,tableHeaderIconColor:pn,tableHeaderIconColorHover:rn}=ot;return{[`${tt}-wrapper`]:{[`${tt}-thead th${tt}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${ot.motionDurationSlow}`,"&:hover":{background:ot.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:ot.colorPrimary},[`
&${tt}-cell-fix-left:hover,
&${tt}-cell-fix-right:hover
`]:{background:ot.tableFixedHeaderSortActiveBg}},[`${tt}-thead th${tt}-column-sort`]:{background:ot.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${tt}-column-sort`]:{background:ot.tableBodySortBg},[`${tt}-column-title`]:{position:"relative",zIndex:1,flex:1},[`${tt}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${tt}-column-sorter`]:{marginInlineStart:Ut,color:pn,fontSize:0,transition:`color ${ot.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:Xt,"&.active":{color:ot.colorPrimary}},[`${tt}-column-sorter-up + ${tt}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${tt}-column-sorters:hover ${tt}-column-sorter`]:{color:rn}}}},ac=ot=>{const{componentCls:tt,opacityLoading:Ut,tableScrollThumbBg:Xt,tableScrollThumbBgHover:pn,tableScrollThumbSize:rn,tableScrollBg:$n,zIndexTableSticky:Rn,stickyScrollBarBorderRadius:Yn}=ot,Pi=`${ot.lineWidth}px ${ot.lineType} ${ot.tableBorderColor}`;return{[`${tt}-wrapper`]:{[`${tt}-sticky`]:{"&-holder":{position:"sticky",zIndex:Rn,background:ot.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${rn}px !important`,zIndex:Rn,display:"flex",alignItems:"center",background:$n,borderTop:Pi,opacity:Ut,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:rn,backgroundColor:Xt,borderRadius:Yn,transition:`all ${ot.motionDurationSlow}, transform none`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:pn}}}}}}},au=ot=>{const{componentCls:tt,lineWidth:Ut,tableBorderColor:Xt}=ot,pn=`${Ut}px ${ot.lineType} ${Xt}`;return{[`${tt}-wrapper`]:{[`${tt}-summary`]:{position:"relative",zIndex:ot.zIndexTableFixed,background:ot.tableBg,"> tr":{"> th, > td":{borderBottom:pn}}},[`div${tt}-summary`]:{boxShadow:`0 -${Ut}px 0 ${Xt}`}}}},Wu=ot=>{const{componentCls:tt}=ot,Ut=`${ot.lineWidth}px ${ot.lineType} ${ot.tableBorderColor}`,Xt=`${tt}-expanded-row-cell`;return{[`${tt}-wrapper`]:{[`${tt}-tbody-virtual`]:{[`${tt}-row`]:{display:"flex",boxSizing:"border-box",width:"100%"},[`${tt}-cell`]:{borderBottom:Ut},[`${tt}-expanded-row`]:{[`${Xt}${Xt}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${ot.lineWidth}px)`,borderInlineEnd:"none"}}},[`${tt}-bordered`]:{[`${tt}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:Ut,position:"absolute"},[`${tt}-cell`]:{borderInlineEnd:Ut,[`&${tt}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:-ot.lineWidth,borderInlineStart:Ut}}}}}}};const Au=ot=>{const{componentCls:tt,fontWeightStrong:Ut,tablePaddingVertical:Xt,tablePaddingHorizontal:pn,lineWidth:rn,lineType:$n,tableBorderColor:Rn,tableFontSize:Yn,tableBg:Pi,tableRadius:Jn,tableHeaderTextColor:vi,motionDurationMid:or,tableHeaderBg:Ki,tableHeaderCellSplitColor:Vi,tableRowHoverBg:Xr,tableSelectedRowBg:rr,tableSelectedRowHoverBg:_r,tableFooterTextColor:jr,tableFooterBg:vo,paddingContentVerticalLG:Uo}=ot,la=`${rn}px ${$n} ${Rn}`;return{[`${tt}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%"},(0,_i.dF)()),{[tt]:Object.assign(Object.assign({},(0,_i.Wf)(ot)),{fontSize:Yn,background:Pi,borderRadius:`${Jn}px ${Jn}px 0 0`}),table:{width:"100%",textAlign:"start",borderRadius:`${Jn}px ${Jn}px 0 0`,borderCollapse:"separate",borderSpacing:0},[`
${tt}-cell,
${tt}-thead > tr > th,
${tt}-tbody > tr > th,
${tt}-tbody > tr > td,
tfoot > tr > th,
tfoot > tr > td
`]:{position:"relative",padding:`${Uo}px ${pn}px`,overflowWrap:"break-word"},[`${tt}-title`]:{padding:`${Xt}px ${pn}px`},[`${tt}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:vi,fontWeight:Ut,textAlign:"start",background:Ki,borderBottom:la,transition:`background ${or} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${tt}-selection-column):not(${tt}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:Vi,transform:"translateY(-50%)",transition:`background-color ${or}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${tt}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${or}, border-color ${or}`,borderBottom:la,[`
> ${tt}-wrapper:only-child,
> ${tt}-expanded-row-fixed > ${tt}-wrapper:only-child
`]:{[tt]:{marginBlock:`-${Xt}px`,marginInline:`${ot.tableExpandColumnWidth-pn}px -${pn}px`,[`${tt}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:vi,fontWeight:Ut,textAlign:"start",background:Ki,borderBottom:la,transition:`background ${or} ease`},[`
&${tt}-row:hover > th,
&${tt}-row:hover > td,
> th${tt}-cell-row-hover,
> td${tt}-cell-row-hover
`]:{background:Xr},[`&${tt}-row-selected`]:{"> th, > td":{background:rr},"&:hover > th, &:hover > td":{background:_r}}}},[`${tt}-footer`]:{padding:`${Xt}px ${pn}px`,color:jr,background:vo}})}};var yc=(0,Ii.Z)("Table",ot=>{const{colorTextHeading:tt,colorSplit:Ut,colorIcon:Xt,colorIconHover:pn,opacityLoading:rn,colorBgContainer:$n,controlInteractiveSize:Rn,headerBg:Yn,headerColor:Pi,headerSortActiveBg:Jn,headerSortHoverBg:vi,bodySortBg:or,rowHoverBg:Ki,rowSelectedBg:Vi,rowSelectedHoverBg:Xr,rowExpandedBg:rr,cellPaddingBlock:_r,cellPaddingInline:jr,cellPaddingBlockMD:vo,cellPaddingInlineMD:Uo,cellPaddingBlockSM:la,cellPaddingInlineSM:so,borderColor:Wo,footerBg:ka,footerColor:ho,headerBorderRadius:ko,cellFontSize:fo,cellFontSizeMD:Dr,cellFontSizeSM:Bo,headerSplitColor:ea,fixedHeaderSortActiveBg:Sa,headerFilterHoverBg:Pa,filterDropdownBg:lo,expandIconBg:Ta,selectionColumnWidth:Ua,stickyScrollBarBg:Es}=ot,ls=new yr.C(Xt),qs=new yr.C(pn),Ls=2,Za=(0,Wr.TS)(ot,{tableFontSize:fo,tableBg:$n,tableRadius:ko,tablePaddingVertical:_r,tablePaddingHorizontal:jr,tablePaddingVerticalMiddle:vo,tablePaddingHorizontalMiddle:Uo,tablePaddingVerticalSmall:la,tablePaddingHorizontalSmall:so,tableBorderColor:Wo,tableHeaderTextColor:Pi,tableHeaderBg:Yn,tableFooterTextColor:ho,tableFooterBg:ka,tableHeaderCellSplitColor:ea,tableHeaderSortBg:Jn,tableHeaderSortHoverBg:vi,tableHeaderIconColor:ls.clone().setAlpha(ls.getAlpha()*rn).toRgbString(),tableHeaderIconColorHover:qs.clone().setAlpha(qs.getAlpha()*rn).toRgbString(),tableBodySortBg:or,tableFixedHeaderSortActiveBg:Sa,tableHeaderFilterActiveBg:Pa,tableFilterDropdownBg:lo,tableRowHoverBg:Ki,tableSelectedRowBg:Vi,tableSelectedRowHoverBg:Xr,zIndexTableFixed:Ls,zIndexTableSticky:Ls+1,tableFontSizeMiddle:Dr,tableFontSizeSmall:Bo,tableSelectionColumnWidth:Ua,tableExpandIconBg:Ta,tableExpandColumnWidth:Rn+2*ot.padding,tableExpandedRowBg:rr,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:Es,tableScrollThumbBgHover:tt,tableScrollBg:Ut});return[Au(Za),_s(Za),au(Za),du(Za),Po(Za),Mr(Za),Hs(Za),xa(Za),au(Za),pr(Za),Tc(Za),El(Za),ac(Za),Tr(Za),vc(Za),rc(Za),Wu(Za)]},ot=>{const{colorFillAlter:tt,colorBgContainer:Ut,colorTextHeading:Xt,colorFillSecondary:pn,colorFillContent:rn,controlItemBgActive:$n,controlItemBgActiveHover:Rn,padding:Yn,paddingSM:Pi,paddingXS:Jn,colorBorderSecondary:vi,borderRadiusLG:or,fontSize:Ki,controlHeight:Vi,colorTextPlaceholder:Xr}=ot,rr=new yr.C(pn).onBackground(Ut).toHexShortString(),_r=new yr.C(rn).onBackground(Ut).toHexShortString(),jr=new yr.C(tt).onBackground(Ut).toHexShortString();return{headerBg:jr,headerColor:Xt,headerSortActiveBg:rr,headerSortHoverBg:_r,bodySortBg:jr,rowHoverBg:jr,rowSelectedBg:$n,rowSelectedHoverBg:Rn,rowExpandedBg:tt,cellPaddingBlock:Yn,cellPaddingInline:Yn,cellPaddingBlockMD:Pi,cellPaddingInlineMD:Jn,cellPaddingBlockSM:Jn,cellPaddingInlineSM:Jn,borderColor:vi,headerBorderRadius:or,footerBg:jr,footerColor:Xt,cellFontSize:Ki,cellFontSizeMD:Ki,cellFontSizeSM:Ki,headerSplitColor:vi,fixedHeaderSortActiveBg:rr,headerFilterHoverBg:rn,filterDropdownMenuBg:Ut,filterDropdownBg:Ut,expandIconBg:Ut,selectionColumnWidth:Vi,stickyScrollBarBg:Xr,stickyScrollBarBorderRadius:100}});const bd=[],_d=(ot,tt)=>{const{prefixCls:Ut,className:Xt,rootClassName:pn,style:rn,size:$n,bordered:Rn,dropdownPrefixCls:Yn,dataSource:Pi,pagination:Jn,rowSelection:vi,rowKey:or="key",rowClassName:Ki,columns:Vi,children:Xr,childrenColumnName:rr,onChange:_r,getPopupContainer:jr,loading:vo,expandIcon:Uo,expandable:la,expandedRowRender:so,expandIconColumnIndex:Wo,indentSize:ka,scroll:ho,sortDirections:ko,locale:fo,showSorterTooltip:Dr=!0,virtual:Bo}=ot,ea=Me.useMemo(()=>Vi||on(Xr),[Vi,Xr]),Sa=Me.useMemo(()=>ea.some(Ss=>Ss.responsive),[ea]),Pa=(0,mi.Z)(Sa),lo=Me.useMemo(()=>{const Ss=new Set(Object.keys(Pa).filter(Ys=>Pa[Ys]));return ea.filter(Ys=>!Ys.responsive||Ys.responsive.some(vl=>Ss.has(vl)))},[ea,Pa]),Ta=(0,Jr.Z)(ot,["className","style","columns"]),{locale:Ua=oo.Z,direction:Es,table:ls,renderEmpty:qs,getPrefixCls:Ls,getPopupContainer:Za}=Me.useContext(Ia.E_),sa=(0,Gr.Z)($n),ds=Object.assign(Object.assign({},Ua.Table),fo),el=Pi||bd,Ws=Ls("table",Ut),cl=Ls("dropdown",Yn),ba=Object.assign({childrenColumnName:rr,expandIconColumnIndex:Wo},la),{childrenColumnName:ca="children"}=ba,wa=Me.useMemo(()=>el.some(Ss=>Ss==null?void 0:Ss[ca])?"nest":so||la&&la.expandedRowRender?"row":null,[el]),Jo={body:Me.useRef()},xs=Me.useMemo(()=>typeof or=="function"?or:Ss=>Ss==null?void 0:Ss[or],[or]),[Yo]=Mi(el,ca,xs),Ra={},os=function(Ss,Ys){let vl=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var Xs,gs,yl;const Su=Object.assign(Object.assign({},Ra),Ss);vl&&((Xs=Ra.resetPagination)===null||Xs===void 0||Xs.call(Ra),!((gs=Su.pagination)===null||gs===void 0)&&gs.current&&(Su.pagination.current=1),Jn&&Jn.onChange&&Jn.onChange(1,(yl=Su.pagination)===null||yl===void 0?void 0:yl.pageSize)),ho&&ho.scrollToFirstRowOnChange!==!1&&Jo.body.current&&(0,ha.Z)(0,{getContainer:()=>Jo.body.current}),_r==null||_r(Su.pagination,Su.filters,Su.sorter,{currentDataSource:Gi(Bi(el,Su.sorterStates,ca),Su.filterStates),action:Ys})},us=(Ss,Ys)=>{os({sorter:Ss,sorterStates:Ys},"sort",!1)},[Al,bl,Vl,bs]=wr({prefixCls:Ws,mergedColumns:lo,onSorterChange:us,sortDirections:ko||["ascend","descend"],tableLocale:ds,showSorterTooltip:Dr}),Zl=Me.useMemo(()=>Bi(el,bl,ca),[el,bl]);Ra.sorter=bs(),Ra.sorterStates=bl;const dl=(Ss,Ys)=>{os({filters:Ss,filterStates:Ys},"filter",!0)},[Fl,_c,Fs]=oi({prefixCls:Ws,locale:ds,dropdownPrefixCls:cl,mergedColumns:lo,onFilterChange:dl,getPopupContainer:jr||Za}),ks=Gi(Zl,_c);Ra.filters=Fs,Ra.filterStates=_c;const Bs=Me.useMemo(()=>{const Ss={};return Object.keys(Fs).forEach(Ys=>{Fs[Ys]!==null&&(Ss[Ys]=Fs[Ys])}),Object.assign(Object.assign({},Vl),{filters:Ss})},[Vl,Fs]),[Gs]=So(Bs),pl=(Ss,Ys)=>{os({pagination:Object.assign(Object.assign({},Ra.pagination),{current:Ss,pageSize:Ys})},"paginate")},[ns,js]=Va(ks.length,pl,Jn);Ra.pagination=Jn===!1?{}:Ko(ns,Jn),Ra.resetPagination=js;const Dl=Me.useMemo(()=>{if(Jn===!1||!ns.pageSize)return ks;const{current:Ss=1,total:Ys,pageSize:vl=ga}=ns;return ks.length<Ys?ks.length>vl?ks.slice((Ss-1)*vl,Ss*vl):ks:ks.slice((Ss-1)*vl,Ss*vl)},[!!Jn,ks,ns&&ns.current,ns&&ns.pageSize,ns&&ns.total]),[Ul,Gu]=Wa({prefixCls:Ws,data:ks,pageData:Dl,getRowKey:xs,getRecordByKey:Yo,expandType:wa,childrenColumnName:ca,locale:ds,getPopupContainer:jr||Za},vi),Du=(Ss,Ys,vl)=>{let Xs;return typeof Ki=="function"?Xs=at()(Ki(Ss,Ys,vl)):Xs=at()(Ki),at()({[`${Ws}-row-selected`]:Gu.has(xs(Ss,Ys))},Xs)};ba.__PARENT_RENDER_ICON__=ba.expandIcon,ba.expandIcon=ba.expandIcon||Uo||Ka(ds),wa==="nest"&&ba.expandIconColumnIndex===void 0?ba.expandIconColumnIndex=vi?1:0:ba.expandIconColumnIndex>0&&vi&&(ba.expandIconColumnIndex-=1),typeof ba.indentSize!="number"&&(ba.indentSize=typeof ka=="number"?ka:15);const ml=Me.useCallback(Ss=>Gs(Ul(Fl(Al(Ss)))),[Al,Fl,Ul]);let Iu,Ou;if(Jn!==!1&&(ns!=null&&ns.total)){let Ss;ns.size?Ss=ns.size:Ss=sa==="small"||sa==="middle"?"small":void 0;const Ys=gs=>Me.createElement(ao.Z,Object.assign({},ns,{className:at()(`${Ws}-pagination ${Ws}-pagination-${gs}`,ns.className),size:Ss})),vl=Es==="rtl"?"left":"right",{position:Xs}=ns;if(Xs!==null&&Array.isArray(Xs)){const gs=Xs.find(xc=>xc.includes("top")),yl=Xs.find(xc=>xc.includes("bottom")),Su=Xs.every(xc=>`${xc}`=="none");!gs&&!yl&&!Su&&(Ou=Ys(vl)),gs&&(Iu=Ys(gs.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=at()(`${Ws}-wrapper`,ls==null?void 0:ls.className,{[`${Ws}-wrapper-rtl`]:Es==="rtl"},Xt,pn,$s),Vc=Object.assign(Object.assign({},ls==null?void 0:ls.style),rn),sc=fo&&fo.emptyText||(qs==null?void 0:qs("Table"))||Me.createElement(Eo.Z,{componentName:"Table"}),lc=Bo?mr:gr,Ku={},ku=Me.useMemo(()=>{const{fontSize:Ss,lineHeight:Ys,padding:vl,paddingXS:Xs,paddingSM:gs}=zs,yl=Math.floor(Ss*Ys);switch(sa){case"large":return vl*2+yl;case"small":return Xs*2+yl;default:return gs*2+yl}},[zs,sa]);return Bo&&(Ku.listItemHeight=ku),Hl(Me.createElement("div",{ref:tt,className:$u,style:Vc},Me.createElement(Ga.Z,Object.assign({spinning:!1},Ns),Iu,Me.createElement(lc,Object.assign({},Ku,Ta,{columns:lo,direction:Es,expandable:ba,prefixCls:Ws,className:at()({[`${Ws}-middle`]:sa==="middle",[`${Ws}-small`]:sa==="small",[`${Ws}-bordered`]:Rn,[`${Ws}-empty`]:el.length===0}),data:Dl,rowKey:xs,rowClassName:Du,emptyText:sc,internalHooks:Te,internalRefs:Jo,transformColumns:ml})),Ou)))};var Fd=Me.forwardRef(_d);const ch=(ot,tt)=>{const Ut=Me.useRef(0);return Ut.current+=1,Me.createElement(Fd,Object.assign({},ot,{ref:tt,_renderTimes:Ut.current}))},li=Me.forwardRef(ch);li.SELECTION_COLUMN=ma,li.EXPAND_COLUMN=le,li.SELECTION_ALL=ya,li.SELECTION_INVERT=Fo,li.SELECTION_NONE=aa,li.Column=Ms,li.ColumnGroup=wo,li.Summary=et;var mo=li,Ja=mo},12563:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return dt}});var le=pe(59301),Te=pe(99267),He=pe(92310),ut=pe.n(He),We=pe(36785),Ue=pe(47729),Me=pe(14088),Ct=pe(36355),Pt=pe(17313),$e=pe(37613),Ft=pe(83116);const lt=Ze=>{const{paddingXXS:Nt,lineWidth:at,tagPaddingHorizontal:kt,componentCls:xt}=Ze,Ot=kt-at,Gt=Nt-at;return{[xt]:Object.assign(Object.assign({},(0,Pt.Wf)(Ze)),{display:"inline-block",height:"auto",marginInlineEnd:Ze.marginXS,paddingInline:Ot,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",[`&${xt}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:Ze.defaultColor},[`${xt}-close-icon`]:{marginInlineStart:Gt,color:Ze.colorTextDescription,fontSize:Ze.tagIconSize,cursor:"pointer",transition:`all ${Ze.motionDurationMid}`,"&:hover":{color:Ze.colorTextHeading}},[`&${xt}-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(${xt}-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:Ot}}),[`${xt}-borderless`]:{borderColor:"transparent",background:Ze.tagBorderlessBg}}},vt=Ze=>{const{lineWidth:Nt,fontSizeIcon:at}=Ze,kt=Ze.fontSizeSM,xt=`${Ze.lineHeightSM*kt}px`;return(0,$e.TS)(Ze,{tagFontSize:kt,tagLineHeight:xt,tagIconSize:at-2*Nt,tagPaddingHorizontal:8,tagBorderlessBg:Ze.colorFillTertiary})},Oe=Ze=>({defaultBg:Ze.colorFillQuaternary,defaultColor:Ze.colorText});var te=(0,Ft.Z)("Tag",Ze=>{const Nt=vt(Ze);return lt(Nt)},Oe),ee=function(Ze,Nt){var at={};for(var kt in Ze)Object.prototype.hasOwnProperty.call(Ze,kt)&&Nt.indexOf(kt)<0&&(at[kt]=Ze[kt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,kt=Object.getOwnPropertySymbols(Ze);xt<kt.length;xt++)Nt.indexOf(kt[xt])<0&&Object.prototype.propertyIsEnumerable.call(Ze,kt[xt])&&(at[kt[xt]]=Ze[kt[xt]]);return at},se=Ze=>{const{prefixCls:Nt,style:at,className:kt,checked:xt,onChange:Ot,onClick:Gt}=Ze,At=ee(Ze,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:qe,tag:Ve}=le.useContext(Ct.E_),_t=ln=>{Ot==null||Ot(!xt),Gt==null||Gt(ln)},vn=qe("tag",Nt),[yn,jt]=te(vn),en=ut()(vn,`${vn}-checkable`,{[`${vn}-checkable-checked`]:xt},Ve==null?void 0:Ve.className,kt,jt);return yn(le.createElement("span",Object.assign({},At,{style:Object.assign(Object.assign({},at),Ve==null?void 0:Ve.style),className:en,onClick:_t})))},he=pe(45157);const ve=Ze=>(0,he.Z)(Ze,(Nt,at)=>{let{textColor:kt,lightBorderColor:xt,lightColor:Ot,darkColor:Gt}=at;return{[`${Ze.componentCls}-${Nt}`]:{color:kt,background:Ot,borderColor:xt,"&-inverse":{color:Ze.colorTextLightSolid,background:Gt,borderColor:Gt},[`&${Ze.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Ee=(0,Ft.b)(["Tag","preset"],Ze=>{const Nt=vt(Ze);return ve(Nt)},Oe);function Be(Ze){return typeof Ze!="string"?Ze:Ze.charAt(0).toUpperCase()+Ze.slice(1)}const Le=(Ze,Nt,at)=>{const kt=Be(at);return{[`${Ze.componentCls}-${Nt}`]:{color:Ze[`color${at}`],background:Ze[`color${kt}Bg`],borderColor:Ze[`color${kt}Border`],[`&${Ze.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ze=(0,Ft.b)(["Tag","status"],Ze=>{const Nt=vt(Ze);return[Le(Nt,"success","Success"),Le(Nt,"processing","Info"),Le(Nt,"error","Error"),Le(Nt,"warning","Warning")]},Oe),je=function(Ze,Nt){var at={};for(var kt in Ze)Object.prototype.hasOwnProperty.call(Ze,kt)&&Nt.indexOf(kt)<0&&(at[kt]=Ze[kt]);if(Ze!=null&&typeof Object.getOwnPropertySymbols=="function")for(var xt=0,kt=Object.getOwnPropertySymbols(Ze);xt<kt.length;xt++)Nt.indexOf(kt[xt])<0&&Object.prototype.propertyIsEnumerable.call(Ze,kt[xt])&&(at[kt[xt]]=Ze[kt[xt]]);return at};const Xe=(Ze,Nt)=>{const{prefixCls:at,className:kt,rootClassName:xt,style:Ot,children:Gt,icon:At,color:qe,onClose:Ve,closeIcon:_t,closable:vn,bordered:yn=!0}=Ze,jt=je(Ze,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:en,direction:ln,tag:Wn}=le.useContext(Ct.E_),[un,kn]=le.useState(!0);le.useEffect(()=>{"visible"in jt&&kn(jt.visible)},[jt.visible]);const wt=(0,We.o2)(qe),jn=(0,We.yT)(qe),ci=wt||jn,Ge=Object.assign(Object.assign({backgroundColor:qe&&!ci?qe:void 0},Wn==null?void 0:Wn.style),Ot),be=en("tag",at),[Pe,Ne]=te(be),Ie=ut()(be,Wn==null?void 0:Wn.className,{[`${be}-${qe}`]:ci,[`${be}-has-color`]:qe&&!ci,[`${be}-hidden`]:!un,[`${be}-rtl`]:ln==="rtl",[`${be}-borderless`]:!yn},kt,xt,Ne),xe=Dt=>{Dt.stopPropagation(),Ve==null||Ve(Dt),!Dt.defaultPrevented&&kn(!1)},[,ct]=(0,Ue.Z)(vn,_t,Dt=>Dt===null?le.createElement(Te.Z,{className:`${be}-close-icon`,onClick:xe}):le.createElement("span",{className:`${be}-close-icon`,onClick:xe},Dt),null,!1),Lt=typeof jt.onClick=="function"||Gt&&Gt.type==="a",et=At||null,it=et?le.createElement(le.Fragment,null,et,Gt&&le.createElement("span",null,Gt)):Gt,Bt=le.createElement("span",Object.assign({},jt,{ref:Nt,className:Ie,style:Ge}),it,ct,wt&&le.createElement(Ee,{key:"preset",prefixCls:be}),jn&&le.createElement(ze,{key:"status",prefixCls:be}));return Pe(Lt?le.createElement(Me.Z,{component:"Tag"},Bt):Bt)},Ye=le.forwardRef(Xe);Ye.CheckableTag=se;var dt=Ye},10777:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return ze}});var le=pe(92310),Te=pe.n(le),He=pe(59301),ut=pe(36355),We=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,dt=Object.getOwnPropertySymbols(je);Ze<dt.length;Ze++)Xe.indexOf(dt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[Ze])&&(Ye[dt[Ze]]=je[dt[Ze]]);return Ye},Me=je=>{var{prefixCls:Xe,className:Ye,color:dt="blue",dot:Ze,pending:Nt=!1,position:at,label:kt,children:xt}=je,Ot=We(je,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:Gt}=He.useContext(ut.E_),At=Gt("timeline",Xe),qe=Te()(`${At}-item`,{[`${At}-item-pending`]:Nt},Ye),Ve=/blue|red|green|gray/.test(dt||"")?void 0:dt,_t=Te()(`${At}-item-head`,{[`${At}-item-head-custom`]:!!Ze,[`${At}-item-head-${dt}`]:!Ve});return He.createElement("li",Object.assign({},Ot,{className:qe}),kt&&He.createElement("div",{className:`${At}-item-label`},kt),He.createElement("div",{className:`${At}-item-tail`}),He.createElement("div",{className:_t,style:{borderColor:Ve,color:Ve}},Ze),He.createElement("div",{className:`${At}-item-content`},xt))},Ct=pe(26407),Pt=pe(58617),$e=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,dt=Object.getOwnPropertySymbols(je);Ze<dt.length;Ze++)Xe.indexOf(dt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[Ze])&&(Ye[dt[Ze]]=je[dt[Ze]]);return Ye},lt=je=>{var{prefixCls:Xe,className:Ye,pending:dt=!1,children:Ze,items:Nt,rootClassName:at,reverse:kt=!1,direction:xt,hashId:Ot,pendingDot:Gt,mode:At=""}=je,qe=$e(je,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const Ve=(un,kn)=>At==="alternate"?un==="right"?`${Xe}-item-right`:un==="left"?`${Xe}-item-left`:kn%2===0?`${Xe}-item-left`:`${Xe}-item-right`:At==="left"?`${Xe}-item-left`:At==="right"?`${Xe}-item-right`:un==="right"?`${Xe}-item-right`:"",_t=(0,Ct.Z)(Nt||[]),vn=typeof dt=="boolean"?null:dt;dt&&_t.push({pending:!!dt,dot:Gt||He.createElement(Pt.Z,null),children:vn}),kt&&_t.reverse();const yn=_t.length,jt=`${Xe}-item-last`,en=_t.filter(un=>!!un).map((un,kn)=>{var wt;const jn=kn===yn-2?jt:"",ci=kn===yn-1?jt:"",{className:Ge}=un,be=$e(un,["className"]);return He.createElement(Me,Object.assign({},be,{className:Te()([Ge,!kt&&dt?jn:ci,Ve((wt=un==null?void 0:un.position)!==null&&wt!==void 0?wt:"",kn)]),key:(un==null?void 0:un.key)||kn}))}),ln=_t.some(un=>!!(un!=null&&un.label)),Wn=Te()(Xe,{[`${Xe}-pending`]:!!dt,[`${Xe}-reverse`]:!!kt,[`${Xe}-${At}`]:!!At&&!ln,[`${Xe}-label`]:ln,[`${Xe}-rtl`]:xt==="rtl"},Ye,at,Ot);return He.createElement("ul",Object.assign({},qe,{className:Wn}),en)},vt=pe(11592);function Oe(je,Xe){return je&&Array.isArray(je)?je:(0,vt.Z)(Xe).map(Ye=>{var dt,Ze;return Object.assign({children:(Ze=(dt=Ye==null?void 0:Ye.props)===null||dt===void 0?void 0:dt.children)!==null&&Ze!==void 0?Ze:""},Ye.props)})}var te=Oe,ee=pe(17313),de=pe(83116),se=pe(37613);const he=je=>{const{componentCls:Xe}=je;return{[Xe]:Object.assign(Object.assign({},(0,ee.Wf)(je)),{margin:0,padding:0,listStyle:"none",[`${Xe}-item`]:{position:"relative",margin:0,paddingBottom:je.itemPaddingBottom,fontSize:je.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:je.itemHeadSize,insetInlineStart:(je.itemHeadSize-je.tailWidth)/2,height:`calc(100% - ${je.itemHeadSize}px)`,borderInlineStart:`${je.tailWidth}px ${je.lineType} ${je.tailColor}`},"&-pending":{[`${Xe}-item-head`]:{fontSize:je.fontSizeSM,backgroundColor:"transparent"},[`${Xe}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:je.itemHeadSize,height:je.itemHeadSize,backgroundColor:je.dotBg,border:`${je.dotBorderWidth}px ${je.lineType} transparent`,borderRadius:"50%","&-blue":{color:je.colorPrimary,borderColor:je.colorPrimary},"&-red":{color:je.colorError,borderColor:je.colorError},"&-green":{color:je.colorSuccess,borderColor:je.colorSuccess},"&-gray":{color:je.colorTextDisabled,borderColor:je.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:je.itemHeadSize/2,insetInlineStart:je.itemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:je.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(je.fontSize*je.lineHeight-je.fontSize)+je.lineWidth,marginInlineStart:je.margin+je.itemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${Xe}-item-tail`]:{display:"none"},[`> ${Xe}-item-content`]:{minHeight:je.controlHeightLG*1.2}}},[`&${Xe}-alternate,
&${Xe}-right,
&${Xe}-label`]:{[`${Xe}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${je.marginXXS}px`,"&-custom":{marginInlineStart:je.tailWidth/2}},"&-left":{[`${Xe}-item-content`]:{insetInlineStart:`calc(50% - ${je.marginXXS}px)`,width:`calc(50% - ${je.marginSM}px)`,textAlign:"start"}},"&-right":{[`${Xe}-item-content`]:{width:`calc(50% - ${je.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${Xe}-right`]:{[`${Xe}-item-right`]:{[`${Xe}-item-tail,
${Xe}-item-head,
${Xe}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(je.itemHeadSize+je.tailWidth)/2}px)`},[`${Xe}-item-content`]:{width:`calc(100% - ${je.itemHeadSize+je.marginXS}px)`}}},[`&${Xe}-pending
${Xe}-item-last
${Xe}-item-tail`]:{display:"block",height:`calc(100% - ${je.margin}px)`,borderInlineStart:`${je.tailWidth}px dotted ${je.tailColor}`},[`&${Xe}-reverse
${Xe}-item-last
${Xe}-item-tail`]:{display:"none"},[`&${Xe}-reverse ${Xe}-item-pending`]:{[`${Xe}-item-tail`]:{insetBlockStart:je.margin,display:"block",height:`calc(100% - ${je.margin}px)`,borderInlineStart:`${je.tailWidth}px dotted ${je.tailColor}`},[`${Xe}-item-content`]:{minHeight:je.controlHeightLG*1.2}},[`&${Xe}-label`]:{[`${Xe}-item-label`]:{position:"absolute",insetBlockStart:-(je.fontSize*je.lineHeight-je.fontSize)+je.tailWidth,width:`calc(50% - ${je.marginSM}px)`,textAlign:"end"},[`${Xe}-item-right`]:{[`${Xe}-item-label`]:{insetInlineStart:`calc(50% + ${je.marginSM}px)`,width:`calc(50% - ${je.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${Xe}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var ve=(0,de.Z)("Timeline",je=>{const Xe=(0,se.TS)(je,{itemHeadSize:10,customHeadPaddingVertical:je.paddingXXS,paddingInlineEnd:2});return[he(Xe)]},je=>({tailColor:je.colorSplit,tailWidth:je.lineWidthBold,dotBorderWidth:je.wireframe?je.lineWidthBold:je.lineWidth*3,dotBg:je.colorBgContainer,itemPaddingBottom:je.padding*1.25})),Ee=function(je,Xe){var Ye={};for(var dt in je)Object.prototype.hasOwnProperty.call(je,dt)&&Xe.indexOf(dt)<0&&(Ye[dt]=je[dt]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ze=0,dt=Object.getOwnPropertySymbols(je);Ze<dt.length;Ze++)Xe.indexOf(dt[Ze])<0&&Object.prototype.propertyIsEnumerable.call(je,dt[Ze])&&(Ye[dt[Ze]]=je[dt[Ze]]);return Ye};const Be=je=>{const{getPrefixCls:Xe,direction:Ye,timeline:dt}=He.useContext(ut.E_),{prefixCls:Ze,children:Nt,items:at,className:kt,style:xt}=je,Ot=Ee(je,["prefixCls","children","items","className","style"]),Gt=Xe("timeline",Ze),[At,qe]=ve(Gt),Ve=te(at,Nt);return At(He.createElement(lt,Object.assign({},Ot,{className:Te()(dt==null?void 0:dt.className,kt),style:Object.assign(Object.assign({},dt==null?void 0:dt.style),xt),prefixCls:Gt,direction:Ye,items:Ve,hashId:qe})))};Be.Item=Me;var Le=Be,ze=Le},17574:function(On,mn,pe){"use strict";pe.d(mn,{default:function(){return qe}});var le=pe(23130),Te=pe(26407),He=pe(52671),ut=pe(8657),We=pe(92413),Ue=pe(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"},Ct=Me,Pt=pe(7657),$e=function(_t,vn){return Ue.createElement(Pt.Z,(0,We.Z)({},_t,{ref:vn,icon:Ct}))},Ft=Ue.forwardRef($e),lt=Ft,vt=pe(92310),Oe=pe.n(vt),te=pe(35654),ee=pe(71430),de=pe(36355),se=pe(56082),he=pe(62892),ve=pe(20648);const Ee=4;function Be(Ve){const{dropPosition:_t,dropLevelOffset:vn,prefixCls:yn,indent:jt,direction:en="ltr"}=Ve,ln=en==="ltr"?"left":"right",Wn=en==="ltr"?"right":"left",un={[ln]:-vn*jt+Ee,[Wn]:0};switch(_t){case-1:un.top=-3;break;case 1:un.bottom=-3;break;default:un.bottom=-3,un[ln]=jt+Ee;break}return Ue.createElement("div",{style:un,className:`${yn}-drop-indicator`})}var Le=pe(71997),je=Ue.forwardRef((Ve,_t)=>{const{getPrefixCls:vn,direction:yn,virtual:jt,tree:en}=Ue.useContext(de.E_),{prefixCls:ln,className:Wn,showIcon:un=!1,showLine:kn,switcherIcon:wt,blockNode:jn=!1,children:ci,checkable:Ge=!1,selectable:be=!0,draggable:Pe,motion:Ne,style:Ie}=Ve,xe=vn("tree",ln),ct=vn(),Lt=Ne!=null?Ne:Object.assign(Object.assign({},(0,he.Z)(ct)),{motionAppear:!1}),et=Object.assign(Object.assign({},Ve),{checkable:Ge,selectable:be,showIcon:un,motion:Lt,blockNode:jn,showLine:!!kn,dropIndicatorRender:Be}),[it,Bt]=(0,ve.ZP)(xe),Dt=Ue.useMemo(()=>{if(!Pe)return!1;let $t={};switch(typeof Pe){case"function":$t.nodeDraggable=Pe;break;case"object":$t=Object.assign({},Pe);break;default:break}return $t.icon!==!1&&($t.icon=$t.icon||Ue.createElement(se.Z,null)),$t},[Pe]),ft=$t=>Ue.createElement(Le.Z,{prefixCls:xe,switcherIcon:wt,treeNodeProps:$t,showLine:kn});return it(Ue.createElement(le.Z,Object.assign({itemHeight:20,ref:_t,virtual:jt},et,{style:Object.assign(Object.assign({},en==null?void 0:en.style),Ie),prefixCls:xe,className:Oe()({[`${xe}-icon-hide`]:!un,[`${xe}-block-node`]:jn,[`${xe}-unselectable`]:!be,[`${xe}-rtl`]:yn==="rtl"},en==null?void 0:en.className,Wn,Bt),direction:yn,checkable:Ge&&Ue.createElement("span",{className:`${xe}-checkbox-inner`}),selectable:be,switcherIcon:ft,draggable:Dt}),ci))}),Xe;(function(Ve){Ve[Ve.None=0]="None",Ve[Ve.Start=1]="Start",Ve[Ve.End=2]="End"})(Xe||(Xe={}));function Ye(Ve,_t){function vn(yn){const{key:jt,children:en}=yn;_t(jt,yn)!==!1&&Ye(en||[],_t)}Ve.forEach(vn)}function dt(Ve){let{treeData:_t,expandedKeys:vn,startKey:yn,endKey:jt}=Ve;const en=[];let ln=Xe.None;if(yn&&yn===jt)return[yn];if(!yn||!jt)return[];function Wn(un){return un===yn||un===jt}return Ye(_t,un=>{if(ln===Xe.End)return!1;if(Wn(un)){if(en.push(un),ln===Xe.None)ln=Xe.Start;else if(ln===Xe.Start)return ln=Xe.End,!1}else ln===Xe.Start&&en.push(un);return vn.includes(un)}),en}function Ze(Ve,_t){const vn=(0,Te.Z)(_t),yn=[];return Ye(Ve,(jt,en)=>{const ln=vn.indexOf(jt);return ln!==-1&&(yn.push(en),vn.splice(ln,1)),!!vn.length}),yn}var Nt=function(Ve,_t){var vn={};for(var yn in Ve)Object.prototype.hasOwnProperty.call(Ve,yn)&&_t.indexOf(yn)<0&&(vn[yn]=Ve[yn]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var jt=0,yn=Object.getOwnPropertySymbols(Ve);jt<yn.length;jt++)_t.indexOf(yn[jt])<0&&Object.prototype.propertyIsEnumerable.call(Ve,yn[jt])&&(vn[yn[jt]]=Ve[yn[jt]]);return vn};function at(Ve){const{isLeaf:_t,expanded:vn}=Ve;return _t?Ue.createElement(He.Z,null):vn?Ue.createElement(ut.Z,null):Ue.createElement(lt,null)}function kt(Ve){let{treeData:_t,children:vn}=Ve;return _t||(0,ee.zn)(vn)}const xt=(Ve,_t)=>{var{defaultExpandAll:vn,defaultExpandParent:yn,defaultExpandedKeys:jt}=Ve,en=Nt(Ve,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const ln=Ue.useRef(),Wn=Ue.useRef(),un=()=>{const{keyEntities:Dt}=(0,ee.I8)(kt(en));let ft;return vn?ft=Object.keys(Dt):yn?ft=(0,te.r7)(en.expandedKeys||jt||[],Dt):ft=en.expandedKeys||jt,ft},[kn,wt]=Ue.useState(en.selectedKeys||en.defaultSelectedKeys||[]),[jn,ci]=Ue.useState(()=>un());Ue.useEffect(()=>{"selectedKeys"in en&&wt(en.selectedKeys)},[en.selectedKeys]),Ue.useEffect(()=>{"expandedKeys"in en&&ci(en.expandedKeys)},[en.expandedKeys]);const Ge=(Dt,ft)=>{var $t;return"expandedKeys"in en||ci(Dt),($t=en.onExpand)===null||$t===void 0?void 0:$t.call(en,Dt,ft)},be=(Dt,ft)=>{var $t;const{multiple:xn}=en,{node:an,nativeEvent:Jt}=ft,{key:Tn=""}=an,Kn=kt(en),dn=Object.assign(Object.assign({},ft),{selected:!0}),Qn=(Jt==null?void 0:Jt.ctrlKey)||(Jt==null?void 0:Jt.metaKey),pi=Jt==null?void 0:Jt.shiftKey;let zn;xn&&Qn?(zn=Dt,ln.current=Tn,Wn.current=zn,dn.selectedNodes=Ze(Kn,zn)):xn&&pi?(zn=Array.from(new Set([].concat((0,Te.Z)(Wn.current||[]),(0,Te.Z)(dt({treeData:Kn,expandedKeys:jn,startKey:Tn,endKey:ln.current}))))),dn.selectedNodes=Ze(Kn,zn)):(zn=[Tn],ln.current=Tn,Wn.current=zn,dn.selectedNodes=Ze(Kn,zn)),($t=en.onSelect)===null||$t===void 0||$t.call(en,zn,dn),"selectedKeys"in en||wt(zn)},{getPrefixCls:Pe,direction:Ne}=Ue.useContext(de.E_),{prefixCls:Ie,className:xe,showIcon:ct=!0,expandAction:Lt="click"}=en,et=Nt(en,["prefixCls","className","showIcon","expandAction"]),it=Pe("tree",Ie),Bt=Oe()(`${it}-directory`,{[`${it}-directory-rtl`]:Ne==="rtl"},xe);return Ue.createElement(je,Object.assign({icon:at,ref:_t,blockNode:!0},et,{showIcon:ct,expandAction:Lt,prefixCls:it,className:Bt,expandedKeys:jn,selectedKeys:kn,onSelect:be,onExpand:Ge}))};var Gt=Ue.forwardRef(xt);const At=je;At.DirectoryTree=Gt,At.TreeNode=le.O;var qe=At},20648:function(On,mn,pe){"use strict";pe.d(mn,{TM:function(){return vt},Yk:function(){return lt}});var le=pe(93083),Te=pe(98447),He=pe(17313),ut=pe(8378),We=pe(37613),Ue=pe(83116);const Me=new le.Keyframes("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Ct=(Oe,te)=>({[`.${Oe}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${te.motionDurationSlow}`}}}),Pt=(Oe,te)=>({[`.${Oe}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:te.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${te.lineWidthBold}px solid ${te.colorPrimary}`,borderRadius:"50%",content:'""'}}}),$e=(Oe,te)=>{const{treeCls:ee,treeNodeCls:de,treeNodePadding:se,titleHeight:he,nodeSelectedBg:ve,nodeHoverBg:Ee}=te,Be=te.paddingXS;return{[ee]:Object.assign(Object.assign({},(0,He.Wf)(te)),{background:te.colorBgContainer,borderRadius:te.borderRadius,transition:`background-color ${te.motionDurationSlow}`,[`&${ee}-rtl`]:{[`${ee}-switcher`]:{"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${ee}-active-focused)`]:Object.assign({},(0,He.oN)(te)),[`${ee}-list-holder-inner`]:{alignItems:"flex-start"},[`&${ee}-block-node`]:{[`${ee}-list-holder-inner`]:{alignItems:"stretch",[`${ee}-node-content-wrapper`]:{flex:"auto"},[`${de}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:se,insetInlineStart:0,border:`1px solid ${te.colorPrimary}`,opacity:0,animationName:Me,animationDuration:te.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${de}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${se}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${ee}-node-content-wrapper`]:{color:te.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${ee}-node-content-wrapper`]:Object.assign({},(0,He.oN)(te)),[`&:not(${de}-disabled).filter-node ${ee}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${ee}-draggable-icon`]:{flexShrink:0,width:he,lineHeight:`${he}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${te.motionDurationSlow}`,[`${de}:hover &`]:{opacity:.45}},[`&${de}-disabled`]:{[`${ee}-draggable-icon`]:{visibility:"hidden"}}}},[`${ee}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:he}},[`${ee}-draggable-icon`]:{visibility:"hidden"},[`${ee}-switcher`]:Object.assign(Object.assign({},Ct(Oe,te)),{position:"relative",flex:"none",alignSelf:"stretch",width:he,margin:0,lineHeight:`${he}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${ee}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:te.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:he/2,bottom:-se,marginInlineStart:-1,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:he/2*.8,height:he/2,borderBottom:`1px solid ${te.colorBorder}`,content:'""'}}}),[`${ee}-checkbox`]:{top:"initial",marginInlineEnd:Be},[`${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(Oe,te)),[`${de}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${te.colorPrimary}`}},"&-show-line":{[`${ee}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:he/2,bottom:-se,borderInlineEnd:`1px solid ${te.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${ee}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${de}-leaf-last`]:{[`${ee}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${he/2}px !important`}}}}})}},Ft=Oe=>{const{treeCls:te,treeNodeCls:ee,treeNodePadding:de,directoryNodeSelectedBg:se,directoryNodeSelectedColor:he}=Oe;return{[`${te}${te}-directory`]:{[ee]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:de,insetInlineStart:0,transition:`background-color ${Oe.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:Oe.controlItemBgHover}},"> *":{zIndex:1},[`${te}-switcher`]:{transition:`color ${Oe.motionDurationMid}`},[`${te}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${te}-node-selected`]:{color:he,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:se},[`${te}-switcher`]:{color:he},[`${te}-node-content-wrapper`]:{color:he,background:"transparent"}}}}}},lt=(Oe,te)=>{const ee=`.${Oe}`,de=`${ee}-treenode`,se=te.paddingXS/2,he=(0,We.TS)(te,{treeCls:ee,treeNodeCls:de,treeNodePadding:se});return[$e(Oe,he),Ft(he)]},vt=Oe=>{const{controlHeightSM:te}=Oe;return{titleHeight:te,nodeHoverBg:Oe.controlItemBgHover,nodeSelectedBg:Oe.controlItemBgActive}};mn.ZP=(0,Ue.Z)("Tree",(Oe,te)=>{let{prefixCls:ee}=te;return[{[Oe.componentCls]:(0,Te.C2)(`${ee}-checkbox`,Oe)},lt(ee,Oe),(0,ut.Z)(Oe)]},Oe=>{const{colorTextLightSolid:te,colorPrimary:ee}=Oe;return Object.assign(Object.assign({},vt(Oe)),{directoryNodeSelectedColor:te,directoryNodeSelectedBg:ee})})},71997:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return de}});var le=pe(92413),Te=pe(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"},ut=He,We=pe(7657),Ue=function(he,ve){return Te.createElement(We.Z,(0,le.Z)({},he,{ref:ve,icon:ut}))},Me=Te.forwardRef(Ue),Ct=Me,Pt=pe(52671),$e=pe(58617),Ft=pe(15075),lt=pe(43531),vt=pe(92310),Oe=pe.n(vt),te=pe(92343),de=se=>{const{prefixCls:he,switcherIcon:ve,treeNodeProps:Ee,showLine:Be}=se,{isLeaf:Le,expanded:ze,loading:je}=Ee;if(je)return Te.createElement($e.Z,{className:`${he}-switcher-loading-icon`});let Xe;if(Be&&typeof Be=="object"&&(Xe=Be.showLeafIcon),Le){if(!Be)return null;if(typeof Xe!="boolean"&&Xe){const Ze=typeof Xe=="function"?Xe(Ee):Xe,Nt=`${he}-switcher-line-custom-icon`;return(0,te.l$)(Ze)?(0,te.Tm)(Ze,{className:Oe()(Ze.props.className||"",Nt)}):Ze}return Xe?Te.createElement(Pt.Z,{className:`${he}-switcher-line-icon`}):Te.createElement("span",{className:`${he}-switcher-leaf-line`})}const Ye=`${he}-switcher-icon`,dt=typeof ve=="function"?ve(Ee):ve;return(0,te.l$)(dt)?(0,te.Tm)(dt,{className:Oe()(dt.props.className||"",Ye)}):dt!==void 0?dt:Be?ze?Te.createElement(Ft.Z,{className:`${he}-switcher-line-icon`}):Te.createElement(lt.Z,{className:`${he}-switcher-line-icon`}):Te.createElement(Ct,{className:Ye})}},99498:function(On,mn,pe){(function(le){le(pe(89780))})(function(le){le.defineOption("placeholder","",function(Ct,Pt,$e){var Ft=$e&&$e!=le.Init;if(Pt&&!Ft)Ct.on("blur",We),Ct.on("change",Ue),Ct.on("swapDoc",Ue),le.on(Ct.getInputField(),"compositionupdate",Ct.state.placeholderCompose=function(){ut(Ct)}),Ue(Ct);else if(!Pt&&Ft){Ct.off("blur",We),Ct.off("change",Ue),Ct.off("swapDoc",Ue),le.off(Ct.getInputField(),"compositionupdate",Ct.state.placeholderCompose),Te(Ct);var lt=Ct.getWrapperElement();lt.className=lt.className.replace(" CodeMirror-empty","")}Pt&&!Ct.hasFocus()&&We(Ct)});function Te(Ct){Ct.state.placeholder&&(Ct.state.placeholder.parentNode.removeChild(Ct.state.placeholder),Ct.state.placeholder=null)}function He(Ct){Te(Ct);var Pt=Ct.state.placeholder=document.createElement("pre");Pt.style.cssText="height: 0; overflow: visible",Pt.style.direction=Ct.getOption("direction"),Pt.className="CodeMirror-placeholder CodeMirror-line-like";var $e=Ct.getOption("placeholder");typeof $e=="string"&&($e=document.createTextNode($e)),Pt.appendChild($e),Ct.display.lineSpace.insertBefore(Pt,Ct.display.lineSpace.firstChild)}function ut(Ct){setTimeout(function(){var Pt=!1,$e=Ct.getInputField();$e.nodeName=="TEXTAREA"?Pt=!$e.value:Ct.lineCount()==1&&(Pt=!/[^\u200b]/.test($e.querySelector(".CodeMirror-line").textContent)),Pt?He(Ct):Te(Ct)},20)}function We(Ct){Me(Ct)&&He(Ct)}function Ue(Ct){var Pt=Ct.getWrapperElement(),$e=Me(Ct);Pt.className=Pt.className.replace(" CodeMirror-empty","")+($e?" CodeMirror-empty":""),$e?He(Ct):Te(Ct)}function Me(Ct){return Ct.lineCount()===1&&Ct.getLine(0)===""}})},25717:function(On,mn,pe){(function(le){le(pe(89780))})(function(le){var Te={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},He=le.Pos;le.defineOption("autoCloseBrackets",!1,function(te,ee,de){de&&de!=le.Init&&(te.removeKeyMap(We),te.state.closeBrackets=null),ee&&(Ue(ut(ee,"pairs")),te.state.closeBrackets=ee,te.addKeyMap(We))});function ut(te,ee){return ee=="pairs"&&typeof te=="string"?te:typeof te=="object"&&te[ee]!=null?te[ee]:Te[ee]}var We={Backspace:Pt,Enter:$e};function Ue(te){for(var ee=0;ee<te.length;ee++){var de=te.charAt(ee),se="'"+de+"'";We[se]||(We[se]=Me(de))}}Ue(Te.pairs+"`");function Me(te){return function(ee){return lt(ee,te)}}function Ct(te){var ee=te.state.closeBrackets;if(!ee||ee.override)return ee;var de=te.getModeAt(te.getCursor());return de.closeBrackets||ee}function Pt(te){var ee=Ct(te);if(!ee||te.getOption("disableInput"))return le.Pass;for(var de=ut(ee,"pairs"),se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return le.Pass;var ve=vt(te,se[he].head);if(!ve||de.indexOf(ve)%2!=0)return le.Pass}for(var he=se.length-1;he>=0;he--){var Ee=se[he].head;te.replaceRange("",He(Ee.line,Ee.ch-1),He(Ee.line,Ee.ch+1),"+delete")}}function $e(te){var ee=Ct(te),de=ee&&ut(ee,"explode");if(!de||te.getOption("disableInput"))return le.Pass;for(var se=te.listSelections(),he=0;he<se.length;he++){if(!se[he].empty())return le.Pass;var ve=vt(te,se[he].head);if(!ve||de.indexOf(ve)%2!=0)return le.Pass}te.operation(function(){var Ee=te.lineSeparator()||`
`;te.replaceSelection(Ee+Ee,null),te.execCommand("goCharLeft"),se=te.listSelections();for(var Be=0;Be<se.length;Be++){var Le=se[Be].head.line;te.indentLine(Le,null,!0),te.indentLine(Le+1,null,!0)}})}function Ft(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 lt(te,ee){var de=Ct(te);if(!de||te.getOption("disableInput"))return le.Pass;var se=ut(de,"pairs"),he=se.indexOf(ee);if(he==-1)return le.Pass;for(var ve=ut(de,"closeBefore"),Ee=ut(de,"triples"),Be=se.charAt(he+1)==ee,Le=te.listSelections(),ze=he%2==0,je,Xe=0;Xe<Le.length;Xe++){var Ye=Le[Xe],dt=Ye.head,Ze,Nt=te.getRange(dt,He(dt.line,dt.ch+1));if(ze&&!Ye.empty())Ze="surround";else if((Be||!ze)&&Nt==ee)Be&&Oe(te,dt)?Ze="both":Ee.indexOf(ee)>=0&&te.getRange(dt,He(dt.line,dt.ch+3))==ee+ee+ee?Ze="skipThree":Ze="skip";else if(Be&&dt.ch>1&&Ee.indexOf(ee)>=0&&te.getRange(He(dt.line,dt.ch-2),dt)==ee+ee){if(dt.ch>2&&/\bstring/.test(te.getTokenTypeAt(He(dt.line,dt.ch-2))))return le.Pass;Ze="addFour"}else if(Be){var at=dt.ch==0?" ":te.getRange(He(dt.line,dt.ch-1),dt);if(!le.isWordChar(Nt)&&at!=ee&&!le.isWordChar(at))Ze="both";else return le.Pass}else if(ze&&(Nt.length===0||/\s/.test(Nt)||ve.indexOf(Nt)>-1))Ze="both";else return le.Pass;if(!je)je=Ze;else if(je!=Ze)return le.Pass}var kt=he%2?se.charAt(he-1):ee,xt=he%2?ee:se.charAt(he+1);te.operation(function(){if(je=="skip")te.execCommand("goCharRight");else if(je=="skipThree")for(var Ot=0;Ot<3;Ot++)te.execCommand("goCharRight");else if(je=="surround"){for(var Gt=te.getSelections(),Ot=0;Ot<Gt.length;Ot++)Gt[Ot]=kt+Gt[Ot]+xt;te.replaceSelections(Gt,"around"),Gt=te.listSelections().slice();for(var Ot=0;Ot<Gt.length;Ot++)Gt[Ot]=Ft(Gt[Ot]);te.setSelections(Gt)}else je=="both"?(te.replaceSelection(kt+xt,null),te.triggerElectric(kt+xt),te.execCommand("goCharLeft")):je=="addFour"&&(te.replaceSelection(kt+kt+kt+kt,"before"),te.execCommand("goCharRight"))})}function vt(te,ee){var de=te.getRange(He(ee.line,ee.ch-1),He(ee.line,ee.ch+1));return de.length==2?de:null}function Oe(te,ee){var de=te.getTokenAt(He(ee.line,ee.ch+1));return/\bstring/.test(de.type)&&de.start==ee.ch&&(ee.ch==0||!/\bstring/.test(te.getTokenTypeAt(ee)))}})},6313:function(On,mn,pe){(function(le){le(pe(89780),pe(32855))})(function(le){le.defineOption("autoCloseTags",!1,function(Pt,$e,Ft){if(Ft!=le.Init&&Ft&&Pt.removeKeyMap("autoCloseTags"),!!$e){var lt={name:"autoCloseTags"};(typeof $e!="object"||$e.whenClosing!==!1)&&(lt["'/'"]=function(vt){return Ue(vt)}),(typeof $e!="object"||$e.whenOpening!==!1)&&(lt["'>'"]=function(vt){return ut(vt)}),Pt.addKeyMap(lt)}});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 ut(Pt){if(Pt.getOption("disableInput"))return le.Pass;for(var $e=Pt.listSelections(),Ft=[],lt=Pt.getOption("autoCloseTags"),vt=0;vt<$e.length;vt++){if(!$e[vt].empty())return le.Pass;var Oe=$e[vt].head,te=Pt.getTokenAt(Oe),ee=le.innerMode(Pt.getMode(),te.state),de=ee.state,se=ee.mode.xmlCurrentTag&&ee.mode.xmlCurrentTag(de),he=se&&se.name;if(!he)return le.Pass;var ve=ee.mode.configuration=="html",Ee=typeof lt=="object"&&lt.dontCloseTags||ve&&Te,Be=typeof lt=="object"&&lt.indentTags||ve&&He;te.end>Oe.ch&&(he=he.slice(0,he.length-te.end+Oe.ch));var Le=he.toLowerCase();if(!he||te.type=="string"&&(te.end!=Oe.ch||!/[\"\']/.test(te.string.charAt(te.string.length-1))||te.string.length==1)||te.type=="tag"&&se.close||te.string.indexOf("/")==Oe.ch-te.start-1||Ee&&Me(Ee,Le)>-1||Ct(Pt,ee.mode.xmlCurrentContext&&ee.mode.xmlCurrentContext(de)||[],he,Oe,!0))return le.Pass;var ze=typeof lt=="object"&&lt.emptyTags;if(ze&&Me(ze,he)>-1){Ft[vt]={text:"/>",newPos:le.Pos(Oe.line,Oe.ch+2)};continue}var je=Be&&Me(Be,Le)>-1;Ft[vt]={indent:je,text:">"+(je?`
`:"")+"</"+he+">",newPos:je?le.Pos(Oe.line+1,0):le.Pos(Oe.line,Oe.ch+1)}}for(var Xe=typeof lt=="object"&&lt.dontIndentOnAutoClose,vt=$e.length-1;vt>=0;vt--){var Ye=Ft[vt];Pt.replaceRange(Ye.text,$e[vt].head,$e[vt].anchor,"+insert");var dt=Pt.listSelections().slice(0);dt[vt]={head:Ye.newPos,anchor:Ye.newPos},Pt.setSelections(dt),!Xe&&Ye.indent&&(Pt.indentLine(Ye.newPos.line,null,!0),Pt.indentLine(Ye.newPos.line+1,null,!0))}}function We(Pt,$e){for(var Ft=Pt.listSelections(),lt=[],vt=$e?"/":"</",Oe=Pt.getOption("autoCloseTags"),te=typeof Oe=="object"&&Oe.dontIndentOnSlash,ee=0;ee<Ft.length;ee++){if(!Ft[ee].empty())return le.Pass;var de=Ft[ee].head,se=Pt.getTokenAt(de),he=le.innerMode(Pt.getMode(),se.state),ve=he.state;if($e&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=de.ch-1))return le.Pass;var Ee,Be=he.mode.name!="xml"&&Pt.getMode().name=="htmlmixed";if(Be&&he.mode.name=="javascript")Ee=vt+"script";else if(Be&&he.mode.name=="css")Ee=vt+"style";else{var Le=he.mode.xmlCurrentContext&&he.mode.xmlCurrentContext(ve);if(!Le||Le.length&&Ct(Pt,Le,Le[Le.length-1],de))return le.Pass;Ee=vt+Le[Le.length-1]}Pt.getLine(de.line).charAt(se.end)!=">"&&(Ee+=">"),lt[ee]=Ee}if(Pt.replaceSelections(lt),Ft=Pt.listSelections(),!te)for(var ee=0;ee<Ft.length;ee++)(ee==Ft.length-1||Ft[ee].head.line<Ft[ee+1].head.line)&&Pt.indentLine(Ft[ee].head.line)}function Ue(Pt){return Pt.getOption("disableInput")?le.Pass:We(Pt,!0)}le.commands.closeTag=function(Pt){return We(Pt)};function Me(Pt,$e){if(Pt.indexOf)return Pt.indexOf($e);for(var Ft=0,lt=Pt.length;Ft<lt;++Ft)if(Pt[Ft]==$e)return Ft;return-1}function Ct(Pt,$e,Ft,lt,vt){if(!le.scanForClosingTag)return!1;var Oe=Math.min(Pt.lastLine()+1,lt.line+500),te=le.scanForClosingTag(Pt,lt,null,Oe);if(!te||te.tag!=Ft)return!1;for(var ee=vt?1:0,de=$e.length-1;de>=0&&$e[de]==Ft;de--)++ee;lt=te.to;for(var de=1;de<ee;de++){var se=le.scanForClosingTag(Pt,lt,null,Oe);if(!se||se.tag!=Ft)return!1;lt=se.to}return!0}})},32855:function(On,mn,pe){(function(le){le(pe(89780))})(function(le){"use strict";var Te=le.Pos;function He(de,se){return de.line-se.line||de.ch-se.ch}var ut="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",We=ut+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ue=new RegExp("<(/?)(["+ut+"]["+We+"]*)","g");function Me(de,se,he,ve){this.line=se,this.ch=he,this.cm=de,this.text=de.getLine(se),this.min=ve?Math.max(ve.from,de.firstLine()):de.firstLine(),this.max=ve?Math.min(ve.to-1,de.lastLine()):de.lastLine()}function Ct(de,se){var he=de.cm.getTokenTypeAt(Te(de.line,se));return he&&/\btag\b/.test(he)}function Pt(de){if(!(de.line>=de.max))return de.ch=0,de.text=de.cm.getLine(++de.line),!0}function $e(de){if(!(de.line<=de.min))return de.text=de.cm.getLine(--de.line),de.ch=de.text.length,!0}function Ft(de){for(;;){var se=de.text.indexOf(">",de.ch);if(se==-1){if(Pt(de))continue;return}if(!Ct(de,se+1)){de.ch=se+1;continue}var he=de.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(de.text.slice(he+1,se));return de.ch=se+1,ve?"selfClose":"regular"}}function lt(de){for(;;){var se=de.ch?de.text.lastIndexOf("<",de.ch-1):-1;if(se==-1){if($e(de))continue;return}if(!Ct(de,se+1)){de.ch=se;continue}Ue.lastIndex=se,de.ch=se;var he=Ue.exec(de.text);if(he&&he.index==se)return he}}function vt(de){for(;;){Ue.lastIndex=de.ch;var se=Ue.exec(de.text);if(!se){if(Pt(de))continue;return}if(!Ct(de,se.index+1)){de.ch=se.index+1;continue}return de.ch=se.index+se[0].length,se}}function Oe(de){for(;;){var se=de.ch?de.text.lastIndexOf(">",de.ch-1):-1;if(se==-1){if($e(de))continue;return}if(!Ct(de,se+1)){de.ch=se;continue}var he=de.text.lastIndexOf("/",se),ve=he>-1&&!/\S/.test(de.text.slice(he+1,se));return de.ch=se+1,ve?"selfClose":"regular"}}function te(de,se){for(var he=[];;){var ve=vt(de),Ee,Be=de.line,Le=de.ch-(ve?ve[0].length:0);if(!ve||!(Ee=Ft(de)))return;if(Ee!="selfClose")if(ve[1]){for(var ze=he.length-1;ze>=0;--ze)if(he[ze]==ve[2]){he.length=ze;break}if(ze<0&&(!se||se==ve[2]))return{tag:ve[2],from:Te(Be,Le),to:Te(de.line,de.ch)}}else he.push(ve[2])}}function ee(de,se){for(var he=[];;){var ve=Oe(de);if(!ve)return;if(ve=="selfClose"){lt(de);continue}var Ee=de.line,Be=de.ch,Le=lt(de);if(!Le)return;if(Le[1])he.push(Le[2]);else{for(var ze=he.length-1;ze>=0;--ze)if(he[ze]==Le[2]){he.length=ze;break}if(ze<0&&(!se||se==Le[2]))return{tag:Le[2],from:Te(de.line,de.ch),to:Te(Ee,Be)}}}}le.registerHelper("fold","xml",function(de,se){for(var he=new Me(de,se.line,0);;){var ve=vt(he);if(!ve||he.line!=se.line)return;var Ee=Ft(he);if(!Ee)return;if(!ve[1]&&Ee!="selfClose"){var Be=Te(he.line,he.ch),Le=te(he,ve[2]);return Le&&He(Le.from,Be)>0?{from:Be,to:Le.from}:null}}}),le.findMatchingTag=function(de,se,he){var ve=new Me(de,se.line,se.ch,he);if(!(ve.text.indexOf(">")==-1&&ve.text.indexOf("<")==-1)){var Ee=Ft(ve),Be=Ee&&Te(ve.line,ve.ch),Le=Ee&&lt(ve);if(!(!Ee||!Le||He(ve,se)>0)){var ze={from:Te(ve.line,ve.ch),to:Be,tag:Le[2]};return Ee=="selfClose"?{open:ze,close:null,at:"open"}:Le[1]?{open:ee(ve,Le[2]),close:ze,at:"close"}:(ve=new Me(de,Be.line,Be.ch,he),{open:ze,close:te(ve,Le[2]),at:"open"})}}},le.findEnclosingTag=function(de,se,he,ve){for(var Ee=new Me(de,se.line,se.ch,he);;){var Be=ee(Ee,ve);if(!Be)break;var Le=new Me(de,se.line,se.ch,he),ze=te(Le,Be.tag);if(ze)return{open:Be,close:ze}}},le.scanForClosingTag=function(de,se,he,ve){var Ee=new Me(de,se.line,se.ch,ve?{from:0,to:ve}:null);return te(Ee,he)}})},89780:function(On){(function(mn,pe){On.exports=pe()})(this,function(){"use strict";var mn=navigator.userAgent,pe=navigator.platform,le=/gecko\/\d/i.test(mn),Te=/MSIE \d/.test(mn),He=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(mn),ut=/Edge\/(\d+)/.exec(mn),We=Te||He||ut,Ue=We&&(Te?document.documentMode||6:+(ut||He)[1]),Me=!ut&&/WebKit\//.test(mn),Ct=Me&&/Qt\/\d+\.\d+/.test(mn),Pt=!ut&&/Chrome\//.test(mn),$e=/Opera\//.test(mn),Ft=/Apple Computer/.test(navigator.vendor),lt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(mn),vt=/PhantomJS/.test(mn),Oe=!ut&&/AppleWebKit/.test(mn)&&/Mobile\/\w+/.test(mn),te=/Android/.test(mn),ee=Oe||te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(mn),de=Oe||/Mac/.test(pe),se=/\bCrOS\b/.test(mn),he=/win/i.test(pe),ve=$e&&mn.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&($e=!1,Me=!0);var Ee=de&&(Ct||$e&&(ve==null||ve<12.11)),Be=le||We&&Ue>=9;function Le(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var ze=function(ie,ae){var ge=ie.className,fe=Le(ae).exec(ge);if(fe){var ye=ge.slice(fe.index+fe[0].length);ie.className=ge.slice(0,fe.index)+(ye?fe[1]+ye:"")}};function je(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function Xe(ie,ae){return je(ie).appendChild(ae)}function Ye(ie,ae,ge,fe){var ye=document.createElement(ie);if(ge&&(ye.className=ge),fe&&(ye.style.cssText=fe),typeof ae=="string")ye.appendChild(document.createTextNode(ae));else if(ae)for(var Re=0;Re<ae.length;++Re)ye.appendChild(ae[Re]);return ye}function dt(ie,ae,ge,fe){var ye=Ye(ie,ae,ge,fe);return ye.setAttribute("role","presentation"),ye}var Ze;document.createRange?Ze=function(ie,ae,ge,fe){var ye=document.createRange();return ye.setEnd(fe||ie,ge),ye.setStart(ie,ae),ye}:Ze=function(ie,ae,ge){var fe=document.body.createTextRange();try{fe.moveToElementText(ie.parentNode)}catch(ye){return fe}return fe.collapse(!0),fe.moveEnd("character",ge),fe.moveStart("character",ae),fe};function Nt(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 at(){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 kt(ie,ae){var ge=ie.className;Le(ae).test(ge)||(ie.className+=(ge?" ":"")+ae)}function xt(ie,ae){for(var ge=ie.split(" "),fe=0;fe<ge.length;fe++)ge[fe]&&!Le(ge[fe]).test(ae)&&(ae+=" "+ge[fe]);return ae}var Ot=function(ie){ie.select()};Oe?Ot=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:We&&(Ot=function(ie){try{ie.select()}catch(ae){}});function Gt(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function At(ie,ae,ge){ae||(ae={});for(var fe in ie)ie.hasOwnProperty(fe)&&(ge!==!1||!ae.hasOwnProperty(fe))&&(ae[fe]=ie[fe]);return ae}function qe(ie,ae,ge,fe,ye){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Re=fe||0,Je=ye||0;;){var mt=ie.indexOf(" ",Re);if(mt<0||mt>=ae)return Je+(ae-Re);Je+=mt-Re,Je+=ge-Je%ge,Re=mt+1}}var Ve=function(){this.id=null,this.f=null,this.time=0,this.handler=Gt(this.onTimeout,this)};Ve.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ve.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 _t(ie,ae){for(var ge=0;ge<ie.length;++ge)if(ie[ge]==ae)return ge;return-1}var vn=50,yn={toString:function(){return"CodeMirror.Pass"}},jt={scroll:!1},en={origin:"*mouse"},ln={origin:"+move"};function Wn(ie,ae,ge){for(var fe=0,ye=0;;){var Re=ie.indexOf(" ",fe);Re==-1&&(Re=ie.length);var Je=Re-fe;if(Re==ie.length||ye+Je>=ae)return fe+Math.min(Je,ae-ye);if(ye+=Re-fe,ye+=ge-ye%ge,fe=Re+1,ye>=ae)return fe}}var un=[""];function kn(ie){for(;un.length<=ie;)un.push(wt(un)+" ");return un[ie]}function wt(ie){return ie[ie.length-1]}function jn(ie,ae){for(var ge=[],fe=0;fe<ie.length;fe++)ge[fe]=ae(ie[fe],fe);return ge}function ci(ie,ae,ge){for(var fe=0,ye=ge(ae);fe<ie.length&&ge(ie[fe])<=ye;)fe++;ie.splice(fe,0,ae)}function Ge(){}function be(ie,ae){var ge;return Object.create?ge=Object.create(ie):(Ge.prototype=ie,ge=new Ge),ae&&At(ae,ge),ge}var Pe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ne(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Pe.test(ie))}function Ie(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Ne(ie)?!0:ae.test(ie):Ne(ie)}function xe(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var ct=/[\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 Lt(ie){return ie.charCodeAt(0)>=768&&ct.test(ie)}function et(ie,ae,ge){for(;(ge<0?ae>0:ae<ie.length)&&Lt(ie.charAt(ae));)ae+=ge;return ae}function it(ie,ae,ge){for(var fe=ae>ge?-1:1;;){if(ae==ge)return ae;var ye=(ae+ge)/2,Re=fe<0?Math.ceil(ye):Math.floor(ye);if(Re==ae)return ie(Re)?ae:ge;ie(Re)?ge=Re:ae=Re+fe}}function Bt(ie,ae,ge,fe){if(!ie)return fe(ae,ge,"ltr",0);for(var ye=!1,Re=0;Re<ie.length;++Re){var Je=ie[Re];(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",Re),ye=!0)}ye||fe(ae,ge,"ltr")}var Dt=null;function ft(ie,ae,ge){var fe;Dt=null;for(var ye=0;ye<ie.length;++ye){var Re=ie[ye];if(Re.from<ae&&Re.to>ae)return ye;Re.to==ae&&(Re.from!=Re.to&&ge=="before"?fe=ye:Dt=ye),Re.from==ae&&(Re.from!=Re.to&&ge!="before"?fe=ye:Dt=ye)}return fe!=null?fe:Dt}var $t=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ge(zt){return zt<=247?ie.charAt(zt):1424<=zt&&zt<=1524?"R":1536<=zt&&zt<=1785?ae.charAt(zt-1536):1774<=zt&&zt<=2220?"r":8192<=zt&&zt<=8203?"w":zt==8204?"b":"L"}var fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,ye=/[stwN]/,Re=/[LRr]/,Je=/[Lb1n]/,mt=/[1n]/;function gt(zt,Mn,Vt){this.level=zt,this.from=Mn,this.to=Vt}return function(zt,Mn){var Vt=Mn=="ltr"?"L":"R";if(zt.length==0||Mn=="ltr"&&!fe.test(zt))return!1;for(var si=zt.length,ii=[],nr=0;nr<si;++nr)ii.push(ge(zt.charCodeAt(nr)));for(var dr=0,Lr=Vt;dr<si;++dr){var uo=ii[dr];uo=="m"?ii[dr]=Lr:Lr=uo}for(var Ho=0,Mo=Vt;Ho<si;++Ho){var qo=ii[Ho];qo=="1"&&Mo=="r"?ii[Ho]="n":Re.test(qo)&&(Mo=qo,qo=="r"&&(ii[Ho]="R"))}for(var _a=1,Lo=ii[0];_a<si-1;++_a){var is=ii[_a];is=="+"&&Lo=="1"&&ii[_a+1]=="1"?ii[_a]="1":is==","&&Lo==ii[_a+1]&&(Lo=="1"||Lo=="n")&&(ii[_a]=Lo),Lo=is}for(var rl=0;rl<si;++rl){var ru=ii[rl];if(ru==",")ii[rl]="N";else if(ru=="%"){var xl=void 0;for(xl=rl+1;xl<si&&ii[xl]=="%";++xl);for(var Uu=rl&&ii[rl-1]=="!"||xl<si&&ii[xl]=="1"?"1":"N",wu=rl;wu<xl;++wu)ii[wu]=Uu;rl=xl-1}}for(var Xl=0,Yu=Vt;Xl<si;++Xl){var hu=ii[Xl];Yu=="L"&&hu=="1"?ii[Xl]="L":Re.test(hu)&&(Yu=hu)}for(var Jl=0;Jl<si;++Jl)if(ye.test(ii[Jl])){var Ds=void 0;for(Ds=Jl+1;Ds<si&&ye.test(ii[Ds]);++Ds);for(var Sl=(Jl?ii[Jl-1]:Vt)=="L",uu=(Ds<si?ii[Ds]:Vt)=="L",fu=Sl==uu?Sl?"L":"R":Vt,jc=Jl;jc<Ds;++jc)ii[jc]=fu;Jl=Ds-1}for(var Pl=[],Pc,Se=0;Se<si;)if(Je.test(ii[Se])){var Ce=Se;for(++Se;Se<si&&Je.test(ii[Se]);++Se);Pl.push(new gt(0,Ce,Se))}else{var ke=Se,Ke=Pl.length,St=Mn=="rtl"?1:0;for(++Se;Se<si&&ii[Se]!="L";++Se);for(var yt=ke;yt<Se;)if(mt.test(ii[yt])){ke<yt&&(Pl.splice(Ke,0,new gt(1,ke,yt)),Ke+=St);var Tt=yt;for(++yt;yt<Se&&mt.test(ii[yt]);++yt);Pl.splice(Ke,0,new gt(2,Tt,yt)),Ke+=St,ke=yt}else++yt;ke<Se&&Pl.splice(Ke,0,new gt(1,ke,Se))}return Mn=="ltr"&&(Pl[0].level==1&&(Pc=zt.match(/^\s+/))&&(Pl[0].from=Pc[0].length,Pl.unshift(new gt(0,0,Pc[0].length))),wt(Pl).level==1&&(Pc=zt.match(/\s+$/))&&(wt(Pl).to-=Pc[0].length,Pl.push(new gt(0,si-Pc[0].length,si)))),Mn=="rtl"?Pl.reverse():Pl}}();function xn(ie,ae){var ge=ie.order;return ge==null&&(ge=ie.order=$t(ie.text,ae)),ge}var an=[],Jt=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]||an).concat(ge)}};function Tn(ie,ae){return ie._handlers&&ie._handlers[ae]||an}function Kn(ie,ae,ge){if(ie.removeEventListener)ie.removeEventListener(ae,ge,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,ge);else{var fe=ie._handlers,ye=fe&&fe[ae];if(ye){var Re=_t(ye,ge);Re>-1&&(fe[ae]=ye.slice(0,Re).concat(ye.slice(Re+1)))}}}function dn(ie,ae){var ge=Tn(ie,ae);if(ge.length)for(var fe=Array.prototype.slice.call(arguments,2),ye=0;ye<ge.length;++ye)ge[ye].apply(null,fe)}function Qn(ie,ae,ge){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),dn(ie,ge||ae.type,ie,ae),Hi(ae)||ae.codemirrorIgnore}function pi(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)_t(ge,ae[fe])==-1&&ge.push(ae[fe])}function zn(ie,ae){return Tn(ie,ae).length>0}function Nn(ie){ie.prototype.on=function(ae,ge){Jt(this,ae,ge)},ie.prototype.off=function(ae,ge){Kn(this,ae,ge)}}function yi(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function Zi(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function Hi(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function cr(ie){yi(ie),Zi(ie)}function br(ie){return ie.target||ie.srcElement}function gi(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),de&&ie.ctrlKey&&ae==1&&(ae=3),ae}var di=function(){if(We&&Ue<9)return!1;var ie=Ye("div");return"draggable"in ie||"dragDrop"in ie}(),wi;function Qi(ie){if(wi==null){var ae=Ye("span","\u200B");Xe(ie,Ye("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(wi=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(We&&Ue<8))}var ge=wi?Ye("span","\u200B"):Ye("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ge.setAttribute("cm-text",""),ge}var Li;function ro(ie){if(Li!=null)return Li;var ae=Xe(ie,document.createTextNode("A\u062EA")),ge=Ze(ae,0,1).getBoundingClientRect(),fe=Ze(ae,1,2).getBoundingClientRect();return je(ie),!ge||ge.left==ge.right?!1:Li=fe.right-ge.right<3}var fr=`
b`.split(/\n/).length!=3?function(ie){for(var ae=0,ge=[],fe=ie.length;ae<=fe;){var ye=ie.indexOf(`
`,ae);ye==-1&&(ye=ie.length);var Re=ie.slice(ae,ie.charAt(ye-1)=="\r"?ye-1:ye),Je=Re.indexOf("\r");Je!=-1?(ge.push(Re.slice(0,Je)),ae+=Je+1):(ge.push(Re),ae=ye+1)}return ge}:function(ie){return ie.split(/\r\n?|\n/)},Ae=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ae){return!1}}:function(ie){var ae;try{ae=ie.ownerDocument.selection.createRange()}catch(ge){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},Ei=function(){var ie=Ye("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),Sr=null;function Fn(ie){if(Sr!=null)return Sr;var ae=Xe(ie,Ye("span","x")),ge=ae.getBoundingClientRect(),fe=Ze(ae,0,1).getBoundingClientRect();return Sr=Math.abs(ge.left-fe.left)>1}var xi={},zi={};function qi(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),xi[ie]=ae}function Gn(ie,ae){zi[ie]=ae}function ti(ie){if(typeof ie=="string"&&zi.hasOwnProperty(ie))ie=zi[ie];else if(ie&&typeof ie.name=="string"&&zi.hasOwnProperty(ie.name)){var ae=zi[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=be(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return ti("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return ti("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Zt(ie,ae){ae=ti(ae);var ge=xi[ae.name];if(!ge)return Zt(ie,"text/plain");var fe=ge(ie,ae);if(Wt.hasOwnProperty(ae.name)){var ye=Wt[ae.name];for(var Re in ye)ye.hasOwnProperty(Re)&&(fe.hasOwnProperty(Re)&&(fe["_"+Re]=fe[Re]),fe[Re]=ye[Re])}if(fe.name=ae.name,ae.helperType&&(fe.helperType=ae.helperType),ae.modeProps)for(var Je in ae.modeProps)fe[Je]=ae.modeProps[Je];return fe}var Wt={};function Qe(ie,ae){var ge=Wt.hasOwnProperty(ie)?Wt[ie]:Wt[ie]={};At(ae,ge)}function on(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var ge={};for(var fe in ae){var ye=ae[fe];ye instanceof Array&&(ye=ye.concat([])),ge[fe]=ye}return ge}function cn(ie,ae){for(var ge;ie.innerMode&&(ge=ie.innerMode(ae),!(!ge||ge.mode==ie));)ae=ge.state,ie=ge.mode;return ge||{mode:ie,state:ae}}function Mt(ie,ae,ge){return ie.startState?ie.startState(ae,ge):!0}var ht=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};ht.prototype.eol=function(){return this.pos>=this.string.length},ht.prototype.sol=function(){return this.pos==this.lineStart},ht.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ht.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ht.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},ht.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},ht.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},ht.prototype.skipToEnd=function(){this.pos=this.string.length},ht.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},ht.prototype.backUp=function(ie){this.pos-=ie},ht.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},ht.prototype.indentation=function(){return qe(this.string,null,this.tabSize)-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},ht.prototype.match=function(ie,ae,ge){if(typeof ie=="string"){var fe=function(Je){return ge?Je.toLowerCase():Je},ye=this.string.substr(this.pos,ie.length);if(fe(ye)==fe(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Re=this.string.slice(this.pos).match(ie);return Re&&Re.index>0?null:(Re&&ae!==!1&&(this.pos+=Re[0].length),Re)}},ht.prototype.current=function(){return this.string.slice(this.start,this.pos)},ht.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},ht.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},ht.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 ye=ge.children[fe],Re=ye.chunkSize();if(ae<Re){ge=ye;break}ae-=Re}return ge.lines[ae]}function gn(ie,ae,ge){var fe=[],ye=ae.line;return ie.iter(ae.line,ge.line+1,function(Re){var Je=Re.text;ye==ge.line&&(Je=Je.slice(0,ge.ch)),ye==ae.line&&(Je=Je.slice(ae.ch)),fe.push(Je),++ye}),fe}function _n(ie,ae,ge){var fe=[];return ie.iter(ae,ge,function(ye){fe.push(ye.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 Et(ie){if(ie.parent==null)return null;for(var ae=ie.parent,ge=_t(ae.lines,ie),fe=ae.parent;fe;ae=fe,fe=fe.parent)for(var ye=0;fe.children[ye]!=ae;++ye)ge+=fe.children[ye].chunkSize();return ge+ae.first}function Pn(ie,ae){var ge=ie.first;e:do{for(var fe=0;fe<ie.children.length;++fe){var ye=ie.children[fe],Re=ye.height;if(ae<Re){ie=ye;continue e}ae-=Re,ge+=ye.chunkSize()}return ge}while(!ie.lines);for(var Je=0;Je<ie.lines.length;++Je){var mt=ie.lines[Je],gt=mt.height;if(ae<gt)break;ae-=gt}return ge+Je}function Xn(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function Ci(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function tn(ie,ae,ge){if(ge===void 0&&(ge=null),!(this instanceof tn))return new tn(ie,ae,ge);this.line=ie,this.ch=ae,this.sticky=ge}function sn(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function In(ie,ae){return ie.sticky==ae.sticky&&sn(ie,ae)==0}function ji(ie){return tn(ie.line,ie.ch)}function Ai(ie,ae){return sn(ie,ae)<0?ae:ie}function Si(ie,ae){return sn(ie,ae)<0?ie:ae}function ki(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function Ni(ie,ae){if(ae.line<ie.first)return tn(ie.first,0);var ge=ie.first+ie.size-1;return ae.line>ge?tn(ge,nn(ie,ge).text.length):ir(ae,nn(ie,ae.line).text.length)}function ir(ie,ae){var ge=ie.ch;return ge==null||ge>ae?tn(ie.line,ae):ge<0?tn(ie.line,0):ie}function zr(ie,ae){for(var ge=[],fe=0;fe<ae.length;fe++)ge[fe]=Ni(ie,ae[fe]);return ge}var Vr=function(ie,ae){this.state=ie,this.lookAhead=ae},Zn=function(ie,ae,ge,fe){this.state=ae,this.doc=ie,this.line=ge,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};Zn.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},Zn.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}},Zn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Zn.fromSaved=function(ie,ae,ge){return ae instanceof Vr?new Zn(ie,on(ie.mode,ae.state),ge,ae.lookAhead):new Zn(ie,on(ie.mode,ae),ge)},Zn.prototype.save=function(ie){var ae=ie!==!1?on(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Vr(ae,this.maxLookAhead):ae};function io(ie,ae,ge,fe){var ye=[ie.state.modeGen],Re={};qr(ie,ae.text,ie.doc.mode,ge,function(zt,Mn){return ye.push(zt,Mn)},Re,fe);for(var Je=ge.state,mt=function(zt){ge.baseTokens=ye;var Mn=ie.state.overlays[zt],Vt=1,si=0;ge.state=!0,qr(ie,ae.text,Mn.mode,ge,function(ii,nr){for(var dr=Vt;si<ii;){var Lr=ye[Vt];Lr>ii&&ye.splice(Vt,1,ii,ye[Vt+1],Lr),Vt+=2,si=Math.min(ii,Lr)}if(nr)if(Mn.opaque)ye.splice(dr,Vt-dr,ii,"overlay "+nr),Vt=dr+2;else for(;dr<Vt;dr+=2){var uo=ye[dr+1];ye[dr+1]=(uo?uo+" ":"")+"overlay "+nr}},Re),ge.state=Je,ge.baseTokens=null,ge.baseTokenPos=1},gt=0;gt<ie.state.overlays.length;++gt)mt(gt);return{styles:ye,classes:Re.bgClass||Re.textClass?Re:null}}function Yr(ie,ae,ge){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var fe=Fr(ie,Et(ae)),ye=ae.text.length>ie.options.maxHighlightLength&&on(ie.doc.mode,fe.state),Re=io(ie,ae,fe);ye&&(fe.state=ye),ae.stateAfter=fe.save(!ye),ae.styles=Re.styles,Re.classes?ae.styleClasses=Re.classes:ae.styleClasses&&(ae.styleClasses=null),ge===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function Fr(ie,ae,ge){var fe=ie.doc,ye=ie.display;if(!fe.mode.startState)return new Zn(fe,!0,ae);var Re=Zr(ie,ae,ge),Je=Re>fe.first&&nn(fe,Re-1).stateAfter,mt=Je?Zn.fromSaved(fe,Je,Re):new Zn(fe,Mt(fe.mode),Re);return fe.iter(Re,ae,function(gt){wn(ie,gt.text,mt);var zt=mt.line;gt.stateAfter=zt==ae-1||zt%5==0||zt>=ye.viewFrom&&zt<ye.viewTo?mt.save():null,mt.nextLine()}),ge&&(fe.modeFrontier=mt.line),mt}function wn(ie,ae,ge,fe){var ye=ie.doc.mode,Re=new ht(ae,ie.options.tabSize,ge);for(Re.start=Re.pos=fe||0,ae==""&&ri(ye,ge.state);!Re.eol();)Ui(ye,Re,ge.state),Re.start=Re.pos}function ri(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var ge=cn(ie,ae);if(ge.mode.blankLine)return ge.mode.blankLine(ge.state)}}function Ui(ie,ae,ge,fe){for(var ye=0;ye<10;ye++){fe&&(fe[0]=cn(ie,ge).mode);var Re=ie.token(ae,ge);if(ae.pos>ae.start)return Re}throw new Error("Mode "+ie.name+" failed to advance stream.")}var Pr=function(ie,ae,ge){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=ge};function er(ie,ae,ge,fe){var ye=ie.doc,Re=ye.mode,Je;ae=Ni(ye,ae);var mt=nn(ye,ae.line),gt=Fr(ie,ae.line,ge),zt=new ht(mt.text,ie.options.tabSize,gt),Mn;for(fe&&(Mn=[]);(fe||zt.pos<ae.ch)&&!zt.eol();)zt.start=zt.pos,Je=Ui(Re,zt,gt.state),fe&&Mn.push(new Pr(zt,Je,on(ye.mode,gt.state)));return fe?Mn:new Pr(zt,Je,gt.state)}function Cr(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 qr(ie,ae,ge,fe,ye,Re,Je){var mt=ge.flattenSpans;mt==null&&(mt=ie.options.flattenSpans);var gt=0,zt=null,Mn=new ht(ae,ie.options.tabSize,fe),Vt,si=ie.options.addModeClass&&[null];for(ae==""&&Cr(ri(ge,fe.state),Re);!Mn.eol();){if(Mn.pos>ie.options.maxHighlightLength?(mt=!1,Je&&wn(ie,ae,fe,Mn.pos),Mn.pos=ae.length,Vt=null):Vt=Cr(Ui(ge,Mn,fe.state,si),Re),si){var ii=si[0].name;ii&&(Vt="m-"+(Vt?ii+" "+Vt:ii))}if(!mt||zt!=Vt){for(;gt<Mn.start;)gt=Math.min(Mn.start,gt+5e3),ye(gt,zt);zt=Vt}Mn.start=Mn.pos}for(;gt<Mn.pos;){var nr=Math.min(Mn.pos,gt+5e3);ye(nr,zt),gt=nr}}function Zr(ie,ae,ge){for(var fe,ye,Re=ie.doc,Je=ge?-1:ae-(ie.doc.mode.innerMode?1e3:100),mt=ae;mt>Je;--mt){if(mt<=Re.first)return Re.first;var gt=nn(Re,mt-1),zt=gt.stateAfter;if(zt&&(!ge||mt+(zt instanceof Vr?zt.lookAhead:0)<=Re.modeFrontier))return mt;var Mn=qe(gt.text,null,ie.options.tabSize);(ye==null||fe>Mn)&&(ye=mt-1,fe=Mn)}return ye}function Ir(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var ge=ie.first,fe=ae-1;fe>ge;fe--){var ye=nn(ie,fe).stateAfter;if(ye&&(!(ye instanceof Vr)||fe+ye.lookAhead<ae)){ge=fe+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,ge)}}var Ur=!1,Vn=!1;function Xo(){Ur=!0}function Un(){Vn=!0}function Io(ie,ae,ge){this.marker=ie,this.from=ae,this.to=ge}function Go(ie,ae){if(ie)for(var ge=0;ge<ie.length;++ge){var fe=ie[ge];if(fe.marker==ae)return fe}}function tr(ie,ae){for(var ge,fe=0;fe<ie.length;++fe)ie[fe]!=ae&&(ge||(ge=[])).push(ie[fe]);return ge}function ia(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function zo(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Je=Re.marker,mt=Re.from==null||(Je.inclusiveLeft?Re.from<=ae:Re.from<ae);if(mt||Re.from==ae&&Je.type=="bookmark"&&(!ge||!Re.marker.insertLeft)){var gt=Re.to==null||(Je.inclusiveRight?Re.to>=ae:Re.to>ae);(fe||(fe=[])).push(new Io(Je,Re.from,gt?null:Re.to))}}return fe}function Nr(ie,ae,ge){var fe;if(ie)for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Je=Re.marker,mt=Re.to==null||(Je.inclusiveRight?Re.to>=ae:Re.to>ae);if(mt||Re.from==ae&&Je.type=="bookmark"&&(!ge||Re.marker.insertLeft)){var gt=Re.from==null||(Je.inclusiveLeft?Re.from<=ae:Re.from<ae);(fe||(fe=[])).push(new Io(Je,gt?null:Re.from-ae,Re.to==null?null:Re.to-ae))}}return fe}function Br(ie,ae){if(ae.full)return null;var ge=Xn(ie,ae.from.line)&&nn(ie,ae.from.line).markedSpans,fe=Xn(ie,ae.to.line)&&nn(ie,ae.to.line).markedSpans;if(!ge&&!fe)return null;var ye=ae.from.ch,Re=ae.to.ch,Je=sn(ae.from,ae.to)==0,mt=zo(ge,ye,Je),gt=Nr(fe,Re,Je),zt=ae.text.length==1,Mn=wt(ae.text).length+(zt?ye:0);if(mt)for(var Vt=0;Vt<mt.length;++Vt){var si=mt[Vt];if(si.to==null){var ii=Go(gt,si.marker);ii?zt&&(si.to=ii.to==null?null:ii.to+Mn):si.to=ye}}if(gt)for(var nr=0;nr<gt.length;++nr){var dr=gt[nr];if(dr.to!=null&&(dr.to+=Mn),dr.from==null){var Lr=Go(mt,dr.marker);Lr||(dr.from=Mn,zt&&(mt||(mt=[])).push(dr))}else dr.from+=Mn,zt&&(mt||(mt=[])).push(dr)}mt&&(mt=xo(mt)),gt&&gt!=mt&&(gt=xo(gt));var uo=[mt];if(!zt){var Ho=ae.text.length-2,Mo;if(Ho>0&&mt)for(var qo=0;qo<mt.length;++qo)mt[qo].to==null&&(Mo||(Mo=[])).push(new Io(mt[qo].marker,null,null));for(var _a=0;_a<Ho;++_a)uo.push(Mo);uo.push(gt)}return uo}function xo(ie){for(var ae=0;ae<ie.length;++ae){var ge=ie[ae];ge.from!=null&&ge.from==ge.to&&ge.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function $o(ie,ae,ge){var fe=null;if(ie.iter(ae.line,ge.line+1,function(ii){if(ii.markedSpans)for(var nr=0;nr<ii.markedSpans.length;++nr){var dr=ii.markedSpans[nr].marker;dr.readOnly&&(!fe||_t(fe,dr)==-1)&&(fe||(fe=[])).push(dr)}}),!fe)return null;for(var ye=[{from:ae,to:ge}],Re=0;Re<fe.length;++Re)for(var Je=fe[Re],mt=Je.find(0),gt=0;gt<ye.length;++gt){var zt=ye[gt];if(!(sn(zt.to,mt.from)<0||sn(zt.from,mt.to)>0)){var Mn=[gt,1],Vt=sn(zt.from,mt.from),si=sn(zt.to,mt.to);(Vt<0||!Je.inclusiveLeft&&!Vt)&&Mn.push({from:zt.from,to:mt.from}),(si>0||!Je.inclusiveRight&&!si)&&Mn.push({from:mt.to,to:zt.to}),ye.splice.apply(ye,Mn),gt+=Mn.length-3}}return ye}function $i(ie){var ae=ie.markedSpans;if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.detachLine(ie);ie.markedSpans=null}}function st(ie,ae){if(ae){for(var ge=0;ge<ae.length;++ge)ae[ge].marker.attachLine(ie);ie.markedSpans=ae}}function ra(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(),ye=ae.find(),Re=sn(fe.from,ye.from)||ra(ie)-ra(ae);if(Re)return-Re;var Je=sn(fe.to,ye.to)||va(ie)-va(ae);return Je||ae.id-ie.id}function Ps(ie,ae){var ge=Vn&&ie.markedSpans,fe;if(ge)for(var ye=void 0,Re=0;Re<ge.length;++Re)ye=ge[Re],ye.marker.collapsed&&(ae?ye.from:ye.to)==null&&(!fe||Ma(fe,ye.marker)<0)&&(fe=ye.marker);return fe}function Ha(ie){return Ps(ie,!0)}function Ms(ie){return Ps(ie,!1)}function bo(ie,ae){var ge=Vn&&ie.markedSpans,fe;if(ge)for(var ye=0;ye<ge.length;++ye){var Re=ge[ye];Re.marker.collapsed&&(Re.from==null||Re.from<ae)&&(Re.to==null||Re.to>ae)&&(!fe||Ma(fe,Re.marker)<0)&&(fe=Re.marker)}return fe}function wo(ie,ae,ge,fe,ye){var Re=nn(ie,ae),Je=Vn&&Re.markedSpans;if(Je)for(var mt=0;mt<Je.length;++mt){var gt=Je[mt];if(gt.marker.collapsed){var zt=gt.marker.find(0),Mn=sn(zt.from,ge)||ra(gt.marker)-ra(ye),Vt=sn(zt.to,fe)||va(gt.marker)-va(ye);if(!(Mn>=0&&Vt<=0||Mn<=0&&Vt>=0)&&(Mn<=0&&(gt.marker.inclusiveRight&&ye.inclusiveLeft?sn(zt.to,ge)>=0:sn(zt.to,ge)>0)||Mn>=0&&(gt.marker.inclusiveRight&&ye.inclusiveLeft?sn(zt.from,fe)<=0:sn(zt.from,fe)<0)))return!0}}}function Jr(ie){for(var ae;ae=Ha(ie);)ie=ae.find(-1,!0).line;return ie}function ha(ie){for(var ae;ae=Ms(ie);)ie=ae.find(1,!0).line;return ie}function Ia(ie){for(var ae,ge;ae=Ms(ie);)ie=ae.find(1,!0).line,(ge||(ge=[])).push(ie);return ge}function Eo(ie,ae){var ge=nn(ie,ae),fe=Jr(ge);return ge==fe?ae:Et(fe)}function Gr(ie,ae){if(ae>ie.lastLine())return ae;var ge=nn(ie,ae),fe;if(!mi(ie,ge))return ae;for(;fe=Ms(ge);)ge=fe.find(1,!0).line;return Et(ge)+1}function mi(ie,ae){var ge=Vn&&ae.markedSpans;if(ge){for(var fe=void 0,ye=0;ye<ge.length;++ye)if(fe=ge[ye],!!fe.marker.collapsed){if(fe.from==null)return!0;if(!fe.marker.widgetNode&&fe.from==0&&fe.marker.inclusiveLeft&&oo(ie,ae,fe))return!0}}}function oo(ie,ae,ge){if(ge.to==null){var fe=ge.marker.find(1,!0);return oo(ie,fe.line,Go(fe.line.markedSpans,ge.marker))}if(ge.marker.inclusiveRight&&ge.to==ae.text.length)return!0;for(var ye=void 0,Re=0;Re<ae.markedSpans.length;++Re)if(ye=ae.markedSpans[Re],ye.marker.collapsed&&!ye.marker.widgetNode&&ye.from==ge.to&&(ye.to==null||ye.to!=ge.from)&&(ye.marker.inclusiveLeft||ge.marker.inclusiveRight)&&oo(ie,ae,ye))return!0}function ao(ie){ie=Jr(ie);for(var ae=0,ge=ie.parent,fe=0;fe<ge.lines.length;++fe){var ye=ge.lines[fe];if(ye==ie)break;ae+=ye.height}for(var Re=ge.parent;Re;ge=Re,Re=ge.parent)for(var Je=0;Je<Re.children.length;++Je){var mt=Re.children[Je];if(mt==ge)break;ae+=mt.height}return ae}function Ga(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,ge,fe=ie;ge=Ha(fe);){var ye=ge.find(0,!0);fe=ye.from.line,ae+=ye.from.ch-ye.to.ch}for(fe=ie;ge=Ms(fe);){var Re=ge.find(0,!0);ae-=fe.text.length-Re.from.ch,fe=Re.to.line,ae+=fe.text.length-Re.to.ch}return ae}function Ca(ie){var ae=ie.display,ge=ie.doc;ae.maxLine=nn(ge,ge.first),ae.maxLineLength=Ga(ae.maxLine),ae.maxLineChanged=!0,ge.iter(function(fe){var ye=Ga(fe);ye>ae.maxLineLength&&(ae.maxLineLength=ye,ae.maxLine=fe)})}var fa=function(ie,ae,ge){this.text=ie,st(this,ae),this.height=ge?ge(this):1};fa.prototype.lineNo=function(){return Et(this)},Nn(fa);function Ka(ie,ae,ge,fe){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),$i(ie),st(ie,ge);var ye=fe?fe(ie):1;ye!=ie.height&&qn(ie,ye)}function Qa(ie){ie.parent=null,$i(ie)}var Cs={},ms={};function Zs(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var ge=ae.addModeClass?ms:Cs;return ge[ie]||(ge[ie]=ie.replace(/\S+/g,"cm-$&"))}function Bn(ie,ae){var ge=dt("span",null,null,Me?"padding-right: .1px":null),fe={pre:dt("pre",[ge],"CodeMirror-line"),content:ge,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var ye=0;ye<=(ae.rest?ae.rest.length:0);ye++){var Re=ye?ae.rest[ye-1]:ae.line,Je=void 0;fe.pos=0,fe.addToken=oa,ro(ie.display.measure)&&(Je=xn(Re,ie.doc.direction))&&(fe.addToken=Ol(fe.addToken,Je)),fe.map=[];var mt=ae!=ie.display.externalMeasured&&Et(Re);yu(Re,fe,Yr(ie,Re,mt)),Re.styleClasses&&(Re.styleClasses.bgClass&&(fe.bgClass=xt(Re.styleClasses.bgClass,fe.bgClass||"")),Re.styleClasses.textClass&&(fe.textClass=xt(Re.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild(Qi(ie.display.measure))),ye==0?(ae.measure.map=fe.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(fe.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(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 dn(ie,"renderLine",ie,ae.line,fe.pre),fe.pre.className&&(fe.textClass=xt(fe.pre.className,fe.textClass||"")),fe}function ys(ie){var ae=Ye("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function oa(ie,ae,ge,fe,ye,Re,Je){if(ae){var mt=ie.splitSpaces?hl(ae,ie.trailingSpace):ae,gt=ie.cm.state.specialChars,zt=!1,Mn;if(!gt.test(ae))ie.col+=ae.length,Mn=document.createTextNode(mt),ie.map.push(ie.pos,ie.pos+ae.length,Mn),We&&Ue<9&&(zt=!0),ie.pos+=ae.length;else{Mn=document.createDocumentFragment();for(var Vt=0;;){gt.lastIndex=Vt;var si=gt.exec(ae),ii=si?si.index-Vt:ae.length-Vt;if(ii){var nr=document.createTextNode(mt.slice(Vt,Vt+ii));We&&Ue<9?Mn.appendChild(Ye("span",[nr])):Mn.appendChild(nr),ie.map.push(ie.pos,ie.pos+ii,nr),ie.col+=ii,ie.pos+=ii}if(!si)break;Vt+=ii+1;var dr=void 0;if(si[0]==" "){var Lr=ie.cm.options.tabSize,uo=Lr-ie.col%Lr;dr=Mn.appendChild(Ye("span",kn(uo),"cm-tab")),dr.setAttribute("role","presentation"),dr.setAttribute("cm-text"," "),ie.col+=uo}else si[0]=="\r"||si[0]==`
`?(dr=Mn.appendChild(Ye("span",si[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),dr.setAttribute("cm-text",si[0]),ie.col+=1):(dr=ie.cm.options.specialCharPlaceholder(si[0]),dr.setAttribute("cm-text",si[0]),We&&Ue<9?Mn.appendChild(Ye("span",[dr])):Mn.appendChild(dr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,dr),ie.pos++}}if(ie.trailingSpace=mt.charCodeAt(ae.length-1)==32,ge||fe||ye||zt||Re||Je){var Ho=ge||"";fe&&(Ho+=fe),ye&&(Ho+=ye);var Mo=Ye("span",[Mn],Ho,Re);if(Je)for(var qo in Je)Je.hasOwnProperty(qo)&&qo!="style"&&qo!="class"&&Mo.setAttribute(qo,Je[qo]);return ie.content.appendChild(Mo)}ie.content.appendChild(Mn)}}function hl(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var ge=ae,fe="",ye=0;ye<ie.length;ye++){var Re=ie.charAt(ye);Re==" "&&ge&&(ye==ie.length-1||ie.charCodeAt(ye+1)==32)&&(Re="\xA0"),fe+=Re,ge=Re==" "}return fe}function Ol(ie,ae){return function(ge,fe,ye,Re,Je,mt,gt){ye=ye?ye+" cm-force-border":"cm-force-border";for(var zt=ge.pos,Mn=zt+fe.length;;){for(var Vt=void 0,si=0;si<ae.length&&(Vt=ae[si],!(Vt.to>zt&&Vt.from<=zt));si++);if(Vt.to>=Mn)return ie(ge,fe,ye,Re,Je,mt,gt);ie(ge,fe.slice(0,Vt.to-zt),ye,Re,null,mt,gt),Re=null,fe=fe.slice(Vt.to-zt),zt=Vt.to}}}function as(ie,ae,ge,fe){var ye=!fe&&ge.widgetNode;ye&&ie.map.push(ie.pos,ie.pos+ae,ye),!fe&&ie.cm.display.input.needsContentAttribute&&(ye||(ye=ie.content.appendChild(document.createElement("span"))),ye.setAttribute("cm-marker",ge.id)),ye&&(ie.cm.display.input.setUneditable(ye),ie.content.appendChild(ye)),ie.pos+=ae,ie.trailingSpace=!1}function yu(ie,ae,ge){var fe=ie.markedSpans,ye=ie.text,Re=0;if(!fe){for(var Je=1;Je<ge.length;Je+=2)ae.addToken(ae,ye.slice(Re,Re=ge[Je]),Zs(ge[Je+1],ae.cm.options));return}for(var mt=ye.length,gt=0,zt=1,Mn="",Vt,si,ii=0,nr,dr,Lr,uo,Ho;;){if(ii==gt){nr=dr=Lr=si="",Ho=null,uo=null,ii=1/0;for(var Mo=[],qo=void 0,_a=0;_a<fe.length;++_a){var Lo=fe[_a],is=Lo.marker;if(is.type=="bookmark"&&Lo.from==gt&&is.widgetNode)Mo.push(is);else if(Lo.from<=gt&&(Lo.to==null||Lo.to>gt||is.collapsed&&Lo.to==gt&&Lo.from==gt)){if(Lo.to!=null&&Lo.to!=gt&&ii>Lo.to&&(ii=Lo.to,dr=""),is.className&&(nr+=" "+is.className),is.css&&(si=(si?si+";":"")+is.css),is.startStyle&&Lo.from==gt&&(Lr+=" "+is.startStyle),is.endStyle&&Lo.to==ii&&(qo||(qo=[])).push(is.endStyle,Lo.to),is.title&&((Ho||(Ho={})).title=is.title),is.attributes)for(var rl in is.attributes)(Ho||(Ho={}))[rl]=is.attributes[rl];is.collapsed&&(!uo||Ma(uo.marker,is)<0)&&(uo=Lo)}else Lo.from>gt&&ii>Lo.from&&(ii=Lo.from)}if(qo)for(var ru=0;ru<qo.length;ru+=2)qo[ru+1]==ii&&(dr+=" "+qo[ru]);if(!uo||uo.from==gt)for(var xl=0;xl<Mo.length;++xl)as(ae,0,Mo[xl]);if(uo&&(uo.from||0)==gt){if(as(ae,(uo.to==null?mt+1:uo.to)-gt,uo.marker,uo.from==null),uo.to==null)return;uo.to==gt&&(uo=!1)}}if(gt>=mt)break;for(var Uu=Math.min(mt,ii);;){if(Mn){var wu=gt+Mn.length;if(!uo){var Xl=wu>Uu?Mn.slice(0,Uu-gt):Mn;ae.addToken(ae,Xl,Vt?Vt+nr:nr,Lr,gt+Xl.length==ii?dr:"",si,Ho)}if(wu>=Uu){Mn=Mn.slice(Uu-gt),gt=Uu;break}gt=wu,Lr=""}Mn=ye.slice(Re,Re=ge[zt++]),Vt=Zs(ge[zt++],ae.cm.options)}}}function eu(ie,ae,ge){this.line=ae,this.rest=Ia(ae),this.size=this.rest?Et(wt(this.rest))-ge+1:1,this.node=this.text=null,this.hidden=mi(ie,ae)}function fs(ie,ae,ge){for(var fe=[],ye,Re=ae;Re<ge;Re=ye){var Je=new eu(ie.doc,nn(ie.doc,Re),Re);ye=Re+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 Ao(ie){var ae=ie.delayedCallbacks,ge=0;do{for(;ge<ae.length;ge++)ae[ge].call(null);for(var fe=0;fe<ie.ops.length;fe++){var ye=ie.ops[fe];if(ye.cursorActivityHandlers)for(;ye.cursorActivityCalled<ye.cursorActivityHandlers.length;)ye.cursorActivityHandlers[ye.cursorActivityCalled++].call(null,ye.cm)}}while(ge<ae.length)}function Ea(ie,ae){var ge=ie.ownsGroup;if(ge)try{Ao(ge)}finally{Ba=null,ae(ge)}}var ua=null;function hr(ie,ae){var ge=Tn(ie,ae);if(ge.length){var fe=Array.prototype.slice.call(arguments,2),ye;Ba?ye=Ba.delayedCallbacks:ua?ye=ua:(ye=ua=[],setTimeout(Rs,0));for(var Re=function(mt){ye.push(function(){return ge[mt].apply(null,fe)})},Je=0;Je<ge.length;++Je)Re(Je)}}function Rs(){var ie=ua;ua=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function ss(ie,ae,ge,fe){for(var ye=0;ye<ae.changes.length;ye++){var Re=ae.changes[ye];Re=="text"?Xi(ie,ae):Re=="gutter"?Us(ie,ae,ge,fe):Re=="class"?ws(ie,ae):Re=="widget"&&$l(ie,ae,fe)}ae.changes=null}function sl(ie){return ie.node==ie.text&&(ie.node=Ye("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),We&&Ue<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(Ye("div",null,ge),fe.firstChild),ie.display.input.setUneditable(ae.background)}}function ou(ie,ae){var ge=ie.display.externalMeasured;return ge&&ge.line==ae.line?(ie.display.externalMeasured=null,ae.measure=ge.measure,ge.built):Bn(ie,ae)}function Xi(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,ws(ie,ae)):ge&&(ae.text.className=ge)}function ws(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 ye=sl(ae);ae.gutterBackground=Ye("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px; width: "+fe.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),ye.insertBefore(ae.gutterBackground,ae.text)}var Re=ae.line.gutterMarkers;if(ie.options.lineNumbers||Re){var Je=sl(ae),mt=ae.gutter=Ye("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(mt),Je.insertBefore(mt,ae.text),ae.line.gutterClass&&(mt.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Re||!Re["CodeMirror-linenumbers"])&&(ae.lineNumber=mt.appendChild(Ye("div",Ci(ie.options,ge),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Re)for(var gt=0;gt<ie.display.gutterSpecs.length;++gt){var zt=ie.display.gutterSpecs[gt].className,Mn=Re.hasOwnProperty(zt)&&Re[zt];Mn&&mt.appendChild(Ye("div",[Mn],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[zt]+"px; width: "+fe.gutterWidth[zt]+"px"))}}}function $l(ie,ae,ge){ae.alignable&&(ae.alignable=null);for(var fe=Le("CodeMirror-linewidget"),ye=ae.node.firstChild,Re=void 0;ye;ye=Re)Re=ye.nextSibling,fe.test(ye.className)&&ae.node.removeChild(ye);Kl(ie,ae,ge)}function kl(ie,ae,ge,fe){var ye=ou(ie,ae);return ae.text=ae.node=ye.pre,ye.bgClass&&(ae.bgClass=ye.bgClass),ye.textClass&&(ae.textClass=ye.textClass),ws(ie,ae),Us(ie,ae,ge,fe),Kl(ie,ae,fe),ae.node}function Kl(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,ye){if(ae.widgets)for(var Re=sl(ge),Je=0,mt=ae.widgets;Je<mt.length;++Je){var gt=mt[Je],zt=Ye("div",[gt.node],"CodeMirror-linewidget"+(gt.className?" "+gt.className:""));gt.handleMouseEvents||zt.setAttribute("cm-ignore-events","true"),ic(gt,zt,ge,fe),ie.display.input.setUneditable(zt),ye&&gt.above?Re.insertBefore(zt,ge.gutter||ge.text):Re.appendChild(zt),hr(gt,"redraw")}}function ic(ie,ae,ge,fe){if(ie.noHScroll){(ge.alignable||(ge.alignable=[])).push(ae);var ye=fe.wrapperWidth;ae.style.left=fe.fixedPos+"px",ie.coverGutter||(ye-=fe.gutterTotalWidth,ae.style.paddingLeft=fe.gutterTotalWidth+"px"),ae.style.width=ye+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-fe.gutterTotalWidth+"px"))}function zl(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Nt(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;"),Xe(ae.display.measure,Ye("div",[ie.node],null,ge))}return ie.height=ie.node.parentNode.offsetHeight}function Cn(ie,ae){for(var ge=br(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 Ln(ie){return ie.lineSpace.offsetTop}function ai(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function Ji(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=Xe(ie.measure,Ye("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 Gi(ie){return vn-ie.display.nativeBarWidth}function Ti(ie){return ie.display.scroller.clientWidth-Gi(ie)-ie.display.barWidth}function Ri(ie){return ie.display.scroller.clientHeight-Gi(ie)-ie.display.barHeight}function oi(ie,ae,ge){var fe=ie.options.lineWrapping,ye=fe&&Ti(ie);if(!ae.measure.heights||fe&&ae.measure.width!=ye){var Re=ae.measure.heights=[];if(fe){ae.measure.width=ye;for(var Je=ae.text.firstChild.getClientRects(),mt=0;mt<Je.length-1;mt++){var gt=Je[mt],zt=Je[mt+1];Math.abs(gt.bottom-zt.bottom)>2&&Re.push((gt.bottom+zt.top)/2-ge.top)}}Re.push(ge.bottom-ge.top)}}function Mi(ie,ae,ge){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var fe=0;fe<ie.rest.length;fe++)if(ie.rest[fe]==ae)return{map:ie.measure.maps[fe],cache:ie.measure.caches[fe]};for(var ye=0;ye<ie.rest.length;ye++)if(Et(ie.rest[ye])>ge)return{map:ie.measure.maps[ye],cache:ie.measure.caches[ye],before:!0}}function ur(ie,ae){ae=Jr(ae);var ge=Et(ae),fe=ie.display.externalMeasured=new eu(ie.doc,ae,ge);fe.lineN=ge;var ye=fe.built=Bn(ie,fe);return fe.text=ye.pre,Xe(ie.display.lineMeasure,ye.pre),fe}function Hr(ie,ae,ge,fe){return Ya(ie,Ko(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 Ko(ie,ae){var ge=Et(ae),fe=ga(ie,ge);fe&&!fe.text?fe=null:fe&&fe.changes&&(ss(ie,fe,ge,wr(ie)),ie.curOp.forceUpdate=!0),fe||(fe=ur(ie,ae));var ye=Mi(fe,ae,ge);return{line:ae,view:fe,rect:null,map:ye.map,cache:ye.cache,before:ye.before,hasHeights:!1}}function Ya(ie,ae,ge,fe,ye){ae.before&&(ge=-1);var Re=ge+(fe||""),Je;return ae.cache.hasOwnProperty(Re)?Je=ae.cache[Re]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(oi(ie,ae.view,ae.rect),ae.hasHeights=!0),Je=Fi(ie,ae,ge,fe),Je.bogus||(ae.cache[Re]=Je)),{left:Je.left,right:Je.right,top:ye?Je.rtop:Je.top,bottom:ye?Je.rbottom:Je.bottom}}var Va={left:0,right:0,top:0,bottom:0};function No(ie,ae,ge){for(var fe,ye,Re,Je,mt,gt,zt=0;zt<ie.length;zt+=3)if(mt=ie[zt],gt=ie[zt+1],ae<mt?(ye=0,Re=1,Je="left"):ae<gt?(ye=ae-mt,Re=ye+1):(zt==ie.length-3||ae==gt&&ie[zt+3]>ae)&&(Re=gt-mt,ye=Re-1,ae>=gt&&(Je="right")),ye!=null){if(fe=ie[zt+2],mt==gt&&ge==(fe.insertLeft?"left":"right")&&(Je=ge),ge=="left"&&ye==0)for(;zt&&ie[zt-2]==ie[zt-3]&&ie[zt-1].insertLeft;)fe=ie[(zt-=3)+2],Je="left";if(ge=="right"&&ye==gt-mt)for(;zt<ie.length-3&&ie[zt+3]==ie[zt+4]&&!ie[zt+5].insertLeft;)fe=ie[(zt+=3)+2],Je="right";break}return{node:fe,start:ye,end:Re,collapse:Je,coverStart:mt,coverEnd:gt}}function Qr(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 ye=ie.length-1;ye>=0&&(ge=ie[ye]).left==ge.right;ye--);return ge}function Fi(ie,ae,ge,fe){var ye=No(ae.map,ge,fe),Re=ye.node,Je=ye.start,mt=ye.end,gt=ye.collapse,zt;if(Re.nodeType==3){for(var Mn=0;Mn<4;Mn++){for(;Je&&Lt(ae.line.text.charAt(ye.coverStart+Je));)--Je;for(;ye.coverStart+mt<ye.coverEnd&&Lt(ae.line.text.charAt(ye.coverStart+mt));)++mt;if(We&&Ue<9&&Je==0&&mt==ye.coverEnd-ye.coverStart?zt=Re.parentNode.getBoundingClientRect():zt=Qr(Ze(Re,Je,mt).getClientRects(),fe),zt.left||zt.right||Je==0)break;mt=Je,Je=Je-1,gt="right"}We&&Ue<11&&(zt=eo(ie.display.measure,zt))}else{Je>0&&(gt=fe="right");var Vt;ie.options.lineWrapping&&(Vt=Re.getClientRects()).length>1?zt=Vt[fe=="right"?Vt.length-1:0]:zt=Re.getBoundingClientRect()}if(We&&Ue<9&&!Je&&(!zt||!zt.left&&!zt.right)){var si=Re.parentNode.getClientRects()[0];si?zt={left:si.left,right:si.left+Bi(ie.display),top:si.top,bottom:si.bottom}:zt=Va}for(var ii=zt.top-ae.rect.top,nr=zt.bottom-ae.rect.top,dr=(ii+nr)/2,Lr=ae.view.measure.heights,uo=0;uo<Lr.length-1&&!(dr<Lr[uo]);uo++);var Ho=uo?Lr[uo-1]:0,Mo=Lr[uo],qo={left:(gt=="right"?zt.right:zt.left)-ae.rect.left,right:(gt=="left"?zt.left:zt.right)-ae.rect.left,top:Ho,bottom:Mo};return!zt.left&&!zt.right&&(qo.bogus=!0),ie.options.singleCursorHeightPerLine||(qo.rtop=ii,qo.rbottom=nr),qo}function eo(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,je(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 Fo(){return Pt&&te?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function aa(){return Pt&&te?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Do(ie){var ae=0;if(ie.widgets)for(var ge=0;ge<ie.widgets.length;++ge)ie.widgets[ge].above&&(ae+=zl(ie.widgets[ge]));return ae}function Or(ie,ae,ge,fe,ye){if(!ye){var Re=Do(ae);ge.top+=Re,ge.bottom+=Re}if(fe=="line")return ge;fe||(fe="local");var Je=ao(ae);if(fe=="local"?Je+=Ln(ie.display):Je-=ie.display.viewOffset,fe=="page"||fe=="window"){var mt=ie.display.lineSpace.getBoundingClientRect();Je+=mt.top+(fe=="window"?0:aa());var gt=mt.left+(fe=="window"?0:Fo());ge.left+=gt,ge.right+=gt}return ge.top+=Je,ge.bottom+=Je,ge}function Aa(ie,ae,ge){if(ge=="div")return ae;var fe=ae.left,ye=ae.top;if(ge=="page")fe-=Fo(),ye-=aa();else if(ge=="local"||!ge){var Re=ie.display.sizer.getBoundingClientRect();fe+=Re.left,ye+=Re.top}var Je=ie.display.lineSpace.getBoundingClientRect();return{left:fe-Je.left,top:ye-Je.top}}function Wa(ie,ae,ge,fe,ye){return fe||(fe=nn(ie.doc,ae.line)),Or(ie,fe,Hr(ie,fe,ae.ch,ye),ge)}function La(ie,ae,ge,fe,ye,Re){fe=fe||nn(ie.doc,ae.line),ye||(ye=Ko(ie,fe));function Je(nr,dr){var Lr=Ya(ie,ye,nr,dr?"right":"left",Re);return dr?Lr.left=Lr.right:Lr.right=Lr.left,Or(ie,fe,Lr,ge)}var mt=xn(fe,ie.doc.direction),gt=ae.ch,zt=ae.sticky;if(gt>=fe.text.length?(gt=fe.text.length,zt="before"):gt<=0&&(gt=0,zt="after"),!mt)return Je(zt=="before"?gt-1:gt,zt=="before");function Mn(nr,dr,Lr){var uo=mt[dr],Ho=uo.level==1;return Je(Lr?nr-1:nr,Ho!=Lr)}var Vt=ft(mt,gt,zt),si=Dt,ii=Mn(gt,Vt,zt=="before");return si!=null&&(ii.other=Mn(gt,si,zt!="before")),ii}function fl(ie,ae){var ge=0;ae=Ni(ie.doc,ae),ie.options.lineWrapping||(ge=Bi(ie.display)*ae.ch);var fe=nn(ie.doc,ae.line),ye=ao(fe)+Ln(ie.display);return{left:ge,right:ge,top:ye,bottom:ye+fe.height}}function xu(ie,ae,ge,fe,ye){var Re=tn(ie,ae,ge);return Re.xRel=ye,fe&&(Re.outside=fe),Re}function Qt(ie,ae,ge){var fe=ie.doc;if(ge+=ie.display.viewOffset,ge<0)return xu(fe.first,0,null,-1,-1);var ye=Pn(fe,ge),Re=fe.first+fe.size-1;if(ye>Re)return xu(fe.first+fe.size-1,nn(fe,Re).text.length,null,1,1);ae<0&&(ae=0);for(var Je=nn(fe,ye);;){var mt=qt(ie,Je,ye,ae,ge),gt=bo(Je,mt.ch+(mt.xRel>0||mt.outside>0?1:0));if(!gt)return mt;var zt=gt.find(1);if(zt.line==ye)return zt;Je=nn(fe,ye=zt.line)}}function Yt(ie,ae,ge,fe){fe-=Do(ae);var ye=ae.text.length,Re=it(function(Je){return Ya(ie,ge,Je-1).bottom<=fe},ye,0);return ye=it(function(Je){return Ya(ie,ge,Je).top>fe},Re,ye),{begin:Re,end:ye}}function Dn(ie,ae,ge,fe){ge||(ge=Ko(ie,ae));var ye=Or(ie,ae,Ya(ie,ge,fe),"line").top;return Yt(ie,ae,ge,ye)}function nt(ie,ae,ge,fe){return ie.bottom<=ge?!1:ie.top>ge?!0:(fe?ie.left:ie.right)>ae}function qt(ie,ae,ge,fe,ye){ye-=ao(ae);var Re=Ko(ie,ae),Je=Do(ae),mt=0,gt=ae.text.length,zt=!0,Mn=xn(ae,ie.doc.direction);if(Mn){var Vt=(ie.options.lineWrapping?kr:sr)(ie,ae,ge,Re,Mn,fe,ye);zt=Vt.level!=1,mt=zt?Vt.from:Vt.to-1,gt=zt?Vt.to:Vt.from-1}var si=null,ii=null,nr=it(function(_a){var Lo=Ya(ie,Re,_a);return Lo.top+=Je,Lo.bottom+=Je,nt(Lo,fe,ye,!1)?(Lo.top<=ye&&Lo.left<=fe&&(si=_a,ii=Lo),!0):!1},mt,gt),dr,Lr,uo=!1;if(ii){var Ho=fe-ii.left<ii.right-fe,Mo=Ho==zt;nr=si+(Mo?0:1),Lr=Mo?"after":"before",dr=Ho?ii.left:ii.right}else{!zt&&(nr==gt||nr==mt)&&nr++,Lr=nr==0?"after":nr==ae.text.length?"before":Ya(ie,Re,nr-(zt?1:0)).bottom+Je<=ye==zt?"after":"before";var qo=La(ie,tn(ge,nr,Lr),"line",ae,Re);dr=qo.left,uo=ye<qo.top?-1:ye>=qo.bottom?1:0}return nr=et(ae.text,nr,1),xu(ge,nr,Lr,uo,fe-dr)}function sr(ie,ae,ge,fe,ye,Re,Je){var mt=it(function(Vt){var si=ye[Vt],ii=si.level!=1;return nt(La(ie,tn(ge,ii?si.to:si.from,ii?"before":"after"),"line",ae,fe),Re,Je,!0)},0,ye.length-1),gt=ye[mt];if(mt>0){var zt=gt.level!=1,Mn=La(ie,tn(ge,zt?gt.from:gt.to,zt?"after":"before"),"line",ae,fe);nt(Mn,Re,Je,!0)&&Mn.top>Je&&(gt=ye[mt-1])}return gt}function kr(ie,ae,ge,fe,ye,Re,Je){var mt=Yt(ie,ae,fe,Je),gt=mt.begin,zt=mt.end;/\s/.test(ae.text.charAt(zt-1))&&zt--;for(var Mn=null,Vt=null,si=0;si<ye.length;si++){var ii=ye[si];if(!(ii.from>=zt||ii.to<=gt)){var nr=ii.level!=1,dr=Ya(ie,fe,nr?Math.min(zt,ii.to)-1:Math.max(gt,ii.from)).right,Lr=dr<Re?Re-dr+1e9:dr-Re;(!Mn||Vt>Lr)&&(Mn=ii,Vt=Lr)}}return Mn||(Mn=ye[ye.length-1]),Mn.from<gt&&(Mn={from:gt,to:Mn.to,level:Mn.level}),Mn.to>zt&&(Mn={from:Mn.from,to:zt,level:Mn.level}),Mn}var vr;function lr(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(vr==null){vr=Ye("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)vr.appendChild(document.createTextNode("x")),vr.appendChild(Ye("br"));vr.appendChild(document.createTextNode("x"))}Xe(ie.measure,vr);var ge=vr.offsetHeight/50;return ge>3&&(ie.cachedTextHeight=ge),je(ie.measure),ge||1}function Bi(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=Ye("span","xxxxxxxxxx"),ge=Ye("pre",[ae],"CodeMirror-line-like");Xe(ie.measure,ge);var fe=ae.getBoundingClientRect(),ye=(fe.right-fe.left)/10;return ye>2&&(ie.cachedCharWidth=ye),ye||10}function wr(ie){for(var ae=ie.display,ge={},fe={},ye=ae.gutters.clientLeft,Re=ae.gutters.firstChild,Je=0;Re;Re=Re.nextSibling,++Je){var mt=ie.display.gutterSpecs[Je].className;ge[mt]=Re.offsetLeft+Re.clientLeft+ye,fe[mt]=Re.clientWidth}return{fixedPos:to(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:ge,gutterWidth:fe,wrapperWidth:ae.wrapper.clientWidth}}function to(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function So(ie){var ae=lr(ie.display),ge=ie.options.lineWrapping,fe=ge&&Math.max(5,ie.display.scroller.clientWidth/Bi(ie.display)-3);return function(ye){if(mi(ie.doc,ye))return 0;var Re=0;if(ye.widgets)for(var Je=0;Je<ye.widgets.length;Je++)ye.widgets[Je].height&&(Re+=ye.widgets[Je].height);return ge?Re+(Math.ceil(ye.text.length/fe)||1)*ae:Re+ae}}function gr(ie){var ae=ie.doc,ge=So(ie);ae.iter(function(fe){var ye=ge(fe);ye!=fe.height&&qn(fe,ye)})}function mr(ie,ae,ge,fe){var ye=ie.display;if(!ge&&br(ae).getAttribute("cm-not-content")=="true")return null;var Re,Je,mt=ye.lineSpace.getBoundingClientRect();try{Re=ae.clientX-mt.left,Je=ae.clientY-mt.top}catch(Vt){return null}var gt=Qt(ie,Re,Je),zt;if(fe&&gt.xRel>0&&(zt=nn(ie.doc,gt.line).text).length==gt.ch){var Mn=qe(zt,zt.length,ie.options.tabSize)-zt.length;gt=tn(gt.line,Math.max(0,Math.round((Re-Ji(ie.display).left)/Bi(ie.display))-Mn))}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 _i(ie,ae,ge,fe){ae==null&&(ae=ie.doc.first),ge==null&&(ge=ie.doc.first+ie.doc.size),fe||(fe=0);var ye=ie.display;if(fe&&ge<ye.viewTo&&(ye.updateLineNumbers==null||ye.updateLineNumbers>ae)&&(ye.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=ye.viewTo)Vn&&Eo(ie.doc,ae)<ye.viewTo&&Wr(ie);else if(ge<=ye.viewFrom)Vn&&Gr(ie.doc,ge+fe)>ye.viewFrom?Wr(ie):(ye.viewFrom+=fe,ye.viewTo+=fe);else if(ae<=ye.viewFrom&&ge>=ye.viewTo)Wr(ie);else if(ae<=ye.viewFrom){var Re=Zo(ie,ge,ge+fe,1);Re?(ye.view=ye.view.slice(Re.index),ye.viewFrom=Re.lineN,ye.viewTo+=fe):Wr(ie)}else if(ge>=ye.viewTo){var Je=Zo(ie,ae,ae,-1);Je?(ye.view=ye.view.slice(0,Je.index),ye.viewTo=Je.lineN):Wr(ie)}else{var mt=Zo(ie,ae,ae,-1),gt=Zo(ie,ge,ge+fe,1);mt&&gt?(ye.view=ye.view.slice(0,mt.index).concat(fs(ie,mt.lineN,gt.lineN)).concat(ye.view.slice(gt.index)),ye.viewTo+=fe):Wr(ie)}var zt=ye.externalMeasured;zt&&(ge<zt.lineN?zt.lineN+=fe:ae<zt.lineN+zt.size&&(ye.externalMeasured=null))}function Ii(ie,ae,ge){ie.curOp.viewChanged=!0;var fe=ie.display,ye=ie.display.externalMeasured;if(ye&&ae>=ye.lineN&&ae<ye.lineN+ye.size&&(fe.externalMeasured=null),!(ae<fe.viewFrom||ae>=fe.viewTo)){var Re=fe.view[yr(ie,ae)];if(Re.node!=null){var Je=Re.changes||(Re.changes=[]);_t(Je,ge)==-1&&Je.push(ge)}}}function Wr(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Zo(ie,ae,ge,fe){var ye=yr(ie,ae),Re,Je=ie.display.view;if(!Vn||ge==ie.doc.first+ie.doc.size)return{index:ye,lineN:ge};for(var mt=ie.display.viewFrom,gt=0;gt<ye;gt++)mt+=Je[gt].size;if(mt!=ae){if(fe>0){if(ye==Je.length-1)return null;Re=mt+Je[ye].size-ae,ye++}else Re=mt-ae;ae+=Re,ge+=Re}for(;Eo(ie.doc,ge)!=ge;){if(ye==(fe<0?0:Je.length-1))return null;ge+=fe*Je[ye-(fe<0?1:0)].size,ye+=fe}return{index:ye,lineN:ge}}function Mr(ie,ae,ge){var fe=ie.display,ye=fe.view;ye.length==0||ae>=fe.viewTo||ge<=fe.viewFrom?(fe.view=fs(ie,ae,ge),fe.viewFrom=ae):(fe.viewFrom>ae?fe.view=fs(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(fs(ie,fe.viewTo,ge)):fe.viewTo>ge&&(fe.view=fe.view.slice(0,yr(ie,ge)))),fe.viewTo=ge}function Er(ie){for(var ae=ie.display.view,ge=0,fe=0;fe<ae.length;fe++){var ye=ae[fe];!ye.hidden&&(!ye.node||ye.changes)&&++ge}return ge}function Tr(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function Rr(ie,ae){ae===void 0&&(ae=!0);for(var ge=ie.doc,fe={},ye=fe.cursors=document.createDocumentFragment(),Re=fe.selection=document.createDocumentFragment(),Je=0;Je<ge.sel.ranges.length;Je++)if(!(!ae&&Je==ge.sel.primIndex)){var mt=ge.sel.ranges[Je];if(!(mt.from().line>=ie.display.viewTo||mt.to().line<ie.display.viewFrom)){var gt=mt.empty();(gt||ie.options.showCursorWhenSelecting)&&pr(ie,mt.head,ye),gt||_o(ie,mt,Re)}}return fe}function pr(ie,ae,ge){var fe=La(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),ye=ge.appendChild(Ye("div","\xA0","CodeMirror-cursor"));if(ye.style.left=fe.left+"px",ye.style.top=fe.top+"px",ye.style.height=Math.max(0,fe.bottom-fe.top)*ie.options.cursorHeight+"px",fe.other){var Re=ge.appendChild(Ye("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Re.style.display="",Re.style.left=fe.other.left+"px",Re.style.top=fe.other.top+"px",Re.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function Na(ie,ae){return ie.top-ae.top||ie.left-ae.left}function _o(ie,ae,ge){var fe=ie.display,ye=ie.doc,Re=document.createDocumentFragment(),Je=Ji(ie.display),mt=Je.left,gt=Math.max(fe.sizerWidth,Ti(ie)-fe.sizer.offsetLeft)-Je.right,zt=ye.direction=="ltr";function Mn(Mo,qo,_a,Lo){qo<0&&(qo=0),qo=Math.round(qo),Lo=Math.round(Lo),Re.appendChild(Ye("div",null,"CodeMirror-selected","position: absolute; left: "+Mo+`px;
top: `+qo+"px; width: "+(_a==null?gt-Mo:_a)+`px;
height: `+(Lo-qo)+"px"))}function Vt(Mo,qo,_a){var Lo=nn(ye,Mo),is=Lo.text.length,rl,ru;function xl(Xl,Yu){return Wa(ie,tn(Mo,Xl),"div",Lo,Yu)}function Uu(Xl,Yu,hu){var Jl=Dn(ie,Lo,null,Xl),Ds=Yu=="ltr"==(hu=="after")?"left":"right",Sl=hu=="after"?Jl.begin:Jl.end-(/\s/.test(Lo.text.charAt(Jl.end-1))?2:1);return xl(Sl,Ds)[Ds]}var wu=xn(Lo,ye.direction);return Bt(wu,qo||0,_a==null?is:_a,function(Xl,Yu,hu,Jl){var Ds=hu=="ltr",Sl=xl(Xl,Ds?"left":"right"),uu=xl(Yu-1,Ds?"right":"left"),fu=qo==null&&Xl==0,jc=_a==null&&Yu==is,Pl=Jl==0,Pc=!wu||Jl==wu.length-1;if(uu.top-Sl.top<=3){var Se=(zt?fu:jc)&&Pl,Ce=(zt?jc:fu)&&Pc,ke=Se?mt:(Ds?Sl:uu).left,Ke=Ce?gt:(Ds?uu:Sl).right;Mn(ke,Sl.top,Ke-ke,Sl.bottom)}else{var St,yt,Tt,Ht;Ds?(St=zt&&fu&&Pl?mt:Sl.left,yt=zt?gt:Uu(Xl,hu,"before"),Tt=zt?mt:Uu(Yu,hu,"after"),Ht=zt&&jc&&Pc?gt:uu.right):(St=zt?Uu(Xl,hu,"before"):mt,yt=!zt&&fu&&Pl?gt:Sl.right,Tt=!zt&&jc&&Pc?mt:uu.left,Ht=zt?Uu(Yu,hu,"after"):gt),Mn(St,Sl.top,yt-St,Sl.bottom),Sl.bottom<uu.top&&Mn(mt,Sl.bottom,null,uu.top),Mn(Tt,uu.top,Ht-Tt,uu.bottom)}(!rl||Na(Sl,rl)<0)&&(rl=Sl),Na(uu,rl)<0&&(rl=uu),(!ru||Na(Sl,ru)<0)&&(ru=Sl),Na(uu,ru)<0&&(ru=uu)}),{start:rl,end:ru}}var si=ae.from(),ii=ae.to();if(si.line==ii.line)Vt(si.line,si.ch,ii.ch);else{var nr=nn(ye,si.line),dr=nn(ye,ii.line),Lr=Jr(nr)==Jr(dr),uo=Vt(si.line,si.ch,Lr?nr.text.length+1:null).end,Ho=Vt(ii.line,Lr?0:null,ii.ch).start;Lr&&(uo.top<Ho.top-2?(Mn(uo.right,uo.top,null,uo.bottom),Mn(mt,Ho.top,Ho.left,Ho.bottom)):Mn(uo.right,uo.top,Ho.left-uo.right,uo.bottom)),uo.bottom<Ho.top&&Mn(mt,uo.bottom,null,Ho.top)}ge.appendChild(Re)}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 $a(ie){ie.state.focused||(ie.display.input.focus(),Oa(ie))}function Po(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||(dn(ie,"focus",ie,ae),ie.state.focused=!0,kt(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&&(dn(ie,"blur",ie,ae),ie.state.focused=!1,ze(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Ar(ie){for(var ae=ie.display,ge=ae.lineDiv.offsetTop,fe=0;fe<ae.view.length;fe++){var ye=ae.view[fe],Re=ie.options.lineWrapping,Je=void 0,mt=0;if(!ye.hidden){if(We&&Ue<8){var gt=ye.node.offsetTop+ye.node.offsetHeight;Je=gt-ge,ge=gt}else{var zt=ye.node.getBoundingClientRect();Je=zt.bottom-zt.top,!Re&&ye.text.firstChild&&(mt=ye.text.firstChild.getBoundingClientRect().right-zt.left-1)}var Mn=ye.line.height-Je;if((Mn>.005||Mn<-.005)&&(qn(ye.line,Je),_s(ye.line),ye.rest))for(var Vt=0;Vt<ye.rest.length;Vt++)_s(ye.rest[Vt]);if(mt>ie.display.sizerWidth){var si=Math.ceil(mt/Bi(ie.display));si>ie.display.maxLineLength&&(ie.display.maxLineLength=si,ie.display.maxLine=ye.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-Ln(ie));var ye=ge&&ge.bottom!=null?ge.bottom:fe+ie.wrapper.clientHeight,Re=Pn(ae,fe),Je=Pn(ae,ye);if(ge&&ge.ensure){var mt=ge.ensure.from.line,gt=ge.ensure.to.line;mt<Re?(Re=mt,Je=Pn(ae,ao(nn(ae,mt))+ie.wrapper.clientHeight)):Math.min(gt,ae.lastLine())>=Je&&(Re=Pn(ae,ao(nn(ae,gt))-ie.wrapper.clientHeight),Je=gt)}return{from:Re,to:Math.max(Je,Re+1)}}function Hs(ie,ae){if(!Qn(ie,"scrollCursorIntoView")){var ge=ie.display,fe=ge.sizer.getBoundingClientRect(),ye=null;if(ae.top+fe.top<0?ye=!0:ae.bottom+fe.top>(window.innerHeight||document.documentElement.clientHeight)&&(ye=!1),ye!=null&&!vt){var Re=Ye("div","\u200B",null,`position: absolute;
top: `+(ae.top-ge.viewOffset-Ln(ie.display))+`px;
height: `+(ae.bottom-ae.top+Gi(ie)+ge.barHeight)+`px;
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Re),Re.scrollIntoView(ye),ie.display.lineSpace.removeChild(Re)}}}function gl(ie,ae,ge,fe){fe==null&&(fe=0);var ye;!ie.options.lineWrapping&&ae==ge&&(ae=ae.ch?tn(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,ge=ae.sticky=="before"?tn(ae.line,ae.ch+1,"before"):ae);for(var Re=0;Re<5;Re++){var Je=!1,mt=La(ie,ae),gt=!ge||ge==ae?mt:La(ie,ge);ye={left:Math.min(mt.left,gt.left),top:Math.min(mt.top,gt.top)-fe,right:Math.max(mt.left,gt.left),bottom:Math.max(mt.bottom,gt.bottom)+fe};var zt=ad(ie,ye),Mn=ie.doc.scrollTop,Vt=ie.doc.scrollLeft;if(zt.scrollTop!=null&&(ac(ie,zt.scrollTop),Math.abs(ie.doc.scrollTop-Mn)>1&&(Je=!0)),zt.scrollLeft!=null&&(au(ie,zt.scrollLeft),Math.abs(ie.doc.scrollLeft-Vt)>1&&(Je=!0)),!Je)break}return ye}function rc(ie,ae){var ge=ad(ie,ae);ge.scrollTop!=null&&ac(ie,ge.scrollTop),ge.scrollLeft!=null&&au(ie,ge.scrollLeft)}function ad(ie,ae){var ge=ie.display,fe=lr(ie.display);ae.top<0&&(ae.top=0);var ye=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:ge.scroller.scrollTop,Re=Ri(ie),Je={};ae.bottom-ae.top>Re&&(ae.bottom=ae.top+Re);var mt=ie.doc.height+ai(ge),gt=ae.top<fe,zt=ae.bottom>mt-fe;if(ae.top<ye)Je.scrollTop=gt?0:ae.top;else if(ae.bottom>ye+Re){var Mn=Math.min(ae.top,(zt?mt:ae.bottom)-Re);Mn!=ye&&(Je.scrollTop=Mn)}var Vt=ie.options.fixedGutter?0:ge.gutters.offsetWidth,si=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:ge.scroller.scrollLeft-Vt,ii=Ti(ie)-ge.gutters.offsetWidth,nr=ae.right-ae.left>ii;return nr&&(ae.right=ae.left+ii),ae.left<10?Je.scrollLeft=0:ae.left<si?Je.scrollLeft=Math.max(0,ae.left+Vt-(nr?0:10)):ae.right>ii+si-3&&(Je.scrollLeft=ae.right+(nr?0:10)-ii),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 rs(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 ye=ad(ie,{left:Math.min(ae.left,ge.left),top:Math.min(ae.top,ge.top)-fe,right:Math.max(ae.right,ge.right),bottom:Math.max(ae.bottom,ge.bottom)+fe});vc(ie,ye.scrollLeft,ye.scrollTop)}function ac(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(le||_r(ie,{top:ae}),Rd(ie,ae,!0),le&&_r(ie),Pi(ie,100))}function Rd(ie,ae,ge){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!ge)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function au(ie,ae,ge,fe){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((ge?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!fe)&&(ie.doc.scrollLeft=ae,la(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+Gi(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:ge}}var Wu=function(ie,ae,ge){this.cm=ge;var fe=this.vert=Ye("div",[Ye("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),ye=this.horiz=Ye("div",[Ye("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=ye.tabIndex=-1,ie(fe),ie(ye),Jt(fe,"scroll",function(){fe.clientHeight&&ae(fe.scrollTop,"vertical")}),Jt(ye,"scroll",function(){ye.clientWidth&&ae(ye.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,We&&Ue<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Wu.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,ge=ie.scrollHeight>ie.clientHeight+1,fe=ie.nativeBarWidth;if(ge){this.vert.style.display="block",this.vert.style.bottom=ae?fe+"px":"0";var ye=ie.viewHeight-(ae?fe:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+ye)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=ge?fe+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Re=ie.viewWidth-ie.barLeft-(ge?fe:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Re)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(fe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ge?fe:0,bottom:ae?fe:0}},Wu.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Wu.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Wu.prototype.zeroWidthHack=function(){var ie=de&&!lt?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ve,this.disableVert=new Ve},Wu.prototype.enableZeroWidthBar=function(ie,ae,ge){ie.style.pointerEvents="auto";function fe(){var ye=ie.getBoundingClientRect(),Re=ge=="vert"?document.elementFromPoint(ye.right-1,(ye.top+ye.bottom)/2):document.elementFromPoint((ye.right+ye.left)/2,ye.bottom-1);Re!=ie?ie.style.pointerEvents="none":ae.set(1e3,fe)}ae.set(1e3,fe)},Wu.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Au=function(){};Au.prototype.update=function(){return{bottom:0,right:0}},Au.prototype.setScrollLeft=function(){},Au.prototype.setScrollTop=function(){},Au.prototype.clear=function(){};function yc(ie,ae){ae||(ae=su(ie));var ge=ie.display.barWidth,fe=ie.display.barHeight;bd(ie,ae);for(var ye=0;ye<4&&ge!=ie.display.barWidth||fe!=ie.display.barHeight;ye++)ge!=ie.display.barWidth&&ie.options.lineWrapping&&Ar(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&&ze(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),Jt(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&&kt(ie.display.wrapper,ie.display.scrollbars.addClass)}var ch=0;function li(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 mo(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;Ja(ge)})}function Ja(ie){for(var ae=ie.ops,ge=0;ge<ae.length;ge++)ot(ae[ge]);for(var fe=0;fe<ae.length;fe++)tt(ae[fe]);for(var ye=0;ye<ae.length;ye++)Ut(ae[ye]);for(var Re=0;Re<ae.length;Re++)Xt(ae[Re]);for(var Je=0;Je<ae.length;Je++)pn(ae[Je])}function ot(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 vi(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function tt(ie){ie.updatedDisplay=ie.mustUpdate&&Xr(ie.cm,ie.update)}function Ut(ie){var ae=ie.cm,ge=ae.display;ie.updatedDisplay&&Ar(ae),ie.barMeasure=su(ae),ge.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=Hr(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+Gi(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,ge.sizer.offsetLeft+ie.adjustWidthTo-Ti(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=ge.input.prepareSelection())}function Xt(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==at();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,ge),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&yc(ae,ie.barMeasure),ie.updatedDisplay&&Uo(ae,ie.barMeasure),ie.selectionChanged&&xa(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),ge&&$a(ie.cm)}function pn(ie){var ae=ie.cm,ge=ae.display,fe=ae.doc;if(ie.updatedDisplay&&rr(ae,ie.update),ge.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(ge.wheelStartX=ge.wheelStartY=null),ie.scrollTop!=null&&Rd(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&au(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var ye=gl(ae,Ni(fe,ie.scrollToPos.from),Ni(fe,ie.scrollToPos.to),ie.scrollToPos.margin);Hs(ae,ye)}var Re=ie.maybeHiddenMarkers,Je=ie.maybeUnhiddenMarkers;if(Re)for(var mt=0;mt<Re.length;++mt)Re[mt].lines.length||dn(Re[mt],"hide");if(Je)for(var gt=0;gt<Je.length;++gt)Je[gt].lines.length&&dn(Je[gt],"unhide");ge.wrapper.offsetHeight&&(fe.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&dn(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function rn(ie,ae){if(ie.curOp)return ae();li(ie);try{return ae()}finally{mo(ie)}}function $n(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);li(ie);try{return ae.apply(ie,arguments)}finally{mo(ie)}}}function Rn(ie){return function(){if(this.curOp)return ie.apply(this,arguments);li(this);try{return ie.apply(this,arguments)}finally{mo(this)}}}function Yn(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);li(ae);try{return ie.apply(this,arguments)}finally{mo(ae)}}}function Pi(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Gt(Jn,ie))}function Jn(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var ge=+new Date+ie.options.workTime,fe=Fr(ie,ae.highlightFrontier),ye=[];ae.iter(fe.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Re){if(fe.line>=ie.display.viewFrom){var Je=Re.styles,mt=Re.text.length>ie.options.maxHighlightLength?on(ae.mode,fe.state):null,gt=io(ie,Re,fe,!0);mt&&(fe.state=mt),Re.styles=gt.styles;var zt=Re.styleClasses,Mn=gt.classes;Mn?Re.styleClasses=Mn:zt&&(Re.styleClasses=null);for(var Vt=!Je||Je.length!=Re.styles.length||zt!=Mn&&(!zt||!Mn||zt.bgClass!=Mn.bgClass||zt.textClass!=Mn.textClass),si=0;!Vt&&si<Je.length;++si)Vt=Je[si]!=Re.styles[si];Vt&&ye.push(fe.line),Re.stateAfter=fe.save(),fe.nextLine()}else Re.text.length<=ie.options.maxHighlightLength&&wn(ie,Re.text,fe),Re.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>ge)return Pi(ie,ie.options.workDelay),!0}),ae.highlightFrontier=fe.line,ae.modeFrontier=Math.max(ae.modeFrontier,fe.line),ye.length&&rn(ie,function(){for(var Re=0;Re<ye.length;Re++)Ii(ie,ye[Re],"text")})}}var vi=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=Ti(ie),this.force=ge,this.dims=wr(ie),this.events=[]};vi.prototype.signal=function(ie,ae){zn(ie,ae)&&this.events.push(arguments)},vi.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)dn.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=Gi(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Gi(ie)+"px",ae.scrollbarsClipped=!0)}function Ki(ie){if(ie.hasFocus())return null;var ae=at();if(!ae||!Nt(ie.display.lineDiv,ae))return null;var ge={activeElt:ae};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&Nt(ie.display.lineDiv,fe.anchorNode)&&(ge.anchorNode=fe.anchorNode,ge.anchorOffset=fe.anchorOffset,ge.focusNode=fe.focusNode,ge.focusOffset=fe.focusOffset)}return ge}function Vi(ie){if(!(!ie||!ie.activeElt||ie.activeElt==at())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Nt(document.body,ie.anchorNode)&&Nt(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 Xr(ie,ae){var ge=ie.display,fe=ie.doc;if(ae.editorIsHidden)return Wr(ie),!1;if(!ae.force&&ae.visible.from>=ge.viewFrom&&ae.visible.to<=ge.viewTo&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo)&&ge.renderedView==ge.view&&Er(ie)==0)return!1;so(ie)&&(Wr(ie),ae.dims=wr(ie));var ye=fe.first+fe.size,Re=Math.max(ae.visible.from-ie.options.viewportMargin,fe.first),Je=Math.min(ye,ae.visible.to+ie.options.viewportMargin);ge.viewFrom<Re&&Re-ge.viewFrom<20&&(Re=Math.max(fe.first,ge.viewFrom)),ge.viewTo>Je&&ge.viewTo-Je<20&&(Je=Math.min(ye,ge.viewTo)),Vn&&(Re=Eo(ie.doc,Re),Je=Gr(ie.doc,Je));var mt=Re!=ge.viewFrom||Je!=ge.viewTo||ge.lastWrapHeight!=ae.wrapperHeight||ge.lastWrapWidth!=ae.wrapperWidth;Mr(ie,Re,Je),ge.viewOffset=ao(nn(ie.doc,ge.viewFrom)),ie.display.mover.style.top=ge.viewOffset+"px";var gt=Er(ie);if(!mt&&gt==0&&!ae.force&&ge.renderedView==ge.view&&(ge.updateLineNumbers==null||ge.updateLineNumbers>=ge.viewTo))return!1;var zt=Ki(ie);return gt>4&&(ge.lineDiv.style.display="none"),jr(ie,ge.updateLineNumbers,ae.dims),gt>4&&(ge.lineDiv.style.display=""),ge.renderedView=ge.view,Vi(zt),je(ge.cursorDiv),je(ge.selectionDiv),ge.gutters.style.height=ge.sizer.style.minHeight=0,mt&&(ge.lastWrapHeight=ae.wrapperHeight,ge.lastWrapWidth=ae.wrapperWidth,Pi(ie,400)),ge.updateLineNumbers=null,!0}function rr(ie,ae){for(var ge=ae.viewport,fe=!0;;fe=!1){if(!fe||!ie.options.lineWrapping||ae.oldDisplayWidth==Ti(ie)){if(ge&&ge.top!=null&&(ge={top:Math.min(ie.doc.height+ai(ie.display)-Ri(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(!Xr(ie,ae))break;Ar(ie);var ye=su(ie);Tr(ie),yc(ie,ye),Uo(ie,ye),ae.force=!1}ae.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ae.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function _r(ie,ae){var ge=new vi(ie,ae);if(Xr(ie,ge)){Ar(ie),rr(ie,ge);var fe=su(ie);Tr(ie),yc(ie,fe),Uo(ie,fe),ge.finish()}}function jr(ie,ae,ge){var fe=ie.display,ye=ie.options.lineNumbers,Re=fe.lineDiv,Je=Re.firstChild;function mt(nr){var dr=nr.nextSibling;return Me&&de&&ie.display.currentWheelTarget==nr?nr.style.display="none":nr.parentNode.removeChild(nr),dr}for(var gt=fe.view,zt=fe.viewFrom,Mn=0;Mn<gt.length;Mn++){var Vt=gt[Mn];if(!Vt.hidden)if(!Vt.node||Vt.node.parentNode!=Re){var si=kl(ie,Vt,zt,ge);Re.insertBefore(si,Je)}else{for(;Je!=Vt.node;)Je=mt(Je);var ii=ye&&ae!=null&&ae<=zt&&Vt.lineNumber;Vt.changes&&(_t(Vt.changes,"gutter")>-1&&(ii=!1),ss(ie,Vt,zt,ge)),ii&&(je(Vt.lineNumber),Vt.lineNumber.appendChild(document.createTextNode(Ci(ie.options,zt)))),Je=Vt.node.nextSibling}zt+=Vt.size}for(;Je;)Je=mt(Je)}function vo(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Uo(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+Gi(ie)+"px"}function la(ie){var ae=ie.display,ge=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var fe=to(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,ye=ae.gutters.offsetWidth,Re=fe+"px",Je=0;Je<ge.length;Je++)if(!ge[Je].hidden){ie.options.fixedGutter&&(ge[Je].gutter&&(ge[Je].gutter.style.left=Re),ge[Je].gutterBackground&&(ge[Je].gutterBackground.style.left=Re));var mt=ge[Je].alignable;if(mt)for(var gt=0;gt<mt.length;gt++)mt[gt].style.left=Re}ie.options.fixedGutter&&(ae.gutters.style.left=fe+ye+"px")}}function so(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 ye=fe.measure.appendChild(Ye("div",[Ye("div",ge)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Re=ye.firstChild.offsetWidth,Je=ye.offsetWidth-Re;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(Re,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,ye=0;ye<ie.length;ye++){var Re=ie[ye],Je=null;if(typeof Re!="string"&&(Je=Re.style,Re=Re.className),Re=="CodeMirror-linenumbers")if(ae)fe=!0;else continue;ge.push({className:Re,style:Je})}return ae&&!fe&&ge.push({className:"CodeMirror-linenumbers",style:null}),ge}function ka(ie){var ae=ie.gutters,ge=ie.gutterSpecs;je(ae),ie.lineGutter=null;for(var fe=0;fe<ge.length;++fe){var ye=ge[fe],Re=ye.className,Je=ye.style,mt=ae.appendChild(Ye("div",null,"CodeMirror-gutter "+Re));Je&&(mt.style.cssText=Je),Re=="CodeMirror-linenumbers"&&(ie.lineGutter=mt,mt.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=ge.length?"":"none",vo(ie)}function ho(ie){ka(ie.display),_i(ie),la(ie)}function ko(ie,ae,ge,fe){var ye=this;this.input=ge,ye.scrollbarFiller=Ye("div",null,"CodeMirror-scrollbar-filler"),ye.scrollbarFiller.setAttribute("cm-not-content","true"),ye.gutterFiller=Ye("div",null,"CodeMirror-gutter-filler"),ye.gutterFiller.setAttribute("cm-not-content","true"),ye.lineDiv=dt("div",null,"CodeMirror-code"),ye.selectionDiv=Ye("div",null,null,"position: relative; z-index: 1"),ye.cursorDiv=Ye("div",null,"CodeMirror-cursors"),ye.measure=Ye("div",null,"CodeMirror-measure"),ye.lineMeasure=Ye("div",null,"CodeMirror-measure"),ye.lineSpace=dt("div",[ye.measure,ye.lineMeasure,ye.selectionDiv,ye.cursorDiv,ye.lineDiv],null,"position: relative; outline: none");var Re=dt("div",[ye.lineSpace],"CodeMirror-lines");ye.mover=Ye("div",[Re],null,"position: relative"),ye.sizer=Ye("div",[ye.mover],"CodeMirror-sizer"),ye.sizerWidth=null,ye.heightForcer=Ye("div",null,null,"position: absolute; height: "+vn+"px; width: 1px;"),ye.gutters=Ye("div",null,"CodeMirror-gutters"),ye.lineGutter=null,ye.scroller=Ye("div",[ye.sizer,ye.heightForcer,ye.gutters],"CodeMirror-scroll"),ye.scroller.setAttribute("tabIndex","-1"),ye.wrapper=Ye("div",[ye.scrollbarFiller,ye.gutterFiller,ye.scroller],"CodeMirror"),We&&Ue<8&&(ye.gutters.style.zIndex=-1,ye.scroller.style.paddingRight=0),!Me&&!(le&&ee)&&(ye.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(ye.wrapper):ie(ye.wrapper)),ye.viewFrom=ye.viewTo=ae.first,ye.reportedViewFrom=ye.reportedViewTo=ae.first,ye.view=[],ye.renderedView=null,ye.externalMeasured=null,ye.viewOffset=0,ye.lastWrapHeight=ye.lastWrapWidth=0,ye.updateLineNumbers=null,ye.nativeBarWidth=ye.barHeight=ye.barWidth=0,ye.scrollbarsClipped=!1,ye.lineNumWidth=ye.lineNumInnerWidth=ye.lineNumChars=null,ye.alignWidgets=!1,ye.cachedCharWidth=ye.cachedTextHeight=ye.cachedPaddingH=null,ye.maxLine=null,ye.maxLineLength=0,ye.maxLineChanged=!1,ye.wheelDX=ye.wheelDY=ye.wheelStartX=ye.wheelStartY=null,ye.shift=!1,ye.selForContextMenu=null,ye.activeTouch=null,ye.gutterSpecs=Wo(fe.gutters,fe.lineNumbers),ka(ye),ge.init(ye)}var fo=0,Dr=null;We?Dr=-.53:le?Dr=15:Pt?Dr=-.7:Ft&&(Dr=-1/3);function Bo(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 ea(ie){var ae=Bo(ie);return ae.x*=Dr,ae.y*=Dr,ae}function Sa(ie,ae){var ge=Bo(ae),fe=ge.x,ye=ge.y,Re=ie.display,Je=Re.scroller,mt=Je.scrollWidth>Je.clientWidth,gt=Je.scrollHeight>Je.clientHeight;if(fe&&mt||ye&&gt){if(ye&&de&&Me){e:for(var zt=ae.target,Mn=Re.view;zt!=Je;zt=zt.parentNode)for(var Vt=0;Vt<Mn.length;Vt++)if(Mn[Vt].node==zt){ie.display.currentWheelTarget=zt;break e}}if(fe&&!le&&!$e&&Dr!=null){ye&&gt&&ac(ie,Math.max(0,Je.scrollTop+ye*Dr)),au(ie,Math.max(0,Je.scrollLeft+fe*Dr)),(!ye||ye&&gt)&&yi(ae),Re.wheelStartX=null;return}if(ye&&Dr!=null){var si=ye*Dr,ii=ie.doc.scrollTop,nr=ii+Re.wrapper.clientHeight;si<0?ii=Math.max(0,ii+si-50):nr=Math.min(ie.doc.height,nr+si+50),_r(ie,{top:ii,bottom:nr})}fo<20&&(Re.wheelStartX==null?(Re.wheelStartX=Je.scrollLeft,Re.wheelStartY=Je.scrollTop,Re.wheelDX=fe,Re.wheelDY=ye,setTimeout(function(){if(Re.wheelStartX!=null){var dr=Je.scrollLeft-Re.wheelStartX,Lr=Je.scrollTop-Re.wheelStartY,uo=Lr&&Re.wheelDY&&Lr/Re.wheelDY||dr&&Re.wheelDX&&dr/Re.wheelDX;Re.wheelStartX=Re.wheelStartY=null,uo&&(Dr=(Dr*fo+uo)/(fo+1),++fo)}},200)):(Re.wheelDX+=fe,Re.wheelDY+=ye))}}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(!In(ge.anchor,fe.anchor)||!In(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 lo(ji(this.ranges[ae].anchor),ji(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(sn(ae,fe.from())>=0&&sn(ie,fe.to())<=0)return ge}return-1};var lo=function(ie,ae){this.anchor=ie,this.head=ae};lo.prototype.from=function(){return Si(this.anchor,this.head)},lo.prototype.to=function(){return Ai(this.anchor,this.head)},lo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ta(ie,ae,ge){var fe=ie&&ie.options.selectionsMayTouch,ye=ae[ge];ae.sort(function(si,ii){return sn(si.from(),ii.from())}),ge=_t(ae,ye);for(var Re=1;Re<ae.length;Re++){var Je=ae[Re],mt=ae[Re-1],gt=sn(mt.to(),Je.from());if(fe&&!Je.empty()?gt>0:gt>=0){var zt=Si(mt.from(),Je.from()),Mn=Ai(mt.to(),Je.to()),Vt=mt.empty()?Je.from()==Je.head:mt.from()==mt.head;Re<=ge&&--ge,ae.splice(--Re,2,new lo(Vt?Mn:zt,Vt?zt:Mn))}}return new Pa(ae,ge)}function Ua(ie,ae){return new Pa([new lo(ie,ae||ie)],0)}function Es(ie){return ie.text?tn(ie.from.line+ie.text.length-1,wt(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function ls(ie,ae){if(sn(ie,ae.from)<0)return ie;if(sn(ie,ae.to)<=0)return Es(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+=Es(ae).ch-ae.to.ch),tn(ge,fe)}function qs(ie,ae){for(var ge=[],fe=0;fe<ie.sel.ranges.length;fe++){var ye=ie.sel.ranges[fe];ge.push(new lo(ls(ye.anchor,ae),ls(ye.head,ae)))}return Ta(ie.cm,ge,ie.sel.primIndex)}function Ls(ie,ae,ge){return ie.line==ae.line?tn(ge.line,ie.ch-ae.ch+ge.ch):tn(ge.line+(ie.line-ae.line),ie.ch)}function Za(ie,ae,ge){for(var fe=[],ye=tn(ie.first,0),Re=ye,Je=0;Je<ae.length;Je++){var mt=ae[Je],gt=Ls(mt.from,ye,Re),zt=Ls(Es(mt),ye,Re);if(ye=mt.to,Re=zt,ge=="around"){var Mn=ie.sel.ranges[Je],Vt=sn(Mn.head,Mn.anchor)<0;fe[Je]=new lo(Vt?zt:gt,Vt?gt:zt)}else fe[Je]=new lo(gt,gt)}return new Pa(fe,ie.sel.primIndex)}function sa(ie){ie.doc.mode=Zt(ie.options,ie.doc.modeOption),ds(ie)}function ds(ie){ie.doc.iter(function(ae){ae.stateAfter&&(ae.stateAfter=null),ae.styles&&(ae.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,Pi(ie,100),ie.state.modeGen++,ie.curOp&&_i(ie)}function el(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&wt(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Ws(ie,ae,ge,fe){function ye(Ho){return ge?ge[Ho]:null}function Re(Ho,Mo,qo){Ka(Ho,Mo,qo,fe),hr(Ho,"change",Ho,ae)}function Je(Ho,Mo){for(var qo=[],_a=Ho;_a<Mo;++_a)qo.push(new fa(zt[_a],ye(_a),fe));return qo}var mt=ae.from,gt=ae.to,zt=ae.text,Mn=nn(ie,mt.line),Vt=nn(ie,gt.line),si=wt(zt),ii=ye(zt.length-1),nr=gt.line-mt.line;if(ae.full)ie.insert(0,Je(0,zt.length)),ie.remove(zt.length,ie.size-zt.length);else if(el(ie,ae)){var dr=Je(0,zt.length-1);Re(Vt,Vt.text,ii),nr&&ie.remove(mt.line,nr),dr.length&&ie.insert(mt.line,dr)}else if(Mn==Vt)if(zt.length==1)Re(Mn,Mn.text.slice(0,mt.ch)+si+Mn.text.slice(gt.ch),ii);else{var Lr=Je(1,zt.length-1);Lr.push(new fa(si+Mn.text.slice(gt.ch),ii,fe)),Re(Mn,Mn.text.slice(0,mt.ch)+zt[0],ye(0)),ie.insert(mt.line+1,Lr)}else if(zt.length==1)Re(Mn,Mn.text.slice(0,mt.ch)+zt[0]+Vt.text.slice(gt.ch),ye(0)),ie.remove(mt.line+1,nr);else{Re(Mn,Mn.text.slice(0,mt.ch)+zt[0],ye(0)),Re(Vt,si+Vt.text.slice(gt.ch),ii);var uo=Je(1,zt.length-1);nr>1&&ie.remove(mt.line+1,nr-1),ie.insert(mt.line+1,uo)}hr(ie,"change",ie,ae)}function cl(ie,ae,ge){function fe(ye,Re,Je){if(ye.linked)for(var mt=0;mt<ye.linked.length;++mt){var gt=ye.linked[mt];if(gt.doc!=Re){var zt=Je&&gt.sharedHist;ge&&!zt||(ae(gt.doc,zt),fe(gt.doc,ye,zt))}}}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,gr(ie),sa(ie),ca(ie),ie.options.lineWrapping||Ca(ie),ie.options.mode=ae.modeOption,_i(ie)}function ca(ie){(ie.doc.direction=="rtl"?kt:ze)(ie.display.lineDiv,"CodeMirror-rtl")}function wa(ie){rn(ie,function(){ca(ie),_i(ie)})}function Jo(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 xs(ie,ae){var ge={from:ji(ae.from),to:Es(ae),text:gn(ie,ae.from,ae.to)};return Vl(ie,ge,ae.from.line,ae.to.line+1),cl(ie,function(fe){return Vl(fe,ge,ae.from.line,ae.to.line+1)},!0),ge}function Yo(ie){for(;ie.length;){var ae=wt(ie);if(ae.ranges)ie.pop();else break}}function Ra(ie,ae){if(ae)return Yo(ie.done),wt(ie.done);if(ie.done.length&&!wt(ie.done).ranges)return wt(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),wt(ie.done)}function os(ie,ae,ge,fe){var ye=ie.history;ye.undone.length=0;var Re=+new Date,Je,mt;if((ye.lastOp==fe||ye.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&ye.lastModTime>Re-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(Je=Ra(ye,ye.lastOp==fe)))mt=wt(Je.changes),sn(ae.from,ae.to)==0&&sn(ae.from,mt.to)==0?mt.to=Es(ae):Je.changes.push(xs(ie,ae));else{var gt=wt(ye.done);for((!gt||!gt.ranges)&&bl(ie.sel,ye.done),Je={changes:[xs(ie,ae)],generation:ye.generation},ye.done.push(Je);ye.done.length>ye.undoDepth;)ye.done.shift(),ye.done[0].ranges||ye.done.shift()}ye.done.push(ge),ye.generation=++ye.maxGeneration,ye.lastModTime=ye.lastSelTime=Re,ye.lastOp=ye.lastSelOp=fe,ye.lastOrigin=ye.lastSelOrigin=ae.origin,mt||dn(ie,"historyAdded")}function us(ie,ae,ge,fe){var ye=ae.charAt(0);return ye=="*"||ye=="+"&&ge.ranges.length==fe.ranges.length&&ge.somethingSelected()==fe.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Al(ie,ae,ge,fe){var ye=ie.history,Re=fe&&fe.origin;ge==ye.lastSelOp||Re&&ye.lastSelOrigin==Re&&(ye.lastModTime==ye.lastSelTime&&ye.lastOrigin==Re||us(ie,Re,wt(ye.done),ae))?ye.done[ye.done.length-1]=ae:bl(ae,ye.done),ye.lastSelTime=+new Date,ye.lastSelOrigin=Re,ye.lastSelOp=ge,fe&&fe.clearRedo!==!1&&Yo(ye.undone)}function bl(ie,ae){var ge=wt(ae);ge&&ge.ranges&&ge.equals(ie)||ae.push(ie)}function Vl(ie,ae,ge,fe){var ye=ae["spans_"+ie.id],Re=0;ie.iter(Math.max(ie.first,ge),Math.min(ie.first+ie.size,fe),function(Je){Je.markedSpans&&((ye||(ye=ae["spans_"+ie.id]={}))[Re]=Je.markedSpans),++Re})}function bs(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=[],ye=0;ye<ae.text.length;++ye)fe.push(bs(ge[ye]));return fe}function dl(ie,ae){var ge=Zl(ie,ae),fe=Br(ie,ae);if(!ge)return fe;if(!fe)return ge;for(var ye=0;ye<ge.length;++ye){var Re=ge[ye],Je=fe[ye];if(Re&&Je)e:for(var mt=0;mt<Je.length;++mt){for(var gt=Je[mt],zt=0;zt<Re.length;++zt)if(Re[zt].marker==gt.marker)continue e;Re.push(gt)}else Je&&(ge[ye]=Je)}return ge}function Fl(ie,ae,ge){for(var fe=[],ye=0;ye<ie.length;++ye){var Re=ie[ye];if(Re.ranges){fe.push(ge?Pa.prototype.deepCopy.call(Re):Re);continue}var Je=Re.changes,mt=[];fe.push({changes:mt});for(var gt=0;gt<Je.length;++gt){var zt=Je[gt],Mn=void 0;if(mt.push({from:zt.from,to:zt.to,text:zt.text}),ae)for(var Vt in zt)(Mn=Vt.match(/^spans_(\d+)$/))&&_t(ae,Number(Mn[1]))>-1&&(wt(mt)[Vt]=zt[Vt],delete zt[Vt])}}return fe}function _c(ie,ae,ge,fe){if(fe){var ye=ie.anchor;if(ge){var Re=sn(ae,ye)<0;Re!=sn(ge,ye)<0?(ye=ae,ae=ge):Re!=sn(ae,ge)<0&&(ae=ge)}return new lo(ye,ae)}else return new lo(ge||ae,ae)}function Fs(ie,ae,ge,fe,ye){ye==null&&(ye=ie.cm&&(ie.cm.display.shift||ie.extend)),js(ie,new Pa([_c(ie.sel.primary(),ae,ge,ye)],0),fe)}function ks(ie,ae,ge){for(var fe=[],ye=ie.cm&&(ie.cm.display.shift||ie.extend),Re=0;Re<ie.sel.ranges.length;Re++)fe[Re]=_c(ie.sel.ranges[Re],ae[Re],null,ye);var Je=Ta(ie.cm,fe,ie.sel.primIndex);js(ie,Je,ge)}function Bs(ie,ae,ge,fe){var ye=ie.sel.ranges.slice(0);ye[ae]=ge,js(ie,Ta(ie.cm,ye,ie.sel.primIndex),fe)}function Gs(ie,ae,ge,fe){js(ie,Ua(ae,ge),fe)}function pl(ie,ae,ge){var fe={ranges:ae.ranges,update:function(ye){this.ranges=[];for(var Re=0;Re<ye.length;Re++)this.ranges[Re]=new lo(Ni(ie,ye[Re].anchor),Ni(ie,ye[Re].head))},origin:ge&&ge.origin};return dn(ie,"beforeSelectionChange",ie,fe),ie.cm&&dn(ie.cm,"beforeSelectionChange",ie.cm,fe),fe.ranges!=ae.ranges?Ta(ie.cm,fe.ranges,fe.ranges.length-1):ae}function ns(ie,ae,ge){var fe=ie.history.done,ye=wt(fe);ye&&ye.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){(zn(ie,"beforeSelectionChange")||ie.cm&&zn(ie.cm,"beforeSelectionChange"))&&(ae=pl(ie,ae,ge));var fe=ge&&ge.bias||(sn(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,pi(ie.cm)),hr(ie,"cursorActivity",ie))}function Gu(ie){Ul(ie,Du(ie,ie.sel,null,!1))}function Du(ie,ae,ge,fe){for(var ye,Re=0;Re<ae.ranges.length;Re++){var Je=ae.ranges[Re],mt=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Re],gt=Iu(ie,Je.anchor,mt&&mt.anchor,ge,fe),zt=Iu(ie,Je.head,mt&&mt.head,ge,fe);(ye||gt!=Je.anchor||zt!=Je.head)&&(ye||(ye=ae.ranges.slice(0,Re)),ye[Re]=new lo(gt,zt))}return ye?Ta(ie.cm,ye,ae.primIndex):ae}function ml(ie,ae,ge,fe,ye){var Re=nn(ie,ae.line);if(Re.markedSpans)for(var Je=0;Je<Re.markedSpans.length;++Je){var mt=Re.markedSpans[Je],gt=mt.marker,zt="selectLeft"in gt?!gt.selectLeft:gt.inclusiveLeft,Mn="selectRight"in gt?!gt.selectRight:gt.inclusiveRight;if((mt.from==null||(zt?mt.from<=ae.ch:mt.from<ae.ch))&&(mt.to==null||(Mn?mt.to>=ae.ch:mt.to>ae.ch))){if(ye&&(dn(gt,"beforeCursorEnter"),gt.explicitlyCleared))if(Re.markedSpans){--Je;continue}else break;if(!gt.atomic)continue;if(ge){var Vt=gt.find(fe<0?1:-1),si=void 0;if((fe<0?Mn:zt)&&(Vt=Ou(ie,Vt,-fe,Vt&&Vt.line==ae.line?Re:null)),Vt&&Vt.line==ae.line&&(si=sn(Vt,ge))&&(fe<0?si<0:si>0))return ml(ie,Vt,ae,fe,ye)}var ii=gt.find(fe<0?-1:1);return(fe<0?zt:Mn)&&(ii=Ou(ie,ii,fe,ii.line==ae.line?Re:null)),ii?ml(ie,ii,ae,fe,ye):null}}return ae}function Iu(ie,ae,ge,fe,ye){var Re=fe||1,Je=ml(ie,ae,ge,Re,ye)||!ye&&ml(ie,ae,ge,Re,!0)||ml(ie,ae,ge,-Re,ye)||!ye&&ml(ie,ae,ge,-Re,!0);return Je||(ie.cantEdit=!0,tn(ie.first,0))}function Ou(ie,ae,ge,fe){return ge<0&&ae.ch==0?ae.line>ie.first?Ni(ie,tn(ae.line-1)):null:ge>0&&ae.ch==(fe||nn(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?tn(ae.line+1,0):null:new tn(ae.line,ae.ch+ge)}function Ns(ie){ie.setSelection(tn(ie.firstLine(),0),tn(ie.lastLine()),jt)}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(ye,Re,Je,mt){ye&&(fe.from=Ni(ie,ye)),Re&&(fe.to=Ni(ie,Re)),Je&&(fe.text=Je),mt!==void 0&&(fe.origin=mt)}),dn(ie,"beforeChange",ie,fe),ie.cm&&dn(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 $n(ie.cm,$s)(ie,ae,ge);if(ie.cm.state.suppressEdits)return}if(!((zn(ie,"beforeChange")||ie.cm&&zn(ie.cm,"beforeChange"))&&(ae=Hl(ie,ae,!0),!ae))){var fe=Ur&&!ge&&$o(ie,ae.from,ae.to);if(fe)for(var ye=fe.length-1;ye>=0;--ye)zs(ie,{from:fe[ye].from,to:fe[ye].to,text:ye?[""]:ae.text,origin:ae.origin});else zs(ie,ae)}}function zs(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&sn(ae.from,ae.to)==0)){var ge=qs(ie,ae);os(ie,ae,ge,ie.cm?ie.cm.curOp.id:NaN),sc(ie,ae,ge,Br(ie,ae));var fe=[];cl(ie,function(ye,Re){!Re&&_t(fe,ye.history)==-1&&(Ys(ye.history,ae),fe.push(ye.history)),sc(ye,ae,null,Br(ye,ae))})}}function $u(ie,ae,ge){var fe=ie.cm&&ie.cm.state.suppressEdits;if(!(fe&&!ge)){for(var ye=ie.history,Re,Je=ie.sel,mt=ae=="undo"?ye.done:ye.undone,gt=ae=="undo"?ye.undone:ye.done,zt=0;zt<mt.length&&(Re=mt[zt],!(ge?Re.ranges&&!Re.equals(ie.sel):!Re.ranges));zt++);if(zt!=mt.length){for(ye.lastOrigin=ye.lastSelOrigin=null;;)if(Re=mt.pop(),Re.ranges){if(bl(Re,gt),ge&&!Re.equals(ie.sel)){js(ie,Re,{clearRedo:!1});return}Je=Re}else if(fe){mt.push(Re);return}else break;var Mn=[];bl(Je,gt),gt.push({changes:Mn,generation:ye.generation}),ye.generation=Re.generation||++ye.maxGeneration;for(var Vt=zn(ie,"beforeChange")||ie.cm&&zn(ie.cm,"beforeChange"),si=function(dr){var Lr=Re.changes[dr];if(Lr.origin=ae,Vt&&!Hl(ie,Lr,!1))return mt.length=0,{};Mn.push(xs(ie,Lr));var uo=dr?qs(ie,Lr):wt(mt);sc(ie,Lr,uo,dl(ie,Lr)),!dr&&ie.cm&&ie.cm.scrollIntoView({from:Lr.from,to:Es(Lr)});var Ho=[];cl(ie,function(Mo,qo){!qo&&_t(Ho,Mo.history)==-1&&(Ys(Mo.history,Lr),Ho.push(Mo.history)),sc(Mo,Lr,null,dl(Mo,Lr))})},ii=Re.changes.length-1;ii>=0;--ii){var nr=si(ii);if(nr)return nr.v}}}}function Vc(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Pa(jn(ie.sel.ranges,function(ye){return new lo(tn(ye.anchor.line+ae,ye.anchor.ch),tn(ye.head.line+ae,ye.head.ch))}),ie.sel.primIndex),ie.cm)){_i(ie.cm,ie.first,ie.first-ae,ae);for(var ge=ie.cm.display,fe=ge.viewFrom;fe<ge.viewTo;fe++)Ii(ie.cm,fe,"gutter")}}function sc(ie,ae,ge,fe){if(ie.cm&&!ie.cm.curOp)return $n(ie.cm,sc)(ie,ae,ge,fe);if(ae.to.line<ie.first){Vc(ie,ae.text.length-1-(ae.to.line-ae.from.line));return}if(!(ae.from.line>ie.lastLine())){if(ae.from.line<ie.first){var ye=ae.text.length-1-(ie.first-ae.from.line);Vc(ie,ye),ae={from:tn(ie.first,0),to:tn(ae.to.line+ye,ae.to.ch),text:[wt(ae.text)],origin:ae.origin}}var Re=ie.lastLine();ae.to.line>Re&&(ae={from:ae.from,to:tn(Re,nn(ie,Re).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=gn(ie,ae.from,ae.to),ge||(ge=qs(ie,ae)),ie.cm?lc(ie.cm,ae,fe):Ws(ie,ae,fe),Dl(ie,ge,jt),ie.cantEdit&&Iu(ie,tn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function lc(ie,ae,ge){var fe=ie.doc,ye=ie.display,Re=ae.from,Je=ae.to,mt=!1,gt=Re.line;ie.options.lineWrapping||(gt=Et(Jr(nn(fe,Re.line))),fe.iter(gt,Je.line+1,function(ii){if(ii==ye.maxLine)return mt=!0,!0})),fe.sel.contains(ae.from,ae.to)>-1&&pi(ie),Ws(fe,ae,ge,So(ie)),ie.options.lineWrapping||(fe.iter(gt,Re.line+ae.text.length,function(ii){var nr=Ga(ii);nr>ye.maxLineLength&&(ye.maxLine=ii,ye.maxLineLength=nr,ye.maxLineChanged=!0,mt=!1)}),mt&&(ie.curOp.updateMaxLine=!0)),Ir(fe,Re.line),Pi(ie,400);var zt=ae.text.length-(Je.line-Re.line)-1;ae.full?_i(ie):Re.line==Je.line&&ae.text.length==1&&!el(ie.doc,ae)?Ii(ie,Re.line,"text"):_i(ie,Re.line,Je.line+1,zt);var Mn=zn(ie,"changes"),Vt=zn(ie,"change");if(Vt||Mn){var si={from:Re,to:Je,text:ae.text,removed:ae.removed,origin:ae.origin};Vt&&hr(ie,"change",ie,si),Mn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(si)}ie.display.selForContextMenu=null}function Ku(ie,ae,ge,fe,ye){var Re;fe||(fe=ge),sn(fe,ge)<0&&(Re=[fe,ge],ge=Re[0],fe=Re[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),$s(ie,{from:ge,to:fe,text:ae,origin:ye})}function ku(ie,ae,ge,fe){ge<ie.line?ie.line+=fe:ae<ie.line&&(ie.line=ae,ie.ch=0)}function Ss(ie,ae,ge,fe){for(var ye=0;ye<ie.length;++ye){var Re=ie[ye],Je=!0;if(Re.ranges){Re.copied||(Re=ie[ye]=Re.deepCopy(),Re.copied=!0);for(var mt=0;mt<Re.ranges.length;mt++)ku(Re.ranges[mt].anchor,ae,ge,fe),ku(Re.ranges[mt].head,ae,ge,fe);continue}for(var gt=0;gt<Re.changes.length;++gt){var zt=Re.changes[gt];if(ge<zt.from.line)zt.from=tn(zt.from.line+fe,zt.from.ch),zt.to=tn(zt.to.line+fe,zt.to.ch);else if(ae<=zt.to.line){Je=!1;break}}Je||(ie.splice(0,ye+1),ye=0)}}function Ys(ie,ae){var ge=ae.from.line,fe=ae.to.line,ye=ae.text.length-(fe-ge)-1;Ss(ie.done,ge,fe,ye),Ss(ie.undone,ge,fe,ye)}function vl(ie,ae,ge,fe){var ye=ae,Re=ae;return typeof ae=="number"?Re=nn(ie,ki(ie,ae)):ye=Et(ae),ye==null?null:(fe(Re,ye)&&ie.cm&&Ii(ie.cm,ye,ge),Re)}function Xs(ie){this.lines=ie,this.parent=null;for(var ae=0,ge=0;ge<ie.length;++ge)ie[ge].parent=this,ae+=ie[ge].height;this.height=ae}Xs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var ge=ie,fe=ie+ae;ge<fe;++ge){var ye=this.lines[ge];this.height-=ye.height,Qa(ye),hr(ye,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,ge){this.height+=ge,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var fe=0;fe<ae.length;++fe)ae[fe].parent=this},iterN:function(ie,ae,ge){for(var fe=ie+ae;ie<fe;++ie)if(ge(this.lines[ie]))return!0}};function gs(ie){this.children=ie;for(var ae=0,ge=0,fe=0;fe<ie.length;++fe){var ye=ie[fe];ae+=ye.chunkSize(),ge+=ye.height,ye.parent=this}this.size=ae,this.height=ge,this.parent=null}gs.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var ge=0;ge<this.children.length;++ge){var fe=this.children[ge],ye=fe.chunkSize();if(ie<ye){var Re=Math.min(ae,ye-ie),Je=fe.height;if(fe.removeInner(ie,Re),this.height-=Je-fe.height,ye==Re&&(this.children.splice(ge--,1),fe.parent=null),(ae-=Re)==0)break;ie=0}else ie-=ye}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof Xs))){var mt=[];this.collapse(mt),this.children=[new Xs(mt)],this.children[0].parent=this}},collapse:function(ie){for(var ae=0;ae<this.children.length;++ae)this.children[ae].collapse(ie)},insertInner:function(ie,ae,ge){this.size+=ae.length,this.height+=ge;for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],Re=ye.chunkSize();if(ie<=Re){if(ye.insertInner(ie,ae,ge),ye.lines&&ye.lines.length>50){for(var Je=ye.lines.length%25+25,mt=Je;mt<ye.lines.length;){var gt=new Xs(ye.lines.slice(mt,mt+=25));ye.height-=gt.height,this.children.splice(++fe,0,gt),gt.parent=this}ye.lines=ye.lines.slice(0,Je),this.maybeSpill()}break}ie-=Re}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),ge=new gs(ae);if(ie.parent){ie.size-=ge.size,ie.height-=ge.height;var ye=_t(ie.parent.children,ie);ie.parent.children.splice(ye+1,0,ge)}else{var fe=new gs(ie.children);fe.parent=ie,ie.children=[fe,ge],ie=fe}ge.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,ge){for(var fe=0;fe<this.children.length;++fe){var ye=this.children[fe],Re=ye.chunkSize();if(ie<Re){var Je=Math.min(ae,Re-ie);if(ye.iterN(ie,Je,ge))return!0;if((ae-=Je)==0)break;ie=0}else ie-=Re}}};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=Et(ge);if(!(fe==null||!ae)){for(var ye=0;ye<ae.length;++ye)ae[ye]==this&&ae.splice(ye--,1);ae.length||(ge.widgets=null);var Re=zl(this);qn(ge,Math.max(0,ge.height-Re)),ie&&(rn(ie,function(){Su(ie,ge,-Re),Ii(ie,fe,"widget")}),hr(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 ye=zl(this)-ae;ye&&(mi(this.doc,fe)||qn(fe,fe.height+ye),ge&&rn(ge,function(){ge.curOp.forceUpdate=!0,Su(ge,fe,ye),hr(ge,"lineWidgetChanged",ge,ie,Et(fe))}))},Nn(yl);function Su(ie,ae,ge){ao(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Tc(ie,ge)}function xc(ie,ae,ge,fe){var ye=new yl(ie,ge,fe),Re=ie.cm;return Re&&ye.noHScroll&&(Re.display.alignWidgets=!0),vl(ie,ae,"widget",function(Je){var mt=Je.widgets||(Je.widgets=[]);if(ye.insertAt==null?mt.push(ye):mt.splice(Math.min(mt.length-1,Math.max(0,ye.insertAt)),0,ye),ye.line=Je,Re&&!mi(ie,Je)){var gt=ao(Je)<ie.scrollTop;qn(Je,Je.height+zl(ye)),gt&&Tc(Re,ye.height),Re.curOp.forceUpdate=!0}return!0}),Re&&hr(Re,"lineWidgetAdded",Re,ye,typeof ae=="number"?ae:Et(ae)),ye}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&&li(ie),zn(this,"clear")){var ge=this.find();ge&&hr(this,"clear",ge.from,ge.to)}for(var fe=null,ye=null,Re=0;Re<this.lines.length;++Re){var Je=this.lines[Re],mt=Go(Je.markedSpans,this);ie&&!this.collapsed?Ii(ie,Et(Je),"text"):ie&&(mt.to!=null&&(ye=Et(Je)),mt.from!=null&&(fe=Et(Je))),Je.markedSpans=tr(Je.markedSpans,mt),mt.from==null&&this.collapsed&&!mi(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 zt=Jr(this.lines[gt]),Mn=Ga(zt);Mn>ie.display.maxLineLength&&(ie.display.maxLine=zt,ie.display.maxLineLength=Mn,ie.display.maxLineChanged=!0)}fe!=null&&ie&&this.collapsed&&_i(ie,fe,ye+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Gu(ie.doc)),ie&&hr(ie,"markerCleared",ie,this,fe,ye),ae&&mo(ie),this.parent&&this.parent.clear()}},hn.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var ge,fe,ye=0;ye<this.lines.length;++ye){var Re=this.lines[ye],Je=Go(Re.markedSpans,this);if(Je.from!=null&&(ge=tn(ae?Re:Et(Re),Je.from),ie==-1))return ge;if(Je.to!=null&&(fe=tn(ae?Re:Et(Re),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||rn(fe,function(){var ye=ae.line,Re=Et(ae.line),Je=ga(fe,Re);if(Je&&(Vo(Je),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!mi(ge.doc,ye)&&ge.height!=null){var mt=ge.height;ge.height=null;var gt=zl(ge)-mt;gt&&qn(ye,ye.height+gt)}hr(fe,"markerChanged",fe,ie)})},hn.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||_t(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},hn.prototype.detachLine=function(ie){if(this.lines.splice(_t(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},Nn(hn);function sd(ie,ae,ge,fe,ye){if(fe&&fe.shared)return df(ie,ae,ge,fe,ye);if(ie.cm&&!ie.cm.curOp)return $n(ie.cm,sd)(ie,ae,ge,fe,ye);var Re=new hn(ie,ye),Je=sn(ae,ge);if(fe&&At(fe,Re,!1),Je>0||Je==0&&Re.clearWhenEmpty!==!1)return Re;if(Re.replacedWith&&(Re.collapsed=!0,Re.widgetNode=dt("span",[Re.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||Re.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(Re.widgetNode.insertLeft=!0)),Re.collapsed){if(wo(ie,ae.line,ae,ge,Re)||ae.line!=ge.line&&wo(ie,ge.line,ae,ge,Re))throw new Error("Inserting collapsed marker partially overlapping an existing one");Un()}Re.addToHistory&&os(ie,{from:ae,to:ge,origin:"markText"},ie.sel,NaN);var mt=ae.line,gt=ie.cm,zt;if(ie.iter(mt,ge.line+1,function(Vt){gt&&Re.collapsed&&!gt.options.lineWrapping&&Jr(Vt)==gt.display.maxLine&&(zt=!0),Re.collapsed&&mt!=ae.line&&qn(Vt,0),ia(Vt,new Io(Re,mt==ae.line?ae.ch:null,mt==ge.line?ge.ch:null)),++mt}),Re.collapsed&&ie.iter(ae.line,ge.line+1,function(Vt){mi(ie,Vt)&&qn(Vt,0)}),Re.clearOnEnter&&Jt(Re,"beforeCursorEnter",function(){return Re.clear()}),Re.readOnly&&(Xo(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Re.collapsed&&(Re.id=++jd,Re.atomic=!0),gt){if(zt&&(gt.curOp.updateMaxLine=!0),Re.collapsed)_i(gt,ae.line,ge.line+1);else if(Re.className||Re.startStyle||Re.endStyle||Re.css||Re.attributes||Re.title)for(var Mn=ae.line;Mn<=ge.line;Mn++)Ii(gt,Mn,"text");Re.atomic&&Gu(gt.doc),hr(gt,"markerAdded",gt,Re)}return Re}var Bc=function(ie,ae){this.markers=ie,this.primary=ae;for(var ge=0;ge<ie.length;++ge)ie[ge].parent=this};Bc.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();hr(this,"clear")}},Bc.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Nn(Bc);function df(ie,ae,ge,fe,ye){fe=At(fe),fe.shared=!1;var Re=[sd(ie,ae,ge,fe,ye)],Je=Re[0],mt=fe.widgetNode;return cl(ie,function(gt){mt&&(fe.widgetNode=mt.cloneNode(!0)),Re.push(sd(gt,Ni(gt,ae),Ni(gt,ge),fe,ye));for(var zt=0;zt<gt.linked.length;++zt)if(gt.linked[zt].isParent)return;Je=wt(Re)}),new Bc(Re,Je)}function zd(ie){return ie.findMarks(tn(ie.first,0),ie.clipPos(tn(ie.lastLine())),function(ae){return ae.parent})}function Zd(ie,ae){for(var ge=0;ge<ae.length;ge++){var fe=ae[ge],ye=fe.find(),Re=ie.clipPos(ye.from),Je=ie.clipPos(ye.to);if(sn(Re,Je)){var mt=sd(ie,Re,Je,fe.primary,fe.primary.type);fe.markers.push(mt),mt.parent=fe}}}function Rh(ie){for(var ae=function(fe){var ye=ie[fe],Re=[ye.primary.doc];cl(ye.primary.doc,function(gt){return Re.push(gt)});for(var Je=0;Je<ye.markers.length;Je++){var mt=ye.markers[Je];_t(Re,mt.doc)==-1&&(mt.parent=null,ye.markers.splice(Je--,1))}},ge=0;ge<ie.length;ge++)ae(ge)}var Qg=0,Bl=function(ie,ae,ge,fe,ye){if(!(this instanceof Bl))return new Bl(ie,ae,ge,fe,ye);ge==null&&(ge=0),gs.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 Re=tn(ge,0);this.sel=Ua(Re),this.history=new Jo(null),this.id=++Qg,this.modeOption=ae,this.lineSep=fe,this.direction=ye=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Ws(this,{from:Re,to:Re,text:ie}),js(this,Ua(Re),jt)};Bl.prototype=be(gs.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=_n(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Yn(function(ie){var ae=tn(this.first,0),ge=this.first+this.size-1;$s(this,{from:ae,to:tn(ge,nn(this,ge).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&vc(this.cm,0,0),js(this,Ua(ae),jt)}),replaceRange:function(ie,ae,ge,fe){ae=Ni(this,ae),ge=ge?Ni(this,ge):ae,Ku(this,ie,ae,ge,fe)},getRange:function(ie,ae,ge){var fe=gn(this,Ni(this,ie),Ni(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(Xn(this,ie))return nn(this,ie)},getLineNumber:function(ie){return Et(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=nn(this,ie)),Jr(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Ni(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:Yn(function(ie,ae,ge){Gs(this,Ni(this,typeof ie=="number"?tn(ie,ae||0):ie),null,ge)}),setSelection:Yn(function(ie,ae,ge){Gs(this,Ni(this,ie),Ni(this,ae||ie),ge)}),extendSelection:Yn(function(ie,ae,ge){Fs(this,Ni(this,ie),ae&&Ni(this,ae),ge)}),extendSelections:Yn(function(ie,ae){ks(this,zr(this,ie),ae)}),extendSelectionsBy:Yn(function(ie,ae){var ge=jn(this.sel.ranges,ie);ks(this,zr(this,ge),ae)}),setSelections:Yn(function(ie,ae,ge){if(ie.length){for(var fe=[],ye=0;ye<ie.length;ye++)fe[ye]=new lo(Ni(this,ie[ye].anchor),Ni(this,ie[ye].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),js(this,Ta(this.cm,fe,ae),ge)}}),addSelection:Yn(function(ie,ae,ge){var fe=this.sel.ranges.slice(0);fe.push(new lo(Ni(this,ie),Ni(this,ae||ie))),js(this,Ta(this.cm,fe,fe.length-1),ge)}),getSelection:function(ie){for(var ae=this.sel.ranges,ge,fe=0;fe<ae.length;fe++){var ye=gn(this,ae[fe].from(),ae[fe].to());ge=ge?ge.concat(ye):ye}return ie===!1?ge:ge.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],ge=this.sel.ranges,fe=0;fe<ge.length;fe++){var ye=gn(this,ge[fe].from(),ge[fe].to());ie!==!1&&(ye=ye.join(ie||this.lineSeparator())),ae[fe]=ye}return ae},replaceSelection:function(ie,ae,ge){for(var fe=[],ye=0;ye<this.sel.ranges.length;ye++)fe[ye]=ie;this.replaceSelections(fe,ae,ge||"+input")},replaceSelections:Yn(function(ie,ae,ge){for(var fe=[],ye=this.sel,Re=0;Re<ye.ranges.length;Re++){var Je=ye.ranges[Re];fe[Re]={from:Je.from(),to:Je.to(),text:this.splitLines(ie[Re]),origin:ge}}for(var mt=ae&&ae!="end"&&Za(this,fe,ae),gt=fe.length-1;gt>=0;gt--)$s(this,fe[gt]);mt?ns(this,mt):this.cm&&oc(this.cm)}),undo:Yn(function(){$u(this,"undo")}),redo:Yn(function(){$u(this,"redo")}),undoSelection:Yn(function(){$u(this,"undo",!0)}),redoSelection:Yn(function(){$u(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,ge=0,fe=0;fe<ie.done.length;fe++)ie.done[fe].ranges||++ae;for(var ye=0;ye<ie.undone.length;ye++)ie.undone[ye].ranges||++ge;return{undo:ae,redo:ge}},clearHistory:function(){var ie=this;this.history=new Jo(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 Jo(this.history.maxGeneration);ae.done=Fl(ie.done.slice(0),null,!0),ae.undone=Fl(ie.undone.slice(0),null,!0)},setGutterMarker:Yn(function(ie,ae,ge){return vl(this,ie,"gutter",function(fe){var ye=fe.gutterMarkers||(fe.gutterMarkers={});return ye[ae]=ge,!ge&&xe(ye)&&(fe.gutterMarkers=null),!0})}),clearGutter:Yn(function(ie){var ae=this;this.iter(function(ge){ge.gutterMarkers&&ge.gutterMarkers[ie]&&vl(ae,ge,"gutter",function(){return ge.gutterMarkers[ie]=null,xe(ge.gutterMarkers)&&(ge.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!Xn(this,ie)||(ae=ie,ie=nn(this,ie),!ie))return null}else if(ae=Et(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:Yn(function(ie,ae,ge){return vl(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!fe[ye])fe[ye]=ge;else{if(Le(ge).test(fe[ye]))return!1;fe[ye]+=" "+ge}return!0})}),removeLineClass:Yn(function(ie,ae,ge){return vl(this,ie,ae=="gutter"?"gutter":"class",function(fe){var ye=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Re=fe[ye];if(Re)if(ge==null)fe[ye]=null;else{var Je=Re.match(Le(ge));if(!Je)return!1;var mt=Je.index+Je[0].length;fe[ye]=Re.slice(0,Je.index)+(!Je.index||mt==Re.length?"":" ")+Re.slice(mt)||null}else return!1;return!0})}),addLineWidget:Yn(function(ie,ae,ge){return xc(this,ie,ae,ge)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,ge){return sd(this,Ni(this,ie),Ni(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=Ni(this,ie),sd(this,ie,ie,ge,"bookmark")},findMarksAt:function(ie){ie=Ni(this,ie);var ae=[],ge=nn(this,ie.line).markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe){var ye=ge[fe];(ye.from==null||ye.from<=ie.ch)&&(ye.to==null||ye.to>=ie.ch)&&ae.push(ye.marker.parent||ye.marker)}return ae},findMarks:function(ie,ae,ge){ie=Ni(this,ie),ae=Ni(this,ae);var fe=[],ye=ie.line;return this.iter(ie.line,ae.line+1,function(Re){var Je=Re.markedSpans;if(Je)for(var mt=0;mt<Je.length;mt++){var gt=Je[mt];!(gt.to!=null&&ye==ie.line&&ie.ch>=gt.to||gt.from==null&&ye!=ie.line||gt.from!=null&&ye==ae.line&&gt.from>=ae.ch)&&(!ge||ge(gt.marker))&&fe.push(gt.marker.parent||gt.marker)}++ye}),fe},getAllMarks:function(){var ie=[];return this.iter(function(ae){var ge=ae.markedSpans;if(ge)for(var fe=0;fe<ge.length;++fe)ge[fe].from!=null&&ie.push(ge[fe].marker)}),ie},posFromIndex:function(ie){var ae,ge=this.first,fe=this.lineSeparator().length;return this.iter(function(ye){var Re=ye.text.length+fe;if(Re>ie)return ae=ie,!0;ie-=Re,++ge}),Ni(this,tn(ge,ae))},indexFromPos:function(ie){ie=Ni(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(_n(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(_n(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(ye){return fe.push(ye.id)},!0),ie.history=new Jo(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):fr(ie)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Yn(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),!(Qn(ae,ie)||Cn(ae.display,ie))){yi(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 ye=fe.length,Re=Array(ye),Je=0,mt=function(){++Je==ye&&$n(ae,function(){ge=Ni(ae.doc,ge);var ii={from:ge,to:ge,text:ae.doc.splitLines(Re.filter(function(nr){return nr!=null}).join(ae.doc.lineSeparator())),origin:"paste"};$s(ae.doc,ii),ns(ae.doc,Ua(Ni(ae.doc,ge),Ni(ae.doc,Es(ii))))})()},gt=function(ii,nr){if(ae.options.allowDropFileTypes&&_t(ae.options.allowDropFileTypes,ii.type)==-1){mt();return}var dr=new FileReader;dr.onerror=function(){return mt()},dr.onload=function(){var Lr=dr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Lr)){mt();return}Re[nr]=Lr,mt()},dr.readAsText(ii)},zt=0;zt<fe.length;zt++)gt(fe[zt],zt);else{if(ae.state.draggingText&&ae.doc.sel.contains(ge)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var Mn=ie.dataTransfer.getData("Text");if(Mn){var Vt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Vt=ae.listSelections()),Dl(ae.doc,Ua(ge,ge)),Vt)for(var si=0;si<Vt.length;++si)Ku(ae.doc,"",Vt[si].anchor,Vt[si].head,"drag");ae.replaceSelection(Mn,"around","paste"),ae.display.input.focus()}}catch(ii){}}}}function hh(ie,ae){if(We&&(!ie.state.draggingText||+new Date-dh<100)){cr(ae);return}if(!(Qn(ie,ae)||Cn(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!Ft)){var ge=Ye("img",null,null,"position: fixed; left: 0; top: 0;");ge.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",$e&&(ge.width=ge.height=1,ie.display.wrapper.appendChild(ge),ge._top=ge.offsetTop),ae.dataTransfer.setDragImage(ge,0,0),$e&&ge.parentNode.removeChild(ge)}}function hf(ie,ae){var ge=mr(ie,ae);if(ge){var fe=document.createDocumentFragment();pr(ie,ge,fe),ie.display.dragCursor||(ie.display.dragCursor=Ye("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),Xe(ie.display.dragCursor,fe)}}function Hf(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function fh(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),ge=[],fe=0;fe<ae.length;fe++){var ye=ae[fe].CodeMirror;ye&&ge.push(ye)}ge.length&&ge[0].operation(function(){for(var Re=0;Re<ge.length;Re++)ie(ge[Re])})}}var gh=!1;function Vu(){gh||(Wd(),gh=!0)}function Wd(){var ie;Jt(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,fh(ff)},100))}),Jt(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=de?Pu.macDefault:Pu.pcDefault;function Md(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var ge,fe,ye,Re,Je=0;Je<ae.length-1;Je++){var mt=ae[Je];if(/^(cmd|meta|m)$/i.test(mt))Re=!0;else if(/^a(lt)?$/i.test(mt))ge=!0;else if(/^(c|ctrl|control)$/i.test(mt))fe=!0;else if(/^s(hift)?$/i.test(mt))ye=!0;else throw new Error("Unrecognized modifier name: "+mt)}return ge&&(ie="Alt-"+ie),fe&&(ie="Ctrl-"+ie),Re&&(ie="Cmd-"+ie),ye&&(ie="Shift-"+ie),ie}function _h(ie){var ae={};for(var ge in ie)if(ie.hasOwnProperty(ge)){var fe=ie[ge];if(/^(name|fallthrough|(de|at)tach)$/.test(ge))continue;if(fe=="..."){delete ie[ge];continue}for(var ye=jn(ge.split(" "),Md),Re=0;Re<ye.length;Re++){var Je=void 0,mt=void 0;Re==ye.length-1?(mt=ye.join(" "),Je=fe):(mt=ye.slice(0,Re+1).join(" "),Je="...");var gt=ae[mt];if(!gt)ae[mt]=Je;else if(gt!=Je)throw new Error("Inconsistent bindings for "+mt)}delete ie[ge]}for(var zt in ae)ie[zt]=ae[zt];return ie}function Tu(ie,ae,ge,fe){ae=ud(ae);var ye=ae.call?ae.call(ie,fe):ae[ie];if(ye===!1)return"nothing";if(ye==="...")return"multi";if(ye!=null&&ge(ye))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return Tu(ie,ae.fallthrough,ge,fe);for(var Re=0;Re<ae.fallthrough.length;Re++){var Je=Tu(ie,ae.fallthrough[Re],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($e&&ie.keyCode==34&&ie.char)return!1;var ge=Mc[ie.keyCode];return ge==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(ge=ie.code),ph(ge,ie,ae))}function ud(ie){return typeof ie=="string"?Pu[ie]:ie}function lu(ie,ae){for(var ge=ie.doc.sel.ranges,fe=[],ye=0;ye<ge.length;ye++){for(var Re=ae(ge[ye]);fe.length&&sn(Re.from,wt(fe).to)<=0;){var Je=fe.pop();if(sn(Je.from,Re.from)<0){Re.from=Je.from;break}}fe.push(Re)}rn(ie,function(){for(var mt=fe.length-1;mt>=0;mt--)Ku(ie.doc,"",fe[mt].from,fe[mt].to,"+delete");oc(ie)})}function jh(ie,ae,ge){var fe=et(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 tn(ae.line,fe,ge<0?"after":"before")}function hs(ie,ae,ge,fe,ye){if(ie){ae.doc.direction=="rtl"&&(ye=-ye);var Re=xn(ge,ae.doc.direction);if(Re){var Je=ye<0?wt(Re):Re[0],mt=ye<0==(Je.level==1),gt=mt?"after":"before",zt;if(Je.level>0||ae.doc.direction=="rtl"){var Mn=Ko(ae,ge);zt=ye<0?ge.text.length-1:0;var Vt=Ya(ae,Mn,zt).top;zt=it(function(si){return Ya(ae,Mn,si).top==Vt},ye<0==(Je.level==1)?Je.from:Je.to-1,zt),gt=="before"&&(zt=jh(ge,zt,1))}else zt=ye<0?Je.to:Je.from;return new tn(fe,zt,gt)}}return new tn(fe,ye<0?ge.text.length:0,ye<0?"before":"after")}function Js(ie,ae,ge,fe){var ye=xn(ae,ie.doc.direction);if(!ye)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 Re=ft(ye,ge.ch,ge.sticky),Je=ye[Re];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 mt=function(uo,Ho){return jh(ae,uo instanceof tn?uo.ch:uo,Ho)},gt,zt=function(uo){return ie.options.lineWrapping?(gt=gt||Ko(ie,ae),Dn(ie,ae,gt,uo)):{begin:0,end:ae.text.length}},Mn=zt(ge.sticky=="before"?mt(ge,-1):ge.ch);if(ie.doc.direction=="rtl"||Je.level==1){var Vt=Je.level==1==fe<0,si=mt(ge,Vt?1:-1);if(si!=null&&(Vt?si<=Je.to&&si<=Mn.end:si>=Je.from&&si>=Mn.begin)){var ii=Vt?"before":"after";return new tn(ge.line,si,ii)}}var nr=function(uo,Ho,Mo){for(var qo=function(rl,ru){return ru?new tn(ge.line,mt(rl,1),"before"):new tn(ge.line,rl,"after")};uo>=0&&uo<ye.length;uo+=Ho){var _a=ye[uo],Lo=Ho>0==(_a.level!=1),is=Lo?Mo.begin:mt(Mo.end,-1);if(_a.from<=is&&is<_a.to||(is=Lo?_a.from:mt(_a.to,-1),Mo.begin<=is&&is<Mo.end))return qo(is,Lo)}},dr=nr(Re+fe,fe,Mn);if(dr)return dr;var Lr=fe>0?Mn.end:mt(Mn.begin,-1);return Lr!=null&&!(fe>0&&Lr==ae.text.length)&&(dr=nr(fe>0?0:ye.length-1,fe,zt(Lr)),dr)?dr:null}var nu={selectAll:Ns,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),jt)},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:tn(ae.head.line+1,0)}:{from:ae.head,to:tn(ae.head.line,ge)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return lu(ie,function(ae){return{from:tn(ae.from().line,0),to:Ni(ie.doc,tn(ae.to().line+1,0))}})},delLineLeft:function(ie){return lu(ie,function(ae){return{from:tn(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return lu(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return{from:fe,to:ae.from()}})},delWrappedLineRight:function(ie){return lu(ie,function(ae){var ge=ie.charCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div");return{from:ae.from(),to:fe}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(tn(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(tn(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return uc(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return $d(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return cc(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:ge},"div")},ln)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:ge},"div")},ln)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var ge=ie.cursorCoords(ae.head,"div").top+5,fe=ie.coordsChar({left:0,top:ge},"div");return fe.ch<ie.getLine(fe.line).search(/\S/)?$d(ie,ae.head):fe},ln)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ae=[],ge=ie.listSelections(),fe=ie.options.tabSize,ye=0;ye<ge.length;ye++){var Re=ge[ye].from(),Je=qe(ie.getLine(Re.line),Re.ch,fe);ae.push(kn(fe-Je%fe))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return rn(ie,function(){for(var ae=ie.listSelections(),ge=[],fe=0;fe<ae.length;fe++)if(ae[fe].empty()){var ye=ae[fe].head,Re=nn(ie.doc,ye.line).text;if(Re){if(ye.ch==Re.length&&(ye=new tn(ye.line,ye.ch-1)),ye.ch>0)ye=new tn(ye.line,ye.ch+1),ie.replaceRange(Re.charAt(ye.ch-1)+Re.charAt(ye.ch-2),tn(ye.line,ye.ch-2),ye,"+transpose");else if(ye.line>ie.doc.first){var Je=nn(ie.doc,ye.line-1).text;Je&&(ye=new tn(ye.line,1),ie.replaceRange(Re.charAt(0)+ie.doc.lineSeparator()+Je.charAt(Je.length-1),tn(ye.line-1,Je.length-1),ye,"+transpose"))}}ge.push(new lo(ye,ye))}ie.setSelections(ge)})},newlineAndIndent:function(ie){return rn(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=Jr(ge);return fe!=ge&&(ae=Et(fe)),hs(!0,ie,fe,ae,1)}function cc(ie,ae){var ge=nn(ie.doc,ae),fe=ha(ge);return fe!=ge&&(ae=Et(fe)),hs(!0,ie,ge,ae,-1)}function $d(ie,ae){var ge=uc(ie,ae.line),fe=nn(ie.doc,ge.line),ye=xn(fe,ie.doc.direction);if(!ye||ye[0].level==0){var Re=Math.max(ge.ch,fe.text.search(/\S/)),Je=ae.line==ge.line&&ae.ch<=Re&&ae.ch;return tn(ge.line,Je?0:Re,ge.sticky)}return ge}function cd(ie,ae,ge){if(typeof ae=="string"&&(ae=nu[ae],!ae))return!1;ie.display.input.ensurePolled();var fe=ie.display.shift,ye=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),ge&&(ie.display.shift=!1),ye=ae(ie)!=yn}finally{ie.display.shift=fe,ie.state.suppressEdits=!1}return ye}function vh(ie,ae,ge){for(var fe=0;fe<ie.state.keyMaps.length;fe++){var ye=Tu(ae,ie.state.keyMaps[fe],ge,ie);if(ye)return ye}return ie.options.extraKeys&&Tu(ae,ie.options.extraKeys,ge,ie)||Tu(ae,ie.options.keyMap,ge,ie)}var Sc=new Ve;function Yc(ie,ae,ge,fe){var ye=ie.state.keySeq;if(ye){if(Uc(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Sc.set(50,function(){ie.state.keySeq==ye&&(ie.state.keySeq=null,ie.display.input.reset())}),Wf(ie,ye+" "+ae,ge,fe))return!0}return Wf(ie,ae,ge,fe)}function Wf(ie,ae,ge,fe){var ye=vh(ie,ae,fe);return ye=="multi"&&(ie.state.keySeq=ae),ye=="handled"&&hr(ie,"keyHandled",ie,ae,ge),(ye=="handled"||ye=="multi")&&(yi(ge),xa(ie)),!!ye}function Gf(ie,ae){var ge=mh(ae,!0);return ge?ae.shiftKey&&!ie.state.keySeq?Yc(ie,"Shift-"+ge,ae,function(fe){return cd(ie,fe,!0)})||Yc(ie,ge,ae,function(fe){if(typeof fe=="string"?/^go[A-Z]/.test(fe):fe.motion)return cd(ie,fe)}):Yc(ie,ge,ae,function(fe){return cd(ie,fe)}):!1}function $f(ie,ae,ge){return Yc(ie,"'"+ge+"'",ae,function(fe){return cd(ie,fe,!0)})}var Kd=null;function hg(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=at(),!Qn(ae,ie))){We&&Ue<11&&ie.keyCode==27&&(ie.returnValue=!1);var ge=ie.keyCode;ae.display.shift=ge==16||ie.shiftKey;var fe=Gf(ae,ie);$e&&(Kd=fe?ge:null,!fe&&ge==88&&!Ei&&(de?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),le&&!de&&!fe&&ge==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),ge==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&fg(ae)}}function fg(ie){var ae=ie.display.lineDiv;kt(ae,"CodeMirror-crosshair");function ge(fe){(fe.keyCode==18||!fe.altKey)&&(ze(ae,"CodeMirror-crosshair"),Kn(document,"keyup",ge),Kn(document,"mouseover",ge))}Jt(document,"keyup",ge),Jt(document,"mouseover",ge)}function gg(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),Qn(this,ie)}function Xc(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(Cn(ae.display,ie)||Qn(ae,ie)||ie.ctrlKey&&!ie.altKey||de&&ie.metaKey)){var ge=ie.keyCode,fe=ie.charCode;if($e&&ge==Kd){Kd=null,yi(ie);return}if(!($e&&(!ie.which||ie.which<10)&&Gf(ae,ie))){var ye=String.fromCharCode(fe==null?ge:fe);ye!="\b"&&($f(ae,ie,ye)||ae.display.input.onKeyPress(ie))}}}var pg=400,mg=function(ie,ae,ge){this.time=ie,this.pos=ae,this.button=ge};mg.prototype.compare=function(ie,ae,ge){return this.time+pg>ie&&sn(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(!(Qn(ae,ie)||ge.activeTouch&&ge.input.supportsTouch())){if(ge.input.ensurePolled(),ge.shift=ie.shiftKey,Cn(ge,ie)){Me||(ge.scroller.draggable=!1,setTimeout(function(){return ge.scroller.draggable=!0},100));return}if(!Kf(ae,ie)){var fe=mr(ae,ie),ye=gi(ie),Re=fe?vg(fe,ye):"single";window.focus(),ye==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(fe&&yg(ae,ye,fe,Re,ie))&&(ye==1?fe?xg(ae,fe,Re,ie):br(ie)==ge.scroller&&yi(ie):ye==2?(fe&&Fs(ae.doc,fe),setTimeout(function(){return ge.input.focus()},20)):ye==3&&(Be?ae.display.input.onContextMenu(ie):Po(ae)))}}}function yg(ie,ae,ge,fe,ye){var Re="Click";return fe=="double"?Re="Double"+Re:fe=="triple"&&(Re="Triple"+Re),Re=(ae==1?"Left":ae==2?"Middle":"Right")+Re,Yc(ie,ph(Re,ye),ye,function(Je){if(typeof Je=="string"&&(Je=nu[Je]),!Je)return!1;var mt=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),mt=Je(ie,ge)!=yn}finally{ie.state.suppressEdits=!1}return mt})}function xh(ie,ae,ge){var fe=ie.getOption("configureMouse"),ye=fe?fe(ie,ae,ge):{};if(ye.unit==null){var Re=se?ge.shiftKey&&ge.metaKey:ge.altKey;ye.unit=Re?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(ye.extend==null||ie.doc.extend)&&(ye.extend=ie.doc.extend||ge.shiftKey),ye.addNew==null&&(ye.addNew=de?ge.metaKey:ge.ctrlKey),ye.moveOnDrag==null&&(ye.moveOnDrag=!(de?ge.altKey:ge.ctrlKey)),ye}function xg(ie,ae,ge,fe){We?setTimeout(Gt($a,ie),0):ie.curOp.focus=at();var ye=xh(ie,ge,fe),Re=ie.doc.sel,Je;ie.options.dragDrop&&di&&!ie.isReadOnly()&&ge=="single"&&(Je=Re.contains(ae))>-1&&(sn((Je=Re.ranges[Je]).from(),ae)<0||ae.xRel>0)&&(sn(Je.to(),ae)>0||ae.xRel<0)?Sg(ie,fe,ae,ye):Hp(ie,fe,ae,ye)}function Sg(ie,ae,ge,fe){var ye=ie.display,Re=!1,Je=$n(ie,function(zt){Me&&(ye.scroller.draggable=!1),ie.state.draggingText=!1,Kn(ye.wrapper.ownerDocument,"mouseup",Je),Kn(ye.wrapper.ownerDocument,"mousemove",mt),Kn(ye.scroller,"dragstart",gt),Kn(ye.scroller,"drop",Je),Re||(yi(zt),fe.addNew||Fs(ie.doc,ge,null,null,fe.extend),Me&&!Ft||We&&Ue==9?setTimeout(function(){ye.wrapper.ownerDocument.body.focus({preventScroll:!0}),ye.input.focus()},20):ye.input.focus())}),mt=function(zt){Re=Re||Math.abs(ae.clientX-zt.clientX)+Math.abs(ae.clientY-zt.clientY)>=10},gt=function(){return Re=!0};Me&&(ye.scroller.draggable=!0),ie.state.draggingText=Je,Je.copy=!fe.moveOnDrag,ye.scroller.dragDrop&&ye.scroller.dragDrop(),Jt(ye.wrapper.ownerDocument,"mouseup",Je),Jt(ye.wrapper.ownerDocument,"mousemove",mt),Jt(ye.scroller,"dragstart",gt),Jt(ye.scroller,"drop",Je),Po(ie),setTimeout(function(){return ye.input.focus()},20)}function Pg(ie,ae,ge){if(ge=="char")return new lo(ae,ae);if(ge=="word")return ie.findWordAt(ae);if(ge=="line")return new lo(tn(ae.line,0),Ni(ie.doc,tn(ae.line+1,0)));var fe=ge(ie,ae);return new lo(fe.from,fe.to)}function Hp(ie,ae,ge,fe){var ye=ie.display,Re=ie.doc;yi(ae);var Je,mt,gt=Re.sel,zt=gt.ranges;if(fe.addNew&&!fe.extend?(mt=Re.sel.contains(ge),mt>-1?Je=zt[mt]:Je=new lo(ge,ge)):(Je=Re.sel.primary(),mt=Re.sel.primIndex),fe.unit=="rectangle")fe.addNew||(Je=new lo(ge,ge)),ge=mr(ie,ae,!0,!0),mt=-1;else{var Mn=Pg(ie,ge,fe.unit);fe.extend?Je=_c(Je,Mn.anchor,Mn.head,fe.extend):Je=Mn}fe.addNew?mt==-1?(mt=zt.length,js(Re,Ta(ie,zt.concat([Je]),mt),{scroll:!1,origin:"*mouse"})):zt.length>1&&zt[mt].empty()&&fe.unit=="char"&&!fe.extend?(js(Re,Ta(ie,zt.slice(0,mt).concat(zt.slice(mt+1)),0),{scroll:!1,origin:"*mouse"}),gt=Re.sel):Bs(Re,mt,Je,en):(mt=0,js(Re,new Pa([Je],0),en),gt=Re.sel);var Vt=ge;function si(Mo){if(sn(Vt,Mo)!=0)if(Vt=Mo,fe.unit=="rectangle"){for(var qo=[],_a=ie.options.tabSize,Lo=qe(nn(Re,ge.line).text,ge.ch,_a),is=qe(nn(Re,Mo.line).text,Mo.ch,_a),rl=Math.min(Lo,is),ru=Math.max(Lo,is),xl=Math.min(ge.line,Mo.line),Uu=Math.min(ie.lastLine(),Math.max(ge.line,Mo.line));xl<=Uu;xl++){var wu=nn(Re,xl).text,Xl=Wn(wu,rl,_a);rl==ru?qo.push(new lo(tn(xl,Xl),tn(xl,Xl))):wu.length>Xl&&qo.push(new lo(tn(xl,Xl),tn(xl,Wn(wu,ru,_a))))}qo.length||qo.push(new lo(ge,ge)),js(Re,Ta(ie,gt.ranges.slice(0,mt).concat(qo),mt),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(Mo)}else{var Yu=Je,hu=Pg(ie,Mo,fe.unit),Jl=Yu.anchor,Ds;sn(hu.anchor,Jl)>0?(Ds=hu.head,Jl=Si(Yu.from(),hu.anchor)):(Ds=hu.anchor,Jl=Ai(Yu.to(),hu.head));var Sl=gt.ranges.slice(0);Sl[mt]=qg(ie,new lo(Ni(Re,Jl),Ds)),js(Re,Ta(ie,Sl,mt),en)}}var ii=ye.wrapper.getBoundingClientRect(),nr=0;function dr(Mo){var qo=++nr,_a=mr(ie,Mo,!0,fe.unit=="rectangle");if(_a)if(sn(_a,Vt)!=0){ie.curOp.focus=at(),si(_a);var Lo=jo(ye,Re);(_a.line>=Lo.to||_a.line<Lo.from)&&setTimeout($n(ie,function(){nr==qo&&dr(Mo)}),150)}else{var is=Mo.clientY<ii.top?-20:Mo.clientY>ii.bottom?20:0;is&&setTimeout($n(ie,function(){nr==qo&&(ye.scroller.scrollTop+=is,dr(Mo))}),50)}}function Lr(Mo){ie.state.selectingText=!1,nr=1/0,Mo&&(yi(Mo),ye.input.focus()),Kn(ye.wrapper.ownerDocument,"mousemove",uo),Kn(ye.wrapper.ownerDocument,"mouseup",Ho),Re.history.lastSelOrigin=null}var uo=$n(ie,function(Mo){Mo.buttons===0||!gi(Mo)?Lr(Mo):dr(Mo)}),Ho=$n(ie,Lr);ie.state.selectingText=Ho,Jt(ye.wrapper.ownerDocument,"mousemove",uo),Jt(ye.wrapper.ownerDocument,"mouseup",Ho)}function qg(ie,ae){var ge=ae.anchor,fe=ae.head,ye=nn(ie.doc,ge.line);if(sn(ge,fe)==0&&ge.sticky==fe.sticky)return ae;var Re=xn(ye);if(!Re)return ae;var Je=ft(Re,ge.ch,ge.sticky),mt=Re[Je];if(mt.from!=ge.ch&&mt.to!=ge.ch)return ae;var gt=Je+(mt.from==ge.ch==(mt.level!=1)?0:1);if(gt==0||gt==Re.length)return ae;var zt;if(fe.line!=ge.line)zt=(fe.line-ge.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var Mn=ft(Re,fe.ch,fe.sticky),Vt=Mn-Je||(fe.ch-ge.ch)*(mt.level==1?-1:1);Mn==gt-1||Mn==gt?zt=Vt<0:zt=Vt>0}var si=Re[gt+(zt?-1:0)],ii=zt==(si.level==1),nr=ii?si.from:si.to,dr=ii?"after":"before";return ge.ch==nr&&ge.sticky==dr?ae:new lo(new tn(ge.line,nr,dr),fe)}function Vd(ie,ae,ge,fe){var ye,Re;if(ae.touches)ye=ae.touches[0].clientX,Re=ae.touches[0].clientY;else try{ye=ae.clientX,Re=ae.clientY}catch(si){return!1}if(ye>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;fe&&yi(ae);var Je=ie.display,mt=Je.lineDiv.getBoundingClientRect();if(Re>mt.bottom||!zn(ie,ge))return Hi(ae);Re-=mt.top-Je.viewOffset;for(var gt=0;gt<ie.display.gutterSpecs.length;++gt){var zt=Je.gutters.childNodes[gt];if(zt&&zt.getBoundingClientRect().right>=ye){var Mn=Pn(ie.doc,Re),Vt=ie.display.gutterSpecs[gt];return dn(ie,ge,ie,Mn,Vt.className,ae),Hi(ae)}}}function Kf(ie,ae){return Vd(ie,ae,"gutterClick",!0)}function gf(ie,ae){Cn(ie.display,ae)||ep(ie,ae)||Qn(ie,ae,"contextmenu")||Be||ie.display.input.onContextMenu(ae)}function ep(ie,ae){return zn(ie,"gutterContextMenu")?Vd(ie,ae,"gutterContextMenu",!1):!1}function Vf(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ya(ie)}var Sh={toString:function(){return"CodeMirror.Init"}},wg={},Ph={};function tp(ie){var ae=ie.optionHandlers;function ge(fe,ye,Re,Je){ie.defaults[fe]=ye,Re&&(ae[fe]=Je?function(mt,gt,zt){zt!=Sh&&Re(mt,gt,zt)}:Re)}ie.defineOption=ge,ie.Init=Sh,ge("value","",function(fe,ye){return fe.setValue(ye)},!0),ge("mode",null,function(fe,ye){fe.doc.modeOption=ye,sa(fe)},!0),ge("indentUnit",2,sa,!0),ge("indentWithTabs",!1),ge("smartIndent",!0),ge("tabSize",4,function(fe){ds(fe),ya(fe),_i(fe)},!0),ge("lineSeparator",null,function(fe,ye){if(fe.doc.lineSep=ye,!!ye){var Re=[],Je=fe.doc.first;fe.doc.iter(function(gt){for(var zt=0;;){var Mn=gt.text.indexOf(ye,zt);if(Mn==-1)break;zt=Mn+ye.length,Re.push(tn(Je,Mn))}Je++});for(var mt=Re.length-1;mt>=0;mt--)Ku(fe.doc,ye,Re[mt],tn(Re[mt].line,Re[mt].ch+ye.length))}}),ge("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,ye,Re){fe.state.specialChars=new RegExp(ye.source+(ye.test(" ")?"":"| "),"g"),Re!=Sh&&fe.refresh()}),ge("specialCharPlaceholder",ys,function(fe){return fe.refresh()},!0),ge("electricChars",!0),ge("inputStyle",ee?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ge("spellcheck",!1,function(fe,ye){return fe.getInputField().spellcheck=ye},!0),ge("autocorrect",!1,function(fe,ye){return fe.getInputField().autocorrect=ye},!0),ge("autocapitalize",!1,function(fe,ye){return fe.getInputField().autocapitalize=ye},!0),ge("rtlMoveVisually",!he),ge("wholeLineUpdateBefore",!0),ge("theme","default",function(fe){Vf(fe),ho(fe)},!0),ge("keyMap","default",function(fe,ye,Re){var Je=ud(ye),mt=Re!=Sh&&ud(Re);mt&&mt.detach&&mt.detach(fe,Je),Je.attach&&Je.attach(fe,mt||null)}),ge("extraKeys",null),ge("configureMouse",null),ge("lineWrapping",!1,np,!0),ge("gutters",[],function(fe,ye){fe.display.gutterSpecs=Wo(ye,fe.options.lineNumbers),ho(fe)},!0),ge("fixedGutter",!0,function(fe,ye){fe.display.gutters.style.left=ye?to(fe.display)+"px":"0",fe.refresh()},!0),ge("coverGutterNextToScrollbar",!1,function(fe){return yc(fe)},!0),ge("scrollbarStyle","native",function(fe){Fd(fe),yc(fe),fe.display.scrollbars.setScrollTop(fe.doc.scrollTop),fe.display.scrollbars.setScrollLeft(fe.doc.scrollLeft)},!0),ge("lineNumbers",!1,function(fe,ye){fe.display.gutterSpecs=Wo(fe.options.gutters,ye),ho(fe)},!0),ge("firstLineNumber",1,ho,!0),ge("lineNumberFormatter",function(fe){return fe},ho,!0),ge("showCursorWhenSelecting",!1,Tr,!0),ge("resetSelectionOnContextMenu",!0),ge("lineWiseCopyCut",!0),ge("pasteLinesPerSelection",!0),ge("selectionsMayTouch",!1),ge("readOnly",!1,function(fe,ye){ye=="nocursor"&&(El(fe),fe.display.input.blur()),fe.display.input.readOnlyChanged(ye)}),ge("screenReaderLabel",null,function(fe,ye){ye=ye===""?null:ye,fe.display.input.screenReaderLabelChanged(ye)}),ge("disableInput",!1,function(fe,ye){ye||fe.display.input.reset()},!0),ge("dragDrop",!0,Uf),ge("allowDropFileTypes",null),ge("cursorBlinkRate",530),ge("cursorScrollMargin",0),ge("cursorHeight",1,Tr,!0),ge("singleCursorHeightPerLine",!0,Tr,!0),ge("workTime",100),ge("workDelay",100),ge("flattenSpans",!0,ds,!0),ge("addModeClass",!1,ds,!0),ge("pollInterval",100),ge("undoDepth",200,function(fe,ye){return fe.doc.history.undoDepth=ye}),ge("historyEventDelay",1250),ge("viewportMargin",10,function(fe){return fe.refresh()},!0),ge("maxHighlightLength",1e4,ds,!0),ge("moveInputWithCursor",!0,function(fe,ye){ye||fe.display.input.resetPosition()}),ge("tabindex",null,function(fe,ye){return fe.display.input.getField().tabIndex=ye||""}),ge("autofocus",null),ge("direction","ltr",function(fe,ye){return fe.doc.setDirection(ye)},!0),ge("phrases",null)}function Uf(ie,ae,ge){var fe=ge&&ge!=Sh;if(!ae!=!fe){var ye=ie.display.dragFunctions,Re=ae?Jt:Kn;Re(ie.display.scroller,"dragstart",ye.start),Re(ie.display.scroller,"dragenter",ye.enter),Re(ie.display.scroller,"dragover",ye.over),Re(ie.display.scroller,"dragleave",ye.leave),Re(ie.display.scroller,"drop",ye.drop)}}function np(ie){ie.options.lineWrapping?(kt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(ze(ie.display.wrapper,"CodeMirror-wrap"),Ca(ie)),gr(ie),_i(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?At(ae):{},At(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 ye=new As.inputStyles[ae.inputStyle](this),Re=this.display=new ko(ie,fe,ye,ae);Re.wrapper.CodeMirror=this,Vf(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Fd(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Ve,keySeq:null,specialChars:null},ae.autofocus&&!ee&&Re.input.focus(),We&&Ue<11&&setTimeout(function(){return ge.display.input.reset(!0)},20),Zh(this),Vu(),li(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);so(this),ae.finishInit&&ae.finishInit(this);for(var mt=0;mt<Ud.length;++mt)Ud[mt](this);mo(this),Me&&ae.lineWrapping&&getComputedStyle(Re.lineDiv).textRendering=="optimizelegibility"&&(Re.lineDiv.style.textRendering="auto")}As.defaults=wg,As.optionHandlers=Ph;function Zh(ie){var ae=ie.display;Jt(ae.scroller,"mousedown",$n(ie,Jc)),We&&Ue<11?Jt(ae.scroller,"dblclick",$n(ie,function(gt){if(!Qn(ie,gt)){var zt=mr(ie,gt);if(!(!zt||Kf(ie,gt)||Cn(ie.display,gt))){yi(gt);var Mn=ie.findWordAt(zt);Fs(ie.doc,Mn.anchor,Mn.head)}}})):Jt(ae.scroller,"dblclick",function(gt){return Qn(ie,gt)||yi(gt)}),Jt(ae.scroller,"contextmenu",function(gt){return gf(ie,gt)}),Jt(ae.input.getField(),"contextmenu",function(gt){ae.scroller.contains(gt.target)||gf(ie,gt)});var ge,fe={end:0};function ye(){ae.activeTouch&&(ge=setTimeout(function(){return ae.activeTouch=null},1e3),fe=ae.activeTouch,fe.end=+new Date)}function Re(gt){if(gt.touches.length!=1)return!1;var zt=gt.touches[0];return zt.radiusX<=1&&zt.radiusY<=1}function Je(gt,zt){if(zt.left==null)return!0;var Mn=zt.left-gt.left,Vt=zt.top-gt.top;return Mn*Mn+Vt*Vt>20*20}Jt(ae.scroller,"touchstart",function(gt){if(!Qn(ie,gt)&&!Re(gt)&&!Kf(ie,gt)){ae.input.ensurePolled(),clearTimeout(ge);var zt=+new Date;ae.activeTouch={start:zt,moved:!1,prev:zt-fe.end<=300?fe:null},gt.touches.length==1&&(ae.activeTouch.left=gt.touches[0].pageX,ae.activeTouch.top=gt.touches[0].pageY)}}),Jt(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),Jt(ae.scroller,"touchend",function(gt){var zt=ae.activeTouch;if(zt&&!Cn(ae,gt)&&zt.left!=null&&!zt.moved&&new Date-zt.start<300){var Mn=ie.coordsChar(ae.activeTouch,"page"),Vt;!zt.prev||Je(zt,zt.prev)?Vt=new lo(Mn,Mn):!zt.prev.prev||Je(zt,zt.prev.prev)?Vt=ie.findWordAt(Mn):Vt=new lo(tn(Mn.line,0),Ni(ie.doc,tn(Mn.line+1,0))),ie.setSelection(Vt.anchor,Vt.head),ie.focus(),yi(gt)}ye()}),Jt(ae.scroller,"touchcancel",ye),Jt(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(ac(ie,ae.scroller.scrollTop),au(ie,ae.scroller.scrollLeft,!0),dn(ie,"scroll",ie))}),Jt(ae.scroller,"mousewheel",function(gt){return Sa(ie,gt)}),Jt(ae.scroller,"DOMMouseScroll",function(gt){return Sa(ie,gt)}),Jt(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(gt){Qn(ie,gt)||cr(gt)},over:function(gt){Qn(ie,gt)||(hf(ie,gt),cr(gt))},start:function(gt){return hh(ie,gt)},drop:$n(ie,Hd),leave:function(gt){Qn(ie,gt)||Hf(ie)}};var mt=ae.input.getField();Jt(mt,"keyup",function(gt){return gg.call(ie,gt)}),Jt(mt,"keydown",$n(ie,hg)),Jt(mt,"keypress",$n(ie,Xc)),Jt(mt,"focus",function(gt){return Oa(ie,gt)}),Jt(mt,"blur",function(gt){return El(ie,gt)})}var Ud=[];As.defineInitHook=function(ie){return Ud.push(ie)};function iu(ie,ae,ge,fe){var ye=ie.doc,Re;ge==null&&(ge="add"),ge=="smart"&&(ye.mode.indent?Re=Fr(ie,ae).state:ge="prev");var Je=ie.options.tabSize,mt=nn(ye,ae),gt=qe(mt.text,null,Je);mt.stateAfter&&(mt.stateAfter=null);var zt=mt.text.match(/^\s*/)[0],Mn;if(!fe&&!/\S/.test(mt.text))Mn=0,ge="not";else if(ge=="smart"&&(Mn=ye.mode.indent(Re,mt.text.slice(zt.length),mt.text),Mn==yn||Mn>150)){if(!fe)return;ge="prev"}ge=="prev"?ae>ye.first?Mn=qe(nn(ye,ae-1).text,null,Je):Mn=0:ge=="add"?Mn=gt+ie.options.indentUnit:ge=="subtract"?Mn=gt-ie.options.indentUnit:typeof ge=="number"&&(Mn=gt+ge),Mn=Math.max(0,Mn);var Vt="",si=0;if(ie.options.indentWithTabs)for(var ii=Math.floor(Mn/Je);ii;--ii)si+=Je,Vt+=" ";if(si<Mn&&(Vt+=kn(Mn-si)),Vt!=zt)return Ku(ye,Vt,tn(ae,0),tn(ae,zt.length),"+input"),mt.stateAfter=null,!0;for(var nr=0;nr<ye.sel.ranges.length;nr++){var dr=ye.sel.ranges[nr];if(dr.head.line==ae&&dr.head.ch<zt.length){var Lr=tn(ae,zt.length);Bs(ye,nr,new lo(Lr,Lr));break}}}var Ru=null;function Hh(ie){Ru=ie}function wh(ie,ae,ge,fe,ye){var Re=ie.doc;ie.display.shift=!1,fe||(fe=Re.sel);var Je=+new Date-200,mt=ye=="paste"||ie.state.pasteIncoming>Je,gt=fr(ae),zt=null;if(mt&&fe.ranges.length>1)if(Ru&&Ru.text.join(`
`)==ae){if(fe.ranges.length%Ru.text.length==0){zt=[];for(var Mn=0;Mn<Ru.text.length;Mn++)zt.push(Re.splitLines(Ru.text[Mn]))}}else gt.length==fe.ranges.length&&ie.options.pasteLinesPerSelection&&(zt=jn(gt,function(uo){return[uo]}));for(var Vt=ie.curOp.updateInput,si=fe.ranges.length-1;si>=0;si--){var ii=fe.ranges[si],nr=ii.from(),dr=ii.to();ii.empty()&&(ge&&ge>0?nr=tn(nr.line,nr.ch-ge):ie.state.overwrite&&!mt?dr=tn(dr.line,Math.min(nn(Re,dr.line).text.length,dr.ch+wt(gt).length)):mt&&Ru&&Ru.lineWise&&Ru.text.join(`
`)==gt.join(`
`)&&(nr=dr=tn(nr.line,0)));var Lr={from:nr,to:dr,text:zt?zt[si%zt.length]:gt,origin:ye||(mt?"paste":ie.state.cutIncoming>Je?"cut":"+input")};$s(ie.doc,Lr),hr(ie,"inputRead",ie,Lr)}ae&&!mt&&Eg(ie,ae),oc(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Vt),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&&rn(ae,function(){return wh(ae,ge,0,null,"paste")}),!0}function Eg(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var ge=ie.doc.sel,fe=ge.ranges.length-1;fe>=0;fe--){var ye=ge.ranges[fe];if(!(ye.head.ch>100||fe&&ge.ranges[fe-1].head.line==ye.head.line)){var Re=ie.getModeAt(ye.head),Je=!1;if(Re.electricChars){for(var mt=0;mt<Re.electricChars.length;mt++)if(ae.indexOf(Re.electricChars.charAt(mt))>-1){Je=iu(ie,ye.head.line,"smart");break}}else Re.electricInput&&Re.electricInput.test(nn(ie.doc,ye.head.line).text.slice(0,ye.head.ch))&&(Je=iu(ie,ye.head.line,"smart"));Je&&hr(ie,"electricInput",ie,ye.head.line)}}}function bg(ie){for(var ae=[],ge=[],fe=0;fe<ie.doc.sel.ranges.length;fe++){var ye=ie.doc.sel.ranges[fe].head.line,Re={anchor:tn(ye,0),head:tn(ye+1,0)};ge.push(Re),ae.push(ie.getRange(Re.anchor,Re.head))}return{text:ae,ranges:ge}}function Fg(ie,ae,ge,fe){ie.setAttribute("autocorrect",ge?"":"off"),ie.setAttribute("autocapitalize",fe?"":"off"),ie.setAttribute("spellcheck",!!ae)}function Bg(){var ie=Ye("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=Ye("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Me?ie.style.width="1000px":ie.setAttribute("wrap","off"),Oe&&(ie.style.border="1px solid black"),Fg(ie),ae}function Yd(ie){var ae=ie.optionHandlers,ge=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(fe,ye){var Re=this.options,Je=Re[fe];Re[fe]==ye&&fe!="mode"||(Re[fe]=ye,ae.hasOwnProperty(fe)&&$n(this,ae[fe])(this,ye,Je),dn(this,"optionChange",this,fe))},getOption:function(fe){return this.options[fe]},getDoc:function(){return this.doc},addKeyMap:function(fe,ye){this.state.keyMaps[ye?"push":"unshift"](ud(fe))},removeKeyMap:function(fe){for(var ye=this.state.keyMaps,Re=0;Re<ye.length;++Re)if(ye[Re]==fe||ye[Re].name==fe)return ye.splice(Re,1),!0},addOverlay:Rn(function(fe,ye){var Re=fe.token?fe:ie.getMode(this.options,fe);if(Re.startState)throw new Error("Overlays may not be stateful.");ci(this.state.overlays,{mode:Re,modeSpec:fe,opaque:ye&&ye.opaque,priority:ye&&ye.priority||0},function(Je){return Je.priority}),this.state.modeGen++,_i(this)}),removeOverlay:Rn(function(fe){for(var ye=this.state.overlays,Re=0;Re<ye.length;++Re){var Je=ye[Re].modeSpec;if(Je==fe||typeof fe=="string"&&Je.name==fe){ye.splice(Re,1),this.state.modeGen++,_i(this);return}}}),indentLine:Rn(function(fe,ye,Re){typeof ye!="string"&&typeof ye!="number"&&(ye==null?ye=this.options.smartIndent?"smart":"prev":ye=ye?"add":"subtract"),Xn(this.doc,fe)&&iu(this,fe,ye,Re)}),indentSelection:Rn(function(fe){for(var ye=this.doc.sel.ranges,Re=-1,Je=0;Je<ye.length;Je++){var mt=ye[Je];if(mt.empty())mt.head.line>Re&&(iu(this,mt.head.line,fe,!0),Re=mt.head.line,Je==this.doc.sel.primIndex&&oc(this));else{var gt=mt.from(),zt=mt.to(),Mn=Math.max(Re,gt.line);Re=Math.min(this.lastLine(),zt.line-(zt.ch?0:1))+1;for(var Vt=Mn;Vt<Re;++Vt)iu(this,Vt,fe);var si=this.doc.sel.ranges;gt.ch==0&&ye.length==si.length&&si[Je].from().ch>0&&Bs(this.doc,Je,new lo(gt,si[Je].to()),jt)}}}),getTokenAt:function(fe,ye){return er(this,fe,ye)},getLineTokens:function(fe,ye){return er(this,tn(fe),ye,!0)},getTokenTypeAt:function(fe){fe=Ni(this.doc,fe);var ye=Yr(this,nn(this.doc,fe.line)),Re=0,Je=(ye.length-1)/2,mt=fe.ch,gt;if(mt==0)gt=ye[2];else for(;;){var zt=Re+Je>>1;if((zt?ye[zt*2-1]:0)>=mt)Je=zt;else if(ye[zt*2+1]<mt)Re=zt+1;else{gt=ye[zt*2+2];break}}var Mn=gt?gt.indexOf("overlay "):-1;return Mn<0?gt:Mn==0?null:gt.slice(0,Mn-1)},getModeAt:function(fe){var ye=this.doc.mode;return ye.innerMode?ie.innerMode(ye,this.getTokenAt(fe).state).mode:ye},getHelper:function(fe,ye){return this.getHelpers(fe,ye)[0]},getHelpers:function(fe,ye){var Re=[];if(!ge.hasOwnProperty(ye))return Re;var Je=ge[ye],mt=this.getModeAt(fe);if(typeof mt[ye]=="string")Je[mt[ye]]&&Re.push(Je[mt[ye]]);else if(mt[ye])for(var gt=0;gt<mt[ye].length;gt++){var zt=Je[mt[ye][gt]];zt&&Re.push(zt)}else mt.helperType&&Je[mt.helperType]?Re.push(Je[mt.helperType]):Je[mt.name]&&Re.push(Je[mt.name]);for(var Mn=0;Mn<Je._global.length;Mn++){var Vt=Je._global[Mn];Vt.pred(mt,this)&&_t(Re,Vt.val)==-1&&Re.push(Vt.val)}return Re},getStateAfter:function(fe,ye){var Re=this.doc;return fe=ki(Re,fe==null?Re.first+Re.size-1:fe),Fr(this,fe+1,ye).state},cursorCoords:function(fe,ye){var Re,Je=this.doc.sel.primary();return fe==null?Re=Je.head:typeof fe=="object"?Re=Ni(this.doc,fe):Re=fe?Je.from():Je.to(),La(this,Re,ye||"page")},charCoords:function(fe,ye){return Wa(this,Ni(this.doc,fe),ye||"page")},coordsChar:function(fe,ye){return fe=Aa(this,fe,ye||"page"),Qt(this,fe.left,fe.top)},lineAtHeight:function(fe,ye){return fe=Aa(this,{top:fe,left:0},ye||"page").top,Pn(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,ye,Re){var Je=!1,mt;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),mt=nn(this.doc,fe)}else mt=fe;return Or(this,mt,{top:0,left:0},ye||"page",Re||Je).top+(Je?this.doc.height-ao(mt):0)},defaultTextHeight:function(){return lr(this.display)},defaultCharWidth:function(){return Bi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fe,ye,Re,Je,mt){var gt=this.display;fe=La(this,Ni(this.doc,fe));var zt=fe.bottom,Mn=fe.left;if(ye.style.position="absolute",ye.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(ye),gt.sizer.appendChild(ye),Je=="over")zt=fe.top;else if(Je=="above"||Je=="near"){var Vt=Math.max(gt.wrapper.clientHeight,this.doc.height),si=Math.max(gt.sizer.clientWidth,gt.lineSpace.clientWidth);(Je=="above"||fe.bottom+ye.offsetHeight>Vt)&&fe.top>ye.offsetHeight?zt=fe.top-ye.offsetHeight:fe.bottom+ye.offsetHeight<=Vt&&(zt=fe.bottom),Mn+ye.offsetWidth>si&&(Mn=si-ye.offsetWidth)}ye.style.top=zt+"px",ye.style.left=ye.style.right="",mt=="right"?(Mn=gt.sizer.clientWidth-ye.offsetWidth,ye.style.right="0px"):(mt=="left"?Mn=0:mt=="middle"&&(Mn=(gt.sizer.clientWidth-ye.offsetWidth)/2),ye.style.left=Mn+"px"),Re&&rc(this,{left:Mn,top:zt,right:Mn+ye.offsetWidth,bottom:zt+ye.offsetHeight})},triggerOnKeyDown:Rn(hg),triggerOnKeyPress:Rn(Xc),triggerOnKeyUp:gg,triggerOnMouseDown:Rn(Jc),execCommand:function(fe){if(nu.hasOwnProperty(fe))return nu[fe].call(null,this)},triggerElectric:Rn(function(fe){Eg(this,fe)}),findPosH:function(fe,ye,Re,Je){var mt=1;ye<0&&(mt=-1,ye=-ye);for(var gt=Ni(this.doc,fe),zt=0;zt<ye&&(gt=pf(this.doc,gt,mt,Re,Je),!gt.hitSide);++zt);return gt},moveH:Rn(function(fe,ye){var Re=this;this.extendSelectionsBy(function(Je){return Re.display.shift||Re.doc.extend||Je.empty()?pf(Re.doc,Je.head,fe,ye,Re.options.rtlMoveVisually):fe<0?Je.from():Je.to()},ln)}),deleteH:Rn(function(fe,ye){var Re=this.doc.sel,Je=this.doc;Re.somethingSelected()?Je.replaceSelection("",null,"+delete"):lu(this,function(mt){var gt=pf(Je,mt.head,fe,ye,!1);return fe<0?{from:gt,to:mt.head}:{from:mt.head,to:gt}})}),findPosV:function(fe,ye,Re,Je){var mt=1,gt=Je;ye<0&&(mt=-1,ye=-ye);for(var zt=Ni(this.doc,fe),Mn=0;Mn<ye;++Mn){var Vt=La(this,zt,"div");if(gt==null?gt=Vt.left:Vt.left=gt,zt=Ld(this,Vt,mt,Re),zt.hitSide)break}return zt},moveV:Rn(function(fe,ye){var Re=this,Je=this.doc,mt=[],gt=!this.display.shift&&!Je.extend&&Je.sel.somethingSelected();if(Je.extendSelectionsBy(function(Mn){if(gt)return fe<0?Mn.from():Mn.to();var Vt=La(Re,Mn.head,"div");Mn.goalColumn!=null&&(Vt.left=Mn.goalColumn),mt.push(Vt.left);var si=Ld(Re,Vt,fe,ye);return ye=="page"&&Mn==Je.sel.primary()&&Tc(Re,Wa(Re,si,"div").top-Vt.top),si},ln),mt.length)for(var zt=0;zt<Je.sel.ranges.length;zt++)Je.sel.ranges[zt].goalColumn=mt[zt]}),findWordAt:function(fe){var ye=this.doc,Re=nn(ye,fe.line).text,Je=fe.ch,mt=fe.ch;if(Re){var gt=this.getHelper(fe,"wordChars");(fe.sticky=="before"||mt==Re.length)&&Je?--Je:++mt;for(var zt=Re.charAt(Je),Mn=Ie(zt,gt)?function(Vt){return Ie(Vt,gt)}:/\s/.test(zt)?function(Vt){return/\s/.test(Vt)}:function(Vt){return!/\s/.test(Vt)&&!Ie(Vt)};Je>0&&Mn(Re.charAt(Je-1));)--Je;for(;mt<Re.length&&Mn(Re.charAt(mt));)++mt}return new lo(tn(fe.line,Je),tn(fe.line,mt))},toggleOverwrite:function(fe){fe!=null&&fe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?kt(this.display.cursorDiv,"CodeMirror-overwrite"):ze(this.display.cursorDiv,"CodeMirror-overwrite"),dn(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==at()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Rn(function(fe,ye){vc(this,fe,ye)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-Gi(this)-this.display.barHeight,width:fe.scrollWidth-Gi(this)-this.display.barWidth,clientHeight:Ri(this),clientWidth:Ti(this)}},scrollIntoView:Rn(function(fe,ye){fe==null?(fe={from:this.doc.sel.primary().head,to:null},ye==null&&(ye=this.options.cursorScrollMargin)):typeof fe=="number"?fe={from:tn(fe,0),to:null}:fe.from==null&&(fe={from:fe,to:null}),fe.to||(fe.to=fe.from),fe.margin=ye||0,fe.from.line!=null?rs(this,fe):Rc(this,fe.from,fe.to,fe.margin)}),setSize:Rn(function(fe,ye){var Re=this,Je=function(gt){return typeof gt=="number"||/^\d+$/.test(String(gt))?gt+"px":gt};fe!=null&&(this.display.wrapper.style.width=Je(fe)),ye!=null&&(this.display.wrapper.style.height=Je(ye)),this.options.lineWrapping&&ma(this);var mt=this.display.viewFrom;this.doc.iter(mt,this.display.viewTo,function(gt){if(gt.widgets){for(var zt=0;zt<gt.widgets.length;zt++)if(gt.widgets[zt].noHScroll){Ii(Re,mt,"widget");break}}++mt}),this.curOp.forceUpdate=!0,dn(this,"refresh",this)}),operation:function(fe){return rn(this,fe)},startOperation:function(){return li(this)},endOperation:function(){return mo(this)},refresh:Rn(function(){var fe=this.display.cachedTextHeight;_i(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)&&gr(this),dn(this,"refresh",this)}),swapDoc:Rn(function(fe){var ye=this.doc;return ye.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,hr(this,"swapDoc",this,ye),ye}),phrase:function(fe){var ye=this.options.phrases;return ye&&Object.prototype.hasOwnProperty.call(ye,fe)?ye[fe]:fe},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Nn(ie),ie.registerHelper=function(fe,ye,Re){ge.hasOwnProperty(fe)||(ge[fe]=ie[fe]={_global:[]}),ge[fe][ye]=Re},ie.registerGlobalHelper=function(fe,ye,Re,Je){ie.registerHelper(fe,ye,Je),ge[fe]._global.push({pred:Re,val:Je})}}function pf(ie,ae,ge,fe,ye){var Re=ae,Je=ge,mt=nn(ie,ae.line),gt=ye&&ie.direction=="rtl"?-ge:ge;function zt(){var Ho=ae.line+gt;return Ho<ie.first||Ho>=ie.first+ie.size?!1:(ae=new tn(Ho,ae.ch,ae.sticky),mt=nn(ie,Ho))}function Mn(Ho){var Mo;if(fe=="codepoint"){var qo=mt.text.charCodeAt(ae.ch+(fe>0?0:-1));isNaN(qo)?Mo=null:Mo=new tn(ae.line,Math.max(0,Math.min(mt.text.length,ae.ch+ge*(qo>=55296&&qo<56320?2:1))),-ge)}else ye?Mo=Js(ie.cm,mt,ae,ge):Mo=Ml(mt,ae,ge);if(Mo==null)if(!Ho&&zt())ae=hs(ye,ie.cm,mt,ae.line,gt);else return!1;else ae=Mo;return!0}if(fe=="char"||fe=="codepoint")Mn();else if(fe=="column")Mn(!0);else if(fe=="word"||fe=="group")for(var Vt=null,si=fe=="group",ii=ie.cm&&ie.cm.getHelper(ae,"wordChars"),nr=!0;!(ge<0&&!Mn(!nr));nr=!1){var dr=mt.text.charAt(ae.ch)||`
`,Lr=Ie(dr,ii)?"w":si&&dr==`
`?"n":!si||/\s/.test(dr)?null:"p";if(si&&!nr&&!Lr&&(Lr="s"),Vt&&Vt!=Lr){ge<0&&(ge=1,Mn(),ae.sticky="after");break}if(Lr&&(Vt=Lr),ge>0&&!Mn(!nr))break}var uo=Iu(ie,ae,Re,Je,!0);return In(Re,uo)&&(uo.hitSide=!0),uo}function Ld(ie,ae,ge,fe){var ye=ie.doc,Re=ae.left,Je;if(fe=="page"){var mt=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),gt=Math.max(mt-.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 zt;zt=Qt(ie,Re,Je),!!zt.outside;){if(ge<0?Je<=0:Je>=ye.height){zt.hitSide=!0;break}Je+=ge*5}return zt}var Ks=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ve,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ks.prototype.init=function(ie){var ae=this,ge=this,fe=ge.cm,ye=ge.div=ie.lineDiv;Fg(ye,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function Re(mt){for(var gt=mt.target;gt;gt=gt.parentNode){if(gt==ye)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(gt.className))break}return!1}Jt(ye,"paste",function(mt){!Re(mt)||Qn(fe,mt)||Cg(mt,fe)||Ue<=11&&setTimeout($n(fe,function(){return ae.updateFromDOM()}),20)}),Jt(ye,"compositionstart",function(mt){ae.composing={data:mt.data,done:!1}}),Jt(ye,"compositionupdate",function(mt){ae.composing||(ae.composing={data:mt.data,done:!1})}),Jt(ye,"compositionend",function(mt){ae.composing&&(mt.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),Jt(ye,"touchstart",function(){return ge.forceCompositionEnd()}),Jt(ye,"input",function(){ae.composing||ae.readFromDOMSoon()});function Je(mt){if(!(!Re(mt)||Qn(fe,mt))){if(fe.somethingSelected())Hh({lineWise:!1,text:fe.getSelections()}),mt.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var gt=bg(fe);Hh({lineWise:!0,text:gt.text}),mt.type=="cut"&&fe.operation(function(){fe.setSelections(gt.ranges,0,jt),fe.replaceSelection("",null,"cut")})}else return;if(mt.clipboardData){mt.clipboardData.clearData();var zt=Ru.text.join(`
`);if(mt.clipboardData.setData("Text",zt),mt.clipboardData.getData("Text")==zt){mt.preventDefault();return}}var Mn=Bg(),Vt=Mn.firstChild;fe.display.lineSpace.insertBefore(Mn,fe.display.lineSpace.firstChild),Vt.value=Ru.text.join(`
`);var si=document.activeElement;Ot(Vt),setTimeout(function(){fe.display.lineSpace.removeChild(Mn),si.focus(),si==ye&&ge.showPrimarySelection()},50)}}Jt(ye,"copy",Je),Jt(ye,"cut",Je)},Ks.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Ks.prototype.prepareSelection=function(){var ie=Rr(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Ks.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Ks.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ks.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,ge=ae.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(ae.display.viewTo==ae.display.viewFrom||fe.line>=ae.display.viewTo||ye.line<ae.display.viewFrom){ie.removeAllRanges();return}var Re=mf(ae,ie.anchorNode,ie.anchorOffset),Je=mf(ae,ie.focusNode,ie.focusOffset);if(!(Re&&!Re.bad&&Je&&!Je.bad&&sn(Si(Re,Je),fe)==0&&sn(Ai(Re,Je),ye)==0)){var mt=ae.display.view,gt=fe.line>=ae.display.viewFrom&&Ch(ae,fe)||{node:mt[0].measure.map[2],offset:0},zt=ye.line<ae.display.viewTo&&Ch(ae,ye);if(!zt){var Mn=mt[mt.length-1].measure,Vt=Mn.maps?Mn.maps[Mn.maps.length-1]:Mn.map;zt={node:Vt[Vt.length-1],offset:Vt[Vt.length-2]-Vt[Vt.length-3]}}if(!gt||!zt){ie.removeAllRanges();return}var si=ie.rangeCount&&ie.getRangeAt(0),ii;try{ii=Ze(gt.node,gt.offset,zt.offset,zt.node)}catch(nr){}ii&&(!le&&ae.state.focused?(ie.collapse(gt.node,gt.offset),ii.collapsed||(ie.removeAllRanges(),ie.addRange(ii))):(ie.removeAllRanges(),ie.addRange(ii)),si&&ie.anchorNode==null?ie.addRange(si):le&&this.startGracePeriod()),this.rememberSelection()}},Ks.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},Ks.prototype.showMultipleSelections=function(ie){Xe(this.cm.display.cursorDiv,ie.cursors),Xe(this.cm.display.selectionDiv,ie.selection)},Ks.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},Ks.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Nt(this.div,ae)},Ks.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ks.prototype.blur=function(){this.div.blur()},Ks.prototype.getField=function(){return this.div},Ks.prototype.supportsTouch=function(){return!0},Ks.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():rn(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ae(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ae))}this.polling.set(this.cm.options.pollInterval,ae)},Ks.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},Ks.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(te&&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&&rn(ae,function(){js(ae.doc,Ua(ge,fe),jt),(ge.bad||fe.bad)&&(ae.curOp.selectionChanged=!0)})}}},Ks.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,ge=ie.doc.sel.primary(),fe=ge.from(),ye=ge.to();if(fe.ch==0&&fe.line>ie.firstLine()&&(fe=tn(fe.line-1,nn(ie.doc,fe.line-1).length)),ye.ch==nn(ie.doc,ye.line).text.length&&ye.line<ie.lastLine()&&(ye=tn(ye.line+1,0)),fe.line<ae.viewFrom||ye.line>ae.viewTo-1)return!1;var Re,Je,mt;fe.line==ae.viewFrom||(Re=yr(ie,fe.line))==0?(Je=Et(ae.view[0].line),mt=ae.view[0].node):(Je=Et(ae.view[Re].line),mt=ae.view[Re-1].node.nextSibling);var gt=yr(ie,ye.line),zt,Mn;if(gt==ae.view.length-1?(zt=ae.viewTo-1,Mn=ae.lineDiv.lastChild):(zt=Et(ae.view[gt+1].line)-1,Mn=ae.view[gt+1].node.previousSibling),!mt)return!1;for(var Vt=ie.doc.splitLines(Eh(ie,mt,Mn,Je,zt)),si=gn(ie.doc,tn(Je,0),tn(zt,nn(ie.doc,zt).text.length));Vt.length>1&&si.length>1;)if(wt(Vt)==wt(si))Vt.pop(),si.pop(),zt--;else if(Vt[0]==si[0])Vt.shift(),si.shift(),Je++;else break;for(var ii=0,nr=0,dr=Vt[0],Lr=si[0],uo=Math.min(dr.length,Lr.length);ii<uo&&dr.charCodeAt(ii)==Lr.charCodeAt(ii);)++ii;for(var Ho=wt(Vt),Mo=wt(si),qo=Math.min(Ho.length-(Vt.length==1?ii:0),Mo.length-(si.length==1?ii:0));nr<qo&&Ho.charCodeAt(Ho.length-nr-1)==Mo.charCodeAt(Mo.length-nr-1);)++nr;if(Vt.length==1&&si.length==1&&Je==fe.line)for(;ii&&ii>fe.ch&&Ho.charCodeAt(Ho.length-nr-1)==Mo.charCodeAt(Mo.length-nr-1);)ii--,nr++;Vt[Vt.length-1]=Ho.slice(0,Ho.length-nr).replace(/^\u200b+/,""),Vt[0]=Vt[0].slice(ii).replace(/\u200b+$/,"");var _a=tn(Je,ii),Lo=tn(zt,si.length?wt(si).length-nr:0);if(Vt.length>1||Vt[0]||sn(_a,Lo))return Ku(ie.doc,Vt,_a,Lo,"+input"),!0},Ks.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ks.prototype.reset=function(){this.forceCompositionEnd()},Ks.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ks.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},Ks.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&rn(this.cm,function(){return _i(ie.cm)})},Ks.prototype.setUneditable=function(ie){ie.contentEditable="false"},Ks.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||$n(this.cm,wh)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Ks.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Ks.prototype.onContextMenu=function(){},Ks.prototype.resetPosition=function(){},Ks.prototype.needsContentAttribute=!0;function Ch(ie,ae){var ge=ga(ie,ae.line);if(!ge||ge.hidden)return null;var fe=nn(ie.doc,ae.line),ye=Mi(ge,fe,ae.line),Re=xn(fe,ie.doc.direction),Je="left";if(Re){var mt=ft(Re,ae.ch);Je=mt%2?"right":"left"}var gt=No(ye.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,ye){var Re="",Je=!1,mt=ie.doc.lineSeparator(),gt=!1;function zt(ii){return function(nr){return nr.id==ii}}function Mn(){Je&&(Re+=mt,gt&&(Re+=mt),Je=gt=!1)}function Vt(ii){ii&&(Mn(),Re+=ii)}function si(ii){if(ii.nodeType==1){var nr=ii.getAttribute("cm-text");if(nr){Vt(nr);return}var dr=ii.getAttribute("cm-marker"),Lr;if(dr){var uo=ie.findMarks(tn(fe,0),tn(ye+1,0),zt(+dr));uo.length&&(Lr=uo[0].find(0))&&Vt(gn(ie.doc,Lr.from,Lr.to).join(mt));return}if(ii.getAttribute("contenteditable")=="false")return;var Ho=/^(pre|div|p|li|table|br)$/i.test(ii.nodeName);if(!/^br$/i.test(ii.nodeName)&&ii.textContent.length==0)return;Ho&&Mn();for(var Mo=0;Mo<ii.childNodes.length;Mo++)si(ii.childNodes[Mo]);/^(pre|p)$/i.test(ii.nodeName)&&(gt=!0),Ho&&(Je=!0)}else ii.nodeType==3&&Vt(ii.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;si(ae),ae!=ge;)ae=ae.nextSibling,gt=!1;return Re}function mf(ie,ae,ge){var fe;if(ae==ie.display.lineDiv){if(fe=ie.display.lineDiv.childNodes[ge],!fe)return Xd(ie.clipPos(tn(ie.display.viewTo-1)),!0);ae=null,ge=0}else for(fe=ae;;fe=fe.parentNode){if(!fe||fe==ie.display.lineDiv)return null;if(fe.parentNode&&fe.parentNode==ie.display.lineDiv)break}for(var ye=0;ye<ie.display.view.length;ye++){var Re=ie.display.view[ye];if(Re.node==fe)return ip(Re,ae,ge)}}function ip(ie,ae,ge){var fe=ie.text.firstChild,ye=!1;if(!ae||!Nt(fe,ae))return Xd(tn(Et(ie.line),0),!0);if(ae==fe&&(ye=!0,ae=fe.childNodes[ge],ge=0,!ae)){var Re=ie.rest?wt(ie.rest):ie.line;return Xd(tn(Et(Re),Re.text.length),ye)}var Je=ae.nodeType==3?ae:null,mt=ae;for(!Je&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(Je=ae.firstChild,ge&&(ge=Je.nodeValue.length));mt.parentNode!=fe;)mt=mt.parentNode;var gt=ie.measure,zt=gt.maps;function Mn(Lr,uo,Ho){for(var Mo=-1;Mo<(zt?zt.length:0);Mo++)for(var qo=Mo<0?gt.map:zt[Mo],_a=0;_a<qo.length;_a+=3){var Lo=qo[_a+2];if(Lo==Lr||Lo==uo){var is=Et(Mo<0?ie.line:ie.rest[Mo]),rl=qo[_a]+Ho;return(Ho<0||Lo!=Lr)&&(rl=qo[_a+(Ho?1:0)]),tn(is,rl)}}}var Vt=Mn(Je,mt,ge);if(Vt)return Xd(Vt,ye);for(var si=mt.nextSibling,ii=Je?Je.nodeValue.length-ge:0;si;si=si.nextSibling){if(Vt=Mn(si,si.firstChild,0),Vt)return Xd(tn(Vt.line,Vt.ch-ii),ye);ii+=si.textContent.length}for(var nr=mt.previousSibling,dr=ge;nr;nr=nr.previousSibling){if(Vt=Mn(nr,nr.firstChild,-1),Vt)return Xd(tn(Vt.line,Vt.ch+dr),ye);dr+=nr.textContent.length}}var Yl=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ve,this.hasSelection=!1,this.composing=null};Yl.prototype.init=function(ie){var ae=this,ge=this,fe=this.cm;this.createField(ie);var ye=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Oe&&(ye.style.width="0px"),Jt(ye,"input",function(){We&&Ue>=9&&ae.hasSelection&&(ae.hasSelection=null),ge.poll()}),Jt(ye,"paste",function(Je){Qn(fe,Je)||Cg(Je,fe)||(fe.state.pasteIncoming=+new Date,ge.fastPoll())});function Re(Je){if(!Qn(fe,Je)){if(fe.somethingSelected())Hh({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var mt=bg(fe);Hh({lineWise:!0,text:mt.text}),Je.type=="cut"?fe.setSelections(mt.ranges,null,jt):(ge.prevInput="",ye.value=mt.text.join(`
`),Ot(ye))}else return;Je.type=="cut"&&(fe.state.cutIncoming=+new Date)}}Jt(ye,"cut",Re),Jt(ye,"copy",Re),Jt(ie.scroller,"paste",function(Je){if(!(Cn(ie,Je)||Qn(fe,Je))){if(!ye.dispatchEvent){fe.state.pasteIncoming=+new Date,ge.focus();return}var mt=new Event("paste");mt.clipboardData=Je.clipboardData,ye.dispatchEvent(mt)}}),Jt(ie.lineSpace,"selectstart",function(Je){Cn(ie,Je)||yi(Je)}),Jt(ye,"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"})}}),Jt(ye,"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=Rr(ie);if(ie.options.moveInputWithCursor){var ye=La(ie,ge.sel.primary().head,"div"),Re=ae.wrapper.getBoundingClientRect(),Je=ae.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,ye.top+Je.top-Re.top)),fe.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,ye.left+Je.left-Re.left))}return fe},Yl.prototype.showSelection=function(ie){var ae=this.cm,ge=ae.display;Xe(ge.cursorDiv,ie.cursors),Xe(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&&Ot(this.textarea),We&&Ue>=9&&(this.hasSelection=ge)}else ie||(this.prevInput=this.textarea.value="",We&&Ue>=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||at()!=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||Ae(ge)&&!fe&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var ye=ge.value;if(ye==fe&&!ae.somethingSelected())return!1;if(We&&Ue>=9&&this.hasSelection===ye||de&&/[\uf700-\uf7ff]/.test(ye))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Re=ye.charCodeAt(0);if(Re==8203&&!fe&&(fe="\u200B"),Re==8666)return this.reset(),this.cm.execCommand("undo")}for(var Je=0,mt=Math.min(fe.length,ye.length);Je<mt&&fe.charCodeAt(Je)==ye.charCodeAt(Je);)++Je;return rn(ae,function(){wh(ae,ye.slice(Je),fe.length-Je,null,ie.composing?"*compose":null),ye.length>1e3||ye.indexOf(`
`)>-1?ge.value=ie.prevInput="":ie.prevInput=ye,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Yl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Yl.prototype.onKeyPress=function(){We&&Ue>=9&&(this.hasSelection=null),this.fastPoll()},Yl.prototype.onContextMenu=function(ie){var ae=this,ge=ae.cm,fe=ge.display,ye=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Re=mr(ge,ie),Je=fe.scroller.scrollTop;if(!Re||$e)return;var mt=ge.options.resetSelectionOnContextMenu;mt&&ge.doc.sel.contains(Re)==-1&&$n(ge,js)(ge.doc,Ua(Re),jt);var gt=ye.style.cssText,zt=ae.wrapper.style.cssText,Mn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",ye.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(ie.clientY-Mn.top-5)+"px; left: "+(ie.clientX-Mn.left-5)+`px;
z-index: 1000; background: `+(We?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Vt;Me&&(Vt=window.scrollY),fe.input.focus(),Me&&window.scrollTo(null,Vt),fe.input.reset(),ge.somethingSelected()||(ye.value=ae.prevInput=" "),ae.contextMenuPending=ii,fe.selForContextMenu=ge.doc.sel,clearTimeout(fe.detectingSelectAll);function si(){if(ye.selectionStart!=null){var dr=ge.somethingSelected(),Lr="\u200B"+(dr?ye.value:"");ye.value="\u21DA",ye.value=Lr,ae.prevInput=dr?"":"\u200B",ye.selectionStart=1,ye.selectionEnd=Lr.length,fe.selForContextMenu=ge.doc.sel}}function ii(){if(ae.contextMenuPending==ii&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=zt,ye.style.cssText=gt,We&&Ue<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=Je),ye.selectionStart!=null)){(!We||We&&Ue<9)&&si();var dr=0,Lr=function(){fe.selForContextMenu==ge.doc.sel&&ye.selectionStart==0&&ye.selectionEnd>0&&ae.prevInput=="\u200B"?$n(ge,Ns)(ge):dr++<10?fe.detectingSelectAll=setTimeout(Lr,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(Lr,200)}}if(We&&Ue>=9&&si(),Be){cr(ie);var nr=function(){Kn(window,"mouseup",nr),setTimeout(ii,20)};Jt(window,"mouseup",nr)}else setTimeout(ii,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?At(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=at();ae.autofocus=ge==ie||ie.getAttribute("autofocus")!=null&&ge==document.body}function fe(){ie.value=mt.getValue()}var ye;if(ie.form&&(Jt(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone)){var Re=ie.form;ye=Re.submit;try{var Je=Re.submit=function(){fe(),Re.submit=ye,Re.submit(),Re.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&&(Kn(ie.form,"submit",fe),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=ye))}},ie.style.display="none";var mt=As(function(gt){return ie.parentNode.insertBefore(gt,ie.nextSibling)},ae);return mt}function Jd(ie){ie.off=Kn,ie.on=Jt,ie.wheelEventPixels=ea,ie.Doc=Bl,ie.splitLines=fr,ie.countColumn=qe,ie.findColumn=Wn,ie.isWordChar=Ne,ie.Pass=yn,ie.signal=dn,ie.Line=fa,ie.changeEnd=Es,ie.scrollbarModel=_d,ie.Pos=tn,ie.cmpPos=sn,ie.modes=xi,ie.mimeModes=zi,ie.resolveMode=ti,ie.getMode=Zt,ie.modeExtensions=Wt,ie.extendMode=Qe,ie.copyState=on,ie.startState=Mt,ie.innerMode=cn,ie.commands=nu,ie.keyMap=Pu,ie.keyName=mh,ie.isModifierKey=Uc,ie.lookupKey=Tu,ie.normalizeKeyMap=_h,ie.StringStream=ht,ie.SharedTextMarker=Bc,ie.TextMarker=hn,ie.LineWidget=yl,ie.e_preventDefault=yi,ie.e_stopPropagation=Zi,ie.e_stop=cr,ie.addClass=kt,ie.contains=Nt,ie.rmClass=ze,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)&&_t(dd,bh)<0&&(As.prototype[bh]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Bl.prototype[bh]));return Nn(Bl),As.inputStyles={textarea:Yl,contenteditable:Ks},As.defineMode=function(ie){!As.defaults.mode&&ie!="null"&&(As.defaults.mode=ie),qi.apply(this,arguments)},As.defineMIME=Gn,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(On,mn,pe){(function(le){le(pe(89780),pe(15525),pe(98101))})(function(le){"use strict";le.defineMode("markdown",function(Te,He){var ut=le.getMode(Te,"text/html"),We=ut.name=="null";function Ue(qe){if(le.findModeByName){var Ve=le.findModeByName(qe);Ve&&(qe=Ve.mime||Ve.mimes[0])}var _t=le.getMode(Te,qe);return _t.name=="null"?null:_t}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 Ct in Me)Me.hasOwnProperty(Ct)&&He.tokenTypeOverrides[Ct]&&(Me[Ct]=He.tokenTypeOverrides[Ct]);var Pt=/^([*\-_])(?:\s*\1){2,}\s*$/,$e=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ft=/^\[(x| )\](?=\s)/i,lt=He.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,vt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Oe=/^[^#!\[\]*_\\<>` "'(~:]+/,te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,ee=/^\s*\[[^\]]+?\]:.*$/,de=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,se=" ";function he(qe,Ve,_t){return Ve.f=Ve.inline=_t,_t(qe,Ve)}function ve(qe,Ve,_t){return Ve.f=Ve.block=_t,_t(qe,Ve)}function Ee(qe){return!qe||!/\S/.test(qe.string)}function Be(qe){if(qe.linkTitle=!1,qe.linkHref=!1,qe.linkText=!1,qe.em=!1,qe.strong=!1,qe.strikethrough=!1,qe.quote=0,qe.indentedCode=!1,qe.f==ze){var Ve=We;if(!Ve){var _t=le.innerMode(ut,qe.htmlState);Ve=_t.mode.name=="xml"&&_t.state.tagStart===null&&!_t.state.context&&_t.state.tokenize.isInText}Ve&&(qe.f=dt,qe.block=Le,qe.htmlState=null)}return qe.trailingSpace=0,qe.trailingSpaceNewLine=!1,qe.prevLine=qe.thisLine,qe.thisLine={stream:null},null}function Le(qe,Ve){var _t=qe.column()===Ve.indentation,vn=Ee(Ve.prevLine.stream),yn=Ve.indentedCode,jt=Ve.prevLine.hr,en=Ve.list!==!1,ln=(Ve.listStack[Ve.listStack.length-1]||0)+3;Ve.indentedCode=!1;var Wn=Ve.indentation;if(Ve.indentationDiff===null&&(Ve.indentationDiff=Ve.indentation,en)){for(Ve.list=null;Wn<Ve.listStack[Ve.listStack.length-1];)Ve.listStack.pop(),Ve.listStack.length?Ve.indentation=Ve.listStack[Ve.listStack.length-1]:Ve.list=!1;Ve.list!==!1&&(Ve.indentationDiff=Wn-Ve.listStack[Ve.listStack.length-1])}var un=!vn&&!jt&&!Ve.prevLine.header&&(!en||!yn)&&!Ve.prevLine.fencedCodeEnd,kn=(Ve.list===!1||jt||vn)&&Ve.indentation<=ln&&qe.match(Pt),wt=null;if(Ve.indentationDiff>=4&&(yn||Ve.prevLine.fencedCodeEnd||Ve.prevLine.header||vn))return qe.skipToEnd(),Ve.indentedCode=!0,Me.code;if(qe.eatSpace())return null;if(_t&&Ve.indentation<=ln&&(wt=qe.match(lt))&&wt[1].length<=6)return Ve.quote=0,Ve.header=wt[1].length,Ve.thisLine.header=!0,He.highlightFormatting&&(Ve.formatting="header"),Ve.f=Ve.inline,Xe(Ve);if(Ve.indentation<=ln&&qe.eat(">"))return Ve.quote=_t?1:Ve.quote+1,He.highlightFormatting&&(Ve.formatting="quote"),qe.eatSpace(),Xe(Ve);if(!kn&&!Ve.setext&&_t&&Ve.indentation<=ln&&(wt=qe.match($e))){var jn=wt[1]?"ol":"ul";return Ve.indentation=Wn+qe.current().length,Ve.list=!0,Ve.quote=0,Ve.listStack.push(Ve.indentation),Ve.em=!1,Ve.strong=!1,Ve.code=!1,Ve.strikethrough=!1,He.taskLists&&qe.match(Ft,!1)&&(Ve.taskList=!0),Ve.f=Ve.inline,He.highlightFormatting&&(Ve.formatting=["list","list-"+jn]),Xe(Ve)}else{if(_t&&Ve.indentation<=ln&&(wt=qe.match(te,!0)))return Ve.quote=0,Ve.fencedEndRE=new RegExp(wt[1]+"+ *$"),Ve.localMode=He.fencedCodeBlockHighlighting&&Ue(wt[2]||He.fencedCodeBlockDefaultMode),Ve.localMode&&(Ve.localState=le.startState(Ve.localMode)),Ve.f=Ve.block=je,He.highlightFormatting&&(Ve.formatting="code-block"),Ve.code=-1,Xe(Ve);if(Ve.setext||(!un||!en)&&!Ve.quote&&Ve.list===!1&&!Ve.code&&!kn&&!ee.test(qe.string)&&(wt=qe.lookAhead(1))&&(wt=wt.match(vt)))return Ve.setext?(Ve.header=Ve.setext,Ve.setext=0,qe.skipToEnd(),He.highlightFormatting&&(Ve.formatting="header")):(Ve.header=wt[0].charAt(0)=="="?1:2,Ve.setext=Ve.header),Ve.thisLine.header=!0,Ve.f=Ve.inline,Xe(Ve);if(kn)return qe.skipToEnd(),Ve.hr=!0,Ve.thisLine.hr=!0,Me.hr;if(qe.peek()==="[")return he(qe,Ve,xt)}return he(qe,Ve,Ve.inline)}function ze(qe,Ve){var _t=ut.token(qe,Ve.htmlState);if(!We){var vn=le.innerMode(ut,Ve.htmlState);(vn.mode.name=="xml"&&vn.state.tagStart===null&&!vn.state.context&&vn.state.tokenize.isInText||Ve.md_inside&&qe.current().indexOf(">")>-1)&&(Ve.f=dt,Ve.block=Le,Ve.htmlState=null)}return _t}function je(qe,Ve){var _t=Ve.listStack[Ve.listStack.length-1]||0,vn=Ve.indentation<_t,yn=_t+3;if(Ve.fencedEndRE&&Ve.indentation<=yn&&(vn||qe.match(Ve.fencedEndRE))){He.highlightFormatting&&(Ve.formatting="code-block");var jt;return vn||(jt=Xe(Ve)),Ve.localMode=Ve.localState=null,Ve.block=Le,Ve.f=dt,Ve.fencedEndRE=null,Ve.code=0,Ve.thisLine.fencedCodeEnd=!0,vn?ve(qe,Ve,Ve.block):jt}else return Ve.localMode?Ve.localMode.token(qe,Ve.localState):(qe.skipToEnd(),Me.code)}function Xe(qe){var Ve=[];if(qe.formatting){Ve.push(Me.formatting),typeof qe.formatting=="string"&&(qe.formatting=[qe.formatting]);for(var _t=0;_t<qe.formatting.length;_t++)Ve.push(Me.formatting+"-"+qe.formatting[_t]),qe.formatting[_t]==="header"&&Ve.push(Me.formatting+"-"+qe.formatting[_t]+"-"+qe.header),qe.formatting[_t]==="quote"&&(!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=qe.quote?Ve.push(Me.formatting+"-"+qe.formatting[_t]+"-"+qe.quote):Ve.push("error"))}if(qe.taskOpen)return Ve.push("meta"),Ve.length?Ve.join(" "):null;if(qe.taskClosed)return Ve.push("property"),Ve.length?Ve.join(" "):null;if(qe.linkHref?Ve.push(Me.linkHref,"url"):(qe.strong&&Ve.push(Me.strong),qe.em&&Ve.push(Me.em),qe.strikethrough&&Ve.push(Me.strikethrough),qe.emoji&&Ve.push(Me.emoji),qe.linkText&&Ve.push(Me.linkText),qe.code&&Ve.push(Me.code),qe.image&&Ve.push(Me.image),qe.imageAltText&&Ve.push(Me.imageAltText,"link"),qe.imageMarker&&Ve.push(Me.imageMarker)),qe.header&&Ve.push(Me.header,Me.header+"-"+qe.header),qe.quote&&(Ve.push(Me.quote),!He.maxBlockquoteDepth||He.maxBlockquoteDepth>=qe.quote?Ve.push(Me.quote+"-"+qe.quote):Ve.push(Me.quote+"-"+He.maxBlockquoteDepth)),qe.list!==!1){var vn=(qe.listStack.length-1)%3;vn?vn===1?Ve.push(Me.list2):Ve.push(Me.list3):Ve.push(Me.list1)}return qe.trailingSpaceNewLine?Ve.push("trailing-space-new-line"):qe.trailingSpace&&Ve.push("trailing-space-"+(qe.trailingSpace%2?"a":"b")),Ve.length?Ve.join(" "):null}function Ye(qe,Ve){if(qe.match(Oe,!0))return Xe(Ve)}function dt(qe,Ve){var _t=Ve.text(qe,Ve);if(typeof _t!="undefined")return _t;if(Ve.list)return Ve.list=null,Xe(Ve);if(Ve.taskList){var vn=qe.match(Ft,!0)[1]===" ";return vn?Ve.taskOpen=!0:Ve.taskClosed=!0,He.highlightFormatting&&(Ve.formatting="task"),Ve.taskList=!1,Xe(Ve)}if(Ve.taskOpen=!1,Ve.taskClosed=!1,Ve.header&&qe.match(/^#+$/,!0))return He.highlightFormatting&&(Ve.formatting="header"),Xe(Ve);var yn=qe.next();if(Ve.linkTitle){Ve.linkTitle=!1;var jt=yn;yn==="("&&(jt=")"),jt=(jt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var en="^\\s*(?:[^"+jt+"\\\\]+|\\\\\\\\|\\\\.)"+jt;if(qe.match(new RegExp(en),!0))return Me.linkHref}if(yn==="`"){var ln=Ve.formatting;He.highlightFormatting&&(Ve.formatting="code"),qe.eatWhile("`");var Wn=qe.current().length;if(Ve.code==0&&(!Ve.quote||Wn==1))return Ve.code=Wn,Xe(Ve);if(Wn==Ve.code){var un=Xe(Ve);return Ve.code=0,un}else return Ve.formatting=ln,Xe(Ve)}else if(Ve.code)return Xe(Ve);if(yn==="\\"&&(qe.next(),He.highlightFormatting)){var kn=Xe(Ve),wt=Me.formatting+"-escape";return kn?kn+" "+wt:wt}if(yn==="!"&&qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ve.imageMarker=!0,Ve.image=!0,He.highlightFormatting&&(Ve.formatting="image"),Xe(Ve);if(yn==="["&&Ve.imageMarker&&qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ve.imageMarker=!1,Ve.imageAltText=!0,He.highlightFormatting&&(Ve.formatting="image"),Xe(Ve);if(yn==="]"&&Ve.imageAltText){He.highlightFormatting&&(Ve.formatting="image");var kn=Xe(Ve);return Ve.imageAltText=!1,Ve.image=!1,Ve.inline=Ve.f=Nt,kn}if(yn==="["&&!Ve.image)return Ve.linkText&&qe.match(/^.*?\]/)||(Ve.linkText=!0,He.highlightFormatting&&(Ve.formatting="link")),Xe(Ve);if(yn==="]"&&Ve.linkText){He.highlightFormatting&&(Ve.formatting="link");var kn=Xe(Ve);return Ve.linkText=!1,Ve.inline=Ve.f=qe.match(/\(.*?\)| ?\[.*?\]/,!1)?Nt:dt,kn}if(yn==="<"&&qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ve.f=Ve.inline=Ze,He.highlightFormatting&&(Ve.formatting="link");var kn=Xe(Ve);return kn?kn+=" ":kn="",kn+Me.linkInline}if(yn==="<"&&qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ve.f=Ve.inline=Ze,He.highlightFormatting&&(Ve.formatting="link");var kn=Xe(Ve);return kn?kn+=" ":kn="",kn+Me.linkEmail}if(He.xml&&yn==="<"&&qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var jn=qe.string.indexOf(">",qe.pos);if(jn!=-1){var ci=qe.string.substring(qe.start,jn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ci)&&(Ve.md_inside=!0)}return qe.backUp(1),Ve.htmlState=le.startState(ut),ve(qe,Ve,ze)}if(He.xml&&yn==="<"&&qe.match(/^\/\w*?>/))return Ve.md_inside=!1,"tag";if(yn==="*"||yn==="_"){for(var Ge=1,be=qe.pos==1?" ":qe.string.charAt(qe.pos-2);Ge<3&&qe.eat(yn);)Ge++;var Pe=qe.peek()||" ",Ne=!/\s/.test(Pe)&&(!de.test(Pe)||/\s/.test(be)||de.test(be)),Ie=!/\s/.test(be)&&(!de.test(be)||/\s/.test(Pe)||de.test(Pe)),xe=null,ct=null;if(Ge%2&&(!Ve.em&&Ne&&(yn==="*"||!Ie||de.test(be))?xe=!0:Ve.em==yn&&Ie&&(yn==="*"||!Ne||de.test(Pe))&&(xe=!1)),Ge>1&&(!Ve.strong&&Ne&&(yn==="*"||!Ie||de.test(be))?ct=!0:Ve.strong==yn&&Ie&&(yn==="*"||!Ne||de.test(Pe))&&(ct=!1)),ct!=null||xe!=null){He.highlightFormatting&&(Ve.formatting=xe==null?"strong":ct==null?"em":"strong em"),xe===!0&&(Ve.em=yn),ct===!0&&(Ve.strong=yn);var un=Xe(Ve);return xe===!1&&(Ve.em=!1),ct===!1&&(Ve.strong=!1),un}}else if(yn===" "&&(qe.eat("*")||qe.eat("_"))){if(qe.peek()===" ")return Xe(Ve);qe.backUp(1)}if(He.strikethrough){if(yn==="~"&&qe.eatWhile(yn)){if(Ve.strikethrough){He.highlightFormatting&&(Ve.formatting="strikethrough");var un=Xe(Ve);return Ve.strikethrough=!1,un}else if(qe.match(/^[^\s]/,!1))return Ve.strikethrough=!0,He.highlightFormatting&&(Ve.formatting="strikethrough"),Xe(Ve)}else if(yn===" "&&qe.match(/^~~/,!0)){if(qe.peek()===" ")return Xe(Ve);qe.backUp(2)}}if(He.emoji&&yn===":"&&qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ve.emoji=!0,He.highlightFormatting&&(Ve.formatting="emoji");var Lt=Xe(Ve);return Ve.emoji=!1,Lt}return yn===" "&&(qe.match(/^ +$/,!1)?Ve.trailingSpace++:Ve.trailingSpace&&(Ve.trailingSpaceNewLine=!0)),Xe(Ve)}function Ze(qe,Ve){var _t=qe.next();if(_t===">"){Ve.f=Ve.inline=dt,He.highlightFormatting&&(Ve.formatting="link");var vn=Xe(Ve);return vn?vn+=" ":vn="",vn+Me.linkInline}return qe.match(/^[^>]+/,!0),Me.linkInline}function Nt(qe,Ve){if(qe.eatSpace())return null;var _t=qe.next();return _t==="("||_t==="["?(Ve.f=Ve.inline=kt(_t==="("?")":"]"),He.highlightFormatting&&(Ve.formatting="link-string"),Ve.linkHref=!0,Xe(Ve)):"error"}var at={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function kt(qe){return function(Ve,_t){var vn=Ve.next();if(vn===qe){_t.f=_t.inline=dt,He.highlightFormatting&&(_t.formatting="link-string");var yn=Xe(_t);return _t.linkHref=!1,yn}return Ve.match(at[qe]),_t.linkHref=!0,Xe(_t)}}function xt(qe,Ve){return qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ve.f=Ot,qe.next(),He.highlightFormatting&&(Ve.formatting="link"),Ve.linkText=!0,Xe(Ve)):he(qe,Ve,dt)}function Ot(qe,Ve){if(qe.match(/^\]:/,!0)){Ve.f=Ve.inline=Gt,He.highlightFormatting&&(Ve.formatting="link");var _t=Xe(Ve);return Ve.linkText=!1,_t}return qe.match(/^([^\]\\]|\\.)+/,!0),Me.linkText}function Gt(qe,Ve){return qe.eatSpace()?null:(qe.match(/^[^\s]+/,!0),qe.peek()===void 0?Ve.linkTitle=!0:qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ve.f=Ve.inline=dt,Me.linkHref+" url")}var At={startState:function(){return{f:Le,prevLine:{stream:null},thisLine:{stream:null},block:Le,htmlState:null,indentation:0,inline:dt,text:Ye,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(qe){return{f:qe.f,prevLine:qe.prevLine,thisLine:qe.thisLine,block:qe.block,htmlState:qe.htmlState&&le.copyState(ut,qe.htmlState),indentation:qe.indentation,localMode:qe.localMode,localState:qe.localMode?le.copyState(qe.localMode,qe.localState):null,inline:qe.inline,text:qe.text,formatting:!1,linkText:qe.linkText,linkTitle:qe.linkTitle,linkHref:qe.linkHref,code:qe.code,em:qe.em,strong:qe.strong,strikethrough:qe.strikethrough,emoji:qe.emoji,header:qe.header,setext:qe.setext,hr:qe.hr,taskList:qe.taskList,list:qe.list,listStack:qe.listStack.slice(0),quote:qe.quote,indentedCode:qe.indentedCode,trailingSpace:qe.trailingSpace,trailingSpaceNewLine:qe.trailingSpaceNewLine,md_inside:qe.md_inside,fencedEndRE:qe.fencedEndRE}},token:function(qe,Ve){if(Ve.formatting=!1,qe!=Ve.thisLine.stream){if(Ve.header=0,Ve.hr=!1,qe.match(/^\s*$/,!0))return Be(Ve),null;if(Ve.prevLine=Ve.thisLine,Ve.thisLine={stream:qe},Ve.taskList=!1,Ve.trailingSpace=0,Ve.trailingSpaceNewLine=!1,!Ve.localState&&(Ve.f=Ve.block,Ve.f!=ze)){var _t=qe.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ve.indentation=_t,Ve.indentationDiff=null,_t>0)return null}}return Ve.f(qe,Ve)},innerMode:function(qe){return qe.block==ze?{state:qe.htmlState,mode:ut}:qe.localState?{state:qe.localState,mode:qe.localMode}:{state:qe,mode:At}},indent:function(qe,Ve,_t){return qe.block==ze&&ut.indent?ut.indent(qe.htmlState,Ve,_t):qe.localState&&qe.localMode.indent?qe.localMode.indent(qe.localState,Ve,_t):le.Pass},blankLine:Be,getType:Xe,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return At},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},98101:function(On,mn,pe){(function(le){le(pe(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(ut){ut=ut.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var Ue=le.modeInfo[We];if(Ue.mime==ut)return Ue;if(Ue.mimes){for(var Me=0;Me<Ue.mimes.length;Me++)if(Ue.mimes[Me]==ut)return Ue}}if(/\+xml$/.test(ut))return le.findModeByMIME("application/xml");if(/\+json$/.test(ut))return le.findModeByMIME("application/json")},le.findModeByExtension=function(ut){ut=ut.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var Ue=le.modeInfo[We];if(Ue.ext){for(var Me=0;Me<Ue.ext.length;Me++)if(Ue.ext[Me]==ut)return Ue}}},le.findModeByFileName=function(ut){for(var We=0;We<le.modeInfo.length;We++){var Ue=le.modeInfo[We];if(Ue.file&&Ue.file.test(ut))return Ue}var Me=ut.lastIndexOf("."),Ct=Me>-1&&ut.substring(Me+1,ut.length);if(Ct)return le.findModeByExtension(Ct)},le.findModeByName=function(ut){ut=ut.toLowerCase();for(var We=0;We<le.modeInfo.length;We++){var Ue=le.modeInfo[We];if(Ue.name.toLowerCase()==ut)return Ue;if(Ue.alias){for(var Me=0;Me<Ue.alias.length;Me++)if(Ue.alias[Me].toLowerCase()==ut)return Ue}}}})},67549:function(On,mn,pe){(function(le){le(pe(89780))})(function(le){"use strict";le.defineMode("stex",function(Te,He){"use strict";function ut(Oe,te){Oe.cmdState.push(te)}function We(Oe){return Oe.cmdState.length>0?Oe.cmdState[Oe.cmdState.length-1]:null}function Ue(Oe){var te=Oe.cmdState.pop();te&&te.closeBracket()}function Me(Oe){for(var te=Oe.cmdState,ee=te.length-1;ee>=0;ee--){var de=te[ee];if(de.name!="DEFAULT")return de}return{styleIdentifier:function(){return null}}}function Ct(Oe,te,ee){return function(){this.name=Oe,this.bracketNo=0,this.style=te,this.styles=ee,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Pt={};Pt.importmodule=Ct("importmodule","tag",["string","builtin"]),Pt.documentclass=Ct("documentclass","tag",["","atom"]),Pt.usepackage=Ct("usepackage","tag",["atom"]),Pt.begin=Ct("begin","tag",["atom"]),Pt.end=Ct("end","tag",["atom"]),Pt.label=Ct("label","tag",["atom"]),Pt.ref=Ct("ref","tag",["atom"]),Pt.eqref=Ct("eqref","tag",["atom"]),Pt.cite=Ct("cite","tag",["atom"]),Pt.bibitem=Ct("bibitem","tag",["atom"]),Pt.Bibitem=Ct("Bibitem","tag",["atom"]),Pt.RBibitem=Ct("RBibitem","tag",["atom"]),Pt.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function $e(Oe,te){Oe.f=te}function Ft(Oe,te){var ee;if(Oe.match(/^\\[a-zA-Z@]+/)){var de=Oe.current().slice(1);return ee=Pt.hasOwnProperty(de)?Pt[de]:Pt.DEFAULT,ee=new ee,ut(te,ee),$e(te,vt),ee.style}if(Oe.match(/^\\[$&%#{}_]/)||Oe.match(/^\\[,;!\/\\]/))return"tag";if(Oe.match("\\["))return $e(te,function(he,ve){return lt(he,ve,"\\]")}),"keyword";if(Oe.match("\\("))return $e(te,function(he,ve){return lt(he,ve,"\\)")}),"keyword";if(Oe.match("$$"))return $e(te,function(he,ve){return lt(he,ve,"$$")}),"keyword";if(Oe.match("$"))return $e(te,function(he,ve){return lt(he,ve,"$")}),"keyword";var se=Oe.next();if(se=="%")return Oe.skipToEnd(),"comment";if(se=="}"||se=="]"){if(ee=We(te),ee)ee.closeBracket(se),$e(te,vt);else return"error";return"bracket"}else return se=="{"||se=="["?(ee=Pt.DEFAULT,ee=new ee,ut(te,ee),"bracket"):/\d/.test(se)?(Oe.eatWhile(/[\w.%]/),"atom"):(Oe.eatWhile(/[\w\-_]/),ee=Me(te),ee.name=="begin"&&(ee.argument=Oe.current()),ee.styleIdentifier())}function lt(Oe,te,ee){if(Oe.eatSpace())return null;if(ee&&Oe.match(ee))return $e(te,Ft),"keyword";if(Oe.match(/^\\[a-zA-Z@]+/))return"tag";if(Oe.match(/^[a-zA-Z]+/))return"variable-2";if(Oe.match(/^\\[$&%#{}_]/)||Oe.match(/^\\[,;!\/]/)||Oe.match(/^[\^_&]/))return"tag";if(Oe.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Oe.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var de=Oe.next();return de=="{"||de=="}"||de=="["||de=="]"||de=="("||de==")"?"bracket":de=="%"?(Oe.skipToEnd(),"comment"):"error"}function vt(Oe,te){var ee=Oe.peek(),de;return ee=="{"||ee=="["?(de=We(te),de.openBracket(ee),Oe.eat(ee),$e(te,Ft),"bracket"):/[ \t\r]/.test(ee)?(Oe.eat(ee),null):($e(te,Ft),Ue(te),Ft(Oe,te))}return{startState:function(){var Oe=He.inMathMode?function(te,ee){return lt(te,ee)}:Ft;return{cmdState:[],f:Oe}},copyState:function(Oe){return{cmdState:Oe.cmdState.slice(),f:Oe.f}},token:function(Oe,te){return te.f(Oe,te)},blankLine:function(Oe){Oe.f=Ft,Oe.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},15525:function(On,mn,pe){(function(le){le(pe(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(ut,We){var Ue=ut.indentUnit,Me={},Ct=We.htmlMode?Te:He;for(var Pt in Ct)Me[Pt]=Ct[Pt];for(var Pt in We)Me[Pt]=We[Pt];var $e,Ft;function lt(Ze,Nt){function at(Ot){return Nt.tokenize=Ot,Ot(Ze,Nt)}var kt=Ze.next();if(kt=="<")return Ze.eat("!")?Ze.eat("[")?Ze.match("CDATA[")?at(te("atom","]]>")):null:Ze.match("--")?at(te("comment","-->")):Ze.match("DOCTYPE",!0,!0)?(Ze.eatWhile(/[\w\._\-]/),at(ee(1))):null:Ze.eat("?")?(Ze.eatWhile(/[\w\._\-]/),Nt.tokenize=te("meta","?>"),"meta"):($e=Ze.eat("/")?"closeTag":"openTag",Nt.tokenize=vt,"tag bracket");if(kt=="&"){var xt;return Ze.eat("#")?Ze.eat("x")?xt=Ze.eatWhile(/[a-fA-F\d]/)&&Ze.eat(";"):xt=Ze.eatWhile(/[\d]/)&&Ze.eat(";"):xt=Ze.eatWhile(/[\w\.\-:]/)&&Ze.eat(";"),xt?"atom":"error"}else return Ze.eatWhile(/[^&<]/),null}lt.isInText=!0;function vt(Ze,Nt){var at=Ze.next();if(at==">"||at=="/"&&Ze.eat(">"))return Nt.tokenize=lt,$e=at==">"?"endTag":"selfcloseTag","tag bracket";if(at=="=")return $e="equals",null;if(at=="<"){Nt.tokenize=lt,Nt.state=ve,Nt.tagName=Nt.tagStart=null;var kt=Nt.tokenize(Ze,Nt);return kt?kt+" tag error":"tag error"}else return/[\'\"]/.test(at)?(Nt.tokenize=Oe(at),Nt.stringStartCol=Ze.column(),Nt.tokenize(Ze,Nt)):(Ze.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Oe(Ze){var Nt=function(at,kt){for(;!at.eol();)if(at.next()==Ze){kt.tokenize=vt;break}return"string"};return Nt.isInAttribute=!0,Nt}function te(Ze,Nt){return function(at,kt){for(;!at.eol();){if(at.match(Nt)){kt.tokenize=lt;break}at.next()}return Ze}}function ee(Ze){return function(Nt,at){for(var kt;(kt=Nt.next())!=null;){if(kt=="<")return at.tokenize=ee(Ze+1),at.tokenize(Nt,at);if(kt==">")if(Ze==1){at.tokenize=lt;break}else return at.tokenize=ee(Ze-1),at.tokenize(Nt,at)}return"meta"}}function de(Ze,Nt,at){this.prev=Ze.context,this.tagName=Nt,this.indent=Ze.indented,this.startOfLine=at,(Me.doNotIndent.hasOwnProperty(Nt)||Ze.context&&Ze.context.noIndent)&&(this.noIndent=!0)}function se(Ze){Ze.context&&(Ze.context=Ze.context.prev)}function he(Ze,Nt){for(var at;;){if(!Ze.context||(at=Ze.context.tagName,!Me.contextGrabbers.hasOwnProperty(at)||!Me.contextGrabbers[at].hasOwnProperty(Nt)))return;se(Ze)}}function ve(Ze,Nt,at){return Ze=="openTag"?(at.tagStart=Nt.column(),Ee):Ze=="closeTag"?Be:ve}function Ee(Ze,Nt,at){return Ze=="word"?(at.tagName=Nt.current(),Ft="tag",je):Me.allowMissingTagName&&Ze=="endTag"?(Ft="tag bracket",je(Ze,Nt,at)):(Ft="error",Ee)}function Be(Ze,Nt,at){if(Ze=="word"){var kt=Nt.current();return at.context&&at.context.tagName!=kt&&Me.implicitlyClosed.hasOwnProperty(at.context.tagName)&&se(at),at.context&&at.context.tagName==kt||Me.matchClosing===!1?(Ft="tag",Le):(Ft="tag error",ze)}else return Me.allowMissingTagName&&Ze=="endTag"?(Ft="tag bracket",Le(Ze,Nt,at)):(Ft="error",ze)}function Le(Ze,Nt,at){return Ze!="endTag"?(Ft="error",Le):(se(at),ve)}function ze(Ze,Nt,at){return Ft="error",Le(Ze,Nt,at)}function je(Ze,Nt,at){if(Ze=="word")return Ft="attribute",Xe;if(Ze=="endTag"||Ze=="selfcloseTag"){var kt=at.tagName,xt=at.tagStart;return at.tagName=at.tagStart=null,Ze=="selfcloseTag"||Me.autoSelfClosers.hasOwnProperty(kt)?he(at,kt):(he(at,kt),at.context=new de(at,kt,xt==at.indented)),ve}return Ft="error",je}function Xe(Ze,Nt,at){return Ze=="equals"?Ye:(Me.allowMissing||(Ft="error"),je(Ze,Nt,at))}function Ye(Ze,Nt,at){return Ze=="string"?dt:Ze=="word"&&Me.allowUnquoted?(Ft="string",je):(Ft="error",je(Ze,Nt,at))}function dt(Ze,Nt,at){return Ze=="string"?dt:je(Ze,Nt,at)}return{startState:function(Ze){var Nt={tokenize:lt,state:ve,indented:Ze||0,tagName:null,tagStart:null,context:null};return Ze!=null&&(Nt.baseIndent=Ze),Nt},token:function(Ze,Nt){if(!Nt.tagName&&Ze.sol()&&(Nt.indented=Ze.indentation()),Ze.eatSpace())return null;$e=null;var at=Nt.tokenize(Ze,Nt);return(at||$e)&&at!="comment"&&(Ft=null,Nt.state=Nt.state($e||at,Ze,Nt),Ft&&(at=Ft=="error"?at+" error":Ft)),at},indent:function(Ze,Nt,at){var kt=Ze.context;if(Ze.tokenize.isInAttribute)return Ze.tagStart==Ze.indented?Ze.stringStartCol+1:Ze.indented+Ue;if(kt&&kt.noIndent)return le.Pass;if(Ze.tokenize!=vt&&Ze.tokenize!=lt)return at?at.match(/^(\s*)/)[0].length:0;if(Ze.tagName)return Me.multilineTagIndentPastTag!==!1?Ze.tagStart+Ze.tagName.length+2:Ze.tagStart+Ue*(Me.multilineTagIndentFactor||1);if(Me.alignCDATA&&/<!\[CDATA\[/.test(Nt))return 0;var xt=Nt&&/^<(\/)?([\w_:\.-]*)/.exec(Nt);if(xt&&xt[1])for(;kt;)if(kt.tagName==xt[2]){kt=kt.prev;break}else if(Me.implicitlyClosed.hasOwnProperty(kt.tagName))kt=kt.prev;else break;else if(xt)for(;kt;){var Ot=Me.contextGrabbers[kt.tagName];if(Ot&&Ot.hasOwnProperty(xt[2]))kt=kt.prev;else break}for(;kt&&kt.prev&&!kt.startOfLine;)kt=kt.prev;return kt?kt.indent+Ue:Ze.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Me.htmlMode?"html":"xml",helperType:Me.htmlMode?"html":"xml",skipAttribute:function(Ze){Ze.state==Ye&&(Ze.state=je)},xmlCurrentTag:function(Ze){return Ze.tagName?{name:Ze.tagName,close:Ze.type=="closeTag"}:null},xmlCurrentContext:function(Ze){for(var Nt=[],at=Ze.context;at;at=at.prev)at.tagName&&Nt.push(at.tagName);return Nt.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(On,mn,pe){"use strict";pe.d(mn,{$u:function(){return Pt},BD:function(){return Ge},E9:function(){return Ct},FF:function(){return wi},FJ:function(){return ve},Hn:function(){return he},KX:function(){return Be},NB:function(){return Bt},S0:function(){return wt},UL:function(){return $e},Vk:function(){return se},Vm:function(){return ft},YI:function(){return jn},ZA:function(){return He},Zt:function(){return Ft},al:function(){return xe},bn:function(){return Ie},bx:function(){return be},g2:function(){return ci},h1:function(){return Ye},hD:function(){return Nn},l4:function(){return Ue},rU:function(){return Dt},s_:function(){return Pe},uz:function(){return it},z6:function(){return lt}}),On=pe.hmd(On),function(){var Ae;function Ei(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Sr(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ei(a)}}function Fn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var xi=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},zi;if(typeof Object.setPrototypeOf=="function")zi=Object.setPrototypeOf;else{var qi;e:{var Gn={a:!0},ti={};try{ti.__proto__=Gn,qi=ti.a;break e}catch(a){}qi=!1}zi=qi?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Zt=zi;function Wt(a,y){if(a.prototype=xi(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 pe.g!="undefined"&&pe.g!=null?pe.g:self,on=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},cn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function Mt(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&&cn(x,a,{writable:!0,value:y})}}Mt("Object.assign",function(a){return a||on}),Mt("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 ht=typeof globalThis=="object"&&globalThis||typeof pe.g=="object"&&pe.g.global===pe.g&&pe.g||typeof self=="object"&&self.self===self&&self||{};ht.requestAnimationFrame===void 0&&(ht.setImmediate===void 0?ht.requestAnimationFrame=function(a){ht.setTimeout(a,0)}:ht.requestAnimationFrame=ht.setImmediate);function nn(){}function gn(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&ht.clearTimeout(x),x=_n(function(){x=-1,a.apply(E,b)},y)}}function _n(a,y){return ht.setTimeout(a,y)}function qn(a){return ht.document.createElement(a)}function Et(a){throw Error(a)}function Pn(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Et(a)}function Xn(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),Et(x+" is not in the range "+y+": "+a)}function Ci(a){ht.console&&ht.console.log(a)}function tn(a){return typeof a=="object"&&a!==null}function sn(a){return Array.isArray(a)||ht.NodeList&&a instanceof ht.NodeList||ht.HTMLCollection&&a instanceof ht.HTMLCollection}function In(a){return Array.prototype.slice.call(a)}function ji(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Et("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Ai(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Et("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Si(){var a=Fr.pop();return a===void 0?[]:a}function ki(a){a.length=0,Fr.push(a)}function Ni(a){if(typeof a=="function"){if(a.className)return a.className;if(a.name)return a.name;var y=a.toString();if(y=y.substring(9,y.indexOf("(")).trim(),y!=="")return a._className=y}else if(tn(a)&&a.constructor)return Ni(a.constructor);return typeof a}function ir(a){var y=a;return tn(a)&&(a.text?y=a.text:a.name?y=a.name:a.key!==void 0?y=a.key:a.id!==void 0?y=a.id:a.constructor===Object&&(a.Text?y=a.Text:a.Name?y=a.Name:a.Key!==void 0?y=a.Key:a.Id!==void 0?y=a.Id:a.ID!==void 0&&(y=a.ID))),y===void 0?"undefined":y===null?"null":y.toString()}function zr(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 Vr(a,y,x){Object.defineProperty(jo.prototype,a,{get:y,set:x})}function Zn(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 io=ht.navigator!==void 0&&0<ht.navigator.userAgent.indexOf("Trident/7"),Yr=ht.navigator!==void 0&&ht.navigator.platform!==void 0&&ht.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,Fr=[];Object.freeze([]),nn.className="Util",nn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",nn.adym="gojs.net",nn.vfo="28e645fdb266",nn.className="Util";function wn(a,y,x){Io(this),this.j=a,this.xa=y,this.o=x}wn.prototype.toString=function(){return"EnumValue."+this.xa};function ri(a,y){return y==null||y===""?null:a[y]}Qe.Object.defineProperties(wn.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),wn.className="EnumValue";function Ui(){this.ew=[]}Ui.prototype.toString=function(){return this.ew.join("")},Ui.prototype.add=function(a){a!==""&&this.ew.push(a)},Ui.className="StringBuilder";function Pr(){}Pr.className="PropertyCollection";var er={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ht.console&&ht.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 Cr(){}Cr.prototype.reset=function(){},Cr.prototype.next=function(){return!1},Cr.prototype.Ad=function(){return!1},Cr.prototype.first=function(){return null},Cr.prototype.any=function(){return!1},Cr.prototype.all=function(){return!0},Cr.prototype.each=function(){return this},Cr.prototype.map=function(){return this},Cr.prototype.filter=function(){return this},Cr.prototype.de=function(){},Cr.prototype.toString=function(){return"EmptyIterator"},Qe.Object.defineProperties(Cr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),Cr.prototype.first=Cr.prototype.first,Cr.prototype.hasNext=Cr.prototype.Ad,Cr.prototype.next=Cr.prototype.next,Cr.prototype.reset=Cr.prototype.reset;var qr=null;Cr.className="EmptyIterator",qr=new Cr;function Zr(a){this.key=-1,this.value=a}Zr.prototype.reset=function(){this.key=-1},Zr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Zr.prototype.Ad=function(){return this.next()},Zr.prototype.first=function(){return this.key=0,this.value},Zr.prototype.any=function(a){return this.key=-1,a(this.value)},Zr.prototype.all=function(a){return this.key=-1,a(this.value)},Zr.prototype.each=function(a){return this.key=-1,a(this.value),this},Zr.prototype.map=function(a){return new Zr(a(this.value))},Zr.prototype.filter=function(a){return a(this.value)?new Zr(this.value):qr},Zr.prototype.de=function(){this.value=null},Zr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Qe.Object.defineProperties(Zr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Zr.prototype.first=Zr.prototype.first,Zr.prototype.hasNext=Zr.prototype.Ad,Zr.prototype.next=Zr.prototype.next,Zr.prototype.reset=Zr.prototype.reset,Zr.className="SingletonIterator";function Ir(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}Ir.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},Ir.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},Ir.prototype.Ad=function(){return this.next()},Ir.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},Ir.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},Ir.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},Ir.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},Ir.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 Vn,a.s=x,a.xb(),a.iterator},Ir.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 Vn,a.s=x,a.xb(),a.iterator},Ir.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},Ir.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Qe.Object.defineProperties(Ir.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}}}),Ir.prototype.first=Ir.prototype.first,Ir.prototype.hasNext=Ir.prototype.Ad,Ir.prototype.next=Ir.prototype.next,Ir.prototype.reset=Ir.prototype.reset,Ir.className="ListIterator";function Ur(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Ur.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Ur.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)},Ur.prototype.Ad=function(){return this.next()},Ur.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},Ur.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},Ur.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},Ur.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},Ur.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 Vn,a.s=x,a.xb(),a.iterator},Ur.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 Vn,a.s=x,a.xb(),a.iterator},Ur.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Ur.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Qe.Object.defineProperties(Ur.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Ur.prototype.first=Ur.prototype.first,Ur.prototype.hasNext=Ur.prototype.Ad,Ur.prototype.next=Ur.prototype.next,Ur.prototype.reset=Ur.prototype.reset,Ur.className="ListIteratorBackwards";function Vn(a){Io(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Et("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ae=Vn.prototype,Ae.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return this._isFrozen=!1,this},Ae.toString=function(){return"List()#"+tr(this)},Ae.add=function(a){return a===null?this:(this._isFrozen&&Pn(this,a),this.s.push(a),this.xb(),this)},Ae.push=function(a){this.add(a)},Ae.addAll=function(a){if(a===null)return this;this._isFrozen&&Pn(this);var y=this.s;if(sn(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},Ae.clear=function(){this._isFrozen&&Pn(this),this.s.length=0,this.xb()},Ae.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Ae.has=function(a){return this.contains(a)},Ae.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Ae.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Xn(a,"0 <= i < length",Vn,"elt:i"),y[a]},Ae.get=function(a){return this.M(a)},Ae.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Xn(a,"0 <= i < length",Vn,"setElt:i"),this._isFrozen&&Pn(this,a),x[a]=y},Ae.set=function(a,y){this.cd(a,y)},Ae.first=function(){var a=this.s;return a.length===0?null:a[0]},Ae.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Ae.pop=function(){this._isFrozen&&Pn(this);var a=this.s;return 0<a.length?a.pop():null},Vn.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},Vn.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},Vn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Vn.prototype.map=function(a){for(var y=new Vn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Vn.prototype.filter=function(a){for(var y=new Vn,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},Ae=Vn.prototype,Ae.Gb=function(a,y){0>a&&Xn(a,">= 0",Vn,"insertAt:i"),this._isFrozen&&Pn(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ae.remove=function(a){if(a===null)return!1;this._isFrozen&&Pn(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)},Ae.delete=function(a){return this.remove(a)},Ae.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Xn(a,"0 <= i < length",Vn,"removeAt:i"),this._isFrozen&&Pn(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ae.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&&Pn(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Vn.prototype.copy=function(){var a=new Vn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Ae=Vn.prototype,Ae.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Ae.Iv=function(){for(var a=new Un,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Ae.sort=function(a){return this._isFrozen&&Pn(this),this.s.sort(a),this.xb(),this},Ae.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&Pn(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Xn(y,"0 <= from < length",Vn,"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},Ae.reverse=function(){return this._isFrozen&&Pn(this),this.s.reverse(),this.xb(),this},Qe.Object.defineProperties(Vn.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 qr;var a=this.Sa;return a!==null?(a.reset(),a):new Ir(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return qr;var a=this.Hg;return a!==null?(a.reset(),a):new Ur(this)}}}),Vn.prototype.reverse=Vn.prototype.reverse,Vn.prototype.sortRange=Vn.prototype.zi,Vn.prototype.sort=Vn.prototype.sort,Vn.prototype.toSet=Vn.prototype.Iv,Vn.prototype.toArray=Vn.prototype.Fa,Vn.prototype.removeRange=Vn.prototype.removeRange,Vn.prototype.removeAt=Vn.prototype.mb,Vn.prototype.delete=Vn.prototype.delete,Vn.prototype.remove=Vn.prototype.remove,Vn.prototype.insertAt=Vn.prototype.Gb,Vn.prototype.pop=Vn.prototype.pop,Vn.prototype.last=Vn.prototype.jc,Vn.prototype.first=Vn.prototype.first,Vn.prototype.set=Vn.prototype.set,Vn.prototype.setElt=Vn.prototype.cd,Vn.prototype.get=Vn.prototype.get,Vn.prototype.elt=Vn.prototype.M,Vn.prototype.indexOf=Vn.prototype.indexOf,Vn.prototype.has=Vn.prototype.has,Vn.prototype.contains=Vn.prototype.contains,Vn.prototype.clear=Vn.prototype.clear,Vn.prototype.addAll=Vn.prototype.addAll,Vn.prototype.push=Vn.prototype.push,Vn.prototype.add=Vn.prototype.add,Vn.prototype.thaw=Vn.prototype.ka,Vn.prototype.freeze=Vn.prototype.freeze,Vn.className="List";function Xo(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Xo.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Xo.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)},Xo.prototype.Ad=function(){return this.next()},Xo.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},Xo.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},Xo.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},Xo.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},Xo.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Vn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Xo.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Vn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Xo.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Xo.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Qe.Object.defineProperties(Xo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Xo.prototype.first=Xo.prototype.first,Xo.prototype.hasNext=Xo.prototype.Ad,Xo.prototype.next=Xo.prototype.next,Xo.prototype.reset=Xo.prototype.reset,Xo.className="SetIterator";function Un(a){Io(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Et("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ae=Un.prototype,Ae.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return this._isFrozen=!1,this},Ae.toString=function(){return"Set()#"+tr(this)},Ae.add=function(a){if(a===null)return this;this._isFrozen&&Pn(this,a);var y=a;return tn(a)&&(y=Go(a)),this.Tb[y]===void 0&&(this.Sb++,a=new xo(a,a),this.Tb[y]=a,y=this.kf,y===null?this.ea=a:(a.ll=y,y.va=a),this.kf=a,this.xb()),this},Ae.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Pn(this),sn(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},Ae.contains=function(a){if(a===null)return!1;var y=a;return tn(a)&&(y=tr(a),y===void 0)?!1:this.Tb[y]!==void 0},Ae.has=function(a){return this.contains(a)},Ae.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Ae.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Ae.first=function(){var a=this.ea;return a===null?null:a.value},Un.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Un.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Un.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Un.prototype.map=function(a){for(var y=new Un,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Un.prototype.filter=function(a){for(var y=new Un,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Ae=Un.prototype,Ae.remove=function(a){if(a===null)return!1;this._isFrozen&&Pn(this,a);var y=a;if(tn(a)&&(y=tr(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},Ae.delete=function(a){return this.remove(a)},Ae.hp=function(a){if(a===null)return this;if(this._isFrozen&&Pn(this),sn(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},Ae.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Pn(this);var y=new Un;y.addAll(a),a=[];for(var x=this.iterator;x.next();){var E=x.value;y.contains(E)||a.push(E)}return this.hp(a),this},Ae.clear=function(){this._isFrozen&&Pn(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Un.prototype.copy=function(){var a=new Un,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Un.prototype.Fa=function(){var a=Array(this.Sb),y=this.Tb,x=0,E;for(E in y)a[x]=y[E].value,x++;return a},Un.prototype.Hv=function(){var a=new Vn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Io(a){a.__gohashid=ia++}function Go(a){var y=a.__gohashid;return y===void 0&&(y=ia++,a.__gohashid=y),y}function tr(a){return a.__gohashid}Qe.Object.defineProperties(Un.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return qr;var a=this.Sa;return a!==null?(a.reset(),a):new Xo(this)}}}),Un.prototype.toList=Un.prototype.Hv,Un.prototype.toArray=Un.prototype.Fa,Un.prototype.clear=Un.prototype.clear,Un.prototype.retainAll=Un.prototype.pA,Un.prototype.removeAll=Un.prototype.hp,Un.prototype.delete=Un.prototype.delete,Un.prototype.remove=Un.prototype.remove,Un.prototype.first=Un.prototype.first,Un.prototype.containsAny=Un.prototype.Ty,Un.prototype.containsAll=Un.prototype.Sy,Un.prototype.has=Un.prototype.has,Un.prototype.contains=Un.prototype.contains,Un.prototype.addAll=Un.prototype.addAll,Un.prototype.add=Un.prototype.add,Un.prototype.thaw=Un.prototype.ka,Un.prototype.freeze=Un.prototype.freeze;var ia=1;Un.className="Set",Un.uniqueHash=Io,Un.hashIdUnique=Go,Un.hashId=tr;function zo(a){this.ma=a,this.qa=a.Ja,this.sa=null}zo.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},zo.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)},zo.prototype.Ad=function(){return this.next()},zo.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},zo.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},zo.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},zo.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},zo.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Vn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},zo.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Vn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},zo.prototype.de=function(){this.value=this.key=null,this.qa=-1},zo.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Qe.Object.defineProperties(zo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),zo.prototype.first=zo.prototype.first,zo.prototype.hasNext=zo.prototype.Ad,zo.prototype.next=zo.prototype.next,zo.prototype.reset=zo.prototype.reset,zo.className="MapKeySetIterator";function Nr(a){Un.call(this),Io(this),this._isFrozen=!0,this.ma=a}Wt(Nr,Un),Ae=Nr.prototype,Ae.freeze=function(){return this},Ae.ka=function(){return this},Ae.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ae.add=function(){Et("This Set is read-only: "+this.toString())},Ae.contains=function(a){return this.ma.contains(a)},Ae.has=function(a){return this.contains(a)},Ae.remove=function(){Et("This Set is read-only: "+this.toString())},Ae.delete=function(a){return this.remove(a)},Ae.clear=function(){Et("This Set is read-only: "+this.toString())},Ae.first=function(){var a=this.ma.ea;return a!==null?a.key:null},Nr.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},Nr.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},Nr.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},Nr.prototype.map=function(a){for(var y=new Un,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},Nr.prototype.filter=function(a){for(var y=new Un,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},Nr.prototype.copy=function(){return new Nr(this.ma)},Nr.prototype.Iv=function(){var a=new Un,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Nr.prototype.Fa=function(){var a=this.ma.Tb,y=Array(this.ma.Sb),x=0,E;for(E in a)y[x]=a[E].key,x++;return y},Nr.prototype.Hv=function(){var a=new Vn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Qe.Object.defineProperties(Nr.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?qr:new zo(this.ma)}}}),Nr.prototype.toList=Nr.prototype.Hv,Nr.prototype.toArray=Nr.prototype.Fa,Nr.prototype.toSet=Nr.prototype.Iv,Nr.prototype.first=Nr.prototype.first,Nr.prototype.clear=Nr.prototype.clear,Nr.prototype.delete=Nr.prototype.delete,Nr.prototype.remove=Nr.prototype.remove,Nr.prototype.has=Nr.prototype.has,Nr.prototype.contains=Nr.prototype.contains,Nr.prototype.add=Nr.prototype.add,Nr.prototype.thaw=Nr.prototype.ka,Nr.prototype.freeze=Nr.prototype.freeze,Nr.className="MapKeySet";function Br(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Br.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Br.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)},Br.prototype.Ad=function(){return this.next()},Br.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},Br.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},Br.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},Br.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},Br.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Vn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Br.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Vn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Br.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Br.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Qe.Object.defineProperties(Br.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Br.prototype.first=Br.prototype.first,Br.prototype.hasNext=Br.prototype.Ad,Br.prototype.next=Br.prototype.next,Br.prototype.reset=Br.prototype.reset,Br.className="MapValueSetIterator";function xo(a,y){this.key=a,this.value=y,this.ll=this.va=null}xo.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},xo.className="KeyValuePair";function $o(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}$o.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},$o.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)},$o.prototype.Ad=function(){return this.next()},$o.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},$o.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},$o.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},$o.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},$o.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Vn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},$o.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Vn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},$o.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},$o.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Qe.Object.defineProperties($o.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),$o.prototype.first=$o.prototype.first,$o.prototype.hasNext=$o.prototype.Ad,$o.prototype.next=$o.prototype.next,$o.prototype.reset=$o.prototype.reset,$o.className="MapIterator";function $i(a){Io(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"&&Et("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ae=$i.prototype,Ae.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return this._isFrozen=!1,this},Ae.toString=function(){return"Map()#"+tr(this)},Ae.add=function(a,y){this._isFrozen&&Pn(this,a);var x=a;tn(a)&&(x=Go(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new xo(a,y),this.Tb[x]=a,x=this.kf,x===null?this.ea=a:(a.ll=x,x.va=a),this.kf=a,this.xb()):E.value=y,this},Ae.set=function(a,y){return this.add(a,y)},Ae.addAll=function(a){if(a===null)return this;if(sn(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 $i)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},Ae.first=function(){return this.ea},$i.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},$i.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},$i.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},$i.prototype.map=function(a){for(var y=new $i,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},$i.prototype.filter=function(a){for(var y=new $i,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Ae=$i.prototype,Ae.contains=function(a){var y=a;return tn(a)&&(y=tr(a),y===void 0)?!1:this.Tb[y]!==void 0},Ae.has=function(a){return this.contains(a)},Ae.I=function(a){var y=a;return tn(a)&&(y=tr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Ae.get=function(a){return this.I(a)},Ae.remove=function(a){if(a===null)return!1;this._isFrozen&&Pn(this,a);var y=a;if(tn(a)&&(y=tr(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},Ae.delete=function(a){return this.remove(a)},Ae.clear=function(){this._isFrozen&&Pn(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()},$i.prototype.copy=function(){var a=new $i,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},$i.prototype.Fa=function(){var a=this.Tb,y=Array(this.Sb),x=0,E;for(E in a){var b=a[E];y[x]=new xo(b.key,b.value),x++}return y},$i.prototype.Lf=function(){return new Nr(this)},Qe.Object.defineProperties($i.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return qr;var a=this.Sa;return a!==null?(a.reset(),a):new $o(this)}},iteratorKeys:{get:function(){return 0>=this.count?qr:new zo(this)}},iteratorValues:{get:function(){if(0>=this.count)return qr;var a=this.jf;return a!==null?(a.reset(),a):new Br(this)}}}),$i.prototype.toKeySet=$i.prototype.Lf,$i.prototype.toArray=$i.prototype.Fa,$i.prototype.clear=$i.prototype.clear,$i.prototype.delete=$i.prototype.delete,$i.prototype.remove=$i.prototype.remove,$i.prototype.get=$i.prototype.get,$i.prototype.getValue=$i.prototype.I,$i.prototype.has=$i.prototype.has,$i.prototype.contains=$i.prototype.contains,$i.prototype.first=$i.prototype.first,$i.prototype.addAll=$i.prototype.addAll,$i.prototype.set=$i.prototype.set,$i.prototype.add=$i.prototype.add,$i.prototype.thaw=$i.prototype.ka,$i.prototype.freeze=$i.prototype.freeze,$i.className="Map";function st(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Et("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var ra,va,Ma,Ps,Ha;st.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.h=function(a,y){return this.x=a,this.y=y,this},st.prototype.sg=function(a,y){return this.x=a,this.y=y,this},st.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},st.prototype.copy=function(){var a=new st;return a.x=this.x,a.y=this.y,a},Ae=st.prototype,Ae.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ae.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return Object.isFrozen(this)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ms(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;return(E=a[y++])&&(b=parseFloat(E)),new st(x,b)}return new st}function bo(a){return a.x.toString()+" "+a.y.toString()}Ae.toString=function(){return"Point("+this.x+","+this.y+")"},Ae.D=function(a){return a instanceof st?this.x===a.x&&this.y===a.y:!1},Ae.hi=function(a,y){return this.x===a&&this.y===y},Ae.Xa=function(a){return nt.B(this.x,a.x)&&nt.B(this.y,a.y)},Ae.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ae.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ae.offset=function(a,y){return this.x+=a,this.y+=y,this},st.prototype.rotate=function(a){if(a===0)return this;var y=this.x,x=this.y;if(y===0&&x===0)return this;if(360<=a?a-=360:0>a&&(a+=360),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));return this.x=a*y-E*x,this.y=E*y+a*x,this},Ae=st.prototype,Ae.scale=function(a,y){return this.x*=a,this.y*=y,this},Ae.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ae.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ae.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},Ae.ab=function(a){return wo(a.x-this.x,a.y-this.y)},Ae.direction=function(a,y){return wo(a-this.x,y-this.y)};function wo(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}Ae.Ry=function(a,y){return nt.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ae.fA=function(a,y,x,E){return nt.qh(a,y,x,E,this.x,this.y,this),this},Ae.gA=function(a,y){return nt.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ae.uA=function(a,y,x,E){return nt.No(this.x,this.y,a,y,x,E,this),this},Ae.vA=function(a,y){return nt.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ae.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},Ae.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},Ae.transform=function(a){return a.Ga(this),this};function Jr(a,y){return y.Cd(a),a}function ha(a,y,x,E,b,z){var ne=b-x,re=z-E,oe=ne*ne+re*re;x-=a,E-=y;var ue=-x*ne-E*re;return 0>=ue||ue>=oe?(ne=b-a,re=z-y,Math.min(x*x+E*E,ne*ne+re*re)):(a=ne*E-re*x,a*a/oe)}function Ia(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function Eo(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)}Ae.w=function(){return isFinite(this.x)&&isFinite(this.y)},st.alloc=function(){var a=Gr.pop();return a===void 0?new st:a},st.allocAt=function(a,y){var x=Gr.pop();return x===void 0?new st(a,y):(x.x=a,x.y=y,x)},st.free=function(a){Gr.push(a)},st.prototype.isReal=st.prototype.w,st.prototype.setSpot=st.prototype.yi,st.prototype.setRectSpot=st.prototype.xi,st.prototype.snapToGridPoint=st.prototype.vA,st.prototype.snapToGrid=st.prototype.uA,st.prototype.projectOntoLineSegmentPoint=st.prototype.gA,st.prototype.projectOntoLineSegment=st.prototype.fA,st.intersectingLineSegments=function(a,y,x,E,b,z,ne,re){return nt.Rl(a,y,x,E,b,z,ne,re)},st.prototype.compareWithLineSegmentPoint=st.prototype.Ry,st.compareWithLineSegment=function(a,y,x,E,b,z){return nt.Fl(a,y,x,E,b,z)},st.prototype.direction=st.prototype.direction,st.prototype.directionPoint=st.prototype.ab,st.prototype.normalize=st.prototype.normalize,st.prototype.distanceSquared=st.prototype.zd,st.prototype.distanceSquaredPoint=st.prototype.Bf,st.prototype.scale=st.prototype.scale,st.prototype.rotate=st.prototype.rotate,st.prototype.offset=st.prototype.offset,st.prototype.subtract=st.prototype.re,st.prototype.add=st.prototype.add,st.prototype.equalsApprox=st.prototype.Xa,st.prototype.equalTo=st.prototype.hi,st.prototype.equals=st.prototype.D,st.prototype.set=st.prototype.set,st.prototype.setTo=st.prototype.sg;var Gr=[];st.className="Point",st.parse=Ms,st.stringify=bo,st.distanceLineSegmentSquared=ha,st.distanceSquared=Ia,st.direction=Eo,st.Origin=ra=new st(0,0).ja(),st.InfiniteTopLeft=va=new st(-1/0,-1/0).ja(),st.InfiniteBottomRight=Ma=new st(1/0,1/0).ja(),st.SixPoint=Ps=new st(6,6).ja(),st.NoPoint=Ha=new st(NaN,NaN).ja(),st.parse=Ms,st.stringify=bo,st.distanceLineSegmentSquared=ha,st.distanceSquared=Ia,st.direction=Eo;function mi(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):Et("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var oo,ao,Ga,Ca,fa,Ka,Qa;mi.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},mi.prototype.h=function(a,y){return this.width=a,this.height=y,this},mi.prototype.sg=function(a,y){return this.width=a,this.height=y,this},mi.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},mi.prototype.copy=function(){var a=new mi;return a.width=this.width,a.height=this.height,a},Ae=mi.prototype,Ae.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ae.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return Object.isFrozen(this)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this};function Cs(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 mi(x,b)}return new mi}function ms(a){return a.width.toString()+" "+a.height.toString()}Ae.toString=function(){return"Size("+this.width+","+this.height+")"},Ae.D=function(a){return a instanceof mi?this.width===a.width&&this.height===a.height:!1},Ae.hi=function(a,y){return this.width===a&&this.height===y},Ae.Xa=function(a){return nt.B(this.width,a.width)&&nt.B(this.height,a.height)},Ae.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},Ae.w=function(){return isFinite(this.width)&&isFinite(this.height)},mi.alloc=function(){var a=Zs.pop();return a===void 0?new mi:a},mi.free=function(a){Zs.push(a)},mi.prototype.isReal=mi.prototype.w,mi.prototype.inflate=mi.prototype.Bc,mi.prototype.equalsApprox=mi.prototype.Xa,mi.prototype.equalTo=mi.prototype.hi,mi.prototype.equals=mi.prototype.D,mi.prototype.set=mi.prototype.set,mi.prototype.setTo=mi.prototype.sg;var Zs=[];mi.className="Size",mi.parse=Cs,mi.stringify=ms,mi.ZeroSize=oo=new mi(0,0).ja(),mi.OneSize=ao=new mi(1,1).ja(),mi.SixSize=Ga=new mi(6,6).ja(),mi.EightSize=Ca=new mi(8,8).ja(),mi.TenSize=fa=new mi(10,10).ja(),mi.InfiniteSize=Ka=new mi(1/0,1/0).ja(),mi.NoSize=Qa=new mi(NaN,NaN).ja(),mi.parse=Cs,mi.stringify=ms;function Bn(a,y,x,E){a===void 0?this.height=this.width=this.y=this.x=0:typeof a=="number"&&typeof y=="number"&&typeof x=="number"&&(0<=x||isNaN(x))&&typeof E=="number"&&(0<=E||isNaN(E))?(this.x=a,this.y=y,this.width=x,this.height=E):a instanceof st?(x=a.x,a=a.y,y instanceof st?(E=y.x,y=y.y,this.x=Math.min(x,E),this.y=Math.min(a,y),this.width=Math.abs(x-E),this.height=Math.abs(a-y)):y instanceof mi?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Et("Incorrect second argument supplied to Rect constructor "+y)):Et("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Ae=Bn.prototype,Ae.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ae.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function ys(a,y,x){a.width=y,a.height=x}Ae.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Ae.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ae.dd=function(a){return this.x=a.x,this.y=a.y,this},Ae.tA=function(a){return this.width=a.width,this.height=a.height,this},Bn.prototype.copy=function(){var a=new Bn;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ae=Bn.prototype,Ae.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ae.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return Object.isFrozen(this)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this};function oa(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var ne=0;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),new Bn(x,b,z,ne)}return new Bn}function hl(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ae.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ae.D=function(a){return a instanceof Bn?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ae.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Ae.Xa=function(a){return nt.B(this.x,a.x)&&nt.B(this.y,a.y)&&nt.B(this.width,a.width)&&nt.B(this.height,a.height)};function Ol(a,y){return nt.$(a.x,y.x)&&nt.$(a.y,y.y)&&nt.$(a.width,y.width)&&nt.$(a.height,y.height)}Ae.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ae.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},Ae.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},Ae.offset=function(a,y){return this.x+=a,this.y+=y,this},Ae.Bc=function(a,y){return as(this,y,a,y,a)},Ae.Co=function(a){return as(this,a.top,a.right,a.bottom,a.left)},Ae.Fv=function(a){return as(this,-a.top,-a.right,-a.bottom,-a.left)},Ae.Hz=function(a,y,x,E){return as(this,a,y,x,E)};function as(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}Ae.Ex=function(a){return yu(this,a.x,a.y,a.width,a.height)},Ae.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}Ae.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ae.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))}Ae.Ye=function(a){return fs(this,a.x,a.y,0,0)},Ae.ed=function(a){return fs(this,a.x,a.y,a.width,a.height)},Ae.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),fs(this,a,y,x,E)};function fs(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}Ae.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)}Ae.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ae.Mz=function(){return this.width===0&&this.height===0},Bn.alloc=function(){var a=ua.pop();return a===void 0?new Bn:a},Bn.allocAt=function(a,y,x,E){var b=ua.pop();return b===void 0?new Bn(a,y,x,E):b.h(a,y,x,E)},Bn.free=function(a){ua.push(a)},Qe.Object.defineProperties(Bn.prototype,{left:{get:function(){return this.x},set:function(a){this.x=a}},top:{get:function(){return this.y},set:function(a){this.y=a}},right:{get:function(){return this.x+this.width},set:function(a){this.x+=a-(this.x+this.width)}},bottom:{get:function(){return this.y+this.height},set:function(a){this.y+=a-(this.y+this.height)}},position:{get:function(){return new st(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new mi(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new st(this.x+this.width/2,this.y+this.height/2)},set:function(a){this.x=a.x-this.width/2,this.y=a.y-this.height/2}},centerX:{get:function(){return this.x+this.width/2},set:function(a){this.x=a-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(a){this.y=a-this.height/2}}}),Bn.prototype.isEmpty=Bn.prototype.Mz,Bn.prototype.isReal=Bn.prototype.w,Bn.intersectsLineSegment=function(a,y,x,E,b,z,ne,re){return nt.Fx(a,y,x,E,b,z,ne,re)},Bn.prototype.setSpot=Bn.prototype.yi,Bn.prototype.union=Bn.prototype.Kv,Bn.prototype.unionRect=Bn.prototype.ed,Bn.prototype.unionPoint=Bn.prototype.Ye,Bn.prototype.intersects=Bn.prototype.Vu,Bn.prototype.intersectsRect=Bn.prototype.Yc,Bn.prototype.intersect=Bn.prototype.Uu,Bn.prototype.intersectRect=Bn.prototype.Ex,Bn.prototype.grow=Bn.prototype.Hz,Bn.prototype.subtractMargin=Bn.prototype.Fv,Bn.prototype.addMargin=Bn.prototype.Co,Bn.prototype.inflate=Bn.prototype.Bc,Bn.prototype.offset=Bn.prototype.offset,Bn.prototype.contains=Bn.prototype.contains,Bn.prototype.containsRect=Bn.prototype.Re,Bn.prototype.containsPoint=Bn.prototype.ca,Bn.prototype.equalsApprox=Bn.prototype.Xa,Bn.prototype.equalTo=Bn.prototype.hi,Bn.prototype.equals=Bn.prototype.D,Bn.prototype.setSize=Bn.prototype.tA,Bn.prototype.setPoint=Bn.prototype.dd,Bn.prototype.set=Bn.prototype.set,Bn.prototype.setTo=Bn.prototype.sg;var Ao=null,Ea=null,ua=[];Bn.className="Rect",Bn.parse=oa,Bn.stringify=hl,Bn.contains=Ba,Bn.intersects=tu,Bn.ZeroRect=Ao=new Bn(0,0,0,0).ja(),Bn.NoRect=Ea=new Bn(NaN,NaN,NaN,NaN).ja(),Bn.parse=oa,Bn.stringify=hl,Bn.contains=Ba,Bn.intersects=tu;function hr(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):Et("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}hr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},hr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},hr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},hr.prototype.copy=function(){var a=new hr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ae=hr.prototype,Ae.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ae.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return Object.isFrozen(this)&&Et("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 hr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new hr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new hr(x,b);for(var ne=NaN;a[y]==="";)y++;return(E=a[y++])&&(ne=parseFloat(E)),isNaN(ne)?new hr(x,b):new hr(x,b,z,ne)}return new hr}function ss(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ae.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ae.D=function(a){return a instanceof hr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ae.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Ae.Xa=function(a){return nt.B(this.top,a.top)&&nt.B(this.right,a.right)&&nt.B(this.bottom,a.bottom)&&nt.B(this.left,a.left)},Ae.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},hr.alloc=function(){var a=ou.pop();return a===void 0?new hr:a},hr.free=function(a){ou.push(a)},hr.prototype.isReal=hr.prototype.w,hr.prototype.equalsApprox=hr.prototype.Xa,hr.prototype.equalTo=hr.prototype.hi,hr.prototype.equals=hr.prototype.D,hr.prototype.set=hr.prototype.set,hr.prototype.setTo=hr.prototype.sg;var sl=null,jl=null,ou=[];hr.className="Margin",hr.parse=Rs,hr.stringify=ss,hr.ZeroMargin=sl=new hr(0,0,0,0).ja(),hr.TwoMargin=jl=new hr(2,2,2,2).ja(),hr.parse=Rs,hr.stringify=ss;function Xi(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 ws,Us,$l,kl,Kl,Oo,ic,zl,Cn,Ln,ai,Ji,Gi,Ti,Ri,oi,Mi,ur,Hr,ga,Ko,Ya,Va,No,Qr,Fi,eo,Vo,ma,ya,Fo,aa,Do,Or,Aa,Wa;Xi.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Xi.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Xi.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Xi.prototype.copy=function(){var a=new Xi;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ae=Xi.prototype,Ae.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ae.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return Object.isFrozen(this)&&Et("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 ws;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 Kl;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 Cn;if(a==="BottomRight")return Ln;if(a==="TopSide")return ai;if(a==="LeftSide")return Ji;if(a==="RightSide")return Gi;if(a==="BottomSide")return Ti;if(a==="TopBottomSides")return Ri;if(a==="LeftRightSides")return oi;if(a==="TopLeftSides")return Mi;if(a==="TopRightSides")return ur;if(a==="BottomLeftSides")return Hr;if(a==="BottomRightSides")return ga;if(a==="NotTopSide")return Ko;if(a==="NotLeftSide")return Ya;if(a==="NotRightSide")return Va;if(a==="NotBottomSide")return No;if(a==="AllSides")return Qr;if(a==="Default")return Fi;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 Xi(x,b,z,ne)}return new Xi}function xu(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Ae.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(ws)?"None":this.D(Us)?"TopLeft":this.D($l)?"Top":this.D(kl)?"TopRight":this.D(Kl)?"Left":this.D(Oo)?"Center":this.D(ic)?"Right":this.D(zl)?"BottomLeft":this.D(Cn)?"Bottom":this.D(Ln)?"BottomRight":this.D(ai)?"TopSide":this.D(Ji)?"LeftSide":this.D(Gi)?"RightSide":this.D(Ti)?"BottomSide":this.D(Ri)?"TopBottomSides":this.D(oi)?"LeftRightSides":this.D(Mi)?"TopLeftSides":this.D(ur)?"TopRightSides":this.D(Hr)?"BottomLeftSides":this.D(ga)?"BottomRightSides":this.D(Ko)?"NotTopSide":this.D(Ya)?"NotLeftSide":this.D(Va)?"NotRightSide":this.D(No)?"NotBottomSide":this.D(Qr)?"AllSides":this.D(Fi)?"Default":"None"},Ae.D=function(a){return a instanceof Xi?(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},Ae.gv=function(){return new Xi(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Ae.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(eo))a=Ji;else if(a.D(Vo))a=Gi;else if(a.D(ma))a=ai;else if(a.D(ya))a=Ti;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Ae.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Ae.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Ae.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Ae.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Ae.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Xi.alloc=function(){var a=Qt.pop();return a===void 0?new Xi:a},Xi.free=function(a){Qt.push(a)},Xi.prototype.isDefault=Xi.prototype.Xb,Xi.prototype.isNone=Xi.prototype.ys,Xi.prototype.isSide=Xi.prototype.$c,Xi.prototype.isNoSpot=Xi.prototype.Mc,Xi.prototype.isSpot=Xi.prototype.sb,Xi.prototype.includesSide=Xi.prototype.Hf,Xi.prototype.opposite=Xi.prototype.gv,Xi.prototype.equals=Xi.prototype.D,Xi.prototype.set=Xi.prototype.set,Xi.prototype.setTo=Xi.prototype.sg;var Qt=[];Xi.className="Spot",Xi.parse=fl,Xi.stringify=xu,Xi.None=ws=La(new Xi(0,0,0,0),0).ja(),Xi.Default=Fi=La(new Xi(0,0,-1,0),-1).ja(),Xi.TopLeft=Us=new Xi(0,0,0,0).ja(),Xi.TopCenter=$l=new Xi(.5,0,0,0).ja(),Xi.TopRight=kl=new Xi(1,0,0,0).ja(),Xi.LeftCenter=Kl=new Xi(0,.5,0,0).ja(),Xi.Center=Oo=new Xi(.5,.5,0,0).ja(),Xi.RightCenter=ic=new Xi(1,.5,0,0).ja(),Xi.BottomLeft=zl=new Xi(0,1,0,0).ja(),Xi.BottomCenter=Cn=new Xi(.5,1,0,0).ja(),Xi.BottomRight=Ln=new Xi(1,1,0,0).ja(),Xi.MiddleTop=Fo=$l,Xi.MiddleLeft=aa=Kl,Xi.MiddleRight=Do=ic,Xi.MiddleBottom=Or=Cn,Xi.Top=ma=$l,Xi.Left=eo=Kl,Xi.Right=Vo=ic,Xi.Bottom=ya=Cn,Xi.TopSide=ai=La(new Xi(0,0,1,1),1).ja(),Xi.LeftSide=Ji=La(new Xi(0,0,1,2),1).ja(),Xi.RightSide=Gi=La(new Xi(0,0,1,4),1).ja(),Xi.BottomSide=Ti=La(new Xi(0,0,1,8),1).ja(),Xi.TopBottomSides=Ri=La(new Xi(0,0,1,9),1).ja(),Xi.LeftRightSides=oi=La(new Xi(0,0,1,6),1).ja(),Xi.TopLeftSides=Mi=La(new Xi(0,0,1,3),1).ja(),Xi.TopRightSides=ur=La(new Xi(0,0,1,5),1).ja(),Xi.BottomLeftSides=Hr=La(new Xi(0,0,1,10),1).ja(),Xi.BottomRightSides=ga=La(new Xi(0,0,1,12),1).ja(),Xi.NotTopSide=Ko=La(new Xi(0,0,1,14),1).ja(),Xi.NotLeftSide=Ya=La(new Xi(0,0,1,13),1).ja(),Xi.NotRightSide=Va=La(new Xi(0,0,1,11),1).ja(),Xi.NotBottomSide=No=La(new Xi(0,0,1,7),1).ja(),Xi.AllSides=Qr=La(new Xi(0,0,1,15),1).ja(),Aa=new Xi(.156,.156).ja(),Wa=new Xi(.844,.844).ja(),Xi.parse=fl,Xi.stringify=xu;function Yt(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}Yt.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},Yt.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},Yt.prototype.copy=function(){var a=new Yt;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},Yt.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},Yt.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},Yt.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},Yt.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},Yt.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},Yt.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},Yt.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},Yt.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},Ae=Yt.prototype,Ae.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ae.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ae.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)},Ae.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))},Ae.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))},Ae.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,ne=this.m12,re=this.m21,oe=this.m22,ue=this.dx,ce=this.dy,me=y*z+x*re+ue,we=y*ne+x*oe+ce,Fe=E*z+x*re+ue,De=E*ne+x*oe+ce;return x=y*z+b*re+ue,y=y*ne+b*oe+ce,z=E*z+b*re+ue,E=E*ne+b*oe+ce,b=Math.min(me,Fe),me=Math.max(me,Fe),Fe=Math.min(we,De),we=Math.max(we,De),b=Math.min(b,x),me=Math.max(me,x),Fe=Math.min(Fe,y),we=Math.max(we,y),b=Math.min(b,z),me=Math.max(me,z),Fe=Math.min(Fe,E),we=Math.max(we,E),a.h(b,Fe,me-b,we-Fe),a},Yt.alloc=function(){var a=Dn.pop();return a===void 0?new Yt:a},Yt.free=function(a){Dn.push(a)},Yt.prototype.transformRect=Yt.prototype.pp,Yt.prototype.transformPoint=Yt.prototype.Ga,Yt.prototype.scale=Yt.prototype.scale,Yt.prototype.translate=Yt.prototype.translate,Yt.prototype.rotate=Yt.prototype.rotate,Yt.prototype.invert=Yt.prototype.Vj,Yt.prototype.multiplyInverted=Yt.prototype.bv,Yt.prototype.multiply=Yt.prototype.multiply,Yt.prototype.reset=Yt.prototype.reset,Yt.prototype.isIdentity=Yt.prototype.ws,Yt.prototype.equals=Yt.prototype.D,Yt.prototype.setTransform=Yt.prototype.setTransform,Yt.prototype.set=Yt.prototype.set;var Dn=[];Yt.className="Transform",Yt.xF="54a702f3e53909c447824c6706603faf4c";var nt={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=nt.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);nt.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,ne){if(0>=b&&(b=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<E)var ue=y,ce=E;else ue=E,ce=y;if(a===x)return ue<=ne&&ne<=ce&&a-b<=z&&z<=a+b;if(y===E)return re<=z&&z<=oe&&y-b<=ne&&ne<=y+b;if(oe+=b,re-=b,re<=z&&z<=oe&&(ce+=b,ue-=b,ue<=ne&&ne<=ce))if(oe-re>ce-ue)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=ne&&ne<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(ne=(x-a)/(E-y)*(ne-y)+a,ne-b<=z&&z<=ne+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,ne,re,oe,ue,ce,me){if(nt.Yb(a,y,ne,re,me,x,E)&&nt.Yb(a,y,ne,re,me,b,z))return nt.Yb(a,y,ne,re,me,ue,ce);var we=(a+x)/2,Fe=(y+E)/2,De=(x+b)/2,_e=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(we+De)/2,x=(Fe+_e)/2,De=(De+b)/2,_e=(_e+z)/2;var pt=(E+De)/2,rt=(x+_e)/2;return nt.cs(a,y,we,Fe,E,x,pt,rt,oe,ue,ce,me)||nt.cs(pt,rt,De,_e,b,z,ne,re,oe,ue,ce,me)},ax:function(a,y,x,E,b,z,ne,re,oe){var ue=(x+b)/2,ce=(E+z)/2;return oe.h((((a+x)/2+ue)/2+(ue+(b+ne)/2)/2)/2,(((y+E)/2+ce)/2+(ce+(z+re)/2)/2)/2),oe},My:function(a,y,x,E,b,z,ne,re){var oe=(x+b)/2,ue=(E+z)/2;return Eo(((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(nt.Yb(a,y,ne,re,oe,x,E)&&nt.Yb(a,y,ne,re,oe,b,z))fs(ue,a,y,0,0),fs(ue,ne,re,0,0);else{var ce=(a+x)/2,me=(y+E)/2,we=(x+b)/2,Fe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ce+we)/2,x=(me+Fe)/2,we=(we+b)/2,Fe=(Fe+z)/2;var De=(E+we)/2,_e=(x+Fe)/2;nt.Dl(a,y,ce,me,E,x,De,_e,oe,ue),nt.Dl(De,_e,we,Fe,b,z,ne,re,oe,ue)}return ue},Qe:function(a,y,x,E,b,z,ne,re,oe,ue){if(nt.Yb(a,y,ne,re,oe,x,E)&&nt.Yb(a,y,ne,re,oe,b,z))ue.length===0&&(ue.push(a),ue.push(y)),ue.push(ne),ue.push(re);else{var ce=(a+x)/2,me=(y+E)/2,we=(x+b)/2,Fe=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(ce+we)/2,x=(me+Fe)/2,we=(we+b)/2,Fe=(Fe+z)/2;var De=(E+we)/2,_e=(x+Fe)/2;nt.Qe(a,y,ce,me,E,x,De,_e,oe,ue),nt.Qe(De,_e,we,Fe,b,z,ne,re,oe,ue)}return ue},jv:function(a,y,x,E,b,z,ne,re,oe,ue){if(nt.Yb(a,y,b,z,ue,x,E))return nt.Yb(a,y,b,z,ue,re,oe);var ce=(a+x)/2,me=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var we=(ce+x)/2,Fe=(me+E)/2;return nt.jv(a,y,ce,me,we,Fe,ne,re,oe,ue)||nt.jv(we,Fe,x,E,b,z,ne,re,oe,ue)},OA:function(a,y,x,E,b,z,ne){return ne.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),ne},iv:function(a,y,x,E,b,z,ne,re){if(nt.Yb(a,y,b,z,ne,x,E))fs(re,a,y,0,0),fs(re,b,z,0,0);else{var oe=(a+x)/2,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ce=(oe+x)/2,me=(ue+E)/2;nt.iv(a,y,oe,ue,ce,me,ne,re),nt.iv(ce,me,x,E,b,z,ne,re)}return re},ep:function(a,y,x,E,b,z,ne,re){if(nt.Yb(a,y,b,z,ne,x,E))re.length===0&&(re.push(a),re.push(y)),re.push(b),re.push(z);else{var oe=(a+x)/2,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ce=(oe+x)/2,me=(ue+E)/2;nt.ep(a,y,oe,ue,ce,me,ne,re),nt.ep(ce,me,x,E,b,z,ne,re)}return re},Eo:function(a,y,x,E,b,z,ne,re,oe,ue,ce,me,we,Fe){if(nt.Yb(a,y,ne,re,we,x,E)&&nt.Yb(a,y,ne,re,we,b,z))return!nt.Rl(a,y,ne,re,oe,ue,ce,me)||(we=(a-ne)*(ue-me)-(y-re)*(oe-ce),we===0)?!1:(Fe.h(((a*re-y*ne)*(oe-ce)-(a-ne)*(oe*me-ue*ce))/we,((a*re-y*ne)*(ue-me)-(y-re)*(oe*me-ue*ce))/we),!0);var De=(a+x)/2,_e=(y+E)/2,pt=(x+b)/2,rt=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(De+pt)/2,x=(_e+rt)/2,pt=(pt+b)/2,rt=(rt+z)/2;var bt=(E+pt)/2,It=(x+rt)/2,Rt=1/0,Kt=!1,fn=0,bi=0;return nt.Eo(a,y,De,_e,E,x,bt,It,oe,ue,ce,me,we,Fe)&&(a=(Fe.x-oe)*(Fe.x-oe)+(Fe.y-ue)*(Fe.y-ue),a<Rt&&(Rt=a,Kt=!0,fn=Fe.x,bi=Fe.y)),nt.Eo(bt,It,pt,rt,b,z,ne,re,oe,ue,ce,me,we,Fe)&&(Fe.x-oe)*(Fe.x-oe)+(Fe.y-ue)*(Fe.y-ue)<Rt&&(Kt=!0,fn=Fe.x,bi=Fe.y),Kt&&(Fe.x=fn,Fe.y=bi),Kt},Fo:function(a,y,x,E,b,z,ne,re,oe,ue,ce,me,we){var Fe=0;if(nt.Yb(a,y,ne,re,we,x,E)&&nt.Yb(a,y,ne,re,we,b,z)){if(we=(a-ne)*(ue-me)-(y-re)*(oe-ce),we===0)return Fe;var De=((a*re-y*ne)*(oe-ce)-(a-ne)*(oe*me-ue*ce))/we,_e=((a*re-y*ne)*(ue-me)-(y-re)*(oe*me-ue*ce))/we;if(De>=ce)return Fe;if((oe>ce?oe-ce:ce-oe)<(ue>me?ue-me:me-ue)){if(y<re?(oe=y,a=re):(oe=re,a=y),_e<oe||_e>a)return Fe}else if(a<ne?(oe=a,a=ne):oe=ne,De<oe||De>a)return Fe;0<we?Fe++:0>we&&Fe--}else{De=(a+x)/2,_e=(y+E)/2;var pt=(x+b)/2,rt=(E+z)/2;b=(b+ne)/2,z=(z+re)/2,E=(De+pt)/2,x=(_e+rt)/2,pt=(pt+b)/2,rt=(rt+z)/2;var bt=(E+pt)/2,It=(x+rt)/2;Fe+=nt.Fo(a,y,De,_e,E,x,bt,It,oe,ue,ce,me,we),Fe+=nt.Fo(bt,It,pt,rt,b,z,ne,re,oe,ue,ce,me,we)}return Fe},qh:function(a,y,x,E,b,z,ne){return nt.$(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)):nt.$(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 nt.B(a,x)&&nt.B(y,E)?(oe.h(a,y),!1):nt.$(b,ne)?nt.$(a,x)?(nt.qh(a,y,x,E,b,z,oe),!1):nt.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,oe):(re=(re-z)/(ne-b),nt.$(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),nt.$(re,ne)?(nt.qh(a,y,x,E,b,z,oe),!1):(b=(ne*a-re*b+z-y)/(ne-re),nt.$(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)):nt.qh(a,y,x,E,b,ne*(b-a)+y,oe))))},MA:function(a,y,x,E,b){return nt.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,ne,re,oe,ue){function ce(pt,rt){var bt=(pt-a)*(pt-a)+(rt-y)*(rt-y);bt<me&&(me=bt,oe.h(pt,rt))}var me=1/0;ce(oe.x,oe.y);var we=0,Fe=0,De=0,_e=0;if(b<ne?(we=b,Fe=ne):(we=ne,Fe=b),z<re?(De=b,_e=ne):(De=ne,_e=b),we=(Fe-we)/2+ue,ue=(_e-De)/2+ue,b=(b+ne)/2,z=(z+re)/2,we===0||ue===0)return oe;if(.5>(x>a?x-a:a-x)){if(we=1-(x-b)*(x-b)/(we*we),0>we)return oe;we=Math.sqrt(we),E=-ue*we+z,ce(x,ue*we+z),ce(x,E)}else{if(x=(E-y)/(x-a),E=1/(we*we)+x*x/(ue*ue),re=2*x*(y-x*a)/(ue*ue)-2*x*z/(ue*ue)-2*b/(we*we),we=re*re-4*E*(2*x*a*z/(ue*ue)-2*y*z/(ue*ue)+z*z/(ue*ue)+b*b/(we*we)-1+(y-x*a)*(y-x*a)/(ue*ue)),0>we)return oe;we=Math.sqrt(we),ue=(-re+we)/(2*E),ce(ue,x*ue-x*a+y),we=(-re-we)/(2*E),ce(we,x*we-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ne,re,oe){var ue=1e21,ce=a,me=y;if(nt.Ve(a,y,a,E,b,z,ne,re,oe)){var we=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z);we<ue&&(ue=we,ce=oe.x,me=oe.y)}return nt.Ve(x,y,x,E,b,z,ne,re,oe)&&(we=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),we<ue&&(ue=we,ce=oe.x,me=oe.y)),nt.Ve(a,y,x,y,b,z,ne,re,oe)&&(y=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),y<ue&&(ue=y,ce=oe.x,me=oe.y)),nt.Ve(a,E,x,E,b,z,ne,re,oe)&&(a=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),a<ue&&(ue=a,ce=oe.x,me=oe.y)),oe.h(ce,me),1e21>ue},us:function(a,y,x){return nt.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)||nt.Rl(a,y,oe,y,b,z,ne,re)||nt.Rl(oe,y,oe,ue,b,z,ne,re)||nt.Rl(oe,ue,a,ue,b,z,ne,re)||nt.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>=nt.Fl(a,y,x,E,b,z)*nt.Fl(a,y,x,E,ne,re)&&0>=nt.Fl(b,z,ne,re,a,y)*nt.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(nt.Vy(x,ue,b,a,y)),E-=Math.abs(b-ue),ue=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,ne=a*Math.cos(z),re=a*Math.sin(z),oe=-re,ue=ne*ne+oe*oe,ce=ue+ne*ne+oe*re;return ue=4/3*(Math.sqrt(2*ue*ce)-ce)/(ne*re-oe*ne),re=ne-ue*oe,ne=oe+ue*ne,oe=-ne,ue=z+y,z=Math.cos(ue),ue=Math.sin(ue),[E+a*Math.cos(y),b+a*Math.sin(y),E+re*z-ne*ue,b+re*ue+ne*z,E+re*z-oe*ue,b+re*ue+oe*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,ne){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var re=x;return x+b-a<b/2&&(re=x+b),a=E,E+z-y<z/2&&(a=E+z),ne.h(re,a),ne},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var ne=1,re=0;else ne=0,re=1;var oe=ne===0?a:y,ue=ne===0?x:E;return(ne===0?b:z)&&(ue=-ue),ne=re,x=ne===0?x:E,(ne===0?b:z)&&(x=-x),nt.az(oe,ne===0?a:y,ue,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var ne=y*E,re=-z+ne,oe=-z+Math.sqrt(a*a+ne*ne);y=re;for(var ue=0;9999999999>ue&&(y=.5*(re+oe),!(y===re||y===oe));++ue){var ce=a/(y+b),me=ne/(y+z);if(ce=ce*ce+me*me-1,0<ce)re=y;else if(0>ce)oe=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Pr,um:new Pr,Mf:new Pr,Nf:0,vm:100};nt.za=nt.AA;function qt(a){Io(this),this.l=2,a===void 0&&(a=qt.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===qt.o?this.ee=new Vn:(qt.V===null&&(qt.V=new Vn().freeze()),this.ee=qt.V),this.aq=this.ee.Ja,this.Ip=new Bn().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Us,this.gg=Ln,this.Rk=this.Sk=NaN,this.Uf=si}qt.prototype.copy=function(){var a=new qt;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===qt.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},qt.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},qt.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==qt.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},qt.prototype.ka=function(){if(Object.isFrozen(this)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==qt.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},qt.prototype.Xa=function(a){if(!(a instanceof qt))return!1;if(this.type!==a.type)return this.type===qt.j&&a.type===qt.o?sr(this,a):a.type===qt.j&&this.type===qt.o?sr(a,this):!1;if(this.type===qt.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 nt.B(this.startX,a.startX)&&nt.B(this.startY,a.startY)&&nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY)};function sr(a,y){return a.type!==qt.j||y.type!==qt.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&nt.B(a.startX,y.startX)&&nt.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ii&&nt.B(a.endX,y.endX)&&nt.B(a.endY,y.endY))))}qt.ia=function(a){return a.toString()},qt.prototype.qb=function(a){a.classType===qt&&(this.type=a)},qt.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case qt.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 qt.u:var y=new Bn(this.startX,this.startY,0,0);return y.Kv(this.endX,this.endY,0,0),0>a?"M"+y.x.toString()+" "+y.y.toString()+"H"+y.right.toString()+"V"+y.bottom.toString()+"H"+y.left.toString()+"z":"M"+y.x.toFixed(a)+" "+y.y.toFixed(a)+"H"+y.right.toFixed(a)+"V"+y.bottom.toFixed(a)+"H"+y.left.toFixed(a)+"z";case qt.F:if(y=new Bn(this.startX,this.startY,0,0),y.Kv(this.endX,this.endY,0,0),0>a)return a=y.left.toString()+" "+(y.y+y.height/2).toString(),"M"+a+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+(y.right.toString()+" "+(y.y+y.height/2).toString())+"A"+(y.width/2).toString()+" "+(y.height/2).toString()+" 0 0 1 "+a;var x=y.left.toFixed(a)+" "+(y.y+y.height/2).toFixed(a);return"M"+x+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+(y.right.toFixed(a)+" "+(y.y+y.height/2).toFixed(a))+"A"+(y.width/2).toFixed(a)+" "+(y.height/2).toFixed(a)+" 0 0 1 "+x;case qt.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()}},qt.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},qt.parse=function(a,y){function x(){return _e>=Rt-1?!0:ue[_e+1].match(Kt)!==null}function E(){return _e++,ue[_e]}function b(co){var Kr=parseFloat(E()),Fa=parseFloat(E());pt===pt.toLowerCase()&&(Kr=It.x+Kr,Fa=It.y+Fa),co.h(Kr,Fa)}function z(){return b(It),It}function ne(){return b(bt),bt}function re(){var co=rt.toLowerCase();return co!=="c"&&co!=="s"&&co!=="q"&&co!=="t"?It:new st(2*It.x-bt.x,2*It.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 ce=ue[a];if(ce.match(/(\.[0-9]*)(\.)/gm)!==null){oe=Si();for(var me="",we=!1,Fe=0;Fe<ce.length;Fe++){var De=ce[Fe];De!=="."||we?De==="."?(oe.push(me),me="."):me+=De:(we=!0,me+=De)}for(oe.push(me),ue.splice(a,1),ce=0;ce<oe.length;ce++)ue.splice(a+ce,0,oe[ce]);a+=oe.length-1,ki(oe)}}var _e=-1,pt="",rt="";oe=new st(0,0);var bt=new st(0,0),It=new st(0,0),Rt=ue.length;a=A1(null),we=me=ce=!1,Fe=!0,De=null;for(var Kt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(_e>=Rt-1);)if(rt=pt,pt=E(),pt!=="")switch(pt.toUpperCase()){case"X":Fe=!0,me=ce=!1;break;case"M":for(De=z(),a.mc===null||Fe===!0?(pp(a,De.x,De.y,ce,!me,we),Fe=!1):a.moveTo(De.x,De.y),oe.assign(It);!x();)De=z(),a.lineTo(De.x,De.y);break;case"L":for(;!x();)De=z(),a.lineTo(De.x,De.y);break;case"H":for(;!x();)It=new st((pt===pt.toLowerCase()?It.x:0)+parseFloat(E()),It.y),a.lineTo(It.x,It.y);break;case"V":for(;!x();)It=new st(It.x,(pt===pt.toLowerCase()?It.y:0)+parseFloat(E())),a.lineTo(It.x,It.y);break;case"C":for(;!x();){De=new st,b(De);var fn=ne(),bi=z();Kh(a,De.x,De.y,fn.x,fn.y,bi.x,bi.y)}break;case"S":for(;!x();)De=re(),fn=ne(),bi=z(),Kh(a,De.x,De.y,fn.x,fn.y,bi.x,bi.y);break;case"Q":for(;!x();)De=ne(),fn=z(),u0(a,De.x,De.y,fn.x,fn.y);break;case"T":for(;!x();)bt=De=re(),fn=z(),u0(a,De.x,De.y,fn.x,fn.y);break;case"B":for(;!x();){De=parseFloat(E()),fn=parseFloat(E()),bi=parseFloat(E());var Yi=parseFloat(E()),Wi=parseFloat(E()),hi=Wi,ei=!1;x()||(hi=parseFloat(E()),x()||(ei=parseFloat(E())!==0)),pt===pt.toLowerCase()&&(bi+=It.x,Yi+=It.y),a.arcTo(De,fn,bi,Yi,Wi,hi,ei)}break;case"A":for(;!x();)De=Math.abs(parseFloat(E())),fn=Math.abs(parseFloat(E())),bi=parseFloat(E()),Wi=Yi=!1,ei=hi=0,hi=E(),hi.length===1?(Yi=!!parseFloat(hi),Wi=!!parseFloat(E()),hi=parseFloat(E())):hi.length===2?(Yi=!!parseFloat(hi[0]),Wi=!!parseFloat(hi[1]),hi=parseFloat(E())):(Yi=!!parseFloat(hi[0]),Wi=!!parseFloat(hi[1]),hi=parseFloat(hi.slice(2))),ei=parseFloat(E()),pt===pt.toLowerCase()&&(hi=It.x+hi,ei=It.y+ei),It.h(hi,ei),wS(a,De,fn,bi,Yi,Wi,hi,ei);break;case"Z":PS(a),It.assign(oe);break;case"F":for(De="",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(Kt)===null)fn++;else{De=ue[_e+fn];break}De.match(/[Mm]/)?ce=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(De="",fn=1;ue[_e+fn];)if(ue[_e+fn].match(/[Ff]/)!==null)fn++;else if(ue[_e+fn].match(Kt)===null)fn++;else{De=ue[_e+fn];break}De.match(/[Mm]/)?me=!0:a.mc.isShadowed=!1}if(oe=a.os,c0=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},qt.Ha=function(a,y){for(var x=a.length,E=st.alloc(),b=0;b<x;b++){var z=a[b];E.x=z[0],E.y=z[1],y.Ga(E),z[0]=E.x,z[1]=E.y,E.x=z[2],E.y=z[3],y.Ga(E),z[2]=E.x,z[3]=E.y,E.x=z[4],E.y=z[5],y.Ga(E),z[4]=E.x,z[5]=E.y,E.x=z[6],E.y=z[7],y.Ga(E),z[6]=E.x,z[7]=E.y}st.free(E)},qt.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===qt.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},qt.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===qt.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var ne=E[z];ne._isInvalidBounds=!1,ne.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),kr(this,a,!1),fs(a,0,0,0,0),a.freeze()},qt.prototype.ix=function(){var a=new Bn;return kr(this,a,!0),a};function kr(a,y,x){switch(a.type){case qt.j:case qt.u:case qt.F:x?y.h(a.od,a.pd,0,0):fs(y,a.od,a.pd,0,0),fs(y,a.Dc,a.Ec,0,0);break;case qt.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):fs(y,z.startX,z.startY,0,0);for(var ne=z.segments.s,re=ne.length,oe=z.startX,ue=z.startY,ce=0;ce<re;ce++){var me=ne[ce];switch(me.type){case Ii:case _i:oe=me.endX,ue=me.endY,fs(y,oe,ue,0,0);break;case Wr:nt.Dl(oe,ue,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.5,y),oe=me.endX,ue=me.endY;break;case Zo:nt.iv(oe,ue,me.point1X,me.point1Y,me.endX,me.endY,.5,y),oe=me.endX,ue=me.endY;break;case Mr:case Er:var we=me.type===Mr?mr(me,z):yr(me,z,oe,ue),Fe=we.length;if(Fe===0){oe=me.type===Mr?me.centerX:me.endX,ue=me.type===Mr?me.centerY:me.endY,fs(y,oe,ue,0,0);break}me=null;for(var De=0;De<Fe;De++)me=we[De],nt.Dl(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.5,y);me!==null&&(oe=me[6],ue=me[7]);break;default:Et("Unknown Segment type: "+me.type)}}}break;default:Et("Unknown Geometry type: "+a.type)}}qt.prototype.normalize=function(){this._isFrozen&&Pn(this);var a=this.ix();return this.offset(-a.x,-a.y),new st(-a.x,-a.y)},qt.prototype.offset=function(a,y){return this._isFrozen&&Pn(this),this.transform(1,0,0,1,a,y),this},qt.prototype.scale=function(a,y){return this._isFrozen&&Pn(this),this.transform(a,0,0,y,0,0),this},qt.prototype.rotate=function(a,y,x){this._isFrozen&&Pn(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=Yt.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),Yt.free(E),this},Ae=qt.prototype,Ae.transform=function(a,y,x,E,b,z){switch(this.type){case qt.j:case qt.u:case qt.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 qt.o:for(var oe=this.figures.s,ue=oe.length,ce=0;ce<ue;ce++){var me=oe[ce];ne=me.startX,re=me.startY,me.startX=ne*a+re*x+b,me.startY=ne*y+re*E+z,me=me.segments.s;for(var we=me.length,Fe=0;Fe<we;Fe++){var De=me[Fe];switch(De.type){case Ii:case _i:ne=De.endX,re=De.endY,De.endX=ne*a+re*x+b,De.endY=ne*y+re*E+z;break;case Wr:ne=De.point1X,re=De.point1Y,De.point1X=ne*a+re*x+b,De.point1Y=ne*y+re*E+z,ne=De.point2X,re=De.point2Y,De.point2X=ne*a+re*x+b,De.point2Y=ne*y+re*E+z,ne=De.endX,re=De.endY,De.endX=ne*a+re*x+b,De.endY=ne*y+re*E+z;break;case Zo:ne=De.point1X,re=De.point1Y,De.point1X=ne*a+re*x+b,De.point1Y=ne*y+re*E+z,ne=De.endX,re=De.endY,De.endX=ne*a+re*x+b,De.endY=ne*y+re*E+z;break;case Mr:ne=De.centerX,re=De.centerY,De.centerX=ne*a+re*x+b,De.centerY=ne*y+re*E+z,y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),De.startAngle+=ne),0>a&&(De.startAngle=180-De.startAngle,De.sweepAngle=-De.sweepAngle),0>E&&(De.startAngle=-De.startAngle,De.sweepAngle=-De.sweepAngle),De.radiusX*=Math.sqrt(a*a+x*x),De.radiusY!==void 0&&(De.radiusY*=Math.sqrt(y*y+E*E));break;case Er:if(ne=De.endX,re=De.endY,De.endX=ne*a+re*x+b,De.endY=ne*y+re*E+z,De.radiusX===0||De.radiusY===0)break;y!==0&&(ne=180*Math.atan2(y,a)/Math.PI,0>ne&&(ne+=360),De.xAxisRotation+=ne),0>a&&(De.xAxisRotation=180-De.xAxisRotation,De.isClockwiseArc=!De.isClockwiseArc),0>E&&(De.xAxisRotation=-De.xAxisRotation,De.isClockwiseArc=!De.isClockwiseArc),De.radiusX*=Math.sqrt(a*a+x*x),De.radiusY*=Math.sqrt(y*y+E*E);break;default:Et("Unknown Segment type: "+De.type)}}}}return this._isInvalidBounds=!0,this},Ae.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 qt.j:return nt.Yb(x,E,b,z,y,a.x,a.y);case qt.u:var ne=Bn.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=ne.ca(a),Bn.free(ne),a;case qt.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 qt.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,ce,me,we=a.figures.s,Fe=we.length,De=0;De<Fe;De++){var _e=we[De],pt=!_e.isEvenOdd;if(_e.isFilled){if(E&&_e.ca(z,y,x))return!0;var rt=_e.segments;oe=_e.startX,ue=_e.startY;for(var bt=oe,It=ue,Rt=rt.s,Kt=0;Kt<=rt.length;Kt++){var fn=void 0;if(Kt!==rt.length){fn=Rt[Kt];var bi=fn.type;a=fn.endX,me=fn.endY}else bi=Ii,a=bt,me=It;switch(bi){case _i:if(bt=lr(z,y,ne,y,oe,ue,bt,It),isNaN(bt))return!0;re+=bt,bt=a,It=me;break;case Ii:if(oe=lr(z,y,ne,y,oe,ue,a,me),isNaN(oe))return!0;re+=oe;break;case Wr:ce=nt.Fo(oe,ue,fn.point1X,fn.point1Y,fn.point2X,fn.point2Y,a,me,ne,y,z,y,.5),re+=ce;break;case Zo:ce=nt.Fo(oe,ue,(oe+2*fn.point1X)/3,(ue+2*fn.point1Y)/3,(2*fn.point1X+a)/3,(2*fn.point1Y+me)/3,a,me,ne,y,z,y,.5),re+=ce;break;case Mr:case Er:bi=fn.type===Mr?mr(fn,_e):yr(fn,_e,oe,ue);var Yi=bi.length;if(Yi===0){if(oe=lr(z,y,ne,y,oe,ue,fn.type===Mr?fn.centerX:fn.endX,fn.type===Mr?fn.centerY:fn.endY),isNaN(oe))return!0;re+=oe;break}fn=null;for(var Wi=0;Wi<Yi;Wi++){if(fn=bi[Wi],Wi===0){if(ce=lr(z,y,ne,y,oe,ue,fn[0],fn[1]),isNaN(ce))return!0;re+=ce}ce=nt.Fo(fn[0],fn[1],fn[2],fn[3],fn[4],fn[5],fn[6],fn[7],ne,y,z,y,.5),re+=ce}fn!==null&&(a=fn[6],me=fn[7]);break;default:Et("Unknown Segment type: "+fn.type)}oe=a,ue=me}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(nt.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 Bi(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}Ae.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new st),this.type===qt.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],ue=oe.length;for(a=0;a<ue;a++){var ce=oe[a];if(ne+ce>=z)return E=z-ne,E=ce===0?0:E/ce,x=x[re],re=x[2*a],b=x[2*a+1],y.h(re+(x[2*a+2]-re)*E,b+(x[2*a+3]-b)*E),y;ne+=ce}}return y},Ae.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===qt.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},Ae.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===qt.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,ne=0,re=0;re<b;re++){var oe=E[re],ue=oe.length;for(a=0;a<ue;a++){var ce=oe[a];if(ne+ce>=z)return E=z-ne,E=ce===0?0:E/ce,ce=x[re],x=ce[2*a],re=ce[2*a+1],b=ce[2*a+2],a=ce[2*a+3],y[0]=x+(b-x)*E,y[1]=re+(a-re)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-re)?0:1>Math.abs(b-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=b-x?0:180:180*Math.atan2(a-re,b-x)/Math.PI,y;ne+=ce}}return y},Ae.xx=function(a){if(this.type===qt.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var ne=x;E=b}else ne=b,E=x;return a<=ne?ne===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-ne)}if(x===b)return y<E?ne=y:(ne=E,E=y),z<=ne?ne===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-ne);ne=(E-y)*(E-y)+(b-x)*(b-x);var re=st.alloc();return nt.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,st.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ne)}}else if(this.type===qt.u){ne=this.startX,re=this.startY;var oe=this.endX;if(b=this.endY,ne!==oe||re!==b){y=oe-ne,x=b-re,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,ne),oe),a=Math.min(Math.max(a,re),b),ne=Math.abs(E-ne),oe=Math.abs(E-oe),re=Math.abs(a-re),b=Math.abs(a-b);var ue=Math.min(ne,oe,re,b);if(ue===re)return E/z;if(ue===oe)return(y+a)/z;if(ue===b)return(2*y+x-E)/z;if(ue===ne)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=st.alloc(),b=1/0,re=ne=0,oe=y.length;for(var ce=ue=0,me=0;me<oe;me++)for(var we=y[me],Fe=x[me],De=we.length,_e=0;_e<De;_e+=2){var pt=we[_e],rt=we[_e+1];if(_e!==0){nt.qh(ue,ce,pt,rt,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-ce)*(E.y-ce))),re+=Fe[(_e-2)/2]}ue=pt,ce=rt}return st.free(E),a=ne/z,0>a?0:1<a?1:a}return 0};function wr(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===qt.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===qt.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===qt.F){var z=new So;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ne=new gr(Mr);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];nt.Qe(ne,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,E),ne=oe[6],z=oe[7]}}y.push(E),x.push(to(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),ne=b.startX,z=b.startY,re=ne,oe=z;for(var ue=b.segments.s,ce=ue.length,me=0;me<ce;me++){var we=ue[me];switch(we.type){case _i:4<=E.length&&(y.push(E),x.push(to(E))),E=[],E.push(we.endX),E.push(we.endY),ne=we.endX,z=we.endY,re=ne,oe=z;break;case Ii:E.push(we.endX),E.push(we.endY),ne=we.endX,z=we.endY;break;case Wr:nt.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:nt.ep(ne,z,we.point1X,we.point1Y,we.endX,we.endY,.5,E),ne=we.endX,z=we.endY;break;case Mr:var Fe=mr(we,b),De=Fe.length;if(De===0){E.push(we.centerX),E.push(we.centerY),ne=we.centerX,z=we.centerY;break}for(var _e=0;_e<De;_e++){var pt=Fe[_e];nt.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 Er:if(Fe=yr(we,b,ne,z),De=Fe.length,_e=we.endX,pt=we.endY,De===0){E.push(_e),E.push(pt),ne=_e,z=pt;break}for(_e=0;_e<De;_e++)pt=Fe[_e],nt.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:Et("Segment not of valid type: "+we.type)}we.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(to(E)))}}}function to(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var ne=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(Ia(x,E,ne,re))),x=ne,E=re}return y}Ae.add=function(a){return this.ee.add(a),this},Ae.pm=function(a,y,x,E,b,z,ne,re){return this._isFrozen&&Pn(this),this.fg=new Xi(a,y,b,z).freeze(),this.gg=new Xi(x,E,ne,re).freeze(),this},Qe.Object.defineProperties(qt.prototype,{_isFrozen:{get:function(){return(this.l&1)!==0},set:function(a){this.l=a?this.l|1:this.l&-2}},_isInvalidBounds:{get:function(){return(this.l&2)!==0},set:function(a){this.l=a?this.l|2:this.l&-3}},flattenedSegments:{get:function(){return wr(this),this.tk}},flattenedLengths:{get:function(){return wr(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===qt.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===qt.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&&Pn(this,a),this.na=a,a===qt.o?this.ee=new Vn:(qt.V===null&&(qt.V=new Vn().freeze()),this.ee=qt.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Pn(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Pn(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Pn(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Pn(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Pn(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Pn(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Pn(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Pn(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),qt.prototype.setSpots=qt.prototype.pm,qt.prototype.add=qt.prototype.add,qt.prototype.getFractionForPoint=qt.prototype.xx,qt.prototype.getPointAndAngleAlongPath=qt.prototype.Qu,qt.prototype.getAngleAlongPath=qt.prototype.wx,qt.prototype.getPointAlongPath=qt.prototype.Pu,qt.prototype.containsPoint=qt.prototype.ca,qt.prototype.transform=qt.prototype.transform,qt.prototype.rotate=qt.prototype.rotate,qt.prototype.scale=qt.prototype.scale,qt.prototype.offset=qt.prototype.offset,qt.prototype.normalize=qt.prototype.normalize,qt.prototype.computeBoundsWithoutOrigin=qt.prototype.ix,qt.prototype.equalsApprox=qt.prototype.Xa,qt.className="Geometry",qt.j=new wn(qt,"Line",0),qt.u=new wn(qt,"Rectangle",1),qt.F=new wn(qt,"Ellipse",2),qt.o=new wn(qt,"Path",3),qt.V=null,qt.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",qt.className="Geometry",qt.stringify=qt.ia,qt.fillPath=qt.nb,qt.parse=qt.parse,qt.Line=qt.j,qt.Rectangle=qt.u,qt.Ellipse=qt.F,qt.Path=qt.o;function So(a,y,x,E,b){Io(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 Vn,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},Ae=So.prototype,Ae.Xa=function(a){if(!(a instanceof So&&nt.B(this.startX,a.startX)&&nt.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},Ae.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},Ae.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},Ae.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},Ae.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},Ae.add=function(a){return this.pl.add(a),this},Ae.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,ne=b,re=this.segments.s,oe=re.length,ue=0;ue<oe;ue++){var ce=re[ue];switch(ce.type){case _i:z=ce.endX,ne=ce.endY,E=ce.endX,b=ce.endY;break;case Ii:if(nt.Yb(E,b,ce.endX,ce.endY,x,a,y))return!0;E=ce.endX,b=ce.endY;break;case Wr:if(nt.cs(E,b,ce.point1X,ce.point1Y,ce.point2X,ce.point2Y,ce.endX,ce.endY,.5,a,y,x))return!0;E=ce.endX,b=ce.endY;break;case Zo:if(nt.jv(E,b,ce.point1X,ce.point1Y,ce.endX,ce.endY,.5,a,y,x))return!0;E=ce.endX,b=ce.endY;break;case Mr:case Er:var me=ce.type===Mr?mr(ce,this):yr(ce,this,E,b),we=me.length,Fe=ce.type===Mr?ce.centerX:ce.endX,De=ce.type===Mr?ce.centerY:ce.endY;if(we===0){if(nt.Yb(E,b,Fe,De,x,a,y))return!0;E=Fe,b=De;break}for(Fe=null,De=0;De<we;De++)if(Fe=me[De],De===0&&nt.Yb(E,b,Fe[0],Fe[1],x,a,y)||nt.cs(Fe[0],Fe[1],Fe[2],Fe[3],Fe[4],Fe[5],Fe[6],Fe[7],.5,a,y,x))return!0;Fe!==null&&(E=Fe[6],b=Fe[7]);break;default:Et("Unknown Segment type: "+ce.type)}if(ce.isClosed&&(E!==z||b!==ne)&&nt.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&&Pn(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Pn(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Pn(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Pn(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Pn(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Pn(this,a),this.pl=a,this._isInvalidBounds=!0}}}),So.prototype.add=So.prototype.add,So.prototype.equalsApprox=So.prototype.Xa,So.className="PathFigure";function gr(a,y,x,E,b,z,ne,re){Io(this),a===void 0&&(a=Ii),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),ne===void 0&&(ne=0),a===Er?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof ne=="boolean"?ne&&(this.isLargeArc=!0):typeof ne=="number"&&ne&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Mr&&(z=Math.max(z,0)),this.Wh=z,typeof ne=="number"?(a===Mr&&(ne=Math.max(ne,0)),this.Pg=ne):this.Pg=0),this.ae=null}gr.prototype.copy=function(){var a=new gr;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},Ae=gr.prototype,Ae.Xa=function(a){if(!(a instanceof gr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case _i:case Ii:return nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY);case Wr:return nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY)&&nt.B(this.point1X,a.point1X)&&nt.B(this.point1Y,a.point1Y)&&nt.B(this.point2X,a.point2X)&&nt.B(this.point2Y,a.point2Y);case Zo:return nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY)&&nt.B(this.point1X,a.point1X)&&nt.B(this.point1Y,a.point1Y);case Mr:return nt.B(this.startAngle,a.startAngle)&&nt.B(this.sweepAngle,a.sweepAngle)&&nt.B(this.centerX,a.centerX)&&nt.B(this.centerY,a.centerY)&&nt.B(this.radiusX,a.radiusX)&&nt.B(this.radiusY,a.radiusY);case Er:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&nt.B(this.xAxisRotation,a.xAxisRotation)&&nt.B(this.endX,a.endX)&&nt.B(this.endY,a.endY)&&nt.B(this.radiusX,a.radiusX)&&nt.B(this.radiusY,a.radiusY);default:return!1}},Ae.qb=function(a){a.classType===gr&&(this.type=a)},Ae.toString=function(a){switch(a===void 0&&(a=-1),this.type){case _i:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ii:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Wr: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 Mr:a=0>a?"B"+this.startAngle.toString()+" "+this.sweepAngle.toString()+" "+this.centerX.toString()+" "+this.centerY.toString()+" "+this.radiusX.toString()+" "+this.radiusY.toString():"B"+this.startAngle.toFixed(a)+" "+this.sweepAngle.toFixed(a)+" "+this.centerX.toFixed(a)+" "+this.centerY.toFixed(a)+" "+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a);break;case Er:a=0>a?"A"+this.radiusX.toString()+" "+this.radiusY.toString()+" "+this.xAxisRotation.toString()+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toString()+" "+this.endY.toString():"A"+this.radiusX.toFixed(a)+" "+this.radiusY.toFixed(a)+" "+this.xAxisRotation.toFixed(a)+" "+(this.isLargeArc?1:0)+" "+(this.isClockwiseArc?1:0)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;default:a=this.type.toString()}return a+(this.isClosed?"z":"")},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return this._isFrozen=!1,this},Ae.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=nt.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var ne=Yt.alloc();ne.reset(),x<E?ne.scale(1,E/x):ne.scale(x/E,1),qt.Ha(z,ne),Yt.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,rt,bt){return(_e*bt<pt*rt?-1:1)*Math.acos((_e*rt+pt*bt)/(Math.sqrt(_e*_e+pt*pt)*Math.sqrt(rt*rt+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,ce=a.Ec,me=Math.cos(ne),we=Math.sin(ne),Fe=me*(x-ue)/2+we*(E-ce)/2;ne=-we*(x-ue)/2+me*(E-ce)/2;var De=Fe*Fe/(y*y)+ne*ne/(z*z);return 1<De&&(y*=Math.sqrt(De),z*=Math.sqrt(De)),De=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ne*ne-z*z*Fe*Fe)/(y*y*ne*ne+z*z*Fe*Fe)),isNaN(De)&&(De=0),re=De*y*ne/z,De=De*-z*Fe/y,isNaN(re)&&(re=0),isNaN(De)&&(De=0),x=(x+ue)/2+me*re-we*De,E=(E+ce)/2+we*re+me*De,ce=b(1,0,(Fe-re)/y,(ne-De)/z),me=(Fe-re)/y,ue=(ne-De)/z,Fe=(-Fe-re)/y,re=(-ne-De)/z,ne=b(me,ue,Fe,re),Fe=(me*Fe+ue*re)/(Math.sqrt(me*me+ue*ue)*Math.sqrt(Fe*Fe+re*re)),-1>=Fe?ne=Math.PI:1<=Fe&&(ne=0),!oe&&0<ne&&(ne-=2*Math.PI),oe&&0>ne&&(ne+=2*Math.PI),oe=y>z?1:y/z,Fe=y>z?z/y:1,y=nt.jx(0,0,y>z?y:z,ce,ce+ne,!0),z=Yt.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,Fe),qt.Ha(y,z),Yt.free(z),a.ae=y,a.ae}Qe.Object.defineProperties(gr.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&&Pn(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Pn(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Pn(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Pn(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Pn(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Pn(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Pn(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Pn(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Pn(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Xn(a,">= zero",gr,"radiusX"),this._isFrozen&&Pn(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Xn(a,">= zero",gr,"radiusY"),this._isFrozen&&Pn(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Pn(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&&Pn(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&&Pn(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&&Pn(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&&Pn(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),gr.prototype.equalsApprox=gr.prototype.Xa;var _i=new wn(gr,"Move",0),Ii=new wn(gr,"Line",1),Wr=new wn(gr,"Bezier",2),Zo=new wn(gr,"QuadraticBezier",3),Mr=new wn(gr,"Arc",4),Er=new wn(gr,"SvgArc",4);gr.className="PathSegment",gr.Move=_i,gr.Line=Ii,gr.Bezier=Wr,gr.QuadraticBezier=Zo,gr.Arc=Mr,gr.SvgArc=Er;function Tr(){this.H=null,this.xu=new st(0,0).freeze(),this.mt=new st(0,0).freeze(),this.Bp=this.Rq=0,this.Cp=1,this.xq="",this.Wr=this.Tp=!1,this.Rp=this.Ep=0,this.xg=this.nq=this.tq=!1,this.Zp=null,this.Rr=0,this.xd=this.Nr=null}Tr.prototype.copy=function(){var a=new Tr;return this.clone(a)},Tr.prototype.clone=function(a){return a.H=this.H,a.xu.assign(this.viewPoint),a.mt.assign(this.documentPoint),a.Rq=this.Rq,a.Bp=this.Bp,a.Cp=this.Cp,a.xq=this.xq,a.Tp=this.Tp,a.Wr=this.Wr,a.Ep=this.Ep,a.Rp=this.Rp,a.tq=this.tq,a.nq=this.nq,a.xg=this.xg,a.Zp=this.Zp,a.Rr=this.Rr,a.Nr=this.Nr,a.xd=this.xd,a},Tr.prototype.toString=function(){var a="^";return this.modifiers!==0&&(a+="M:"+this.modifiers),this.button!==0&&(a+="B:"+this.button),this.key!==""&&(a+="K:"+this.key),this.clickCount!==0&&(a+="C:"+this.clickCount),this.delta!==0&&(a+="D:"+this.delta),this.handled&&(a+="h"),this.bubbles&&(a+="b"),this.documentPoint!==null&&(a+="@"+this.documentPoint.toString()),a},Tr.prototype.So=function(a,y){var x=this.diagram;return x===null||ph(x,a,y),y},Tr.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(ph(x,a,y),y.assign(x.Ps(y))),y},Qe.Object.defineProperties(Tr.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},viewPoint:{get:function(){return this.xu},set:function(a){this.xu.assign(a)}},documentPoint:{get:function(){return this.mt},set:function(a){this.mt.assign(a)}},modifiers:{get:function(){return this.Rq},set:function(a){this.Rq=a}},button:{get:function(){return this.Bp},set:function(a){if(this.Bp=a,this.event===null)switch(a){case 0:this.buttons=1;break;case 1:this.buttons=4;break;case 2:this.buttons=2}}},buttons:{get:function(){return this.Cp},set:function(a){this.Cp=a}},key:{get:function(){return this.xq},set:function(a){this.xq=a}},down:{get:function(){return this.Tp},set:function(a){this.Tp=a}},up:{get:function(){return this.Wr},set:function(a){this.Wr=a}},clickCount:{get:function(){return this.Ep},set:function(a){this.Ep=a}},delta:{get:function(){return this.Rp},set:function(a){this.Rp=a}},isMultiTouch:{get:function(){return this.tq},set:function(a){this.tq=a}},handled:{get:function(){return this.nq},set:function(a){this.nq=a}},bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},event:{get:function(){return this.Zp},set:function(a){this.Zp=a}},isTouchEvent:{get:function(){var a=this.event;return a===null?!1:a.pointerType==="touch"||a.pointerType==="pen"}},timestamp:{get:function(){return this.Rr},set:function(a){this.Rr=a}},targetDiagram:{get:function(){return this.Nr},set:function(a){this.Nr=a}},targetObject:{get:function(){return this.xd},set:function(a){this.xd=a}},control:{get:function(){return(this.modifiers&1)!==0},set:function(a){this.modifiers=a?this.modifiers|1:this.modifiers&-2}},shift:{get:function(){return(this.modifiers&4)!==0},set:function(a){this.modifiers=a?this.modifiers|4:this.modifiers&-5}},alt:{get:function(){return(this.modifiers&2)!==0},set:function(a){this.modifiers=a?this.modifiers|2:this.modifiers&-3}},meta:{get:function(){return(this.modifiers&8)!==0},set:function(a){this.modifiers=a?this.modifiers|8:this.modifiers&-9}},left:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&1)!==0:this.button===0},set:function(a){this.buttons=a?this.buttons|1:this.buttons&-2}},right:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&2)!==0:this.button===2},set:function(a){this.buttons=a?this.buttons|2:this.buttons&-3}},middle:{get:function(){var a=this.event;return a===null||a.type!=="mousedown"&&a.type!=="mouseup"&&a.type!=="pointerdown"&&a.type!=="pointerup"?(this.buttons&4)!==0:this.button===1},set:function(a){this.buttons=a?this.buttons|4:this.buttons&-5}}}),Tr.prototype.getMultiTouchDocumentPoint=Tr.prototype.Bz,Tr.prototype.getMultiTouchViewPoint=Tr.prototype.So,Tr.className="InputEvent";function Rr(){this.H=null,this.xa="",this.ar=this.Lr=null}Rr.prototype.copy=function(){var a=new Rr;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Rr.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Qe.Object.defineProperties(Rr.prototype,{diagram:{get:function(){return this.H},set:function(a){this.H=a}},name:{get:function(){return this.xa},set:function(a){this.xa=a}},subject:{get:function(){return this.Lr},set:function(a){this.Lr=a}},parameter:{get:function(){return this.ar},set:function(a){this.ar=a}}}),Rr.className="DiagramEvent";function pr(){this.Fm=_o,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}pr.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},pr.prototype.copy=function(){var a=new pr;a.Fm=this.Fm,a.Qq=this.Qq,a.rf=this.rf,a.cc=this.cc,a.H=this.H,a.Qn=this.Qn;var y=this.Sn;return a.Sn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=tn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=tn(y)&&typeof y.J=="function"?y.J():y,a},pr.prototype.qb=function(a){a.classType===pr&&(this.change=a)},pr.prototype.toString=function(){var a="";return a=this.change===Na?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===Na?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=ir(this.object)),this.oldValue!==null&&(a+=" old: "+ir(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+ir(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},pr.prototype.I=function(a){return a?this.oldValue:this.newValue},pr.prototype.Dz=function(a){return a?this.oldParam:this.newParam},pr.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},pr.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},pr.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},pr.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Qe.Object.defineProperties(pr.prototype,{model:{get:function(){return this.cc},set:function(a){this.cc=a}},diagram:{get:function(){return this.H},set:function(a){this.H=a}},change:{get:function(){return this.Fm},set:function(a){this.Fm=a}},modelChange:{get:function(){return this.Qq},set:function(a){this.Qq=a}},propertyName:{get:function(){return this.rf},set:function(a){this.rf=a}},isTransactionFinished:{get:function(){return this.Fm===Na&&(this.rf==="CommittedTransaction"||this.rf==="FinishedUndo"||this.rf==="FinishedRedo")}},object:{get:function(){return this.Qn},set:function(a){this.Qn=a}},oldValue:{get:function(){return this.Sn},set:function(a){this.Sn=a}},oldParam:{get:function(){return this.Rn},set:function(a){this.Rn=a}},newValue:{get:function(){return this.Mn},set:function(a){this.Mn=a}},newParam:{get:function(){return this.Ln},set:function(a){this.Ln=a}}}),pr.prototype.redo=pr.prototype.redo,pr.prototype.canRedo=pr.prototype.canRedo,pr.prototype.undo=pr.prototype.undo,pr.prototype.canUndo=pr.prototype.canUndo,pr.prototype.getParam=pr.prototype.Dz,pr.prototype.getValue=pr.prototype.I,pr.prototype.clear=pr.prototype.clear;var Na=new wn(pr,"Transaction",-1),_o=new wn(pr,"Property",0),xa=new wn(pr,"Insert",1),$a=new wn(pr,"Remove",2);pr.className="ChangedEvent",pr.Transaction=Na,pr.Property=_o,pr.Insert=xa,pr.Remove=$a;function Po(){this.o=new Vn().freeze(),this.xa="",this.j=!1}Po.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},Po.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()},Po.prototype.canUndo=function(){return this.isComplete},Po.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()}},Po.prototype.canRedo=function(){return this.isComplete},Po.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()}},Po.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new $i,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 $i,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(Po.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}}}),Po.prototype.optimize=Po.prototype.ak,Po.prototype.redo=Po.prototype.redo,Po.prototype.canRedo=Po.prototype.canRedo,Po.prototype.undo=Po.prototype.undo,Po.prototype.canUndo=Po.prototype.canUndo,Po.prototype.clear=Po.prototype.clear,Po.className="Transaction";function Oa(){this.Pt=new Un,this.Jd=!1,this.u=new Vn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Vn().freeze(),this.hl=new Vn,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},Ae=Oa.prototype,Ae.Xw=function(a){this.Pt.add(a)},Ae.Rx=function(a){this.Pt.remove(a)},Ae.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},Ae.eb=function(a){return a===void 0&&(a=""),El(this,!0,a)},Ae.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}Ae.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 pr;for(E.change=Na,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Oa.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Po);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 Ar(){Io(this),this.H=Bc,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Tr,this.Zr=-1}Ar.prototype.toString=function(){return this.name!==""?this.name+" Tool":Ni(this.constructor)},Ar.prototype.updateAdornments=function(){},Ar.prototype.canStart=function(){return this.isEnabled},Ar.prototype.doStart=function(){},Ar.prototype.doActivate=function(){this.isActive=!0},Ar.prototype.doDeactivate=function(){this.isActive=!1},Ar.prototype.doStop=function(){},Ar.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Ar.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Ar.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Ar.prototype.doMouseMove=function(){},Ar.prototype.doMouseUp=function(){this.stopTool()},Ar.prototype.doMouseWheel=function(){},Ar.prototype.canStartMultiTouch=function(){return!0},Ar.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,st.allocAt(NaN,NaN)),E=y.So(1,st.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){a.Bw=a.scale;var b=E.x-x.x,z=E.y-x.y;a.Jw=Math.sqrt(b*b+z*z),y.bubbles=!1}st.free(x),st.free(E)},Ar.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,st.allocAt(NaN,NaN)),E=y.So(1,st.allocAt(NaN,NaN));if(x.w()&&E.w()&&(this.doCancel(),a.Ql("hasGestureZoom"))){var b=E.x-x.x,z=E.y-x.y;z=Math.sqrt(b*b+z*z)/a.Jw,b=new st((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var ne=a.commandHandler;if(z!==a.scale&&ne.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=b,ne.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}st.free(x),st.free(E)},Ar.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Ar.prototype.doKeyUp=function(){},Ar.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Ar.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Ar.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(Yr?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||(Yr?y.meta:y.control)||y.shift||a.clearSelection()}},Ar.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)}}}Ar.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}},Ar.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Ar.prototype.doCurrentObjectChanged=function(){},Ar.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)}}},Ar.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Ar.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=_n(function(){x.doWaitAfter(E)},a)},Ar.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ht.clearTimeout(this.Zr),this.Zr=-1},Ar.prototype.doWaitAfter=function(){},Ar.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},Ar.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(Ar.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}}}),Ar.prototype.startTransaction=Ar.prototype.Ea,Ar.className="Tool";function jo(){Ar.call(this),this.name="ToolManager",this.hb=new Vn,this.ob=new Vn,this.Hb=new Vn,this.F=this.V=850,this.o=new mi(2,2).ja(),this.Ha=5e3,this.ia=gl,this.u=Tc,this.Mp=this.j=null,this.zj=-1}Wt(jo,Ar),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 Bo&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ht.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=_n(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&&(ht.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 Bo&&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 wn(jo,"WheelScroll",0),rc=new wn(jo,"WheelZoom",1),ad=new wn(jo,"WheelNone",2),Tc=new wn(jo,"GestureZoom",3),oc=new wn(jo,"GestureCancel",4),vc=new wn(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 rs(){Ar.call(this),this.name="Dragging",this.u=this.Sw=this.ob=!0,this.o=this.Ha=this.V=this.Oe=null,this.Ym=this.Hb=!1,this.tl=new st(NaN,NaN),this.Fr=new st,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Un().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var du;Wt(rs,Ar),rs.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},rs.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},rs.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,(Yr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},rs.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),Xt=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,Xt=this,pn=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 fi?(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 Vi,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}rs.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},rs.prototype.Pd=function(a){return a===void 0?new dd(ra):this.isGridSnapEnabled?new dd(new st(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new dd(a.copy())},rs.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),ac(this),Kd(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<du.count){for(var y=du,x=y.length,E=0;E<x;E++){var b=y.M(E);Wu(b),su(b),ac(b),b.diagram.ug()}y.clear()}Wu(this),this.tl.h(NaN,NaN),pn!==null&&(pn.currentCursor=""),Xt=pn=null,su(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),dh(a,!0)},rs.prototype.stopTransaction=function(){var a=this.diagram,y=Ar.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=Xt;su(a),yc(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}rs.prototype.doCancel=function(){su(this),yc(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},rs.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},rs.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 $i,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 fi&&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 fi&&(x.value.point=new st(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Wu(a){if(a.draggedLink!==null){if(a.dragsLink&&a.Oe!==null){var y=a.Oe;y.diagram.remove(y.temporaryFromNode),y.diagram.remove(y.temporaryToNode),a.Oe.originalLink=null}a.draggedLink=null,a.Oe=null}}function Au(a,y,x){var E=a.diagram,b=a.startPoint,z=st.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),st.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Bl(E),E.hk())}rs.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 fi&&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),li(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&&Xt===null)return;var re=E!==null?E.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof po)){var oe=x.mouseDragOver;oe!==null&&(oe(b),ne=!0)}if(!a.isActive&&Xt===null||(a.doDragOver(y,E),!a.isActive&&Xt===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)}rs.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})},rs.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&&Xt===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 xr&&!(a instanceof po)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function ch(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(ue){return E.findValidLinkablePort(ue,x)});a=st.alloc();var z=1/0,ne=null;for(b=b.iterator;b.next();){var re=b.value;if(re.part!==null){var oe=re.ga(Oo,a);oe=y.Bf(oe),oe<z&&(ne=re,z=oe)}}return st.free(a),ne}function li(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)):Xr(b,ne,z,oe,re):Xr(b,null,null,null,null)}}}}rs.prototype.doDragOver=function(){};function mo(a,y){var x=a.diagram;a.dragsLink&&li(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;Ja(a,b,z),z=Fd(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Xt!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Di&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Xt!==null){for(a=Bn.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Di&&ot(x,E,a);Bn.free(a)}}}function Ja(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof po||(x=a.mouseDrop,x!==null&&x(y))}function ot(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 fi},!0,function(b){return b instanceof fi},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}rs.prototype.doDropOnto=function(){},rs.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;this.simulatedMouseMove(y.event,y.documentPoint,y.targetDiagram)||this.currentPart===null||this.draggedParts===null||(this.mayCopy()?(au(this,!1),$f(a,this.copiedParts),Au(this,this.copiedParts,!1),Kd(a,this.copiedParts)):this.mayMove()?(su(this),Au(this,this.draggedParts,!0)):this.mayDragOut()?(au(this,!1),Au(this,this.copiedParts,!1)):su(this),bd(this,a.lastInput.documentPoint))}},rs.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=a.lastInput;if(!this.simulatedMouseUp(y.event,y.documentPoint,y.targetDiagram)){y=!1;var x=this.mayCopy();if(x&&this.copiedParts!==null?(su(this),au(this,!0),$f(a,this.copiedParts),Au(this,this.copiedParts,!1),Kd(a,this.copiedParts),this.copiedParts!==null&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0}))):(y=!0,su(this),this.mayMove()&&(Au(this,this.draggedParts,!0),bd(this,a.lastInput.documentPoint))),this.Ym=!0,mo(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&tt(this),a.Ya(),Kd(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},rs.prototype.simulatedMouseMove=function(a,y,x){if(Xt===null)return!1;var E=Xt.diagram;x instanceof hn||(x=null);var b=pn;return x!==b&&(b!==null&&b!==E&&(b.ug(),Xt.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),pn=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)},rs.prototype.simulatedMouseUp=function(a,y,x){if(Xt===null)return!1;var E=pn,b=Xt.diagram;if(x===null)return Xt.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Xt.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;pn=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Rd(),du.contains(E)||du.add(E),E.doSimulatedDragEnter())}return x!==this.diagram?(a!==null?(a.targetTouches!==void 0&&(0<a.targetTouches.length?a=a.targetTouches[0]:0<a.changedTouches.length&&(a=a.changedTouches[0])),y=x.getMouse(a)):y===null&&(y=new st),x.lastInput.documentPoint=y,x.lastInput.viewPoint=x.op(y),x.lastInput.down=!1,x.lastInput.up=!0,a=x.toolManager.findTool("Dragging"),a!==null&&a.doSimulatedDrop(),a=Xt,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function tt(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Di&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}rs.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(Yr?!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())},rs.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())},rs.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())},rs.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},rs.prototype.Az=function(){return Xt},rs.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Xt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},rs.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),lu(a),a.animationManager.Cc(),a=Xt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},rs.prototype.doSimulatedDragLeave=function(){var a=Xt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},rs.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Xt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Ut(this,y.draggedParts.Lf(),!1,a.firstInput),Au(this,this.copiedParts,!1),bd(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},rs.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Xt;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"),Ut(this,y.draggedParts.Lf(),!0,a.lastInput),Au(this,this.copiedParts,!1);var E=new Un;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),mo(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 Ut(a,y,x,E){if(a.copiedParts===null){var b=a.diagram;if(!b.isReadOnly&&!b.isModelReadOnly){b.skipsUndoManager=!x,b.partManager.addsToTemporaryLayer=!x,a.startPoint=E.documentPoint,x=b.Kj(y,b,!0);var z=Bn.alloc();b=E=1/0;for(var ne=-1/0,re=-1/0,oe=y.iterator;oe.next();){var ue=oe.value;if(ue.isVisible()){var ce=ue.location;ue=ce.x,ce=ce.y,isNaN(ue)||isNaN(ce)||(ue<E&&(E=ue),ce<b&&(b=ce),ue>ne&&(ne=ue),ce>re&&(re=ce))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,ne-E,re-b),E=z.x+z.width/2,b=z.y+z.height/2,Bn.free(z),z=a.Fr,ne=new $i,re=st.alloc(),oe=y.iterator;oe.next();)ue=oe.value,ue instanceof fi&&ue.canCopy()&&(ce=x.I(ue),ce!==null&&(ce.points=ue.points,Yh(ce,z.x-E,z.y-b),ce.suspendsRouting=!0,ne.add(ce,a.Pd())));for(y=y.iterator;y.next();)ue=y.value,ue.Zc()&&ue.canCopy()&&(oe=x.I(ue),oe!==null&&(ue=ue.location,re.h(z.x-(E-ue.x),z.y-(b-ue.y)),oe.location=re,oe.Va(),ne.add(oe,a.Pd(re))));st.free(re),a.copiedParts=ne,Rc(a,ne.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Yh(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}rs.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},rs.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new st},Qe.Object.defineProperties(rs.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}}}),rs.prototype.getDraggingSource=rs.prototype.Az;var Xt=null,pn=null;rs.className="DraggingTool",du=new Vn,Vr("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),jo.prototype.doCancel=function(){Xt!==null&&Xt.doCancel(),Ar.prototype.doCancel.call(this)};function rn(){Ar.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new fi,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 Di,y=new Co,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=ao,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Di,y=new Co,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=ao,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 $i,this.Of=this.gj=this.Pf=null}Wt(rn,Ar),rn.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},rn.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ne=mi.alloc();ne.width=y.naturalBounds.width*z,ne.height=y.naturalBounds.height*z,E.desiredSize=ne,mi.free(ne),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Oo,z=st.alloc(),x.location=y.ga(Oo,z),st.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},rn.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=ao,y.fromSpot=ws,y.toSpot=ws),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},rn.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},rn.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Di){var y=this.targetPort.part;this.isForwards?this.copyPortProperties(y,this.targetPort,this.temporaryToNode,this.temporaryToPort,!0):this.copyPortProperties(y,this.targetPort,this.temporaryFromNode,this.temporaryFromPort,!1)}else this.isForwards?this.setNoTargetPortProperties(this.temporaryToNode,this.temporaryToPort,!0):this.setNoTargetPortProperties(this.temporaryFromNode,this.temporaryFromPort,!1);(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},rn.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Di))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Di)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},rn.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(me){return b.findValidLinkablePort(me,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var ne=z.value,re=ne.part;if(re instanceof Di){var oe=ne.ga(Oo,st.alloc()),ue=x.x-oe.x,ce=x.y-oe.y;st.free(oe),oe=ue*ue+ce*ce,oe<E&&(ue=this.validPortsCache.I(ne),ue!==null?ue&&(y=ne,E=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,ne)||!a&&this.isValidLink(re,ne,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ne,!0),y=ne,E=oe):this.validPortsCache.add(ne,!1))}}return y!==null&&(x=y.part,x instanceof Di&&(x.layer===null||x.layer.allowLink))?y:null},rn.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},rn.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},rn.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},rn.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Di))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Di))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},rn.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)},rn.prototype.isLabelDependentOnLink=function(a,y){if(a===null)return!1;var x=a.labeledLink;if(x===null)return!1;if(x===y)return!0;var E=new Un;return E.add(a),$n(this,x,y,E)};function $n(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),$n(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),$n(a,y.labeledLink,x,E))))}rn.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!Rn(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!Rn(this,a,y,x,!0)}if(E===Cg)return a===y?a=!0:(E=new Un,E.add(y),a=Yn(this,E,a,y,x)),!a;if(E===Eg)return!Rn(this,a,y,x,!1);if(E===bg)return a===y?a=!0:(E=new Un,E.add(y),a=Pi(this,E,a,y,x)),!a}return!0};function Rn(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&&Rn(a,ne,x,E,b)))return!0}return!1}function Yn(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&&Yn(a,y,ne,E,b)))return!0}return!1}function Pi(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var ne=z.value;if(ne!==b){var re=ne.fromNode;if(ne=ne.toNode,re=re===x?ne:re,re!==x&&Pi(a,y,re,E,b))return!0}}return!1}Qe.Object.defineProperties(rn.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}}}),rn.className="LinkingBaseTool";function Jn(){rn.call(this),this.name="Linking",this.V={},this.F=null,this.K=vi,this.Xd=null}Wt(Jn,rn),Jn.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;return a.isReadOnly||a.isModelReadOnly||!a.allowLink||!a.model.xs()||!a.lastInput.left||a.currentTool!==this&&!this.isBeyondDragSize()?!1:this.findLinkablePort()!==null},Jn.prototype.findLinkablePort=function(){var a=this.diagram,y=this.startObject;if(y===null&&(y=a.ic(a.firstInput.documentPoint,null,null)),y===null||(a=y.part,!(a instanceof Di)))return null;var x=this.direction;if(x===vi||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===vi||x===Ki)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},Jn.prototype.doActivate=function(){var a=this.diagram,y=this.findLinkablePort();y===null?this.stopTool():(this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.isForwards?(this.temporaryToNode!==null&&(this.temporaryToNode.location=a.lastInput.documentPoint),this.originalFromPort=y,y=this.originalFromPort.part,y instanceof Di&&(this.originalFromNode=y),this.copyPortProperties(this.originalFromNode,this.originalFromPort,this.temporaryFromNode,this.temporaryFromPort,!1)):(this.temporaryFromNode!==null&&(this.temporaryFromNode.location=a.lastInput.documentPoint),this.originalToPort=y,y=this.originalToPort.part,y instanceof Di&&(this.originalToNode=y),this.copyPortProperties(this.originalToNode,this.originalToPort,this.temporaryToNode,this.temporaryToPort,!0)),a.add(this.temporaryFromNode),this.temporaryFromNode&&this.temporaryFromNode.Va(),a.add(this.temporaryToNode),this.temporaryToNode&&this.temporaryToNode.Va(),this.temporaryLink!==null&&(this.temporaryFromNode!==null&&(this.temporaryLink.fromNode=this.temporaryFromNode),this.temporaryToNode!==null&&(this.temporaryLink.toNode=this.temporaryToNode),this.temporaryLink.isTreeLink=this.isNewTreeLink(),this.temporaryLink.bb(),a.add(this.temporaryLink)),this.isActive=!0)},Jn.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;a.remove(this.temporaryLink),a.remove(this.temporaryFromNode),a.remove(this.temporaryToNode),a.isMouseCaptured=!1,a.currentCursor="",this.stopTransaction()},Jn.prototype.doStop=function(){rn.prototype.doStop.call(this),this.startObject=null},Jn.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var ne=this.targetPort=this.findTargetPort(this.isForwards);if(ne!==null){var re=ne.part;re instanceof Di&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=re,b=ne):(y=re,x=ne,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(ne===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},Jn.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof fi)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},Jn.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},Jn.prototype.doNoLink=function(){},Qe.Object.defineProperties(Jn.prototype,{archetypeLinkData:{get:function(){return this.V},set:function(a){this.V=a}},archetypeLabelNodeData:{get:function(){return this.F},set:function(a){this.F=a}},direction:{get:function(){return this.K},set:function(a){this.K=a}},startObject:{get:function(){return this.Xd},set:function(a){this.Xd=a}}});var vi=new wn(Jn,"Either",0),or=new wn(Jn,"ForwardsOnly",0),Ki=new wn(Jn,"BackwardsOnly",0);Jn.className="LinkingTool",Jn.Either=vi,Jn.ForwardsOnly=or,Jn.BackwardsOnly=Ki;function Vi(){rn.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 Bn}Wt(Vi,rn),Vi.prototype.updateAdornments=function(a){if(a!==null&&a instanceof fi){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)}},Vi.prototype.makeAdornment=function(a,y){var x=new pa;return x.type=ui.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Vi.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},Vi.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 fi))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=oo),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=oo),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},Vi.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}},Vi.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()},Vi.prototype.doStop=function(){rn.prototype.doStop.call(this),this.handle=null},Vi.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 Di&&(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()}}},Vi.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},Vi.prototype.doNoRelink=function(){};function Xr(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(Vi.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}}}),Vi.className="RelinkingTool",Vr("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),Vr("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function rr(){Ar.call(this),this.name="LinkReshaping";var a=new Co;a.figure="Rectangle",a.desiredSize=Ga,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 st,this.Yq=new Vn}Wt(rr,Ar),rr.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:jr},rr.prototype.om=function(a,y){a.reshapingBehavior=y},rr.prototype.updateAdornments=function(a){if(a!==null&&a instanceof fi){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=ui.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);nt.B(oe.x,ue.x)&&nt.B(oe.y,ue.y)&&(ue=y.i(x-1)),nt.B(oe.x,ue.x)?(this.om(re,Uo),re.cursor="n-resize"):nt.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),nt.B(oe.x,ue.x)&&nt.B(oe.y,ue.y)&&(oe=y.i(z+1)),nt.B(oe.x,ue.x)?(this.om(re,Uo),re.cursor="n-resize"):nt.B(oe.y,ue.y)&&(this.om(re,vo),re.cursor="w-resize")):ne!==z&&(this.om(re,la),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 fi){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=Ar.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&&(_r(this,ne,E,b,z,!0)||_r(this,ne,E,b,z,!1))){var re=y.points.copy();_r(this,ne,E,b,z,!0)?(re.cd(x-2,new st(ne.x,(z.y+ne.y)/2)),re.cd(x+1,new st(z.x,(z.y+ne.y)/2))):(re.cd(x-2,new st((z.x+ne.x)/2,ne.y)),re.cd(x+1,new st((z.x+ne.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else ne=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(_r(this,E,b,z,ne,!0)||_r(this,E,b,z,ne,!1))&&(re=y.points.copy(),_r(this,E,b,z,ne,!0)?(re.cd(x-1,new st(E.x,(E.y+ne.y)/2)),re.cd(x+2,new st(ne.x,(E.y+ne.y)/2))):(re.cd(x-1,new st((E.x+ne.x)/2,E.y)),re.cd(x+2,new st((E.x+ne.x)/2,ne.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ne=st.alloc(),nt.qh(E.x,E.y,z.x,z.y,b.x,b.y,ne)&&ne.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),st.free(ne)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function _r(a,y,x,E,b,z){return z?Math.abs(y.y-x.y)<a.resegmentingDistance&&Math.abs(x.y-E.y)<a.resegmentingDistance&&Math.abs(E.y-b.y)<a.resegmentingDistance:Math.abs(y.x-x.x)<a.resegmentingDistance&&Math.abs(x.x-E.x)<a.resegmentingDistance&&Math.abs(E.x-b.x)<a.resegmentingDistance}rr.prototype.reshape=function(a){var y=this.adornedLink;y.uh();var x=this.handle.segmentIndex,E=this.Ru(this.handle);if(y.isOrthogonal)if(x===y.firstPickIndex+1)x=y.firstPickIndex+1,E===Uo?(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===Uo?(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);nt.B(z.x,b.x)&&nt.B(b.y,ne.y)?(nt.B(z.x,y.i(E-2).x)&&!nt.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),nt.B(ne.y,y.i(E+2).y)&&!nt.B(ne.x,y.i(E+2).x)?y.m(E+1,ne.x,a.y):y.L(E+1,ne.x,a.y)):nt.B(z.y,b.y)&&nt.B(b.x,ne.x)?(nt.B(z.y,y.i(E-2).y)&&!nt.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),nt.B(ne.x,y.i(E+2).x)&&!nt.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):nt.B(z.x,b.x)&&nt.B(b.x,ne.x)?(nt.B(z.x,y.i(E-2).x)&&!nt.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),nt.B(ne.x,y.i(E+2).x)&&!nt.B(ne.y,y.i(E+2).y)?y.m(E+1,a.x,ne.y):y.L(E+1,a.x,ne.y)):nt.B(z.y,b.y)&&nt.B(b.y,ne.y)&&(nt.B(z.y,y.i(E-2).y)&&!nt.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),nt.B(ne.y,y.i(E+2).y)&&!nt.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,st.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,st.alloc()),y.L(0,E.x,E.y),st.free(z),st.free(E)),E=y.toNode,b=y.toPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===y.pointsCount-2&&y.computeSpot(!1,b).Mc()&&(x=b.ga(Oo,st.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,st.alloc()),y.L(y.pointsCount-1,a.x,a.y),st.free(x),st.free(a));y.zf()},rr.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case la:return a;case Uo:return new st(y.i(x).x,a.y);case vo:return new st(a.x,y.i(x).y);default:case jr: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 jr=new wn(rr,"None",0),vo=new wn(rr,"Horizontal",1),Uo=new wn(rr,"Vertical",2),la=new wn(rr,"All",3);rr.className="LinkReshapingTool",rr.None=jr,rr.Horizontal=vo,rr.Vertical=Uo,rr.All=la,Vr("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function so(){Ar.call(this),this.name="Resizing",this.o=new mi(1,1).freeze(),this.j=new mi(9999,9999).freeze(),this.yg=new mi(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Co;a.alignmentFocus=Oo,a.figure="Rectangle",a.desiredSize=Ga,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new st,this.Dw=new mi,this.Tn=new st,this.rt=new mi(0,0),this.qt=new mi(1/0,1/0),this.pt=new mi(1,1)}Wt(so,Ar),so.prototype.updateAdornments=function(a){if(!(a===null||a instanceof fi)){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)}},so.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new pa,y.type=ui.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,Ln)),y.add(this.makeHandle(a,zl)),y.add(this.makeHandle(a,Fo)),y.add(this.makeHandle(a,Do)),y.add(this.makeHandle(a,Or)),y.add(this.makeHandle(a,aa))}else if(Zc(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},so.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},so.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 ui)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},so.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},so.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))},so.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},so.prototype.stopTransaction=function(){var a=this.diagram,y=Ar.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},so.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},so.prototype.doMouseMove=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,st.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),st.free(b)}},so.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.rt,x=this.qt,E=this.pt,b=this.adornedObject.qs(a.lastInput.documentPoint,st.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),st.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},so.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 po){var E=new Vn;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()}},so.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,ce=ne.y+ne.height,me=1;if(!z){me=ne.width;var we=ne.height;0>=me&&(me=1),0>=we&&(we=1),me=we/me}return we=st.alloc(),nt.No(a.x,a.y,re,oe,b.width,b.height,we),a=ne.copy(),0>=y.x?0>=y.y?(a.x=Math.max(we.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=Math.max(ue-a.x,x.width),a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width),a.x=ue-a.width,a.y=ce-a.height)):1<=y.y?(a.x=Math.max(we.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=Math.max(ue-a.x,x.width),a.height=Math.max(Math.min(we.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*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(me*a.width,E.height),x.height),a.width=a.height/me,a.y=oe+.5*(ce-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(we.x-re,E.width),x.width),a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=Math.max(ce-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width),a.y=ce-a.height)):1<=y.y?(a.width=Math.max(Math.min(we.x-re,E.width),x.width),a.height=Math.max(Math.min(we.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me):(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*a.width))):(a.width=Math.max(Math.min(we.x-re,E.width),x.width),z||(a.height=Math.max(Math.min(me*a.width,E.height),x.height),a.width=a.height/me,a.y=oe+.5*(ce-oe-a.height))):0>=y.y?(a.y=Math.max(we.y,ce-E.height),a.y=Math.min(a.y,ce-x.height),a.height=ce-a.y,z||(a.width=Math.max(Math.min(a.height/me,E.width),x.width),a.height=me*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/me,E.width),x.width),a.height=me*a.width,a.x=re+.5*(ue-re-a.width))),st.free(we),a},so.prototype.computeReshape=function(){var a=ii;return this.adornedObject instanceof Co&&(a=Ov(this.adornedObject)),!(a===nr||this.diagram.lastInput.shift)},so.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},so.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},so.prototype.computeCellSize=function(){var a=new mi(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(so.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}}}),so.className="ResizingTool",Vr("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Wo(){Ar.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new st,this.ue=null;var a=new Co;a.figure="Ellipse",a.desiredSize=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 st(NaN,NaN),this.u=0,this.F=50}Wt(Wo,Ar),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=ui.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 st(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Wo.prototype.stopTransaction=function(){var a=this.diagram,y=Ar.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",Vr("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function ka(){Ar.call(this),this.name="ClickSelecting"}Wt(ka,Ar),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 ho(){Ar.call(this),this.name="Action",this.pk=null}Wt(ho,Ar),ho.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},ho.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()},ho.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))}},ho.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()},ho.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())},ho.prototype.doStop=function(){this.pk=null},ho.className="ActionTool";function ko(){Ar.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new st(0,0)}Wt(ko,Ar),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 xr)x.Zc()&&(Zc(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);tn(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=st.allocAt(a.x,a.y);this.isGridSnapEnabled&&Gf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),st.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},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 fo(){Ar.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new xr;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}Wt(fo,Ar),fo.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))},fo.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},fo.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},fo.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=mi.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),mi.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},fo.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()},fo.prototype.computeBoxBounds=function(){var a=this.diagram;return new Bn(a.firstInput.documentPoint,a.lastInput.documentPoint)},fo.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),Yr?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 Vn,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(fo.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}}}),fo.className="DragSelectingTool";function Dr(){Ar.call(this),this.name="Panning",this.Xt=new st,this.xy=new st,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(ht.document,"scroll",a.Kw,!1),a.stopTool()}}Wt(Dr,Ar),Dr.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())},Dr.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ht.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Dr.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Dr.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Dr.prototype.doMouseMove=function(){this.move()},Dr.prototype.doMouseUp=function(){this.move(),this.stopTool()},Dr.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(Dr.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Dr.className="PanningTool",Vr("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),Vr("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),Vr("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),Vr("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),Vr("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Bo(){this.F=this.u=this.j=this.o=null}Qe.Object.defineProperties(Bo.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}}}),Bo.className="HTMLInfo";function ea(a,y,x){this.text=a,this.hx=y,this.visible=x}ea.className="ContextMenuButtonInfo";function Sa(){Ar.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new st,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Wt(Sa,Ar);function Pa(a){var y=new Bo;y.show=function(b,z,ne){ne.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},ls=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");ht.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",lo,!1),E.addEventListener(y,"selectstart",lo,!1),E.addEventListener(x,"contextmenu",lo,!1)),y.className="goCXforeground",x.className="goCXbackground",ht.document.body&&(ht.document.body.appendChild(y),ht.document.body.appendChild(x)),Za=y,Ls=x,qs=!0}function lo(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 Vt?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(Ar.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 Bo||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Ua(a,!0),a.isActive||a.stopTool())}Sa.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Ua(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=ls,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Vt?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 Bo&&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 Bo&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Es(a){var y=new Vn;return y.add(new ea("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new ea("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new ea("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new ea("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new ea("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new ea("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new ea("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new ea("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new ea("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new ea("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new ea("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new ea("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new ea("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=Es(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===ls){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&&ls===null&&As&&Pa(this),ls},set:function(a){a===null&&(qs=!0),ls=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var ls=null,qs=!1,Ls=null,Za=null;Sa.className="ContextMenuTool",Vr("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function sa(){Ar.call(this),this.name="TextEditing",this.Zh=new es,this.ia=null,this.V=Jo,this.vj=null,this.qa=Yo,this.u=1,this.F=!0,this.o=null,this.j=new Bo,this.kt=null,ds(this,this.j)}Wt(sa,Ar);function ds(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(ca)):b==="Tab"?(a.acceptText(ba),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Yo){var E=a.kt;a.qa===Ra&&(a.qa=os),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Yo){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 sa)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 ce=E.naturalBounds.width*ue+6,me=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,me=re.y*me-re.y*oe+re.offsetY-(.5*me-.5*oe)-oe/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*ue+"%",x.style.lineHeight="normal",x.style.width=ce+"px",x.style.left=(we-ce/2|0)-1+"px",x.style.top=(ne+me|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)}}}sa.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Vl&&Vl!==this&&(Vl.acceptText(cl),Vl&&Vl!==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===Jo&&!y.isSelected||this.starting===xs&&2>a.lastInput.clickCount)):!1},sa.prototype.doStart=function(){Vl=this,this.textBlock!==null&&this.doActivate()},sa.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 Bn(this.textBlock.ga(Us),this.textBlock.ga(Ln));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},sa.prototype.doCancel=function(){this.stopTool()},sa.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},sa.prototype.doMouseDown=function(){this.isActive&&this.acceptText(cl)},sa.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===os)&&(this.qa=us,el(this));break;case Ws:case ca:case ba:(ca!==a||this.textBlock.isMultiline!==!0)&&(this.qa===Ra||this.qa===Al||this.qa===os)&&(this.qa=us,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))}}sa.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)},sa.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},sa.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Yo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},sa.prototype.doStop=function(){Vl=null},sa.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)))},sa.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Qe.Object.defineProperties(sa.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)}}}),sa.prototype.measureTemporaryTextBlock=sa.prototype.Lx;var Ws=new wn(sa,"LostFocus",0),cl=new wn(sa,"MouseDown",1),ba=new wn(sa,"Tab",2),ca=new wn(sa,"Enter",3),wa=new wn(sa,"SingleClick",0),Jo=new wn(sa,"SingleClickSelected",1),xs=new wn(sa,"DoubleClick",2),Yo=new wn(sa,"StateNone",0),Ra=new wn(sa,"StateActive",1),os=new wn(sa,"StateEditing",2),us=new wn(sa,"StateValidating",3),Al=new wn(sa,"StateInvalid",4),bl=new wn(sa,"StateValidated",5),Vl=null;sa.className="TextEditingTool",sa.LostFocus=Ws,sa.MouseDown=cl,sa.Tab=ba,sa.Enter=ca,sa.SingleClick=wa,sa.SingleClickSelected=Jo,sa.DoubleClick=xs,sa.StateNone=Yo,sa.StateActive=Ra,sa.StateEditing=os,sa.StateValidating=us,sa.StateInvalid=Al,sa.StateValidated=bl,Vr("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function bs(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 Un,this.ce=new Ns,this.ce.Yd=this,this.Ei=new Un,this.pu=new Un,this.Sr=new Un,this.pr=new Un,a&&Object.assign(this,a)}bs.prototype.Xe=function(a){this.H=a},bs.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),ht.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Bl(x),Hd(x),a.zb=!1,y.start(),y.bc&&(Bs(a),x.Ya(),Vc(y,0),lu(x,!0),Gs(a),x.R("AnimationStarting",a)))}))}}function Fl(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function _c(a,y,x,E){a.isTicking||Fl(a)||y instanceof fi&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Ae=bs.prototype,Ae.fv=function(a){return this.ce.fv(a)},Ae.Xu=function(a){return this.ce.Xu(a)};function Fs(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 Vt&&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&&(Bs(b),lu(b.H),Gs(b)),ht.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),ht.requestAnimationFrame(function(){x()}))}function ks(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function Bs(a){if(!a.vq){var y=a.H;a.Ow=y.skipsUndoManager,a.cw=y.skipsModelSourceBindings,y.skipsUndoManager=!0,y.skipsModelSourceBindings=!0,a.vq=!0}}function Gs(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Ae.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)},Ae.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))},Ae.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),js(this,a))},Ae.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 ns(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],ce=y[2];return y=y[3],re===0||re===100?(z=oe,ne=ue):(ce===0||ce===100)&&(oe=z,ue=ne),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=b(x,z,oe-z,E)%360,ne=b(x,ne,ue-ne,E),re=b(x,re,ce-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ne+"%, "+re+"%, "+x+")"}function Ul(){function a(x,E,b,z,ne,re){x.position=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}var y=new $i;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("location",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!0):x.location=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:placeholder",function(x,E,b,z,ne,re){ne<re?x.mm(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re),!1):x.position=new st(z(ne,E.x,b.x-E.x,re),z(ne,E.y,b.y-E.y,re))}),y.add("position:nodeCollapse",function(x,E,b,z,ne,re){var oe=x.actualBounds,ue=b.actualBounds;b=ue.x+ue.width/2-oe.width/2,oe=ue.y+ue.height/2-oe.height/2,ne<re?x.mm(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re),!1):x.position=new st(z(ne,E.x,b-E.x,re),z(ne,E.y,oe-E.y,re))}),y.add("desiredSize",function(x,E,b,z,ne,re){x.desiredSize=new Bn(z(ne,E.width,b.width-E.width,re),z(ne,E.height,b.height-E.height,re))}),y.add("width",function(x,E,b,z,ne,re){x.width=z(ne,E,b-E,re)}),y.add("height",function(x,E,b,z,ne,re){x.height=z(ne,E,b-E,re)}),y.add("fill",function(x,E,b,z,ne,re){x.fill=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(bs.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&&Xn(a,">= 1",bs,"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}}}),bs.prototype.stopAnimation=bs.prototype.Cc;var Gu=null,Du=!1,ml=new wn(bs,"Default",1),Iu=new wn(bs,"AnimateLocations",2),Ou=new wn(bs,"None",3);bs.className="AnimationManager",bs.defineAnimationEffect=function(a,y){Du||(Ul(),Du=!0),Gu.add(a,y)},bs.Default=ml,bs.AnimateLocations=Iu,bs.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=ra,this.vc=new $i,this.Tt=new $i,this.yl=new Un,this.Ut=new Un,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),Bs(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}Ae=Ns.prototype,Ae.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 Vt&&(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),Bs(y),this.yl.each(function(E){E.data=null,a.add(E)}),Gs(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,Fs(y,this),this)},Ae.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Ae.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 Vt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof xr){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 Vt&&re instanceof st&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(ue.position),re=new Ku(oe,ue,z),ne.add(y,re);ne=oe[x],ne instanceof st&&!ne.w()&&ne.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof xr?re.Ku.location=zs(y.location):z&&(re.Ku[x]=zs(E))}function zs(a){return a instanceof st||a instanceof mi?a.copy():a}Ae.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Ae.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function $u(a,y){if(!a.Xk||y){var x=a.Yd;if(a.bc!==!1){var E=+new Date,b=E>a.cn?a.Gd:E-a.Qd;y&&(b=a.gw,b<a.Gd?(a.Qd=+new Date-b,a.cn=a.Qd+a.Gd):b=a.Gd),Bs(x),Vc(a,b),lu(a.H,!0),Gs(x),E>a.cn&&(a.ho&&!a.Wk?(a.Qd=+new Date,a.cn=a.Qd+a.Gd,a.Wk=!0):a.Ml(!1))}}}function Vc(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Vt&&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)}}}Ae.stop=function(){return this.bc?(this.Ml(!0),this):this},Ae.Ml=function(a){if(this.vu!==null&&this.vu.jo.remove(this.Nw),this.bc){var y=this.H,x=this.Yd;this.Xk=this.bc=x.Ok=!1,Bs(x);for(var E=this.vc,b=this.yl.iterator;b.next();)y.remove(b.value);for(b=this.Ut.iterator;b.next();)b.value.v();b=this.ho,E=E.iterator;for(var z=Gu;E.next();){var ne=E.key,re=E.value,oe=b?re.end:re.start,ue=b?re.start:re.end,ce=re.Ku,me;for(me in ue)if(z.get(me)!==null){var we=me;!re.Hu||we!=="position:nodeCollapse"&&we!=="position:placeholder"||(we="position"),z.get(we)(ne,oe[me],ce[me]!==void 0?ce[me]:re.Hu?oe[me]:ue[me],this.Lp,this.Gd,this.Gd,this)}re.Hu&&ce.location!==void 0&&ne instanceof xr&&(ne.location=ce.location),re.nv&&ne instanceof xr&&ne.Zb(!1)}if(y.As.clear(),dh(y,!1),y.Ya(),y.N(),lu(y,!0),x.defaultAnimation===this){for(me=x.pr.iterator;me.next();)b=me.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())}},Ae.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof po&&(E=y.placeholder),E!==null?(x=E.ga(Us),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new st(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof po)for(a=a.memberParts;a.next();)E=a.value,E instanceof Di&&this.Cj(E,y)},Ae.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof po&&(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 po)for(a=a.memberParts;a.next();)E=a.value,E instanceof Di&&this.Aj(E,y)}},Ae.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&&Xn(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:Et("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 Ku(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ku.className="AnimationState";function ku(a,y,x){this.xd=null,this.rf=a,this.so=x||Ys,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=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 Ss(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 wn(ku,"Default",1),vl=new wn(ku,"Immediate",2),Xs=new wn(ku,"Bundled",3);ku.className="AnimationTrigger",ku.Default=Ys,ku.Immediate=vl,ku.Bundled=Xs;function gs(a){Io(this),this.H=null,this.Pa=new Vn,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)}Ae=gs.prototype,Ae.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},Ae.Xe=function(a){this.H=a},Ae.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 po?b++:oe instanceof Di?E++:oe instanceof fi?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&&tr(E)&&(re+=" #"+tr(E)),x instanceof Di?re+=" "+ir(E):x instanceof fi&&(re+=" "+ir(x.fromNode)+" "+ir(x.toNode));return y+" "+this.Pa.count+": "+re},Ae.ic=function(a,y,x){if(y===void 0&&(y=null),x===void 0&&(x=null),this.Uh===!1)return null;var E=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(E=!0);for(var b=st.alloc(),z=this.Pa.s,ne=z.length;ne--;){var re=z[ne];if((E!==!0||wf(re)!==!1)&&re.isVisible()&&(b.assign(a),Jr(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return st.free(b),re}return st.free(b),null},Ae.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Vn||E instanceof Un||(E=new Un),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=st.alloc(),ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((b!==!0||wf(oe)!==!1)&&oe.isVisible()){z.assign(a),Jr(z,oe.oe);var ue=oe;oe.ji(z,y,x,E)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||E.add(ue))}}return st.free(z),E},Ae.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 Vn||b instanceof Un||(b=new Un),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var ne=this.Pa.s,re=ne.length;re--;){var oe=ne[re];if((z!==!0||wf(oe)!==!1)&&oe.isVisible()){var ue=oe;oe.Cf(a,y,x,E,b)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||b.add(ue))}}return b},Ae.Nu=function(a,y,x,E,b,z,ne){if(this.Uh===!1)return b;for(var re=this.Pa.s,oe=re.length;oe--;){var ue=re[oe];if((ne!==!0||wf(ue)!==!1)&&z(ue)&&ue.isVisible()){var ce=ue;ue.Cf(a,y,x,E,b)&&(y!==null&&(ce=y(ce)),ce===null||x!==null&&!x(ce)||b.add(ce))}}return b},Ae.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 Vn||b instanceof Un)&&(z=b),b=!0),z instanceof Vn||z instanceof Un||(z=new Un),this.Uh===!1)return z;var ne=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ne=!0);for(var re=st.alloc(),oe=st.alloc(),ue=this.Pa.s,ce=ue.length;ce--;){var me=ue[ce];if((ne!==!0||wf(me)!==!1)&&me.isVisible()){re.assign(a),Jr(re,me.oe),oe.h(a.x+y,a.y),Jr(oe,me.oe);var we=me;me.og(re,oe,x,E,b,z)&&(x!==null&&(we=x(we)),we===null||E!==null&&!E(we)||z.add(we))}}return st.free(re),st.free(oe),z},Ae.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Si();for(var b=Si(),z=0;z<E;z++){var ne=x[z];if(ne.vw=z,ne instanceof fi){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]);ki(a),ki(b)}}};function yl(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Ae.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=Bn.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ne,re,!0);if(Bn.free(re),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Su(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var ne=yl(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,ue=Bn.alloc(),ce=0;ce<z;ce++){var me=b[ce];E.contains(me)&&a.Oj(y,me,x,re,oe,ue,!1)}Bn.free(ue),y.globalAlpha=ne}}}Ae.Oj=function(a,y,x,E,b,z,ne){if(ne&&!wf(y))a.Hs(y);else{if(E!==null&&y instanceof fi&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(ne=!1,E=y.containingGroup;E!==null;)ne?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(ne=!0,z.assign(E.tb)),E=E.containingGroup;var re=y.actualBounds;if(E=!1,ne&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}E=!z.Re(re)}E&&(a.save(),a instanceof Da?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*b>x.Oq||re.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(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))}},Ae.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(_o,a,this,y,x,E,b)},Ae.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},Ae.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 po&&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(gs.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===""&&Et("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Et("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)&&Xn(a,"0 <= value <= 1",gs,"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))}}}),gs.prototype.findObjectsNear=gs.prototype.og,gs.prototype.findObjectsIn=gs.prototype.Cf,gs.prototype.findObjectsAt=gs.prototype.ji,gs.prototype.findObjectAt=gs.prototype.ic,gs.className="Layer";function hn(a,y){if(ip||(Yl(),ip=!0),Io(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(ht.document,"DOMContentLoaded",E,!1),x.setRTL()};ht.document.body!==null?this.setRTL():x.addEventListener(ht.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 vs,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"||ht.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 bs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Vn,a.pj=new $i,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new st(NaN,NaN).freeze(),a.du=new st(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new st(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new Yt,a.zu=new st(NaN,NaN).freeze(),a.ut=new Bn(NaN,NaN,NaN,NaN).freeze(),a.rj=new hr(0,0,0,0).freeze(),a.sj=Yd,a.nu=!1,a.Zt=null,a.fu=null,a.yh=iu,a.zk=Fi,a.Fg=iu,a.pq=Fi,a.yt=Us,a.Bt=Us,a.Fc=!0,a.pn=!1,a.De=new Un,a.Eh=new $i,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new hr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Tr,a.bq.diagram=a,a.Qg=new Tr,a.Qg.diagram=a,a.cj=new Tr,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Hp(a),a.ai=new Un,a.Ht=!0,a.uu=Ld,a.pw=!1,a.wu=wh,a.it="auto",a.Op="auto",a.zh=null,a.Fh=null,a.Bh=null,a.Qh=null,a.Oh=null,a.Nh=null,a.Qt=null,a.Lh=null,a.xt=!1,a.Mh=null,a.Ph=null,a.$h=null,a.Ch=null,a.Rt=!1,a.Yt={},a.oj=[null,null],a.Wg=!1,a.Iw=!1,a.ou=!1,a.lt=!1,a.rw=!0,a.ld=!1,a.$i=!1,a.Tw=!0,a.Ce=-2,a.Og=new $i,a.Xn=new Vn,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 hr(5).freeze(),a.Hw=new Un().freeze(),a.Nt=999999999,a.nw=new Un().freeze(),a.Zi=!0,a.Ee=!0,a.vd=!0,a.Be=!1,a.gf=!1,a.xh=!0,a.hf=!1,a.sy=new Un,a.ow=new Un,a.Xh=null,a.aw=new mi(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new st,bounds:new Bn,Py:new mi,bA:new mi,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Bn(NaN,NaN,NaN,NaN).freeze(),a.wo=new mi(NaN,NaN).freeze(),a.Sp=new Bn(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new $i;var y=new Di,x=new es;x.bind(new tl("text","",ir)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Di,x=new es,x.stroke="brown",x.bind(new tl("text","",ir)),y.add(x),a.Lg.add("Comment",y),y=new Di,y.selectable=!1,y.avoidable=!1,x=new Co,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new mi(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new $i,y=new po,y.selectionObjectName="GROUPPANEL",y.type=ui.Vertical,x=new es,x.font="bold 12pt sans-serif",x.bind(new tl("text","",ir)),y.add(x),x=new ui(ui.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 hr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new $i,y=new fi,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 fi,x=new Co,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new pa,y.type=ui.Auto,x=new Co,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Cu,x.margin=new hr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new pa,y.type=ui.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=Ha,a.Pw=!1,a.Mb=1,a.Yh=null,a.Oq=1,a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0,a.yq=1,a.tw=0,a.uw=new st,a.zy=500,a.wp=new st,a.wq=!1}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 Un().freeze(),a.nw=new Un().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],ne=a.Wa.length;if(y){for(y=0;y<ne;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==b&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<ne;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),fp(),a.Og.clear(),Fr=[],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 vs,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=ht.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=ht.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||Yr||(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||Et("Diagram setup requires an argument DIV."),a.Ka!==null&&Et("Diagram has already completed setup."),typeof y=="string"?a.Ka=ht.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Et("No DIV or DIV id supplied: "+y),a.Ka===null&&Et("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Et("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ht.ResizeObserver){var x=gn(function(){a.$b()},250);a.ol=new ht.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ht.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=ht.go;var b=new Gl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",ht.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=gn(function(){a.Yh=null,a.N()},300),a.Ov=gn(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=ht.document.elementFromPoint(ne.clientX,ne.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(ne.clientX,ne.clientY));var ue=a,ce=ne;oe&&oe.H&&(ce=ne,ue=oe.H),re.targetDiagram=ue,Uc(a,ce,re),re.targetObject=null,a.doMouseMove(),Tu(re,ne)}}},a.fk=function(ne){if(a.isEnabled){a.Vk=!0;var re=ne.pointerType==="touch"||ne.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[ne.pointerId],ne.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==ne.pointerId&&oe[0].pointerType===ne.pointerType)oe[1]!==null&&oe[1].pointerId===ne.pointerId&&(oe[1]=null);else{oe[0]=null,oe=_h(a,ne,!1,!0,!0,!1);var ue=ht.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(ht,"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(),er&&er.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}hn.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ht.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=ht.scrollX||ht.pageXOffset,y=ht.scrollY||ht.pageYOffset;this.ta.focus(),ht.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 gs;y.name="Background",a.Al(y),y=new gs,y.name="",a.Al(y),y=new gs,y.name="Foreground",a.Al(y),y=new gs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new gs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new gs,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 ui(ui.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 xr,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,ce=E.right+z.right;z=E.bottom+z.bottom;var me=b.x;E=b.y;var we=b.width,Fe=b.height,De=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 rt=pt;we<oe||Fe<ue?(pt=st.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==rt&&(pt.x=rt/b+ne,this.ju=rt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(pt.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=pt,st.free(pt),this.Ee=this.qr=!1):(pt=st.alloc(),a.uy&&this.allowHorizontalScroll&&(ne<me&&(this.position=pt.h(rt+ne,this.position.y)),ce>De&&(this.position=pt.h(-(y.scrollWidth-this.Aa)+rt-this.Aa/b+ce,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))),st.free(pt),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ce=E.right,De=b.right,z=E.bottom,_e=b.bottom,ne=E.x,me=b.x,re=E.y,E=b.y,we>=oe&&ne>=me&&ce<=De&&(x.style.width="1px"),Fe>=ue&&re>=E&&z<=_e&&(x.style.height="1px"))}},hn.prototype.computeBounds=function(a){return a===void 0&&(a=new Bn),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(sn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof fi||(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 fi||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Bn(NaN,NaN,0,0):x};function Vu(a,y){if((y||a.hf)&&!a.vb&&a.ta!==null&&a.documentBounds.w()){if(a.vb=!0,y){var x=a.initialPosition;if(x.w()){a.vb=!1,a.position=x;return}x=st.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Bn.allocAt(0,0,E.width,E.height);var b=st.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Bn.free(E),st.free(b),st.free(x)}x=a.yh,y&&a.Fg!==iu&&(x=a.Fg);var z=x!==iu?Wd(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var ne=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?Oo:oe),ff(a,a.documentBounds,b,ne,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,nt.B(z.x,x)&&nt.B(z.y,E)&&nt.B(z.width,b)&&nt.B(z.height,ne)||a.onViewportBoundsChanged(new Bn(x,E,b,ne),z,y,!1)}}function Wd(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),ne=a.ya+(a.Be?a.Db:0),re=z/b,oe=ne/E;return y===Ru?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Hh?(y=oe>re?(ne-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}hn.prototype.zoomToFit=function(){var a=this.sj;this.sj=Yd,this.scale=Wd(this,Ru),a!==Yd&&(Vu(this,!1),ff(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ae=hn.prototype,Ae.BA=function(a,y){y===void 0&&(y=Ru);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Ru||y===Hh)if(isNaN(x))b=this.viewportBounds.height*this.scale/E;else if(isNaN(E))b=this.viewportBounds.width*this.scale/x;else{b=this.Aa;var z=this.ya;b=y===Hh?z/E>b/x?(z-(this.Be?this.Db:0))/E:(b-(this.gf?this.Db:0))/x:Math.min(z/E,b/x)}this.scale=b,this.position=new st(a.x,a.y)}},Ae.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new st(x.x+(a.x*x.width+a.offsetX)-(y.x*E.width-y.offsetX),x.y+(a.y*x.height+a.offsetY)-(y.y*E.height-y.offsetY))},Ae.zz=function(a){if(a instanceof Vt){this.eq=a;var y=st.alloc();this.fq=this.op(a.ga(Us,y)),st.free(y)}else this.eq=null,this.fq=Ha};function ff(a,y,x,E,b,z){var ne=st.allocAt(a.pa.x,a.pa.y),re=ne.x,oe=ne.y;if(a.eq!==null){var ue=st.alloc();ue=a.eq.ga(Us,ue),re=ue.x-a.fq.x/a.scale,oe=ue.y-a.fq.y/a.scale,b=ws,st.free(ue)}(z||a.scrollMode===Yd)&&(b.sb()&&(x>y.width&&(re=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(oe=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(re=Math.min(re+x/2,y.right+Math.max(z,b.right)-x/2),re=Math.max(re,y.left-Math.max(z,b.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(oe=Math.min(oe+E/2,y.bottom+Math.max(x,b.bottom)-E/2),oe=Math.max(oe,y.top-Math.max(x,b.top)+E/2),oe-=E/2):oe>y.top?oe=y.top:oe<y.bottom-E&&(oe=y.bottom-E)),ne.x=isFinite(re)?re:-a.yb.left,ne.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ne),ne.x=y.x,ne.y=y.y),pl(a.Yd,a.pa,ne),a.pa.h(ne.x,ne.y),Jc(a),st.free(ne)}Ae.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 xr)return a}else if(a=Mc(this,a,function(x){return x.part}),a instanceof xr)return a;return null},Ae.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}Ae.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 xr&&E.canSelect()}:null,x)};function ld(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Vn||b instanceof Un||(b=new Un),Ml(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Ae.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Vn||E instanceof Un||(E=new Un),Ml(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Ae.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 xr&&(!x||b.canSelect())},y,E)},Ae.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Vn||b instanceof Un||(b=new Un),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},Ae.Nu=function(a,y,x,E,b,z){var ne=new Un;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 Vn||b instanceof Un||(b=new Un),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}Ae.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 xr&&(!E||z.canSelect())},x,b)},Ae.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 Vn||b instanceof Un)&&(z=b),b=!0),z instanceof Vn||z instanceof Un||(z=new Un),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 Vn||b instanceof Un)&&(z=b),b=!0),z instanceof Vn||z instanceof Un||(z=new Un),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),Yr&&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,Yr&&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 st(0,0);var x=y.getBoundingClientRect();return y=a.clientX-this.Aa/x.width*x.left,a=a.clientY-this.ya/x.height*x.top,this.Ab!==null?Jr(new st(y,a),this.Ab):new st(y,a)};function Uc(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,ne=0,re=0;E!==null&&(E=E.getBoundingClientRect(),ne=y.clientX-b/E.width*E.left,re=y.clientY-z/E.height*E.top),x.viewPoint.h(ne,re),a.Ab!==null?(y=st.allocAt(ne,re),a.Ab.Cd(y),x.documentPoint.assign(y),st.free(y)):x.documentPoint.h(ne,re)}function ph(a,y,x){if(a.oj[0]!==null){y=a.oj[y];var E=a.ta;E!==null&&(E=E.getBoundingClientRect(),x.h(y.clientX-a.Aa/E.width*E.left,y.clientY-a.ya/E.height*E.top))}}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())},Ae=hn.prototype,Ae.Pz=function(){return this.kg},Ae.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,lu(this),this.hf=!1,this.du=new st(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&_n(function(){E.ld=!1,Zl(y,"Model"),a(E)},1)},Ae.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;ht.requestAnimationFrame(function(){y.kg&&y.bd()})}},Ae.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&&Vu(a,!1))}function lu(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];yt(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=Bn.alloc(),x.assign(a.viewportBounds),a.hf||(ne=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,jh(a)),a.R("LayoutCompleted"),ud(a,!0,!1),Bn.free(x)):x.Ok&&x.Qw&&(a.Fg!==iu?a.scale=Wd(a,a.Fg):a.yh!==iu?a.scale=Wd(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Vu(a,!0)),z&&ne&&a.eb("Initial Layout"),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)}Vu(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Xc(a)}function 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 Un,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof po&&E.U&65536&&(E.U=E.U^65536)})}}Ae.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof po||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof po&&x.isVisible()&&hs(this,x);for(a.reset();a.next();)x=a.value,x instanceof fi&&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 hs(a,y){for(var x=Si(),E=Si(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof po?(St(z)||Tt(z)||Pf(z))&&hs(a,z):z instanceof fi?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(ki(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();ki(E)}Ae.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Ae.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Et("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,cs(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&&(Yt.prototype.Cd=Yt.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,cc(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break e;z=this.Ab,z.reset(),ne=this.Mb,re=this.pa;var oe=this.Ca,ue=Math.round(re.x*oe)/oe,ce=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-ue,-ce),a.setTransform(ne,0,0,ne,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),nu(this,a),re=0;re<b;re++)a.setTransform(ne,0,0,ne,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[re].gc(a,this);if(y=!1,this.Yf?Jd(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(Yt.prototype.Cd=Yt.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=er&&er.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&&Et("No canvas specified"),ne===void 0&&(ne=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),ue===void 0&&(ue=!1),cc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ce=a.Ca;a.Ca=b;var me=a.Wa.s,we=me.length;try{var Fe=new Bn(z.x,z.y,E.width/b,E.height/b),De=Fe.copy();De.Co(x),Xc(a,De),Ml(a),a.Fd(me,we,a,Fe),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,E.width,E.height));var _e=a.Mb;y.scale(_e,_e);var pt=Yt.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 Da&&cs(y,pt.m11,pt.m12,pt.m21,pt.m22,pt.dx,pt.dy),Yt.free(pt),nu(a,y),y.globalAlpha=a.pb;var rt=a.Qj("Grid");if(ne){var bt=new Un,It=ne.iterator;for(It.reset();It.next();){var Rt=It.value;Rt instanceof xr&&(ue||Rt.layer!==rt)&&(Rt.Gj(),bt.add(Rt))}for(ue=0;ue<we;ue++)Su(me[ue],y,a,bt,oe);bt.each(function(fn){return fn.Gj()})}else for(bt=0;bt<we;bt++){var Kt=me[bt];Kt===rt?ue&&Kt.gc(y,a,!0):Kt.gc(y,a,oe)}a.$i=!1,a.Yf&&Jd(a.Yf,a)&&a.Vp()}finally{a.Ca=ce,a.ib.Vc(!0),a.vd=!0,a.Fd(me,we,a,a.viewportBounds),Xc(a),a.ib instanceof Da&&(a.ib.Nj.PA(),a.redraw())}}}Ae.Gf=function(a){return this.Rg[a]},Ae.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Ae.Tx=function(){this.Rg=new Pr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(Yr||io),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))}Ae.Ql=function(a){return this.on[a]},Ae.sA=function(a,y){this.on[a]=y},Ae.Sx=function(){this.on=new Pr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Ae.set=function(a){return Object.assign(this,a),this},Ae.Du=function(a){return this.nm(a)},Ae.nm=function(a){return uc(this,a),this};function uc(a,y){var x=a instanceof ui,E=a instanceof hn,b;for(b in y){b===""&&Et("Setting properties requires non-empty property names");var z=a,ne=b;if(x||E){var re=b.indexOf(".");if(0<re){var oe=b.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),tn(z)?ne=b.substr(re+1):Et("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ne[0]!=="_"&&!zr(z,ne))if(E&&ne==="ModelChanged"){a.Yw(y[ne]);continue}else if(E&&ne==="Changed"){a.Pe(y[ne]);continue}else if(E&&zr(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 Et('Trying to set undefined property "'+ne+'" on object: '+z.toString());z[ne]=y[b],ne[0]==="_"&&z instanceof Vt&&z.Vw(ne)}}Ae.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new $i,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Ae.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=Bn.alloc(),yg(this,this.computeBounds(E)),Bn.free(E)),E=this.ta,E===null||E instanceof Qo)))){var ne=this.Mb;b=this.Aa*ne;var re=this.ya*ne,oe=this.scale*ne;z=Math.round(Math.round(y.x*oe)-Math.round(a.x*oe)),y=Math.round(Math.round(y.y*oe)-Math.round(a.y*oe)),oe=this.jw,a=this.oy,oe.width!==b&&(oe.width=b),oe.height!==re&&(oe.height=re),a.clearRect(0,0,b,re),oe=190*ne;var ue=70*ne,ce=Math.max(z,0),me=Math.max(y,0),we=Math.floor(b-ce),Fe=Math.floor(re-me);a.drawImage(E.Oa,ce,me,we,Fe,0,0,we,Fe),Jd(this.Yf,this)&&a.clearRect(0,0,oe,ue),E=Si(),a=Si(),Fe=Math.abs(z),we=Math.abs(y);var De=ce===0?0:b-Fe;ce=st.allocAt(De,0),Fe=st.allocAt(Fe+De,re),a.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y)));var _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),Jr(ce,_e),Jr(Fe,_e),E.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),De=me===0?0:re-we,ce.h(0,De),Fe.h(b,we+De),a.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Jr(ce,_e),Jr(Fe,_e),E.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Jd(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,ce.h(b,re),Fe.h(oe+b,ue+re),a.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y))),Jr(ce,_e),Jr(Fe,_e),E.push(new Bn(Math.min(ce.x,Fe.x),Math.min(ce.y,Fe.y),Math.abs(ce.x-Fe.x),Math.abs(ce.y-Fe.y)))),st.free(ce),st.free(Fe),ud(this,!1,!0),this.Ka===null&&Et("No div specified"),this.ta===null&&Et("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),me=ne.Zq,me.length=0,ce=this.scale,we=Bn.alloc(),Fe=ne.Pa.s,_e=Fe.length,De=oe.length;for(var pt=0;pt<_e;pt++){var rt=Fe[pt],bt=eg(rt,rt.actualBounds);e:{for(var It=2/ce,Rt=4/ce,Kt=0;Kt<De;Kt++){var fn=oe[Kt];if(fn.width!==0&&fn.height!==0&&bt.Vu(fn.x-It,fn.y-It,fn.width+Rt,fn.height+Rt)){bt=!0;break e}}bt=!1}bt&&ne.Oj(b,rt,this,me,ce,we,!0)}Bn.free(we),b.globalAlpha=ue}b.restore(),b.Vc(!0),this.Yf&&Jd(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ki(E),ki(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,ce=a.viewportBounds;b=ce.x;var me=ce.y,we=ce.width,Fe=ce.height;if((oe!==x+ne||ue!==E+re)&&(a.gf=!1,a.Be=!1,re=ne=0,a.Aa=oe,a.ya=ue,z=a.pn=!0,Jc(a)),!a.hf||!a.viewportBounds.w())return!0;var De=a.ku,_e=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var pt=a.documentBounds,rt=0,bt=0,It=0,Rt=0,Kt=ce.width,fn=ce.height,bi=a.rj;a.contentAlignment.sb()?(pt.width>Kt&&(rt=bi.left,bt=bi.right),pt.height>fn&&(It=bi.top,Rt=bi.bottom)):(rt=bi.left,bt=bi.right,It=bi.top,Rt=bi.bottom);var Yi=pt.width+rt+bt,Wi=pt.height+It+Rt;bi=a.scale;var hi=Yi>oe/bi,ei=Wi>ue/bi;if(!(z||a.gf||a.Be||hi||ei))return!0;rt=pt.x-rt,oe=ce.x,bt=pt.right+bt,ue=ce.right+ne,It=pt.y-It;var co=ce.y;pt=pt.bottom+Rt,ce=ce.bottom+re;var Kr="1px";if(Rt="1px",a.scrollMode===Yd&&(hi||ei)&&(hi&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(hi=1,rt+1<oe&&(hi=Math.max((oe-rt)*bi+a.Aa,hi)),bt>ue+1&&(hi=Math.max((bt-ue)*bi+a.Aa,hi)),Kt+ne+1<Yi&&(hi=Math.max((Yi-Kt)*bi+a.Aa,hi)),Kr=hi.toString()+"px"),ei&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(hi=1,It+1<co&&(hi=Math.max((co-It)*bi+a.ya,hi)),pt>ce+1&&(hi=Math.max((pt-ce)*bi+a.ya,hi)),fn+re+1<Wi&&(hi=Math.max((Wi-fn)*bi+a.ya,hi)),Rt=hi.toString()+"px")),hi=Kr!=="1px",ei=Rt!=="1px",hi&&ei||!hi&&!ei||(ei&&(ue-=a.Db),hi&&(ce-=a.Db),Yi<Kt+ne||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ne=1,rt+1<oe&&(ne=Math.max((oe-rt)*bi+a.Aa,ne)),bt>ue+1&&(ne=Math.max((bt-ue)*bi+a.Aa,ne)),Kt+1<Yi&&(ne=Math.max((Yi-Kt)*bi+a.Aa,ne)),Kr=ne.toString()+"px"),hi=Kr!=="1px",ne=a.ya,hi!==a.Be&&(ne=hi?a.ya-a.Db:a.ya+a.Db),Wi<fn+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,It+1<co&&(re=Math.max((co-It)*bi+ne,re)),pt>ce+1&&(re=Math.max((pt-ce)*bi+ne,re)),fn+1<Wi&&(re=Math.max((Wi-fn)*bi+ne,re)),Rt=re.toString()+"px"),ei=Rt!=="1px"),a.qr&&hi===a.Be&&ei===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(hi!==a.Be&&(Kr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=hi,_e.style.width=Kr,ei!==a.gf&&(Rt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=st.alloc(),ei?(y.style.left=a.Db+"px",a.position=re.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=re.h(a.pa.x-a.Db/a.scale,a.pa.y)),st.free(re))),z&&Jc(a),a.gf=ei,_e.style.height=Rt,a.gu=!0,z&&(a.pn=!0),y=De.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Kt+1<Yi?y=(a.position.x-rt)*bi:rt+1<oe?y=De.scrollWidth-De.clientWidth:bt>ue+1&&(y=a.position.x*bi)),a.tn)switch(a.bu){case"negative":y=-(De.scrollWidth-y-De.clientWidth);break;case"reverse":y=De.scrollWidth-y-De.clientWidth}return De.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(fn+1<Wi?De.scrollTop=(a.position.y-It)*bi:It+1<co?De.scrollTop=De.scrollHeight-De.clientHeight:pt>ce+1&&(De.scrollTop=a.position.y*bi)),oe=a.Aa,ue=a.ya,De.style.width=oe+(a.gf?a.Db:0)+"px",De.style.height=ue+(a.Be?a.Db:0)+"px",x!==oe||E!==ue||a.animationManager.zb?(x=Bn.allocAt(b,me,we,Fe),a.onViewportBoundsChanged(x,a.viewportBounds,bi,z),Bn.free(x),!1):!0}Ae=hn.prototype,Ae.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Et("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&&Et('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)}},Ae.oi=function(a){this.partManager.oi(a);var y=this;Jf(a,function(x){zh(y,x)}),(a instanceof pa||a instanceof po&&a.placeholder!==null)&&a.v(),a.data!==null&&Jf(a,function(x){vy(y.partManager,x)}),Tt(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()},Ae.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()},Ae.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($a,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Ae.Is=function(a,y){if(y===void 0&&(y=!1),sn(a))for(var x=a.length,E=0;E<x;E++){var b=a[E];y&&!b.canDelete()||this.remove(b)}else for(x=new Un,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Ae.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 $i;if(a!==null)if(sn(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 Di){if(y.add(x,a.Pd(b,x,x.location)),x instanceof po&&(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 fi)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Sc(a,y,x.value,E,b);else x instanceof pa||y.add(x,a.Pd(b,x,x.location))}function Yc(a,y,x,E,b){if(y!==null&&y.count!==0){var z=st.alloc(),ne=st.alloc();ne.assign(x),isNaN(ne.x)&&(ne.x=0),isNaN(ne.y)&&(ne.y=0),(x=a.Mr)||$f(a,y);for(var re=Si(),oe=Si(),ue=y.iterator,ce=st.alloc();ue.next();){var me=ue.key,we=ue.value;if(me.Zc()){var Fe=hg(a,me,y);Fe!==null?re.push(new ie(me,we,Fe)):(!b||me.canMove())&&(Fe=we.point,z.assign(Fe),a.computeMove(me,z.add(ne),E,ce),me.location=ce,we.shifted===void 0&&(we.shifted=new st),we.shifted.assign(ce.re(Fe)))}else ue.key instanceof fi&&oe.push(ue.sa)}for(st.free(ce),b=re.length,ue=0;ue<b;ue++)me=re[ue],z.assign(me.info.point),me.Su.shifted===void 0&&(me.Su.shifted=new st),me.node.location=z.add(me.Su.shifted);for(b=st.alloc(),ue=st.alloc(),me=oe.length,we=0;we<me;we++){var De=oe[we];if(Fe=De.key,Fe instanceof fi)if(Fe.suspendsRouting){Fe.Tg=null,ce=Fe.fromNode;var _e=Fe.toNode;if(a.draggedLink!==null&&E.dragsLink)if(_e=De.value.point,Fe.dragComputation===null)y.add(Fe,a.Pd(E,Fe,ne)),Yh(Fe,ne.x-_e.x,ne.y-_e.y);else{De=st.allocAt(0,0),(ce=Fe.i(0))&&ce.w()&&De.assign(ce);var pt=ce=st.alloc().assign(De).add(ne);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(pt=st.alloc(),Gf(a,Fe,ce,pt,E)),ce.assign(Fe.dragComputation(Fe,ce,pt)).re(De),y.add(Fe,a.Pd(E,Fe,ce)),Yh(Fe,ce.x-_e.x,ce.y-_e.y),st.free(De),st.free(ce),pt!==ce&&st.free(pt)}else ce!==null&&(b.assign(ce.location),pt=y.I(ce),pt!==null&&b.re(pt.point)),_e!==null&&(ue.assign(_e.location),pt=y.I(_e),pt!==null&&ue.re(pt.point)),ce!==null&&_e!==null?b.Xa(ue)?(ce=De.value.point,_e=z,_e.assign(b),_e.re(ce),y.add(Fe,a.Pd(E,Fe,b)),Yh(Fe,_e.x,_e.y)):(Fe.suspendsRouting=!1,Fe.bb()):(De=De.value.point,ce=ce!==null?b:_e!==null?ue:ne,y.add(Fe,a.Pd(E,Fe,ce)),Yh(Fe,ce.x-De.x,ce.y-De.y))}else(Fe.fromNode===null||Fe.toNode===null)&&(ce=De.value.point,y.add(Fe,a.Pd(E,Fe,ne)),Yh(Fe,ne.x-ce.x,ne.y-ce.y))}st.free(z),st.free(ne),st.free(b),st.free(ue),ki(re),ki(oe),x||(Ml(a),Kd(a,y))}}hn.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new st),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=st.alloc(),Gf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var ne=a.minLocation,re=ne.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ne=ne.y,isNaN(ne)&&(ne=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var oe=a.maxLocation,ue=oe.x;return isNaN(ue)&&(ue=z?Math.round(1e3*a.location.x)/1e3:a.location.x),oe=oe.y,isNaN(oe)&&(oe=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(re,Math.min(x.x,ue)),Math.max(ne,Math.min(x.y,oe))),b!==y&&st.free(b),E};function Wf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Gf(a,y,x,E,b){if(b===void 0&&(b=Wf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var ne=b.gridSnapOrigin,re=ne.x;if(ne=ne.y,b=b.gridSnapCellSpot,z!==null){var oe=z.gridCellSize;isNaN(a)&&(a=oe.width),isNaN(y)&&(y=oe.height),z=z.gridOrigin,isNaN(re)&&(re=z.x),isNaN(ne)&&(ne=z.y)}z=st.allocAt(0,0),z.yi(0,0,a,y,b),nt.No(x.x,x.y,re+z.x,ne+z.y,a,y,E),st.free(z)}}function $f(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof fi&&(y.suspendsRouting=!0)}function Kd(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof fi&&(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}Ae=hn.prototype,Ae.Pd=function(a,y,x){if(x===void 0)return new dd(ra);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new dd(new st(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new dd(x.copy())};function fg(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Et("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Et("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Et("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Et("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&&Et("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Ae.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},Ae.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($a,"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},Ae.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($a,"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},Ae.kA=function(a){if(a.diagram!==this&&Et("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($a,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Ae.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ae.Yw=function(a){return this.pf===null&&(this.pf=new Vn),this.pf.add(a),this.model.Pe(a),this},Ae.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ae.Pe=function(a){return this.zg===null&&(this.zg=new Vn),this.zg.add(a),this},Ae.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ae.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Na&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Ae.cb=function(a,y,x,E,b,z,ne){z===void 0&&(z=null),ne===void 0&&(ne=null);var re=new pr;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)},Ae.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(ps(b,a.propertyName,a.I(y)),b instanceof Vt){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 ui)if(typeof re=="number"&&oe instanceof Vt){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 gs){var ce=a.oldParam===!0;typeof re=="number"&&oe instanceof xr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ne.pc(ce?re:-1,oe,ce)):ne.oi(re,oe,ce))}else ne instanceof hn?typeof re=="number"&&oe instanceof gs&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):Et("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===$a){var me=a.object,we=a.oldParam,Fe=a.oldValue;if(me instanceof ui)typeof we=="number"&&Fe instanceof Vt?y?me.Gb(we,Fe):me.pc(we):typeof we=="number"&&Fe instanceof ol&&(Fe.isRow?d1(me,we,y?Fe:void 0):h1(me,we,y?Fe:void 0));else if(me instanceof gs){var De=a.newParam===!0;typeof we=="number"&&Fe instanceof xr&&(y?0>me.Pa.indexOf(Fe)&&me.oi(we,Fe,De):(Fe.isSelected=!1,Fe.isHighlighted=!1,Fe.Wb(),me.pc(De?we:-1,Fe,De)))}else me instanceof hn?typeof we=="number"&&Fe instanceof gs&&(y?(Fe.Xe(this),this.Wa.Gb(we,Fe)):this.Wa.mb(we)):Et("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Na&&Et("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(Ji)?re=0:ue.Hf(Gi)&&(re=z-1):re=ue.sb()?ue.x*(z-1):z/2),isNaN(oe)&&(ue.$c()?ue.Hf(ai)?oe=0:ue.Hf(Ti)&&(oe=ne-1):oe=ue.sb()?ue.y*(ne-1):ne/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=st.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,st.free(z),a.Ca=x,Jc(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),Vu(a,!1),E.zb&&(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=mi.alloc(),b=1,z=1,ne=x.O.s,re=ne.length,oe=0;oe<re;oe++){var ue=ne[oe],ce=Math.abs(ue.interval);2>ce||(bv(ue.figure)?z=z*ce/nt.vx(z,ce):b=b*ce/nt.vx(b,ce))}if(ne=x.gridCellSize,E.h(z*ne.width,b*ne.height),y!==void 0)b=y.width,z=y.height,a=y.x,ne=y.y;else{if(y=Bn.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Bn.free(y);return}b=y.width,z=y.height,a=y.x,ne=y.y,Bn.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=st.alloc(),nt.No(a,ne,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),mi.free(E),x.part.location=y,st.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),sn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof xr||Et("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 xr||Et("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()}},Ae=hn.prototype,Ae.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Ae.Jz=function(a){a=new Un().addAll(a);for(var y=this.highlighteds.copy().hp(a).iterator;y.next();)y.value.isHighlighted=!1;for(a=a.iterator;a.next();)y=a.value,y instanceof xr||Et("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Ae.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=st.alloc();if(a==="pixel")b=x;else if(a==="line")b=x*(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange);else if(a==="page")a=E?this.viewportBounds.height:this.viewportBounds.width,a*=this.scale,a!==0&&(b=x*Math.max(a-(E?this.scrollVerticalLineChange:this.scrollHorizontalLineChange),0));else{if(a==="document"){b=this.documentBounds,x=this.viewportBounds,y==="up"?this.position=z.h(x.x,b.y):y==="left"?this.position=z.h(b.x,x.y):y==="down"?this.position=z.h(x.x,b.bottom-x.height):y==="right"&&(this.position=z.h(b.right-x.width,x.y)),st.free(z);return}Et("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):Et("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),st.free(z)},Ae.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)},Ae.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Ae.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)},Ae.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,ne=y.m11,re=y.m12,oe=y.m21,ue=y.m22,ce=y.dx,me=y.dy,we=x*ne+E*oe+ce;y=x*re+E*ue+me;var Fe=b*ne+E*oe+ce;return a=b*re+E*ue+me,E=x*ne+z*oe+ce,x=x*re+z*ue+me,ne=b*ne+z*oe+ce,b=b*re+z*ue+me,z=Math.min(we,Fe),we=Math.max(we,Fe),Fe=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),we=Math.max(we,E),Fe=Math.min(Fe,x),y=Math.max(y,x),z=Math.min(z,ne),we=Math.max(we,ne),Fe=Math.min(Fe,b),y=Math.max(y,b),new Bn(z,Fe,we-z,y-Fe)},Ae.Ps=function(a){var y=this.Ab;y.reset(),this.Ca!==1&&y.scale(this.Ca);var x=this.pa;return(x.x!==0||x.y!==0)&&isFinite(x.x)&&isFinite(x.y)&&y.translate(-x.x,-x.y),Jr(a.copy(),this.Ab)};function 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===Na&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=b}),a.mouseMoveTools.each(function(oe){return oe.diagram=b}),a.mouseUpTools.each(function(oe){return oe.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===Na){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),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;_n(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function zh(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)yh(a,y[E])}function yh(a,y){if(y instanceof zu){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Un&&x.Bg.add(a);var E=y.Eg;if(E!==null&&E.sq===!0&&y.diagram!==null&&y.diagram.Xn.add(y),x.hn)if(x=x.getAttribute("src")||"",E=a.Og.I(x),E===null)E=[],E.push(y),a.Og.add(x,E);else{for(a=0;a<E.length;a++)if(E[a]===y)return;E.push(y)}}}}function vg(a,y){if(y instanceof zu){var x=y.element;if(x!==null&&x instanceof HTMLImageElement&&x.hn){var E=x.getAttribute("src")||"",b=a.Og.I(E);if(b!==null){for(var z=0;z<b.length;z++)if(b[z]===y){b.splice(z,1),b.length===0&&(a.Og.remove(E),x.Fq&&x.removeEventListener("load",x.Fq),x.Yp&&x.removeEventListener("error",x.Yp),delete x.Fq,delete x.Yp,x.Bg instanceof Un&&x.Bg.remove(a),fp(E));break}}}}}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)},Ae=hn.prototype,Ae.Lc=function(a){return this.partManager.Lc(a)},Ae.ii=function(a){return this.partManager.ii(a)},Ae.Kc=function(a){return this.partManager.Kc(a)},Ae.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(Sr(y)))},Ae.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(Sr(y)))};function Jc(a){var y=a.pa,x=a.Ca;a.Rw.h(y.x,y.y,Math.max(a.Aa,0)/x,Math.max(a.ya,0)/x),a.vd=!0}function yg(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),Vu(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Ae.Va=function(){if(this.Zi){var a=Bn.alloc();yg(this,this.computeBounds(a)),Bn.free(a)}},Ae.rz=function(){for(var a=new Un,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&a.add(x)}for(y=this.links;y.next();)x=y.value,x.isTopLevel&&a.add(x);return a.iterator},Ae.qz=function(){return this.ai.iterator},Ae.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),hs(a,y),b.isValidLayout=!0):a.xh=!0)}}Ae.yz=function(){for(var a=new Vn,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 Vn;x.add(b,ne),x.add(z,ne),E.add(b,b),E.add(z,b)}var x=new $i,E=new $i;y("InitialAnimationStarting"),y("AnimationStarting"),y("AnimationFinished"),y("BackgroundSingleClicked"),y("BackgroundDoubleClicked"),y("BackgroundContextClicked"),y("ClipboardChanged"),y("ClipboardPasted"),y("DocumentBoundsChanged"),y("ExternalObjectsDropped"),y("GainedFocus"),y("InitialLayoutCompleted"),y("LayoutCompleted"),y("LinkDrawn"),y("LinkRelinked"),y("LinkReshaped"),y("LostFocus"),y("Modified"),y("ObjectSingleClicked"),y("ObjectDoubleClicked"),y("ObjectContextClicked"),y("PartCreated"),y("PartResized"),y("PartRotated"),y("SelectionMoved"),y("SelectionCopied"),y("SelectionDeleting"),y("SelectionDeleted"),y("SelectionGrouped"),y("SelectionUngrouped"),y("ChangingSelection"),y("ChangedSelection"),y("SubGraphCollapsed"),y("SubGraphExpanded"),y("TextEdited"),y("TreeCollapsed"),y("TreeExpanded"),y("ViewportBoundsChanged"),y("InvalidateDraw"),a.iw=x,a.hw=E}function qg(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function Vd(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Et("Unknown DiagramEvent name: "+y)}Ae.Bj=function(a,y){return a=Vd(this,a),a!==null&&a.add(y),this},Ae.am=function(a,y){a=Vd(this,a),a!==null&&a.remove(y)},Ae.R=function(a,y,x){var E=Vd(this,a),b=new Rr;if(b.diagram=this,a=qg(this,a),a!==null&&(b.name=a),y!==void 0&&(b.subject=y),x!==void 0&&(b.parameter=x),y=E.length,y===1)E.M(0)(b);else if(y!==0)for(E=E.Fa(),x=0;x<y;x++)(0,E[x])(b)};function Kf(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Ae.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=Bn.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var ne=z.value,re=ne.layer;re!==null&&re.visible&&!re.isTemporary&&Vf(a,ne,E,y)}Bn.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Bn.alloc(),z=x.memberParts;z.next();)ne=z.value,ne instanceof Di&&Vf(a,ne,E,y);Bn.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&ox(b);return b}function ep(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?ep(a,y.containingGroup):null}function Vf(a,y,x,E){if(y!==x&&y.isVisible()){if(y.avoidable&&!y.isLinkLabel){y=y.getAvoidableRect(E),a=a.Xh;var b=y.x,z=y.y;if(xp(a,b,z))for(x=(z-a.Od)/a.sc|0,E=Math.min((b+y.width-a.Nd)/a.rc|0,a.di),y=Math.min((z+y.height-a.Od)/a.sc|0,a.ei),b=(b-a.Nd)/a.rc|0;b<=E;b++)if(z=a.ac[b],z.fill)z.fill(Jh,x,y+1);else for(var ne=x;ne<=y;ne++)z[ne]=Jh}else if(y instanceof po)for(y=y.memberParts;y.next();)b=y.value,b instanceof Di&&Vf(a,b,x,E)}}function Sh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}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=_n(function(){if(a.vk!==-1&&(a.ug(),a.lastInput.event!==null)){var y=a.computeAutoScrollPosition(a.wp);y.Xa(a.position)||(a.position=y,a.lastInput.documentPoint=a.Ps(a.wp),a.doMouseMove(),a.Zi=!0,y=Bn.alloc(),a.computeBounds(y),y.ed(a.documentBounds),yg(a,y),Bn.free(y),a.Fc=!0,a.bd(),wg(a))}},a.vp))}hn.prototype.ug=function(){this.vk!==-1&&(ht.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=Bn.allocAt(0,0,E.width*b,E.height*b);var z=st.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var ne=Math.max(this.scrollHorizontalLineChange,1);ne|=0,z.x-=ne,a.x<E.x+x.left/2&&(z.x-=ne),a.x<E.x+x.left/4&&(z.x-=4*ne)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(ne=Math.max(this.scrollHorizontalLineChange,1),ne|=0,z.x+=ne,a.x>E.x+E.width-x.right/2&&(z.x+=ne),a.x>E.x+E.width-x.right/4&&(z.x+=4*ne));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y-=ne,a.y<E.y+x.top/2&&(z.y-=ne),a.y<E.y+x.top/4&&(z.y-=4*ne)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(ne=Math.max(this.scrollVerticalLineChange,1),ne|=0,z.y+=ne,a.y>E.y+E.height-x.bottom/2&&(z.y+=ne),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*ne)),z.Xa(ra)||(y=new st(y.x+z.x/b,y.y+z.y/b)),Bn.free(E),st.free(z),y},Ae=hn.prototype,Ae.Cs=function(){return null},Ae.av=function(){return null},Ae.bs=function(a,y){this.pj.add(a,y)},Ae.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof po&&(y.$p=null)})};function Ph(a,y,x){function E(){var ce=+new Date;for(z=!0,ne.reset();ne.next();)if(!ne.value[0].al){z=!1;break}z||ce-ue>oe?y(x,b,re):ht.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 ht.requestAnimationFrame(function(){E()}),null}Ae.Wz=function(a){return As?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ae.Jx=function(a){return a===void 0&&(a={}),Ph(this,this.Xz,a)},Ae.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"&&Et('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"&&Et("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 mi(1/0,1/0):new mi(2e3,2e3));var re=y.position||null,oe=y.parts||null,ue=y.padding===void 0?1:y.padding,ce=y.background||null,me=y.omitTemporary;me===void 0&&(me=!0);var we=y.document||document,Fe=y.elementFinished||null,De=y.showTemporary;De===void 0&&(De=!me),y=y.showGrid,y===void 0&&(y=De),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof ue=="number"?ue=new hr(ue):ue instanceof hr||Et("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),me=new Gl(null,we,void 0,!0);var _e=me.context;if(!(b||z||oe||re))return me.width=a.Aa+Math.ceil(ue.left+ue.right),me.height=a.ya+Math.ceil(ue.top+ue.bottom),x==="SVG"?E===null?null:(E.resize(me.width,me.height,me.width,me.height),E.ownerDocument=we,E.hs=Fe,Js(a,E.context,ue,new mi(me.width,me.height),a.Ca,a.pa,oe,ce,De,y),E.context):(a.Xm=!1,Js(a,_e,ue,new mi(me.width,me.height),a.Ca,a.pa,oe,ce,De,y),a.Xm=!0,me.context);var pt=a.Pp,rt=a.documentBounds.copy();if(rt.Fv(a.yb),De)for(var bt=a.Wa.s,It=bt.length,Rt=0;Rt<It;Rt++){var Kt=bt[Rt];if(Kt.visible&&Kt.isTemporary){Kt=Kt.Pa.s;for(var fn=Kt.length,bi=0;bi<fn;bi++){var Yi=Kt[bi];Yi.isInDocumentBounds&&Yi.isVisible()&&(Yi=Yi.actualBounds,Yi.w()&&rt.ed(Yi))}}}if(bt=new st(rt.x,rt.y),oe!==null){for(It=new Bn(0,0,0,0),Rt=!0,Kt=oe.iterator,Kt.reset();Kt.next();)fn=Kt.value,fn instanceof xr&&(bi=fn.layer,bi!==null&&!bi.visible||bi!==null&&!De&&bi.isTemporary||!fn.isVisible()||(fn=fn.actualBounds,fn.w()&&(Rt?(Rt=!1,It.assign(fn)):It.ed(fn))));rt.width=It.width,rt.height=It.height,bt.x=It.x,bt.y=It.y}return re!==null&&re.w()&&(bt=re,z||(z=pt)),It=re=0,ue!==null&&(re=ue.left+ue.right,It=ue.top+ue.bottom),Rt=Kt=0,b!==null&&(Kt=b.width,Rt=b.height,isFinite(Kt)&&(Kt=Math.max(0,Kt-re)),isFinite(Rt)&&(Rt=Math.max(0,Rt-It))),b!==null&&z!==null?(z==="NaN"&&(z=pt),b.w()?(b=Kt,rt=Rt):isNaN(Rt)?(b=Kt,rt=rt.height*z):(b=rt.width*z,rt=Rt)):b!==null?b.w()?(z=Math.min(Kt/rt.width,Rt/rt.height),b=Kt,rt=Rt):isNaN(Rt)?(z=Kt/rt.width,b=Kt,rt=rt.height*z):(z=Rt/rt.height,b=rt.width*z,rt=Rt):z!==null?z==="NaN"&&ne.w()?(z=Math.min((ne.width-re)/rt.width,(ne.height-It)/rt.height),z>pt?(z=pt,b=rt.width,rt=rt.height):(b=ne.width,rt=ne.height)):(b=rt.width*z,rt=rt.height*z):(z=pt,b=rt.width,rt=rt.height),ue!==null?(b+=re,rt+=It):ue=new hr(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)&&(rt=Math.min(rt,ne))),me.width=Math.ceil(b),me.height=Math.ceil(rt),x==="SVG"?E===null?null:(E.resize(me.width,me.height,me.width,me.height),E.ownerDocument=we,E.hs=Fe,Js(a,E.context,ue,new mi(Math.ceil(b),Math.ceil(rt)),z,bt,oe,ce,De,y),E.context):(a.Xm=!1,Js(a,_e,ue,new mi(Math.ceil(b),Math.ceil(rt)),z,bt,oe,ce,De,y),a.Xm=!0,me.context)}Qe.Object.defineProperties(hn.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof ye||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Qo(this,ht.document),this.bs("svg",a)),this.div!==null&&this.div.appendChild(a.Oa),this.ib=a.context,this.ta&&(this.ta.context.setTransform(this.Mb,0,0,this.Mb,0,0),this.ta.context.clearRect(0,0,this.Aa,this.ya))):a!=="debug"||this.pj.contains("SVG")||(a=new Qo(this,ht.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(ht,"resize",this.Ov,!1),this.removeEventListener(ht,"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)&&Xn(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),Vu(this,!1))}},hasHorizontalScrollbar:{get:function(){return this.mn},set:function(a){var y=this.mn;y!==a&&(this.mn=a,this.Ee=!0,this.N(),this.g("hasHorizontalScrollbar",y,a),Vu(this,!1))}},allowHorizontalScroll:{get:function(){return this.Xs},set:function(a){var y=this.Xs;y!==a&&(this.Xs=a,this.g("allowHorizontalScroll",y,a),Vu(this,!1))}},allowVerticalScroll:{get:function(){return this.$s},set:function(a){var y=this.$s;y!==a&&(this.$s=a,this.g("allowVerticalScroll",y,a),Vu(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&Xn(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&&Xn(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 Xn(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&&Et("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(ht,"pointermove",this.dk,!0),this.addEventListener(ht,"pointerdown",this.ui,!0),this.addEventListener(ht,"pointerup",this.fk,!0),this.addEventListener(ht,"pointerout",this.ek,!0),this.addEventListener(ht,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ht,"wheel",this.$j,!0),this.addEventListener(ht,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ht,"pointermove",this.dk,!0),this.removeEventListener(ht,"pointerdown",this.ui,!0),this.removeEventListener(ht,"pointerup",this.fk,!0),this.removeEventListener(ht,"pointerout",this.ek,!0),this.removeEventListener(ht,"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(ht,"wheel",this.$j,!0),this.removeEventListener(ht,"selectstart",this.preventDefault,!1),this.addEventListener(y,"wheel",this.$j,!1)),this.qw=a))}},position:{get:function(){return this.pa},set:function(a){var y=st.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),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)}st.free(y)}},initialPosition:{get:function(){return this.zt},set:function(a){this.zt.D(a)||(this.zt=a.J())}},initialScale:{get:function(){return this.At},set:function(a){this.At!==a&&(this.At=a)}},grid:{get:function(){return this.fe===null&&(this.fe=hf(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=hf(this)),a.type!==ui.Grid&&Et("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||Et("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 hr(a));var y=this.rj;y.D(a)||(this.rj=a=a.J(),this.g("scrollMargin",y,a),this.hk())}},scrollMode:{get:function(){return this.sj},set:function(a){var y=this.sj;y!==a&&(this.sj=a,a===Yd&&Vu(this,!1),this.g("scrollMode",y,a),this.Ee=!0,this.N())}},scrollsPageOnFocus:{get:function(){return this.nu},set:function(a){var y=this.nu;y!==a&&(this.nu=a,this.g("scrollsPageOnFocus",y,a))}},positionComputation:{get:function(){return this.Zt},set:function(a){var y=this.Zt;y!==a&&(this.Zt=a,Vu(this,!1),this.g("positionComputation",y,a))}},scaleComputation:{get:function(){return this.fu},set:function(a){var y=this.fu;y!==a&&(this.fu=a,gg(this,this.scale,this.scale),this.g("scaleComputation",y,a))}},documentBounds:{get:function(){return this.Sp}},isVirtualized:{get:function(){return this.It},set:function(a){var y=this.It;y!==a&&(this.It=a,this.g("isVirtualized",y,a))}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&gg(this,y,a)}},defaultScale:{get:function(){return this.Pp},set:function(a){this.Pp=a}},autoScale:{get:function(){return this.yh},set:function(a){var y=this.yh;y!==a&&(this.yh=a,this.g("autoScale",y,a),a!==iu&&Vu(this,!1))}},initialAutoScale:{get:function(){return this.Fg},set:function(a){var y=this.Fg;y!==a&&(this.Fg=a,this.g("initialAutoScale",y,a))}},initialViewportSpot:{get:function(){return this.Bt},set:function(a){var y=this.Bt;y!==a&&(a.sb()||Et("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()||Et("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)):Xn(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)):Xn(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),Vu(this,!1))}},initialContentAlignment:{get:function(){return this.pq},set:function(a){var y=this.pq;y.D(a)||(this.pq=a=a.J(),this.g("initialContentAlignment",y,a))}},padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new hr(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&&Et("Cannot share PartManagers between Diagrams: "+a.toString()),y&&y.Xe(null),this.Pc=a,a.Xe(this))}},nodes:{get:function(){return this.partManager.nodes.iterator}},links:{get:function(){return this.partManager.links.iterator}},parts:{get:function(){return this.partManager.parts.iterator}},layout:{get:function(){return this.Sc},set:function(a){var y=this.Sc;y!==a&&(this.Sc=a,a.diagram=this,a.group=null,this.xh=!0,this.g("layout",y,a),this.$b())}},isTreePathToChildren:{get:function(){return this.Ht},set:function(a){var y=this.Ht;if(y!==a&&(this.Ht=a,this.g("isTreePathToChildren",y,a),!this.undoManager.isUndoingRedoing))for(a=this.nodes;a.next();)Qp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==Ld&&a!==Ks&&a!==Ch&&Et("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 mi(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 hr(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 $i,np=null,As=ht.document!==void 0,Zh=null,Ud="",iu=new wn(hn,"None",0),Ru=new wn(hn,"Uniform",1),Hh=new wn(hn,"UniformToFill",2),wh=new wn(hn,"CycleAll",10),Cg=new wn(hn,"CycleNotDirected",11),Eg=new wn(hn,"CycleNotDirectedFast",12),bg=new wn(hn,"CycleNotUndirected",13),Fg=new wn(hn,"CycleDestinationTree",14),Bg=new wn(hn,"CycleSourceTree",15),Yd=new wn(hn,"DocumentScroll",1),pf=new wn(hn,"InfiniteScroll",2),Ld=new wn(hn,"TreeParentCollapsed",21),Ks=new wn(hn,"AllParentsCollapsed",22),Ch=new wn(hn,"AnyParentsCollapsed",23),Mg=new Vn,Xd="2.3.10",Eh="image",mf=null,ip=!1;function Yl(){if(As){var a=ht.document.createElement("canvas"),y=a.getContext("2d"),x=Zn("7ca11abfd022028846");y[x]=Zn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",nn.Dx+"4ae6247590da4bb21c324ba3a84e385776",Yt.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",nt.za],b=1;5>b;b++)y[Zn("7ca11abfd7330390")](Zn(E[b-1]),10,15*b);for(y[x]=Zn("39f046ebb36e4b"),x=1;5>x;x++)y[Zn("7ca11abfd7330390")](Zn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(Yt.prototype.Cd=Yt.prototype.Eu),mf=a}}hn.className="Diagram",hn.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ht.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?ht.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=Ks,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=ht[Zn("76a715b2f73f148a")][Zn("72ba13b5")]||"";if(a.Rc=!0,As){var E=hn[Zn("76a115b6ed251eaf4692")];if(E)for(var b=Mg.iterator;b.next()&&(E=b.value,E=Zn(E).split(Zn("39e9")),!(6>E.length));){var z=Zn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ne=Zn(nn[Zn("6cae19")]).split(".");if(z[0]>ne[0]||z[0]===ne[0]&&z[1]>=ne[1]){var re=ht[Zn("74a900bae4370f8b51")][Zn("6fbb13a1c2311e8a57")].toLowerCase();if(ne=re[Zn("73a612b6fb191d")](Zn("3aad1ab6e022098b4dc4")),z=Zn(E[2]),-1<ne&&(re=re[Zn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ne),!a.Rc))break;for(ne=x[Zn("76ad18b4f73e")],re=x[Zn("73a612b6fb191d")](Zn("35e7"))+2;re<ne;re++)y+=x[re];if(ne=y[Zn("73a612b6fb191d")](z),0>ne&&z!==Zn("7da71ca0ad381e90")&&(ne=y[Zn("73a612b6fb191d")](Zn("76a715b2ef3e149757"))),0>ne&&(ne=y[Zn("73a612b6fb191d")](Zn("76a715b2ef3e149757"))),0>ne&&(ne=y[Zn("73a612b6fb191d")](Zn("2bfa41fdb3784bca12"))),0>ne&&(ne=x[Zn("73a612b6fb191d")](Zn("7baa19a6f76c1988428554"))),a.Rc=!(0<=ne&&ne<y[Zn("73a612b6fb191d")](Zn("35"))||y[Zn("73a612b6fb191d")](Zn("35"))===-1),!a.Rc||x[Zn("73a612b6fb191d")](Zn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Zn("73a612b6fb191d")](z)),!a.Rc)||(ne=ht[Zn("76a715b2f73f148a")][Zn("69ad17a1e03e")],re=ne[Zn("73a612b6fb191d")](Zn("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ne[Zn("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ne=ht.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[Zn("79a417a0f0181a8946")]=E,ht.document[Zn("78a712aa")]){ht.document[Zn("78a712aa")][Zn("7bb806b6ed32388c4a875b")](ne),oe=ht.getComputedStyle(ne).getPropertyValue(Zn("78a704b7e62456904c9b12701b6532a8"));var ue=ht.getComputedStyle(ne).getPropertyValue(Zn("75b817b0ea2202"));if(ht.document[Zn("78a712aa")][Zn("68ad1bbcf533388c4a875b")](ne),oe){if(ne=ht[Zn("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(Zn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ne=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ce in ne)if(E===ne[ce].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(ce=x[Zn("76ad18b4f73e")],b=x[Zn("73a612b6fb191d")](Zn("35e7"))+2;b<ce;b++)y+=x[b];x=y[Zn("73a612b6fb191d")](Zn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Zn("73a612b6fb191d")](Zn("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function dd(a){this.j=a===void 0?new st:a,this.o=new st}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 mi(NaN,NaN).freeze(),this.gridSnapCellSpot=Us,this.gridSnapOrigin=new st(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function ge(a,y){if(typeof a=="string"||ht.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}Wt(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 ye(a,y){if(typeof a=="string"||ht.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 xr;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 hr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new mt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ne=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new st(re.x-ne.width/2,re.y-ne.height/2)}},x.Pf=function(){E.Ya(),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}Wt(ye,hn),ye.prototype.computePixelRatio=function(){return 1},ye.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(cc(this),this.ql===null){var x=new 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),Re(this)}finally{this.ta=a,this.ib=y}}}hn.prototype.redraw.call(this)},ye.prototype.gc=function(){if(this.Ka===null&&Et("No div specified"),this.ta===null&&Et("No canvas specified"),!(this.ta instanceof Qo)&&($v(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){cc(this);var y=this.ta;a=this.ib,a.Vc(!0),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,y.width,y.height),1>this.updateDelay?Re(this):this.ql!==null&&(a.drawImage(this.ql.Oa,0,0),y=this.Ab,y.reset(),this.scale!==1&&y.scale(this.scale),this.position.x===0&&this.position.y===0||y.translate(-this.position.x,-this.position.y),a.scale(this.Mb,this.Mb),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.yc()),y=this.Wa.s;for(var x=y.length,E=0;E<x;E++)y[E].gc(a,this);this.Fc=this.vd=!1}}};function Re(a){var y=a.observed;if(y!==null){var x=a.drawsTemporaryLayers,E=a.drawsGrid&&x,b=y.grid;E&&b!==null&&b.visible&&!isNaN(b.width)&&!isNaN(b.height)&&(b=Bn.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Xc(y,b),Bn.free(b),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 ce=yl(re,b),me=oe.scale,we=Bn.alloc(),Fe=re.Pa.s,De=Fe.length,_e=0;_e<De;_e++){var pt=Fe[_e];(E||pt!==ue)&&re.Oj(b,pt,oe,null,me,we,!1)}Bn.free(we),b.globalAlpha=ce}}}}}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=mi.alloc();b.h(x.width,x.height),E.desiredSize=b,mi.free(b),a=2/a.scale,E instanceof Co&&(E.strokeWidth=a),y.location=new st(x.x-a/2,x.y-a/2),y.isSelected=!0}}}ye.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Ao;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},ye.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},ye.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),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(ye.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof ye&&Et("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)}}}),ye.className="Overview";function mt(){rs.call(this),this.j=null}Wt(mt,rs),mt.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||!a.allowMove||!a.allowSelect)return!1;var y=a.observed;if(y===null)return!1;var x=a.lastInput;return!x.left||a.currentTool!==this&&(!this.isBeyondDragSize()||x.isTouchEvent&&x.timestamp-a.firstInput.timestamp<this.delay)?!1:(this.findDraggablePart()===null&&(x=y.viewportBounds,this.j=new st(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)),!0)},mt.prototype.doActivate=function(){this.j=null,rs.prototype.doActivate.call(this)},mt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},mt.prototype.moveParts=function(){var a=this.diagram,y=a.observed;if(y!==null){var x=a.box;if(x!==null){if(this.j===null){var E=a.firstInput.documentPoint;x=x.location,this.j=new st(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new st(a.x-this.j.x,a.y-this.j.y)}}},mt.className="OverviewDraggingTool";function gt(){Io(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=Ao,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=Yr?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 Un,x=a.selection.iterator;x.next();)Cf(y,x.value,!0,this.deletesTree?1/0:0,this.deletesConnectedLinks?null:!1,function(E){return E.canDelete()});a.Is(y,!0),a.R("SelectionDeleted",y)}finally{a.eb("Delete"),a.R("ChangedSelection",a.selection),a.currentCursor=""}},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 Un;for(a=a.selection.iterator;a.next();)Cf(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},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 Vn,x.addAll(z),Zh=x,Ud=y.model.dataFormat}}y.R("ClipboardChanged",x)},gt.prototype.pasteFromClipboard=function(){var a=new Un,y=Zh;if(y===null)return a;var x=this.diagram;if(Ud!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,ne=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),ne=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=ne.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},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 st(a.x-b.centerX,a.y-b.centerY),y.Wm,!1)}}y.R("ClipboardPasted",x)}finally{y.eb("Paste"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},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=Ao):(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=zt(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 Di&&oe.isTreeExpanded&&(!(oe instanceof po)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof xr&&y.tv(oe.actualBounds),oe instanceof Di&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof po&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof xr&&y.es(oe.actualBounds),y.am("LayoutCompleted",ne)),y.eb("Scroll To Part")},ne=function(){_n(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 zt(a,y,x){if(y.isVisible())return x;if(y instanceof pa)zt(a,y.adornedPart,x);else if(y instanceof fi){var E=y.fromNode;E!==null&&zt(a,E,x),y=y.toNode,y!==null&&zt(a,y,x)}else y instanceof Di&&(E=y.labeledLink,E!==null&&zt(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),zt(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),zt(a,y,x));return x}gt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof xr)?!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 Vn;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 Di&&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 Di&&a.isTreeExpanded))return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Di&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},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 Vn;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 Di&&!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 Di)||a.isTreeExpanded)return!1;if(0<a.Qo().count)return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof Di&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},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 Vn,z=a.selection.iterator;z.next();){var ne=z.value;ne.Zc()&&ne.canGroup()&&b.add(ne)}for(var re=new Vn,oe=b.iterator;oe.next();){var ue=oe.value;z=!1;for(var ce=b.iterator;ce.next();)if(ue.Td(ce.value)){z=!0;break}z||re.add(ue)}if(0<re.count){var me=re.first().containingGroup;if(me!==null)for(;me!==null;){b=!1;for(var we=re.iterator;we.next();)if(!we.value.Td(me)){b=!0;break}if(b)me=me.containingGroup;else break}if(x instanceof po)Zc(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Fe=y.copyNodeData(x);tn(Fe)&&(y.xf(Fe),E=a.ii(Fe))}if(E!==null){me!==null&&this.isValidMember(me,E)&&(E.containingGroup=me);for(var De=re.iterator;De.next();){var _e=De.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 Mn(a){var y=Si();for(a=a.iterator;a.next();){var x=a.value;x instanceof fi||y.push(x)}a=new Un,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,ne=0;ne<x;ne++)if(b.Td(y[ne])){z=!1;break}z&&a.add(b)}return ki(y),a}gt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof fi)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 Vn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof po&&z.canUngroup()&&E.add(z)}var ne=new Vn;if(0<E.count){y.clearSelection(!0);for(var re=E.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var ue=oe.containingGroup,ce=ue!==null&&ue.data!==null?x.wa(ue.data):void 0;ne.addAll(oe.memberParts);for(var me=ne.iterator;me.next();){var we=me.value;if(we.isSelected=!0,!(we instanceof fi)){var Fe=we.data;Fe!==null?x.mp(Fe,ce):we.containingGroup=ue}}y.remove(oe)}}y.R("SelectionUngrouped",E,ne)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},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 po))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof po&&y.canUngroup())return!0;return!1},gt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Mn(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},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 Vn;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 po&&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 po&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof po&&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 Vn;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 po&&!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 po&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof po&&!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 Vt?b=a.ga(Oo):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new st(b.x+b.width/2,b.y+b.height/2)),b!==null&&(E.viewPoint=y.op(b),E.documentPoint=b,E.left=!1,E.right=!0,E.up=!0),y.currentTool=x,Ua(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 $i,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 fi&&(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||Et("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 Vt(){Io(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new st(NaN,NaN).freeze(),this.jd=Qa,this.Ab=new Yt,this.wh=new Yt,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=sl,this.uc=new Bn(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Bn(NaN,NaN,NaN,NaN).freeze(),this.dc=new Bn(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Fi,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,ii,nr,dr,Lr,uo,Ho,Mo,qo,_a;Vt.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=In(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Vt.prototype.Vw=function(a){var y=this.Dh;if(sn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Vt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Vt.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},Vt.prototype.copy=function(){return this.clone()},Ae=Vt.prototype,Ae.qb=function(a){a.classType===fi?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Et("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Vt&&(this.stretch=a)},Ae.toString=function(){return Ni(this.constructor)+"#"+tr(this)},Ae.th=function(){this.A!==null&&(this.A.nc=!0)};function Lo(a){a.A===null?a.A=new $r:a.A.nc&&(a.A=a.A.copy())}Ae.Xc=function(){if(this.ba===null){var a=new yo;a.Xi=ws,a.yj=ws,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Ae.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)&&is(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 $i),ne=z.undoManager.transactionLevel===0,a.startCondition===vl?ne=!0:a.startCondition===Xs&&(ne=!1),ne?(z=new Ns,Ss(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 ui&&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 ui&&Jf(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function is(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))}}Ae.ks=function(a){return this.bindingId===a?this:null},Ae.g=function(a,y,x){this.cb(_o,a,this,y,x)},Ae.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 Yt);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))}Ae.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?ha(a.x,a.y,0,0,0,E.height)<=y||ha(a.x,a.y,0,E.height,E.width,E.height)<=y||ha(a.x,a.y,E.width,E.height,E.width,0)<=y||ha(a.x,a.y,E.width,0,0,0)<=y:a.zd(0,0)<=y&&a.zd(0,E.height)<=y&&a.zd(E.width,0)<=y&&a.zd(E.width,E.height)<=y},Ae.se=function(){return!0},Ae.ca=function(a){var y=st.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return st.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),ne=z/2,re=this.naturalBounds;E=this.Df()*E.scale;var oe=1/E;if(re.width*E<b&&re.height*E<b)return a=Ba(x.x-ne*oe,x.y-ne*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),st.free(y),a}return b=!1,(this instanceof pa||this instanceof Co?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)),st.free(y),b},Ae.gh=function(a){var y=this.naturalBounds;return Ba(0,0,y.width,y.height,a.x,a.y)},Ae.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Bn.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=st.allocAt(a.x,a.y);return y.ca(x.Cd(b))&&(b.h(a.x,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.bottom),y.ca(x.Cd(b))&&(b.h(a.right,a.y),y.ca(x.Cd(b))&&(E=!0)))),st.free(b),Bn.free(y),E},Ae.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=st.allocAt(0,0);return a.ca(y.Ga(b))&&(b.h(0,x.height),a.ca(y.Ga(b))&&(b.h(x.width,x.height),a.ca(y.Ga(b))&&(b.h(x.width,0),a.ca(y.Ga(b))&&(E=!0)))),st.free(b),E},Ae.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=st.allocAt(0,0),b=st.allocAt(0,x.height),z=st.allocAt(x.width,x.height),ne=st.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(ne)))re=!0;else{x=Bn.allocAt(0,0,x.width,x.height);var oe=st.allocAt(a.x,a.y);x.ca(y.Cd(oe))?re=!0:(oe.h(a.x,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.y),x.ca(y.Cd(oe))&&(re=!0)))),st.free(oe),Bn.free(x),!re&&(nt.us(a,E,b)||nt.us(a,b,z)||nt.us(a,z,ne)||nt.us(a,ne,E))&&(re=!0)}return st.free(E),st.free(b),st.free(z),st.free(ne),re},Ae.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof Xi){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},Ae.mi=function(a){a===void 0&&(a=new Bn);var y=this.naturalBounds,x=this.oe,E=st.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),fs(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),fs(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),fs(a,E.x,E.y,0,0),st.free(E),a},Ae.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},Ae.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ae.qs=function(a,y){return y===void 0&&(y=new st),y.assign(a),this.oe.Cd(y),y},Ae.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ae.Sj=function(a,y,x,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,ue=-z.m21*ne,ce=z.m11*ne,me=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,nt.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ne=a*re+y*ue+me,a=a*oe+y*ce+we,y=x*re+E*ue+me,x=x*oe+E*ce+we,b.h(0,0),E=this.naturalBounds,x=nt.Ff(0,0,E.width,E.height,ne,a,y,x,b),b.transform(z),x)},Vt.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 ui;switch(fu(this,!0)){case ii: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 dr:isFinite(a)&&a>x&&(b=a),ne=0,re&&(y=1/0);break;case Lr: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()||Et("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),yt(this,!1)}},Vt.prototype.Wl=function(){},Vt.prototype.Dd=function(){return!1},Vt.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Bn.alloc();z.assign(this.Ib),this.Ib.ka(),Tt(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()||Et("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Ht(this,!1),Bn.free(z)},Ae=Vt.prototype,Ae.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=ii),y){case ii:(x>E||z>b)&&(yt(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case si:yt(a,!0),a.measure(E,b,0,0);break;case dr:yt(a,!0),a.measure(E,z,0,0);break;case Lr:yt(a,!0),a.measure(x,b,0,0)}}}Ae.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)))},Ae.Pn=function(a){this.portId!==null&&(Uv(a,!0),a instanceof Di&&G1(a,this))},Ae.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 ui&&$h(this),ne=this.Ib;if(z){var re=this.Ib,oe=this.dc,ue=this.areaBackground,ce=this.Ma;ue===null&&ce===null||a.yc(),ue!==null&&(Ds(this,a,ue,!0,!0,oe,re),ue instanceof da&&ue.type===Nc?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ue)):a.fillRect(re.x,re.y,re.width,re.height)),ce!==null&&(Ds(this,a,ce,!0,!1,oe,re),ce instanceof da&&ce.type===Nc?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ce)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||ne.width!==0&&ne.height!==0&&!isNaN(ne.x)&&!isNaN(ne.y))){z=this.transform,re=this.panel,this.l&4096&&Sl(this),ue=this.part,oe=!1;var me=0;ue&&y.Gf("drawShadows")&&(oe=ue.isShadowed)&&(ce=ue.shadowOffset,me=Math.max(ce.y,ce.x)*y.scale*y.Mb),ce=this.Dd();var we;if(!(we=y.$i||!ce)){var Fe=this.naturalBounds;we=this.wh;var De=we.m11,_e=we.m21,pt=we.dx,rt=we.m12,bt=we.m22,It=we.dy,Rt,Kt=Rt=0;we=Rt*De+Kt*_e+pt;var fn=Rt*rt+Kt*bt+It;Rt=Fe.width+me,Kt=0;var bi=Rt*De+Kt*_e+pt;Rt=Rt*rt+Kt*bt+It,Kt=Math.min(we,bi);var Yi=Math.min(fn,Rt),Wi=Math.max(we+0,bi)-Kt,hi=Math.max(fn+0,Rt)-Yi;we=Kt,fn=Yi,Rt=Fe.width+me,Kt=Fe.height+me,bi=Rt*De+Kt*_e+pt,Rt=Rt*rt+Kt*bt+It,Kt=Math.min(we,bi),Yi=Math.min(fn,Rt),Wi=Math.max(we+Wi,bi)-Kt,hi=Math.max(fn+hi,Rt)-Yi,we=Kt,fn=Yi,Rt=0,Kt=Fe.height+me,bi=Rt*De+Kt*_e+pt,Rt=Rt*rt+Kt*bt+It,Kt=Math.min(we,bi),Yi=Math.min(fn,Rt),Wi=Math.max(we+Wi,bi)-Kt,hi=Math.max(fn+hi,Rt)-Yi,we=Kt,fn=Yi,me=y.viewportBounds,Fe=me.x,De=me.y,we=!(we>me.width+Fe||Fe>Wi+we||fn>me.height+De||De>hi+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),hi=Math.max(ne.y,fn.y),me=Math.min(ne.right,fn.right)-Wi,Fe=Math.min(ne.bottom,fn.bottom)-hi,De=this.tb,De!==null&&(Wi=De.x,hi=De.y,me=De.width,Fe=De.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,hi,me,Fe),a.clip()}if(ce){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),ce&&oe&&gu(a),we&&(a.restore(),a.Vc(this instanceof ui)),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===ui.Auto||y.type===ui.Spot)&&y.Pb()!==a)}Ae.Dv=function(){};function Uu(a,y,x,E){Ds(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof da&&a.areaBackground.type===Nc?(y.beginPath(),y.rect(E.x,E.y,E.width,E.height),y.ng(a.areaBackground)):y.fillRect(E.x,E.y,E.width,E.height)}function wu(a,y,x,E){var b=a.kq(),z=x.x,ne=x.y,re=x.width+b,oe=x.height+b;Ds(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof da&&a.Ma.type===Nc?(y.beginPath(),y.rect(z-b/2,ne-b/2,re,oe),y.ng(a.Ma)):y.fillRect(z-b/2,ne-b/2,re,oe)}function 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===ui.Table?(y=y.svg.getElementsByClassName("gojs-ts"),y=y.length!==0?y[0]:null,y!==null&&y.after(x)):y.svg.prepend(x);else{for(;a!==0&&!y.M(a-1).Ed();)a--;a===0?y.svg.prepend(x):(a=y.M(a-1).svg,a!==null?a.after(x):y.svg.appendChild(x))}}function Yu(a,y,x){if(!(y instanceof Da))return!1;if(!a.visible||a.opacity===0||a.Dd()&&!a.isVisible())return a.svg!==null&&a.svg.parentNode!==null&&a.svg.remove(),!0;var E=a.panel,b=a.nk(y);if(a.kk(y,x,b))return a.svg.parentElement!==null?(a.Dd()&&(y.ti=a.svg),!0):(a.Dd()?(y.ti!==null?y.ti.after(a.svg):y.Nj.prepend(a.svg),y.ti=a.svg):E&&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 ui;var re=a instanceof ui?$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)}Ae.$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"+ia++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ne,height:x}),this instanceof ui&&(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=Sr(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()}}Ae.hh=function(){},Ae.lv=function(){this.Uc=!0},Ae.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 ui?$h(this):!1;if(!(this instanceof ui&&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 ui)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 ui))&&(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},Ae.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 ce=x.xe;else{var me=0,we=0,Fe=0,De=0,_e=0,pt=0;if(pt=_e=0,b?(_e=ne.x,pt=ne.y):E||(_e-=ue/2,pt-=ue/2),me=x.start.x*re+x.start.offsetX,we=x.start.y*oe+x.start.offsetY,Fe=x.end.x*re+x.end.offsetX,De=x.end.y*oe+x.end.offsetY,me+=_e,Fe+=_e,we+=pt,De+=pt,x.type===Bh)ce=y.createLinearGradient(me,we,Fe,De);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,ce=y.createRadialGradient(me,we,_e,Fe,De,pt);else if(x.type===lp)try{ce=y.createPattern(x.pattern,"repeat")}catch(bt){ce=null}if(x.type!==lp&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ce.addColorStop(b.key,b.value);if(z&&(x.xe=ce,ce!==null&&(x.yk=re,x.ft=oe),ce===null&&x.type===lp&&x.yk!==-1)){x.yk=-1;var rt=a.diagram;rt!==null&&x.yk===-1&&_n(function(){rt.redraw()},600)}}E?y.fillStyle=ce:y.strokeStyle=ce}}}Ae.rg=function(a){if(a instanceof ui)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},Ae.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Ae.If=function(){for(var a=this instanceof ui?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()){ke(a,!1);return}if(y.translate(a.Ib.x-a.uc.x,a.Ib.y-a.uc.y),a.scale!==1||a.angle!==0){var x=a.naturalBounds;a.no(y,x.x,x.y,x.width,x.height)}ke(a,!1),Ke(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Ke(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,Ke(a,!1)))}Ae.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=st.alloc();z.yi(y,x,E,b,Oo),a.rotate(this.Kb,z.x,z.y),st.free(z)}},Ae.v=function(a){if(!St(this)){a===void 0&&(a=!1),yt(this,!0),Ht(this,!0);var y=this.panel;y===null||a||y.v()}},Ae.Uj=function(){St(this)||(yt(this,!0),Ht(this,!0))};function uu(a){if(!Tt(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Di&&a.Bd(),y.$b())),Ht(a,!0)}}Ae.Uk=function(){!(this.l&2048)&&(ke(this,!0),Ke(this,!0))},Ae.Wu=function(){Ke(this,!0)},Ae.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===ui.Table?jc(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===ui.Auto&&E.Pb()===a?Pl(a,si,y):x===uo?E!==null?E.type===ui.Spot&&E.Pb()===a?Pl(a,si,y):(x=E.defaultStretch,x===uo?Pl(a,ii,y):Pl(a,x,y)):Pl(a,ii,y):Pl(a,x,y)}function jc(a,y,x,E){var b=a.stretch;if(b!==uo)return Pl(a,b,E);var z=b=null;switch(y.stretch){case Lr:z=!0;break;case si:z=!0}switch(x.stretch){case dr:b=!0;break;case si:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===dr||y===si),z===null&&(z=y===Lr||y===si),b===!0&&z===!0?Pl(a,si,E):b===!0?Pl(a,dr,E):z===!0?Pl(a,Lr,E):Pl(a,ii,E)}function Pl(a,y,x){if(x)return y;if(y===ii||(x=a.desiredSize,x.w()))return ii;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===dr)return ii;if(y===si)return Lr}else{if(y===Lr)return ii;if(y===si)return dr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Lr)return ii;if(y===si)return dr}else{if(y===dr)return ii;if(y===si)return Lr}return y}function Pc(a,y){a.l=y?a.l|512:a.l&-513}function Se(a){return(a.l&1024)!==0}function Ce(a,y){a.l=y?a.l|1024:a.l&-1025}function ke(a,y){a.l=y?a.l|2048:a.l&-2049}function Ke(a,y){a.l=y?a.l|4096:a.l&-4097}function St(a){return(a.l&8192)!==0}function yt(a,y){a.l=y?a.l|8192:a.l&-8193}function Tt(a){return(a.l&16384)!==0}function Ht(a,y){a.l=y?a.l|16384:a.l&-16385}Ae.Gj=function(){this.svg=null},Ae.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Ae.Av=function(){},Ae.zv=function(a){return this.pa=a,uu(this),!0},Ae.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Ae.kq=function(){return 0};function Sn(a){var y=a.part;if(y instanceof Di&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||G1(y,a)}}function Hn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof ui?a instanceof Di?a.Bd():a.qm(a,function(x){Sn(x)}):Sn(a))}Ae.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)&&Et("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Vn),this.localBindings.add(b),this},Ae.set=function(a){return Object.assign(this,a),this},Ae.Du=function(a){return bn(this,a),this},Ae.apply=function(a){return a(this),this},Ae.nm=function(a){return uc(this,a),this},Ae.pz=function(){return this.ih()},Ae.ih=function(){for(var a=this instanceof ui?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Ae.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new $i),this.animationTriggers.add(a.propertyName,a),this};function An(a,y){for(var x=1;x<arguments.length;++x);x=arguments;var E=null,b=null;if(typeof a=="function")b=a;else if(typeof a=="string"){var z=Oi.I(a);typeof z=="function"?(x=In(arguments),E=z(x),tn(E)||Et('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=ht.go[a]}if(E===null&&(b!=null&&b.constructor||Et("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?Et("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):bn(E,z);return E}function bn(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 ui)y=Qc.I(y),y!==null&&(a.type=y);else if(a instanceof da){var x=ri(da,y);x!==null?a.type=x:Et("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof qt?(y=ri(qt,y),y!==null&&(a.type=y)):a instanceof gr&&(y=ri(gr,y),y!==null&&(a.type=y));else if(y instanceof Vt)a instanceof ui||Et("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):Et("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof wn)typeof a.qb=="function"&&a.qb(y);else if(y instanceof ll)a.type=y;else if(y instanceof tl)a instanceof Vt||a instanceof ol?a.bind(y):Et("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ku)a instanceof Vt?a.Jv(y):Et("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof So)a instanceof qt&&a.type===qt.o?a.figures.add(y):Et("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof gr)a instanceof So?a.segments.add(y):Et("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof vs)a instanceof hn||a instanceof po?a.layout=y:Et("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++)bn(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof da){x=new Pr;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)&&Et("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)&&Et("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Pr;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);uc(a,b)}else uc(a,y);else Et('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function En(a,y){Oi.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(Vt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new $r),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 $r),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 $r),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Lo(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&&(Lo(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Eu},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new no),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Eu&&(this.angle=0))}},segmentIndex:{get:function(){return this.Ua!==null?this.Ua.u:-1/0},set:function(a){a=Math.round(a);var y=this.segmentIndex;y!==a&&(this.Ua===null&&(this.Ua=new no),this.Ua.u=a,this.v(),this.g("segmentIndex",y,a))}},segmentFraction:{get:function(){return this.Ua!==null?this.Ua.o:0},set:function(a){isNaN(a)||0>a?a=0:1<a&&(a=1);var y=this.segmentFraction;y!==a&&(this.Ua===null&&(this.Ua=new no),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:ra},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new no),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:uo},set:function(a){var y=this.stretch;y!==a&&(Lo(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&&(Lo(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)&&Xn(a,"0 <= value <= 1",Vt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(eg(y,y.actualBounds)))}},filter:{get:function(){return this.bn},set:function(a){var y=this.bn;y!==a&&(this.bn=a,this.Uc=!0,this.g("filter",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(eg(y,y.actualBounds)))}},visible:{get:function(){return(this.l&1)!==0},set:function(a){var y=(this.l&1)!==0;y!==a&&(this.l^=1,this.g("visible",y,a),y=this.panel,y!==null?y.v():this.Dd()&&this.Zb(a),this.N(),Hn(this))}},pickable:{get:function(){return(this.l&2)!==0},set:function(a){var y=(this.l&2)!==0;y!==a&&(this.l^=2,this.g("pickable",y,a))}},fromLinkableDuplicates:{get:function(){return(this.l&4)!==0},set:function(a){var y=(this.l&4)!==0;y!==a&&(this.l^=4,this.g("fromLinkableDuplicates",y,a))}},fromLinkableSelfNode:{get:function(){return(this.l&8)!==0},set:function(a){var y=(this.l&8)!==0;y!==a&&(this.l^=8,this.g("fromLinkableSelfNode",y,a))}},toLinkableDuplicates:{get:function(){return(this.l&16)!==0},set:function(a){var y=(this.l&16)!==0;y!==a&&(this.l^=16,this.g("toLinkableDuplicates",y,a))}},toLinkableSelfNode:{get:function(){return(this.l&32)!==0},set:function(a){var y=(this.l&32)!==0;y!==a&&(this.l^=32,this.g("toLinkableSelfNode",y,a))}},isPanelMain:{get:function(){return(this.l&64)!==0},set:function(a){var y=(this.l&64)!==0;y!==a&&(this.l^=64,this.v(),this.g("isPanelMain",y,a))}},isActionable:{get:function(){return(this.l&128)!==0},set:function(a){var y=(this.l&128)!==0;y!==a&&(this.l^=128,this.g("isActionable",y,a))}},areaBackground:{get:function(){return this.A!==null?this.A.gd:null},set:function(a){var y=this.areaBackground;y!==a&&(a!==null&&yf(a,"GraphObject.areaBackground"),a instanceof da&&a.freeze(),Lo(this),this.A.gd=a,this.N(),this.g("areaBackground",y,a))}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&yf(a,"GraphObject.background"),a instanceof da&&a.freeze(),this.Ma=a,this.N(),this.g("background",y,a))}},part:{get:function(){if(this.Dd())return this;if(this.Ng!==null)return this.Ng;var a;for(a=this.panel;a;){if(a instanceof xr)return this.Ng=a;a=a.panel}return null}},svg:{get:function(){return this.V},set:function(a){this.V=a}},panel:{get:function(){return this.Me}},layer:{get:function(){var a=this.part;return a!==null?a.layer:null}},diagram:{get:function(){var a=this.part;return a!==null?a.diagram:null}},position:{get:function(){return this.pa},set:function(a){var y=a.x,x=a.y,E=this.pa,b=E.x;E=E.y,(b===y||isNaN(b)&&isNaN(y))&&(E===x||isNaN(E)&&isNaN(x))?this.Av():(a=a.copy(),this.zv(a,b,E)&&this.g("position",new st(b,E),a))}},actualBounds:{get:function(){return this.Ib}},scale:{get:function(){return this.Ca},set:function(a){var y=this.Ca;y!==a&&(0>=a&&Et("GraphObject.scale for "+this+" must be greater than zero, not: "+a),this.Ca=a,this.v(),this.g("scale",y,a))}},angle:{get:function(){return this.Kb},set:function(a){var y=this.Kb;y!==a&&(a%=360,0>a&&(a+=360),y!==a&&(this.Kb=a,Hn(this),this.v(),this.g("angle",y,a)))}},desiredSize:{get:function(){return this.jd},set:function(a){var y=a.width,x=a.height,E=this.jd,b=E.width,z=E.height;(b===y||isNaN(b)&&isNaN(y))&&(z===x||isNaN(z)&&isNaN(x))||(this.jd=a=a.J(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",E,a),Se(this)&&(a=this.part,a!==null&&(is(this,a,"width"),is(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 mi(a,this.jd.height).freeze(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&is(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 mi(this.jd.width,a).freeze(),this.v(),this instanceof Co&&this.qc(),this.g("desiredSize",y,a),Se(this)&&(a=this.part,a!==null&&is(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:oo},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(),Lo(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Ka},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(),Lo(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 hr(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&&(Lo(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:ii},set:function(a){this.reshapingBehavior!==a&&(Lo(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()&&Et("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&&Xn(a,">= 0",Vt,"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&&Xn(a,">= 1",Vt,"columnSpan"),Lo(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&&Xn(a,">= 0",Vt,"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&&Xn(a,">= 1",Vt,"rowSpan"),Lo(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&&(Lo(this),this.A.Di=a,this.v(),this.g("spanAllocation",y,a))}},alignmentFocus:{get:function(){return this.sk},set:function(a){var y=this.sk;y.D(a)||(this.sk=a=a.J(),this.v(),this.g("alignmentFocus",y,a))}},portId:{get:function(){return this.Yn},set:function(a){var y=this.Yn;if(y!==a){var x=this.part;x===null||x instanceof Di||Et("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Qv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,V1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:ws},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Sn(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Xn(a,">= 0",Vt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Sn(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),Sn(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&&Xn(a,">= 0",Vt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:ws},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Sn(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Xn(a,">= 0",Vt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Sn(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),Sn(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&&Xn(a,">= 0",Vt,"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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(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&&(Lo(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Vt.prototype.trigger=Vt.prototype.Jv,Vt.prototype.findBindingPanel=Vt.prototype.ih,Vt.prototype.findTemplateBinder=Vt.prototype.pz,Vt.prototype.setProperties=Vt.prototype.nm,Vt.prototype.apply=Vt.prototype.apply,Vt.prototype.attach=Vt.prototype.Du,Vt.prototype.set=Vt.prototype.set,Vt.prototype.isEnabledObject=Vt.prototype.If,Vt.prototype.isVisibleObject=Vt.prototype.Ed,Vt.prototype.isContainedBy=Vt.prototype.rg,Vt.prototype.getNearestIntersectionPoint=Vt.prototype.rs,Vt.prototype.getLocalPoint=Vt.prototype.qs,Vt.prototype.getDocumentScale=Vt.prototype.Df,Vt.prototype.getDocumentAngle=Vt.prototype.li,Vt.prototype.getDocumentBounds=Vt.prototype.mi,Vt.prototype.getDocumentPoint=Vt.prototype.ga,Vt.prototype.intersectsRect=Vt.prototype.Yc,Vt.prototype.containedInRect=Vt.prototype.fh,Vt.prototype.containsRect=Vt.prototype.Re,Vt.prototype.containsPoint=Vt.prototype.ca,Vt.prototype.raiseChanged=Vt.prototype.g,Vt.prototype.raiseChangedEvent=Vt.prototype.cb,Vt.prototype.addCopyProperty=Vt.prototype.Vw;var Oi=null;Vt.className="GraphObject",Oi=new $i,En("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=An(ui,ui.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof ui){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"},An(Co,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Xi(0,0,2.76142374915397,2.761423749153969),spot2:new Xi(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 ui&&(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 ui&&(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 ui&&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 ui&&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 ui&&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 ui&&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}),En("TreeExpanderButton",function(){var a=An("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},An(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 Di){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}),En("SubGraphExpanderButton",function(){var a=An("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},An(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 po){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}),En("ToolTip",function(){return An(pa,ui.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},An(Co,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Xi(0,0,4,6),spot2:new Xi(1,1,-4,-4)}))}),En("ContextMenu",function(){return An(pa,ui.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new st(0,3),shadowBlur:5},new tl("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),En("ContextMenuButton",function(){var a=An("Button");a.stretch=dr;var y=a.fb("ButtonBorder");return y instanceof Co&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Xi(0,0,2,3),y.spot2=new Xi(1,1,-2,-2)),a}),En("PanelExpanderButton",function(a){var y=ni(a,"COLLAPSIBLE"),x=An("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},An(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}),En("CheckBoxButton",function(a){var y=ni(a);return a=An("Button",{desiredSize:new mi(14,14)},An(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:nr,visible:!1},y!==""?new tl("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof ui){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}),En("CheckBox",function(a){a=ni(a),a=An("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new hr(0,1,0,0)});var y=An(ui,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new hr(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}),Vt.None=ii=new wn(Vt,"None",0),Vt.Default=uo=new wn(Vt,"Default",0),Vt.Vertical=Lr=new wn(Vt,"Vertical",4),Vt.Horizontal=dr=new wn(Vt,"Horizontal",5),Vt.Fill=si=new wn(Vt,"Fill",3),Vt.Uniform=nr=new wn(Vt,"Uniform",1),Vt.UniformToFill=Ho=new wn(Vt,"UniformToFill",2),Vt.FlipVertical=Mo=new wn(Vt,"FlipVertical",1),Vt.FlipHorizontal=qo=new wn(Vt,"FlipHorizontal",2),Vt.FlipBoth=_a=new wn(Vt,"FlipBoth",3),Vt.make=An,Vt.getBuilders=function(){var a=new $i,y;for(y in Oi)if(y!==y.toLowerCase()){var x=Oi.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Vt.defineBuilder=En,Vt.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Oi.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Vt))return y&&E.set(y),E;Et('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Vt.takeBuilderArgument=ni;function $r(){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=oo,this.o=Ka,this.hg=uo,this.ob=this.Bi=1,this.Pf=ii,this.Pc=this.Ci=this.gd=null,this.Oc="category"}$r.prototype.copy=function(){var a=new $r;return a.xa=this.xa,a.zp=this.zp,a.te=this.te,a.nb=this.nb,a.j=this.j,a.zh=this.zh,a.Fh=this.Fh,a.Bh=this.Bh,a.Mh=this.Mh,a.Ph=this.Ph,a.Qh=this.Qh,a.Oh=this.Oh,a.Nh=this.Nh,a.Of=this.Of,a.Xd=this.Xd,a.Lh=this.Lh,a.V=this.V,a.ia=this.ia,a.Ha=this.Ha,a.F=this.F,a.$h=this.$h,a.Ch=this.Ch,a.Hb=this.Hb,a.Di=this.Di,a.hb=this.hb,a.u=this.u.J(),a.o=this.o.J(),a.hg=this.hg,a.Bi=this.Bi,a.ob=this.ob,a.Pf=this.Pf,a.gd=this.gd,a.Ci=this.Ci,a.Pc=this.Pc,a.Oc=this.Oc,a};function no(){this.u=-1/0,this.o=0,this.F=ra,this.rr=Eu,this.j=this.V="None"}no.prototype.copy=function(){var a=new no;return a.u=this.u,a.o=this.o,a.F=this.F.J(),a.rr=this.rr,a.V=this.V,a.j=this.j,a},no.className="LinkElementSettings";function yo(){this.yj=this.Xi=Fi,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 ta(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}ta.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},ta.className="SGradient";function Qo(a,y,x){this.ownerDocument=a=y===void 0?ht.document:y,this.cA="http://www.w3.org/2000/svg",a!==void 0&&(this.Oa=this.Ud("svg",{width:"1px",height:"1px",viewBox:"0 0 1 1"}),this.style.display="block",this.style.letterSpacing="normal",this.style.wordSpacing="normal",this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),this.Oa.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink")),this.hs=null,this.context=new Da(this,x)}Qo.prototype.resize=function(a,y,x,E){return this.width!==a||this.height!==y?(this.width=a,this.height=y,this.style.width=x+"px",this.style.height=E+"px",this.Oa.setAttributeNS(null,"width",x+"px"),this.Oa.setAttributeNS(null,"height",E+"px"),this.Oa.setAttributeNS(null,"viewBox","0 0 "+x+" "+E),this.context.ww.firstElementChild.setAttributeNS(null,"width",x+"px"),this.context.ww.firstElementChild.setAttributeNS(null,"height",E+"px"),!0):!1},Qo.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),tn(y))for(var E in y)a.setAttributeNS(E==="href"?"http://www.w3.org/1999/xlink":"",E,y[E]);return x!==void 0&&(a.textContent=x),a},Qo.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Qo.prototype.focus=function(){this.Oa.focus()},Qo.prototype.mx=function(){this.ownerDocument=null},Qe.Object.defineProperties(Qo.prototype,{width:{get:function(){return this.Oa.width.baseVal.value},set:function(a){this.Oa.setAttribute("width",a+"px")}},height:{get:function(){return this.Oa.height.baseVal.value},set:function(a){this.Oa.setAttribute("height",a+"px")}},style:{get:function(){return this.Oa.style}}}),Qo.className="SVGSurface";function Da(a,y){this.Gv=a,this.svg=a.Oa,this.stack=[],this.nh=[],this.fillStyle="#000000",this.font="10px sans-serif",this.globalAlpha=1,this.lineCap="butt",this.lineDashOffset=0,this.lineJoin="miter",this.lineWidth=1,this.miterLimit=10,this.shadowBlur=0,this.shadowColor="rgba(0, 0, 0, 0)",this.shadowOffsetY=this.shadowOffsetX=0,this.Il=!1,this.strokeStyle="#000000",this.textAlign="start",this.clipInsteadOfFill=!1,this.Vg=this.Br=this.Ar=0,this.yd=this.ad=null,this.path=[],this.Yl={},this.Ct=!1,this.Yg=null,this.uj=0,this.rb=new To,this.j=wc(this),this.Nj=wc(this,"gojs-diagram"),this.Hl=this.ti=null;var x=ia++,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 cs(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+")")}Ae=Da.prototype,Ae.arc=function(a,y,x,E,b,z,ne,re){var oe=2*Math.PI,ue=oe-1e-6,ce=x*Math.cos(E),me=x*Math.sin(E),we=a+ce,Fe=y+me,De=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ne-we)||1e-6<Math.abs(re-Fe))&&this.path.push(["L",we,+Fe]),0>E&&(E=E%oe+oe),E>ue?(this.path.push(["A",x,x,0,1,De,a-ce,y-me]),this.path.push(["A",x,x,0,1,De,we,Fe])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),De,a+x*Math.cos(b),y+x*Math.sin(b)])},Ae.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ae.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ae.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Ae.clearRect=function(){},Ae.clip=function(){this.Yl.clipPath=!0},Ae.closePath=function(){this.path.push(["z"])},Ae.createLinearGradient=function(a,y,x,E){var b=new ta("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Ae.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"+ia++,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+")"},Ae.createRadialGradient=function(a,y,x,E,b,z){var ne=new ta("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)}Ae.drawImage=function(a,y,x,E,b,z,ne,re,oe){var ue="";a instanceof HTMLCanvasElement&&(ue=a.toDataURL()),a instanceof HTMLImageElement&&(ue=a.getAttribute("src"));var ce=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ne=x,re=E=ce,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,Ts(this,y,x,E,b,z||0,ne||0,re,oe),z={x:0,y:0,width:ce||E,height:a||b,href:ue},nt.$(E,re)&&nt.$(b,oe)?ue.toLowerCase().indexOf(".svg")===-1&&ue.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ce||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),Is(this,Eh,z,this.rb),this.addElement(Eh,z)},Ae.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),Wl(this,this.Yl)},Ae.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ae.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)},Ae.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))},Ae.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])},Ae.lineTo=function(a,y){this.path.push(["L",a,y])},Ae.moveTo=function(a,y){this.path.push(["M",a,y])},Ae.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Ae.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"])},Ae.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},Ae.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())},Ae.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]+")"}Ae.scale=function(a,y){this.rb.scale(a,y)},Ae.translate=function(a,y){this.rb.translate(a,y)},Ae.transform=function(){},Ae.yc=function(){},Ae.stroke=function(){Xu(this,this.Yl)},Ae.jk=function(){this.clipInsteadOfFill||this.stroke()},Ae.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Ae.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 ta?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 ta?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 ta)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"+ia++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],ne=0;ne<y;ne++){var re=b[ne],oe=re.color;re={offset:re.offset,"stop-color":oe},/^rgba\(/.test(oe)&&(oe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(oe),re["stop-color"]="rgb("+oe[1]+","+oe[2]+","+oe[3]+")",re["stop-opacity"]=oe[4]),z.push(re)}for(z.sort(function(ue,ce){return ue.offset>ce.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Ae.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=In(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}Ae.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}Ae.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Ae.fs=function(){this.Ct=!1},Ae.Vc=function(){},Ae.Wx=function(){},Da.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Da.prototype.getImageData=function(){return null},Da.prototype.measureText=function(){return null};function Nd(a,y){y=y.getAttribute("fill"),y!==null&&(y=y.split("#"),y.length!==1&&(y=a.svg.getElementById(y[1].slice(0,-1)),y!==null&&a.svg.innerHTML.match(new RegExp(y.id,"g")).length===1&&y.remove()))}Da.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Da.className="SVGContext",hn.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Qo(this,ht.document));var y=new Qo(this,ht.document,!0);a===void 0&&(a=new Pr);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?ht.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&&Et("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 Yt,this.isTemporary=!!x}Ae=fd.prototype,Ae.Wx=function(a){this.Z.imageSmoothingEnabled=a},Ae.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Ae.beginPath=function(){this.Z.beginPath()},Ae.Se=function(){},Ae.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Ae.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Ae.clip=function(){this.Z.clip()},Ae.closePath=function(){this.Z.closePath()},Ae.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Ae.createPattern=function(a,y){return this.Z.createPattern(a,y)},Ae.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Ae.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)},Ae.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Ae.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ae.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ae.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Ae.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Ae.lineTo=function(a,y){this.Z.lineTo(a,y)},Ae.measureText=function(a){return this.Z.measureText(a)},Ae.moveTo=function(a,y){this.Z.moveTo(a,y)},Ae.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Ae.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Ae.restore=function(){this.Z.restore()},Ae.save=function(){this.yc(),this.Z.save()},fd.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Ae=fd.prototype,Ae.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Ae.scale=function(a,y){this.El.scale(a,y)},Ae.translate=function(a,y){this.El.translate(a,y)},Ae.stroke=function(){this.Z.stroke()},Ae.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}},Ae.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Ae.ng=function(a,y){if(a instanceof da&&a.type===Nc){var x=a.yk;a=a.ft,a>x?(this.scale(x/a,1),this.translate((a-x)/2,0)):x>a&&(this.scale(1,a/x),this.translate(0,(x-a)/2)),this.Hm?this.clip():this.fill(y),a>x?(this.translate(-(a-x)/2,0),this.scale(1/(x/a),1)):x>a&&(this.translate(0,-(x-a)/2),this.scale(1,1/(a/x)))}else this.Hm?this.clip():this.fill(y)},Ae.jk=function(){this.Hm||this.stroke()},Ae.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ae.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ae.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(vf),a.lineDashOffset=0)},Ae.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ae.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 da(a,y){sp||(ap(),sp=!0),Io(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=Cn):this.Lk=a===Nc?this.Qd=Oo:this.Qd=ws,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}da.prototype.copy=function(){var a=new da;return a.na=this.na,a.xk=this.xk,a.Qd=this.Qd.J(),a.Lk=this.Lk.J(),a.Gr=this.Gr,a.Xp=this.Xp,this.we!==null&&(a.we=this.we.copy()),a.cr=this.cr,a},Ae=da.prototype,Ae.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ae.ka=function(){return Object.isFrozen(this)&&Et("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ae.qb=function(a){a.classType===da&&(this.type=a)},Ae.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+")"},Ae.addColorStop=function(a,y){return this._isFrozen&&Pn(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Xn(a,"0 <= loc <= 1",da,"addColorStop:loc"),this.we===null&&(this.we=new $i),this.we.add(a,y),this.na===Gh&&(this.type=Bh),this.xe=null,this},Ae.Vz=function(a,y){if(this._isFrozen&&Pn(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)}Ae.Wy=function(a,y){if(this._isFrozen&&Pn(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=Xa.j;var E=Xa.u,b=Xa.o,z=Xa.F;return Cc(y),x===void 0&&(x=.5),"rgba("+Math.round((Xa.j-a)*x+a)+", "+Math.round((Xa.u-E)*x+E)+", "+Math.round((Xa.o-b)*x+b)+", "+Math.round((Xa.F-z)*x+z)+")"}Ae.Gx=function(){if(this.type===Gh)return Qd(this.color);if((this.type===Bh||this.type===Nc)&&this.colorStops!==null){var a=this.colorStops;if(this.type===Nc)return Qd(a.first().value);if(a.get(.5)!==null)return Qd(a.get(.5));if(a.count===2)return a=a.Fa(),Qd(pd(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var ne=y.key,re=Math.abs(.5-y.key);b>z&&re<b?(x=ne,b=re):z>=b&&re<z&&(E=ne,z=re)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,Qd(pd(a.get(x),a.get(E),1-z/b))}return!1};function Qd(a){return a?a instanceof da?a.Gx():(Cc(a),128>(299*Xa.j+587*Xa.u+114*Xa.o)/1e3):!1}function Fh(a,y){switch(y){case up:y=100*Xf(Xa.j);var x=100*Xf(Xa.u),E=100*Xf(Xa.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=Xa.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,Xa.j=255*op((3.2404542*Tl.j+-1.5371385*Tl.u+-.4985314*Tl.o)/100),Xa.u=255*op(a/100),Xa.o=255*op(y/100),Xa.F=Tl.F,Xa.j=Math.round(Xa.j),255<Xa.j?Xa.j=255:0>Xa.j&&(Xa.j=0),Xa.u=Math.round(Xa.u),255<Xa.u?Xa.u=255:0>Xa.u&&(Xa.u=0),Xa.o=Math.round(Xa.o),255<Xa.o?Xa.o=255:0>Xa.o&&(Xa.o=0),"rgba("+Xa.j+", "+Xa.u+", "+Xa.o+", "+Xa.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:Et("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,Xa.j=a[0],Xa.u=a[1],Xa.o=a[2],Xa.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Xa.j=0,Xa.u=0,Xa.o=0,Xa.F=1)}}function Yf(){var a=Xa.j/255,y=Xa.u/255,x=Xa.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=Xa.F}function Xf(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function op(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Wp(a){return a>Ag?Math.pow(a,1/3):(xf*a+16)/116}function Ng(a){var y=a*a*a;return y>Ag?y:(116*a-16)/xf}function yf(a,y){typeof a!="string"&&(a instanceof da||Et("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(da.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Pn(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=Cn:a===Nc&&(this.end=Oo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Pn(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Pn(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Pn(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Pn(this,a),0>a&&Xn(a,">= zero",da,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Pn(this,a),0>a&&Xn(a,">= zero",da,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Pn(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Pn(this,a),this.cr=a,this.xe=null}}}),da.prototype.isDark=da.prototype.Gx,da.prototype.darkenBy=da.prototype.Wy,da.prototype.lightenBy=da.prototype.Vz,da.prototype.addColorStop=da.prototype.addColorStop;var Ag=216/24389,xf=24389/27,Sf=[95.047,100,108.883],Dg=null,Xa=new gd,Ju=new gd,Tl=new gd,zc=new gd,sp=!1;da.className="Brush";var Gh;da.Solid=Gh=new wn(da,"Solid",0);var Bh;da.Linear=Bh=new wn(da,"Linear",1);var Nc;da.Radial=Nc=new wn(da,"Radial",2);var lp;da.Pattern=lp=new wn(da,"Pattern",4);var up;da.Lab=up=new wn(da,"Lab",5);var i1;da.HSL=i1=new wn(da,"HSL",6),da.randomColor=function(a,y){a===void 0&&(a=128),y===void 0&&(y=Math.max(a,255));var x=Math.abs(y-a);y=Math.floor(a+Math.random()*x).toString(16);var E=Math.floor(a+Math.random()*x).toString(16);return a=Math.floor(a+Math.random()*x).toString(16),2>y.length&&(y="0"+y),2>E.length&&(E="0"+E),2>a.length&&(a="0"+a),"#"+y+E+a},da.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;sp||(ap(),sp=!0);var y=Dg;if(y===null)return!0;y.fillStyle="#000000";var x=y.fillStyle;return y.fillStyle=a,y.fillStyle!==x?!0:(y.fillStyle="#FFFFFF",x=y.fillStyle,y.fillStyle=a,y.fillStyle!==x)},da.lighten=function(a){return Wh(a)},da.lightenBy=Wh,da.darken=function(a){return Lg(a)},da.darkenBy=Lg,da.mix=pd,da.isDark=Qd;function 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 ui}}}),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"}Wt(_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 ce=ue.margin,me=ce.right+ce.left;ce=ce.top+ce.bottom,ue.measure(y,x,z,ne);var we=ue.measuredBounds;me=Math.max(we.width+me,0),ce=Math.max(we.height+ce,0),we=ue.position.x;var Fe=ue.position.y;isFinite(we)||(we=0),isFinite(Fe)||(Fe=0),ue instanceof Co&&ue.isGeometryPositioned&&(ue=ue.strokeWidth/2,we-=ue,Fe-=ue),fs(b,we,Fe,me,ce)}}},_m.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],ne=z.measuredBounds,re=z.margin,oe=z.position.x,ue=z.position.y;if(oe=isNaN(oe)?-a:oe-a,ue=isNaN(ue)?-x:ue-x,z instanceof Co&&z.isGeometryPositioned){var ce=z.strokeWidth/2;oe-=ce,ue-=ce}z.visible&&z.arrange(oe+re.left,ue+re.top,ne.width,ne.height)}};function jm(){this.xa="Base"}Wt(jm,ll),jm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length;y=Si(),z=Mh(a);for(var oe=0;oe<re;oe++){var ue=E[oe];if(ue.visible||ue===z){var ce=fu(ue,!1);if(ce!==ii&&ce!==dr)y.push(ue);else{ue.measure(1/0,x,0,ne),ce=ue.margin,ue=ue.measuredBounds;var me=Math.max(ue.height+ce.top+ce.bottom,0);b.width+=Math.max(ue.width+ce.right+ce.left,0),b.height=Math.max(b.height,me)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)oe=y[a],(oe.visible||oe===z)&&(ce=oe.margin,re=ce.right+ce.left,ce=ce.top+ce.bottom,oe.measure(1/0,x,0,ne),oe=oe.measuredBounds,ce=Math.max(oe.height+ce,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,ce));ki(y)},jm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,ne=a.isOpposite,re=ne?x.width:b.left,oe=0;oe<E;oe++){var ue=z,ce=y[oe];if(ce.visible){var me=ce.measuredBounds,we=ce.margin,Fe=we.top+we.bottom,De=z+b.bottom,_e=me.height,pt=fu(ce,!1);(isNaN(ce.desiredSize.height)&&pt===si||pt===Lr)&&(_e=Math.max(x.height-Fe-De,0)),Fe=_e+Fe+De,De=ce.alignment,De.Xb()&&(De=a.defaultAlignment),De.sb()||(De=Oo),ne&&(re-=me.width+we.left+we.right),ce.arrange(re+De.offsetX+we.left,ue+De.offsetY+we.top+(x.height*De.y-Fe*De.y),me.width,_e),ne||(re+=me.width+we.left+we.right)}}};function zm(){this.xa="Base"}Wt(zm,ll),zm.prototype.measure=function(a,y,x,E,b,z){var ne=E.length;x=Si();for(var re=Mh(a),oe=0;oe<ne;oe++){var ue=E[oe];if(ue.visible||ue===re){var ce=fu(ue,!1);if(ce!==ii&&ce!==Lr)x.push(ue);else{var me=ue.margin;ce=me.right+me.left,me=me.top+me.bottom,ue.measure(y,1/0,z,0),ue=ue.measuredBounds,ys(b,Math.max(b.width,Math.max(ue.width+ce,0)),b.height+Math.max(ue.height+me,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);ki(x)}},zm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,ne=a.isOpposite,re=ne?x.height:b.top,oe=0;oe<E;oe++){var ue=z,ce=y[oe];if(ce.visible){var me=ce.measuredBounds,we=ce.margin,Fe=we.left+we.right,De=z+b.right,_e=me.width,pt=fu(ce,!1);(isNaN(ce.desiredSize.width)&&pt===si||pt===dr)&&(_e=Math.max(x.width-Fe-De,0)),Fe=_e+Fe+De,De=ce.alignment,De.Xb()&&(De=a.defaultAlignment),De.sb()||(De=Oo),ne&&(re-=me.height+we.bottom+we.top),ce.arrange(ue+De.offsetX+we.left+(x.width*De.x-Fe*De.x),re+De.offsetY+we.top,_e,me.height),ne||(re+=me.height+we.bottom+we.top)}}};function Zm(){this.xa="Base"}Wt(Zm,ll),Zm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),ue=oe.margin,ce=ue.right+ue.left,me=ue.top+ue.bottom;oe.measure(y,x,z,ne);var we=oe.measuredBounds;z=we.width,ne=we.height;var Fe=Math.max(z+ce,0),De=Math.max(ne+me,0),_e=a.isClipping,pt=Bn.allocAt(-ue.left,-ue.top,Fe,De),rt=Bn.allocAt(0,0,z,ne);Cv(oe,rt,!0),z=rt.width,ne=rt.height;for(var bt=!0,It=Mh(a),Rt=0;Rt<re;Rt++){var Kt=E[Rt];we=y;var fn=x;if(Kt!==oe&&(Kt.visible||Kt===It)){ue=Kt.margin;var bi=ue.left,Yi=ue.top;switch(Fe=ue.right+ue.left,De=ue.top+ue.bottom,ue=fu(Kt,!1),ue){case si:we=z,fn=ne,Yi=bi=De=Fe=0;break;case dr:we=z,bi=Fe=0;break;case Lr:fn=ne,Yi=De=0}Kt.measure(we,fn,0,0),we=Kt.measuredBounds,Fe=Math.max(we.width+Fe,0),De=Math.max(we.height+De,0),ue=Kt.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=Oo);var Wi=Kt.alignmentFocus;if(Wi.Xb()&&(Wi=Oo),fn=null,Kt instanceof ui&&Kt.$e!==""&&(fn=Kt.fb(Kt.$e),fn===Kt&&(fn=null)),bi=rt.x-bi,Yi=rt.y-Yi,fn!==null){for(Kt.arrange(0,0,we.width,we.height),we=fn.actualBounds,we=st.allocAt(we.x+(Wi.x*we.width-Wi.offsetX),we.y+(Wi.y*we.height-Wi.offsetY)),fn=fn.panel;fn!==Kt;)fn.transform.Ga(we),fn=fn.panel;bi+=ue.x*z+ue.offsetX-we.x,Yi+=ue.y*ne+ue.offsetY-we.y,st.free(we)}else bi+=ue.x*z+ue.offsetX-(Wi.x*we.width+Wi.offsetX),Yi+=ue.y*ne+ue.offsetY-(Wi.y*we.height+Wi.offsetY);bt?(bt=!1,b.h(bi,Yi,Fe,De)):fs(b,bi,Yi,Fe,De)}}switch(bt?b.assign(pt):_e?b.Uu(rt.x,rt.y,rt.width,rt.height):fs(b,pt.x,pt.y,pt.width,pt.height),Bn.free(pt),Bn.free(rt),ue=oe.stretch,ue===uo&&(ue=fu(oe,!1)),ue){case ii:return;case si:if(!isFinite(y)&&!isFinite(x))return;break;case dr:if(!isFinite(y))return;break;case Lr:if(!isFinite(x))return}for(we=oe.measuredBounds,z=we.width,ne=we.height,Fe=Math.max(z+ce,0),De=Math.max(ne+me,0),ue=oe.margin,rt=Bn.allocAt(-ue.left,-ue.top,Fe,De),Cv(oe,rt,!0),z=rt.width,ne=rt.height,y=0;y<re;y++)x=E[y],x===oe||!x.visible&&x!==It||(ue=x.margin,Fe=ue.right+ue.left,De=ue.top+ue.bottom,we=x.measuredBounds,Fe=Math.max(we.width+Fe,0),De=Math.max(we.height+De,0),ce=x.alignment,ce.Xb()&&(ce=a.defaultAlignment),ce.sb()||(ce=Oo),x=x.alignmentFocus,x.Xb()&&(x=Oo),bt?(bt=!1,b.h(ce.x*z+ce.offsetX-(x.x*we.width+x.offsetX)-ue.left,ce.y*ne+ce.offsetY-(x.y*we.height+x.offsetY)-ue.top,Fe,De)):fs(b,ce.x*z+ce.offsetX-(x.x*we.width+x.offsetX)-ue.left,ce.y*ne+ce.offsetY-(x.y*we.height+x.offsetY)-ue.top,Fe,De));bt?b.assign(pt):_e?b.Uu(rt.x,rt.y,rt.width,rt.height):fs(b,pt.x,pt.y,pt.width,pt.height),Bn.free(rt)},Zm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,ne=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var ue=z-x.x,ce=oe-x.y;for(b.arrange(ue,ce,ne,re),ne=Bn.allocAt(0,0,ne,re),Cv(b,ne,!1),re=0;re<E;re++){var me=y[re];if(me!==b){ue=me.measuredBounds;var we=ue.width,Fe=ue.height;ce=me.alignment,ce.Xb()&&(ce=a.defaultAlignment),ce.sb()||(ce=Oo);var De=me.alignmentFocus;if(De.Xb()&&(De=Oo),ue=null,me instanceof ui&&me.$e!==""&&(ue=me.fb(me.$e),ue===me&&(ue=null)),ue!==null){var _e=ue.actualBounds;for(De=st.allocAt(_e.x+(De.x*_e.width-De.offsetX),_e.y+(De.y*_e.height-De.offsetY)),ue=ue.panel;ue!==me;)ue.transform.Ga(De),ue=ue.panel;ue=ce.x*ne.width+ce.offsetX-De.x,ce=ce.y*ne.height+ce.offsetY-De.y,st.free(De)}else ue=ce.x*ne.width+ce.offsetX-(De.x*we+De.offsetX),ce=ce.y*ne.height+ce.offsetY-(De.y*Fe+De.offsetY);ue+=ne.x-x.x,ce+=ne.y-x.y,me.visible&&me.arrange(z+ue,oe+ce,we,Fe)}}Bn.free(ne)};function Cv(a,y,x){var E=null;if(a instanceof ui&&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"}Wt(Hm,ll),Hm.prototype.measure=function(a,y,x,E,b,z,ne){var re=E.length,oe=a.Pb(),ue=oe.margin,ce=y,me=x,we=ue.right+ue.left,Fe=ue.top+ue.bottom;oe.measure(y,x,z,ne),ue=oe.measuredBounds;var De=0,_e=null;oe instanceof Co&&(_e=oe,De=_e.strokeWidth*_e.scale);var pt=Math.max(ue.width+we,0);ue=Math.max(ue.height+Fe,0);var rt=Bv(oe),bt=rt.x*pt+rt.offsetX;rt=rt.y*ue+rt.offsetY;var It=Mv(oe),Rt=It.x*pt+It.offsetX;for(It=It.y*ue+It.offsetY,isFinite(y)&&(ce=Math.max(Math.abs(bt-Rt)-De,0)),isFinite(x)&&(me=Math.max(Math.abs(rt-It)-De,0)),De=mi.alloc(),De.h(0,0),a=Mh(a),It=0;It<re;It++)rt=E[It],rt===oe||!rt.visible&&rt!==a||(ue=rt.margin,pt=ue.right+ue.left,bt=ue.top+ue.bottom,rt.measure(ce,me,0,0),ue=rt.measuredBounds,pt=Math.max(ue.width+pt,0),ue=Math.max(ue.height+bt,0),De.h(Math.max(pt,De.width),Math.max(ue,De.height)));if(re===1)b.width=pt,b.height=ue,mi.free(De);else{switch(rt=Bv(oe),It=Mv(oe),re=E=0,It.x!==rt.x&&It.y!==rt.y&&(E=De.width/Math.abs(It.x-rt.x),re=De.height/Math.abs(It.y-rt.y)),mi.free(De),De=0,_e!==null&&(De=_e.strokeWidth*_e.scale,Ov(_e)===nr&&(E=re=Math.max(E,re))),E+=Math.abs(rt.offsetX)+Math.abs(It.offsetX)+De,re+=Math.abs(rt.offsetY)+Math.abs(It.offsetY)+De,_e=oe.stretch,_e===uo&&(_e=fu(oe,!1)),_e){case ii:ne=z=0;break;case si:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case dr:isFinite(y)&&(E=y),ne=0;break;case Lr:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(E,re,z,ne),b.width=oe.measuredBounds.width+we,b.height=oe.measuredBounds.height+Fe}},Hm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Bn.alloc();z.h(0,0,1,1);var ne=E.margin,re=ne.left;ne=ne.top;var oe=a.padding,ue=oe.left;oe=oe.top,E.arrange(ue+re,oe+ne,b.width,b.height);var ce=Bv(E),me=Mv(E),we=ce.y*b.height+ce.offsetY,Fe=me.x*b.width+me.offsetX;for(me=me.y*b.height+me.offsetY,z.x=ce.x*b.width+ce.offsetX,z.y=we,fs(z,Fe,me,0,0),z.x+=re+ue,z.y+=ne+oe,b=0;b<x;b++)re=y[b],re!==E&&(ue=re.measuredBounds,ne=re.margin,oe=Math.max(ue.width+ne.right+ne.left,0),ce=Math.max(ue.height+ne.top+ne.bottom,0),we=re.alignment,we.Xb()&&(we=a.defaultAlignment),we.sb()||(we=Oo),oe=z.width*we.x+we.offsetX-oe*we.x+ne.left+z.x,ne=z.height*we.y+we.offsetY-ce*we.y+ne.top+z.y,re.visible&&(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 Bn(z.x,z.y,z.width,z.height))));Bn.free(z)};function Wm(){this.xa="Base",this.name="Table"}Wt(Wm,ll),Wm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ne=Si(),re=Si(),oe=0;oe<z;oe++){var ue=E[oe],ce=ue instanceof ui?ue:null;if(ce!==null&&$h(ce)&&ue.visible){re.push(ce);for(var me=ce.O.s,we=me.length,Fe=0;Fe<we;Fe++){var De=me[Fe];ce.type===ui.TableRow?De.row=ue.row:ce.type===ui.TableColumn&&(De.column=ue.column),ne.push(De)}}else ne.push(ue)}z=ne.length,z===0&&(a.Fb(0),a.Eb(0));for(var _e=[],pt=0;pt<z;pt++){var rt=ne[pt];rt.visible&&(yt(rt,!0),Ht(rt,!0),_e[rt.row]||(_e[rt.row]=[]),_e[rt.row][rt.column]||(_e[rt.row][rt.column]=[]),_e[rt.row][rt.column].push(rt))}ki(ne);var bt=Si(),It=Si(),Rt=Si(),Kt={count:0},fn={count:0},bi=y,Yi=x,Wi=a.rowDefs,hi=a.colDefs,ei=null;z=Wi.length;for(var co=0;co<z;co++)ei=Wi[co],ei!==void 0&&(ei.actual=0);z=hi.length;for(var Kr=0;Kr<z;Kr++)ei=hi[Kr],ei!==void 0&&(ei.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||It.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===ii||Id||nl<Nl||mu<pu||(Kt[mu]!==void 0||vu!==si&&vu!==dr||(Kt[mu]=-1,Kt.count++),fn[nl]!==void 0||vu!==si&&vu!==Lr||(fn[nl]=-1,fn.count++),Rt.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===ii||vu===dr)){ei=a.Fb(nl);var kf=ei.Wc();Cl=Math.max(pc-ei.actual,0),Cl+kf>Yi&&(Cl=Math.max(Yi-kf,0));var hv=ei.oa===0;ei.oc=ei.oc+Cl,ei.actual=ei.oa+Cl,Yi=Math.max(Yi-(Cl+(hv?kf:0)),0)}if(qu.columnSpan===1&&(vu===ii||vu===Lr)){ei=a.Eb(mu);var Am=ei.Wc();Cl=Math.max(og-ei.actual,0),Cl+Am>bi&&(Cl=Math.max(bi-Am,0));var Xy=ei.oa===0;ei.oc=ei.oc+Cl,ei.actual=ei.oa+Cl,bi=Math.max(bi-(Cl+(Xy?Am:0)),0)}Of&&qu.Uj()}}}}}ki(bt);var sh=0,Ah=0;z=a.columnCount;for(var $g=0;$g<z;$g++){var Tf=hi[$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=Yi=Math.max(x-Ah,0),rf=bi;z=Rt.length;for(var tc=0;tc<z;tc++){var Od=Rt[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;Kt[Od.column]=Dh.oc===0&&Kt[Od.column]!==void 0?Math.max(Op.width+ag,Kt[Od.column]):null,fn[Od.row]=fv.oc===0&&fn[Od.row]!==void 0?Math.max(Op.height+kd,fn[Od.row]):null}var Kg=0,kp=0,rd;for(rd in fn)rd!=="count"&&(Kg+=fn[rd]);for(rd in Kt)rd!=="count"&&(kp+=Kt[rd]);for(var _l=mi.alloc(),Dm=0;Dm<z;Dm++){var Lu=Rt[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)&&Kt[Lu.column]!==null?kp===0?Ih=Nu.actual+bi:Ih=Kt[Lu.column]/kp*rf:Kt[Lu.column]!==null?Ih=bi:Ih=Nu.actual||bi,Ih=Math.max(0,Ih-Nu.Wc()));var of=0;switch(isFinite(il.height)?of=il.height:(isFinite(Yi)&&fn[Lu.row]!==null?Kg===0?of=il.actual+Yi:of=fn[Lu.row]/Kg*lh:fn[Lu.row]!==null?of=Yi:of=il.actual||Yi,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 dr:_l.height=Math.max(_l.height,il.actual+Yi);break;case Lr:_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),Vg=Math.max(Tp.height+gv,0);isFinite(bi)&&(lg=Math.min(lg,_l.width)),isFinite(Yi)&&(Vg=Math.min(Vg,_l.height));var nc=0;nc=il.actual,il.actual=Math.max(il.actual,Vg),il.oc=Math.max(il.oc,Vg),Cl=il.actual-nc,Yi=Math.max(Yi-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),Kt[Lu.column]===null&&(rf=Math.max(rf-Cl,0))}}ki(Rt);var Oh=mi.alloc(),Cd=Si(),kc=Si();if(z=It.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 Vs=It[_p];if(Vs.visible||Vs===tf){var od=a.Fb(Vs.row),$c=a.Eb(Vs.column);switch(_l.h(Math.max($c.minimum,Math.min(y,$c.maximum)),Math.max(od.minimum,Math.min(x,od.maximum))),vu=jc(Vs,od,$c,!1),vu){case 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 dr:kc[$c.index]!==0&&(_l.width=Math.min(_l.width,kc[$c.index]));break;case Lr: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<Vs.rowSpan&&!(Vs.row+af>=a.rowCount);af++)ei=a.Fb(Vs.row+af),Cl=0,Cl=vu===si||vu===Lr?Math.max(ei.minimum,Cd[Vs.row+af]===0?ei.maximum:Math.min(Cd[Vs.row+af],ei.maximum)):Math.max(ei.minimum,isNaN(ei.Hc)?ei.maximum:Math.min(ei.Hc,ei.maximum)),Oh.height+=Cl,mc+=ei.minimum;for(var Kc=1;Kc<Vs.columnSpan&&!(Vs.column+Kc>=a.columnCount);Kc++)ei=a.Eb(Vs.column+Kc),Cl=0,Cl=vu===si||vu===dr?Math.max(ei.minimum,kc[Vs.column+Kc]===0?ei.maximum:Math.min(kc[Vs.column+Kc],ei.maximum)):Math.max(ei.minimum,isNaN(ei.Hc)?ei.maximum:Math.min(ei.Hc,ei.maximum)),Oh.width+=Cl,mv+=ei.minimum;_l.width+=Oh.width,_l.height+=Oh.height;var jp=Vs.margin,zf=jp.right+jp.left,Im=jp.top+jp.bottom;Vs.measure(_l.width,_l.height,mv,mc);for(var zp=Vs.measuredBounds,Td=Math.max(zp.width+zf,0),ug=Math.max(zp.height+Im,0),Zf=0,Zp=0;Zp<Vs.rowSpan&&!(Vs.row+Zp>=a.rowCount);Zp++)ei=a.Fb(Vs.row+Zp),Zf+=ei.total||0;if(Zf<ug){var sf=ug-Zf,uh=ug-Zf;if(Vs.spanAllocation!==null)for(var lf=Vs.spanAllocation,kh=0;kh<Vs.rowSpan&&!(0>=sf)&&!(Vs.row+kh>=a.rowCount);kh++){ei=a.Fb(Vs.row+kh);var uf=ei.oa||0,cg=lf(Vs,ei,uh);ei.actual=Math.min(ei.maximum,uf+cg),ei.oa!==uf&&(sf-=ei.oa-uf)}for(;0<sf;){var Ed=ei.oa||0;if(isNaN(ei.height)&&ei.maximum>Ed&&(ei.actual=Math.min(ei.maximum,Ed+sf),ei.oa!==Ed&&(sf-=ei.oa-Ed)),ei.index===0)break;ei=a.Fb(ei.index-1)}}for(var Ug=0,cf=0;cf<Vs.columnSpan&&!(Vs.column+cf>=a.columnCount);cf++)ei=a.Eb(Vs.column+cf),Ug+=ei.total||0;if(Ug<Td){var Yg=Td-Ug,Qy=Td-Ug;if(Vs.spanAllocation!==null)for(var Th=Vs.spanAllocation,dg=0;dg<Vs.columnSpan&&!(0>=Yg)&&!(Vs.column+dg>=a.columnCount);dg++){ei=a.Eb(Vs.column+dg);var Om=ei.oa||0,qy=Th(Vs,ei,Qy);ei.actual=Math.min(ei.maximum,Om+qy),ei.oa!==Om&&(Yg-=ei.oa-Om)}for(;0<Yg;){var vv=ei.oa||0;if(isNaN(ei.width)&&ei.maximum>vv&&(ei.actual=Math.min(ei.maximum,vv+Yg),ei.oa!==vv&&(Yg-=ei.oa-vv)),ei.index===0)break;ei=a.Eb(ei.index-1)}}}}ki(It),mi.free(Oh),mi.free(_l),Cd!==void 0&&ki(Cd),kc!==void 0&&ki(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++)hi[xv]!==void 0&&(ei=a.Eb(xv),isFinite(ei.width)?(km+=ei.width,km+=ei.Wc()):qm(ei)===Vp?(km+=ei.oa,km+=ei.Wc()):ei.oa!==0&&(sh+=ei.oa,sh+=ei.Wc()));isFinite(yv.width)?Xg=Math.min(yv.width,pS.width):Xg=vu!==ii&&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++)hi[Sv]!==void 0&&(ei=a.Eb(Sv),isFinite(ei.width)||qm(ei)===Vp||(ei.actual=ei.oa*JS),ei.position=b.width,ei.oa!==0&&(b.width+=ei.oa,b.width+=ei.Wc()));z=a.rowCount;for(var Pv=0;Pv<z;Pv++)Wi[Pv]!==void 0&&(ei=a.Fb(Pv),isFinite(ei.height)?(Tm+=ei.height,Tm+=ei.Wc()):qm(ei)===Vp?(Tm+=ei.oa,Tm+=ei.Wc()):ei.oa!==0&&(Ah+=ei.oa,Ah+=ei.Wc()));isFinite(yv.height)?Jg=Math.min(yv.height,pS.height):Jg=vu!==ii&&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&&(ei=a.Fb(wv),isFinite(ei.height)||qm(ei)===Vp||(ei.actual=ei.oa*QS),ei.position=b.height,ei.oa!==0&&(b.height+=ei.oa,b.height+=ei.Wc()));z=re.length;for(var e1=0;e1<z;e1++){var Rm=re[e1],t1=0,n1=0;Rm.type===ui.TableRow?(t1=b.width,ei=a.Fb(Rm.row),n1=ei.actual):(ei=a.Eb(Rm.column),t1=ei.actual,n1=b.height),Rm.measuredBounds.h(0,0,t1,n1),yt(Rm,!1)}ki(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,ce=0,me=0;me<ue;me++)ne[me]&&(ce=Math.max(ce,ne[me].length));oe=a.rowDefs,re=a.colDefs;var we=me=0,Fe=Math.min(a.topIndex,ue-1);if(0<oe.length){for(;Fe!==ue&&(oe[Fe]===void 0||oe[Fe].oa===0);)Fe++;Fe=Math.max(Math.min(Fe,ue-1),0),me=-oe[Fe].position}var De=Math.min(a.leftIndex,ce-1);if(0<re.length){for(;De!==ce&&(re[De]===void 0||re[De].oa===0);)De++;De=Math.max(Math.min(De,ce-1),0),we=-re[De].position}for(var _e=0,pt=0;_e!==ue&&oe[_e]===void 0;)_e++;for(;pt!==ue&&re[pt]===void 0;)pt++;ce=a.part,a.Fb(_e),a.Eb(pt);for(var rt=0;rt<y.length;rt++){var bt=y[rt];if(bt instanceof ui&&bt.visible&&$h(bt)){if(bt.type===ui.TableRow){re=a.Fb(bt.row);var It=a.Eb(pt)}else re=a.Fb(_e),It=a.Eb(bt.column);oe=re.position+me+b,re.oa!==0&&(oe+=re.Io(Math.max(_e,Fe))),re=It.position+we+z,It.oa!==0&&(re+=It.Io(Math.max(pt,De))),It=bt.measuredBounds,bt.Uk(),bt.actualBounds.ka();var Rt=bt.actualBounds,Kt=Bn.allocAt(Rt.x,Rt.y,Rt.width,Rt.height);Rt.x=bt.type===ui.TableRow?z:re,Rt.y=bt.type===ui.TableColumn?b:oe,Rt.width=It.width,Rt.height=It.height,bt.actualBounds.freeze(),Ht(bt,!1),Ol(Kt,Rt)||ce===null||(ce.oh(),bt.Pn(ce)),Bn.free(Kt)}}for(rt=mi.alloc(),bt=0;bt<ue;bt++)if(ne[bt]){for(ce=ne[bt].length,It=a.Fb(bt),oe=It.position+me+b,It.oa!==0&&(oe+=It.Io(Math.max(_e,Fe))),Rt=0;Rt<ce;Rt++)if(ne[bt][Rt]){Kt=a.Eb(Rt),re=Kt.position+we+z,Kt.oa!==0&&(re+=Kt.Io(Math.max(pt,De)));for(var fn=ne[bt][Rt],bi=fn.length,Yi=0;Yi<bi;Yi++){var Wi=fn[Yi],hi=Wi.measuredBounds;rt.h(0,0);for(var ei=1;ei<Wi.rowSpan&&!(bt+ei>=a.rowCount);ei++){var co=a.Fb(bt+ei);co.oa!==0&&(rt.height+=co.total)}for(ei=1;ei<Wi.columnSpan&&!(Rt+ei>=a.columnCount);ei++)co=a.Eb(Rt+ei),co.oa!==0&&(rt.width+=co.total);var Kr=Kt.oa+rt.width,Fa=It.oa+rt.height;ei=re,co=oe;var qa=Kr,wl=Fa,Nl=re,pu=oe,Cl=Kr,tf=Fa;re+Kr>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=Kt.alignment,Gc=It.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=hi.width,Gc=hi.height;var fc=Wi.margin,qu=fc.left+fc.right,Of=fc.top+fc.bottom,Pd=jc(Wi,It,Kt,!1);!isNaN(Wi.desiredSize.width)||Pd!==si&&Pd!==dr||(Fc=Math.max(Kr-qu,0)),!isNaN(Wi.desiredSize.height)||Pd!==si&&Pd!==Lr||(Gc=Math.max(Fa-Of,0)),Kr=Wi.maxSize,Fa=Wi.minSize,Fc=Math.min(Kr.width,Fc),Gc=Math.min(Kr.height,Gc),Fc=Math.max(Fa.width,Fc),Gc=Math.max(Fa.height,Gc),Kr=Gc+Of,ei+=qa*Sd-(Fc+qu)*Sd+nf+fc.left,co+=wl*mu-Kr*mu+nl+fc.top,Wi.visible&&(Ba(Nl,pu,Cl,tf,ei,co,hi.width,hi.height)?Wi.arrange(ei,co,Fc,Gc):Wi.arrange(ei,co,Fc,Gc,new Bn(Nl,pu,Cl,tf)))}}}for(mi.free(rt),a=0;a<E;a++)x=y[a],z=x instanceof ui?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"}Wt(Gm,ll),Gm.prototype.measure=function(){},Gm.prototype.arrange=function(){};function $m(){this.xa="Base"}Wt($m,ll),$m.prototype.measure=function(){},$m.prototype.arrange=function(){};function Km(){this.xa="Base"}Wt(Km,ll),Km.prototype.measure=function(a,y,x,E,b,z,ne){1<E.length&&Et("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,ne);var re=E.measuredBounds,oe=E.margin,ue=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var ce=E.scale,me=re.width;re=re.height;var we=Math.max(y-ue,0),Fe=Math.max(x-oe,0),De=1;a.viewboxStretch===nr?me!==0&&re!==0&&(De=Math.min(we/me,Fe/re)):me!==0&&re!==0&&(De=Math.max(we/me,Fe/re)),De===0&&(De=1e-4),E.Ca*=De,ce!==E.scale&&(yt(E,!0),E.measure(1/0,1/0,z,ne))}re=E.measuredBounds,b.width=isFinite(y)?y:Math.max(re.width+ue,0),b.height=isFinite(x)?x:Math.max(re.height+oe,0)},Km.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var ne=y.alignment;ne.Xb()&&(ne=a.defaultAlignment),ne.sb()||(ne=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"}Wt(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),ce=Math.ceil(oe/E),me=a.gridOrigin,we=me.x;me=me.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Fe=[],De=a.O.s,_e=De.length,pt=0;pt<_e;pt++){var rt=De[pt],bt=[];if(Fe.push(bt),rt.visible){var It=rt.interval;if(!(0>It)){rt=bv(rt.figure);for(var Rt=0;Rt<_e;Rt++)if(Rt!==pt){var Kt=De[Rt];Kt.visible&&bv(Kt.figure)===rt&&(Kt=Kt.interval,Kt>It&&bt.push(Kt))}}}}for(De=a.O.s,_e=De.length,pt=0;pt<_e;pt++){var fn=De[pt];if(fn.visible&&(bt=fn.interval||1,rt=Math.abs(bt),!(2>b*rt*x))){if(It=fn.segmentIndex,(!isFinite(It)||isNaN(It))&&(It=0),0>It&&(It=rt-Math.min(-It,rt)),It=Math.round(It%rt),rt=fn.opacity,Rt=1,rt!==1){if(rt===0)continue;Rt=y.globalAlpha,y.globalAlpha=Rt*rt}Kt=Fe[pt];var bi=!1,Yi=fn.strokeDashArray;if(Yi!==null&&(bi=!0,y.js(Yi,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(),Yi=fn=Math.floor((we-b)/b);Yi<=fn+ue;Yi++){var Wi=Yi*b+we;0<=Wi&&Wi<=re&&Vm(Yi,bt,It,Kt)&&(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(),Yi=fn=Math.floor((me-E)/E);Yi<=fn+ce;Yi++)Wi=Yi*E+me,0<=Wi&&Wi<=oe&&Vm(Yi,bt,It,Kt)&&(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=Yi=Math.floor((we-b)/b);Wi<=Yi+ue;Wi++){var hi=Wi*b+we;0<=hi+fn&&hi<=re&&Vm(Wi,bt,It,Kt)&&y.fillRect(hi,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=Yi=Math.floor((me-E)/E);Wi<=Yi+ce;Wi++)hi=Wi*E+me,0<=hi+fn&&hi<=oe&&Vm(Wi,bt,It,Kt)&&y.fillRect(0,hi,re,fn);bi&&y.fs(),rt!==1&&(y.globalAlpha=Rt)}}y.restore(),y.Vc(!1)};function Vm(a,y,x,E){if(0>y)return a%y===x;if(a%y!==x)return!1;y=E.length;for(var b=0;b<y;b++)if(a%E[b]===x)return!1;return!0}function Um(){this.xa="Base"}Wt(Um,ll),Um.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof pa||a instanceof fi){var ne=null,re=null;if(a instanceof fi&&(ne=a),a instanceof pa&&(re=a,ne=re.adornedPart,a.j===null&&(a.j=[])),ne instanceof fi){var oe=ne;if(z===0)ys(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ue=a instanceof pa?null:ne.path;y=ne.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ce=oe.points,me=ne.pointsCount;re!==null?re.Ul(!1):ne!==null&&ne.Ul(!1),re=y.width;var we=y.height,Fe=a.j;if(Fe.length=0,ue!==null){r1(a,re,we,ue);var De=ue.measuredBounds;x.ed(De),Fe.push(De)}De=Yt.alloc();for(var _e=st.alloc(),pt=st.alloc(),rt=0;rt<z;rt++){var bt=E[rt];if(bt!==ue)if(bt.isPanelMain&&bt instanceof Co){r1(a,re,we,bt);var It=bt.measuredBounds;x.ed(It),Fe.push(It)}else if(2>me)bt.measure(1/0,1/0,0,0),It=bt.measuredBounds,x.ed(It),Fe.push(It);else{var Rt=bt.segmentIndex,Kt=bt.segmentFraction,fn=bt.alignmentFocus;fn.Mc()&&(fn=Oo);var bi=bt.segmentOrientation,Yi=bt.segmentOffset;if(isNaN(Rt)){var Wi=oe.ua;It=Si(),Wi.Qu(Kt,It);var hi=st.allocAt(It[0],It[1]);if(hi.add(oe.i(0)),Wi.type===qt.j?hi.offset(-Wi.startX,-Wi.startY):(Wi=Wi.figures.first(),Wi!==null&&hi.offset(-Wi.startX,-Wi.startY)),Wi=It[2],bi!==Eu){var ei=oe.computeAngle(bt,bi,Wi);bt.Kb=ei}ei=hi.x-y.x;var co=hi.y-y.y;st.free(hi),ki(It)}else if(Rt<-me||Rt>=me)It=st.alloc(),oe.vg(),oe.computeMidPoint(It),Wi=oe.midAngle,bi!==Eu&&(ei=oe.computeAngle(bt,bi,Wi),bt.Kb=ei),ei=It.x-y.x,co=It.y-y.y,st.free(It);else{if(ei=0,0<=Rt?(co=ce.M(Rt),It=Rt<me-1?ce.M(Rt+1):co):(ei=me+Rt,co=ce.M(ei),It=0<ei?ce.M(ei-1):co),co.Xa(It)){0<=Rt?(Wi=0<Rt?ce.M(Rt-1):co,ei=Rt<me-2?ce.M(Rt+2):It):(Wi=ei<me-1?ce.M(ei+1):co,ei=1<ei?ce.M(ei-2):It),hi=Wi.Bf(co);var Kr=It.Bf(ei);Wi=hi>Kr+10?0<=Rt?Wi.ab(co):co.ab(Wi):Kr>hi+10?0<=Rt?It.ab(ei):ei.ab(It):0<=Rt?Wi.ab(ei):ei.ab(Wi)}else Wi=0<=Rt?co.ab(It):It.ab(co);bi!==Eu&&(ei=oe.computeAngle(bt,bi,Wi),bt.Kb=ei),ei=co.x+(It.x-co.x)*Kt-y.x,co=co.y+(It.y-co.y)*Kt-y.y}bt.measure(1/0,1/0,0,0),It=bt.measuredBounds,hi=bt.naturalBounds;var Fa=0;bt instanceof Co&&(Fa=bt.strokeWidth),Kr=hi.width+Fa;var qa=hi.height+Fa;De.reset(),De.translate(-It.x,-It.y),De.scale(bt.scale,bt.scale),De.rotate(bi===Eu?bt.angle:Wi,Kr/2,qa/2),bi!==im&&bi!==om||De.rotate(90,Kr/2,qa/2),bi!==rm&&bi!==am||De.rotate(-90,Kr/2,qa/2),bi===E0&&(45<Wi&&135>Wi||225<Wi&&315>Wi)&&De.rotate(-Wi,Kr/2,qa/2),hi=new Bn(0,0,Kr,qa),_e.xi(hi,fn),De.Ga(_e),fn=-_e.x+Fa/2*bt.scale,bt=-_e.y+Fa/2*bt.scale,pt.assign(Yi),Fa=isNaN(Yi.x);var wl=isNaN(Yi.y);if(Fa||wl){Kr=Kr/2+3,qa=qa/2+3;var Nl=45<=Wi&&135>=Wi,pu=225<=Wi&&315>=Wi;bi===Eu&&(Nl||pu)?(pt.x=wl?Kr:Yi.y,pt.y=Fa?qa:Yi.x,Nl?0<=Rt||isNaN(Rt)&&.5>Kt||!Fa||(pt.y=-qa):pu&&((0<=Rt||isNaN(Rt)&&.5>Kt)&&Fa&&(pt.y=-qa),wl&&(pt.x=-Kr))):(Fa&&(pt.x=0<=Rt||isNaN(Rt)&&.5>Kt?Kr:-Kr),wl&&(pt.y=-qa),pt.rotate(Wi))}else pt.rotate(Wi);ei+=pt.x,co+=pt.y,hi.set(It),hi.h(ei+fn,co+bt,It.width,It.height),Fe.push(hi),x.ed(hi)}}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),ys(b,x.width||0,x.height||0),Yt.free(De),st.free(_e),st.free(pt)}}}},Um.prototype.arrange=function(a,y){var x=y.length;if(a instanceof pa||a instanceof fi){var E=a,b=null;a instanceof pa&&(b=a,E=b.adornedPart);var z=a instanceof pa?null:E.path,ne=a.j;if(ne.length!==0){var re=0;if(z!==null&&re<ne.length){var oe=ne[re];re++,z.arrange(oe.x-a.jg.x,oe.y-a.jg.y,oe.width,oe.height)}for(oe=0;oe<x;oe++){var ue=y[oe];if(ue!==z&&re<ne.length){var ce=ne[re];re++,ue.arrange(ce.x-a.jg.x,ce.y-a.jg.y,ce.width,ce.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof fi)for(z=a.labelNodes;z.next();){var me=a;ne=z.value,re=ne.segmentIndex,oe=ne.segmentFraction;var we=ne.alignmentFocus;if(ue=ne.segmentOrientation,ce=ne.segmentOffset,isNaN(re)){var Fe=me.ua,De=Si();Fe.Qu(oe,De);var _e=st.allocAt(De[0],De[1]);_e.add(me.i(0)),Fe.type===qt.j||(Fe=Fe.figures.first()),_e.offset(-Fe.startX,-Fe.startY),Fe=De[2],ue!==Eu&&(me=me.computeAngle(ne,ue,Fe),ne.angle=me),me=_e.x;var pt=_e.y;st.free(_e),ki(De)}else if(re<-x||re>=x)De=st.alloc(),Fe=me,pt=De,Fe.vg(),Fe.computeMidPoint(pt),Fe=me.midAngle,ue!==Eu&&(me=me.computeAngle(ne,ue,Fe),ne.angle=me),me=De.x,pt=De.y,st.free(De);else{if(_e=0,0<=re?(De=y.s[re],pt=re<x-1?y.s[re+1]:De):(_e=x+re,De=y.s[_e],pt=0<_e?y.s[_e-1]:De),De.Xa(pt)){0<=re?(Fe=0<re?y.s[re-1]:De,_e=re<x-2?y.s[re+2]:pt):(Fe=_e<x-1?y.s[_e+1]:De,_e=1<_e?y.s[_e-2]:pt);var rt=Fe.Bf(De),bt=pt.Bf(_e);Fe=rt>bt+10?0<=re?Fe.ab(De):De.ab(Fe):bt>rt+10?0<=re?pt.ab(_e):_e.ab(pt):0<=re?Fe.ab(_e):_e.ab(Fe)}else Fe=0<=re?De.ab(pt):pt.ab(De);ue!==Eu&&(me=me.computeAngle(ne,ue,Fe),ne.angle=me),me=De.x+(pt.x-De.x)*oe,pt=De.y+(pt.y-De.y)*oe}if(we.ys())ne.location=new st(me,pt);else{we.Mc()&&(we=Oo),De=Yt.alloc(),De.reset(),De.scale(ne.scale,ne.scale),De.rotate(ne.angle,0,0);var It=ne.naturalBounds;_e=Bn.allocAt(0,0,It.width,It.height),rt=st.alloc(),rt.xi(_e,we),De.Ga(rt),we=-rt.x,bt=-rt.y;var Rt=It.width,Kt=It.height;It=st.alloc(),It.assign(ce);var fn=isNaN(ce.x),bi=isNaN(ce.y);if(fn||bi){Rt=Rt/2+3,Kt=Kt/2+3;var Yi=45<=Fe&&135>=Fe,Wi=225<=Fe&&315>=Fe;ue===Eu&&(Yi||Wi)?(It.x=bi?Rt:ce.y,It.y=fn?Kt:ce.x,Yi?0<=re||isNaN(re)&&.5>oe||!fn||(It.y=-Kt):Wi&&((0<=re||isNaN(re)&&.5>oe)&&fn&&(It.y=-Kt),bi&&(It.x=-Rt))):(fn&&(It.x=0<=re||isNaN(re)&&.5>oe?Rt:-Rt),bi&&(It.y=-Kt),It.rotate(Fe))}else It.rotate(Fe);me+=It.x,pt+=It.y,De.pp(_e),we+=_e.x,bt+=_e.y,re=st.allocAt(me+we,pt+bt),ne.move(re),st.free(re),st.free(It),st.free(rt),Bn.free(_e),Yt.free(De)}}b!==null?b.Ul(!1):E.Ul(!1),E=I1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),st.free(E)}};function r1(a,y,x,E){if(St(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof pa&&a.type===ui.Link&&a.adornedObject instanceof Co&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof fi&&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),yt(E,!1)}}function $p(){this.xa="Base"}Wt($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,ce=oe.top+oe.bottom;re.measure(y,x,z,ne);var me=re.measuredBounds,we=new Bn(-oe.left,-oe.top,Math.max(me.width+ue,0),Math.max(me.height+ce,0));a.graduatedBounds.push(we),b.assign(we);for(var Fe=re.geometry,De=re.strokeWidth,_e=Fe.flattenedSegments,pt=Fe.flattenedLengths,rt=Fe.flattenedTotalLength,bt=_e.length,It=0,Rt=0,Kt=Si(),fn=0;fn<bt;fn++){var bi=_e[fn],Yi=[];Rt=It=0;for(var Wi=bi.length,hi=0;hi<Wi;hi+=2){var ei=bi[hi],co=bi[hi+1];if(hi!==0){var Kr=180*Math.atan2(co-Rt,ei-It)/Math.PI;0>Kr&&(Kr+=360),Yi.push(Kr)}It=ei,Rt=co}Kt.push(Yi)}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=rt;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*rt/a.graduatedRange&&gc.graduatedSkip===null)){var Gg=pt[0][0],Id=0,ec=0;qu=rt*gc.graduatedStart-1e-4,Of=rt*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)*rt/a.graduatedRange,fc>rt&&(fc=rt),qu<=fc&&fc<=Of)){for(var lh=Kt[Id][ec],rf=pt[Id][ec];Id<pt.length;){for(;fc>Gg&&ec<pt[Id].length-1;)ec++,lh=Kt[Id][ec],rf=pt[Id][ec],Gg+=rf;if(fc<=Gg)break;Id++,ec=0,lh=Kt[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 st(Od+(tc[2*ec+2]-Od)*Dh+De/2-Fe.bounds.x,fv+(tc[2*ec+3]-fv)*Dh+De/2-Fe.bounds.y);Op.scale(re.scale,re.scale);e:{var wd=lh,ag=Kt[Id];if(!(.5005>Dh&&.4995<Dh)){var kd=wd;if(.5>Dh?0<ec?kd=ag[ec-1]:nt.$(tc[0],tc[tc.length-2])&&nt.$(tc[1],tc[tc.length-1])&&(kd=ag[ag.length-1]):.5<Dh&&(ec+1<ag.length?kd=ag[ec+1]:nt.$(tc[0],tc[tc.length-2])&&nt.$(tc[1],tc[tc.length-1])&&(kd=ag[0])),wd!==kd){var Kg=Math.abs(wd-kd);if(180<Kg&&(wd<kd?wd+=360:kd+=360,Kg=Math.abs(wd-kd)),5e-4>Dh||.9995<Dh){lh=(wd+kd)/2%360;break e}if(10>Kg){var kp=1-Math.abs(.5-Dh);lh=(wd*kp+kd*(1-kp))%360;break e}}}lh=wd}if(gc instanceof 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)}ki(Kt);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,Vg=Bn.allocAt(0,0,Tp,lg),nc=st.alloc();nc.xi(Vg,sg),Bn.free(Vg);for(var Oh=-nc.x,Cd=-nc.y,kc=new Bn,_f=Nu.length,Rp=0;Rp<_f;Rp++)for(var jf=Nu[Rp],pv=jf.$l.x,_p=jf.$l.y,Vs=jf.angle,od=0;4>od;od++){switch(od){case 0:nc.h(Oh,Cd);break;case 1:nc.h(Oh+Tp,Cd);break;case 2:nc.h(Oh,Cd+lg);break;case 3:nc.h(Oh+Tp,Cd+lg)}nc.rotate(Vs+il.angle),nc.offset(pv,_p),Rp===0&&od===0?kc.h(nc.x,nc.y,0,0):kc.Ye(nc),nc.offset(-pv,-_p),nc.rotate(-Vs-il.angle)}st.free(nc),Ih.graduatedBounds!==null&&Ih.graduatedBounds.push(kc),fs(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 Kc=il.segmentOrientation,jp=il.segmentOffset,zf=new Bn,Im=0,zp=0,Td=0,ug=0,Zf=0,Zp=Nu.length,sf=0;sf<Zp;sf++){var uh=Nu[sf];Im=uh.$l.x,zp=uh.$l.y,Td=uh.angle,Zf=ug=il.angle,Kc!==Eu&&(Zf=Kc===nm||Kc===C0?Td+il.angle:Td,ug=fi.computeAngle(Kc,Zf)),mc.Kb=ug,mc.text=uh.text||"",mc.measure(1/0,1/0,0,0);var lf=mc.measuredBounds,kh=mc.naturalBounds,uf=kh.width,cg=kh.height,Ed=Yt.alloc();Ed.reset(),Ed.translate(-lf.x,-lf.y),Ed.scale(mc.scale,mc.scale),Ed.rotate(Zf,uf/2,cg/2),Kc!==im&&Kc!==om||Ed.rotate(90,uf/2,cg/2),Kc!==rm&&Kc!==am||Ed.rotate(-90,uf/2,cg/2),Kc===E0&&(45<Td&&135>Td||225<Td&&315>Td)&&Ed.rotate(-Td,uf/2,cg/2);var Ug=Bn.allocAt(0,0,uf,cg),cf=st.alloc();cf.xi(Ug,af),Ed.Ga(cf);var Yg=-cf.x,Qy=-cf.y,Th=st.alloc();Th.assign(jp),isNaN(Th.x)&&(Th.x=uf/2+3),isNaN(Th.y)&&(Th.y=-(cg/2+3)),Th.rotate(Td),Im+=Th.x+Yg,zp+=Th.y+Qy;var dg=new Bn(Im,zp,lf.width,lf.height),Om=new Bn(lf.x,lf.y,lf.width,lf.height),qy=new Bn(kh.x,kh.y,kh.width,kh.height);uh.Sz=ug,uh.lineCount=mc.lineCount,uh.lines=[mc.Cb,mc.Ih,mc.df,mc.Le,mc.Qc,mc.Qb,mc.ze],uh.actualBounds=dg,uh.measuredBounds=Om,uh.naturalBounds=qy,sf===0?zf.assign(dg):zf.ed(dg),st.free(Th),st.free(cf),Bn.free(Ug),Yt.free(Ed)}$c.graduatedBounds!==null&&$c.graduatedBounds.push(zf),fs(mv,zf.x,zf.y,zf.width,zf.height)}yt(il,!1)}}},$p.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,ne=0,re=z[ne];ne++,E!==null&&E.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var oe=y.length,ue=0;ue<oe;ue++){var ce=y[ue];re=b[ue],ce.visible&&ce!==E&&re.length!==0&&(re=z[ne],ne++,ce.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},$p.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,ne=b.height;b=y instanceof Da,y.save(),y.beginPath(),y.rect(-1,-1,z+1,ne+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),ne=a.Df()*x.scale,0>=ne&&(ne=1);for(var re=z.actualBounds,oe=a.O.s,ue=a.graduatedMarks,ce=oe.length,me=0;me<ce;me++){var we=oe[me],Fe=ue[me],De=Fe.length;if(we.visible&&we!==z&&Fe.length!==0){if(we instanceof Co){if(!(2>a.graduatedTickUnit*we.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ne&&we.graduatedSkip===null)){var _e=we.measuredBounds,pt=we.strokeWidth*we.scale,rt=we.alignmentFocus;rt.Mc()&&(rt=$l);for(var bt=0;bt<De;bt++){var It=Fe[bt].$l,Rt=Fe[bt].angle,Kt=rt,fn=we.Ab;fn.reset(),fn.translate(It.x+re.x,It.y+re.y),fn.rotate(Rt+we.angle,0,0),fn.translate(-_e.width*Kt.x+Kt.offsetX+pt/2,-_e.height*Kt.y+Kt.offsetY+pt/2),fn.scale(we.scale,we.scale),ke(we,!1),we.wh.set(we.Ab),we.Kk=we.scale,Ke(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<De;pt++)rt=Fe[pt],rt.actualBounds&&rt.measuredBounds&&rt.naturalBounds&&(_e.ec=rt.text||"",_e.Kb=rt.Sz||0,_e.Gc=rt.lineCount||0,bt=rt.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]),rt.naturalBounds&&(_e.dc=rt.naturalBounds),rt.actualBounds&&(bt=rt.actualBounds,_e.arrange(bt.x,bt.y,bt.width,bt.height)),bt=rt.actualBounds,_e.arrange(bt.x,bt.y,bt.width,bt.height),It=rt.measuredBounds,rt=rt.naturalBounds,Rt=_e.Ab,Rt.reset(),Rt.translate(bt.x+re.x,bt.y+re.y),Rt.translate(-It.x,-It.y),_e.no(Rt,rt.x,rt.y,rt.width,rt.height),ke(_e,!1),_e.wh.set(_e.Ab),_e.Kk=_e.scale,Ke(_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 ui(a,y){if(Vt.call(this),this.na=null,a===void 0)this.na=ui.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=ui.Position,y=a);this.na===null&&Et("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===ui.Grid?1048576:0),this.O=new Vn,this.yb=sl,this.Tm=Fi,this.Uf=uo,this.$g=null,this.$e="",this.jg=new Bn(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=nr,this.jn=fa,this.kn=ra,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Wt(ui,Vt),ui.prototype.cloneProtected=function(a){Vt.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},ui.prototype.Af=function(a){Vt.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},ui.prototype.copy=function(){var a=Vt.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 Di&&(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},Ae=ui.prototype,Ae.toString=function(){return"Panel("+this.type.name+")#"+tr(this)},Ae.Pn=function(a){Vt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Ae.hh=function(a,y){if(this.na===ui.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===ui.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===ui.Table)if(a.yc(),a instanceof Da){var x=a.yd;a.yd=wc(a,"gojs-ts"),Ev(this,a),a.nh.pop(),a.yd=x}else Ev(this,a);(x=this.isClipping&&this.na===ui.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x&&re===E&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function Ev(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Ym(a,y,!0,x,!0),E!==null&&Ym(a,y,!1,E,!0),x!==null&&o1(a,y,!0,x),E!==null&&o1(a,y,!1,E),x!==null&&Ym(a,y,!0,x,!1),E!==null&&Ym(a,y,!1,E,!1)}function o1(a,y,x,E){for(var b=E.length,z=a.actualBounds,ne=a.naturalBounds,re=!0,oe=0;oe<b;oe++){var ue=E[oe];if(ue!==void 0&&ue.actual!==0)if(re)re=!1;else{if(x){if(ue.position>ne.height)continue}else if(ue.position>ne.width)continue;var ce=ue.separatorStrokeWidth;isNaN(ce)&&(ce=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var me=ue.separatorStroke;if(me===null&&(me=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ce!==0&&me!==null){Ds(a,y,me,!1,!1,ne,z),me=!1;var we=ue.separatorDashArray;we===null&&(we=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),we!==null&&(me=!0,y.js(we,0)),y.beginPath(),we=ue.position+ce,x?we>ne.height&&(ce-=we-ne.height):we>ne.width&&(ce-=we-ne.width),ue=ue.position+ce/2,y.lineWidth=ce,ce=a.yb,x?(ue+=ce.top,we=ne.width-ce.right,y.moveTo(ce.left,ue),y.lineTo(we,ue)):(ue+=ce.left,we=ne.height-ce.bottom,y.moveTo(ue,ce.top),y.lineTo(ue,we)),y.stroke(),y.Se(),me&&y.fs()}}}}function Ym(a,y,x,E,b){for(var z=E.length,ne=a.actualBounds,re=a.naturalBounds,oe=a1(a,!0),ue=a1(a,!1),ce=0;ce<z;ce++){var me=E[ce];if(me!==void 0&&me.background!==null&&me.coversSeparators!==b&&me.actual!==0){var we=x?ne.height:ne.width;if(!(me.position>we)){var Fe=me.Wc(),De=me.separatorStrokeWidth;isNaN(De)&&(De=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var _e=me.separatorStroke;_e===null&&(_e=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(_e===null||me.index===(x?oe:ue))&&(De=0),Fe-=De,De=me.position+De,Fe+=me.actual,De+Fe>we&&(Fe=we-De),0>=Fe||(we=a.yb,Ds(a,y,me.background,!0,!1,re,ne),x?y.fillRect(we.left,De+we.top,ne.width-(we.left+we.right),Fe):y.fillRect(De+we.left,we.top,Fe,ne.height-(we.top+we.bottom)))}}}}function a1(a,y){for(var x=y?a.rowCount:a.columnCount,E=0;E<x;E++){var b=y?a.rowDefs[E]:a.colDefs[E];if(b!==void 0)return b.index}return 0}function bv(a){return a==="LineV"||a==="BarV"}Ae.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Ae.kk=function(a,y,x){if(!Vt.prototype.kk.call(this,a,y,x))return!1;if(this.type===ui.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===ui.Grid||this.na===ui.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},Ae.nk=function(){return!0},Ae.$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 Vt.prototype.$o.call(this,a,y,x,E)},Ae.Sj=function(a,y,x,E,b){var z=this.se(),ne=this.transform,re=1/(ne.m11*ne.m22-ne.m12*ne.m21),oe=ne.m22*re,ue=-ne.m12*re,ce=-ne.m21*re,me=ne.m11*re,we=re*(ne.m21*ne.dy-ne.m22*ne.dx),Fe=re*(ne.m12*ne.dx-ne.m11*ne.dy);if(this.areaBackground!==null)return ne=this.actualBounds,nt.Ff(ne.left,ne.top,ne.right,ne.bottom,a,y,x,E,b);if(this.background!==null)return z=a*oe+y*ce+we,re=a*ue+y*me+Fe,a=x*oe+E*ce+we,oe=x*ue+E*me+Fe,b.h(0,0),x=this.naturalBounds,z=nt.Ff(0,0,x.width,x.height,z,re,a,oe,b),b.transform(ne),z;z||(oe=1,ce=ue=0,me=1,Fe=we=0),re=a*oe+y*ce+we,a=a*ue+y*me+Fe,oe=x*oe+E*ce+we,x=x*ue+E*me+Fe,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),ue=!1,me=this.O.s,Fe=me.length,ce=st.alloc(),we=null,y=1/0;var De=null,_e=this.isClipping&&this.na===ui.Spot;_e&&(De=st.alloc(),we=this.Pb(),(ue=we.Sj(re,a,oe,x,De))&&(y=(re-De.x)*(re-De.x)+(a-De.y)*(a-De.y)));for(var pt=0;pt<Fe;pt++){var rt=me[pt];rt.visible&&rt!==we&&rt.Sj(re,a,oe,x,ce)&&(ue=!0,rt=(re-ce.x)*(re-ce.x)+(a-ce.y)*(a-ce.y),rt<E&&(E=rt,b.set(ce)))}return _e&&(y>E&&b.set(De),st.free(De)),st.free(ce),z&&b.transform(ne),ue},Ae.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Vt.prototype.Gj.call(this)},Ae.v=function(a){if(!St(this)){Vt.prototype.v.call(this,a),a=null,(this.na===ui.Auto||this.na===ui.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 ui||b instanceof es||z!==ii)&&b.v(!0)}}}},Ae.Uj=function(){if(!St(this)){yt(this,!0),Ht(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Ae.Uk=function(){if(!(this.l&2048)){ke(this,!0),Ke(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Ae.Wu=function(){Ke(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Ae.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),ys(b,a,oe),ys(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},Ae.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}Ae.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=ii),a){case ii:(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 dr:this.v(!0),this.measure(x+re,z+ne,0,0);break;case Lr:this.v(!0),this.measure(y+re,E+ne,0,0)}}this.na.arrange(this,b,this.jg)}},Ae.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=st.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Jr(b.set(a),z.transform),z.ca(b)))return st.free(b),!0}return st.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Ae.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},Ae.qm=function(a,y){if(y(this,a),a instanceof ui){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 ui&&s1(a,z,x)}}function vS(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof ui){y=y.O.s;for(var E=y.length,b=0;b<E;b++)l1(a,y[b],x)}}Ae.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof ui){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}Ae.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Kp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof ui){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 ui?x=Math.max(x,c1(b)):b instanceof Co&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Ae.se=function(){return!(this.type===ui.TableRow||this.type===ui.TableColumn)};function $h(a){return a.type===ui.TableRow||a.type===ui.TableColumn}Ae.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Tt(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ne=z?a:Jr(st.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,ue=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),ue=oe/2),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 ce=b.length;if(re=st.alloc(),ue=(oe=this.isClipping&&this.na===ui.Spot)?this.Pb():null,oe&&(ue.se()?Jr(re.set(a),ue.transform):re.set(a),!ue.ca(re)))return st.free(re),z||st.free(ne),null;for(var me=Mh(this);ce--;){var we=b[ce];if((we.visible||we===me)&&(we.se()?Jr(re.set(a),we.transform):re.set(a),!oe||we!==ue)){var Fe=null;if(we instanceof ui?Fe=we.ic(re,y,x):we.pickable===!0&&we.ca(re)&&(Fe=we),Fe!==null&&(y!==null&&(Fe=y(Fe)),Fe!==null&&(x===null||x(Fe))))return st.free(re),z||st.free(ne),Fe}}st.free(re)}return this.background===null&&this.areaBackground===null?(z||st.free(ne),null):(a=Ba(0,0,E.width,E.height,ne.x,ne.y)?this:null,z||st.free(ne),a)}return z||st.free(ne),null},Ae.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),ne=z?a:Jr(st.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=st.alloc(),ce=Mh(this);oe--;){var me=re[oe];if(me.visible||me===ce){me.se()?Jr(ue.set(a),me.transform):ue.set(a);var we=me;me=me instanceof ui?me:null,(me!==null?me.ji(ue,y,x,E):we.ca(ue))&&we.pickable!==!1&&(y!==null&&(we=y(we)),we===null||x!==null&&!x(we)||E.add(we))}}st.free(ue)}return z||st.free(ne),b&&(this.background!==null||this.areaBackground!==null)}return z||st.free(ne),!1},Ae.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=Yt.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Fv(this,y,x,b),z===void 0&&Yt.free(ne),!0;if(this.Yc(a,ne)){if(!this.isAtomic)for(var re=Mh(this),oe=this.O.s,ue=oe.length;ue--;){var ce=oe[ue];if(ce.visible||ce===re){var me=ce.actualBounds,we=this.naturalBounds;me.x>we.width||me.y>we.height||0>me.x+me.width||0>me.y+me.height||(me=ce,ce=ce instanceof ui?ce:null,we=Yt.alloc(),we.set(ne),(ce!==null?ce.Cf(a,y,x,E,b,we):rl(me,a,E,we))&&(y!==null&&(me=y(me)),me===null||x!==null&&!x(me)||b.add(me)),Yt.free(we))}}return z===void 0&&Yt.free(ne),E}return z===void 0&&Yt.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 ui&&Fv(ne,y,x,E),y!==null&&(ne=y(ne)),ne===null||x!==null&&!x(ne)||E.add(ne))}}}Ae.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var ne=this.naturalBounds,re=this.se(),oe=re?a:Jr(st.allocAt(a.x,a.y),this.transform),ue=re?y:Jr(st.allocAt(y.x,y.y),this.transform),ce=oe.Bf(ue),me=0<oe.x&&oe.x<ne.width&&0<oe.y&&oe.y<ne.height||ha(oe.x,oe.y,0,0,0,ne.height)<=ce||ha(oe.x,oe.y,0,ne.height,ne.width,ne.height)<=ce||ha(oe.x,oe.y,ne.width,ne.height,ne.width,0)<=ce||ha(oe.x,oe.y,ne.width,0,0,0)<=ce;if(ne=oe.zd(0,0)<=ce&&oe.zd(0,ne.height)<=ce&&oe.zd(ne.width,0)<=ce&&oe.zd(ne.width,ne.height)<=ce,re||(st.free(oe),st.free(ue)),me){if(!this.isAtomic){oe=st.alloc(),ue=st.alloc(),ce=Mh(this);for(var we=this.O.s,Fe=we.length;Fe--;){var De=we[Fe];if(De.visible||De===ce){var _e=De.actualBounds,pt=this.naturalBounds;(!re||!(_e.x>pt.width||_e.y>pt.height||0>_e.x+_e.width||0>_e.y+_e.height))&&(De.se()?(_e=De.transform,Jr(oe.set(a),_e),Jr(ue.set(y),_e)):(oe.set(a),ue.set(y)),_e=De,De=De instanceof ui?De:null,(De!==null?De.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)))}}st.free(oe),st.free(ue)}return b?me:ne}return!1};function Bv(a){var y=null;return a instanceof Co&&(y=a.spot1,y===Fi&&(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===Fi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=Ln),y}Ae.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},Ae.M=function(a){return this.O.M(a)},Ae.Gb=function(a,y){y instanceof xr&&Et("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Et("Cannot make a Panel contain itself: "+this.toString()),Et("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Et("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!==ui.Grid||y instanceof Co||Et("Can only add Shapes to a Grid Panel, not: "+y),this.na!==ui.Graduated||y instanceof Co||y instanceof es||Et("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 $i),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 Et("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 ui&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Jm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Di&&(x.Te=!0),x.Te&&x instanceof Di&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb($a,"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}Ae.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)},Ae.mb=function(a){0<=a&&this.pc(a,!0)},Ae.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),yt(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 Di&&(E instanceof ui?E.qm(E,function(ne,re){Qv(z,re,y)}):Qv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb($a,"elements",this,E,null,a,null))},Ae.Fb=function(a){0>a&&Xn(a,">= 0",ui,"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]},Ae.oA=function(a){if(0>a&&Xn(a,">= 0",ui,"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($a,"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()}}Ae.Eb=function(a){0>a&&Xn(a,">= 0",ui,"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]},Ae.jA=function(a){if(0>a&&Xn(a,">= 0",ui,"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($a,"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()}}Ae.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},Ae.Hy=function(a,y){return(a=this.Fb(a))&&Qm(a,new ol(y)),this},Ae.By=function(a,y){return(a=this.Eb(a))&&Qm(a,new ol(y)),this},Ae.nz=function(a){if(0>a||this.type!==ui.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},Ae.fz=function(a){if(0>a||this.type!==ui.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},Ae.Fz=function(a,y){if(y===void 0&&(y=new st(NaN,NaN)),this.type!==ui.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)},Ae.Gz=function(a){if(this.type!==ui.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&&Et("Template cannot have .data be non-null: "+a),a.allBindings=y=new Vn;else if(y._isFrozen)return;var x=new Vn;Lv(a,!1),a.qm(a,function(ue,ce){ce.th();var me=ce.localBindings;if(me!==null)for(Ce(ce,!1),me=me.iterator;me.next();){var we=me.value;we.mode===gm&&Ce(ce,!0);var Fe=we.sourceName;Fe!==null&&(Fe==="/"&&Lv(ue,!0),Fe=Bx(we,ue,ce),Fe!==null&&(x.add(Fe),Fe.srcBindings===null&&(Fe.srcBindings=new Vn),Fe.srcBindings.add(we))),y.add(we)}if(ce instanceof ui&&ce.type===ui.Table){if(0<ce.rowCount){for(ue=ce.rowDefs,me=ue.length,we=0;we<me;we++)if(Fe=ue[we],Fe!==void 0&&Fe.be!==null)for(var De=Fe.be.iterator;De.next();){var _e=De.value;_e.xd=Fe,_e.to=2,_e.wl=Fe.index,y.add(_e)}}if(0<ce.columnCount){for(ce=ce.colDefs,ue=ce.length,me=0;me<ue;me++)if(we=ce[me],we!==void 0&&we.be!==null)for(Fe=we.be.iterator;Fe.next();)De=Fe.value,De.xd=we,De.to=1,De.wl=we.index,y.add(De)}}});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 Vn),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 ui&&(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=tr(z.panel),b.Ai=ne===void 0?-1:ne,z.panel.bindingId=b.Ai):z instanceof Vt?(ne=tr(z),b.Ai=ne===void 0?-1:ne,z.bindingId=b.Ai):Et("Unknown type of binding target: "+z)}y.freeze(),a instanceof xr&&a.Zc()&&a.Va()}Ae.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vS(y,function(x){x instanceof ui&&(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},Ae.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 ui))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Ae.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 ui&&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 ui)||z.data!==y[ne])return!0;b++,ne++}return!1}function Kp(a){if(a.type===ui.Spot||a.type===ui.Auto)return Math.min(a.O.length,1);if(a.type===ui.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===ui.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof ui&&$h(a))?1:0}Ae.mv=function(){for(var a=Kp(this);this.O.length>a;)this.pc(this.O.length-1,!1);g1(this,this.itemArray)};function g1(a,y){var x=Kp(a);if(y===null||y.length===0)for(;a.O.length>x;)a.pc(a.O.length-1,!1);else if(a.O.length<=x){x=y.length;for(var E=0;E<x;E++)Xm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],ne=E<a.O.length?a.O.M(E):null;if(ne instanceof ui){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 Di&&(y.Te=!0),y.Te&&y instanceof Di&&(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 $i),a.ge.add(y,b)),z=x+Kp(a),a.Gb(z,b),E&&(b.ub=y,Nv(a,z,x),b.ub=null),b.data=y}}}function Nv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof ui){var b=y,z=x;E.type===ui.TableRow?E.row=b:E.type===ui.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;Et("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 ui,y=new es,y.bind(new tl("text","",ir)),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 ui){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof ui&&!z.isEnabled||Jm(a,z,x)}}}function Ad(a,y){y.name=a,Qc.add(a,y)}Qe.Object.defineProperties(ui.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===ui.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&&Xn(a,">= 0",ui,"padding"),a=new hr(a)):(0>a.left&&Xn(a.left,">= 0",ui,"padding:value.left"),0>a.right&&Xn(a.right,">= 0",ui,"padding:value.right"),0>a.top&&Xn(a.top,">= 0",ui,"padding:value.top"),0>a.bottom&&Xn(a.bottom,">= 0",ui,"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 hr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new Ac),this.T.Qp=a,this.v(),this.g("defaultSeparatorPadding",y,a))}},defaultRowSeparatorStroke:{get:function(){return this.T!==null?this.T.ia:null},set:function(a){var y=this.defaultRowSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof da)&&(a instanceof da&&a.freeze(),this.T===null&&(this.T=new Ac),this.T.ia=a,this.N(),this.g("defaultRowSeparatorStroke",y,a))}},defaultRowSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.Ha:1},set:function(a){var y=this.defaultRowSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Ac),this.T.Ha=a,this.v(),this.g("defaultRowSeparatorStrokeWidth",y,a))}},defaultRowSeparatorDashArray:{get:function(){return this.T!==null?this.T.V:null},set:function(a){var y=this.defaultRowSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Et("defaultRowSeparatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.T===null&&(this.T=new Ac),this.T.V=a,this.N(),this.g("defaultRowSeparatorDashArray",y,a)}}},defaultColumnSeparatorStroke:{get:function(){return this.T!==null?this.T.u:null},set:function(a){var y=this.defaultColumnSeparatorStroke;y!==a&&(a===null||typeof a=="string"||a instanceof da)&&(a instanceof da&&a.freeze(),this.T===null&&(this.T=new Ac),this.T.u=a,this.N(),this.g("defaultColumnSeparatorStroke",y,a))}},defaultColumnSeparatorStrokeWidth:{get:function(){return this.T!==null?this.T.F:1},set:function(a){var y=this.defaultColumnSeparatorStrokeWidth;y!==a&&isFinite(a)&&0<=a&&(this.T===null&&(this.T=new Ac),this.T.F=a,this.v(),this.g("defaultColumnSeparatorStrokeWidth",y,a))}},defaultColumnSeparatorDashArray:{get:function(){return this.T!==null?this.T.o:null},set:function(a){var y=this.defaultColumnSeparatorDashArray;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Et("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||Et("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()||Et("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&&is(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&&is(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)&&Et("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)&&Et("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 xr&&!(this instanceof pa);Zc(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof fi?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof xr&&(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 $r),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 $i}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof xr||a.isPanelMain)&&Et("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(););Lo(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&&(Lo(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 po&&(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(ui,{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")}}}),ui.prototype.rebuildItemElements=ui.prototype.mv,ui.prototype.findItemPanelForData=ui.prototype.sx,ui.prototype.updateTargetBindings=ui.prototype.La,ui.prototype.copyTemplate=ui.prototype.Uy,ui.prototype.graduatedValueForPoint=ui.prototype.Gz,ui.prototype.graduatedPointForValue=ui.prototype.Fz,ui.prototype.findColumnForLocalX=ui.prototype.fz,ui.prototype.findRowForLocalY=ui.prototype.nz,ui.prototype.addColumnDefinition=ui.prototype.By,ui.prototype.addRowDefinition=ui.prototype.Hy,ui.prototype.addRowColumnDefinition=ui.prototype.Gy,ui.prototype.removeColumnDefinition=ui.prototype.jA,ui.prototype.getColumnDefinition=ui.prototype.Eb,ui.prototype.removeRowDefinition=ui.prototype.oA,ui.prototype.getRowDefinition=ui.prototype.Fb,ui.prototype.removeAt=ui.prototype.mb,ui.prototype.remove=ui.prototype.remove,ui.prototype.insertAt=ui.prototype.Gb,ui.prototype.elt=ui.prototype.M,ui.prototype.add=ui.prototype.add,ui.prototype.findObject=ui.prototype.fb,ui.prototype.findInVisualTree=ui.prototype.Nl,ui.prototype.walkVisualTreeFrom=ui.prototype.qm,ui.prototype.findMainElement=ui.prototype.Pb;var p1=!1,m1=null,Qc=new $i;ui.className="Panel",ui.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){Io(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Fi,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Iv,this.hg=uo,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=In(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=In(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Ae=ol.prototype,Ae.qb=function(a){a.classType===ol&&(this.sizing=a)},Ae.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+tr(this)},Ae.wi=function(a){this.Me=a},Ae.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)},Ae.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===ui.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)},Ae.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}Ae.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)&&Et("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Vn),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&&Xn(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&&Xn(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))&&Xn(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&&Xn(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 hr(a));var y=this.dg;a!==null&&y!==null&&y.D(a)||(a!==null&&(a=a.J()),this.dg=a,this.panel!==null&&this.panel.v(),this.Ob("separatorPadding",y,a))}},separatorStroke:{get:function(){return this.lo},set:function(a){var y=this.lo;y!==a&&(a!==null&&yf(a,"RowColumnDefinition.separatorStroke"),a instanceof da&&a.freeze(),this.lo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStroke",y,a))}},separatorStrokeWidth:{get:function(){return this.mo},set:function(a){var y=this.mo;y!==a&&(this.mo=a,this.panel!==null&&this.panel.v(),this.Ob("separatorStrokeWidth",y,a))}},separatorDashArray:{get:function(){return this.tj},set:function(a){var y=this.tj;if(y!==a){if(a!==null){for(var x=a.length,E=0,b=0;b<x;b++){var z=a[b];typeof z=="number"&&0<=z&&isFinite(z)||Et("separatorDashArray value "+z+" at index "+b+" must be a positive number or zero."),E+=z}if(E===0){if(y===null)return;a=null}}this.tj=a,this.panel!==null&&this.panel.N(),this.Ob("separatorDashArray",y,a)}}},background:{get:function(){return this.Ma},set:function(a){var y=this.Ma;y!==a&&(a!==null&&yf(a,"RowColumnDefinition.background"),a instanceof da&&a.freeze(),this.Ma=a,this.panel!==null&&this.panel.N(),this.Ob("background",y,a))}},coversSeparators:{get:function(){return this.Pm},set:function(a){var y=this.Pm;y!==a&&(this.Pm=a,this.panel!==null&&this.panel.N(),this.Ob("coversSeparators",y,a))}},sizing:{get:function(){return this.oo},set:function(a){var y=this.oo;y!==a&&(this.oo=a,this.panel!==null&&this.panel.v(),this.Ob("sizing",y,a))}},actual:{get:function(){return this.oa},set:function(a){this.oa=isNaN(this.Hc)?Math.max(Math.min(this.hj,a),this.jj):Math.max(Math.min(this.hj,this.Hc),this.jj)}},measured:{get:function(){return this.oc},set:function(a){this.oc=a}},total:{get:function(){return this.oa+this.Wc()}},position:{get:function(){return this.pa},set:function(a){this.pa=a}}}),ol.prototype.computeEffectiveSpacing=ol.prototype.Wc,ol.prototype.computeEffectiveSpacingTop=ol.prototype.Io;var Iv=new wn(ol,"Default",0),Vp=new wn(ol,"None",1),e0=new wn(ol,"ProportionalExtra",2);ol.className="RowColumnDefinition",ol.Default=Iv,ol.None=Vp,ol.ProportionalExtra=e0;function Co(a,y){Vt.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)}Wt(Co,Vt),Co.prototype.cloneProtected=function(a){Vt.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=In(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())}Ae=Co.prototype,Ae.th=function(){Vt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Ae.qb=function(a){a===ii||a===nr||a===Ho||a===uo?this.geometryStretch=a:Vt.prototype.qb.call(this,a)},Ae.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+tr(this)};function cp(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,ne=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],ue,ce,me,we,Fe,De,_e=0,pt=Si(),rt=2;rt<b;rt+=2)ue=x[rt],ce=x[rt+1],me=ue-re,re=ce-oe,me===0&&(me=.001),we=re/me,Fe=Math.atan2(re,me),De=Math.sqrt(me*me+re*re),pt.push([me,Fe,we,De]),_e+=De,re=ue,oe=ce;re=x[0],oe=x[1],me=E.measuredBounds.width,E instanceof Co&&(me-=E.strokeWidth),1>me&&(me=1),b=x=me,ue=ne/2,ce=ue!==0,rt=0,De=pt[rt],me=De[0],Fe=De[1],we=De[2],De=De[3];for(var bt=0;.1<=_e;){if(bt===0&&(ce?(b=x,b-=ue,_e-=ue,ce=!1):b=x,b===0&&(b=1)),b>_e){ki(pt);return}b>De?(bt=b-De,b=De):bt=0;var It=Math.sqrt(b*b/(1+we*we));if(0>me&&(It=-It),re+=It,oe+=we*It,a.translate(re,oe),a.rotate(Fe),a.translate(-(ne/2),-(z/2)),bt===0&&E.hh(a,y),a.translate(ne/2,z/2),a.rotate(-Fe),a.translate(-re,-oe),_e-=b,De-=b,bt!==0){if(rt++,rt===pt.length){ki(pt);return}De=pt[rt],me=De[0],Fe=De[1],we=De[2],De=De[3],b=bt}}ki(pt)}}Ae.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===ui.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===qt.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===qt.u){var ue=b.startX;oe=b.startY;var ce=b.endX,me=b.endY;b=Math.min(ue,ce);var we=Math.min(oe,me);ue=Math.abs(ce-ue),oe=Math.abs(me-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===qt.F)ue=b.startX,oe=b.startY,ce=b.endX,me=b.endY,b=Math.abs(ce-ue)/2,we=Math.abs(me-oe)/2,ue=Math.min(ue,ce)+b,oe=Math.min(oe,me)+we,a.beginPath(),a.moveTo(ue,oe-we),a.bezierCurveTo(ue+nt.wg*b,oe-we,ue+b,oe-nt.wg*we,ue+b,oe),a.bezierCurveTo(ue+b,oe+nt.wg*we,ue+nt.wg*b,oe+we,ue,oe+we),a.bezierCurveTo(ue-nt.wg*b,oe+we,ue-b,oe+nt.wg*we,ue-b,oe),a.bezierCurveTo(ue-b,oe-nt.wg*we,ue-nt.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===qt.o)for(b=b.figures,oe=b.length,we=0;we<oe;we++){ue=b.s[we],a.beginPath(),a.moveTo(ue.startX,ue.startY),ce=ue.segments.s,me=ce.length;for(var Fe=null,De=0;De<me;De++){var _e=ce[De];switch(_e.type){case _i:a.moveTo(_e.endX,_e.endY);break;case Ii:a.lineTo(_e.endX,_e.endY);break;case Wr: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 Mr: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,Fe!==null?Fe.endX:ue.startX,Fe!==null?Fe.endY:ue.startY)}else if(Fe=mr(_e,ue),pt=Fe.length,pt===0)a.lineTo(_e.centerX,_e.centerY);else for(var rt=0;rt<pt;rt++){var bt=Fe[rt];rt===0&&a.lineTo(bt[0],bt[1]),a.bezierCurveTo(bt[2],bt[3],bt[4],bt[5],bt[6],bt[7])}break;case Er:if(rt=pt=0,Fe!==null&&Fe.type===Mr){if(Fe=mr(Fe,ue),bt=Fe.length,bt===0){a.lineTo(_e.endX,_e.endY);break}Fe=Fe[bt-1]||null,Fe!==null&&(pt=Fe[6],rt=Fe[7])}else pt=Fe!==null?Fe.endX:ue.startX,rt=Fe!==null?Fe.endY:ue.startY;if(Fe=yr(_e,ue,pt,rt),pt=Fe.length,pt===0){a.lineTo(_e.endX,_e.endY);break}for(rt=0;rt<pt;rt++)bt=Fe[rt],a.bezierCurveTo(bt[2],bt[3],bt[4],bt[5],bt[6],bt[7]);break;default:Et("Segment not of valid type: "+_e.type)}_e.isClosed&&a.closePath(),Fe=_e}ce=ue.isFilled,z?ue.isShadowed?(ce===!0&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&(ce&&re&&gu(a),a.jk(),ce&&re&&Il(a))):(gu(a),ce&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk(),Il(a)):(ce&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk()),a.Se(we)}if(ne&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=Si(),z.type===qt.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===qt.o)for(z=z.figures.iterator;z.next();){for(re=z.value,E.length=0,E.push(re.startX),E.push(re.startY),ne=re.startX,b=re.startY,oe=ne,we=b,ue=re.segments.s,ce=ue.length,me=0;me<ce;me++){switch(De=ue[me],De.type){case _i:cp(a,y,E,x),E.length=0,E.push(De.endX),E.push(De.endY),ne=De.endX,b=De.endY,oe=ne,we=b;break;case Ii:E.push(De.endX),E.push(De.endY),ne=De.endX,b=De.endY;break;case Wr:nt.Qe(ne,b,De.point1X,De.point1Y,De.point2X,De.point2Y,De.endX,De.endY,.5,E),ne=De.endX,b=De.endY;break;case Zo:nt.ep(ne,b,De.point1X,De.point1Y,De.endX,De.endY,.5,E),ne=De.endX,b=De.endY;break;case Mr:if(_e=mr(De,re),Fe=_e.length,Fe===0){E.push(De.centerX),E.push(De.centerY),ne=De.centerX,b=De.centerY;break}for(pt=0;pt<Fe;pt++)rt=_e[pt],nt.Qe(ne,b,rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],.5,E),ne=rt[6],b=rt[7];break;case Er:if(_e=yr(De,re,ne,b),Fe=_e.length,Fe===0){E.push(De.endX),E.push(De.endY),ne=De.endX,b=De.endY;break}for(pt=0;pt<Fe;pt++)rt=_e[pt],nt.Qe(ne,b,rt[2],rt[3],rt[4],rt[5],rt[6],rt[7],.5,E),ne=rt[6],b=rt[7];break;default:Et("Segment not of valid type: "+De.type)}De.isClosed&&(E.push(oe),E.push(we),cp(a,y,E,x))}cp(a,y,E,x)}else if(z.type===qt.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===qt.F){if(b=new So,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ne=new gr(Mr),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],nt.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)}ki(E),a.restore(),a.Vc(!1)}}}},Ae.kk=function(a,y,x){return!Vt.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)},Ae.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Vt.prototype.nk.call(this,a)},Ae.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)}},Ae.ga=function(a,y){if(y===void 0&&(y=new st),a instanceof Xi){a.Mc()&&Et("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},Ae.mi=function(a){a===void 0&&(a=new Bn);var y=this.naturalBounds,x=this.oe;y=Bn.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=st.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),fs(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),fs(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),fs(a,E.x,E.y,0,0),Bn.free(y),st.free(E),a},Ae.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!==qt.j||y||(b+=2);var z=Bn.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Bn.free(z),!1;if(E=b+1e-4,x.type===qt.j)return this.stroke===null||(E=(x.endX-x.startX)*(a.x-x.startX)+(x.endY-x.startY)*(a.y-x.startY),0>(x.startX-x.endX)*(a.x-x.endX)+(x.startY-x.endY)*(a.y-x.endY)||0>E)?!1:(Bn.free(z),nt.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===qt.u){y=x.startX;var ne=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(ne,x),z.width=Math.abs(re-y),z.height=Math.abs(x-ne),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Bn.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Bn.free(z),a}if(x.type===qt.F){ne=x.startX,b=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(ne,re),y=Math.min(b,oe),ne=Math.abs(re-ne)/2,b=Math.abs(oe-b)/2,x=a.x-(x+ne),y=a.y-(y+b),this.fill===null){if(ne-=E,b-=E,0>=ne||0>=b||1>=x*x/(ne*ne)+y*y/(b*b))return Bn.free(z),!1;ne+=E,b+=E}return this.stroke!==null&&(ne+=E,b+=E),Bn.free(z),0>=ne||0>=b?!1:1>=x*x/(ne*ne)+y*y/(b*b)}if(x.type===qt.o)return Bn.free(z),this.fill===null?Bi(x,a.x,a.y,b):vr(x,a,b,1<this.strokeWidth,y);Et("Unknown Geometry type: "+x.type)},Ae.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=nt.Ze[re];typeof ue=="string"&&(ue=nt.Ze[ue]),typeof ue=="function"?(oe=ue(null,100,100),kv[re]=oe):Et("Unsupported Figure: "+re)}ne=oe.bounds}re=ne.width,oe=ne.height,ue=ne.width;var ce=ne.height;switch(fu(this,!0)){case ii:E=x=0;break;case si:ue=Math.max(a-z,0),ce=Math.max(y-z,0);break;case dr:ue=Math.max(a-z,0),E=0;break;case Lr:x=0,ce=Math.max(y-z,0)}isFinite(b.width)&&(ue=b.width),isFinite(b.height)&&(ce=b.height);var me=this.maxSize,we=this.minSize;switch(x=Math.max(x-z,we.width),E=Math.max(E-z,we.height),ue=Math.min(me.width,ue),ce=Math.min(me.height,ce),ue=isFinite(ue)?Math.max(x,ue):Math.max(re,x),ce=isFinite(ce)?Math.max(E,ce):Math.max(oe,E),x=Ov(this),x){case ii:break;case si:re=ue,oe=ce;break;case nr:x=Math.min(ue/re,ce/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:Et(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&&nt.$(this.ua.Sk,a-z)&&nt.$(this.ua.Rk,y-z)||(this.ua=Co.makeGeometry(this,re,oe)),ne=this.ua.bounds,a===1/0||y===1/0?this.Ge(ne.x-z/2,ne.y-z/2,a===0&&re===0?0:ne.width+z,y===0&&oe===0?0:ne.height+z):this.Ge(-(z/2),-(z/2),ue+z,ce+z),b.w()?(ue=b.width,ce=b.height,ue=Math.min(me.width,ue),ce=Math.min(me.height,ce),ue=Math.max(we.width,ue),ce=Math.max(we.height,ce),this.dc.h(0,0,ue,ce)):this.dc.assign(ne)};function Ov(a){var y=a.geometryStretch;return a.Rd!==null?y===uo?si:y:y===uo?kv[a.figure].defaultStretch:y}Ae.eh=function(a,y,x,E){ru(this,a,y,x,E)},Ae.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ae.Sj=function(a,y,x,E,b){var z=this.transform,ne=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ne,oe=-z.m12*ne,ue=-z.m21*ne,ce=z.m11*ne,me=ne*(z.m21*z.dy-z.m22*z.dx),we=ne*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*ue+me,ne=a*oe+y*ce+we,re=x*re+E*ue+me,oe=x*oe+E*ce+we,me=this.ig/2,ue=this.ua,ue===null&&(this.measure(1/0,1/0),ue=this.ua);var Fe=ue.bounds;if(ce=!1,ue.type===qt.j)if(1.5>=this.strokeWidth)ce=nt.Ve(ue.startX,ue.startY,ue.endX,ue.endY,z,ne,re,oe,b);else{if(ue.startX===ue.endX?(E=me,ce=0):(y=(ue.endY-ue.startY)/(ue.endX-ue.startX),ce=me/Math.sqrt(1+y*y),E=ce*y),y=Si(),a=new st,nt.Ve(ue.startX+E,ue.startY+ce,ue.endX+E,ue.endY+ce,z,ne,re,oe,a)&&y.push(a),a=new st,nt.Ve(ue.startX-E,ue.startY-ce,ue.endX-E,ue.endY-ce,z,ne,re,oe,a)&&y.push(a),a=new st,nt.Ve(ue.startX+E,ue.startY+ce,ue.startX-E,ue.startY-ce,z,ne,re,oe,a)&&y.push(a),a=new st,nt.Ve(ue.endX+E,ue.endY+ce,ue.endX-E,ue.endY-ce,z,ne,re,oe,a)&&y.push(a),re=y.length,re===0)return ki(y),!1;for(ce=!0,oe=1/0,E=0;E<re;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-ne)*(a.y-ne),x<oe&&(oe=x,b.x=a.x,b.y=a.y);ki(y)}else if(ue.type===qt.u)ce=nt.Ff(Fe.x-me,Fe.y-me,Fe.x+Fe.width+me,Fe.y+Fe.height+me,z,ne,re,oe,b);else if(ue.type===qt.F){y=Bn.allocAt(Fe.x,Fe.y,Fe.width,Fe.height).Bc(me,me);e:if(y.width===0)ce=nt.Ve(y.x,y.y,y.x,y.y+y.height,z,ne,re,oe,b);else if(y.height===0)ce=nt.Ve(y.x,y.y,y.x+y.width,y.y,z,ne,re,oe,b);else{if(a=y.width/2,ue=y.height/2,E=y.x+a,ce=y.y+ue,x=9999,z!==re&&(x=(ne-oe)/(z-re)),9999>Math.abs(x)){if(oe=ne-ce-x*(z-E),0>a*a*x*x+ue*ue-oe*oe){b.x=NaN,b.y=NaN,ce=!1;break e}me=Math.sqrt(a*a*x*x+ue*ue-oe*oe),re=(-(a*a*x*oe)+a*ue*me)/(ue*ue+a*a*x*x)+E,a=(-(a*a*x*oe)-a*ue*me)/(ue*ue+a*a*x*x)+E,ue=x*(re-E)+oe+ce,oe=x*(a-E)+oe+ce,Math.abs((z-re)*(z-re))+Math.abs((ne-ue)*(ne-ue))<Math.abs((z-a)*(z-a))+Math.abs((ne-oe)*(ne-oe))?(b.x=re,b.y=ue):(b.x=a,b.y=oe)}else{if(re=ue*ue,oe=z-E,re-=re/(a*a)*oe*oe,0>re){b.x=NaN,b.y=NaN,ce=!1;break e}oe=Math.sqrt(re),re=ce+oe,oe=ce-oe,Math.abs(re-ne)<Math.abs(oe-ne)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}ce=!0}Bn.free(y)}else if(ue.type===qt.o){we=st.alloc();var De=re-z,_e=oe-ne,pt=De*De+_e*_e,rt=z,bt=ne;if(0<pt&&Fe.contains(rt,bt)&&(we.x=rt,we.y=bt,this.ca(we)))for(De!==0&&.5>Math.abs(De)?(_e*=.5/De,De=.5):_e!==0&&.5>Math.abs(_e)&&(De*=.5/_e,_e=.5),rt-=De,bt-=_e;Fe.contains(rt,bt);)rt-=De,bt-=_e;for(b.x=re,b.y=oe,_e=0;_e<ue.figures.count;_e++){var It=ue.figures.s[_e],Rt=It.isFilled?rt:z,Kt=It.isFilled?bt:ne,fn=It.segments;Fe=It.startX,De=It.startY;for(var bi=Fe,Yi=De,Wi=0;Wi<fn.count;Wi++){var hi=fn.s[Wi],ei=hi.type,co=hi.endX,Kr=hi.endY,Fa=!1;switch(ei){case _i:bi=co,Yi=Kr;break;case Ii:Fa=n0(Fe,De,co,Kr,Rt,Kt,re,oe,we);break;case Wr:Fa=nt.Eo(Fe,De,hi.point1X,hi.point1Y,hi.point2X,hi.point2Y,co,Kr,Rt,Kt,re,oe,.6,we);break;case Zo:Fa=nt.Eo(Fe,De,Fe+2/3*(hi.point1X-Fe),De+2/3*(hi.point1Y-De),co+2/3*(hi.point1X-co),Kr+2/3*(hi.point1Y-Kr),co,Kr,Rt,Kt,re,oe,.6,we);break;case Mr:case Er:ei=hi.type===Mr?mr(hi,It):yr(hi,It,Fe,De);var qa=ei.length;if(qa===0){Fa=n0(Fe,De,hi.type===Mr?hi.centerX:hi.endX,hi.type===Mr?hi.centerY:hi.endY,Rt,Kt,re,oe,we);break}for(Kr=null,co=0;co<qa;co++){if(Kr=ei[co],co===0&&n0(Fe,De,Kr[0],Kr[1],Rt,Kt,re,oe,we)){var wl=t0(Rt,Kt,we,pt,b);wl<pt&&(pt=wl,ce=!0)}nt.Eo(Kr[0],Kr[1],Kr[2],Kr[3],Kr[4],Kr[5],Kr[6],Kr[7],Rt,Kt,re,oe,.6,we)&&(wl=t0(Rt,Kt,we,pt,b),wl<pt&&(pt=wl,ce=!0))}co=Kr[6],Kr=Kr[7];break;default:Et("Unknown Segment type: "+ei)}Fe=co,De=Kr,Fa&&(Fa=t0(Rt,Kt,we,pt,b),Fa<pt&&(pt=Fa,ce=!0)),hi.isClosed&&(co=bi,Kr=Yi,n0(Fe,De,co,Kr,Rt,Kt,re,oe,we)&&(hi=t0(Rt,Kt,we,pt,b),hi<pt&&(pt=hi,ce=!0)))}}z=x-a,ne=E-y,re=Math.sqrt(z*z+ne*ne),re!==0&&(z/=re,ne/=re),b.x-=z*me,b.y-=ne*me,st.free(we)}else Et("Unknown Geometry type: "+ue.type);return ce?(this.transform.Ga(b),!0):!1};function t0(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function n0(a,y,x,E,b,z,ne,re,oe){if(nt.$(a,x)&&nt.$(y,E)||nt.$(b,ne)&&nt.$(z,re))return!1;var ue=!1,ce=(b-ne)*(y-E)-(z-re)*(a-x);return ce===0?!1:(oe.x=((b*re-z*ne)*(a-x)-(b-ne)*(a*E-y*x))/ce,oe.y=((b*re-z*ne)*(y-E)-(z-re)*(a*E-y*x))/ce,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(oe.y>a||nt.$(oe.y,a))&&(oe.y<y||nt.$(oe.y,y))&&(ue=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||nt.$(oe.x,y))&&(oe.x<a||nt.$(oe.x,a))&&(ue=!0)),ue)}Ae.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.ua;x===null&&(this.measure(1/0,1/0),x=this.ua),x=x.bounds;var E=this.strokeWidth/2,b=!1,z=st.alloc();return z.h(x.x-E,x.y-E),a.ca(y.Ga(z))&&(z.h(x.x-E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.bottom+E),a.ca(y.Ga(z))&&(z.h(x.right+E,x.y-E),a.ca(y.Ga(z))&&(b=!0)))),st.free(z),b},Ae.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=Yt.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ne=st.alloc();if(ne.h(E,z),x.Ga(ne),this.gh(ne,!0)||(ne.h(b,z),x.Ga(ne),this.gh(ne,!0))||(ne.h(E,a),x.Ga(ne),this.gh(ne,!0))||(ne.h(b,a),x.Ga(ne),this.gh(ne,!0)))return st.free(ne),!0;var re=st.alloc(),oe=st.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=b,re.y=z,re.transform(x),ne.x=E,ne.y=z,ne.transform(x),y=!1,qf(this,ne,re,oe)?y=!0:(ne.x=b,ne.y=a,ne.transform(x),qf(this,ne,re,oe)?y=!0:(re.x=E,re.y=a,re.transform(x),qf(this,ne,re,oe)?y=!0:(ne.x=E,ne.y=z,ne.transform(x),qf(this,ne,re,oe)&&(y=!0)))),st.free(ne),Yt.free(x),st.free(re),st.free(oe),y};function qf(a,y,x,E){if(!a.rs(y,x,E))return!1;a=y.x,y=y.y;var b=x.x,z=x.y;return x=E.x,E=E.y,a===b?(y<z?(a=y,y=z):a=z,E>=a&&E<=y):(a<b?(E=a,a=b):E=b,x>=E&&x<=a)}Ae.tx=function(a,y,x){function E(pt,rt){for(var bt=pt.length,It=0;It<bt;It+=2)if(rt.zd(pt[It],pt[It+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,Ia(a.x,a.y,re,oe)<=b&&Ia(a.x,a.y,ue,oe)<=b&&Ia(a.x,a.y,re,ne)<=b&&Ia(a.x,a.y,ue,ne)<=b)return!0}if(re=y.startX,oe=y.startY,ue=y.endX,ne=y.endY,y.type===qt.j){if(x=(re-ue)*(a.x-ue)+(oe-ne)*(a.y-ne),ha(a.x,a.y,re,oe,ue,ne)<=(0<=(ue-re)*(a.x-re)+(ne-oe)*(a.y-oe)&&0<=x?b:z))return!0}else{if(y.type===qt.u)return y=!1,x&&(y=ha(a.x,a.y,re,oe,re,ne)<=b||ha(a.x,a.y,re,oe,ue,oe)<=b||ha(a.x,a.y,ue,oe,ue,ne)<=b||ha(a.x,a.y,re,ne,ue,ne)<=b),y;if(y.type===qt.F){y=a.x-(re+ue)/2,z=a.y-(oe+ne)/2;var ce=Math.abs(ue-re)/2,me=Math.abs(ne-oe)/2;if(ce===0||me===0)return ha(a.x,a.y,re,oe,ue,ne)<=b;if(x){if(a=nt.$y(ce,me,y,z),a*a<=b)return!0}else return!(Ia(y,z,-ce,0)>=b||Ia(y,z,0,-me)>=b||Ia(y,z,0,me)>=b||Ia(y,z,ce,0)>=b)}else if(y.type===qt.o){if(ue=y.bounds,z=ue.x,re=ue.y,oe=ue.x+ue.width,ue=ue.y+ue.height,a.x>oe&&a.x<z&&a.y>ue&&a.y<re&&ha(a.x,a.y,z,re,z,ue)>b&&ha(a.x,a.y,z,re,oe,re)>b&&ha(a.x,a.y,oe,ue,z,ue)>b&&ha(a.x,a.y,oe,ue,oe,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Bi(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,ce=z.startY,a.zd(ne,ce)>b)return!1;for(re=z.segments.s,oe=re.length,ue=0;ue<oe;ue++)switch(me=re[ue],me.type){case _i:case Ii:if(ne=me.endX,ce=me.endY,a.zd(ne,ce)>b)return!1;break;case Wr:var we=Si();if(nt.Qe(ne,ce,me.point1X,me.point1Y,me.point2X,me.point2Y,me.endX,me.endY,.8,we),ne=E(we,a),ki(we),ne||(ne=me.endX,ce=me.endY,a.zd(ne,ce)>b))return!1;break;case Zo:if(we=Si(),nt.ep(ne,ce,me.point1X,me.point1Y,me.endX,me.endY,.8,we),ne=E(we,a),ki(we),ne||(ne=me.endX,ce=me.endY,a.zd(ne,ce)>b))return!1;break;case Mr:case Er:we=me.type===Mr?mr(me,z):yr(me,z,ne,ce);var Fe=we.length;if(Fe===0){if(ne=me.type===Mr?me.centerX:me.endX,ce=me.type===Mr?me.centerY:me.endY,a.zd(ne,ce)>b)return!1;break}me=null;for(var De=Si(),_e=0;_e<Fe;_e++)if(me=we[_e],De.length=0,nt.Qe(me[0],me[1],me[2],me[3],me[4],me[5],me[6],me[7],.8,De),E(De,a))return ki(De),!1;ki(De),me!==null&&(ne=me[6],ce=me[7]);break;default:Et("Unknown Segment type: "+me.type)}}return!0}}}return!1},Ae.qc=function(){this.ua=null},Ae.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=Do):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Xi(1-Do.x,Do.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=nt.Ze[a.figure],typeof E=="string"&&(E=nt.Ze[E]),E===void 0&&Et("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=nt.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 nt.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=qt.parse(nt.um[E],!1),qd[E]=a,x!==E&&(qd[x]=E),E}}return typeof y=="string"?y:y instanceof qt?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&&is(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=qt.parse(a);var y=a.normalize();this.geometry=a,this.position=a=st.allocAt(-y.x,-y.y),st.free(a)}},isGeometryPositioned:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.v(),this.g("isGeometryPositioned",y,a))}},fill:{get:function(){return this.Ui},set:function(a){var y=this.Ui;y!==a&&(a!==null&&yf(a,"Shape.fill"),a instanceof da&&a.freeze(),this.Ui=a,this.N(),this.g("fill",y,a))}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&yf(a,"Shape.stroke"),a instanceof da&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},strokeWidth:{get:function(){return this.ig},set:function(a){var y=this.ig;if(y!==a)if(0<=a){this.ig=a,this.v();var x=this.part;x!==null&&(x.ag=NaN),this.g("strokeWidth",y,a)}else Xn(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"?Xn(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"?Xn(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)||Et("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=nt.Ze[a];typeof x=="function"?x=a:(x=nt.Ze[a.toLowerCase()])||Et("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?Et("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new no),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("toArrow",y,x))}}},fromArrow:{get:function(){return this.Ua!==null?this.Ua.j:"None"},set:function(a){var y=this.fromArrow;if(a===!0?a="Standard":a===!1&&(a=""),y!==a){var x=y1(a);x===null?Et("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new no),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Fi},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:Fi},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:uo},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 Pr,kv=new Pr;Co.className="Shape",Co.getFigureGenerators=function(){var a=new $i,y;for(y in nt.Ze)y!==y.toLowerCase()&&a.add(y,nt.Ze[y]);return a.freeze(),a},Co.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=nt.Ze;E[a]=y,E[x]=a},Co.getArrowheadGeometries=function(){var a=new $i;for(E in nt.um)if(qd[E]===void 0){var y=qt.parse(nt.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 qt&&a.add(x,E)}return a.freeze(),a},Co.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=qt.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Et("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=uo,this.gg=this.fg=Fi}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 Vt.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}Wt(es,Vt),es.prototype.cloneProtected=function(a){Vt.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())}Ae=es.prototype,Ae.th=function(){Vt.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}Ae.qb=function(a){a.classType===es?this.wrap=a:Vt.prototype.qb.call(this,a)},Ae.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Ae.v=function(){Vt.prototype.v.call(this)},Ae.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 ce=this.oe,me=ce.dx-(ne*ce.m21+ce.dx);ce=ce.dy-(ne*ce.m22+ce.dy);var we=y.scale;switch(8>(me*me+ce*ce)*we*we&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Da&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,me=this.spacingBelow,this.flip){case qo:a.translate(b,0),a.scale(-1,1);break;case Mo:a.translate(0,z),a.scale(1,-1);break;case _a:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ce=this.Gc,we=(y+ne+me)*ce,z>we&&(E=this.verticalAlignment,E=E.y*z-E.y*we+E.offsetY),ce===1&&this.ze!==null)me=this.Cb,me>b&&(me=b),this.Oj(this.ze,a,0,E+y,b,ne,me,x,re,oe,ue);else if(this.Qc!==null&&this.Qb!==null)for(we=0;we<ce;we++){var Fe=this.Qc[we];Fe>b&&(Fe=b),E+=y,this.Oj(this.Qb[we],a,0,E,b,ne,Fe,x,re,oe,ue),E+=ne+me}switch(this.flip){case qo:a.scale(-1,1),a.translate(-b,0);break;case Mo:a.scale(1,-1),a.translate(0,-z);break;case _a:a.scale(-1,-1),a.translate(-b,-z)}}},Ae.Oj=function(a,y,x,E,b,z,ne,re,oe,ue,ce){var me=0;if(re)oe==="left"?me=0:oe==="right"?me=b-ne:oe==="center"&&(me=(b-ne)/2),y.fillRect(x+me,E+.25*z,ne,1);else{if(oe==="left"?me=0:oe==="right"?me=b:oe==="center"&&(me=b/2),b=i0!==null?i0(this,z):.75*z,y.fillText(a,x+me,E+b),a=z/20|0,a===0&&(a=1),oe==="right"?me-=ne:oe==="center"&&(me-=ne/2),ue){re=r0!==null?r0(this,z):.8*z,oe=x+me,ue=E+re,b=x+me+ne,re=E+re;var we=a;y.beginPath(),y.lineWidth=we,y.moveTo(oe,ue),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Da&&y.ad.classList.add("gojs-td")}ce&&(ce=E+z-z/2.2|0,a%2!==0&&(ce+=.5),E=x+me,z=ce,x=x+me+ne,ne=ce,me=a,y.beginPath(),y.lineWidth=me,y.moveTo(E,z),y.lineTo(x,ne),y.stroke(),y.Se(),y instanceof Da&&y.ad.classList.add("gojs-td"))}},Ae.kk=function(a,y,x){if(!Vt.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},Ae.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Vt.prototype.nk.call(this,a)},Ae.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)}},Ae.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),ys(this.dc,z,ne),this.Ge(0,0,z,ne),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Ae.eh=function(a,y,x,E){ru(this,a,y,x,E)};function Up(a,y,x){a.ze===null?(a.ze=y,a.Cb=x):((a.Qb===null||a.Qc===null)&&(a.Qb=[],a.Qc=[],a.Qb.push(a.ze),a.Qc.push(a.Cb)),a.Qb.push(y),a.Qc.push(x),a.Qb.length>a.maxLines&&(a.l|=16777216))}function Rv(a,y,x,E){var b=a.formatting===Xp;b&&(y=y.trim());var z=0,ne=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,Yp(a)+re);var oe=a.overflow===o0?S1(ne):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ne=y,a.wrap===_v){a.Le=1;var ue=qc(y);if(oe===0||ue<=x)a.Cb=Math.max(a.Cb,ue),Up(a,y,a.Cb),E!==null&&E.h(ue,re);else{for(z=dp(a,ne),ne=ne.substr(z.length),y=dp(a,ne),ue=qc(z+y);0<y.length&&ue<=x;)z+=y,ne=ne.substr(y.length),y=dp(a,ne),ue=z+y,b&&(ue=ue.trim()),ue=qc(ue);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);qc(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Jp;var ce=qc(z);a.Cb=ce,Up(a,z,ce),E!==null&&E.h(ce,re)}}else{for(oe=0,ne.length===0&&(oe=1,Up(a,ne,0));0<ne.length;){for(y=dp(a,ne),ne=ne.substr(y.length);qc(y)>x;){var me=1;for(ue=qc(y.substr(0,me)),ce=0;ue<=x;)me++,ce=ue,ue=qc(y.substr(0,me));if(me===1){var we=ue;z=Math.max(z,ue)}else we=ce,z=Math.max(z,ce);if(me--,1>me&&(me=1),Up(a,y.substr(0,me),we),oe++,y=y.substr(me),a.Gc+oe>a.maxLines)break}for(ce=dp(a,ne),ue=qc(y+ce);0<ce.length&&ue<=x;)y+=ce,ne=ne.substr(ce.length),ce=dp(a,ne),ue=y+ce,b&&(ue=ue.trim()),ue=qc(ue);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ce.length===0?(me=ue,z=Math.max(z,ue)):(me=ce=qc(y),z=Math.max(z,ce)),Up(a,y,me),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=mi.alloc();Rv(a,z,y,oe),b+=oe.height,mi.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:ii},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=mi.alloc();Rv(this,this.ec,999999,a);var y=a.width;mi.free(a),a=P1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),ys(this.dc,y,a)}return this.dc}},isMultiline:{get:function(){return(this.l&2097152)!==0},set:function(a){var y=(this.l&2097152)!==0;y!==a&&(this.l^=2097152,this.v(),this.g("isMultiline",y,a))}},isUnderline:{get:function(){return(this.l&4194304)!==0},set:function(a){var y=(this.l&4194304)!==0;y!==a&&(this.l^=4194304,this.Uc=!0,this.N(),this.g("isUnderline",y,a))}},isStrikethrough:{get:function(){return(this.l&8388608)!==0},set:function(a){var y=(this.l&8388608)!==0;y!==a&&(this.l^=8388608,this.Uc=!0,this.N(),this.g("isStrikethrough",y,a))}},wrap:{get:function(){return this.da!==null?this.da.$r:jv},set:function(a){var y=this.wrap;y!==a&&(Dd(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:zv},set:function(a){var y=this.overflow;y!==a&&(Dd(this),this.da.$q=a,this.v(),this.g("overflow",y,a))}},isOverflowed:{get:function(){return(this.l&16777216)!==0}},stroke:{get:function(){return this.xc},set:function(a){var y=this.xc;y!==a&&(a!==null&&yf(a,"TextBlock.stroke"),a instanceof da&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Yp(this)}},editable:{get:function(){return(this.l&1048576)!==0},set:function(a){var y=(this.l&1048576)!==0;y!==a&&(this.l^=1048576,this.g("editable",y,a))}},textEditor:{get:function(){return this.da!==null?this.da.Qr:null},set:function(a){var y=this.textEditor;y!==a&&(Dd(this),this.da.Qr=a,this.g("textEditor",y,a))}},errorFunction:{get:function(){return this.da!==null?this.da.Hd:null},set:function(a){var y=this.errorFunction;y!==a&&(Dd(this),this.da.Hd=a,this.g("errorFunction",y,a))}},interval:{get:function(){return this.fa!==null?this.fa.Tk:1},set:function(a){var y=this.interval;if(a=Math.round(a),y!==a&&a!==0&&isFinite(a)){this.fa===null&&(this.fa=new eh),this.fa.Tk=a,this.v();var x=this.panel;x!==null&&(x.graduatedIntervals=null),this.g("interval",y,a)}}},graduatedStart:{get:function(){return this.fa!==null?this.fa.u:0},set:function(a){var y=this.graduatedStart;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new eh),this.fa.u=a,this.v(),this.g("graduatedStart",y,a))}},graduatedEnd:{get:function(){return this.fa!==null?this.fa.j:1},set:function(a){var y=this.graduatedEnd;y!==a&&(0>a?a=0:1<a&&(a=1),this.fa===null&&(this.fa=new eh),this.fa.j=a,this.v(),this.g("graduatedEnd",y,a))}},graduatedFunction:{get:function(){return this.fa!==null?this.fa.F:null},set:function(a){var y=this.graduatedFunction;y!==a&&(this.fa===null&&(this.fa=new eh),this.fa.F=a,this.v(),this.g("graduatedFunction",y,a))}},graduatedSkip:{get:function(){return this.fa!==null?this.fa.o:null},set:function(a){var y=this.graduatedSkip;y!==a&&(this.fa===null&&(this.fa=new eh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}},textValidation:{get:function(){return this.da!==null?this.da.vj:null},set:function(a){var y=this.textValidation;y!==a&&(Dd(this),this.da.vj=a,this.g("textValidation",y,a))}},textEdited:{get:function(){return this.da!==null?this.da.Pr:null},set:function(a){var y=this.textEdited;y!==a&&(Dd(this),this.da.Pr=a,this.g("textEdited",y,a))}},spacingAbove:{get:function(){return this.da!==null?this.da.Dr:0},set:function(a){var y=this.spacingAbove;y!==a&&(Dd(this),this.da.Dr=a,this.v(),this.g("spacingAbove",y,a))}},spacingBelow:{get:function(){return this.da!==null?this.da.Er:0},set:function(a){var y=this.spacingBelow;y!==a&&(Dd(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Xp},set:function(a){var y=this.formatting;y!==a&&(Dd(this),this.da.gq=a,this.v(),this.g("formatting",y,a))}},maxLines:{get:function(){return this.da!==null?this.da.Jq:1/0},set:function(a){var y=this.maxLines;y!==a&&(a=Math.floor(a),0>=a&&Xn(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 wn(es,"None",0),w1=new wn(es,"WrapFit",1),jv=new wn(es,"WrapDesiredSize",2),C1=new wn(es,"WrapBreakAll",3),zv=new wn(es,"OverflowClip",0),o0=new wn(es,"OverflowEllipsis",1),Xp=new wn(es,"FormatTrim",0),E1=new wn(es,"FormatNone",0),xS=/[ \u200b\u00ad]/,Zv=new Pr,b1=0,a0=new Pr,Hv=0,Jp="...",F1="",ju=null,s0=!1;es.className="TextBlock";function Wv(){this.nc=!1,this.Hd=null,this.Xf=ii,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 Pr,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){Vt.call(this),this.Eg=null,this.qo="",this.Xg=Ea,this.Nk=si,this.Zg=this.Hd=null,this.Mk=Oo,this.Xf=ii,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;Wt(zu,Vt),zu.prototype.cloneProtected=function(a){Vt.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===ii||a===nr||a===Ho?this.imageStretch=a:Vt.prototype.qb.call(this,a)},zu.prototype.toString=function(){return"Picture("+this.source+")#"+tr(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new Pr,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()||(yt(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",ne=b.Og.I(z);if(ne!==null){b=ne.length,z=Si();for(var re=0;re<b;re++)z.push(ne[re]);if(y.hn)for(re=0;re<b;re++)ne=z[re],ne.Hd!==null&&ne.Hd(ne,x);ki(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}zu.prototype.hA=function(){if(this.source!==""){fp(this.source);var a=this.source;this.source="",this.source=a}},zu.prototype.redraw=function(){this.N(),this.Uc=!0},zu.prototype.hh=function(a,y){var x=this.Eg;if(x!==null){var E=x.getAttribute("src");if(!(x instanceof HTMLImageElement&&(E===null||E==="")||x.ln instanceof Event&&a instanceof fd)){var b=a instanceof Da;E=this.naturalBounds;var z=0,ne=0,re=this.qn,oe=re?+x.width:x.naturalWidth;if(re=re?+x.height:x.naturalHeight,oe===void 0&&x.videoWidth&&(oe=x.videoWidth),re===void 0&&x.videoHeight&&(re=x.videoHeight),oe=oe||E.width,re=re||E.height,oe!==0&&re!==0){var ue=oe,ce=re;this.sourceRect.w()&&(z=this.Xg.x,ne=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var me=oe,we=re,Fe=this.Nk,De=this.Mk;switch(Fe){case ii:if(this.sourceRect.w())break;me>=E.width&&(z=z+De.offsetX+(me*De.x-E.width*De.x)),we>=E.height&&(ne=ne+De.offsetY+(we*De.y-E.height*De.y)),oe=Math.min(E.width,me),re=Math.min(E.height,we);break;case si:me=E.width,we=E.height;break;case nr:case Ho:Fe===nr?(Fe=Math.min(E.height/we,E.width/me),me*=Fe,we*=Fe):Fe===Ho&&(Fe=Math.max(E.height/we,E.width/me),me*=Fe,we*=Fe,me>=E.width&&(z=(z+De.offsetX+(me*De.x-E.width*De.x)/me)*oe),we>=E.height&&(ne=(ne+De.offsetY+(we*De.y-E.height*De.y)/we)*re),oe*=1/(me/E.width),re*=1/(we/E.height),me=E.width,we=E.height)}Fe=this.Df()*y.scale;var _e=me*Fe*we*Fe,pt=oe*re/_e,rt=x.__goCache;Fe=null;var bt=SS;if(!b){if(x.sq&&rt!==void 0&&4<_e&&pt>bt*bt)for(rt.gi===null&&(L1(rt,4,ue,ce,x),L1(rt,16,ue,ce,x)),b=rt.gi,ue=b.length,ce=0;ce<ue&&b[ce].ratio*b[ce].ratio<pt;ce++)Fe=b[ce];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(It){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(It){this.vl=!0}}if(this.vl)return}}switch(b=me<E.width?De.offsetX+(E.width*De.x-me*De.x):0,De=we<E.height?De.offsetY+(E.height*De.y-we*De.y):0,this.flip){case qo:a.translate(Math.min(E.width,me),0),a.scale(-1,1);break;case Mo:a.translate(0,Math.min(E.height,we)),a.scale(1,-1);break;case _a:a.translate(Math.min(E.width,me),Math.min(E.height,we)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&rt!==void 0&&Fe!==null&&Fe.ratio!==1){a.save(),y=Fe.ratio;try{a.drawImage(Fe.source,z/y,ne/y,Math.min(Fe.source.width,oe/y),Math.min(Fe.source.height,re/y),b,De,Math.min(E.width,me),Math.min(E.height,we)),a instanceof Da&&(this.bt=[z/y,ne/y,Math.min(Fe.source.width,oe/y),Math.min(Fe.source.height,re/y),b,De,Math.min(E.width,me),Math.min(E.height,we)])}catch(It){this.en=!1}a.restore()}else try{a.drawImage(x,z,ne,oe,re,b,De,Math.min(E.width,me),Math.min(E.height,we)),a instanceof Da&&(this.bt=[z,ne,oe,re,b,De,Math.min(E.width,me),Math.min(E.height,we)])}catch(It){this.en=!1}switch(this.flip){case qo:a.scale(-1,1),a.translate(-Math.min(E.width,me),0);break;case Mo: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,me),-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===dr?(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===Lr?(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)),ys(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||Et("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&vg(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Un),E!==null&&x&&yh(E,this),a!==null&&(this.qn||a.complete===!0?(a.hn&&(a.ln instanceof Event&&this.Hd!==null?this.Hd(this,a.ln):a.sq===!0&&!a.ln&&this.Zg!==null&&a.eu&&this.Zg(this,a.eu)),a.sq=!0,this.desiredSize.w()||(yt(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 Pr,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 qt,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new qt,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 gr(_i);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},gp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new gr(Ii);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function Kh(a,y,x,E,b,z,ne){var re;re===void 0&&(re=!1);var oe=new gr(Wr);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 gr(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 gr(Mr);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 gr(Er,ne,re,y,x,E,b,z),oe&&y.close(),a.mc.segments.add(y)}function A1(a){var y=c0;return y!==null?(c0=null,y.reset(a),y):(y=new gp,y.reset(a),y)}var c0=null;gp.className="StreamGeometryContext";function cu(a,y){var x=a.toLowerCase(),E=nt.Ze;E[a]=y,E[x]=a}cu("Rectangle",function(a,y,x){a="r"+y+","+x;var E=nt.Mf[a];return E!==void 0||(E=new qt(qt.u),E.endX=y,E.endY=x,nt.Nf<nt.vm&&(nt.Mf[a]=E,nt.Nf++)),E}),cu("Square",function(a,y,x){a="s"+y+","+x;var E=nt.Mf[a];return E!==void 0||(E=new qt(qt.u),E.endX=y,E.endY=x,E.defaultStretch=nr,nt.Nf<nt.vm&&(nt.Mf[a]=E,nt.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=nt.Mf[E];if(b!==void 0)return b;var z=a*nt.wg;return b=new qt().add(new So(a,0,!0).add(new gr(Ii,y-a,0)).add(new gr(Wr,y,a,y-z,0,y,z)).add(new gr(Ii,y,x-a)).add(new gr(Wr,y-a,x,y,x-z,y-z,x)).add(new gr(Ii,a,x)).add(new gr(Wr,0,x-a,z,x,0,x-z)).add(new gr(Ii,0,a)).add(new gr(Wr,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Xi(0,0,z,z),b.spot2=new Xi(1,1,-z,-z)),nt.Nf<nt.vm&&(nt.Mf[E]=b,nt.Nf++),b}),cu("Border","RoundedRectangle"),cu("Ellipse",function(a,y,x){a="e"+y+","+x;var E=nt.Mf[a];return E!==void 0||(E=new qt(qt.F),E.endX=y,E.endY=x,E.spot1=Aa,E.spot2=Wa,nt.Nf<nt.vm&&(nt.Mf[a]=E,nt.Nf++)),E}),cu("Circle",function(a,y,x){a="c"+y+","+x;var E=nt.Mf[a];return E!==void 0||(E=new qt(qt.F),E.endX=y,E.endY=x,E.spot1=Aa,E.spot2=Wa,E.defaultStretch=nr,nt.Nf<nt.vm&&(nt.Mf[a]=E,nt.Nf++)),E}),cu("TriangleRight",function(a,y,x){return new qt().add(new So(0,0).add(new gr(Ii,y,.5*x)).add(new gr(Ii,0,x).close())).pm(0,.25,.5,.75)}),cu("TriangleDown",function(a,y,x){return new qt().add(new So(0,0).add(new gr(Ii,y,0)).add(new gr(Ii,.5*y,x).close())).pm(.25,0,.75,.5)}),cu("TriangleLeft",function(a,y,x){return new qt().add(new So(y,x).add(new gr(Ii,0,.5*x)).add(new gr(Ii,y,0).close())).pm(.5,.25,1,.75)}),cu("TriangleUp",function(a,y,x){return new qt().add(new So(y,x).add(new gr(Ii,0,x)).add(new gr(Ii,.5*y,0).close())).pm(.25,.5,.75,1)}),cu("Triangle","TriangleUp"),cu("Diamond",function(a,y,x){return new qt().add(new So(.5*y,0).add(new gr(Ii,0,.5*x)).add(new gr(Ii,.5*y,x)).add(new gr(Ii,y,.5*x).close())).pm(.25,.25,.75,.75)}),cu("LineH",function(a,y,x){return a=new qt(qt.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 qt(qt.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 qt().add(new So(0,x/2,!1).add(new gr(Ii,y,x/2)).add(new gr(_i,y/2,0)).add(new gr(Ii,y/2,x)))}),cu("XLine",function(a,y,x){return new qt().add(new So(0,x,!1).add(new gr(Ii,y,0)).add(new gr(_i,0,0)).add(new gr(Ii,y,x)))}),cu("LineRight",function(a,y,x){return new qt().add(new So(.25*y,0,!1).add(new gr(Ii,.75*y,.5*x)).add(new gr(Ii,.25*y,x)))}),cu("LineDown",function(a,y,x){return new qt().add(new So(0,.25*x,!1).add(new gr(Ii,.5*y,.75*x)).add(new gr(Ii,y,.25*x)))}),cu("LineLeft",function(a,y,x){return new qt().add(new So(.75*y,0,!1).add(new gr(Ii,.25*y,.5*x)).add(new gr(Ii,.75*y,x)))}),cu("LineUp",function(a,y,x){return new qt().add(new So(0,.75*x,!1).add(new gr(Ii,.5*y,.25*x)).add(new gr(Ii,y,.75*x)))}),nt.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=Fi,this.Gq="",this.Hq=Us,this.Pq=va,this.Kq=Ma,this.Up=null,this.Cq=127,this.zr=Ps,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 xr(a,y){a===void 0||a instanceof ll||typeof a=="string"?ui.call(this,a):(ui.call(this),a&&(y=a)),this.G=2408959,this.Tf="",this.P=null,this.Jg="",this.Qf=this.Ug=null,this.ec="",this.Ah=this.Ig=null,this.ke=new st(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Bn,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Wt(xr,ui),xr.prototype.cloneProtected=function(a){ui.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},Ae=xr.prototype,Ae.Af=function(a){ui.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Ae.toString=function(){var a=Ni(this.constructor)+"#"+tr(this);return this.data!==null&&(a+="("+ir(this.data)+")"),a};function Zu(a){a.P===null?a.P=new Gv:a.P.nc&&(a.P=a.P.copy())}Ae.th=function(){ui.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Ae.gk=function(a,y,x,E,b,z,ne){var re=this.diagram;re!==null&&(a===xa&&y==="elements"?b instanceof ui?Jf(b,function(oe){vy(re.partManager,oe),zh(re,oe)}):yh(re,b):a===$a&&y==="elements"&&(b instanceof ui?Jf(b,function(oe){yy(re.partManager,oe,re)}):vg(re,b)),re.cb(a,y,x,E,b,z,ne))},Ae.La=function(a){if(ui.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 ui&&Jf(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},xr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},xr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},xr.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 $i),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)))}}},xr.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)}},xr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Si();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);ki(y)}},xr.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 po?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof pa))break e;Zc(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=ui.Link),x.adornedObject=y)}if(x!==null){x.type===ui.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(CS(this,a),y=this.adornments;y.next();)y.value.La()}},xr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function $v(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function CS(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function d0(a){if(Pf(a)===!1){Vv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function D1(a){if(a.G|=2097152,Pf(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||k1(a,y,x),x=a.Ib;var E=Bn.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Bn.free(E),Vv(a,!1)}}xr.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new Yt);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},xr.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=st.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ne.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(ne),ne.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(ne),ne.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else ne.yi(y,x,E,b,z);a.rotate(this.Kb,ne.x,ne.y),st.free(ne)}},xr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},xr.prototype.moveTo=function(a,y,x){a=st.allocAt(a,y),this.move(a,x),st.free(a)},xr.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())},xr.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())},xr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new $i),y.I(a)!==null)return y.I(a);var x=ui.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function Vh(a,y,x,E){E===void 0&&(E=new st),x=x.Mc()?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}xr.prototype.mi=function(a){return a===void 0&&(a=new Bn),a.assign(this.actualBounds)},xr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function I1(a){var y=st.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Co?x.strokeWidth:0;if(y.yi(0,0,E.width+b,E.height+b,a.locationSpot),x!==a)for(y.offset(-b/2,-b/2),x.transform.Ga(y),x=x.panel;x!==null&&x!==a;)x.transform.Ga(y),x=x.panel;return a.Lb!==null&&a.Lb.Ga(y),y.offset(-a.uc.x,-a.uc.y),y}function eg(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=c1(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var ne=a.shadowBlur;return a=a.shadowOffset,z+=ne,y+=ne,E-=ne/2,b-=ne/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}xr.prototype.arrange=function(){if(Tt(this)===!1)D1(this);else{Ht(this,!1);var a=this.Ib,y=Bn.alloc();y.assign(a);var x=wf(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;k1(this,E,this.location),a.ka(),a.x=E.x,a.y=E.y,a.freeze(),this.Xl(y,a),y.D(a)?this.Fd(x):!this.Zc()||nt.B(y.width,a.width)&&nt.B(y.height,a.height)||0<=this.vw&&this.C(16),Bn.free(y),Vv(this,!1)}},Ae=xr.prototype,Ae.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Bn.alloc();b.assign(x.documentBounds),b.Fv(x.padding),a.x>b.x&&a.y>b.y&&a.right<b.right&&a.bottom<b.bottom&&y.x>b.x&&y.y>b.y&&y.right<b.right&&y.bottom<b.bottom&&(E=!0),Bn.free(b)}!(this.G&65536)&&a.D(y)||_1(this,E,x),x.N(),!a.w()&&!y.w()||Ol(a,y)||(this instanceof Di&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Ae.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&O1(this,E,a,y,x),this.pa=a,this.G&=-2097153,!this.ke.w()||E!==null&&!E.animationManager.isTicking&&E.undoManager.isUndoingRedoing||(E=this.ke,this.ke=new st(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Pf(this)===!1&&Tt(this)===!1&&(d0(this),D1(this)),!0};function O1(a,y,x,E,b){y===null||a instanceof pa||(y=y.animationManager,y.zb&&_c(y,a,new st(E,b),x))}Ae.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;Pf(this)||Tt(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)},Ae.Av=function(){this.G&=-2097153,d0(this)};function k1(a,y,x){var E=I1(a),b=a.diagram,z=x.w(),ne=y.w();z&&ne?a.G&2097152?T1(a,y,x,b,E):R1(a,y,x,b,E):z?T1(a,y,x,b,E):ne&&R1(a,y,x,b,E),a.G|=2097152,st.free(E),a.Uk()}function T1(a,y,x,E,b){var z=y.x,ne=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof pa||_c(x,a,new st(z,ne),y),E||y.x===z&&y.y===ne||a.g("position",new st(z,ne),y.copy()))}function R1(a,y,x,E,b){var z=x.copy();x.h(y.x+b.x,y.y+b.y),x.D(z)||E===null||a.g("location",z,x.copy())}function _1(a,y,x){Uv(a,!1),a instanceof Di&&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}Ae.si=function(){return!0},Ae.Zc=function(){return!0},Ae.ph=function(){return!1},Ae.Dd=function(){return!0};function Kv(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: "+Ni(a.constructor)+", new class: "+Ni(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 Di&&(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 Di&&(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)}xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.prototype.canSelect=function(){if(!this.selectable)return!1;var a=this.layer;return a===null?!0:a.allowSelect?(a=a.diagram,a===null?!0:!!a.allowSelect):!1};function Pf(a){return(a.G&32768)!==0}function Vv(a,y){a.G=y?a.G|32768:a.G&-32769}function Uv(a,y){a.G=y?a.G|65536:a.G&-65537}function wf(a){return(a.G&131072)!==0}Ae=xr.prototype,Ae.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}Ae.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Ae.N=function(){var a=this.diagram;a!==null&&!Tt(this)&&!Pf(this)&&this.isVisible()&&this.Ib.w()&&a.N(eg(this,this.Ib))},Ae.v=function(){ui.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Di&&this.labeledLink!==null&&uu(this.labeledLink),a.$b(!0))},Ae.Vo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},Ae.Wo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},Ae.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Ae.oz=function(){return Yv(this,this)};function Yv(a,y){var x=y.containingGroup;return x!==null?1+Yv(a,x):y instanceof Di&&(y=y.labeledLink,y!==null)?Yv(a,y):0}Ae.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof Di&&(x=y.labeledLink,x!==null)?j1(a,x):y}Ae.Td=function(a){return a instanceof po?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 Di&&(y=y.labeledLink,y!==null)?Xv(a,y,x):!1:!0}Ae.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof po&&h0(y,!0),y instanceof Di){var x=y.labeledLink;x!==null&&(y=x)}y=y.containingGroup}for(x=null,y=a;y!==null;){if(y.G&1048576){x=y;break}y instanceof Di&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof po&&h0(y,!1),y instanceof Di&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},xr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Di&&this.isLinkLabel)},xr.prototype.C=function(a){if(a===void 0&&(a=16777215),this.isLayoutPositioned&&a&this.layoutConditions){var y=this.layer;y!==null&&y.isTemporary||this instanceof Di&&this.isLinkLabel?y=!1:(y=this.diagram,y=!(y!==null&&y.undoManager.isUndoingRedoing))}else y=!1;if(y)if(y=this.Ah,y!==null){var x=y.layout;x!==null?x.C():y.C(a)}else a=this.diagram,a!==null&&(a=a.layout,a!==null&&a.C())};function 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 Di){if(x&&y instanceof po)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 fi)for(y=y.labelNodes;y.next();)Cf(a,y.value,x,E,b,z)}}Qe.Object.defineProperties(xr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?qr: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($a,"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!==ui.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,Tt(this)===!1&&(d0(this),x=this.pa,x.w())){var b=this.diagram;if(b===null||b.animationManager.isTicking||!b.undoManager.isUndoingRedoing){var z=x.copy();x.h(x.x+(y.x-E.x),x.y+(y.y-E.y)),O1(this,b,x,z.x,z.y),this.g("position",z,x.copy())}}y=!0}y&&this.g("location",E,a.copy())}}},category:{get:function(){return this.Tf},set:function(a){var y=this.Tf;if(y!==a){this.svg!==null&&(this.svg.remove(),this.Uc=!0);var x=this.diagram,E=this.data,b=null;if(x!==null&&E!==null&&!(this instanceof pa)){var z=x.model.undoManager;z.isEnabled&&!z.isUndoingRedoing&&(b=this.clone(),b.O.addAll(this.O))}this.Tf=a,this.g("category",y,a),x===null||E===null||this instanceof pa?this instanceof pa&&(b=this.adornedPart,b!==null&&(a=b.Qf,a!==null&&a.remove(y),b.bh(this.category,this))):(z=x.model,z.undoManager.isUndoingRedoing||(this.ph()?(x.partManager.setLinkCategoryForData(E,a),x=x.partManager.findLinkTemplateForCategory(a),x!==null&&(Zc(x),x=x.copy(),x!==null&&Kv(this,x,y,a))):(z!==null&&z.jm(E,a),x=hx(x.partManager,E,a),x!==null&&(Zc(x),x=x.copy(),x===null||x instanceof fi||(E=this.location.copy(),Kv(this,x,y,a),this.location.w()||(this.location=E)))),b!==null&&(y=this.clone(),y.O.addAll(this.O),this.g("self",b,y))))}}},self:{get:function(){return this},set:function(a){Kv(this,a,this.category,a.category)}},copyable:{get:function(){return(this.G&1)!==0},set:function(a){var y=(this.G&1)!==0;y!==a&&(this.G^=1,this.g("copyable",y,a))}},deletable:{get:function(){return(this.G&2)!==0},set:function(a){var y=(this.G&2)!==0;y!==a&&(this.G^=2,this.g("deletable",y,a))}},textEditable:{get:function(){return(this.G&4)!==0},set:function(a){var y=(this.G&4)!==0;y!==a&&(this.G^=4,this.g("textEditable",y,a),this.Wb())}},groupable:{get:function(){return(this.G&8)!==0},set:function(a){var y=(this.G&8)!==0;y!==a&&(this.G^=8,this.g("groupable",y,a))}},movable:{get:function(){return(this.G&16)!==0},set:function(a){var y=(this.G&16)!==0;y!==a&&(this.G^=16,this.g("movable",y,a))}},selectionAdorned:{get:function(){return(this.G&32)!==0},set:function(a){var y=(this.G&32)!==0;y!==a&&(this.G^=32,this.g("selectionAdorned",y,a),this.Wb())}},isInDocumentBounds:{get:function(){return(this.G&64)!==0},set:function(a){var y=(this.G&64)!==0;if(y!==a){this.G^=64;var x=this.diagram;x!==null&&x.Ya(),this.g("isInDocumentBounds",y,a)}}},isLayoutPositioned:{get:function(){return(this.G&128)!==0},set:function(a){var y=(this.G&128)!==0;y!==a&&(this.G^=128,this.g("isLayoutPositioned",y,a),this.C(a?4:8))}},selectable:{get:function(){return(this.G&256)!==0},set:function(a){var y=(this.G&256)!==0;y!==a&&(this.G^=256,this.g("selectable",y,a),this.Wb())}},reshapable:{get:function(){return(this.G&512)!==0},set:function(a){var y=(this.G&512)!==0;y!==a&&(this.G^=512,this.g("reshapable",y,a),this.Wb())}},resizable:{get:function(){return(this.G&1024)!==0},set:function(a){var y=(this.G&1024)!==0;y!==a&&(this.G^=1024,this.g("resizable",y,a),this.Wb())}},rotatable:{get:function(){return(this.G&2048)!==0},set:function(a){var y=(this.G&2048)!==0;y!==a&&(this.G^=2048,this.g("rotatable",y,a),this.Wb())}},isSelected:{get:function(){return(this.G&4096)!==0},set:function(a){var y=(this.G&4096)!==0;if(y!==a){var x=this.diagram;if(!a||this.canSelect()&&!(x!==null&&x.selection.count>=x.maxSelectionCount)){this.G^=4096;var E=!1;if(x!==null){E=x.skipsUndoManager,x.skipsUndoManager=!0;var b=x.selection;b.ka(),a?b.add(this):b.remove(this),b.freeze()}this.g("isSelected",y,a),this.Wb(),a=this.selectionChanged,a!==null&&a(this),x!==null&&(x.$b(),x.skipsUndoManager=E)}}}},isHighlighted:{get:function(){return(this.G&524288)!==0},set:function(a){var y=(this.G&524288)!==0;if(y!==a){this.G^=524288;var x=this.diagram;x!==null&&(x=x.highlighteds,x.ka(),a?x.add(this):x.remove(this),x.freeze()),this.g("isHighlighted",y,a),this.N(),a=this.highlightedChanged,a!==null&&a(this)}}},isShadowed:{get:function(){return(this.G&8192)!==0},set:function(a){var y=(this.G&8192)!==0;y!==a&&(this.G^=8192,this.Uc=!0,this.g("isShadowed",y,a),this.N())}},isAnimated:{get:function(){return(this.G&262144)!==0},set:function(a){var y=(this.G&262144)!==0;y!==a&&(this.G^=262144,this.g("isAnimated",y,a))}},highlightedChanged:{get:function(){return this.P!==null?this.P.oq:null},set:function(a){var y=this.highlightedChanged;y!==a&&(Zu(this),this.P.oq=a,this.g("highlightedChanged",y,a))}},selectionObjectName:{get:function(){return this.P!==null?this.P.vr:""},set:function(a){var y=this.selectionObjectName;y!==a&&(Zu(this),this.P.vr=a,this.Ug=null,this.g("selectionObjectName",y,a))}},selectionAdornmentTemplate:{get:function(){return this.P!==null?this.P.tr:null},set:function(a){var y=this.selectionAdornmentTemplate;y!==a&&(Zu(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof fi?(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:Fi},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&&Et("Cannot make a Group a member of itself: "+this.toString()),Et("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 po&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ey(a,this):this instanceof po&&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 po){for(x=new Un,Cf(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Di)for(E=E.linksConnected;E.next();)mp(E.value)}if(this instanceof Di){for(x=this.linksConnected;x.next();)mp(x.value);x=this.labeledLink,x!==null&&mp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&xc(y,-1,a))}}else Et("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 Di&&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:Ps},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))}}}),xr.prototype.invalidateLayout=xr.prototype.C,xr.prototype.findCommonContainingGroup=xr.prototype.px,xr.prototype.isMemberOf=xr.prototype.Td,xr.prototype.findTopLevelPart=xr.prototype.sz,xr.prototype.findSubGraphLevel=xr.prototype.oz,xr.prototype.ensureBounds=xr.prototype.Va,xr.prototype.getDocumentBounds=xr.prototype.mi,xr.prototype.findObject=xr.prototype.fb,xr.prototype.moveTo=xr.prototype.moveTo,xr.prototype.invalidateAdornments=xr.prototype.Wb,xr.prototype.clearAdornments=xr.prototype.Ej,xr.prototype.removeAdornment=xr.prototype.Jf,xr.prototype.addAdornment=xr.prototype.bh,xr.prototype.findAdornment=xr.prototype.Pj,xr.prototype.updateTargetBindings=xr.prototype.La;var Z1=!1;xr.className="Part",xr.LayoutNone=0,xr.LayoutAdded=1,xr.LayoutRemoved=2,xr.LayoutShown=4,xr.LayoutHidden=8,xr.LayoutNodeSized=16,xr.LayoutGroupLayout=32,xr.LayoutNodeReplaced=64,xr.LayoutStandard=127,xr.LayoutAll=16777215;function pa(a,y){a===void 0||a instanceof ll||typeof a=="string"?xr.call(this,a):(xr.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)}Wt(pa,xr),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 fi&&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||!Tt(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 ui){var re=b.Nl(function(oe){return oe instanceof Cu});re instanceof Cu&&this.$a===null&&(this.$a=re)}}else a===$a&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof ui&&this.$a.rg(E)&&(this.$a=null));xr.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 Di(a,y){a===void 0||a instanceof ll||typeof a=="string"?xr.call(this,a):(xr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Vn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Wt(Di,xr),Di.prototype.cloneProtected=function(a){xr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Ae=Di.prototype,Ae.Af=function(a){xr.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())}Ae.th=function(){xr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new Un),a.af.add(y))}function W1(a,y,x,E){if(y===null||a.af===null)return null;for(var b=a.af.iterator;b.next();){var z=b.value;if(z.Ds===a&&z.cv===y&&z.Ox===x&&z.Px===E||z.Ds===y&&z.cv===a&&z.Ox===E&&z.Px===x)return z}return null}Ae.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},Ae.gk=function(a,y,x,E,b,z,ne){a===xa&&y==="elements"?this.wc=null:a===$a&&y==="elements"&&(this.wc=null),xr.prototype.gk.call(this,a,y,x,E,b,z,ne)},Ae.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)}}Ae.si=function(){return!0},Di.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Di.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Di.prototype.isVisible=function(){if(!xr.prototype.isVisible.call(this))return!1;var a=!0,y=Ld,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===Ld){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Ks){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===Ch&&(a=a?this.Oo():this.Po(),0<a.count&&a.any(function(E){return!E.isTreeExpanded})))return!1;return a=this.labeledLink,a!==null?a.isVisible():!0},Di.prototype.Zb=function(a){xr.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)}},Di.prototype.qx=function(){var a=new Un,y=new Un;return $1(this,this,a,y),y.iterator};function $1(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(ne){ne.isTreeLink?(b?ne.fromNode===y:ne.toNode===y)&&$1(a,b?ne.toNode:ne.fromNode,x,E):E.add(ne)})}}Di.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new Ir(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Ae=Di.prototype,Ae.Mo=function(a){a===void 0&&(a=null);var y=new Ir(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Ae.Sd=function(a){a===void 0&&(a=null);var y=new Ir(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Ae.Mu=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode===this?(a===null||b.fromPortId===a)&&(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Un,y.add(x),y.add(b)):x=b):b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Un,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Zr(x):qr},Ae.Po=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.fromNode!==this||a!==null&&b.fromPortId!==a||(b=b.toNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Un,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Zr(x):qr},Ae.Oo=function(a){a===void 0&&(a=null);for(var y=null,x=null,E=this.jb.iterator;E.next();){var b=E.value;b.toNode!==this||a!==null&&b.toPortId!==a||(b=b.fromNode,y!==null?y.add(b):x!==null&&x!==b?(y=new Un,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Zr(x):qr},Ae.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Ir(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},Ae.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new Ir(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}}}Di.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Ae=Di.prototype,Ae.Vo=function(a){xr.prototype.Vo.call(this,a),a||(Qp(this),a=this.Yk,a!==null&&ex(a,this))},Ae.Wo=function(a){xr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Ae.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,xr.prototype.Lj.call(this)},Ae.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;K1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function K1(a){a.wc===null?a.wc=new $i:a.wc.clear(),a.qm(a,function(y,x){V1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function V1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Qv(a,y,x){var E=y.portId;if(E!==null&&(a.wc!==null&&a.wc.remove(E),y=a.diagram,y!==null&&x)){for(x=null,a=a.findLinksConnected(E);a.next();)E=a.value,x===null&&(x=Si()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);ki(x)}}}Ae.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},Ae.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}},Ae.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},Ae.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},Ae.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Di)return a;a=this.diagram,a=a!==null?a.isTreePathToChildren:!0;for(var y=this.jb.iterator;y.next();){var x=y.value;if(x.isTreeLink&&(x=a?x.fromNode:x.toNode,x!==this))return this.ci=x}return this.ci=null},Ae.vz=function(){function a(x,E){E.add(x);var b=x.kh();b!==null&&(E.add(b),x=x.pg(),x!==null&&a(x,E))}var y=new Un;return a(this,y),y},Ae.uz=function(){return U1(this,this)};function U1(a,y){return y=y.pg(),y===null?0:1+U1(a,y)}Ae.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new Ir(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},Ae.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 Vn,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 Vn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Zr(x):qr},Ae.wz=function(a){a===void 0&&(a=1/0);var y=new Un;return Cf(y,this,!1,a,!0),y},Di.prototype.collapseTree=function(a){a===void 0&&(a=1),1>a&&(a=1);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Un;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ld),y.Ue=!1}};function Y1(a,y,x,E,b,z,ne){if(1<E)for(var re=x?a.Mo():a.Sd();re.next();){var oe=re.value;oe.isTreeLink&&(oe=oe.To(a),oe===null||oe===a||y.contains(oe)||(y.add(oe),Y1(oe,y,x,E-1,b,z,ne)))}else X1(a,y,x,b,z,ne)}function X1(a,y,x,E,b,z){for(var ne=b===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var ue=re.value;if(ue.isTreeLink&&(ue=ue.To(a),ue!==null&&ue!==a)){var ce=y.contains(ue);if(ce||y.add(ue),ne){var me=x?ue.Oo():ue.Po();oe.uv=a,me.all(function(we){return function(Fe){return Fe===we.uv||!Fe.isTreeExpanded}}(oe))&&E.Aj(ue,b),ue.oh(),ue.Zb(!1)}ue.isTreeExpanded&&(ue.wasTreeExpanded=ue.isTreeExpanded,ce||X1(ue,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}Di.prototype.expandTree=function(a){a===void 0&&(a=2),2>a&&(a=2);var y=this.diagram;if(y!==null&&!y.Ue){y.Ue=!0;var x=new Un;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===Ld),y.Ue=!1}};function J1(a,y,x,E,b,z,ne){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),ue={};oe.next();){var ce=oe.value;if(ce.isTreeLink&&(re||ce.fd||ce.bb(),ce=ce.To(a),ce!==null&&ce!==a&&!y.contains(ce))){if(y.add(ce),!re){ce.Zb(!0),ce.oh();var me=x?ce.Oo():ce.Po();ue.vv=a,me.all(function(we){return function(Fe){return Fe===we.vv||!Fe.isTreeExpanded}}(ue))&&b.Cj(ce,z)}(2<E||ce.wasTreeExpanded)&&(ce.wasTreeExpanded=!1,J1(ce,y,x,E-1,b,z,ne))}ue={vv:ue.vv}}a.isTreeExpanded=!0}Qe.Object.defineProperties(Di.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 hr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),Uh(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Sh(x,this),this.g("avoidableMargin",y,a)}}},linksConnected:{get:function(){return this.jb.iterator}},linkConnected:{get:function(){return this.Ba!==null?this.Ba.Dq:null},set:function(a){var y=this.linkConnected;y!==a&&(Uh(this),this.Ba.Dq=a,this.g("linkConnected",y,a))}},linkDisconnected:{get:function(){return this.Ba!==null?this.Ba.Eq:null},set:function(a){var y=this.linkDisconnected;y!==a&&(Uh(this),this.Ba.Eq=a,this.g("linkDisconnected",y,a))}},linkValidation:{get:function(){return this.Ba!==null?this.Ba.gj:null},set:function(a){var y=this.linkValidation;y!==a&&(Uh(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var ne=z.wa(E);ne!==void 0&&z.Qx(b,ne)}}this.containingGroup=null}this.Yk=a,a!==null&&(ex(a,this),x===null||E===null||x.undoManager.isUndoingRedoing||(b=a.data,x=x.model,b!==null&&x.ri()&&(E=x.wa(E),E!==void 0&&x.Bu(b,E))),this.containingGroup=a.containingGroup),uu(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&K1(this),this.wc.iteratorValues}},isTreeExpanded:{get:function(){return(this.U&1)!==0},set:function(a){var y=(this.U&1)!==0;if(y!==a){this.U^=1;var x=this.diagram;if(this.g("isTreeExpanded",y,a),y=this.treeExpandedChanged,y!==null){var E=!0;x!==null&&(E=x.aa,x.aa=!0),y(this),x!==null&&(x.aa=E)}x!==null&&x.undoManager.isUndoingRedoing?this.Zb(a):a?this.expandTree():this.collapseTree()}}},wasTreeExpanded:{get:function(){return(this.U&2)!==0},set:function(a){var y=(this.U&2)!==0;y!==a&&(this.U^=2,this.g("wasTreeExpanded",y,a))}},treeExpandedChanged:{get:function(){return this.Ba!==null?this.Ba.Vr:null},set:function(a){var y=this.treeExpandedChanged;y!==a&&(Uh(this),this.Ba.Vr=a,this.g("treeExpandedChanged",y,a))}},isTreeLeaf:{get:function(){return(this.U&4)!==0},set:function(a){var y=(this.U&4)!==0;y!==a&&(this.U^=4,this.g("isTreeLeaf",y,a))}}}),Di.prototype.expandTree=Di.prototype.expandTree,Di.prototype.collapseTree=Di.prototype.collapseTree,Di.prototype.findTreeParts=Di.prototype.wz,Di.prototype.findTreeChildrenNodes=Di.prototype.Ou,Di.prototype.findTreeChildrenLinks=Di.prototype.Qo,Di.prototype.findTreeLevel=Di.prototype.uz,Di.prototype.findTreeParentChain=Di.prototype.vz,Di.prototype.findTreeParentNode=Di.prototype.pg,Di.prototype.findTreeParentLink=Di.prototype.kh,Di.prototype.findCommonTreeParent=Di.prototype.gz,Di.prototype.findTreeRoot=Di.prototype.xz,Di.prototype.isInTreeOf=Di.prototype.Nz,Di.prototype.findPort=Di.prototype.ns,Di.prototype.findLinksTo=Di.prototype.kz,Di.prototype.findLinksBetween=Di.prototype.jz,Di.prototype.findNodesInto=Di.prototype.Oo,Di.prototype.findNodesOutOf=Di.prototype.Po,Di.prototype.findNodesConnected=Di.prototype.Mu,Di.prototype.findLinksInto=Di.prototype.Sd,Di.prototype.findLinksOutOf=Di.prototype.Mo,Di.prototype.findExternalTreeLinksConnected=Di.prototype.qx,Di.prototype.invalidateConnectedLinks=Di.prototype.Bd,Di.prototype.invalidateLinkBundle=Di.prototype.Lz;var ES=new wn(Di,"SpreadingNone",10),p0=new wn(Di,"SpreadingEvenly",11),qv=new wn(Di,"SpreadingPacked",12);Di.className="Node",Di.SpreadingNone=ES,Di.SpreadingEvenly=p0,Di.SpreadingPacked=qv;function po(a,y){a===void 0||a instanceof ll||typeof a=="string"?Di.call(this,a):(Di.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Un,this.$a=null,this.Sc=new vs,this.Sc.group=this,this.gl=new Un,this.tb=this.$p=null,y&&Object.assign(this,y)}Wt(po,Di),po.prototype.cloneProtected=function(a){Di.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())},Ae=po.prototype,Ae.Af=function(a){Di.prototype.Af.call(this,a);var y=a.Rj();for(a=a.memberParts;a.next();){var x=a.value;if(x.v(),x.C(8),x.Ej(),x instanceof Di)x.Bd(y);else if(x instanceof fi)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Ae.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&&Et("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof ui){var re=b.Nl(function(oe){return oe instanceof Cu});re instanceof Cu&&(this.$a===null?this.$a=re:this.$a!==re&&Et("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===$a&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof ui&&this.$a.rg(E)&&(this.$a=null));Di.prototype.gk.call(this,a,y,x,E,b,z,ne)},Ae.Xl=function(a,y){Di.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==ui.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof ui&&(a=a.Pb()),this.tb===null&&(this.tb=new Bn),a.mi(this.tb),a instanceof Co&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Ae.eh=function(a,y,x,E){this.nf=this.$a,Di.prototype.eh.call(this,a,y,x,E)},Ae.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof fi||y.Va()}),Di.prototype.Va.call(this)},Ae.si=function(){if(!Di.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Di){if(y.isVisible()&&Tt(y))return!1}else if(y instanceof fi&&y.isVisible()&&Tt(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ey(a,y){if(a.Gn.add(y)){y instanceof po&&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 fi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ty(a,y){if(a.Gn.remove(y)){y instanceof po&&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 fi&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Ae.Lj=function(){if(0<this.Gn.count){var a=this.diagram;if(a!==null)for(var y=this.Gn.copy().iterator;y.next();)a.remove(y.value)}Di.prototype.Lj.call(this)},po.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Mn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},po.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Mn(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},po.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))},Ae=po.prototype,Ae.Bd=function(a){var y=(this.U&65536)!==0;if(Di.prototype.Bd.call(this,a),!y)for(!(this.U&65536)&&(this.U=this.U^65536),y=this.Lu();y.next();){var x=y.value;if(a===void 0||!a.contains(x)){var 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()))}}},Ae.Lu=function(){var a=this.diagram!==null&&this.diagram.Pw;if(a&&this.$p!==null)return this.$p.iterator;var y=this.Rj();y.add(this);for(var x=new Un,E=y.iterator;E.next();){var b=E.value;if(b instanceof Di)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Ae.iz=function(){var a=this.Rj();a.add(this);for(var y=new Un,x=a.iterator;x.next();){var E=x.value;if(E instanceof Di)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},Ae.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Un;return a(this,y),y},Ae.Rj=function(){var a=new Un;return Cf(a,this,!0,0,!0),a.remove(this),a},Ae.Zb=function(a){Di.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},po.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 po&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,Q1(z,y,x,E)),z instanceof Di)z.Bd(y),x.Aj(z,E);else if(z instanceof fi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}po.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 po&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,q1(z,y,x,E)),z instanceof Di)z.Bd(y),x.Cj(z,E);else if(z instanceof fi)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}po.prototype.move=function(a,y){y===void 0&&(y=!1);var x=y?this.location:this.position,E=x.x;x=x.y;var b=a.x,z=a.y;if(!(E===b||isNaN(E)&&isNaN(b))||!(x===z||isNaN(x)&&isNaN(z))){for(E=b-(isNaN(E)?0:E),x=z-(isNaN(x)?0:x),z=st.alloc(),Di.prototype.move.call(this,a,y),a=new Un,y=this.Rj().iterator;y.next();)b=y.value,b instanceof fi&&(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 Di&&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 fi&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(ne=b.position,z.x=ne.x+E,z.y=ne.y+x,z.w()?b.move(z):b.bb(),iy(b)&&b.bb());st.free(z)}},Qe.Object.defineProperties(po.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&&Et("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)}}}),po.prototype.expandSubGraph=po.prototype.expandSubGraph,po.prototype.collapseSubGraph=po.prototype.collapseSubGraph,po.prototype.findSubGraphParts=po.prototype.Rj,po.prototype.findContainingGroupChain=po.prototype.hz,po.prototype.findExternalNodesConnected=po.prototype.iz,po.prototype.findExternalLinksConnected=po.prototype.Lu,po.prototype.ensureBounds=po.prototype.Va,po.className="Group";function Cu(a){Vt.call(this),this.yb=sl,this.ko=new Bn(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Wt(Cu,Vt),Cu.prototype.cloneProtected=function(a){Vt.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 po||a instanceof pa)||Et("Placeholder is not inside a Group or Adornment."),a instanceof po){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(ys(E,(isFinite(x.width)?Math.max(x.width,y.width):y.width)||0,(isFinite(x.height)?Math.max(x.height,y.height):y.height)||0),this.Ge(0,0,E.width,E.height),E=a.memberParts,x=!1;E.next();)if(E.value.isVisible()){x=!0;break}E=a.diagram,!x||E===null||E.animationManager.Xu(a)||isNaN(y.x)||isNaN(y.y)||(x=st.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),st.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var ne=0;z instanceof Co&&(ne=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,ue=(oe.width+ne)*re;ne=(oe.height+ne)*re,a.type!==ui.Link&&(re=z.ga(a.category==="Selection"?Us:a.locationSpot,st.alloc()),a.location=re,st.free(re)),isNaN(ue)||isNaN(ne)?(a=z.ga(Us,st.alloc()),ue=Bn.allocAt(a.x,a.y,0,0),ue.Ye(z.ga(Ln,a)),ue.Ye(z.ga(kl,a)),ue.Ye(z.ga(zl,a)),ys(y,ue.width+E||0,ue.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),st.free(a),Bn.free(ue)):(ys(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 po&&!y.layer.isTemporary&&y.computesBoundsAfterDrag&&this.ko.w()){var b=x.toolManager.findTool("Dragging");if(b===x.currentTool&&(x=b.computeBorder(y,this.ko,a),x!==null))return x}x=Bn.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof po&&!y.isSubGraphExpanded?a.h(b.x-z.left,b.y-z.top,0,0):a.h(b.x-z.left,b.y-z.top,Math.max(b.width+z.left+z.right,0),Math.max(b.height+z.top+z.bottom,0)),Bn.free(x),E&&y instanceof po&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Cu.prototype.computeMemberBounds=function(a){if(!(this.part instanceof po))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 fi&&(!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 hr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Cu.className="Placeholder";function fi(a){xr.call(this,ui.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 Vn().freeze(),this.Tg=this.Mg=null,this.ml=new Bn,this.ua=new qt,this.u=this.o=this.Sf=this.Wf=null,this.su=new st,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Wt(fi,xr),fi.prototype.cloneProtected=function(a){xr.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())},Ae=fi.prototype,Ae.Af=function(a){xr.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)},Ae.qb=function(a){a.classType===fi?(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&&Et("Unknown Link enum value for a Link property: "+a):xr.prototype.qb.call(this,a)},Ae.Xc=function(){this.ba===null&&(this.ba=new yo)},Ae.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Tt(a)||Pf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Tt(a)||Pf(a)))},Ae.zv=function(){return!1},Ae.Av=function(){},Ae.Zc=function(){return!1},fi.prototype.computeAngle=function(a,y,x){return fi.computeAngle(y,x)},fi.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=nt.bp(y),90<a&&270>a&&(a-=180);break;case om:a=nt.bp(y+90),90<a&&270>a&&(a-=180);break;case am:a=nt.bp(y-90),90<a&&270>a&&(a-=180);break;case E0:if(a=nt.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return nt.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}Ae=fi.prototype,Ae.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&xr.prototype.oh.call(this)},Ae.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ae.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function ex(a,y){a.wd===null&&(a.wd=new Un),a.wd.add(y),a.v()}Ae.Vo=function(a){if(xr.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)}},Ae.Wo=function(a){if(xr.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)}},Ae.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))},fi.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},fi.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?xr.prototype.move.call(this,a,!1):(a=st.allocAt(x.x+E,x.y+b),xr.prototype.move.call(this,a,!1),st.free(a)),Yh(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},fi.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},fi.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},fi.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Ha),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 nt.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),nt.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},fi.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),nt.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)},Ae=fi.prototype,Ae.i=function(a){return this.Nb.s[a]},Ae.dd=function(a,y){this.Nb.cd(a,y)},Ae.L=function(a,y,x){this.Nb.cd(a,new st(y,x))},Ae.Kz=function(a,y){this.Nb.Gb(a,y)},Ae.m=function(a,y,x){this.Nb.Gb(a,new st(y,x))},Ae.ne=function(a){this.Nb.add(a)},Ae.yf=function(a,y){this.Nb.add(new st(a,y))},Ae.pv=function(a){this.Nb.mb(a)},Ae.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 Vn,z=a.Nb.iterator;z.next();){var ne=z.value;b.add(new st(ne.x+y,ne.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,ne=a.diagram,isNaN(y)||isNaN(x)||ne!==null&&ne.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),uu(a)),E?m0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ne!==null&&ne.animationManager.zb&&ns(ne.animationManager,a,b),a.g("points",z,b)}}Ae.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ae.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,ne=0;ne<z;ne++){var re=b[ne];x=Math.min(re.x,x),E=Math.min(re.y,E)}re=ne=1/0;for(var oe=y.s,ue=oe.length,ce=0;ce<ue;ce++){var me=oe[ce];ne=Math.min(me.x,ne),re=Math.min(me.y,re),me.freeze()}if(y.freeze(),ue===z){for(z=0;z<ue;z++)if(ce=b[z],me=oe[z],ce.x-x!==me.x-ne||ce.y-E!==me.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ns(x.animationManager,this,y),m0(this),this.g("points",a,y)}},Ae.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))}Ae.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())}},Ae.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()}}},fi.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(kg||(kg=new Di,kg.desiredSize=oo,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 Di,Tg.desiredSize=oo,Tg.Va()),this.defaultToPoint&&(Tg.location=this.defaultToPoint,Tg.Va(),b=E=Tg)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,ne=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var re=vp(ne),oe=vp(x),ue=y===b&&y!==null,ce=this.isOrthogonal,me=this.curve===Ec;this.Wf=ue&&!ce?me=!0:!1;var we=this.computeAdjusting()===Eu||ue;if(!ce&&!ue&&re&&oe){if(re=!1,!we&&3<=z&&(we=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=this.adjustPoints(0,we,z-1,oe))&&(we=this.getLinkPoint(a,y,ne,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,we,z-1,oe)),!re)if(this.Fj(),me){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(),me=ce=0;var Fe=z.x+re/3,De=z.y+oe/3,_e=Fe,pt=De;nt.B(oe,0)?pt=0<re?pt-ue:pt+ue:(ce=-re/oe,me=Math.sqrt(ue*ue/(ce*ce+1)),0>ue&&(me=-me),_e=(0>oe?-1:1)*me+Fe,pt=ce*(_e-Fe)+De),Fe=z.x+2*re/3,De=z.y+2*oe/3;var rt=Fe,bt=De;nt.B(oe,0)?bt=0<re?bt-ue:bt+ue:(rt=(0>oe?-1:1)*me+Fe,bt=ce*(rt-Fe)+De),this.Fj(),this.ne(z),this.yf(_e,pt),this.yf(rt,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,nt.B(x,0)?re=0<we?re-ne:re+ne:(we=-we/x,z=Math.sqrt(ne*ne/(we*we+1)),0>ne&&(z=-z),z=(0>x?-1:1)*z+a,re=we*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=Bn.alloc(),y.mi(re),oe=re.ca(b),we.mi(re),ue=re.ca(E),(oe||ue)&&(ne=y.ga(y0(ne),new st),this.dd(0,this.getLinkPointFromPoint(a,y,ne,b,!0,ne)),x=we.ga(y0(x),new st),this.dd(1,this.getLinkPointFromPoint(z,we,x,E,!1,x))),Bn.free(re))}else{me=this.isAvoiding,we&&(ce&&me||ue)&&this.Fj();var It=ue?this.computeCurviness():0;me=this.getLinkPoint(a,y,ne,!0,ce,E,b),Fe=_e=De=0,(ce||!re||ue)&&(pt=this.computeEndSegmentLength(a,y,ne,!0),Fe=this.getLinkDirection(a,y,me,ne,!0,ce,E,b),ue&&(re||ne.D(x)||!ce&&ne.x+x.x===1&&ne.y+x.y===1)&&(Fe-=ce?90:30,0>It&&(Fe-=180)),0>Fe?Fe+=360:360<=Fe&&(Fe-=360),ue&&(pt+=Math.abs(It)*(ce?1:2)),Fe===0?De=pt:Fe===90?_e=pt:Fe===180?De=-pt:Fe===270?_e=-pt:(De=pt*Math.cos(Fe*Math.PI/180),_e=pt*Math.sin(Fe*Math.PI/180)),ne.Mc()&&ue&&(pt=y.ga(Oo,st.alloc()),rt=st.allocAt(pt.x+1e3*De,pt.y+1e3*_e),this.getLinkPointFromPoint(a,y,pt,rt,!0,me),st.free(pt),st.free(rt))),pt=this.getLinkPoint(E,b,x,!1,ce,a,y);var Rt=bt=rt=0;if(ce||!oe||ue){var Kt=this.computeEndSegmentLength(E,b,x,!1);Rt=this.getLinkDirection(E,b,pt,x,!1,ce,a,y),ue&&(oe||ne.D(x)||!ce&&ne.x+x.x===1&&ne.y+x.y===1)&&(Rt+=ce?0:30,0>It&&(Rt+=180)),0>Rt?Rt+=360:360<=Rt&&(Rt-=360),ue&&(Kt+=Math.abs(It)*(ce?1:2)),Rt===0?rt=Kt:Rt===90?bt=Kt:Rt===180?rt=-Kt:Rt===270?bt=-Kt:(rt=Kt*Math.cos(Rt*Math.PI/180),bt=Kt*Math.sin(Rt*Math.PI/180)),x.Mc()&&ue&&(x=b.ga(Oo,st.alloc()),ne=st.allocAt(x.x+1e3*rt,x.y+1e3*bt),this.getLinkPointFromPoint(E,b,x,ne,!1,pt),st.free(x),st.free(ne))}x=me,(ce||!re||ue)&&(x=new st(me.x+De,me.y+_e)),ne=pt,(ce||!oe||ue)&&(ne=new st(pt.x+rt,pt.y+bt)),!we&&!ce&&re&&3<z&&this.adjustPoints(0,me,z-2,ne)?this.dd(z-1,pt):!we&&!ce&&oe&&3<z&&this.adjustPoints(1,x,z-1,pt)?this.dd(0,me):!we&&(ce?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ne)?(this.dd(0,me),this.dd(z-1,pt)):(this.Fj(),this.ne(me),(ce||!re||ue)&&this.ne(x),ce&&this.addOrthoPoints(x,Fe,ne,Rt,a,E),(ce||!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}fi.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new st),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var ne=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),ne=a.m22*b;var re=-a.m12*b,oe=-a.m21*b,ue=a.m11*b,ce=b*(a.m21*a.dy-a.m22*a.dx),me=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*ne+E.y*oe+ce,E=E.x*re+E.y*ue+me,ne=x.x*ne+x.y*oe+ce,x=x.x*re+x.y*ue+me}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)}fi.prototype.getLinkPoint=function(a,y,x,E,b,z,ne,re){if(re===void 0&&(re=new st),x.sb()&&!vp(x))return y.ga(x,re),re;if(x.$c()){var oe=v0(this,y);if(oe!==null){if(re.assign(oe.Zo),b&&this.routing===nx){var ue=v0(this,ne);if(ue!==null&&oe.Gl<ue.Gl){oe=st.alloc(),ue=st.alloc();var ce=new Bn(y.ga(Us,oe),y.ga(Ln,ue)),me=this.computeSpot(!E,ne);a=this.getLinkPoint(z,ne,me,!E,b,a,y,ue),(x.Hf(Ji)||x.Hf(Gi))&&a.y>=ce.y&&a.y<=ce.y+ce.height?re.y=a.y:(x.Hf(ai)||x.Hf(Ti))&&a.x>=ce.x&&a.x<=ce.x+ce.width&&(re.x=a.x),st.free(oe),st.free(ue)}}return re}}return x=y.ga(y0(x),st.alloc()),this.pointsCount>(b?6:2)?(ne=E?this.i(1):this.i(this.pointsCount-2),b&&(ne=ny(x,ne.copy()))):(oe=this.computeSpot(!E,ne),z=st.alloc(),ne=ne.ga(y0(oe),z),b&&(ne=ny(x,ne)),st.free(z)),this.getLinkPointFromPoint(a,y,x,ne,E,re),st.free(x),re},fi.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,st.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=st.alloc(),re=re.ga(Oo,x),st.free(x)),x=Math.abs(re.x-oe.x)>Math.abs(re.y-oe.y)?re.x>=oe.x?0:180:re.y>=oe.y?90:270,st.free(oe),oe=x}return E.Mc()&&ne.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),vp(E)||(a=y.li(),a===0)||(45<=a&&135>a?oe+=90:135<=a&&225>a?oe+=180:225<=a&&315>a&&(oe+=270),360<=oe&&(oe-=360)),oe},fi.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)},fi.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===Fi?ws:y)):(a=y||this.toPort,a===null?a=Oo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Fi?ws:y)),a};function vp(a){return a===ws||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:Oo}fi.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Eu&&4<this.pointsCount?this.computeMidPoint(new st):(a=y.Zn,a=a!==null?lx(a,this):null,a!==null?a.Zo:y.ga(Oo))},fi.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},fi.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=Yt.alloc(),ne.reset()),ne.multiply(this.transform),this.fh(a,ne))return Fv(this,y,x,b),z===void 0&&Yt.free(ne),!0;if(this.Yc(a,ne)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,ue=oe.length;ue--;){var ce=oe[ue];if(ce.visible||ce===this.locationObject){var me=ce.actualBounds,we=this.naturalBounds;if(!(me.x>we.width||me.y>we.height||0>me.x+me.width||0>me.y+me.height)){if(me=Yt.alloc(),me.set(ne),ce instanceof ui)re=ce.Cf(a,y,x,E,b,me);else if(this.path===ce){if(ce instanceof Co)if(re=a,we=E,ce.pickable===!1)re=!1;else if(me.multiply(ce.transform),we)e:{var Fe=re,De=me;if(ce.fh(Fe,De))re=!0;else{if(De===void 0&&(De=ce.transform,Fe.Re(ce.actualBounds))){re=!0;break e}re=Fe.left,we=Fe.right;var _e=Fe.top;Fe=Fe.bottom;var pt=st.alloc(),rt=st.alloc(),bt=st.alloc(),It=Yt.alloc();It.set(De),It.bv(ce.transform),It.Vj(),rt.x=we,rt.y=_e,rt.transform(It),pt.x=re,pt.y=_e,pt.transform(It),De=!1,qf(ce,pt,rt,bt)?De=!0:(pt.x=we,pt.y=Fe,pt.transform(It),qf(ce,pt,rt,bt)?De=!0:(rt.x=re,rt.y=Fe,rt.transform(It),qf(ce,pt,rt,bt)?De=!0:(pt.x=re,pt.y=_e,pt.transform(It),qf(ce,pt,rt,bt)&&(De=!0)))),Yt.free(It),st.free(pt),st.free(rt),st.free(bt),re=De}}else re=ce.fh(re,me)}else re=rl(ce,a,E,me);re&&(we=ce,y!==null&&(we=y(ce)),we&&(x===null||x(we))&&b.add(we)),Yt.free(me)}}}return z===void 0&&Yt.free(ne),re||this.background!==null||this.areaBackground!==null}return z===void 0&&Yt.free(ne),!1},fi.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},fi.prototype.computeCorner=function(){if(this.curve===Ec)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},fi.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},fi.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},fi.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Eu&&x.bb()}},fi.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=ix;var y=this.Sf;if(y!==null){for(var x=Si(),E=0,b=y.links,z=0;z<b.length;z++){var ne=b[z].computeSpacing();x.push(ne),E+=ne}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),ki(x)}}return a},fi.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},fi.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},fi.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(!nt.$(ue,0)){if(nt.$(re,0))var ce=0>oe?-Math.PI/2:Math.PI/2;else ce=Math.atan(oe/Math.abs(re)),0>re&&(ce=Math.PI-ce);ne=y.x;var me=y.y;re=E.x-ne;var we=E.y-me;for(oe=Math.sqrt(re*re+we*we),nt.$(re,0)?we=0>we?-Math.PI/2:Math.PI/2:(we=Math.atan(we/Math.abs(re)),0>re&&(we=Math.PI-we)),ue=oe/ue,ce=we-ce,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-b,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),nt.$(y,0)||(nt.$(re,0)?oe=0>oe?-Math.PI/2:Math.PI/2:(oe=Math.atan(oe/Math.abs(re)),0>re&&(oe=Math.PI-oe)),re=oe+ce,y*=ue,this.L(a,ne+y*Math.cos(re),me+y*Math.sin(re)));this.dd(x,E)}}return!0;case w0:if(z=this.i(a),me=this.i(x),!z.Xa(y)||!me.Xa(E)){b=z.x,z=z.y,ne=me.x,me=me.y,ue=(ne-b)*(ne-b)+(me-z)*(me-z),re=y.x,ce=y.y,oe=E.x,we=E.y;var Fe=1;if(oe-re!==0){var De=(we-ce)/(oe-re);Fe=Math.sqrt(1+1/(De*De))}else De=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var _e=y.x,pt=y.y,rt=.5;ue!==0&&(rt=((b-_e)*(b-ne)+(z-pt)*(z-me))/ue);var bt=b+rt*(ne-b),It=z+rt*(me-z);y=Math.sqrt((_e-bt)*(_e-bt)+(pt-It)*(pt-It)),pt<De*(_e-bt)+It&&(y=-y),0<De&&(y=-y),_e=re+rt*(oe-re),rt=ce+rt*(we-ce),De!==0?(y=_e+y/Fe,this.L(a,y,rt-(y-_e)/De)):this.L(a,_e,rt+y)}this.dd(x,E)}return!0;case tm:e:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),ne=this.i(a+2),re=z.x,ce=z.y,me=re,ue=ce,nt.B(b.y,z.y)?nt.B(z.x,ne.x)?ce=y.y:nt.B(z.y,ne.y)&&(re=y.x):nt.B(b.x,z.x)&&(nt.B(z.y,ne.y)?re=y.x:nt.B(z.x,ne.x)&&(ce=y.y)),this.L(a+1,re,ce),b=this.i(x),z=this.i(x-1),ne=this.i(x-2),re=z.x,ce=z.y,oe=re,we=ce,nt.B(b.y,z.y)?nt.B(z.x,ne.x)?ce=E.y:nt.B(z.y,ne.y)&&(re=E.x):nt.B(b.x,z.x)&&(nt.B(z.y,ne.y)?re=E.x:nt.B(z.x,ne.x)&&(ce=E.y)),this.L(x-1,re,ce),iy(this))){this.L(a+1,me,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}},fi.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var ne=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var re=b.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(sm,sm),oe.Bc(sm,sm),re.Ye(a),oe.Ye(x);var ue=st.alloc(),ce=st.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&oe.right>a.x||E===90&&x.y>a.y&&oe.right>a.x?(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),E===180?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=ue.x,ce.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(ue.x=a.x<oe.left?this.computeMidOrthoPosition(a.x,a.y,oe.left,x.y,!1):a.x<oe.right&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.right,ce.x=ue.x,ce.y=x.y):E===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(ue.x=a.x,ue.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ce.y=ue.y)):(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===180&&(oe.ca(a)||re.ca(x))?ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?ue.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===180||E===270)&&(ue.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ce.x=x.x,ce.y=ue.y),ue.y>re.top&&ue.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(E===90||E===270)&&(ue.h(Math.max((a.x+x.x)/2,a.x),a.y),ce.h(ue.x,x.y)):(ue.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===0?re.bottom:Math.max(re.bottom,oe.bottom)),ce.x=x.x,ce.y=ue.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&oe.left<a.x||E===90&&x.y>a.y&&oe.left<a.x?(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),E===0?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ce.x=ue.x,ce.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(ue.x=a.x>oe.right?this.computeMidOrthoPosition(a.x,a.y,oe.right,x.y,!1):a.x>oe.left&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.left,ce.x=ue.x,ce.y=x.y):E===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(ue.x=a.x,ue.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),ce.y=ue.y)):(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===0&&(oe.ca(a)||re.ca(x))?ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?ue.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===0||E===270)&&(ue.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),ce.x=x.x,ce.y=ue.y),ue.y>re.top&&ue.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(E===90||E===270)&&(ue.h(Math.min((a.x+x.x)/2,a.x),a.y),ce.h(ue.x,x.y)):(ue.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===180?re.bottom:Math.max(re.bottom,oe.bottom)),ce.x=x.x,ce.y=ue.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&oe.bottom>a.y||E===0&&x.x>a.x&&oe.bottom>a.y?(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),E===270?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=ue.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(ue.y=a.y<oe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.top,!0):a.y<oe.bottom&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.bottom,ce.x=x.x,ce.y=ue.y):E===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(ue.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),ue.y=a.y,ce.x=ue.x)):(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===270&&(oe.ca(a)||re.ca(x))?ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?ue.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(ue.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ce.x=ue.x,ce.y=x.y),ue.x>re.left&&ue.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(E===0||E===180)&&(ue.h(a.x,Math.max((a.y+x.y)/2,a.y)),ce.h(x.x,ue.y)):(ue.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===90?re.right:Math.max(re.right,oe.right)),ce.x=ue.x,ce.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&oe.top<a.y||E===0&&x.x>a.x&&oe.top<a.y?(ue.h(a.x,x.y),ce.h((a.x+x.x)/2,x.y),E===90?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ce.x=x.x,ce.y=ue.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(ue.y=a.y>oe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.bottom,!0):a.y>oe.top&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.top,ce.x=x.x,ce.y=ue.y):E===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(ue.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),ue.y=a.y,ce.x=ue.x)):(ue.h(x.x,a.y),ce.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===90&&(oe.ca(a)||re.ca(x))?ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?ue.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(ue.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),ce.x=ue.x,ce.y=x.y),ue.x>re.left&&ue.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(E===0||E===180)&&(ue.h(a.x,Math.min((a.y+x.y)/2,a.y)),ce.h(x.x,ue.y)):(ue.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===270?re.right:Math.max(re.right,oe.right)),ce.x=ue.x,ce.y=x.y)));var me=x;if(this.isAvoiding){var we=this.diagram;if(we===null||b===z||this.layer.isTemporary||!Kf(we)||re.ca(me)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var Fe=gf(we,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Fe.Yj(Math.min(a.x,ue.x),Math.min(a.y,ue.y),Math.abs(a.x-ue.x),Math.abs(a.y-ue.y))&&Fe.Yj(Math.min(ue.x,ce.x),Math.min(ue.y,ce.y),Math.abs(ue.x-ce.x),Math.abs(ue.y-ce.y))&&Fe.Yj(Math.min(ce.x,me.x),Math.min(ce.y,me.y),Math.abs(ce.x-me.x),Math.abs(ce.y-me.y)))y=!1;else{b=a,z=me;var De=x=null;if(we.isVirtualized){we=Fe.bounds.copy(),we.Bc(-Fe.Ho,-Fe.Go);var _e=st.alloc();xp(Fe,a.x,a.y)||(nt.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)):nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,ce.x,ce.y,_e)?(x=a=_e.copy(),y=_e.ab(ce)):nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ce.x,ce.y,me.x,me.y,_e)&&(x=a=_e.copy(),y=_e.ab(me))),xp(Fe,me.x,me.y)||(nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,me.x,me.y,ce.x,ce.y,_e)?(De=me=_e.copy(),E=ce.ab(_e)):nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ce.x,ce.y,ue.x,ue.y,_e)?(De=me=_e.copy(),E=ue.ab(_e)):nt.Ff(we.x,we.y,we.x+we.width,we.y+we.height,ue.x,ue.y,a.x,a.y,_e)&&(De=me=_e.copy(),E=a.ab(_e))),st.free(_e)}re=re.copy().ed(oe),re.Bc(Fe.Ho*Fe.Os,Fe.Go*Fe.Os),ax(Fe,a,y,me,E,re,!0),oe=th(Fe,me.x,me.y),!Fe.abort&&oe>=Sp&&(ox(Fe),re.Bc(Fe.Ho*Fe.Hx,Fe.Go*Fe.Ix),ax(Fe,a,y,me,E,re,!1),oe=th(Fe,me.x,me.y)),!Fe.abort&&oe<Sp&&th(Fe,me.x,me.y)!==Jh?(ry(this,Fe,me.x,me.y,E,!0,ne),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=me.y):(re.x=me.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(ne=this.i(3),y===0||y===180?nt.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)):nt.B(re.y,ne.y)?(Math.abs(a.y-re.y)<=Fe.Go/2&&(this.L(2,re.x,a.y),this.L(3,ne.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(nt.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)):nt.B(re.x,ne.x)?(Math.abs(a.x-re.x)<=Fe.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,ne.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),ne=this.i(2),a.x!==ne.x&&a.y!==ne.y?y===0||y===180?this.m(2,a.x,ne.y):this.m(2,ne.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),De!==null&&(E===0||E===180?this.yf(z.x,De.y):this.yf(De.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ue.copy()),this.ne(ce.copy())),st.free(ue),st.free(ce)}},fi.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function iy(a){if(a.diagram===null||!a.isAvoiding||!Kf(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=gf(a.diagram,!0,a.containingGroup,null);for(var E=1;E<x-2;E++){var b=y[E],z=y[E+1];if(!a.Yj(Math.min(b.x,z.x),Math.min(b.y,z.y),Math.abs(b.x-z.x),Math.abs(b.y-z.y)))return!0}return!1}function ry(a,y,x,E,b,z,ne){var re=y.Ho,oe=y.Go,ue=th(y,x,E),ce=x,me=E;for(b===0?ce+=re:b===90?me+=oe:b===180?ce-=re:me-=oe,b!==ne&&ue>ng&&th(y,ce,me)!==ue-1&&(th(y,x-re,E)===ue-1?(b=180,ce=x-re,me=E):th(y,x+re,E)===ue-1?(b=0,ce=x+re,me=E):th(y,x,E-oe)===ue-1?(b=270,ce=x,me=E-oe):th(y,x,E+oe)===ue-1&&(b=90,ce=x,me=E+oe));ue>ng&&th(y,ce,me)===ue-1;)x=ce,E=me,b===0?ce+=re:b===90?me+=oe:b===180?ce-=re:me-=oe,--ue;z?ue>ng&&(b===180||b===0?x=Math.floor(x/re)*re+re/2:(b===90||b===270)&&(E=Math.floor(E/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,E=Math.floor(E/oe)*oe+oe/2),ue>ng&&(z=b,ne=x,ce=E,b===0?(z=90,ce+=oe):b===90?(z=180,ne-=re):b===180?(z=270,ce-=oe):b===270&&(z=0,ne+=re),th(y,ne,ce)===ue-1?ry(a,y,ne,ce,z,!1,z):(ne=x,ce=E,b===0?(z=270,ce-=oe):b===90?(z=0,ne+=re):b===180?(z=90,ce+=oe):b===270&&(z=180,ne-=re),th(y,ne,ce)===ue-1&&ry(a,y,ne,ce,z,!1,z))),a.yf(x,E)}fi.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=ha(y,a,x.x,x.y,E.x,E.y),z=0,ne=1;ne<this.pointsCount-1;ne++){x=this.i(ne+1);var re=ha(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ne,b=re)}return z},fi.prototype.qc=function(){this.lk=!1,this.v()},fi.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)}}},fi.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&&!nt.$(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=qt.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&&!nt.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-oe,b=this.i(2).copy(),b.x-=E,b.y-=oe,this.computeShortLength(!1)!==0&&(b=Ig(this,b,!1,z)),Kh(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=st.allocAt(E,oe),x=st.alloc(),x.assign(this.i(1)),z=st.allocAt(E,oe),b=st.allocAt(E,oe),ne=this.i(0);for(var ue,ce=this.smoothness/3,me=1;me<this.pointsCount-1;me++){ue=this.i(me);var we=ne,Fe=ue,De=this.i(oy(this,ue,me,!1));if((!nt.$(we.x,Fe.x)||!nt.$(Fe.x,De.x))&&(!nt.$(we.y,Fe.y)||!nt.$(Fe.y,De.y))){var _e=ce;isNaN(_e)&&(_e=this.smoothness/3);var pt=we.x;we=we.y;var rt=Fe.x;Fe=Fe.y;var bt=De.x;De=De.y;var It=_e*x0(pt,we,rt,Fe);_e*=x0(rt,Fe,bt,De),nt.$(we,Fe)&&nt.$(rt,bt)&&(rt>pt?De>Fe?(z.x=rt-It,z.y=Fe-It,b.x=rt+_e,b.y=Fe+_e):(z.x=rt-It,z.y=Fe+It,b.x=rt+_e,b.y=Fe-_e):De>Fe?(z.x=rt+It,z.y=Fe-It,b.x=rt-_e,b.y=Fe+_e):(z.x=rt+It,z.y=Fe+It,b.x=rt-_e,b.y=Fe-_e)),nt.$(pt,rt)&&nt.$(Fe,De)&&(Fe>we?(bt>rt?(z.x=rt-It,z.y=Fe-It,b.x=rt+_e):(z.x=rt+It,z.y=Fe-It,b.x=rt-_e),b.y=Fe+_e):(bt>rt?(z.x=rt-It,z.y=Fe+It,b.x=rt+_e):(z.x=rt+It,z.y=Fe+It,b.x=rt-_e),b.y=Fe-_e)),(nt.$(pt,rt)&&nt.$(rt,bt)||nt.$(we,Fe)&&nt.$(Fe,De))&&(pt=.5*(pt+bt),we=.5*(we+De),z.x=pt,z.y=we,b.x=pt,b.y=we),(me===1||me===2&&nt.$(ne.x,this.i(0).x)&&nt.$(ne.y,this.i(0).y))&&(x.x=.5*(ne.x+ue.x),x.y=.5*(ne.y+ue.y)),Kh(re,x.x-E,x.y-oe,z.x-E,z.y-oe,ue.x-E,ue.y-oe),y.set(z),x.set(b),ne=ue}}ue=ne.x,ne=ne.y,ce=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ce=Ig(this,ce.copy(),!1,ra)),ue=.5*(ue+ce.x),ne=.5*(ne+ce.y),Kh(re,b.x-E,b.y-oe,ue-E,ne-oe,ce.x-E,ce.y-oe),st.free(y),st.free(x),st.free(z),st.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),ne=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ne=Ig(this,ne.copy(),!1,ra)),Kh(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ne.x-E,ne.y-oe);else{for(z=st.alloc(),z.assign(this.i(0)),b=st.alloc(),b.assign(z),ne=this.computeCorner(),me=1,ue=0;me<y;){if(me=oy(this,z,me,1<me),ce=this.i(me),me>=y-1){if(!z.D(ce))this.computeShortLength(!1)!==0&&(ce=Ig(this,ce.copy(),!1,ra)),Og(this,re,-E,-oe,z,ce,x);else if(ue===0)for(me=1;me<y;)b.assign(z),ce=this.i(me++),Og(this,re,-E,-oe,z,ce,x),z.assign(ce);break}if(ue=oy(this,ce,me+1,me<y-3),me=-E,pt=-oe,we=ce,rt=this.i(ue),_e=x,nt.B(z.y,we.y)&&nt.B(we.x,rt.x))if(De=Math.min(ne,Math.abs(we.x-b.x)/2),De=It=Math.min(De,Math.abs(rt.y-we.y)/2),nt.B(De,0))Og(this,re,me,pt,z,we,_e),z.assign(we);else{var Rt=we.x,Kt=we.y;Fe=Rt,bt=Kt,we.x>z.x?Rt=we.x-De:Rt=we.x+De,rt.y>we.y?bt=we.y+It:bt=we.y-It,rt=st.allocAt(Rt,Kt),Og(this,re,me,pt,z,rt,_e),st.free(rt),u0(re,we.x+me,we.y+pt,Fe+me,bt+pt),z.h(Fe,bt)}else nt.B(z.x,we.x)&&nt.B(we.y,rt.y)?(De=Math.min(ne,Math.abs(we.y-b.y)/2),De=It=Math.min(De,Math.abs(rt.x-we.x)/2),nt.B(It,0)?(Og(this,re,me,pt,z,we,_e),z.assign(we)):(Rt=we.x,Kt=we.y,Fe=Rt,bt=Kt,we.y>z.y?Kt=we.y-De:Kt=we.y+De,rt.x>we.x?Fe=we.x+It:Fe=we.x-It,rt=st.allocAt(Rt,Kt),Og(this,re,me,pt,z,rt,_e),st.free(rt),u0(re,we.x+me,we.y+pt,Fe+me,bt+pt),z.h(Fe,bt))):(Og(this,re,me,pt,z,we,_e),z.assign(we));b.assign(ce),me=ue}st.free(z)}c0=re}else re=this.i(1).copy(),re.x-=E,re.y-=oe,this.computeShortLength(!0)!==0&&(b=Ig(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=Ig(this,re,!1,z)),a.type=qt.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),nt.$(a,0)?y:nt.$(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;nt.$(y.x,z.x)&&nt.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!nt.$(y.x,z.x)&&!nt.$(y.y,z.y))return x-1;for(var ne=z;nt.$(y.x,z.x)&&nt.$(z.x,ne.x)&&(!E||(y.y>=z.y?z.y>=ne.y:z.y<=ne.y))||nt.$(y.y,z.y)&&nt.$(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}fi.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(nt.B(b.y,z.y))if(b.x<z.x)for(var ce=0;ce<ue;){var me=Math.max(b.x,Math.min(oe[ce++]-re,z.x-ne));y.lineTo(me+x,z.y+E);for(var we=me+x,Fe=Math.min(me+ne,z.x);ce<ue&&(me=oe[ce],me<Fe+ne);)ce++,Fe=Math.min(me+re,z.x);me=z.y-ne+E,Fe+=x;var De=z.y+E;a.curve===Xh?pp(y,Fe,De,!1):Kh(y,we,me,Fe,me,Fe,De)}else for(--ue;0<=ue;){for(ce=Math.min(b.x,Math.max(oe[ue--]+re,z.x+ne)),y.lineTo(ce+x,z.y+E),we=ce+x,me=Math.max(ce-ne,z.x);0<=ue&&(ce=oe[ue],ce>me-ne);)ue--,me=Math.max(ce-re,z.x);ce=z.y-ne+E,me+=x,Fe=z.y+E,a.curve===Xh?pp(y,me,Fe,!1):Kh(y,we,ce,me,ce,me,Fe)}else if(nt.B(b.x,z.x))if(b.y<z.y)for(ce=0;ce<ue;){for(me=Math.max(b.y,Math.min(oe[ce++]-re,z.y-ne)),y.lineTo(z.x+x,me+E),we=me+E,me=Math.min(me+ne,z.y);ce<ue&&(Fe=oe[ce],Fe<me+ne);)ce++,me=Math.min(Fe+re,z.y);Fe=z.x-ne+x,De=z.x+x,me+=E,a.curve===Xh?pp(y,De,me,!1):Kh(y,Fe,we,Fe,me,De,me)}else for(--ue;0<=ue;){for(ce=Math.min(b.y,Math.max(oe[ue--]+re,z.y+ne)),y.lineTo(z.x+x,ce+E),we=ce+E,ce=Math.max(ce-ne,z.y);0<=ue&&(me=oe[ue],me>ce-ne);)ue--,ce=Math.max(me-re,z.y);me=z.x-ne+x,Fe=z.x+x,ce+=E,a.curve===Xh?pp(y,Fe,ce,!1):Kh(y,me,we,me,ce,Fe,ce)}}}y.lineTo(z.x+x,z.y+E)}function bS(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var ne=z.length,re=0;re<ne;re++){var oe=z[re];if(oe instanceof fi){if(oe===a)return 0<E.length&&E.sort(function(ce,me){return ce-me}),E.length;if(oe.isVisible()&&tg(oe)){var ue=oe.routeBounds;ue.w()&&a.routeBounds.Yc(ue)&&!a.usesSamePort(oe)&&(ue=oe.path,ue!==null&&ue.Ed()&&FS(y,x,E,oe))}}}}}return 0<E.length&&E.sort(function(ce,me){return ce-me}),E.length}function FS(a,y,x,E){for(var b=nt.B(a.y,y.y),z=E.pointsCount,ne=E.i(0),re=st.alloc(),oe=1;oe<z;oe++){var ue=E.i(oe);if(oe<z-1){var ce=E.i(oe+1);if(ne.y===ue.y&&ue.y===ce.y){if(ue.x>ne.x&&ce.x>=ue.x||ue.x<ne.x&&ce.x<=ue.x)continue}else if(ne.x===ue.x&&ue.x===ce.x&&(ue.y>ne.y&&ce.y>=ue.y||ue.y<ne.y&&ce.y<=ue.y))continue}e:{ce=a.x;var me=a.y,we=y.x,Fe=y.y,De=ne.x;ne=ne.y;var _e=ue.x,pt=ue.y;if(nt.B(ce,we)){if(!nt.B(me,Fe)&&nt.B(ne,pt)&&Math.min(me,Fe)<ne&&Math.max(me,Fe)>ne&&Math.min(De,_e)<ce&&Math.max(De,_e)>ce&&!nt.B(De,_e)){re.x=ce,re.y=ne,ce=!0;break e}}else if(nt.B(me,Fe)&&nt.B(De,_e)&&Math.min(ce,we)<De&&Math.max(ce,we)>De&&Math.min(ne,pt)<me&&Math.max(ne,pt)>me&&!nt.B(ne,pt)){re.x=De,re.y=me,ce=!0;break e}re.x=0,re.y=0,ce=!1}ce&&(b?x.push(re.x):x.push(re.y)),ne=ue}st.free(re)}function tg(a){return a=a.curve,a===yp||a===Xh}function S0(a,y){(y||tg(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}fi.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 fi&&(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 fi&&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())}}fi.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},fi.prototype.isVisible=function(){if(!xr.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},fi.prototype.Zb=function(a){if(xr.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)},fi.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&&(Ai(y.links,a),y.Sl()))}fi.prototype.ph=function(){return!0},Qe.Object.defineProperties(fi.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:Fi},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&&Xn(a,">= 0",fi,"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:Fi},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&&Xn(a,">= 0",fi,"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?qr: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),nt.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);nt.Dl(b.x,b.y,ne.x,ne.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),b=oe}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new st)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||m0(this);for(var a=this.cq=[],y=this.pointsCount,x=0;x<y-1;x++){var E=this.i(x),b=this.i(x+1);nt.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):nt.$(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 Vn,E=0;E<a.length/2;E++)b=new st(a[2*E],a[2*E+1]).freeze(),x.add(b);else{for(E=!0,b=0;b<a.length;b++){var z=a[b];if(!tn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Vn,E=0;E<a.length;E++)b=a[E],x.add(new st(b.x,b.y).freeze())}}else if(a instanceof Vn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Et("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&&ns(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)}}}),fi.prototype.invalidateOtherJumpOvers=fi.prototype.Xo,fi.prototype.findClosestSegment=fi.prototype.ez,fi.prototype.updateRoute=fi.prototype.vg,fi.prototype.invalidateRoute=fi.prototype.bb,fi.prototype.rollbackRoute=fi.prototype.rv,fi.prototype.commitRoute=fi.prototype.zf,fi.prototype.startRoute=fi.prototype.uh,fi.prototype.clearPoints=fi.prototype.Fj,fi.prototype.removePoint=fi.prototype.pv,fi.prototype.addPointAt=fi.prototype.yf,fi.prototype.addPoint=fi.prototype.ne,fi.prototype.insertPointAt=fi.prototype.m,fi.prototype.insertPoint=fi.prototype.Kz,fi.prototype.setPointAt=fi.prototype.L,fi.prototype.setPoint=fi.prototype.dd,fi.prototype.getPoint=fi.prototype.i,fi.prototype.getOtherPort=fi.prototype.Cz,fi.prototype.getOtherNode=fi.prototype.To;var kg=null,Tg=null,ay=new wn(fi,"Normal",1),BS=new wn(fi,"Orthogonal",2),MS=new wn(fi,"AvoidsNodes",6),nx=new wn(fi,"AvoidsNodesStraight",7),Eu=new wn(fi,"None",0),Ec=new wn(fi,"Bezier",9),Xh=new wn(fi,"JumpGap",10),yp=new wn(fi,"JumpOver",11),tm=new wn(fi,"End",17),P0=new wn(fi,"Scale",18),w0=new wn(fi,"Stretch",19),nm=new wn(fi,"OrientAlong",21),im=new wn(fi,"OrientPlus90",22),rm=new wn(fi,"OrientMinus90",23),sy=new wn(fi,"OrientOpposite",24),C0=new wn(fi,"OrientUpright",25),om=new wn(fi,"OrientPlus90Upright",26),am=new wn(fi,"OrientMinus90Upright",27),E0=new wn(fi,"OrientUpright45",28),ix=16,rx=14,sm=8;fi.className="Link",fi.Normal=ay,fi.Orthogonal=BS,fi.AvoidsNodes=MS,fi.AvoidsNodesStraight=nx,fi.None=Eu,fi.Bezier=Ec,fi.JumpGap=Xh,fi.JumpOver=yp,fi.End=tm,fi.Scale=P0,fi.Stretch=w0,fi.OrientAlong=nm,fi.OrientPlus90=im,fi.OrientMinus90=rm,fi.OrientOpposite=sy,fi.OrientUpright=C0,fi.OrientPlus90Upright=om,fi.OrientMinus90Upright=am,fi.OrientUpright45=E0,fi.EndSegmentStep=8,fi.CurvinessStart=ix,fi.SpacingMin=rx,fi.OrthoShortCut=sm;function b0(a,y,x,E){Io(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){Io(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}lm.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=ly,this.ac!==null)for(y=0;y<=this.di;y++)if(x=this.ac[y],x.fill)x.fill(a);else for(E=0;E<=this.ei;E++)x[E]=a}};function xp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function th(a,y,x){return xp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ly}function ox(a){if(a.ac!==null)for(var y=0;y<=a.di;y++)for(var x=a.ac[y],E=0;E<=a.ei;E++)x[E]>=ng&&(x[E]=ly)}lm.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===Jh)return!1}return!0};function nh(a,y,x,E,b,z,ne,re,oe){if(!(y<z||y>ne||x<re||x>oe)){var ue=y|0,ce=x|0,me=a.ac[ue][ce];if(me>=ng&&me<Sp)for(b?ce+=E:ue+=E,me+=1;z<=ue&&ue<=ne&&re<=ce&&ce<=oe&&!(me>=a.ac[ue][ce]);)a.ac[ue][ce]=me,me+=1,b?ce+=E:ue+=E;if(ue=b?ce:ue,b)if(0<E)for(x+=E;x<ue;x+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else for(x+=E;x>ue;x+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else if(0<E)for(y+=E;y<ue;y+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe);else for(y+=E;y>ue;y+=E)nh(a,y,x,1,!b,z,ne,re,oe),nh(a,y,x,-1,!b,z,ne,re,oe)}}function F0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var ue=Jh,ce=ng;for(a.ac[y][x]=ce;ue===Jh&&y>z&&y<ne&&x>re&&x<oe;)ce+=1,a.ac[y][x]=ce,b?x+=E:y+=E,ue=a.ac[y][x]}function B0(a,y,x,E,b,z,ne,re,oe){y|=0,x|=0;var ue=Jh,ce=Sp;for(a.ac[y][x]=ce;ue===Jh&&y>z&&y<ne&&x>re&&x<oe;)a.ac[y][x]=ce,b?x+=E:y+=E,ue=a.ac[y][x]}function ax(a,y,x,E,b,z,ne){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(xp(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var ue=E.x,ce=E.y;if(xp(a,ue,ce))if(ue-=a.Nd,ue/=a.rc,ce-=a.Od,ce/=a.sc,1>=Math.abs(re-ue)&&1>=Math.abs(oe-ce))a.abort=!0;else{var me=z.x;E=z.y,y=z.x+z.width;var we=z.y+z.height;me-=a.Nd,me/=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,me|0)),y=Math.min(a.di,Math.max(0,y|0)),me=Math.max(0,Math.min(a.ei,E|0)),we=Math.min(a.ei,Math.max(0,we|0)),E=a.ac,re|=0,oe|=0,ue|=0,ce|=0;var Fe=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===Jh?(F0(a,re,oe,Fe,x,z,y,me,we),F0(a,re,oe,1,!x,z,y,me,we),F0(a,re,oe,-1,!x,z,y,me,we)):F0(a,re,oe,Fe,x,re,oe,re,oe),E[ue][ce]===Jh?(B0(a,ue,ce,b===0||b===90?1:-1,b===90||b===270,z,y,me,we),B0(a,ue,ce,1,!(b===90||b===270),z,y,me,we),B0(a,ue,ce,-1,!(b===90||b===270),z,y,me,we)):B0(a,ue,ce,Fe,x,ue,ce,ue,ce),x=Si(),ne&&sx(a,ue,ce,b,re,oe,x))for((x[0]!==ue||x[1]!==ce)&&(x.unshift(ce),x.unshift(ue)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=ng,b=x[x.length-2],ne=x[x.length-1],E[b][ne]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],ne=x[z+3],y=x[z],ue=x[z+1];y>b?b++:y<b?b--:ue>ne?ne++:ue<ne&&ne--,E[b][ne]=a++,b!==y||ne!==ue;);else nh(a,re,oe,1,!1,z,y,me,we),nh(a,re,oe,-1,!1,z,y,me,we),nh(a,re,oe,1,!0,z,y,me,we),nh(a,re,oe,-1,!0,z,y,me,we);ki(x)}}}}function sx(a,y,x,E,b,z,ne){for(var re=a.ac,oe=y,ue=x;;){if(oe===b&&ue===z)return!0;var ce=oe,me=ue;if(E===0)if(ce<b)ce++;else break;else if(E===90)if(me<z)me++;else break;else if(E===180)if(ce>b)ce--;else break;else if(me>z)me--;else break;var we=re[ce][me];if(we===0||we===uy)break;oe=ce,ue=me}for(;;){if(ce=E,me=oe,we=ue,E===0?we<z?(ce=90,we++):we>z&&(ce=270,we--):E===90?me<b?(ce=0,me++):me>b&&(ce=180,me--):E===180?we<z?(ce=90,we++):we>z&&(ce=270,we--):me<b?(ce=0,me++):me>b&&(ce=180,me--),me=re[me][we],ce!==E&&me!==0&&me!==uy){if(ne.push(oe),ne.push(ue),sx(a,oe,ue,ce,b,z,ne))return!0;ne.pop(),ne.pop()}if(re[oe][ue]=uy,E===0){if(oe===y)return!1;oe--}else if(E===90){if(ue===x)return!1;ue--}else if(E===180){if(oe===y)return!1;oe++}else{if(ue===x)return!1;ue++}}}Qe.Object.defineProperties(lm.prototype,{bounds:{get:function(){return new Bn(this.Nd,this.Od,this.En-this.Nd,this.Fn-this.Od)}},Ho:{get:function(){return this.rc},set:function(a){0<a&&a!==this.rc&&(this.rc=a,this.initialize(this.bounds))}},Go:{get:function(){return this.sc},set:function(a){0<a&&a!==this.sc&&(this.sc=a,this.initialize(this.bounds))}}});var Jh=0,ng=1,Sp=999999,ly=Sp+1,uy=Sp+2;lm.className="PositionArray";function Rg(){Io(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 po?b:null;if(z===null||z.isSubGraphExpanded)var ne=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}E=z,ne=E.Lu()}z=a.pe.length=0;var re=a.port.ga(Us,st.alloc()),oe=a.port.ga(Ln,st.alloc());for(b=Bn.allocAt(re.x,re.y,0,0),b.Ye(oe),st.free(re),st.free(oe),re=st.allocAt(b.x+b.width/2,b.y+b.height/2),oe=a.port.li(),ne=ne.iterator;ne.next();){var ue=ne.value;if(ue.isVisible()&&ue.fromPort!==ue.toPort){var ce=ue.fromPort===a.port||ue.fromNode!==null&&ue.fromNode.Td(E),me=ue.computeSpot(ce,a.port);if(me.$c()&&(ce=ce?ue.toPort:ue.fromPort,ce!==null)){var we=ce.part;if(we!==null){var Fe=we.findVisibleNode();Fe!==null&&Fe!==we&&(we=Fe,ce=we.port),ce=ue.computeOtherPoint(we,ce),we=re.ab(ce),we-=oe,0>we?we+=360:360<=we&&(we-=360),me=LS(b,me,we,ue.isOrthogonal),me===0?(me=4,180<we&&(we-=360)):me===90?(me=8,270<we&&(we-=360)):me===180?me=2:(me=1,90>we&&(we+=360)),Fe=a.pe[z],Fe===void 0?(Fe=new cy(ue,we,me),a.pe[z]=Fe):(Fe.link=ue,Fe.angle=we,Fe.Nc=me),Fe.hv.set(ce),z++}}}}for(st.free(re),a.pe.sort(Rg.prototype.j),oe=a.pe.length,E=-1,z=re=0;z<oe;z++)ne=a.pe[z],ne!==void 0&&(ne.Nc!==E&&(E=ne.Nc,re=0),ne.Uo=re,re++);for(E=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==E&&(E=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,me=a.port,E=a.node.portSpreading,re=st.alloc(),oe=st.alloc(),ne=st.alloc(),ue=st.alloc(),me.ga(Us,re),me.ga(kl,oe),me.ga(Ln,ne),me.ga(zl,ue),Fe=we=ce=me=0,E===qv)for(var De=0;De<z.length;De++){var _e=z[De];if(_e!==null){var pt=_e.link.computeThickness();switch(_e.Nc){case 8:we+=pt;break;case 2:Fe+=pt;break;case 1:me+=pt;break;default:case 4:ce+=pt}}}var rt=De=0,bt=1,It=_e=0;for(pt=0;pt<z.length;pt++){var Rt=z[pt];if(Rt!==null){if(De!==Rt.Nc){switch(De=Rt.Nc,De){case 8:var Kt=ne;rt=ue;break;case 2:Kt=ue,rt=re;break;case 1:Kt=re,rt=oe;break;default:case 4:Kt=oe,rt=ne}switch(_e=rt.x-Kt.x,It=rt.y-Kt.y,De){case 8:we>Math.abs(_e)?(bt=Math.abs(_e)/we,we=Math.abs(_e)):bt=1;break;case 2:Fe>Math.abs(It)?(bt=Math.abs(It)/Fe,Fe=Math.abs(It)):bt=1;break;case 1:me>Math.abs(_e)?(bt=Math.abs(_e)/me,me=Math.abs(_e)):bt=1;break;default:case 4:ce>Math.abs(It)?(bt=Math.abs(It)/ce,ce=Math.abs(It)):bt=1}rt=0}var fn=Rt.Zo;if(E===qv){switch(Rt=Rt.link.computeThickness(),Rt*=bt,fn.set(Kt),De){case 8:fn.x=Kt.x+_e/2+we/2-rt-Rt/2;break;case 2:fn.y=Kt.y+It/2+Fe/2-rt-Rt/2;break;case 1:fn.x=Kt.x+_e/2-me/2+rt+Rt/2;break;default:case 4:fn.y=Kt.y+It/2-ce/2+rt+Rt/2}rt+=Rt}else{var bi=.5;E===p0&&(bi=(Rt.Uo+1)/(Rt.Gl+1)),fn.x=Kt.x+_e*bi,fn.y=Kt.y+It*bi}}}for(st.free(re),st.free(oe),st.free(ne),st.free(ue),Kt=a.pe,z=0;z<Kt.length;z++)E=Kt[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Bn.free(b)}x=a.pe}for(a=0;a<x.length;a++)if(b=x[a],b!==null&&b.link===y)return b;return null}Rg.prototype.j=function(a,y){return a===y?0:a===null?-1:y===null?1:a.Nc<y.Nc?-1:a.Nc>y.Nc?1:a.angle<y.angle?-1:a.angle>y.angle?1:0},Rg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,ws,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},Rg.className="Knot";function cy(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new st,this.Gl=this.Uo=0,this.Zo=new st,this.Ju=0}cy.prototype.toString=function(){return this.link.toString()+" "+this.angle.toString()+" "+this.Nc.toString()+":"+this.Uo.toString()+"/"+this.Gl.toString()+" "+this.Zo.toString()+" "+this.Ju.toString()+" "+this.hv.toString()},cy.className="LinkInfo";function vs(a){Io(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new st(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}vs.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},vs.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},vs.prototype.qb=function(){},vs.prototype.toString=function(){var a=Ni(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},vs.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())}}},vs.prototype.createNetwork=function(){return new ts(this)},vs.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof hn?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof po?y.lg(a.memberParts):y.lg(a.iterator),y},vs.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")}},vs.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()}},vs.prototype.doLayout=function(a){var y=new Un;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 po?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},vs.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 po&&(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++}},vs.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 fi)&&(um(re),this.rh(re))){var oe=re.measuredBounds,ue=oe.width;oe=oe.height,re.moveTo(x,E),re instanceof po&&(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++}}},vs.prototype.rh=function(a){return!!(!a.location.w()||a instanceof po&&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 Di?oe.isLinkLabel||(oe instanceof po&&oe.layout===null?Ef(a,y,oe.memberParts,!1,b,z,ne,re):(um(oe),y.add(oe))):ne&&oe instanceof fi?y.add(oe):!re||!oe.Zc()||oe instanceof Di||(um(oe),y.add(oe)))}}function um(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}vs.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Bn),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},vs.prototype.ex=function(a){var y=new Un;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 po?Ef(this,y,a.memberParts,!1,null,!0,!0,!0):Ef(this,y,a.iterator,!1,null,!0,!0,!0),y},vs.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(vs.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())}}}),vs.prototype.collectParts=vs.prototype.ex,vs.prototype.getLayoutBounds=vs.prototype.ni,vs.prototype.invalidateLayout=vs.prototype.C,vs.className="Layout";function ts(a){Io(this),this.Sc=a,this.wf=new Un,this.ye=new Un,this.Es=new $i,this.zs=new $i}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 Un,this.ye=new Un,this.Es=new $i,this.zs=new $i},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 Di)return!ne.isLinkLabel;if(ne instanceof fi){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 Di&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof po&&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 fi&&(!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},Ae=ts.prototype,Ae.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Ae.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},Ae.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}Ae.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Ae.ki=function(a){return a===null?null:this.Es.I(a)},Ae.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}}Ae.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},Ae.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))}Ae.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Ae.Lo=function(a){return a===null?null:this.zs.I(a)},Ae.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},Ae.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))}},Ae.Ko=function(){for(var a=Si(),y=this.ye.iterator;y.next();){var x=y.value;x.fromVertex===x.toVertex&&a.push(x)}for(y=a.length,x=0;x<y;x++)this.Mj(a[x]);ki(a)},ts.prototype.deleteArtificialVertexes=function(){for(var a=Si(),y=this.wf.iterator;y.next();){var x=y.value;x.node===null&&x.data===null&&a.push(x)}for(x=a.length,y=0;y<x;y++)this.Iu(a[y]);for(y=Si(),x=this.ye.iterator;x.next();){var E=x.value;E.link===null&&E.data===null&&y.push(E)}for(x=y.length,E=0;E<x;E++)this.Mj(y[E]);ki(a),ki(y)};function NS(a){for(var y=Si(),x=a.ye.iterator;x.next();){var E=x.value;E.fromVertex!==null&&E.toVertex!==null||y.push(E)}for(x=y.length,E=0;E<x;E++)a.Mj(y[E]);ki(y)}ts.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),NS(this),this.Ko()),a=new Vn;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 Un,y=this.wf.iterator;y.next();)a.add(y.value.node);for(y=this.ye.iterator;y.next();)a.add(y.value.link);return a},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){Io(this),this.ob=a,this.j=new Bn(0,0,10,10).freeze(),this.o=new st(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Vn,this.mg=new Vn}ul.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Vn,this.mg=new Vn},ul.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+tr(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;tn(x)?(x.x=y.x,x.y=y.y,x.width=y.width,x.height=y.height):a.bounds=y.copy()}else if(a=this.node,a!==null){if(y=this.bounds,!(a instanceof po)){x=Bn.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)),Bn.free(x);return}Bn.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=Bn.alloc(),E=y.ni(a,x);y=E.x;var b=E.y,z=E.width;if(E=E.height,isNaN(y)&&(y=0),isNaN(b)&&(b=0),this.j.h(y,b,z,E),Bn.free(x),!(a instanceof po)&&(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 Un,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Un,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Un,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);for(y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},sourceEdges:{get:function(){return this.tg.iterator}},destinationEdges:{get:function(){return this.mg.iterator}},edges:{get:function(){for(var a=new Vn,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){Io(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#"+tr(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){vs.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new mi(NaN,NaN).freeze(),this.tf=new mi(10,10).freeze(),this.Jb=cm,this.Rb=L0,this.nd=dm,this.hd=cx,a&&Object.assign(this,a)}Wt(Rl,vs),Rl.prototype.cloneProtected=function(a){vs.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:Et("Unknown enum value: "+a):vs.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 po)for(E=E.memberParts;E.next();)y.remove(E.value)}else y.remove(E)}var b=y.Fa();if(b.length!==0){switch(this.sorting){case N0:b.reverse();break;case dm:b.sort(this.comparer);break;case A0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var ne=this.wrappingWidth;switch(isNaN(ne)&&a!==null?(y=a.padding,ne=Math.max(a.viewportBounds.width-y.left-y.right,0)):ne=Math.max(this.wrappingWidth,0),0>=z&&0>=ne&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case M0:var re=y,oe=x,ue=Bn.alloc(),ce=Math.max(this.cellSize.width,1);if(!isFinite(ce))for(var me=ce=0;me<b.length;me++){var we=this.ni(b[me],ue);ce=Math.max(ce,we.width)}if(ce=Math.max(ce+re,1),me=Math.max(this.cellSize.height,1),!isFinite(me))for(we=me=0;we<b.length;we++){var Fe=this.ni(b[we],ue);me=Math.max(me,Fe.height)}me=Math.max(me+oe,1),we=this.arrangement;for(var De=Fe=this.arrangementOrigin.x,_e=this.arrangementOrigin.y,pt=0,rt=0,bt=0;bt<b.length;bt++){var It=b[bt],Rt=this.ni(It,ue),Kt=Math.ceil((Rt.width+re)/ce)*ce,fn=Math.ceil((Rt.height+oe)/me)*me;switch(we){case md:var bi=Math.abs(De-Rt.width);break;default:bi=De+Rt.width}switch((0<z&&pt>z-1||0<ne&&0<pt&&bi-Fe>ne)&&(E.push(new Bn(0,_e,ne+re,rt)),pt=0,De=Fe,_e+=rt,rt=0),rt=Math.max(rt,fn),we){case md:Rt=-Rt.width;break;default:Rt=0}switch(It.moveTo(De+Rt,_e),we){case md:De-=Kt;break;default:De+=Kt}pt++}E.push(new Bn(0,_e,ne+re,rt)),Bn.free(ue);break;case cm:for(oe=ne,ce=z,me=y,we=x,ne=Bn.alloc(),Fe=Math.max(this.cellSize.width,1),z=_e=ue=0,re=st.alloc(),De=0;De<b.length;De++)rt=b[De],pt=this.ni(rt,ne),rt=Vh(rt,rt.locationObject,rt.locationSpot,re),ue=Math.max(ue,rt.x),_e=Math.max(_e,pt.width-rt.x),z=Math.max(z,rt.y);switch(De=this.arrangement,De){case md:ue+=me;break;default:_e+=me}Fe=isFinite(Fe)?Math.max(Fe+me,1):Math.max(ue+_e,1);var Yi=rt=this.arrangementOrigin.x;for(bt=this.arrangementOrigin.y,_e=0,oe>=ue&&(oe-=ue),ue=It=0,Kt=Math.max(this.cellSize.height,1),Rt=z=0,fn=!0,pt=st.alloc(),bi=0;bi<b.length;bi++){var Wi=b[bi],hi=this.ni(Wi,ne),ei=Vh(Wi,Wi.locationObject,Wi.locationSpot,re);if(0<_e)switch(De){case md:Yi=(Yi-rt-(hi.width-ei.x))/Fe,Yi=nt.$(Math.round(Yi),Yi)?Math.round(Yi):Math.floor(Yi),Yi=Yi*Fe+rt;break;default:Yi=(Yi-rt+ei.x)/Fe,Yi=nt.$(Math.round(Yi),Yi)?Math.round(Yi):Math.ceil(Yi),Yi=Yi*Fe+rt}else switch(De){case md:It=Yi+ei.x+hi.width;break;default:It=Yi-ei.x}switch(De){case md:var co=-(Yi+ei.x)+It;break;default:co=Yi+hi.width-ei.x-It}if(0<ce&&_e>ce-1||0<oe&&0<_e&&co>oe){for(E.push(new Bn(0,fn?bt-z:bt,oe+me,Rt+z+we)),Yi=0;Yi<_e&&bi!==_e;Yi++){co=b[bi-_e+Yi];var Kr=Vh(co,co.locationObject,co.locationSpot,pt);co.moveTo(co.position.x,co.position.y+z-Kr.y)}Rt+=we,bt=fn?bt+Rt:bt+(Rt+z),_e=Rt=z=0,Yi=rt,fn=!1}switch(Yi===rt&&(ue=De===md?Math.max(ue,hi.width-ei.x):Math.min(ue,-ei.x)),z=Math.max(z,ei.y),Rt=Math.max(Rt,hi.height-ei.y),isFinite(Kt)&&(Rt=Math.max(Rt,Math.max(hi.height,Kt)-ei.y)),fn?Wi.moveTo(Yi-ei.x,bt-ei.y):Wi.moveTo(Yi-ei.x,bt),De){case md:Yi-=ei.x+me;break;default:Yi+=hi.width-ei.x+me}_e++}if(E.push(new Bn(0,bt,oe+me,(fn?Rt:Rt+z)+we)),b.length!==_e)for(oe=0;oe<_e;oe++)ce=b[b.length-_e+oe],me=Vh(ce,ce.locationObject,ce.locationSpot,re),ce.moveTo(ce.position.x,ce.position.y+z-me.y);if(st.free(re),st.free(pt),De===md)for(b=0;b<E.length;b++)z=E[b],z.width+=ue,z.x-=ue;else for(b=0;b<E.length;b++)z=E[b],z.x>ue&&(z.width+=z.x-ue,z.x=ue);Bn.free(ne)}for(re=z=ne=b=0;re<E.length;re++)oe=E[re],b=Math.min(b,oe.x),ne=Math.min(ne,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===md?this.commitLayers(E,new st(b+y/2-(z+b),ne-x/2)):this.commitLayers(E,new st(b-y/2,ne-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},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 wn(Rl,"Position",0),cm=new wn(Rl,"Location",1),L0=new wn(Rl,"LeftToRight",2),md=new wn(Rl,"RightToLeft",3),py=new wn(Rl,"Forward",4),N0=new wn(Rl,"Reverse",5),dm=new wn(Rl,"Ascending",6),A0=new wn(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 Un,this.Dn=new Un,this.Pa=new Un,this.cf=new $i,this.bf=new $i,this.aj=new $i,this.H=null,this.tp=!1}Ae=ja.prototype,Ae.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Ae.Xe=function(a){this.H=a},Ae.oi=function(a){if(a instanceof Di){if(this.On.add(a),a instanceof po){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 fi?this.Dn.add(a):a instanceof pa||this.Pa.add(a);y=a.data,y===null||a instanceof pa||(a instanceof fi?this.bf.add(y,a):this.cf.add(y,a))},Ae.pc=function(a){if(a.Ej(),a instanceof Di){if(this.On.remove(a),a instanceof po){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 fi?this.Dn.remove(a):a instanceof pa||this.Pa.remove(a);y=a.data,y===null||a instanceof pa||(a instanceof fi?this.bf.remove(y):this.cf.remove(y))},Ae.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 po)&&Et('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 po||Et('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 fi||Et('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Si(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Si(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Si(),E=this.nodes.iterator;E.next();){var b=E.value;b.data!==null&&(a.push(b.data),a.push(b.location))}for(E=this.links.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(E=this.parts.iterator;E.next();)b=E.value,b.data!==null&&(a.push(b.data),a.push(b.location));for(this.removeAllModeledParts(),this.addAllModeledParts(),E=0;E<y.length;E++)b=this.Lc(y[E]),b!==null&&(b.isSelected=!0);for(E=0;E<x.length;E++)b=this.Lc(x[E]),b!==null&&(b.isHighlighted=!0);for(E=0;E<a.length;E+=2)b=this.Lc(a[E]),b!==null&&(b.location=a[E+1]);ki(y),ki(x),ki(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 Di?a:null)},ja.prototype.findLinkForKey=function(){return null},Ae=ja.prototype,Ae.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Ae.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Di?a:null)},Ae.Kc=function(a){return a===null?null:this.bf.I(a)},Ae.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Un;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(tn(ne)&&my(this,b,ne)){y.add(E);break}}}return y.iterator},Ae.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Un;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var ne=arguments[z];if(tn(ne)&&my(this,b,ne)){y.add(E);break}}}return y.iterator};function my(a,y,x){for(var E in x){var b=y[E],z=x[E];if(sn(z)){if(!sn(b)||b.length<z.length)return!1;for(var ne=0;ne<b.length;ne++){var re=z[ne];if(re!==void 0&&!fx(a,b[ne],re))return!1}}else if(!fx(a,b,z))return!1}return!0}function fx(a,y,x){if(typeof x=="function"){if(!x(y))return!1}else if(x instanceof RegExp){if(!y||!x.test(y.toString()))return!1}else if(tn(y)&&tn(x)){if(!my(a,y,x))return!1}else if(y!==x)return!1;return!0}ja.prototype.doModelChanged=function(a){if(this.H){var y=this.H;if(a.model===y.model){var x=a.change;if(y.doModelChanged(a),y.aa){y.aa=!1;try{var E=a.modelChange;if(E!=="")if(x===_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"&&tn(ne)&&dx(this,ne),y.isModified=!0}else if(x===$a){var re=a.oldValue;E==="nodeDataArray"&&tn(re)&&this.ip(re),y.isModified=!0}else x===Na&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===_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===$a){var ce=a.change===xa,me=ce?a.newParam:a.oldParam,we=ce?a.newValue:a.oldValue,Fe=this.aj.I(a.object);if(Array.isArray(Fe))for(a=0;a<Fe.length;a++){var De=Fe[a];if(ce)Xm(De,we,me,!0);else if(!(0>me)){var _e=me+Kp(De);De.pc(_e,!0),Nv(De,_e,me)}}y.isModified=!0}}finally{y.aa=!0}}}}},ja.prototype.updateAllTargetBindings=function(a){a===void 0&&(a="");for(var y=this.parts.iterator;y.next();)y.value.La(a);for(y=this.nodes.iterator;y.next();)y.value.La(a);for(y=this.links.iterator;y.next();)y.value.La(a)},ja.prototype.rp=function(){for(var a=this.H.model,y=new Un,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),this.parts.each(function(ne){ne.data===null||y.contains(ne.data)||b.push(ne.data)}),b.forEach(function(ne){bx(a,ne,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&Ex(a,z,!1)}for(this.refreshDataBoundLinks(),x=this.parts.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.nodes.iterator;x.next();)x.value.updateRelationshipsFromData();for(x=this.links.iterator;x.next();)x.value.updateRelationshipsFromData()},ja.prototype.refreshDataBoundLinks=function(){},ja.prototype.updateRelationshipsFromData=function(){},ja.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var ne=b[z].sx(a);ne!==null&&(x===null&&(x=Si()),x.push(ne))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);ki(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(a,y){var x=y.Hh;if(sn(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(sn(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 $i;if(sn(a))for(var b=0;b<a.length;b++)D0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)D0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new Un;for(var z=new $i,ne=E.iterator;ne.next();){var re=ne.value;if(re instanceof fi)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof Di&&re.data!==null&&x.Tl()){var oe=re;re=ne.key;var ue=re.pg();ue!==null&&(ue=E.I(ue),ue!==null?(x.qe(oe.data,x.wa(ue.data)),oe=y.Kc(oe.data),re=re.kh(),re!==null&&oe!==null&&z.add(re,oe)):x.qe(oe.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ce=new $i;E.each(function(me){me.key.data!==null&&ce.add(me.key.data,me.value.data)}),x(ce,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function D0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof xr))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Di){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 po&&z instanceof po)for(y=y.memberParts;y.next();)ne=D0(a,y.value,x,E,b),ne instanceof fi||ne===null||(ne.containingGroup=z)}else if(y instanceof fi&&z instanceof fi)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 Di&&(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 fi||(E=b.copyNodeData(E),tn(E)&&(b.xf(E),x=y.Lc(E)))}else Zc(a),x=a.copy(),x!==null&&(b=this.H,y!==null?y.add(x):E!==null&&b!==null&&b.commandHandler!==null&&b.commandHandler.copiesClipboardData&&(y=b.model,b=null,x instanceof fi||(b=y.copyNodeData(E)),tn(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)}Wt(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 Di&&(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 Di&&(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 ce=a.newValue;typeof ce=="string"&&(ue.fromPortId=ce)}}else if(b==="linkToPortId"){var me=this.Kc(a.object);if(me!==null){var we=a.newValue;typeof we=="string"&&(me.toPortId=we)}}else if(b==="nodeGroupKey"){var Fe=this.Lc(a.object);if(Fe!==null){var De=a.newValue;if(De!==void 0){var _e=this.Vb(De);_e instanceof po?Fe.containingGroup=_e:Fe.containingGroup=null}else Fe.containingGroup=null}}else if(b==="linkLabelKeys"){var pt=this.Kc(a.object);if(pt!==null){var rt=a.oldValue,bt=a.newValue;Array.isArray(rt)&&rt.forEach(function(ei){0<=bt.indexOf(ei)||(ei=y.Vb(ei),ei!==null&&(ei.labeledLink=null))}),Array.isArray(bt)&&bt.forEach(function(ei){ei=y.Vb(ei),ei!==null&&(ei.labeledLink=pt)})}}else if(b==="linkCategory"){var It=this.Kc(a.object),Rt=a.newValue;It!==null&&typeof Rt=="string"&&(It.category=Rt)}else b==="linkDataArray"&&(xx(this,a.oldValue),vx(this,a.newValue));x.isModified=!0}else if(E===xa){var Kt=a.newValue;if(b==="linkDataArray"&&typeof Kt=="object"&&Kt!==null)yx(this,Kt);else if(b==="linkLabelKeys"&&Ff(Kt)){var fn=this.Kc(a.object),bi=this.Vb(Kt);fn!==null&&bi!==null&&(bi.labeledLink=fn)}x.isModified=!0}else if(E===$a){var Yi=a.oldValue;if(b==="linkDataArray"&&typeof Yi=="object"&&Yi!==null)this.ip(Yi);else if(b==="linkLabelKeys"&&Ff(Yi)){var Wi=this.Vb(Yi);Wi!==null&&(Wi.labeledLink=null)}x.isModified=!0}}else if(E===_o){var hi=a.propertyName;a.object!==x.model||hi!=="linkFromKeyProperty"&&hi!=="linkToKeyProperty"&&hi!=="linkFromPortIdProperty"&&hi!=="linkToPortIdProperty"&&hi!=="linkLabelKeysProperty"&&hi!=="nodeIsGroupProperty"&&hi!=="nodeGroupKeyProperty"&&hi!=="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 Un,E=y.linkDataArray;E.forEach(function(z){x.add(z)});var b=[];this.links.each(function(z){z.data===null||x.contains(z.data)||b.push(z.data)}),b.forEach(function(z){Ax(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&Nx(y,z,!1)})},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 fi){var b=bc(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=bc(E,y,!1),b=x.Vb(b),a.toNode=b,y=E.Ef(y),0<y.length||0<a.labelNodes.count){if(y.length===1&&a.labelNodes.count===1){b=y[0];var z=a.labelNodes.first();if(E.wa(z.data)===b)return}b=new Un().addAll(y);var ne=new Un;a.labelNodes.each(function(re){re.data!==null&&(re=E.wa(re.data),re!==void 0&&ne.add(re))}),y=ne.copy(),y.hp(b),b=b.copy(),b.hp(ne),(0<y.count||0<b.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),b.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof pa)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof po)&&(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 po&&y.lh(ne)===x&&(ne=this.Lc(ne),ne!==null&&(ne.containingGroup=b)):(z.link=this.Kc(ne),z.link!==null&&b instanceof Di&&(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 po&&(b.containingGroup=a))}},Ll.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Di){var x=y.wa(a.data);if(x!==void 0){for(var 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 po)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 fi)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 fi){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 Di&&(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 Di||(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}Wt(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||!Rn(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 ce=oe.kh();ce!==null&&(ce.category=ue)}}y.isModified=!0}}else if(x===_o){var me=a.propertyName;a.object===y.model&&me==="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 Di&&(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 Di&&y.mh(z)===x&&I0(this,b,this.ii(z))}yd(y,x)}a=y.mh(a),a!==void 0&&b instanceof Di&&(a=this.Vb(a),I0(this,a,b))}},Dc.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Di){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($a,"parts",b,E,null,z,null),z=E.layerChanged,z!==null&&z(E,b,null)}}for(E=this.diagram.isTreePathToChildren,a=a.linksConnected;a.next();)b=a.value,b=(E?b.toNode:b.fromNode).data,y.lb(b)&&vd(y,x,b)}},Dc.prototype.insertLink=function(a,y,x){y=this.diagram.model;var E=a,b=x;return this.diagram.isTreePathToChildren||(E=x,b=a),E!==null&&b!==null?(y.qe(b.data,y.wa(E.data)),b.kh()):null},Dc.prototype.findLinkForKey=Dc.prototype.findLinkForKey,Dc.className="TreePartManager";function ar(a,y){this.kl=new Un,this.il=new Un,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,Io(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new $i,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 $i,this.Lt=new Vn,this.Wg=!1,this.o=null,this.undoManager=new Oa,a!==void 0&&(sn(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)+":"+ir(b)}}return y},ar.prototype.xA=function(a){a.change!==Na&&Et("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Po?(Px(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ar.prototype.Qv=function(a,y){var x=this,E=!1,b=new Un,z=new Un,ne=new Un,re=this.vh;a.changes.each(function(me){me.model===x&&(me.modelChange==="nodeDataArray"?me.change===xa?b.add(me.newValue):me.change===$a&&ne.add(me.oldValue):x.lb(me.object)?z.add(me.object):me.change!==_o||x.modelData!==me.object&&me.propertyName!=="modelData"?me.object!==null&&(re&&re.contains(me.object)?re.get(me.object).each(function(we){x.lb(we)&&z.add(we)}):me.object instanceof ar||x.ri()&&x.Jc(me.object)||wx(x,me.object).each(function(we){z.add(we)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(me){oe.add(x.wa(me)),y||z.add(me)});var ue=this.kl;ue.clear(),ne.each(function(me){ue.add(x.wa(me)),y&&z.add(me)}),a=x.cloneDeep(z.Fa());var ce=null;return E&&(ce===null&&(ce={}),ce.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(ce===null&&(ce={}),y?ce.removedNodeKeys=oe.Fa():ce.insertedNodeKeys=oe.Fa()),0<a.length&&(ce===null&&(ce={}),ce.modifiedNodeData=a),0<ue.count&&(ce===null&&(ce={}),y?ce.insertedNodeKeys=ue.Fa():ce.removedNodeKeys=ue.Fa()),ue.clear(),oe.clear(),ce},ar.prototype.cloneDeep=function(a){return Pp(this,a,!0)};function Pp(a,y,x,E,b,z){function ne(me,we){re?(me.__gohashid===void 0&&z.push(me),E.set(me,we)):(me=ia++,E.set(me,we),b.set(me,y))}if(!tn(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new $i),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new $i),oe=b.iterator;oe.next();){var ue=oe.key;if(oe.value===y&&(ue=E.get(ue)))return ue}if(Array.isArray(y)){oe=[],ne(y,oe);for(var ce=0;ce<y.length;ce++)oe.push(Pp(a,y[ce],!1,E,b,z))}else if(y instanceof st||y instanceof mi||y instanceof Bn||y instanceof hr||y instanceof Xi)oe=y.copy(),ne(y,oe);else{if(y instanceof da||y instanceof qt||y instanceof wn)return y;if(y instanceof Vn)oe=new Vn().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Un)oe=new Un().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof $i)oe=new $i().addAll(Pp(a,y.Fa(),!1,E,b,z)),ne(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),ne(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),ne(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),ne(y,oe);else for(ce in oe={},ne(y,oe),y)ce!=="__gohashid"&&(oe[ce]=Pp(a,y[ce],!1,E,b,z))}return x&&z.forEach(function(me){delete me.__gohashid}),oe}Ae=ar.prototype,Ae.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Ae.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},Ae.gp=function(a){a.name&&(this.name=a.name),a.dataFormat&&(this.dataFormat=a.dataFormat),a.isReadOnly&&(this.isReadOnly=!0),a.nodeKeyProperty&&(this.nodeKeyProperty=a.nodeKeyProperty),a.copiesArrays&&(this.copiesArrays=!0),a.copiesArrayObjects&&(this.copiesArrayObjects=!0),a.copiesKey===!1&&(this.copiesKey=!1),a.nodeCategoryProperty&&(this.nodeCategoryProperty=a.nodeCategoryProperty)};function Sx(a,y){y=y.modelData,tn(y)&&(a.dm(y),a.modelData=y)}Ae.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)},Ae.kv=function(a){Sx(this,a),a=a.nodeDataArray,sn(a)&&(this.dm(a),this.nodeDataArray=a)};function Px(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var ne=E.get(b);ne===null?(ne=new Un,ne.add(z),E.add(b,ne)):ne.add(z)}}var E=a.vh;E===null&&(E=new $i,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===$a)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function wx(a,y){for(var x=new Un,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];O0(a,y,b,b,x)}return x}function O0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var ne=x[z];if(ne===y)return b.add(E),!0;if(O0(a,y,ne,E,b))return!0}else if(tn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ne=x[z],ne===y)return b.add(E),!0;if(O0(a,y,ne,E,b))return!0}return!1}Ae.Pv=function(a,y){var x=this,E=!1,b=new Un,z=new Un,ne=new Un,re=this.vh;a.changes.each(function(ce){ce.model===x&&(ce.modelChange==="nodeDataArray"?ce.change===xa?b.add(ce.newValue):ce.change===$a&&ne.add(ce.oldValue):x.lb(ce.object)?z.add(ce.object):ce.change!==_o||x.modelData!==ce.object&&ce.propertyName!=="modelData"?ce.object!==null&&(re&&re.contains(ce.object)?re.get(ce.object).each(function(me){x.lb(me)&&z.add(me)}):ce.object instanceof ar||x.ri()&&x.Jc(ce.object)||wx(x,ce.object).each(function(me){z.add(me)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(x.wa(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(x.wa(ce)),y&&z.add(ce)}),a="",E&&(a+=`,
"modelData": `+xy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+bf(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+bf(this,z.Fa(),!0)),0<ue.count&&(a+=(y?this.Wv:this.Yv)+bf(this,ue.Fa(),!0)),ue.clear(),oe.clear(),a},Ae.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)&&Et("applyIncrementalJson cannot change Model properties"),Sx(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new $i;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)},Ae.$x=function(a,y){a.change!==Na&&Et("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Po?(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 }'},Ae.yA=function(a,y){return this.$x(a,y)},Ae.np=function(a){return a===void 0&&(a=fm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Ae.toJSON=function(a){return this.np(a)},Ae.Zw=function(a){var y=null;if(typeof a=="string")try{y=ht.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Et("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Et("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Ae.Ky=function(a){return this.Zw(a)},ar.constructGraphLinksModel=function(){return new ar},Ae=ar.prototype,Ae.dm=function(a){if(sn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(tn(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Et("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(tn(a)){for(y in a)if(x=a[y],tn(x)&&(x=this.dm(x),a[y]=x,y==="points"&&Array.isArray(x))){for(b=x.length%2===0,E=0;E<x.length;E++)if(typeof x[E]!="number"){b=!1;break}if(b){for(b=new Vn,E=0;E<x.length/2;E++)b.add(new st(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return AS(a)}return a},Ae.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()):sn(a)?bf(this,a):tn(a)?xy(this,a):typeof a=="function"?"null":a.toString()};function bf(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Ui;b.add("["),x&&1<E&&b.add(`
`);for(var z=0;z<E;z++){var ne=y[z];ne!==void 0&&(0<z&&(b.add(","),x&&b.add(`
`)),b.add(a.sm(ne)))}return x&&1<E&&b.add(`
`),b.add("]"),b.toString()}function Cx(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function bu(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function xy(a,y){var x=y;if(x instanceof st)y={class:"go.Point",x:bu(x.x),y:bu(x.y)};else if(x instanceof mi)y={class:"go.Size",width:bu(x.width),height:bu(x.height)};else if(x instanceof Bn)y={class:"go.Rect",x:bu(x.x),y:bu(x.y),width:bu(x.width),height:bu(x.height)};else if(x instanceof hr)y={class:"go.Margin",top:bu(x.top),right:bu(x.right),bottom:bu(x.bottom),left:bu(x.left)};else if(x instanceof Xi)x.sb()?y={class:"go.Spot",x:bu(x.x),y:bu(x.y),offsetX:bu(x.offsetX),offsetY:bu(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof da){if(y={class:"go.Brush",type:x.type.name},x.type===Gh?y.color=x.color:(x.type===Bh||x.type===Nc)&&(y.start=x.start,y.end=x.end,x.type===Nc&&(x.startRadius!==0&&(y.startRadius=bu(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=bu(x.endRadius)))),x.colorStops!==null){var E={};for(x=x.colorStops.iterator;x.next();)E[x.key]=x.value;y.colorStops=E}}else x instanceof qt?(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(Ln)||(y.spot2=x.spot2),x.type===qt.o&&(y.path=qt.ia(x))):x instanceof wn&&(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 Vn){var ne="[";for(z=z.iterator;z.next();){var re=z.value;1<ne.length&&(ne+=","),ne+=a.sm(re.x),ne+=",",ne+=a.sm(re.y)}ne+="]",E+=ne}else E+=a.sm(z)}return E+"}"}function Fu(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function AS(a){if(typeof a!="object")return a;var y=a.class||"";if(y==="NaN")return NaN;if(y==="Date")return new Date(a.value);if(y.indexOf("go.")!==0)return a;y=y.substr(3);var x=a;if(y==="Point")x=new st(Fu(a.x),Fu(a.y));else if(y==="Size")x=new mi(Fu(a.width),Fu(a.height));else if(y==="Rect")x=new Bn(Fu(a.x),Fu(a.y),Fu(a.width),Fu(a.height));else if(y==="Margin")x=new hr(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 Xi(Fu(a.x),Fu(a.y),Fu(a.offsetX),Fu(a.offsetY));else if(y==="Brush"){if(x=new da,x.type=ri(da,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Xi&&(x.start=a.start),a.end instanceof Xi&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=Fu(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=Fu(a.endRadius)),a=a.colorStops,tn(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=qt.parse(a.path):x=new qt,x.type=ri(qt,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 Xi&&(x.spot1=a.spot1),a.spot2 instanceof Xi&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Py(E),typeof E=="function"&&(x=ri(E,a.name)));return x}Ae.Pe=function(a){return this.Lt.add(a),this},Ae.ik=function(a){this.Lt.remove(a)},Ae.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)},Ae.cb=function(a,y,x,E,b,z,ne){al(this,"",a,y,x,E,b,z,ne)},Ae.g=function(a,y,x,E,b){al(this,"",_o,a,this,y,x,E,b)},Ae.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 pr;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)),ps(x,E,b)}else a.change===xa?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,tn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Ai(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&ji(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!sn(E)&&a.propertyName&&(E=Qs(a.object,a.propertyName)),sn(E)&&typeof x=="number"&&(a=a.newValue,y?Ai(E,x):ji(E,x,a))):Et("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===$a?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,tn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&ji(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Ai(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!sn(E)&&a.propertyName&&(E=Qs(a.object,a.propertyName)),sn(E)&&typeof x=="number"&&(a=a.oldValue,y?ji(E,x,a):Ai(E,x))):Et("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Na&&Et("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}},Ae=ar.prototype,Ae.La=function(a,y){y===void 0&&(y=""),al(this,"SourceChanged",Na,y,a,null,null)},Ae.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Et("Key value for node data "+a+" is not a number or a string: "+y)}}},Ae.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&&(ps(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 ps(a,x,y)}};function Ff(a){return typeof a=="number"||typeof a=="string"}Ae.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Ae.hc=function(a){return a===null&&Et("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Ff(a)?this.kb.I(a):null},Ae.$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))){ps(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;ps(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;ps(a,y,x)}}}}},Ae.xf=function(a){a!==null&&(Go(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&&Et("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,ji(a.Tc,E,y)),al(a,"nodeDataArray",xa,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Ae.Fy=function(a){if(sn(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)},Ae.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;Ai(a.Tc,E)}al(a,"nodeDataArray",$a,"nodeDataArray",a,y,null,E,null),a.qp(y)}Ae.nA=function(a){if(sn(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)},Ae.$z=function(a){if(a!==this.nodeDataArray&&sn(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()}},Ae.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof Un&&this.Vf.add(y,a))},Ae.Lv=function(){},Ae.fm=function(){},Ae.em=function(){},Ae.qp=function(){};function vd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Un,a.Vf.add(y,E)),E.add(x)}}function yd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Un&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function hm(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Un?a:null)}Ae.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ar.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):k0(this,a,!0),tn(a)&&Io(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 Io(E),E}if(x&&tn(y)){x=(x=y.constructor)?new x:{},b=a.copiesKey||typeof a.nodeKeyProperty!="string"?null:a.nodeKeyProperty;for(E in y)if(E==="__gohashid")x.__gohashid=void 0;else if(E===b)x[b]=void 0;else{var z=Qs(y,E),ne=fm(a,z);ne==="GraphObject"||ne==="Diagram"||ne==="Layer"||ne==="RowColumnDefinition"||ne==="AnimationManager"||ne==="Tool"||ne==="CommandHandler"||ne==="Layout"||ne==="InputEvent"||ne==="DiagramEvent"||z instanceof ar||z instanceof Oa||z instanceof Po||z instanceof pr||(z=k0(a,z,!1)),ps(x,E,z)}return Io(x),x}return y instanceof st||y instanceof mi||y instanceof Bn||y instanceof Xi||y instanceof hr?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 Vt&&(Fx=!0,Ci('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Ci(" Is that really your intent?"));var E=Qs(a,y);E!==x&&(ps(a,y,x),this.Fs(a,y,E,x))},Ae=ar.prototype,Ae.set=function(a,y,x){this.setDataProperty(a,y,x)},Ae.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])}},Ae.Ay=function(a,y){this.ts(a,-1,y)},Ae.ts=function(a,y,x){0>y&&(y=a.length),ji(a,y,x),al(this,"",xa,"",a,null,x,null,y)},Ae.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Et("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Ai(a,y),al(this,"",$a,"",a,x,null,y,null)},Ae.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;Et("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ae.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&&(ps(a,x,y),al(this,"nodeCategory",_o,x,a,E,y))}else ps(a,x,y)}},Ae.lm=function(a,y){this.jm(y,this.Ro(a))},Ae.Tl=function(){return!1},Ae.Wj=function(){return!1},Ae.ri=function(){return!1},Ae.xs=function(){return!1},Ae.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]:ht.go!==void 0&&ht.go[a]?ht.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 ps(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===""&&Et("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Et("Cannot set Model.nodeKeyProperty when there is existing node data"),this.Th=a,this.g("nodeKeyProperty",y,a))}},makeUniqueKeyFunction:{get:function(){return this.bl},set:function(a){var y=this.bl;y!==a&&(this.bl=a,this.g("makeUniqueKeyFunction",y,a))}},nodeDataArray:{get:function(){return this.Tc},set:function(a){var y=this.Tc;if(y!==a){this.kb.clear(),this.Lv();for(var x=a.length,E=0;E<x;E++){var b=a[E];tn(b)||Et("Model.nodeDataArray must only contain Objects, not: "+b),Go(b)}for(this.Tc=a,E=new Vn,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=ht.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Et("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=ht[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof ar?y=a:Et("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=ps,ed.Brush=da,ed.ChangedEvent=pr,ed.Geometry=qt,ed.Margin=hr,ed.Panel=ui,ed.Point=st,ed.Rect=Bn,ed.Size=mi,ed.Spot=Xi,ed.Transaction=Po,ed.UndoManager=Oa;function tl(a,y,x,E){Io(this),this._isFrozen=!1,a===void 0&&(a=""),y===void 0&&(y=a),x===void 0&&(x=null),this.j=-1,this.xd=null,this.xl=a,this.wl=this.to=0,this.Cr=null,this.wn=!1,this.sl=y,this.Im=x,E===void 0?(this.el=Mx,this.wk=null):(this.el=gm,this.wk=E),this.st=new Un}tl.prototype.copy=function(){var a=new tl;return a.xl=this.xl,a.to=this.to,a.wl=this.wl,a.Cr=this.Cr,a.wn=this.wn,a.sl=this.sl,a.Im=this.Im,a.el=this.el,a.wk=this.wk,a},Ae=tl.prototype,Ae.qb=function(a){a.classType===tl&&(this.mode=a)},Ae.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Ae.freeze=function(){return this._isFrozen=!0,this},Ae.ka=function(){return this._isFrozen=!1,this},Ae.Kx=function(a){return a===void 0&&(a=null),this.mode=gm,this.backConverter=a,this},Ae.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Ae.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)}Ae.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!==""&&ps(a,x,z);else try{if(x!==""){var ne=b(z,a);ps(a,x,ne)}else b(z,a)}catch(re){}}}},Ae.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):ps(y,x,ne);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var ue=E.itemIndex,ce=E.panel.itemArray;oe.ov(ce,ue),oe.ts(ce,ue,ne)}}else try{if(x!==""){var me=z(ne,y,oe);oe!==null?oe.setDataProperty(y,x,me):ps(y,x,me)}else{var we=z(ne,y,oe);if(we!==void 0&&oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Fe=E.itemIndex,De=E.panel.itemArray;oe.ov(De,Fe),oe.ts(De,Fe,we)}}}catch(_e){}}finally{this.st.remove(a)}}}},Qe.Object.defineProperties(tl.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Pn(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Pn(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Pn(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Pn(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Pn(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Pn(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Pn(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Pn(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 wn(tl,"OneWay",1),gm=new wn(tl,"TwoWay",2);tl.className="Binding",tl.parseEnum=function(a,y){return function(x){return x=ri(a,x),x===null?y:x}},tl.toString=ir,tl.OneWay=Mx,tl.TwoWay=gm;function na(a,y,x){ar.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new Un,this.wb=new $i,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&&(sn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Wt(na,ar),na.constructGraphLinksModel=ar.constructGraphLinksModel,na.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},Ae=na.prototype,Ae.clear=function(){ar.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Ae.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)+":"+ir(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},Ae.Qv=function(a,y){this.linkKeyProperty===""&&Et("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ar.prototype.Qv.call(this,a,y),E=this,b=new Un,z=new Un,ne=new Un,re=this.vh;a.changes.each(function(ce){ce.model===E&&(ce.modelChange==="linkDataArray"?ce.change===xa?b.add(ce.newValue):ce.change===$a&&ne.add(ce.oldValue):E.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(me){E.Jc(me)&&z.add(me)}):ce.object instanceof ar||E.lb(ce.object)||Lx(E,ce.object).each(function(me){z.add(me)})))});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(E.Ac(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(E.Ac(ce)),y&&z.add(ce)}),a=E.cloneDeep(z.Fa()),0<oe.count&&(x===null&&(x={}),y?x.removedLinkKeys=oe.Fa():x.insertedLinkKeys=oe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<ue.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ue.Fa():x.removedLinkKeys=ue.Fa()),ue.clear(),oe.clear(),x},Ae.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},Ae.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)},Ae.Rv=function(){var a=ar.prototype.Rv.call(this),y=`,
"linkDataArray": `+bf(this,this.linkDataArray,!0);return a+y},Ae.kv=function(a){ar.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function Lx(a,y){for(var x=new Un,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];O0(a,y,b,b,x)}return x}Ae.Pv=function(a,y){this.linkKeyProperty===""&&Et("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ar.prototype.Pv.call(this,a,y),E=this,b=new Un,z=new Un,ne=new Un,re=this.vh;a.changes.each(function(ce){ce.model===E&&(ce.modelChange==="linkDataArray"?ce.change===xa?b.add(ce.newValue):ce.change===$a&&ne.add(ce.oldValue):E.Jc(ce.object)?z.add(ce.object):ce.object!==null&&(ce.object!==null&&re&&re.contains(ce.object)?re.get(ce.object).each(function(me){E.Jc(me)&&z.add(me)}):ce.object instanceof ar||E.lb(ce.object)||Lx(E,ce.object).each(function(me){z.add(me)})))});var oe=this.il;oe.clear(),b.each(function(ce){oe.add(E.Ac(ce)),y||z.add(ce)});var ue=this.kl;return ue.clear(),ne.each(function(ce){ue.add(E.Ac(ce)),y&&z.add(ce)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+bf(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+bf(this,z.Fa(),!0)),0<ue.count&&(a+=(y?this.Vv:this.Xv)+bf(this,ue.Fa(),!0)),ue.clear(),oe.clear(),a},Ae.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)&&Et("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)},na.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),ps(x,E,b);return}}else if(a.change===xa){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,tn(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)):(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)):0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue));return}}else if(a.change===$a){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,tn(a)&&typeof x=="number"&&(E=this.Ac(a),y?(this.$f.add(a),this.md[x]!==a&&this.md.splice(x,0,a),E!==void 0&&this.wb.add(E,a)):(this.$f.remove(a),this.md[x]===a&&this.md.splice(x,1),E!==void 0&&this.wb.remove(E)));return}if(a.modelChange==="linkLabelKeys"){E=this.Ef(a.object),Array.isArray(E)&&typeof x=="number"&&(y?0>E.indexOf(a.newValue)&&E.splice(x,0,a.newValue):(x=E.indexOf(a.newValue),0<=x&&E.splice(x,1)));return}}ar.prototype.changeState.call(this,a,y)}},Ae=na.prototype,Ae.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),ps(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ae.yx=function(a){return bc(this,a,!0)},Ae.wv=function(a,y){wp(this,a,y,!0)},Ae.Bx=function(a){return bc(this,a,!1)},Ae.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;Et((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),ps(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 ps(y,b,x)}}Ae.zx=function(a){return T0(this,a,!0)},Ae.xv=function(a,y){Cp(this,a,y,!0)},Ae.Cx=function(a){return T0(this,a,!1)},Ae.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&&(ps(y,b,x),al(a,E?"linkFromPortId":"linkToPortId",_o,b,y,z,x),typeof b=="string"&&a.La(y,b))}else ps(y,b,x)}}Ae.Ef=function(a){if(a===null)return R0;var y=this.je;return y===""?R0:(a=Qs(a,y),a===void 0?R0:a)},Ae.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(ps(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 ps(a,x,y)}},Ae.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 Et(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Ae.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",$a,x,a,y,null,b,null)))}else E!==void 0&&Et(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ae.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Et("Key value for link data "+a+" is not a number or a string: "+y)}}},Ae.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&&(ps(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 ps(a,x,y)}},Ae.jh=function(a){return a===null&&Et("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Ff(a)?this.wb.I(a):null},Ae.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))){ps(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;ps(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;ps(a,y,x)}}}}},Ae.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ae.fi=function(a){a!==null&&(Go(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&&Et("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)}Ae.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)},Ae.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",$a,"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)}Ae.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)},Ae.Zz=function(a){if(this.linkKeyProperty===""&&Et("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&sn(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)}Ae.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):k0(this,a,!0),tn(a)&&(Io(a),this.lf!==""&&ps(a,this.lf,void 0),this.mf!==""&&ps(a,this.mf,void 0),this.je!==""&&ps(a,this.je,[])),a},Ae.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Qs(a,y)},Ae.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Et("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Ae.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),ps(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 ps(a,x,y)}},na.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||ps(a,this.Je,void 0),a)},na.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&&(ps(a,y,x),this.Fs(a,y,E,x))},Ae=na.prototype,Ae.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])}},Ae.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;ps(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,ps(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))}},Ae.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;ps(a,E,x),al(this,"nodeGroupKey",_o,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ae.Lv=function(){ar.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)wy(this,a[x])},Ae.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Si();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;al(this,"nodeGroupKey",_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]);ki(x)}},Ae.em=function(a){ar.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&vd(this,y,a)},Ae.qp=function(a){ar.prototype.qp.call(this,a);var y=this.lh(a);yd(this,y,a)},Ae.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;Et("getCategoryForLinkData found a non-string category for "+a+": "+y)},na.prototype.getLinkCategoryForData=function(a){return this.ps(a)},na.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&&(ps(a,x,y),al(this,"linkCategory",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else ps(a,x,y)}},na.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Ae=na.prototype,Ae.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))}Ae.Wj=function(){return!0},Ae.ri=function(){return!0},Ae.xs=function(){return!0},Ae.Xj=function(){return!0},Qe.Object.defineProperties(na.prototype,{archetypeNodeData:{get:function(){return this.Ri},set:function(a){var y=this.Ri;y!==a&&(this.Ri=a,this.g("archetypeNodeData",y,a))}},linkFromKeyProperty:{get:function(){return this.lf},set:function(a){var y=this.lf;y!==a&&(this.lf=a,this.g("linkFromKeyProperty",y,a))}},linkToKeyProperty:{get:function(){return this.mf},set:function(a){var y=this.mf;y!==a&&(this.mf=a,this.g("linkToKeyProperty",y,a))}},linkFromPortIdProperty:{get:function(){return this.ej},set:function(a){var y=this.ej;y!==a&&(this.ej=a,this.g("linkFromPortIdProperty",y,a))}},linkToPortIdProperty:{get:function(){return this.fj},set:function(a){var y=this.fj;y!==a&&(this.fj=a,this.g("linkToPortIdProperty",y,a))}},linkLabelKeysProperty:{get:function(){return this.je},set:function(a){var y=this.je;y!==a&&(this.je=a,this.g("linkLabelKeysProperty",y,a))}},linkDataArray:{get:function(){return this.md},set:function(a){var y=this.md;if(y!==a){this.wb.clear();for(var x=a.length,E=0;E<x;E++){var b=a[E];tn(b)||Et("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Go(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Vn,b=0;b<x;b++){var z=a[b],ne=this.Ac(z);ne===void 0||this.wb.I(ne)!==null?E.add(z):this.wb.add(ne,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new Un,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,al(this,"linkDataArray",_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"}}}),na.prototype.setCategoryForLinkData=na.prototype.lp,na.prototype.getCategoryForLinkData=na.prototype.ps,na.prototype.assignAllDataProperties=na.prototype.Do,na.prototype.setGroupKeyForNodeData=na.prototype.mp,na.prototype.getGroupKeyForNodeData=na.prototype.lh,na.prototype.isGroupForNodeData=na.prototype.Yu,na.prototype.copyLinkData=na.prototype.Jo,na.prototype.mergeLinkDataArray=na.prototype.Zz,na.prototype.removeLinkDataCollection=na.prototype.lA,na.prototype.removeLinkData=na.prototype.bm,na.prototype.addLinkDataCollection=na.prototype.Ey,na.prototype.addLinkData=na.prototype.fi,na.prototype.containsLinkData=na.prototype.Jc,na.prototype.makeLinkDataKeyUnique=na.prototype.Bs,na.prototype.findLinkDataForKey=na.prototype.jh,na.prototype.setKeyForLinkData=na.prototype.Ks,na.prototype.getKeyForLinkData=na.prototype.Ac,na.prototype.removeLabelKeyForLinkData=na.prototype.Qx,na.prototype.addLabelKeyForLinkData=na.prototype.Bu,na.prototype.setLabelKeysForLinkData=na.prototype.Ls,na.prototype.getLabelKeysForLinkData=na.prototype.Ef,na.prototype.setToPortIdForLinkData=na.prototype.Cv,na.prototype.getToPortIdForLinkData=na.prototype.Cx,na.prototype.setFromPortIdForLinkData=na.prototype.xv,na.prototype.getFromPortIdForLinkData=na.prototype.zx,na.prototype.setToKeyForLinkData=na.prototype.Bv,na.prototype.getToKeyForLinkData=na.prototype.Bx,na.prototype.setFromKeyForLinkData=na.prototype.wv,na.prototype.getFromKeyForLinkData=na.prototype.yx,na.prototype.clear=na.prototype.clear;var R0=Object.freeze([]);na.className="GraphLinksModel",ed.GraphLinksModel=na,ar.constructGraphLinksModel=ar.constructGraphLinksModel=function(){return new na},ar.initDiagramModel=Sy=function(){return new na};function Bu(a,y){ar.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(sn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Wt(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},Ae=Bu.prototype,Ae.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)+":"+ir(b)}}return y},Ae.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},Ae.gp=function(a){ar.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Ae.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Et("applyIncrementalJson cannot change Model properties"),ar.prototype.fp.call(this,a)},Ae.Vl=function(a){return a},Ae.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Qs(a,y),y!==void 0)){if(Ff(y))return y;Et("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Ae.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),ps(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 ps(a,x,y)}},Ae.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Qs(a,y),y===void 0)?"":typeof y=="string"?y:(Et("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&&(ps(a,x,y),al(this,"parentLinkCategory",_o,x,a,E,y),typeof x=="string"&&this.La(a,x))}else ps(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||ps(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&&(ps(a,y,x),this.Fs(a,y,E,x))},Ae=Bu.prototype,Ae.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)},Ae.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;ps(a,E,x),al(this,"nodeParentKey",_o,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ae.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Si();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;al(this,"nodeParentKey",_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]);ki(x)}},Ae.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)},Ae.qp=function(a){ar.prototype.qp.call(this,a);var y=this.mh(a);yd(this,y,a)},Ae.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Ae.Tl=function(){return!0},Ae.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){vs.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=td,this.Ti=0,this.Zv=new st,this.Jp=this.me=0,this.Xr=new ym,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=td,this.K=Mu,this.nd=bp,this.hd=gy,this.tf=6,this.Nn=G0,a&&Object.assign(this,a)}Wt(Os,vs),Os.prototype.cloneProtected=function(a){vs.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):vs.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 Vn;y.addAll(a.iterator),a=new Vn;var x=new Vn,E=this.sort(y),b,z,ne=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,ue=this.radius;(!isFinite(ue)||0>=ue)&&(ue=NaN);var ce=this.aspectRatio;(!isFinite(ce)||0>=ce)&&(ce=1);var me=this.startAngle;isFinite(me)||(me=0);var we=this.sweepAngle;if((!isFinite(we)||360<we||1>we)&&(we=360),y=this.spacing,isFinite(y)||(y=NaN),re===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 Vn,E.addAll(a),E.addAll(x)):(this.arrangement===nd&&x.reverse(),E=new Vn,E.addAll(x),E.addAll(a))}oe=E.length;for(var Fe=z=b=0;Fe<E.length;Fe++){var De=me+we*z*(this.direction===Mu?1:-1)/oe,_e=E.M(Fe).diameter;isNaN(_e)&&(_e=Lf(E.M(Fe),De)),360>we&&(Fe===0||Fe===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++)Fe=E.M(ne),b=E.M(ne===oe-1?0:ne+1),isNaN(Fe.diameter)&&Lf(Fe,0),isNaN(b.diameter)&&Lf(b,0),z=Math.max(z,(Fe.diameter+b.diameter)/2);ne=z+y,re===Qh?ue=(z+y)/(2*Math.PI/oe):ue=_0(this,ne*(360<=we?oe:oe-1),ce,me*Math.PI/180,we*Math.PI/180)}else ue=_0(this,b+(360<=we?oe:oe-1)*(re!==nd?y:1.6*y),ce,me*Math.PI/180,we*Math.PI/180);z=ue*ce}else if(z=ue*ce,Fe=Cy(this,ue,z,me*Math.PI/180,we*Math.PI/180),isNaN(y))(re===td||re===nd)&&(y=(Fe-b)/(360<=we?oe:oe-1));else if(re===td||re===nd)Fe=(Fe-b)/(360<=we?oe:oe-1),Fe<y?(ue=_0(this,b+y*(360<=we?oe:oe-1),ce,me*Math.PI/180,we*Math.PI/180),z=ue*ce):y=Fe;else{for(ne=-1/0,b=0;b<oe;b++)De=E.M(b),_e=E.M(b===oe-1?0:b+1),isNaN(De.diameter)&&Lf(De,0),isNaN(_e.diameter)&&Lf(_e,0),ne=Math.max(ne,(De.diameter+_e.diameter)/2);ne+=y,b=_0(this,ne*(360<=we?oe:oe-1),ce,me*Math.PI/180,we*Math.PI/180),b>ue?(ue=b,z=ue*ce):ne=Fe/(360<=we?oe:oe-1)}if(this.kw=re,this.lc=ue,this.Zm=ce,this.lw=me,this.Wp=we,this.Ti=y,this.me=z,this.Jp=ne,y=E,E=this.kw,re=this.lc,ue=this.lw,ce=this.Wp,me=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,me+(y+oe)/2)/Math.PI;break;case Qh:ne=ce/y.length}if(this.direction===ig){switch(E){case Bf:vm(this,a,ue,Mf);break;case td:mm(this,a,ue,Mf);break;case Qh:pm(this,a,ce/2,ue,Mf)}switch(E){case Bf:vm(this,x,ue+ne,Mu);break;case td:mm(this,x,ue+ne,Mu);break;case Qh:pm(this,x,ce/2,ue+ne,Mu)}}else{switch(E){case Bf:vm(this,x,ue,Mf);break;case td:mm(this,x,ue,Mf);break;case Qh:pm(this,x,ce/2,ue,Mf)}switch(E){case Bf:vm(this,a,ue+ne,Mu);break;case td:mm(this,a,ue+ne,Mu);break;case Qh:pm(this,a,ce/2,ue+ne,Mu)}}}else switch(E){case Bf:vm(this,y,ue,this.direction);break;case td:mm(this,y,ue,this.direction);break;case Qh:pm(this,y,ce,ue,this.direction);break;case nd:Ix(this,y,ce,ue,this.direction)}else Ix(this,y,ce,ue-ce/2,Mu)}this.updateParts(),this.network=null,this.isValidLayout=!0};function pm(a,y,x,E,b){var z=a.Wp,ne=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var ue=E+(b===Mu?oe*x/(360<=z?re:re-1):-(oe*x)/re),ce=y.M(oe),me=ne*Math.tan(ue)/a;me=Math.sqrt((ne*ne+a*a*me*me)/(1+me*me)),ce.centerX=me*Math.cos(ue),ce.centerY=me*Math.sin(ue),ce.actualAngle=180*ue/Math.PI}}function mm(a,y,x,E){var b=a.lc,z=a.me,ne=a.Ti;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var ue=y.M(oe),ce=y.M(oe===re-1?0:oe+1),me=z*Math.sin(x);ue.centerX=b*Math.cos(x),ue.centerY=me,ue.actualAngle=180*x/Math.PI,isNaN(ue.diameter)&&Lf(ue,0),isNaN(ce.diameter)&&Lf(ce,0),ue=j0(a,b,z,E===Mu?x:-x,(ue.diameter+ce.diameter)/2+ne),x+=E===Mu?ue:-ue}}function vm(a,y,x,E){var b=a.lc,z=a.me,ne=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var ue=y.M(oe);ue.centerX=b*Math.cos(x),ue.centerY=z*Math.sin(x),ue.actualAngle=180*x/Math.PI,ue=j0(a,b,z,E===Mu?x:-x,ne),x+=E===Mu?ue:-ue}}function Ix(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new ym,360>x){for(z=E+(b===Mu?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,kx(a,y,x,E,b)}else Ox(a,y,x,E,b);a.Xr.commit(y)}function Ox(a,y,x,E,b){var z=a.lc,ne=a.Ti,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),ue=a.me*Math.sin(E*Math.PI/180),ce=y.Fa();if(ce.length===3)ce[0].centerX=z,ce[0].centerY=0,ce[1].centerX=ce[0].centerX-ce[0].width/2-ce[1].width/2-ne,ce[1].y=ce[0].y,ce[2].centerX=(ce[0].centerX+ce[1].centerX)/2,ce[2].y=ce[0].y-ce[2].height-ne;else if(ce.length===4)ce[0].centerX=z,ce[0].centerY=0,ce[2].centerX=-ce[0].centerX,ce[2].centerY=ce[0].centerY,ce[1].centerX=0,ce[1].y=Math.min(ce[0].y,ce[2].y)-ce[1].height-ne,ce[3].centerX=0,ce[3].y=Math.max(ce[0].y+ce[0].height+ne,ce[2].y+ce[2].height+ne);else{z=st.alloc();for(var me=0;me<ce.length&&(ce[me].centerX=oe,ce[me].centerY=ue,!(me>=ce.length-1));me++)Tx(a,oe,ue,ce,me,b,z)||Rx(a,oe,ue,ce,me,b,z),oe=z.x,ue=z.y;if(st.free(z),a.mj++,!(23<a.mj)){oe=ce[0].centerX,ue=ce[0].centerY,z=ce[ce.length-1].centerX,me=ce[ce.length-1].centerY;var we=Math.abs(oe-z)-((ce[0].width+ce[ce.length-1].width)/2+ne),Fe=Math.abs(ue-me)-((ce[0].height+ce[ce.length-1].height)/2+ne);ne=0,1>Math.abs(Fe)?Math.abs(oe-z)<(ce[0].width+ce[ce.length-1].width)/2&&(ne=0):ne=0<Fe?Fe:1>Math.abs(we)?0:we,oe=Math.abs(z)>Math.abs(me)?0<z!=ue>me:0<me!=oe<z,(oe=b===Mu?oe:!oe)&&(ne=-Math.abs(ne),ne=Math.min(ne,-ce[ce.length-1].width),ne=Math.min(ne,-ce[ce.length-1].height)),a.Xr.compare(ne,ce),1<Math.abs(ne)&&(a.lc=8>a.mj?a.lc-ne/(2*Math.PI):5>ce.length&&10<ne?a.lc/2:a.lc-(0<ne?1.7:-2.3),a.me=a.lc*re,Ox(a,y,x,E,b))}}}function kx(a,y,x,E,b){for(var z=a.lc,ne=a.me,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),ue=ne*Math.sin(E*Math.PI/180),ce=st.alloc(),me=y.Fa(),we=0;we<me.length&&(me[we].centerX=oe,me[we].centerY=ue,!(we>=me.length-1));we++)Tx(a,oe,ue,me,we,b,ce)||Rx(a,oe,ue,me,we,b,ce),oe=ce.x,ue=ce.y;if(st.free(ce),a.mj++,!(23<a.mj)){if(oe=Math.atan2(ue,oe),oe=b===Mu?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+ne)/2,ne=a.Xr,Math.abs(z)<Math.abs(ne.Pl))for(ne.Pl=z,ne.mk=[],ne.tm=[],oe=0;oe<me.length;oe++)ne.mk[oe]=me[oe].bounds.x,ne.tm[oe]=me[oe].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*re,kx(a,y,x,E,b))}}function Tx(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,ue=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ce=!1;if(0<=x!=(z===Mu)){if(z=y+a,z>re){if(z=y-a,z<-re)return ne.x=z,ne.y=ue,!1;ce=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ne.x=z,ne.y=ue,!1;ce=!0}return ue=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==ce&&(ue=-ue),Math.abs(x-ue)>(E[b].height+E[b+1].height)/2?(ne.x=z,ne.y=ue,!1):(ne.x=z,ne.y=ue,!0)}function Rx(a,y,x,E,b,z,ne){var re=a.lc,oe=a.me,ue=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Mu)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ne.x=ue,ne.y=z;return}E=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ne.x=ue,ne.y=z;return}E=!0}ue=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==E&&(ue=-ue),ne.x=ue,ne.y=z}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 st(0,0):(x.x=this.arrangementOrigin.x+this.lc,x.y=this.arrangementOrigin.y+this.me);for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;b.x+=x.x,b.y+=x.y,b.commit()}a&&(this.group.Va(),a=this.group.position.copy(),x=this.group.location.copy(),y=y.re(x.re(a)),this.group.move(y),this.Zv=y.re(a))},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 ce=Math.sin(oe);ne+=Math.sqrt(1-a*a*ce*ce)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ne:4*(y>x?y:x)*ne}function _0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?Cy(a,1,x,E,b):Cy(a,1,x))}function j0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,ne=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(E+re*a);if(ne+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,ne>=b)return re*a}}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:Et("Invalid sorting type.")}return a};function IS(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Vn;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 Vn;for(var oe=0,ue=0;ue<y.length;ue++){var ce=y[ue].length;if(ce===1)E.push(ue);else if(ce===0)b.add(a.M(ue));else{if(oe===0)x.push(ue);else{for(var me=ce=1/0,we=-1,Fe=[],De=0;De<x.length;De++)0>y[x[De]].indexOf(x[De===x.length-1?0:De+1])&&Fe.push(De===x.length-1?0:De+1);if(Fe.length===0)for(De=0;De<x.length;De++)Fe.push(De);for(De=0;De<Fe.length;De++){for(var _e=Fe[De],pt=y[ue],rt=0,bt=0;bt<ne.length;bt++){var It=z[ne[bt]],Rt=z[re[bt]];if(It<Rt){var Kt=It;It=Rt}else Kt=Rt;if(Kt<_e&&_e<=It)for(Rt=0;Rt<pt.length;Rt++){var fn=pt[Rt];0>x.indexOf(fn)||Kt<z[fn]&&z[fn]<It||Kt===z[fn]||It===z[fn]||rt++}else for(Rt=0;Rt<pt.length;Rt++)fn=pt[Rt],0>x.indexOf(fn)||Kt<z[fn]&&z[fn]<It&&Kt!==z[fn]&&It!==z[fn]&&rt++}for(pt=rt,bt=rt=0;bt<y[ue].length;bt++)Kt=x.indexOf(y[ue][bt]),0<=Kt&&(Kt=Math.abs(_e-(Kt>=_e?Kt+1:Kt)),rt+=Kt<x.length+1-Kt?Kt:x.length+1-Kt);for(bt=0;bt<ne.length;bt++)Kt=z[ne[bt]],It=z[re[bt]],Kt>=_e&&Kt++,It>=_e&&It++,Kt>It&&(Rt=It,It=Kt,Kt=Rt),It-Kt<(x.length+2)/2==(Kt<_e&&_e<=It)&&rt++;(pt<ce||pt===ce&&rt<me)&&(ce=pt,me=rt,we=_e)}for(x.splice(we,0,ue),ce=0;ce<x.length;ce++)z[x[ce]]=ce;for(ce=0;ce<y[ue].length;ce++)me=y[ue][ce],0<=x.indexOf(me)&&(ne.push(ue),re.push(me))}oe++}}for(ne=x.length;;){for(z=!0,re=0;re<E.length;re++)if(oe=E[re],ue=y[oe][0],ce=x.indexOf(ue),0<=ce){for(we=me=0;we<y[ue].length;we++)Fe=x.indexOf(y[ue][we]),0>Fe||Fe===ce||(De=Fe>ce?Fe-ce:ce-Fe,me+=Fe<ce!=De>ne-De?1:-1);x.splice(0>me?ce:ce+1,0,oe),E.splice(re,1),re--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},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 wn(Os,"ConstantSpacing",0),Bf=new wn(Os,"ConstantDistance",1),Qh=new wn(Os,"ConstantAngle",2),nd=new wn(Os,"Packed",3),Mu=new wn(Os,"Clockwise",4),Mf=new wn(Os,"Counterclockwise",5),ig=new wn(Os,"BidirectionalLeft",6),Ep=new wn(Os,"BidirectionalRight",7),z0=new wn(Os,"Forwards",8),Z0=new wn(Os,"Reverse",9),H0=new wn(Os,"Ascending",10),W0=new wn(Os,"Descending",11),bp=new wn(Os,"Optimized",12),G0=new wn(Os,"Pythagorean",13),_g=new wn(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)}Wt(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}Wt(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)}Wt($0,hc),$0.className="CircularEdge";function ql(a){vs.call(this),this.ah=null,this.An=0,this.$d=new mi(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)}Wt(ql,vs),ql.prototype.cloneProtected=function(a){vs.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=Si(),ce=0;ce<re+y.vertexes.count+2;ce++)ue[ce]=null;re=0,ne.reset();for(var me=Bn.alloc();ne.next();)if(ce=ne.value,this.computeBounds(ce,me),oe)oe=!1,b=me.x+me.width/2,z=me.y+me.height/2,ue[0]=new st(me.x+me.width+E.width,me.y),ue[1]=new st(me.x,me.y+me.height+E.height),re=2;else{var we=jx(ue,re,b,z,me.width,me.height,E),Fe=ue[we],De=new st(Fe.x+me.width+E.width,Fe.y),_e=new st(Fe.x,Fe.y+me.height+E.height);for(we+1<re&&ue.splice(we+1,0,null),ue[we]=De,ue[we+1]=_e,re++,we=Fe.x-me.x,Fe=Fe.y-me.y,ce=ce.vertexes.iterator;ce.next();)De=ce.value,De.centerX+=we,De.centerY+=Fe}for(Bn.free(me),ce=y.vertexes.iterator;ce.next();)ne=ce.value,we=ne.bounds,2>re?(b=we.x+we.width/2,z=we.y+we.height/2,ue[0]=new st(we.x+we.width+E.width,we.y),ue[1]=new st(we.x,we.y+we.height+E.height),re=2):(oe=jx(ue,re,b,z,we.width,we.height,E),me=ue[oe],Fe=new st(me.x+we.width+E.width,me.y),we=new st(me.x,me.y+we.height+E.height),oe+1<re&&ue.splice(oe+1,0,null),ue[oe]=Fe,ue[oe+1]=we,re++,ne.centerX=me.x+ne.width/2,ne.centerY=me.y+ne.height/2);for(ki(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 Vn),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 Vn,b.Hj=re),re.add(ne),b.Vd--,b.sh+=ne.sh):ne.network===E&&(re=ne.Hj,re===null&&(re=new Vn,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,nt.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var oe=b.Hj;if(oe!==null&&0<oe.count&&(ne=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=ne))){for(var ue=re=0,ce=oe.count-ne;ce<oe.count;ce++){var me=oe.M(ce),we=null;for(z=me.edges.iterator;z.next();){var Fe=z.value;if(Fe.Ax(me)===b){we=Fe;break}}we!==null&&(ue+=we.length,re+=me.width*me.height)}z=b.centerX,oe=b.centerY,ce=b.width,me=b.height,we=b.focus,Fe=ce*me,1>Fe&&(Fe=1),re=nt.sqrt((re+Fe+ue*ue*4/(ne*ne))/Fe),ne=(re-1)*ce/2,re=(re-1)*me/2,b.bounds=new Bn(z-we.x-ne,oe-we.y-re,ce+2*ne,me+2*re),b.focus=new st(we.x+ne,we.y+re)}}return a.network=E,x}function TS(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,ne=b.Tv;E.bounds=new Bn(E.centerX-z,E.centerY-ne,b.Ss,b.Qs),E.focus=new st(z,ne),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function RS(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,ne=y.height;y.We!==null&&0<y.We.count&&(ne=y.We.M(0),z=ne.Ss,ne=ne.Qs),z=nt.sqrt(z*z+ne*ne)/2;for(var re=!1,oe=ne=0,ue=0,ce=y.vertexes.iterator;ce.next();){var me=ce.value;1>=me.Vd?oe++:(re=!0,ue++,ne+=Math.atan2(y.centerY-me.centerY,y.centerX-me.centerX))}if(oe!==0){for(0<ue&&(ne/=ue),ue=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(ue=y/2),1<x.count&&x.sort(function(Fe,De){return Fe===null||De===null||Fe===De?0:De.width*De.height-Fe.width*Fe.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(ce=null,me=oe.edges.iterator;me.next();){ce=me.value;break}me=oe.width;var we=oe.height;me=nt.sqrt(me*me+we*we)/2,ce=z+ce.length+me,me=ne+(y*(re/2>>1)+ue)*(re%2===0?1:-1),oe.centerX=E+ce*Math.cos(me),oe.centerY=b+ce*Math.sin(me),re++}}}}function jx(a,y,x,E,b,z,ne){var re=9e19,oe=-1,ue=0;e:for(;ue<y;ue++){var ce=a[ue],me=ce.x-x,we=ce.y-E;if(me=me*me+we*we,me<re){for(we=ue-1;0<=we;we--)if(a[we].y>ce.y&&a[we].x-ce.x<b+ne.width)continue e;for(we=ue+1;we<y;we++)if(a[we].x>ce.x&&a[we].y-ce.y<z+ne.height)continue e;oe=ue,re=me}}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,nt.sqrt(x*x+a*a)):a+x<y?(E=E+b-ne,a=a+x-y,nt.sqrt(E*E+a*a)):ne-(E+b):E>ne+re?a>y+z?(x=E-ne-re,a=a-y-z,nt.sqrt(x*x+a*a)):a+x<y?(E=E-ne-re,a=a+x-y,nt.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 ce=E.y+re.y;E=ne.charge*a.electricalFieldX(oe,ce),ue=ne.charge*a.electricalFieldY(oe,ce),E+=ne.mass*a.gravitationalFieldX(oe,ce),ue+=ne.mass*a.gravitationalFieldY(oe,ce),ne.forceX+=E,ne.forceY+=ue;for(var me=z+1;me<y.length;me++){var we=y[me];if(we!==ne){E=we.bounds,re=we.focus,ue=E.x+re.x;var Fe=E.y+re.y;if(oe-ue>x||ue-oe>x){if(b)break}else if(ce-Fe>x||Fe-ce>x){if(!b)break}else{var De=zx(ne,we);1>De?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new K0),De=E.random(),re=E.random(),oe>ue?(E=Math.abs(we.bounds.right-ne.bounds.x),E=(1+E)*De):oe<ue?(E=Math.abs(we.bounds.x-ne.bounds.right),E=-(1+E)*De):(E=Math.max(we.width,ne.width),E=(1+E)*De-E/2),ce>Fe?(ue=Math.abs(we.bounds.bottom-ne.bounds.y),ue=(1+ue)*re):oe<ue?(ue=Math.abs(we.bounds.y-ne.bounds.bottom),ue=-(1+ue)*re):(ue=Math.max(we.height,ne.height),ue=(1+ue)*re-ue/2)):(re=-(ne.charge*we.charge)/(De*De),E=(ue-oe)/De*re,ue=(Fe-ce)/De*re),ne.forceX+=E,ne.forceY+=ue,we.forceX-=E,we.forceY-=ue}}}}for(b=a.network.edges.iterator;b.next();)re=b.value,x=re.fromVertex,z=re.toVertex,ne=x.bounds,oe=x.focus,E=ne.x+oe.x,ne=ne.y+oe.y,ce=z.bounds,me=z.focus,oe=ce.x+me.x,ce=ce.y+me.y,me=zx(x,z),1>me?(me=a.randomNumberGenerator,me===null&&(a.randomNumberGenerator=me=new K0),re=me.random(),me=me.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,ue=(ne>ce?1:-1)*(1+(z.height>x.height?z.height:x.height))*me):(re=re.stiffness*(me-re.length),E=(oe-E)/me*re,ue=(ce-ne)/me*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=Fi,y.toSpot=Fi)}},ql.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Bn.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Bn.free(x)}x=Bn.alloc();for(var E=this.network.vertexes.iterator;E.next();){var b=E.value;(a!==0||y!==0)&&(x.assign(b.bounds),x.x+=a,x.y+=y,b.bounds=x),b.commit()}Bn.free(x)},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"&&Et('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)}Wt(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}Wt(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}Wt(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 K0(){var a=0;a===void 0&&(a=42),this.seed=a,this.ay=48271,this.ey=2147483647,this.Q=44488.07041494893,this.gy=3399,this.by=1/2147483647,this.random()}K0.prototype.random=function(){var a=this.seed%this.Q*this.ay-this.seed/this.Q*this.gy;return 0<a?this.seed=a:this.seed=a+this.ey,this.seed*this.by},K0.className="RandomNumberGenerator";function za(a){vs.call(this),this.kc=this.ie=25,this.K=0,this.Dk=J0,this.Zk=Q0,this.Qk=q0,this.bj=4,this.rk=ev,this.bg=15,this.sf=!0,this.Cn=4,this.Ra=this.Iq=this.Ia=-1,this.Md=this.Hn=0,this.Ta=this.Kd=this.Ld=this.he=this.tc=null,this.Kn=0,this.Jn=this.kj=null,this.le=0,this.fl=null,this.Rf=new st,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Wt(za,vs),za.prototype.cloneProtected=function(a){vs.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:Et("Unknown enum value: "+a):vs.prototype.qb.call(this,a)},za.prototype.createNetwork=function(){return new Mp(this)},za.prototype.doLayout=function(a){for(this.network===null&&(this.network=this.makeNetwork(a)),this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin),this.Iq=-1,this.Md=this.Hn=0,this.fl=this.Jn=this.kj=null,a=0;a<this.He.length;a++)this.He[a]=null;if(0<this.network.vertexes.count){for(this.network.Ko(),this.cycleRemoveOption!==Cm&&this.removeCycles(),a=this.network.vertexes.iterator;a.next();)a.value.layer=-1;for(this.Ia=-1,this.assignLayers(),a.reset();a.next();)this.Ia=Math.max(this.Ia,a.value.layer);this.cycleRemoveOption===Cm&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var ne=0,re=0,oe=0,ue=0;if(E.link!==null){if(re=E.link,re===null)continue;var ce=b.node;if(ne=z.node,ce===null||ne===null)continue;var me=re.fromNode;oe=re.toNode;for(var we=re.fromPort;we!==null&&!we.Ed();)we=we.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(E.rev){ue=me;var Fe=we;me=oe,we=re,oe=ue,re=Fe}var De=b.focus;ue=z.focus;var _e=E.rev?z.bounds:b.bounds;Fe=st.alloc(),ce!==me?_e.w()&&me.isVisible()?me.actualBounds.w()?(Vh(me,we,Oo,Fe),Fe.x+=me.actualBounds.x-_e.x,Fe.y+=me.actualBounds.y-_e.y):(Vh(me,we,Oo,Fe),Fe.w()||Fe.assign(De)):Fe.assign(De):_e.w()?(Vh(me,we,Oo,Fe),Fe.w()||Fe.assign(De)):Fe.assign(De),me=E.rev?b.bounds:z.bounds,ce=st.alloc(),ne!==oe?me.w()&&oe.isVisible()?oe.actualBounds.w()?(Vh(oe,re,Oo,ce),ce.x+=oe.actualBounds.x-me.x,ce.y+=oe.actualBounds.y-me.y):(Vh(oe,re,Oo,ce),ce.w()||ce.assign(ue)):ce.assign(ue):me.w()?(Vh(oe,re,Oo,ce),ce.w()||ce.assign(ue)):ce.assign(ue),this.K===90||this.K===270?(ne=Math.round((Fe.x-De.x)/this.kc),oe=Fe.x,re=Math.round((ce.x-ue.x)/this.kc),ue=ce.x):(ne=Math.round((Fe.y-De.y)/this.kc),oe=Fe.y,re=Math.round((ce.y-ue.y)/this.kc),ue=ce.y),st.free(Fe),st.free(ce),E.portFromColOffset=ne,E.portFromPos=oe,E.portToColOffset=re,E.portToPos=ue}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Fe=b.layer,ce=z.layer,me=0,_e=E.link,_e!==null){var pt=_e.fromPort,rt=_e.toPort;if(pt!==null&&rt!==null){var bt=_e.fromNode;if(we=_e.toNode,bt!==null&&we!==null){var It=X0(this,!0),Rt=X0(this,!1),Kt=this.setsPortSpots?It:_e.computeSpot(!0,pt);De=this.setsPortSpots?Rt:_e.computeSpot(!1,rt);var fn=_e.isOrthogonal;Kt.$c()&&Kt.Hf(Rt)&&De.$c()&&De.Hf(It)?me=0:(It=_e.getLinkPoint(bt,pt,Kt,!0,fn,we,rt,st.alloc()),Rt=_e.getLinkDirection(bt,pt,It,Kt,!0,fn,we,rt),st.free(It),Kt.ys()||Rt!==Jx(this,E,!0)?this.setsPortSpots&&bt!==null&&bt.ports.count===1&&E.rev&&(me+=1):me+=1,Kt=_e.getLinkPoint(we,rt,De,!1,fn,bt,pt,st.alloc()),_e=_e.getLinkDirection(we,rt,Kt,De,!1,fn,bt,pt),st.free(Kt),De.ys()||_e!==Jx(this,E,!1)?this.setsPortSpots&&we!==null&&we.ports.count===1&&E.rev&&(me+=2):me+=2)}}}if(we=me,me=we===1||we===3,(we=we===2||we===3)&&(De=a.createVertex(),De.node=null,De.Dj=1,De.layer=Fe,De.near=b,a.dh(De),b=a.Zj(b,De,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ne,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=De),_e=1,me&&_e--,Fe-ce>_e&&0<Fe){for(E.valid=!1,De=a.createVertex(),De.node=null,De.Dj=2,De.layer=Fe-1,a.dh(De),b=a.Zj(b,De,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=De,Fe--;Fe-ce>_e&&0<Fe;)De=a.createVertex(),De.node=null,De.Dj=3,De.layer=Fe-1,a.dh(De),b=a.Zj(b,De,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=De,Fe--;b=a.Zj(De,z,E.link),b.valid=!me,me&&(De.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=re,b.portFromPos=0,b.portToPos=ue}else E.valid=!0}}for(a=this.tc=[],y=0;y<=this.Ia;y++)a[y]=0;for(y=this.network.vertexes.iterator;y.next();)y.value.index=-1;for(this.initializeIndices(),this.Iq=-1,x=this.Md=this.Hn=0;x<=this.Ia;x++)a[x]>a[this.Md]&&(this.Iq=a[x]-1,this.Md=x),a[x]<a[this.Hn]&&(this.Hn=x);for(this.fl=[],x=0;x<a.length;x++)this.fl[x]=[];for(y.reset();y.next();)a=y.value,this.fl[a.layer][a.index]=a;for(this.Ra=-1,a=0;a<=this.Ia;a++){for(y=Nf(this,a),x=0,E=this.tc[a],z=0;z<E;z++)b=y[z],x+=this.nodeMinColumnSpace(b,!0),b.column=x,x+=1,x+=this.nodeMinColumnSpace(b,!1);this.Ra=Math.max(this.Ra,x-1),Af(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},za.prototype.linkMinLength=function(){return 1};function Ey(a){var y=a.fromVertex.node||a.fromVertex.data;return a=a.toVertex.node||a.toVertex.data,y===null&&a===null?8:y===null||a===null?4:1}za.prototype.nodeMinLayerSpace=function(a,y){return a.node===null&&a.data===null?0:this.K===90||this.K===270?y?a.focus.y+10:a.bounds.height-a.focus.y+10:y?a.focus.x+10:a.bounds.width-a.focus.x+10},za.prototype.nodeMinColumnSpace=function(a,y){if(a.node===null&&a.data===null)return 0;var x=y?a.ev:a.dv;return x!==null?x:(x=this.K,x===90||x===270?y?a.ev=a.focus.x/this.kc+1|0:a.dv=(a.bounds.width-a.focus.x)/this.kc+1|0:y?a.ev=a.focus.y/this.kc+1|0:a.dv=(a.bounds.height-a.focus.y)/this.kc+1|0)};function Hu(a){a.kj===null&&(a.kj=[]);for(var y=0,x=a.network.vertexes.iterator;x.next();){var E=x.value;a.kj[y]=E.layer,y++,a.kj[y]=E.column,y++,a.kj[y]=E.index,y++}return a.kj}function Ic(a,y){var x=0;for(a=a.network.vertexes.iterator;a.next();){var E=a.value;E.layer=y[x],x++,E.column=y[x],x++,E.index=y[x],x++}}function Wx(a,y,x){var E=Nf(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,ne=0;ne<b;ne++){var re=0,oe=E[ne],ue=oe.near;if(ue!==null&&ue.layer===oe.layer)if(oe=ue.index,oe>ne)for(var ce=ne+1;ce<oe;ce++){var me=E[ce];me.near===ue&&me.Dj===ue.Dj||re++}else for(ce=ne-1;ce>oe;ce--)me=E[ce],me.near===ue&&me.Dj===ue.Dj||re++;var we;if(0<=x)for(oe=E[ne].sourceEdgesArrayAccess,ue=0;ue<oe.length;ue++){var Fe=oe[ue];if(Fe.valid&&Fe.fromVertex.layer!==y)for(me=Fe.fromVertex.index,ce=Fe.portToPos,Fe=Fe.portFromPos,we=ue+1;we<oe.length;we++){var De=oe[we];if(De.valid&&De.fromVertex.layer!==y){var _e=De.fromVertex.index,pt=De.portToPos;De=De.portFromPos,ce<pt&&(me>_e||me===_e&&Fe>De)&&re++,pt<ce&&(_e>me||_e===me&&De>Fe)&&re++}}}if(0>=x){for(oe=E[ne].destinationEdgesArrayAccess,ue=0;ue<oe.length;ue++)if(Fe=oe[ue],Fe.valid&&Fe.toVertex.layer!==y)for(me=Fe.toVertex.index,ce=Fe.portToPos,Fe=Fe.portFromPos,we=ue+1;we<oe.length;we++)De=oe[we],De.valid&&De.toVertex.layer!==y&&(_e=De.toVertex.index,pt=De.portToPos,De=De.portFromPos,Fe<De&&(me>_e||me===_e&&ce>pt)&&re++,De<Fe&&(_e>me||_e===me&&pt>ce)&&re++)}for(z[ne*b+ne]=re,oe=ne+1;oe<b;oe++){var rt=0,bt=0;if(0<=x){re=E[ne].sourceEdgesArrayAccess;var It=E[oe].sourceEdgesArrayAccess;for(ue=0;ue<re.length;ue++)if(Fe=re[ue],Fe.valid&&Fe.fromVertex.layer!==y)for(me=Fe.fromVertex.index,Fe=Fe.portFromPos,we=0;we<It.length;we++)De=It[we],De.valid&&De.fromVertex.layer!==y&&(_e=De.fromVertex.index,De=De.portFromPos,(me<_e||me===_e&&Fe<De)&&bt++,(_e<me||_e===me&&De<Fe)&&rt++)}if(0>=x){for(re=E[ne].destinationEdgesArrayAccess,It=E[oe].destinationEdgesArrayAccess,ue=0;ue<re.length;ue++)if(Fe=re[ue],Fe.valid&&Fe.toVertex.layer!==y)for(me=Fe.toVertex.index,ce=Fe.portToPos,we=0;we<It.length;we++)De=It[we],De.valid&&De.toVertex.layer!==y&&(_e=De.toVertex.index,pt=De.portToPos,(me<_e||me===_e&&ce<pt)&&bt++,(_e<me||_e===me&&pt<ce)&&rt++)}z[ne*b+oe]=rt,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 V0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Nf(E,b),ne=E.tc[b],re=0,oe=0;oe<ne;oe++){var ue=z[oe].destinationEdgesArrayAccess;if(ue!==null)for(var ce=0;ce<ue.length;ce++){var me=ue[ce];if(me.valid&&me.toVertex.layer!==b){var we=me.fromVertex.column+me.portFromColOffset,Fe=me.toVertex.column+me.portToColOffset;re+=(Math.abs(we-Fe)+1)*Ey(me)}}}Af(E,b,z),y+=re}return y}za.prototype.normalize=function(){var a=1/0;this.Ra=-1;for(var y=this.network.vertexes.iterator;y.next();){var x=y.value;a=Math.min(a,x.column-this.nodeMinColumnSpace(x,!0)),this.Ra=Math.max(this.Ra,x.column+this.nodeMinColumnSpace(x,!1))}for(y.reset();y.next();)y.value.column-=a;this.Ra-=a};function by(a,y,x){for(var E=Nf(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var ue=null;0<=x&&(ue=re.destinationEdgesArrayAccess);var ce=0,me=0,we=re.near;if(we!==null&&we.layer===re.layer&&(ce+=we.column-1,me++),oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Fe=re.fromVertex;re.valid&&!re.rev&&Fe.layer!==y&&(ce+=Fe.column,me++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(ce+=we.column,me++);z[ne]=me===0?-1:ce/me}return Af(a,y,E),z}function Gx(a,y,x){for(var E=Nf(a,y),b=a.tc[y],z=[],ne=0;ne<b;ne++){var re=E[ne],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var ue=null;0<=x&&(ue=re.destinationEdgesArrayAccess);var ce=0,me=[],we=re.near;if(we!==null&&we.layer===re.layer&&(me[ce]=we.column-1,ce++),re=void 0,oe!==null)for(we=0;we<oe.length;we++){re=oe[we];var Fe=re.fromVertex;re.valid&&!re.rev&&Fe.layer!==y&&(me[ce]=Fe.column+re.portFromColOffset,ce++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],we=re.toVertex,re.valid&&!re.rev&&we.layer!==y&&(me[ce]=we.column+re.portToColOffset,ce++);ce===0?z[ne]=-1:(me.sort(function(De,_e){return De-_e}),ue=ce>>1,z[ne]=ce&1?me[ue]:me[ue-1]+me[ue]>>1)}return Af(a,y,E),z}function wm(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();){var re=ne.value,oe=re.toVertex,ue=y.layer-oe.layer;re=a.linkMinLength(re),ue===re&&wm(a,oe,x,E,b,z)}if(z)for(ne=y.sourceEdges;ne.next();)re=ne.value,oe=re.fromVertex,ue=oe.layer-y.layer,re=a.linkMinLength(re),ue===re&&wm(a,oe,x,E,b,z)}}function Fy(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ne=y.destinationEdges;ne.next();)Fy(a,ne.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)Fy(a,y.value.fromVertex,x,E,b,z)}}za.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Ly:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;jS(a)!==null;){for(b=$x(a);b!==null;)E[x]=b,x--,b.valid=!1,b=$x(a);for(b=Kx(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Kx(a);b=null;for(var z=0,ne=this.network.vertexes.iterator;ne.next();){var re=ne.value;if(re.valid){for(var oe=0,ue=re.destinationEdges;ue.next();)ue.value.toVertex.valid&&oe++;ue=0;for(var ce=re.sourceEdges;ce.next();)ce.value.fromVertex.valid&&ue++;(b===null||z<oe-ue)&&(b=re,z=oe-ue)}}b!==null&&(E[y]=b,y++,b.valid=!1)}for(y=0;y<a.vertexes.count;y++)E[y].index=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.index>y.toVertex.index&&(a.gm(y),y.rev=!0);break;case J0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&By(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&By(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Cm:for(a=this.network,y=a.vertexes.iterator,E=1/0;y.next();)E=Math.min(E,y.value.layer);if(1/0>E){if(0>E)for(y.reset();y.next();)y.value.layer-=E;for(E=[],y.reset();y.next();)x=y.value,b=E[x.layer],b===void 0?E[x.layer]=[x]:b.push(x);for(x=y=0;x<E.length;x++)if(b=E[x],!b||b.length===0)y++;else if(0<x)for(z=0;z<b.length;z++)b[z].layer-=y;for(E=a.edges.iterator;E.next();)y=E.value,y.fromVertex.layer<y.toVertex.layer&&(a.gm(y),y.rev=!0)}}};function jS(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function $x(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.destinationEdges;E.next();)if(E.value.toVertex.valid){x=!1;break}if(x)return y}}return null}function Kx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid){for(var x=!0,E=y.sourceEdges;E.next();)if(E.value.fromVertex.valid){x=!1;break}if(x)return y}}return null}function By(a,y){y.Ll=a.Kn,a.Kn++;for(var x=y.destinationEdges;x.next();){var E=x.value,b=E.toVertex;b.Ll===-1&&(E.forest=!0,By(a,b))}y.finish=a.Kn,a.Kn++}za.prototype.assignLayers=function(){switch(this.Zk){case Ny:Vx(this);break;case Ay:for(var a,y=this.network.vertexes.iterator;y.next();)a=Yx(this,y.value),this.Ia=Math.max(a,this.Ia);for(y.reset();y.next();)a=y.value,a.layer=this.Ia-a.layer;break;default:case Q0:for(Vx(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&Xx(this,a);for(a=1/0,y.reset();y.next();)a=Math.min(a,y.value.layer);for(this.Ia=-1,y.reset();y.next();){var x=y.value;x.layer-=a,this.Ia=Math.max(this.Ia,x.layer)}}};function Vx(a){for(var y=a.network.vertexes.iterator;y.next();){var x=Ux(a,y.value);a.Ia=Math.max(x,a.Ia)}}function Ux(a,y){var x=0;if(y.layer===-1){for(var E=y.destinationEdges;E.next();){var b=E.value,z=b.toVertex;b=a.linkMinLength(b),x=Math.max(x,Ux(a,z)+b)}y.layer=x}else x=y.layer;return x}function Yx(a,y){var x=0;if(y.layer===-1){for(var E=y.sourceEdges;E.next();){var b=E.value,z=b.fromVertex;b=a.linkMinLength(b),x=Math.max(x,Yx(a,z)+b)}y.layer=x}else x=y.layer;return x}function Xx(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)Xx(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var ne=E[z],re=ne.fromVertex,oe=ne.toVertex;ne=a.linkMinLength(ne),re.layer-oe.layer>ne&&wm(a,re,0,-1,!0,!1)}for(wm(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,re=0,oe=null,ne=a.network.vertexes.iterator;ne.next();){var ue=ne.value;if(ue.component===1){var ce=0,me=!1,we=ue.sourceEdgesArrayAccess;b=we.length;for(var Fe=0;Fe<b;Fe++){var De=we[Fe],_e=De.fromVertex;ce+=1,_e.component!==1&&(z+=1,_e=_e.layer-ue.layer,De=a.linkMinLength(De),E=Math.min(E,_e-De))}for(we=ue.destinationEdgesArrayAccess,b=we.length,Fe=0;Fe<b;Fe++)De=we[Fe].toVertex,--ce,De.component!==1?--z:me=!0;(oe===null||ce<re)&&!me&&(oe=ue,re=ce)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(wm(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(ne=oe.value,ne.component===1){for(ue=0,ce=!1,we=ne.sourceEdgesArrayAccess,me=we.length,Fe=0;Fe<me;Fe++)De=we[Fe].fromVertex,ue+=1,De.component!==1?E+=1:ce=!0;for(we=ne.destinationEdgesArrayAccess,me=we.length,Fe=0;Fe<me;Fe++)De=we[Fe],_e=De.toVertex,--ue,_e.component!==1&&(--E,_e=ne.layer-_e.layer,De=a.linkMinLength(De),b=Math.min(b,_e-De));(re===null||ue>z)&&!ce&&(re=ne,z=ue)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else re.component=0}}}function Jx(a,y,x){return a.K===90?x&&!y.rev||!x&&y.rev?270:90:a.K===180?x&&!y.rev||!x&&y.rev?0:180:a.K===270?x&&!y.rev||!x&&y.rev?90:270:x&&!y.rev||!x&&y.rev?180:0}za.prototype.initializeIndices=function(){switch(this.Qk){default:case Iy:for(var a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;y.index=this.tc[x],this.tc[x]++}break;case q0:for(a=this.network.vertexes.iterator,y=this.Ia;0<=y;y--)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&Qx(this,x);break;case Dy:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&qx(this,x)}};function Qx(a,y){var x=y.layer;for(y.index=a.tc[x],a.tc[x]++,y=y.destinationEdgesArrayAccess,x=!0;x;){x=!1;for(var E=0;E<y.length-1;E++){var b=y[E],z=y[E+1];b.portFromColOffset>z.portFromColOffset&&(x=!0,y[E]=z,y[E+1]=b)}}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.toVertex,E.index===-1&&Qx(a,E))}function qx(a,y){var x=y.layer;y.index=a.tc[x],a.tc[x]++,y=y.sourceEdgesArrayAccess;for(var E=!0;E;)for(E=!1,x=0;x<y.length-1;x++){var b=y[x],z=y[x+1];b.portToColOffset>z.portToColOffset&&(E=!0,y[x]=z,y[x+1]=b)}for(x=0;x<y.length;x++)E=y[x],E.valid&&(E=E.fromVertex,E.index===-1&&qx(a,E))}za.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=Hu(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)U0(this,E,1),Hc(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=Hu(this)),E=this.Ia;0<=E;E--)U0(this,E,-1),Hc(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=Hu(this))}for(Ic(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)U0(this,E,0),Hc(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=Hu(this)),E=this.Ia;0<=E;E--)U0(this,E,0),Hc(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=Hu(this))}Ic(this,y);var z,ne,re;switch(this.rk){case Oy:break;case ky:for(re=a+1;(E=this.countCrossings())<re;)for(re=E,x=this.Ia;0<=x;x--)for(ne=0;ne<=x;ne++){for(z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,-1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,0)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,0)||z;b>=a?Ic(this,y):(a=b,y=Hu(this))}break;default:case ev:for(x=this.Ia,ne=0,re=a+1;(E=this.countCrossings())<re;){for(re=E,z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,1)||z;for(b=this.countCrossings(),b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,-1)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=x;E>=ne;E--)z=Hc(this,E,0)||z;for(b>=a?Ic(this,y):(a=b,y=Hu(this)),z=!0;z;)for(z=!1,E=ne;E<=x;E++)z=Hc(this,E,0)||z;b>=a?Ic(this,y):(a=b,y=Hu(this))}}Ic(this,y)};function U0(a,y,x){var E=Nf(a,y),b=a.tc[y],z=Gx(a,y,x),ne=by(a,y,x);for(x=0;x<b;x++)ne[x]===-1&&(ne[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&ne[x+1]<ne[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=ne[x],ne[x]=ne[x+1],ne[x+1]=oe,oe=E[x],E[x]=E[x+1],E[x+1]=oe);for(x=z=0;x<b;x++)oe=E[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Af(a,y,E)}function Hc(a,y,x){var E=Nf(a,y),b=a.tc[y];x=Wx(a,y,x);var z,ne=[];for(z=0;z<b;z++)ne[z]=-1;var re=[];for(z=0;z<b;z++)re[z]=-1;for(var oe=!1,ue=!0;ue;)for(ue=!1,z=0;z<b-1;z++){var ce=x[E[z].index*b+E[z+1].index],me=x[E[z+1].index*b+E[z].index],we=0,Fe=0,De=E[z].column,_e=E[z+1].column,pt=a.nodeMinColumnSpace(E[z],!0),rt=a.nodeMinColumnSpace(E[z],!1),bt=a.nodeMinColumnSpace(E[z+1],!0),It=a.nodeMinColumnSpace(E[z+1],!1);pt=De-pt+bt,rt=_e-rt+It;var Rt=E[z].sourceEdges.iterator;for(Rt.reset();Rt.next();)if(bt=Rt.value,It=bt.fromVertex,bt.valid&&It.layer===y){for(bt=0;E[bt]!==It;)bt++;bt<z&&(we+=2*(z-bt),Fe+=2*(z+1-bt)),bt===z+1&&(we+=1),bt>z+1&&(we+=4*(bt-z),Fe+=4*(bt-(z+1)))}for(Rt=E[z].destinationEdges.iterator,Rt.reset();Rt.next();)if(bt=Rt.value,It=bt.toVertex,bt.valid&&It.layer===y){for(bt=0;E[bt]!==It;)bt++;bt===z+1&&(Fe+=1)}for(Rt=E[z+1].sourceEdges.iterator,Rt.reset();Rt.next();)if(bt=Rt.value,It=bt.fromVertex,bt.valid&&It.layer===y){for(bt=0;E[bt]!==It;)bt++;bt<z&&(we+=2*(z+1-bt),Fe+=2*(z-bt)),bt===z&&(Fe+=1),bt>z+1&&(we+=4*(bt-(z+1)),Fe+=4*(bt-z))}for(Rt=E[z+1].destinationEdges.iterator,Rt.reset();Rt.next();)if(bt=Rt.value,It=bt.toVertex,bt.valid&&It.layer===y){for(bt=0;E[bt]!==It;)bt++;bt===z&&(we+=1)}bt=It=0,Rt=ne[E[z].index];var Kt=re[E[z].index],fn=ne[E[z+1].index],bi=re[E[z+1].index];Rt!==-1&&(It+=Math.abs(Rt-De),bt+=Math.abs(Rt-rt)),Kt!==-1&&(It+=Math.abs(Kt-De),bt+=Math.abs(Kt-rt)),fn!==-1&&(It+=Math.abs(fn-_e),bt+=Math.abs(fn-pt)),bi!==-1&&(It+=Math.abs(bi-_e),bt+=Math.abs(bi-pt)),(Fe<we-.5||Fe===we&&me<ce-.5||Fe===we&&me===ce&&bt<It-.5)&&(ue=oe=!0,E[z].column=rt,E[z+1].column=pt,ce=E[z],E[z]=E[z+1],E[z+1]=ce)}for(z=0;z<b;z++)E[z].index=z;return Af(a,y,E),oe}za.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&VS)!==0;if(1e3<this.network.edges.count&&y&&(a=!1),a){var x=[];for(y=0;y<=this.Ia;y++)x[y]=0;for(var E,b=this.network.vertexes.iterator;b.next();){var z=b.value;y=z.layer,E=z.column,z=this.nodeMinColumnSpace(z,!1),x[y]=Math.max(x[y],E+z)}for(b.reset();b.next();)z=b.value,y=z.layer,E=z.column,z.column=(8*(this.Ra-x[y])>>1)+8*E;this.Ra*=8}if(this.bg&2)for(x=!0;x;){for(x=!1,y=this.Md+1;y<=this.Ia;y++)x=Bp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Bp(this,y,-1)||x;x=Bp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)My(this,y,1);for(y=this.Md-1;0<=y;y--)My(this,y,-1);My(this,this.Md,0)}if(a&&(eS(this,-1),eS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Bp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Bp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Bp(this,y,0)||x}}else WS(this)};function Bp(a,y,x){for(var E=!1;zS(a,y,x);)E=!0;return E}function zS(a,y,x){var E,b=Nf(a,y),z=a.tc[y],ne=by(a,y,-1);if(0<x)for(E=0;E<z;E++)ne[E]=-1;var re=by(a,y,1);if(0>x)for(E=0;E<z;E++)re[E]=-1;for(var oe=!1,ue=!0;ue;)for(ue=!1,E=0;E<z;E++){var ce=b[E].column,me=a.nodeMinColumnSpace(b[E],!0),we=a.nodeMinColumnSpace(b[E],!1),Fe=0;0>E-1||ce-b[E-1].column-1>me+a.nodeMinColumnSpace(b[E-1],!1)?Fe=ce-1:Fe=ce,me=E+1>=z||b[E+1].column-ce-1>we+a.nodeMinColumnSpace(b[E+1],!0)?ce+1:ce;var De=we=0,_e=0;if(0>=x)for(var pt=b[E].sourceEdges.iterator;pt.next();){var rt=pt.value,bt=rt.fromVertex;if(rt.valid&&bt.layer!==y){var It=Ey(rt),Rt=rt.portFromColOffset;rt=rt.portToColOffset,bt=bt.column,we+=(Math.abs(ce+rt-(bt+Rt))+1)*It,De+=(Math.abs(Fe+rt-(bt+Rt))+1)*It,_e+=(Math.abs(me+rt-(bt+Rt))+1)*It}}if(0<=x)for(pt=b[E].destinationEdges.iterator;pt.next();)rt=pt.value,bt=rt.toVertex,rt.valid&&bt.layer!==y&&(It=Ey(rt),Rt=rt.portFromColOffset,rt=rt.portToColOffset,bt=bt.column,we+=(Math.abs(ce+Rt-(bt+rt))+1)*It,De+=(Math.abs(Fe+Rt-(bt+rt))+1)*It,_e+=(Math.abs(me+Rt-(bt+rt))+1)*It);rt=Rt=It=0,pt=ne[b[E].index],bt=re[b[E].index],pt!==-1&&(It+=Math.abs(pt-ce),Rt+=Math.abs(pt-Fe),rt+=Math.abs(pt-me)),bt!==-1&&(It+=Math.abs(bt-ce),Rt+=Math.abs(bt-Fe),rt+=Math.abs(bt-me)),De<we||De===we&&Rt<It?(ue=oe=!0,b[E].column=Fe):(_e<we||_e===we&&rt<It)&&(ue=oe=!0,b[E].column=me)}return Af(a,y,b),a.normalize(),oe}function My(a,y,x){var E=Nf(a,y),b=a.tc[y],z=Gx(a,y,x),ne=[];for(x=0;x<b;x++)ne[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var re=E[x].column,oe=a.nodeMinColumnSpace(E[x],!0),ue=a.nodeMinColumnSpace(E[x],!1),ce=0;if(ne[x]===-1)if(x===0&&x===b-1)ce=re;else if(x===0){var me=E[x+1].column;me-re===ue+a.nodeMinColumnSpace(E[x+1],!0)?ce=re-1:ce=re}else x===b-1?(me=E[x-1].column,ce=re-me===oe+a.nodeMinColumnSpace(E[x-1],!1)?re+1:re):(me=E[x-1].column,oe=me+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,me=E[x+1].column,ue=me-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,ce=(oe+ue)/2|0);else x===0&&x===b-1?ce=ne[x]:x===0?(me=E[x+1].column,ue=me-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,ce=Math.min(ne[x],ue)):x===b-1?(me=E[x-1].column,oe=me+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,ce=Math.max(ne[x],oe)):(me=E[x-1].column,oe=me+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,me=E[x+1].column,ue=me-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,oe<ne[x]&&ne[x]<ue?ce=ne[x]:oe>=ne[x]?ce=oe:ue<=ne[x]&&(ce=ue));ce!==re&&(z=!0,E[x].column=ce)}Af(a,y,E),a.normalize()}function ZS(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),ne=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+ne>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function HS(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var ne=a.network.vertexes.iterator;ne.next();){E=ne.value;var re=E.column-a.nodeMinColumnSpace(E,!0),oe=E.column+a.nodeMinColumnSpace(E,!1);re<=y&&oe>=y&&(b[E.layer]=!0),re<=x&&oe>=x&&(z[E.layer]=!0)}for(re=!0,x=!1,E=0;E<=a.Ia;E++)re=re&&!(b[E]&&z[E]);if(re)for(ne.reset();ne.next();)a=ne.value,a.column>y&&(--a.column,x=!0);return x}function eS(a,y){for(var x=0;x<=a.Ra;x++)for(;ZS(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;HS(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=Hu(a),z=V0(a);for(E=z+1;z<E;){E=z,tS(a,x,1);var ne=V0(a);ne>z?Ic(a,b):ne<z&&(z=ne,b=Hu(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=Hu(a),z=V0(a),E=z+1;z<E;)E=z,tS(a,x,-1),ne=V0(a),ne>z?Ic(a,b):ne<z&&(z=ne,b=Hu(a));a.normalize()}function tS(a,y,x){a.le=0;for(var E=a.network.vertexes.iterator;E.next();)E.value.component=-1;if(0<x)for(E.reset();E.next();){var b=E.value;b.column-a.nodeMinColumnSpace(b,!0)<=y&&(b.component=a.le)}if(0>x)for(E.reset();E.next();)b=E.value,b.column+a.nodeMinColumnSpace(b,!1)>=y&&(b.component=a.le);for(a.le++,E.reset();E.next();)y=E.value,y.component===-1&&(Fy(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var ne=z.layer,re=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),oe=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));re<=oe;re++)b[ne*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(ne=0;ne<a.Ra;ne++)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne+1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne+1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne+1]]=!0);if(0>x)for(ne=a.Ra;0<ne;ne--)b[z*(a.Ra+1)+ne]!==-1&&b[z*(a.Ra+1)+ne-1]!==-1&&b[z*(a.Ra+1)+ne]!==b[z*(a.Ra+1)+ne-1]&&(y[b[z*(a.Ra+1)+ne]*a.le+b[z*(a.Ra+1)+ne-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(ne=[],ne.push(0);ne.length!==0;)if(oe=ne[ne.length-1],ne.pop(),b[oe])for(b[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&ne.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function WS(a){for(var y=Si(),x=a.fl.length,E=0;E<=x;E++)y[E]=[];for(E=a.network.vertexes.iterator;E.next();){var b=E.value;y[x-b.layer][b.index]=b}x=new Un,GS(y,x);var z=null,ne=null,re=null,oe=null,ue=(a.ve&1)!==0,ce=(a.ve&2)!==0,me=(a.ve&4)!==0,we=(a.ve&8)!==0;for(ue&&(a.verticalAlignment(y,x,!0),z=Y0(a,y,!0,!1)),y.reverse(),me&&(a.verticalAlignment(y,x,!1),re=Y0(a,y,!1,!1)),E=Sr(y),b=E.next();!b.done;b=E.next())b.value.reverse();we&&(a.verticalAlignment(y,x,!1),oe=Y0(a,y,!1,!0)),y.reverse(),ce&&(a.verticalAlignment(y,x,!0),ne=Y0(a,y,!0,!0)),ki(y),a.u(z,ne,re,oe),a.network.vertexes.each(function(Fe){var De=Si();ue&&De.push(z.get(Fe)),ce&&De.push(ne.get(Fe)),me&&De.push(re.get(Fe)),we&&De.push(oe.get(Fe)),De.sort(function(pt,rt){return pt-rt});var _e=De.length;_e=(De[Math.floor((_e-1)/2)]+De[Math.ceil((_e-1)/2)])/2,ki(De),Fe.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 ce=Ty(ue);if(0<ce.length){ce=ce[0].node===null;break e}}ce=!1}var me=ce;if(oe===re.length-1||me){for(ce=ne.length-1,me&&(ce=Ty(ue)[0].index);z<=oe;){if(ue=re[z],!ue.bo){me=[];for(var we=Sr(ue.sourceEdgesArrayAccess),Fe=we.next();!Fe.done;Fe=we.next())Fe=Fe.value,Fe.valid&&me.push(Fe);ue.bo=me}for(ue=Sr(ue.bo),me=ue.next();!me.done;me=ue.next())me=me.value,we=me.fromVertex.index,(we<b||we>ce)&&y.add(me);z++}b=ce}}}za.prototype.verticalAlignment=function(a,y,x){$S(a),a=Sr(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Sr(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(me,we){return me.vi-we.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var ue=ne[re],ce=void 0;ce=x?tv(ue,z):tv(z,ue),!y.contains(ce)&&b<ue.vi&&(ue.align=z,z.root=ue.root,z.align=ue.root,b=ue.vi)}}}}};function $S(a){for(var y=0;y<a.length;y++)for(var x=a[y],E=0;E<x.length;E++){var b=x[E];b.root=b,b.align=b,b.Tz=y,b.vi=E}}function Y0(a,y,x,E){for(var b=a.K===90||a.K===270,z=Sr(y),ne=z.next();!ne.done;ne=z.next()){var re=Sr(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=Sr(y),re=z.next();!re.done;re=z.next()){re=Sr(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var ue=0,ce=oe;ce.align!==oe;){var me=ce.align,we=ne?ce.width:ce.height,Fe=ne?me.width:me.height;if(x){var De=tv(ce,me),_e=De.portFromPos,pt=De.portToPos;De.link!==null&&(ce.node&&ce.node!==De.link.fromNode&&(_e=ne?ce.focusX:ce.focusY),me.node&&me.node!==De.link.toNode&&(pt=ne?me.focusX:me.focusY))}else De=tv(me,ce),_e=De.portToPos,pt=De.portFromPos,De.link!==null&&(ce.node&&ce.node!==De.link.toNode&&(_e=ne?ce.focusX:ce.focusY),me.node&&me.node!==De.link.fromNode&&(pt=ne?me.focusX:me.focusY));we=E?ce.qg+(we-_e)-(Fe-pt):ce.qg+_e-pt,me.qg=we,ue=Math.min(ue,we),ce=ce.align}ce=oe;do ce.qg=ce.qg-ue,ce=ce.align;while(ce!==oe)}}for(x=Sr(y),ne=x.next();!ne.done;ne=x.next())for(z=Sr(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 $i,y=Sr(y),ne=y.next();!ne.done;ne=y.next())for(x=Sr(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&&Et("Could not determine previous vertex in layer"),y[x][a-1]}za.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Si(),b=Si(),z=1/0,ne=0;4>ne;ne++)if(y[ne]){var re=KS(this,y[ne],E,b,ne);re<z&&(x=ne,z=re)}for(z={},ne=0;4>ne;z={delta:z.delta},ne++)y[ne]&&(z.delta=ne===0||ne===2?E[x]-E[ne]:b[x]-b[ne],z.delta!==0&&y[ne].each(function(oe){return function(ue){ue.value+=oe.delta}}(z)));ki(E),ki(b)};function KS(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,ne=-1/0;return y.each(function(re){var oe=re.key;re=re.value,oe=a.K===90||a.K===270?oe.width:oe.height,re<z&&(z=re),re+oe>ne&&(ne=re+oe)}),x[b]=z,E[b]=ne,ne-z}za.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=X0(this,!0),y=X0(this,!1),x=this.network.edges.iterator;x.next();){var E=x.value.link;E!==null&&(E.fromSpot=a,E.toSpot=y)}this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()};function X0(a,y){return a.K===270?y?Fo:Or:a.K===90?y?Or:Fo:a.K===180?y?aa:Do:y?Do:aa}za.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,ne=b=1/0,re=-1/0;a.next();){var oe=a.value,ue=oe.layer,ce=oe.column|0;E?(ne=y.x+this.kc*ce,ue=this.Kd[ue]):(ne=this.Kd[ue],ue=y.y+this.kc*ce),oe.centerX=ne,oe.centerY=ue,x&&isFinite(oe.zc)&&(E?oe.node?oe.x=y.x+oe.zc:oe.centerX=y.x+oe.zc:oe.node?oe.y=y.y+oe.zc:oe.centerY=y.y+oe.zc),z=Math.min(oe.x,z),b=Math.min(oe.y,b),E?(ne=z,re=Math.max(re,oe.bounds.right)):(ne=b,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-ne,z=y.x-z,y=y.y-b,this.Rf=new st(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},za.prototype.Gu=function(){for(var a=0,y=this.ie,x=0;x<=this.Ia;x++)a+=this.he[x],a+=this.Ld[x];a+=this.Ia*y,y=[],x=this.ve!==0?this.xw:this.kc*this.Ra;for(var E=this.maxLayer;0<=E;E--)this.K===270?E===0?y.push(new Bn(0,0,x,Math.abs(this.Ta[0]))):y.push(new Bn(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Bn(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Bn(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Bn(0,0,Math.abs(this.Ta[0]),x)):y.push(new Bn(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Bn(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Bn(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},za.prototype.commitLayers=function(){},za.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,ne=E.fromPort,re=E.toPort;if(b!==null){var oe=b.findVisibleNode();oe!==null&&oe!==b&&(b=oe,ne=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var ue=y.computeSpot(!0,ne);oe=y.computeSpot(!1,re);var ce=x.fromVertex,me=x.toVertex;if(x.valid)y.curve===Ec&&y.pointsCount===4&&(ce.column===me.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===ws&&(E=!0),re!==null&&oe===ws&&(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(ce.layer===me.layer)y.zf();else{var we=!1,Fe=!1,De=this.ie,_e=y.firstPickIndex+1;if(y.isOrthogonal){Fe=!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 rt=ue===ws,bt=oe===ws;2<pt&&rt&&bt?y.points.removeRange(1,pt-2):3<pt&&rt&&!bt?y.points.removeRange(1,pt-3):3<pt&&!rt&&bt?y.points.removeRange(2,pt-2):4<pt&&!rt&&!bt&&y.points.removeRange(2,pt-3)}if(x.rev){for(;me!==null&&ce!==me;){var It=pt=null;for(rt=me.sourceEdges.iterator;rt.next()&&(bt=rt.value,bt.link!==x.link||(pt=bt.fromVertex,It=bt.toVertex,pt.node!==null)););if(pt===null)break;if(pt!==ce){rt=y.i(_e-1).x,bt=y.i(_e-1).y;var Rt=pt.centerX,Kt=pt.centerY;if(Fe)this.K===180||this.K===0?_e===y.firstPickIndex+1?(y.m(_e++,rt,bt),y.m(_e++,rt,Kt)):(It!==null?It.centerY:bt)!==Kt&&(It=this.Ta[pt.layer-1]+this.Rf.x,y.m(_e++,It,bt),y.m(_e++,It,Kt)):_e===y.firstPickIndex+1?(y.m(_e++,rt,bt),y.m(_e++,Rt,bt)):(It!==null?It.centerX:rt)!==Rt&&(It=this.Ta[pt.layer-1]+this.Rf.y,y.m(_e++,rt,It),y.m(_e++,Rt,It));else if(_e===y.firstPickIndex+1){It=Math.max(10,this.he[me.layer]);var fn=Math.max(10,this.Ld[me.layer]);if(we)this.K===180?Rt<=me.bounds.x?(me=me.bounds.x,y.m(_e++,me-It,Kt),y.m(_e++,me,Kt),y.m(_e++,me+fn,Kt)):(y.m(_e++,Rt-It,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt+fn,Kt)):this.K===90?Kt>=me.bounds.bottom?(me=me.bounds.y+me.bounds.height,y.m(_e++,Rt,me+fn),y.m(_e++,Rt,me),y.m(_e++,Rt,me-It)):(y.m(_e++,Rt,Kt+fn),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt-It)):this.K===270?Kt<=me.bounds.y?(me=me.bounds.y,y.m(_e++,Rt,me-It),y.m(_e++,Rt,me),y.m(_e++,Rt,me+fn)):(y.m(_e++,Rt,Kt-It),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt+fn)):this.K===0&&(Rt>=me.bounds.right?(me=me.bounds.x+me.bounds.width,y.m(_e++,me+fn,Kt),y.m(_e++,me,Kt),y.m(_e++,me-It,Kt)):(y.m(_e++,Rt+fn,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt-It,Kt)));else{y.m(_e++,rt,bt);var bi=0;this.K===180||this.K===0?((this.K===180?Rt>=me.bounds.right:Rt<=me.bounds.x)&&(bi=(this.K===0?-It:fn)/2),y.m(_e++,rt+bi,Kt)):((this.K===270?Kt>=me.bounds.bottom:Kt<=me.bounds.y)&&(bi=(this.K===90?-It:fn)/2),y.m(_e++,Rt,bt+bi)),y.m(_e++,Rt,Kt)}}else It=Math.max(10,this.he[pt.layer]),fn=Math.max(10,this.Ld[pt.layer]),we?this.K===180?(y.m(_e++,Rt-It-De,Kt),y.m(_e++,Math.min(Rt-It+De/2,Rt),Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Math.max(Rt+fn-De/2,Rt),Kt),y.m(_e++,Rt+fn+De,Kt)):this.K===90?(y.m(_e++,Rt,Kt+fn+De),y.m(_e++,Rt,Math.max(Kt+fn-De/2,Kt)),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Math.min(Kt-It+De/2,Kt)),y.m(_e++,Rt,Kt-It-De)):this.K===270?(y.m(_e++,Rt,Kt-It-De),y.m(_e++,Rt,Math.min(Kt-It+De/2,Kt)),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Math.max(Kt+fn-De/2,Kt)),y.m(_e++,Rt,Kt+fn+De)):(y.m(_e++,Rt+fn+De,Kt),y.m(_e++,Math.max(Rt+fn-De/2,Rt),Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Math.min(Rt-It+De/2,Rt),Kt),y.m(_e++,Rt-It-De,Kt)):y.m(_e++,Rt,Kt)}me=pt}(re===null||ue!==ws||Fe)&&(rt=y.i(_e-1).x,bt=y.i(_e-1).y,Rt=y.i(_e).x,Kt=y.i(_e).y,Fe?(De=this.Ld[ce.layer],this.K===180||this.K===0?(Fe=bt,Fe>=ce.bounds.y&&Fe<=ce.bounds.bottom&&(this.K===180?Rt>=ce.bounds.x:Rt<=ce.bounds.right)&&(me=ce.centerX+(this.K===180?-De:De),Fe<ce.bounds.y+ce.bounds.height/2?Fe=ce.bounds.y-this.kc/2:Fe=ce.bounds.bottom+this.kc/2,y.m(_e++,me,bt),y.m(_e++,me,Fe)),y.m(_e++,Rt,Fe)):(Fe=rt,Fe>=ce.bounds.x&&Fe<=ce.bounds.right&&(this.K===270?Kt>=ce.bounds.y:Kt<=ce.bounds.bottom)&&(me=ce.centerY+(this.K===270?-De:De),Fe<ce.bounds.x+ce.bounds.width/2?Fe=ce.bounds.x-this.kc/2:Fe=ce.bounds.right+this.kc/2,y.m(_e++,rt,me),y.m(_e++,Fe,me)),y.m(_e++,Fe,Kt)),y.m(_e++,Rt,Kt)):we?(It=Math.max(10,this.he[ce.layer]),fn=Math.max(10,this.Ld[ce.layer]),this.K===180&&Rt>=ce.bounds.x?(me=ce.bounds.x+ce.bounds.width,y.L(_e-2,me,bt),y.L(_e-1,me+fn,bt)):this.K===90&&Kt<=ce.bounds.bottom?(me=ce.bounds.y,y.L(_e-2,rt,me),y.L(_e-1,rt,me-It)):this.K===270&&Kt>=ce.bounds.y?(me=ce.bounds.y+ce.bounds.height,y.L(_e-2,rt,me),y.L(_e-1,rt,me+fn)):this.K===0&&Rt<=ce.bounds.right&&(me=ce.bounds.x,y.L(_e-2,me,bt),y.L(_e-1,me-It,bt))):(It=Math.max(10,this.he[ce.layer]),fn=Math.max(10,this.Ld[ce.layer]),Fe=0,this.K===180||this.K===0?((this.K===180?Rt<=ce.bounds.x:Rt>=ce.bounds.right)&&(Fe=(this.K===0?fn:-It)/2),y.m(_e++,Rt+Fe,bt)):((this.K===270?Kt<=ce.bounds.y:Kt>=ce.bounds.bottom)&&(Fe=(this.K===90?fn:-It)/2),y.m(_e++,rt,Kt+Fe)),y.m(_e++,Rt,Kt)))}else{for(;ce!==null&&ce!==me;){for(It=pt=null,ce=ce.destinationEdges.iterator;ce.next()&&(rt=ce.value,rt.link!==x.link||(pt=rt.toVertex,It=rt.fromVertex,It.node!==null&&(It=null),pt.node!==null)););if(pt===null)break;pt!==me&&(rt=y.i(_e-1).x,bt=y.i(_e-1).y,Rt=pt.centerX,Kt=pt.centerY,Fe?this.K===180||this.K===0?(It!==null?It.centerY:bt)!==Kt&&(It=this.Ta[pt.layer]+this.Rf.x,_e===y.firstPickIndex+1&&(It=this.K===0?Math.max(It,rt):Math.min(It,rt)),y.m(_e++,It,bt),y.m(_e++,It,Kt)):(It!==null?It.centerX:rt)!==Rt&&(It=this.Ta[pt.layer]+this.Rf.y,_e===y.firstPickIndex+1&&(It=this.K===90?Math.max(It,bt):Math.min(It,bt)),y.m(_e++,rt,It),y.m(_e++,Rt,It)):(It=Math.max(10,this.he[pt.layer]),fn=Math.max(10,this.Ld[pt.layer]),we?this.K===180?(y.m(_e++,Rt+fn+De,Kt),y.m(_e++,Math.max(Rt+fn-De/2,Rt),Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Math.min(Rt-It+De/2,Rt),Kt),y.m(_e++,Rt-It-De,Kt)):this.K===90?(y.m(_e++,Rt,Kt-It-De),y.m(_e++,Rt,Math.min(Kt-It+De/2,Kt)),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Math.max(Kt+fn-De/2,Kt)),y.m(_e++,Rt,Kt+fn+De)):this.K===270?(y.m(_e++,Rt,Kt+fn+De),y.m(_e++,Rt,Math.max(Kt+fn-De/2,Kt)),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Math.min(Kt-It+De/2,Kt)),y.m(_e++,Rt,Kt-It-De)):(y.m(_e++,Rt-It-De,Kt),y.m(_e++,Math.min(Rt-It+De/2,Rt),Kt),y.m(_e++,Rt,Kt),y.m(_e++,Rt,Kt),y.m(_e++,Math.max(Rt+fn-De/2,Rt),Kt),y.m(_e++,Rt+fn+De,Kt)):this.K===180?(y.m(_e++,Rt+fn,Kt),y.m(_e++,Rt-It,Kt)):this.K===90?(y.m(_e++,Rt,Kt-It),y.m(_e++,Rt,Kt+fn)):this.K===270?(y.m(_e++,Rt,Kt+fn),y.m(_e++,Rt,Kt-It)):(y.m(_e++,Rt-It,Kt),y.m(_e++,Rt+fn,Kt)))),ce=pt}Fe&&(rt=y.i(_e-1).x,bt=y.i(_e-1).y,Rt=y.i(_e).x,Kt=y.i(_e).y,this.K===180||this.K===0?bt!==Kt&&(It=this.K===0?Math.min(Math.max((Rt+rt)/2,this.Ta[me.layer]+this.Rf.x),Rt):Math.max(Math.min((Rt+rt)/2,this.Ta[me.layer]+this.Rf.x),Rt),y.m(_e++,It,bt),y.m(_e++,It,Kt)):rt!==Rt&&(It=this.K===90?Math.min(Math.max((Kt+bt)/2,this.Ta[me.layer]+this.Rf.y),Kt):Math.max(Math.min((Kt+bt)/2,this.Ta[me.layer]+this.Rf.y),Kt),y.m(_e++,rt,It),y.m(_e++,Rt,It)))}E!==null&&we&&4<=y.pointsCount&&(ne!==null&&(ne=ue===ws?y.getLinkPointFromPoint(b,ne,ne.ga(Oo),y.i(3),!0):y.i(0),ue===ws&&(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===ws?y.getLinkPointFromPoint(z,re,re.ga(Oo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===ws&&(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 Vn,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),ne=E.i(b+1);if(this.B(z.y,ne.y)&&!this.B(z.x,ne.x)){var re=new Df;re.layer=Math.floor(z.y/2);var oe=E.i(0),ue=E.i(E.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=ue.x*ue.x+ue.y,re.rd=Math.min(z.x,ne.x),re.Ic=Math.max(z.x,ne.x),re.index=b,re.link=E,b+2<E.pointsCount){oe=E.i(b-1),ue=E.i(b+2);var ce=0;oe.y<z.y?ce=ue.y<z.y?3:z.x<ne.x?2:1:oe.y>z.y&&(ce=ue.y>z.y?0:ne.x<z.x?2:1),re.j=ce}x.push(re)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ce=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(ce++,re=ue.jc);this.zi(x,this.Ux,z,z+ne);var me=1;for(re=x[z].first,oe=z;oe<b;oe++)ue=x[oe],ue.first!==re&&(me++,re=ue.first);for(oe=!0,ue=me,ce<me?(oe=!1,ue=ce,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ce=0,me=z;me<b;me++){var we=x[me];(oe?we.first:we.jc)!==re&&(ce++,re=oe?we.first:we.jc);var Fe=we.link;z=Fe.i(we.index),ne=Fe.i(we.index+1);var De=this.linkSpacing*(ce-(ue-1)/2);y++,Fe.uh(),Fe.L(we.index,z.x,z.y+De),Fe.L(we.index+1,ne.x,ne.y+De),Fe.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),ne=E.i(b+1),this.B(z.x,ne.x)&&!this.B(z.y,ne.y)&&(re=new Df,re.layer=Math.floor(z.x/2),oe=E.i(0),ue=E.i(E.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=ue.x+ue.y*ue.y,re.rd=Math.min(z.y,ne.y),re.Ic=Math.max(z.y,ne.y),re.index=b,re.link=E,b+2<E.pointsCount&&(oe=E.i(b-1),ue=E.i(b+2),ce=0,oe.x<z.x?ce=ue.x<z.x?3:z.y<ne.y?2:1:oe.x>z.x&&(ce=ue.x>z.x?0:ne.y<z.y?2:1),re.j=ce),x.push(re));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(ne=x[z].Ic,b=a+1;b<E&&x[b].rd<ne;)ne=Math.max(ne,x[b].Ic),b++;if(ne=b-z,1<ne){for(this.zi(x,this.Js,z,z+ne),ce=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(ce++,re=ue.jc);for(this.zi(x,this.Ux,z,z+ne),me=1,re=x[z].first,oe=z;oe<b;oe++)ue=x[oe],ue.first!==re&&(me++,re=ue.first);for(oe=!0,ue=me,ce<me?(oe=!1,ue=ce,re=x[z].jc,this.zi(x,this.Js,z,z+ne)):re=x[z].first,ce=0,me=z;me<b;me++)we=x[me],(oe?we.first:we.jc)!==re&&(ce++,re=oe?we.first:we.jc),Fe=we.link,z=Fe.i(we.index),ne=Fe.i(we.index+1),De=this.linkSpacing*(ce-(ue-1)/2),y++,Fe.uh(),Fe.L(we.index,z.x+De,z.y),Fe.L(we.index+1,ne.x+De,ne.y),Fe.zf()}z=b}a=E}}}},Ae=za.prototype,Ae.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},Ae.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},Ae.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},Ae.B=function(a,y){return a-=y,-1<a&&1>a},Ae.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Et("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()):Et("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 wn(za,"CycleDepthFirst",0),Ly=new wn(za,"CycleGreedy",1),Cm=new wn(za,"CycleFromLayers",2),Q0=new wn(za,"LayerOptimalLinkLength",0),Ny=new wn(za,"LayerLongestPathSink",1),Ay=new wn(za,"LayerLongestPathSource",2),q0=new wn(za,"InitDepthFirstOut",0),Dy=new wn(za,"InitDepthFirstIn",1),Iy=new wn(za,"InitNaive",2),Oy=new wn(za,"AggressiveNone",0),ev=new wn(za,"AggressiveLess",1),ky=new wn(za,"AggressiveMore",2),VS=8;za.className="LayeredDigraphLayout",za.CycleDepthFirst=J0,za.CycleGreedy=Ly,za.CycleFromLayers=Cm,za.LayerOptimalLinkLength=Q0,za.LayerLongestPathSink=Ny,za.LayerLongestPathSource=Ay,za.InitDepthFirstOut=q0,za.InitDepthFirstIn=Dy,za.InitNaive=Iy,za.AggressiveNone=Oy,za.AggressiveLess=ev,za.AggressiveMore=ky,za.PackNone=0,za.PackExpand=1,za.PackStraighten=2,za.PackMedian=4,za.PackAll=15,za.AlignNone=0,za.AlignUpperLeft=1,za.AlignUpperRight=2,za.AlignLowerLeft=4,za.AlignLowerRight=8,za.AlignAll=15;function Df(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Df.className="SegInfo";function Mp(a){ts.call(this,a)}Wt(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}Wt(Oc,ul);function rS(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],E=Sr(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Sr(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Et("Unable to find destination edge to given vertex")}function Ty(a){if(!a.co){for(var y=[],x=Sr(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=Sr(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}Wt(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){vs.call(this),this.Ub=new Un,this.Wn=ov,this.ud=ih,this.vo=sv,this.Bq=Vy,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new mi(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)}Wt(Ro,vs),Ro.prototype.cloneProtected=function(a){vs.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:Et("Unknown enum value: "+a):vs.prototype.qb.call(this,a)},Ro.prototype.createNetwork=function(){return new Wg(this)},Ro.prototype.makeNetwork=function(a){function y(E){if(E instanceof Di)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof fi){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 po?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 Un,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Di?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Wc&&a.add(x)}this.Ub=a}for(this.Ub.count===0&&this.findRoots(),a=this.Ub.copy().iterator;a.next();)y=a.value,y.initialized||(y.initialized=!0,Ry(this,y));for(y=this.network.vertexes,a=null;a=YS(y),0<a.count;)y=oS(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Ry(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&sS(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&lS(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&uS(this,y);if(this.Cu(),this.layerStyle===cv){for(a=[],y=this.network.vertexes.iterator;y.next();){x=y.value;var E=x.parent;E===null&&(E=x),E=E.angle===0||E.angle===180;var b=a[x.level];b===void 0&&(b=0),a[x.level]=Math.max(b,E?x.width:x.height)}for(y=0;y<a.length;y++)a[y]===void 0&&(a[y]=0);for(this.$v=a,y=this.network.vertexes.iterator;y.next();)x=y.value,E=x.parent,E===null&&(E=x),E.angle===0||E.angle===180?(E.angle===180&&(x.focusX+=a[x.level]-x.width),x.width=a[x.level]):(E.angle===270&&(x.focusY+=a[x.level]-x.height),x.height=a[x.level])}else if(this.layerStyle===Uy)for(a=this.network.vertexes.iterator;a.next();){for(y=a.value,x=y.angle===0||y.angle===180,E=-1,b=0;b<y.children.length;b++){var z=y.children[b];E=Math.max(E,x?z.width:z.height)}if(0<=E)for(b=0;b<y.children.length;b++)z=y.children[b],x?(y.angle===180&&(z.focusX+=E-z.width),z.width=E):(y.angle===270&&(z.focusY+=E-z.height),z.height=E)}for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Wc&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Un,this.isValidLayout=!0};function YS(a){var y=new Un;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}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:Et("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:Et("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 Vn,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 Vn,E=y.sourceVertexes;E.next();)b=E.value,aS(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Et("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:Et("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 ce=ue.value;ce.category==="Comment"&&ce.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ce),ce.Va(),ce=ce.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ce.width),ne+=ce.height+Math.abs(re)):(z+=ce.width+Math.abs(re),ne=Math.max(ne,ce.height)),re=oe)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),ne=Math.max(0,ne-a.height)):(ne+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Bn.allocAt(0,0,a.bounds.width+z,a.bounds.height+ne),a.bounds=b,Bn.free(b))};function If(a){return a===qh||a===ah||a===ef||a===Nh}function bm(a){return a===qh||a===ah}function _y(a){var y=a.parent;if(y!==null){var x=y.alignment;if(If(x)){if(bm(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===ef)return!0}}return!1}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,ce=ue.length,me=st.alloc(),we=0;we<ce;we++){var Fe=ue[we],De=Fe.measuredBounds;if(E&&!ne||!z&&!x&&ne||z&&x&&ne){if(135<b&&!z||x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x-a.commentMargin-De.width,a.bounds.y+oe),Fe.move(me),Fe=Fe.Sd();Fe.next();){var _e=Fe.value;_e.fromSpot=aa,_e.toSpot=Do}else for(me.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Do,_e.toSpot=aa;else if(0<=a.commentMargin)for(me.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Do,_e.toSpot=aa;else for(me.h(a.bounds.x+a.commentMargin-De.width,a.bounds.y+oe),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=aa,_e.toSpot=Do;oe=0<=a.commentSpacing?oe+(De.height+a.commentSpacing):oe+(a.commentSpacing-De.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-De.height),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Fo,_e.toSpot=Or;else for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Or,_e.toSpot=Fo;else if(0<=a.commentMargin)for(me.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Or,_e.toSpot=Fo;else for(me.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-De.height),Fe.move(me),Fe=Fe.Sd();Fe.next();)_e=Fe.value,_e.fromSpot=Fo,_e.toSpot=Or;oe=0<=a.commentSpacing?oe+(De.width+a.commentSpacing):oe+(a.commentSpacing-De.width)}}if(st.free(me),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,ce=If(oe),me=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var we=a.nodeSpacing,Fe=this.computeNodeIndent(a),De=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,rt=0,bt=0,It=0,Rt=null,Kt=null,fn=0,bi=0,Yi=0,Wi=0,hi=0,ei=0,co=0,Kr=0;if(ce&&!bm(oe)&&135<b&&ne.reverse(),bm(oe))if(1<re)for(var Fa=0;Fa<re;Fa++)Fa%2===0&&Fa!==re-1&&(Kr=Math.max(Kr,y?ne[Fa].Da.width:ne[Fa].Da.height));else re===1&&(Kr=y?ne[0].Da.width:ne[0].Da.height);if(ce){switch(oe){case qh:bt=135>b?dS(this,a,ne,Kr,rt,bt):hS(this,a,ne,Kr,rt,bt),Kr=bt.x,rt=bt.width,bt=bt.height;break;case ef:for(Rt=0;Rt<re;Rt++)Kt=ne[Rt],me=Kt.Da,It=ei===0?0:De,y?(Kt.S.h(z-me.width,Wi+It),rt=Math.max(rt,me.width),bt=Math.max(bt,Wi+It+me.height),Wi+=It+me.height):(Kt.S.h(Yi+It,z-me.height),rt=Math.max(rt,Yi+It+me.width),bt=Math.max(bt,me.height),Yi+=It+me.width),ei++;break;case Nh:for(Rt=0;Rt<re;Rt++)Kt=ne[Rt],z=Kt.Da,me=ei===0?0:De,y?(Kt.S.h(we/2+a.focus.x,Wi+me),rt=Math.max(rt,z.width),bt=Math.max(bt,Wi+me+z.height),Wi+=me+z.height):(Kt.S.h(Yi+me,we/2+a.focus.y),rt=Math.max(rt,Yi+me+z.width),bt=Math.max(bt,z.height),Yi+=me+z.width),ei++}Rt=Qu(this,2),Kt=Qu(this,2),y?(Rt[0].h(0,0),Rt[1].h(0,bt),Kt[0].h(rt,0)):(Rt[0].h(0,0),Rt[1].h(rt,0),Kt[0].h(0,bt)),Kt[1].h(rt,bt)}else for(Fa=0;Fa<re;Fa++){var qa=ne[Fa],wl=qa.Da;if(y){0<me&&0<ei&&Yi+we+wl.width>me&&(Yi<z&&rg(a,oe,z-Yi,0,co,Fa-1),hi++,ei=0,co=Fa,It=bt,Yi=0,Wi=135<b?-bt-De:bt+De),iv(this,qa,0,Wi);var Nl=0;if(ei===0)Rt=qa.Yo,Kt=qa.kp,fn=wl.width,bi=wl.height,(Rt===null||Kt===null||b!==id(qa))&&(Rt=Qu(this,2),Kt=Qu(this,2),Rt[0].h(0,0),Rt[1].h(0,bi),Kt[0].h(fn,0),Kt[1].h(fn,bi));else{var pu=Si();bi=fS(this,a,qa,Rt,Kt,fn,bi,pu),Nl=bi.x,Rt=pu[0],Kt=pu[1],fn=bi.width,bi=bi.height,ki(pu),Yi<wl.width&&0>Nl&&(zg(a,-Nl,0,co,Fa-1),rv(Rt,-Nl,0),rv(Kt,-Nl,0),Nl=0)}qa.S.h(Nl,Wi),rt=Math.max(rt,fn),bt=Math.max(bt,It+(hi===0?0:De)+wl.height),Yi=fn}else 0<me&&0<ei&&Wi+we+wl.height>me&&(Wi<z&&rg(a,oe,0,z-Wi,co,Fa-1),hi++,ei=0,co=Fa,It=rt,Wi=0,Yi=135<b?-rt-De:rt+De),iv(this,qa,Yi,0),Nl=0,ei===0?(Rt=qa.Yo,Kt=qa.kp,fn=wl.width,bi=wl.height,(Rt===null||Kt===null||b!==id(qa))&&(Rt=Qu(this,2),Kt=Qu(this,2),Rt[0].h(0,0),Rt[1].h(fn,0),Kt[0].h(0,bi),Kt[1].h(fn,bi))):(pu=Si(),bi=fS(this,a,qa,Rt,Kt,fn,bi,pu),Nl=bi.x,Rt=pu[0],Kt=pu[1],fn=bi.width,bi=bi.height,ki(pu),Wi<wl.height&&0>Nl&&(zg(a,0,-Nl,co,Fa-1),rv(Rt,0,-Nl),rv(Kt,0,-Nl),Nl=0)),qa.S.h(Yi,Nl),bt=Math.max(bt,bi),rt=Math.max(rt,It+(hi===0?0:De)+wl.width),Wi=bi;ei++}switch(0<hi&&(y?(bt+=Math.max(0,x),Yi<rt&&rg(a,oe,rt-Yi,0,co,re-1),0<_e&&(ue||zg(a,_e,0,0,re-1),rt+=_e)):(rt+=Math.max(0,x),Wi<bt&&rg(a,oe,0,bt-Wi,co,re-1),0<_e&&(ue||zg(a,0,_e,0,re-1),bt+=_e))),_e=ue=0,oe){case Np:y?ue+=rt/2-a.focus.x-Fe/2:_e+=bt/2-a.focus.y-Fe/2;break;case Hg:0<hi?y?ue+=rt/2-a.focus.x-Fe/2:_e+=bt/2-a.focus.y-Fe/2:y?(Kr=ne[0].S.x+ne[0].la.x,ue+=Kr+(ne[re-1].S.x+ne[re-1].la.x+2*ne[re-1].focus.x-Kr)/2-a.focus.x-Fe/2):(Kr=ne[0].S.y+ne[0].la.y,_e+=Kr+(ne[re-1].S.y+ne[re-1].la.y+2*ne[re-1].focus.y-Kr)/2-a.focus.y-Fe/2);break;case rh:y?(ue-=Fe,rt+=Fe):(_e-=Fe,bt+=Fe);break;case oh:y?(ue+=rt-a.width+Fe,rt+=Fe):(_e+=bt-a.height+Fe,bt+=Fe);break;case qh:y?1<re?ue+=Kr+we/2-a.focus.x:ue+=ne[0].focus.x-a.focus.x+ne[0].la.x:1<re?_e+=Kr+we/2-a.focus.y:_e+=ne[0].focus.y-a.focus.y+ne[0].la.y;break;case ef:y?ue+=rt+we/2-a.focus.x:_e+=bt+we/2-a.focus.y;break;case Nh:break;default:bt=this.customAlignment(a,ue,_e,rt,bt),ue=bt[0],_e=bt[1],rt=bt[2],bt=bt[3]}for(Fe=0;Fe<re;Fe++)Kr=ne[Fe],y?Kr.S.h(Kr.S.x+Kr.la.x-ue,Kr.S.y+(135<b?(ce?-bt:-Kr.Da.height)+Kr.la.y-x:pt+x+Kr.la.y)):Kr.S.h(Kr.S.x+(135<b?(ce?-rt:-Kr.Da.width)+Kr.la.x-x:E+x+Kr.la.x),Kr.S.y+Kr.la.y-_e);if(re=ne=0,ce?y?(rt=jy(a,rt,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+=rt+x),rt+=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>rt&&(rt=Zy(oe,E-rt,0),ne=rt.x,re=rt.y,rt=E,ue=0):rt=jy(a,rt,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+=rt+x),rt=Math.max(Math.max(rt,E),rt+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<hi)b=Qu(this,4),hi=Qu(this,4),y?(b[2].h(0,pt+x),b[3].h(b[2].x,bt),hi[2].h(rt,b[2].y),hi[3].h(hi[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(rt,b[2].y),hi[2].h(b[2].x,bt),hi[3].h(b[3].x,hi[2].y));else{for(b=Qu(this,Rt.length+2),hi=Qu(this,Kt.length+2),oe=0;oe<Rt.length;oe++)ce=Rt[oe],b[oe+2].h(ce.x+ne,ce.y+re);for(oe=0;oe<Kt.length;oe++)ce=Kt[oe],hi[oe+2].h(ce.x+ne,ce.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])),hi[0].h(ue+E,0),hi[1].h(hi[0].x,pt),hi[2].y<hi[1].y&&(hi[2].x<hi[0].x?hi[2].assign(hi[1]):hi[1].assign(hi[2])),hi[3].y<hi[2].y&&(hi[3].x<hi[0].x?hi[3].assign(hi[2]):hi[2].assign(hi[3])),b[2].y-=x/2,hi[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])),hi[0].h(0,_e+pt),hi[1].h(E,hi[0].y),hi[2].x<hi[1].x&&(hi[2].y<hi[0].y?hi[2].assign(hi[1]):hi[1].assign(hi[2])),hi[3].x<hi[2].x&&(hi[3].y<hi[0].y?hi[3].assign(hi[2]):hi[2].assign(hi[3])),b[2].x-=x/2,hi[2].x-=x/2),xd(this,Rt),xd(this,Kt),a.Yo=b,a.kp=hi,a.la.h(ue,_e),a.Da.h(rt,bt)}break;default:Et("Unhandled compaction value "+a.compaction.toString())}}};function cS(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=If(x));var b=_y(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=id(y),x=E===90||E===270;var z=0;b=y.children;for(var ne=b.length,re=0;re<ne;re++){var oe=b[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var ue=y.alignment,ce=ue===rh,me=ue===oh;re=If(ue);var we=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Fe=y.nodeSpacing,De=a.computeNodeIndent(y),_e=ce||me?0:De/2,pt=y.rowSpacing,rt=0;(ce||me||y.hm||y.im&&y.maxGenerationCount===1)&&(rt=Math.max(0,y.rowIndent)),ce=y.width;var bt=y.height,It=0,Rt=0,Kt=0,fn=0,bi=0,Yi=0,Wi=0,hi=0,ei=0,co=0;if(re&&!bm(ue)&&135<E&&b.reverse(),bm(ue))if(1<ne)for(var Kr=0;Kr<ne;Kr++){var Fa=b[Kr],qa=Fa.Da;Kr%2===0&&Kr!==ne-1?ei=Math.max(ei,(x?qa.width:qa.height)+a.computeBusNodeSpacing(Fa)-Fe):Kr%2!==0&&(co=Math.max(co,(x?qa.width:qa.height)+a.computeBusNodeSpacing(Fa)-Fe))}else ne===1&&(ei=x?b[0].Da.width:b[0].Da.height);if(re)switch(ue){case qh:case ah:Rt=135>E?dS(a,y,b,ei,It,Rt):hS(a,y,b,ei,It,Rt),ei=Rt.x,It=Rt.width,Rt=Rt.height;break;case ef:for(we=0;we<ne;we++)_e=b[we],Kt=_e.Da,co=Wi===0?0:pt,x?(_e.S.h(z-Kt.width,bi+co),It=Math.max(It,Kt.width),Rt=Math.max(Rt,bi+co+Kt.height),bi+=co+Kt.height):(_e.S.h(fn+co,z-Kt.height),It=Math.max(It,fn+co+Kt.width),Rt=Math.max(Rt,Kt.height),fn+=co+Kt.width),Wi++;break;case Nh:for(z=0;z<ne;z++)we=b[z],_e=we.Da,Kt=Wi===0?0:pt,x?(we.S.h(Fe/2+y.focus.x,bi+Kt),It=Math.max(It,_e.width),Rt=Math.max(Rt,bi+Kt+_e.height),bi+=Kt+_e.height):(we.S.h(fn+Kt,Fe/2+y.focus.y),It=Math.max(It,fn+Kt+_e.width),Rt=Math.max(Rt,_e.height),fn+=Kt+_e.width),Wi++}else for(co=0;co<ne;co++)Kr=b[co],Fa=Kr.Da,x?(0<we&&0<Wi&&fn+Fe+Fa.width>we&&(fn<z&&rg(y,ue,z-fn,0,hi,co-1),Yi++,Wi=0,hi=co,Kt=Rt,fn=0,bi=135<E?-Rt-pt:Rt+pt),qa=Wi===0?_e:Fe,iv(a,Kr,0,bi),Kr.S.h(fn+qa,bi),It=Math.max(It,fn+qa+Fa.width),Rt=Math.max(Rt,Kt+(Yi===0?0:pt)+Fa.height),fn+=qa+Fa.width):(0<we&&0<Wi&&bi+Fe+Fa.height>we&&(bi<z&&rg(y,ue,0,z-bi,hi,co-1),Yi++,Wi=0,hi=co,Kt=It,bi=0,fn=135<E?-It-pt:It+pt),qa=Wi===0?_e:Fe,iv(a,Kr,fn,0),Kr.S.h(fn,bi+qa),Rt=Math.max(Rt,bi+qa+Fa.height),It=Math.max(It,Kt+(Yi===0?0:pt)+Fa.width),bi+=qa+Fa.height),Wi++;switch(0<Yi&&(x?(Rt+=Math.max(0,oe),fn<It&&rg(y,ue,It-fn,0,hi,ne-1),0<rt&&(me||zg(y,rt,0,0,ne-1),It+=rt)):(It+=Math.max(0,oe),bi<Rt&&rg(y,ue,0,Rt-bi,hi,ne-1),0<rt&&(me||zg(y,0,rt,0,ne-1),Rt+=rt))),rt=me=0,ue){case Np:x?me+=It/2-y.focus.x-De/2:rt+=Rt/2-y.focus.y-De/2;break;case Hg:0<Yi?x?me+=It/2-y.focus.x-De/2:rt+=Rt/2-y.focus.y-De/2:x?(a=b[0].S.x+b[0].la.x,me+=a+(b[ne-1].S.x+b[ne-1].la.x+2*b[ne-1].focus.x-a)/2-y.focus.x-De/2):(a=b[0].S.y+b[0].la.y,rt+=a+(b[ne-1].S.y+b[ne-1].la.y+2*b[ne-1].focus.y-a)/2-y.focus.y-De/2);break;case rh:x?(me-=De,It+=De):(rt-=De,Rt+=De);break;case oh:x?(me+=It-y.width+De,It+=De):(rt+=Rt-y.height+De,Rt+=De);break;case qh:case ah:x?1<ne?me+=ei+Fe/2-y.focus.x:me+=b[0].focus.x-y.focus.x+b[0].la.x:1<ne?rt+=ei+Fe/2-y.focus.y:rt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case ef:x?me+=It+Fe/2-y.focus.x:rt+=Rt+Fe/2-y.focus.y;break;case Nh:break;default:a=a.customAlignment(y,me,rt,It,Rt),me=a[0],rt=a[1],It=a[2],Rt=a[3]}for(a=0;a<ne;a++)De=b[a],x?De.S.h(De.S.x+De.la.x-me,De.S.y+(135<E?(re?-Rt:-De.Da.height)+De.la.y-oe:bt+oe+De.la.y)):De.S.h(De.S.x+(135<E?(re?-It:-De.Da.width)+De.la.x-oe:ce+oe+De.la.x),De.S.y+De.la.y-rt);x?(It=jy(y,It,me),0>me&&(me=0),135<E&&(rt+=Rt+oe),Rt=Math.max(Math.max(Rt,bt),Rt+bt+oe)):(135<E&&(me+=It+oe),It=Math.max(Math.max(It,ce),It+ce+oe),Rt=zy(y,Rt,rt),0>rt&&(rt=0)),y.la.h(me,rt),y.Da.h(It,Rt)}}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 Bn(E,0,b,z);if(ne===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Bn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=id(y)===90,ce=0,me=0,we=0,Fe=0;Fe<ne;Fe++)if(!(Fe%2!==0||1<ne&&Fe===ne-1)){var De=x[Fe],_e=De.Da,pt=ce===0?0:oe;if(ue){var rt=a.computeBusNodeSpacing(De)-re;De.S.h(E-(_e.width+rt),we+pt),b=Math.max(b,_e.width+rt),z=Math.max(z,we+pt+_e.height),we+=pt+_e.height}else rt=a.computeBusNodeSpacing(De)-re,De.S.h(me+pt,E-(_e.height+rt)),z=Math.max(z,_e.height+rt),b=Math.max(b,me+pt+_e.width),me+=pt+_e.width;ce++}for(ce=0,De=me,Fe=we,ue?(me=E+re,we=0):(me=0,we=E+re),_e=0;_e<ne;_e++)if(_e%2!==0){pt=x[_e],rt=pt.Da;var bt=ce===0?0:oe;if(ue){var It=a.computeBusNodeSpacing(pt)-re;pt.S.h(me+It,we+bt),b=Math.max(b,me+rt.width+It),z=Math.max(z,we+bt+rt.height),we+=bt+rt.height}else It=a.computeBusNodeSpacing(pt)-re,pt.S.h(me+bt,we+It),b=Math.max(b,me+bt+rt.width),z=Math.max(z,we+rt.height+It),me+=bt+rt.width;ce++}return 1<ne&&ne%2===1&&(x=x[ne-1],ne=x.Da,a=a.computeBusLastRowSpacing(x,ue?Math.max(Math.abs(Fe),Math.abs(we)):Math.max(Math.abs(De),Math.abs(me))),ue?(x.S.h(E+re/2-x.focus.x-x.la.x,z+a),ue=E+re/2-x.focus.x-x.la.x,b=Math.max(b,ue+ne.width),0>ue&&(b-=ue),z=Math.max(z,Math.max(Fe,we)+a+ne.height),0>x.S.x&&(E=nv(y,x.S.x,!1,E,re))):(x.S.h(b+a,E+re/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(De,me)+a+ne.width),we=E+re/2-x.focus.y-x.la.y,z=Math.max(z,we+ne.height),0>we&&(z-=we),0>x.S.y&&(E=nv(y,x.S.y,!0,E,re)))),new Bn(E,0,b,z)}function hS(a,y,x,E,b,z){var ne=x.length;if(ne===0)return new Bn(E,0,b,z);if(ne===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Bn(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=id(y)===270,ce=0,me=0,we=0,Fe=0;Fe<ne;Fe++)if(!(Fe%2!==0||1<ne&&Fe===ne-1)){var De=x[Fe],_e=De.Da,pt=ce===0?0:oe;if(ue){var rt=a.computeBusNodeSpacing(De)-re;we-=pt+_e.height,De.S.h(E-(_e.width+rt),we),b=Math.max(b,_e.width+rt),z=Math.max(z,Math.abs(we))}else rt=a.computeBusNodeSpacing(De)-re,me-=pt+_e.width,De.S.h(me,E-(_e.height+rt)),z=Math.max(z,_e.height+rt),b=Math.max(b,Math.abs(me));ce++}for(ce=0,De=me,Fe=we,ue?(me=E+re,we=0):(me=0,we=E+re),_e=0;_e<ne;_e++)if(_e%2!==0){pt=x[_e],rt=pt.Da;var bt=ce===0?0:oe;if(ue){var It=a.computeBusNodeSpacing(pt)-re;we-=bt+rt.height,pt.S.h(me+It,we),b=Math.max(b,me+rt.width+It),z=Math.max(z,Math.abs(we))}else It=a.computeBusNodeSpacing(pt)-re,me-=bt+rt.width,pt.S.h(me,we+It),z=Math.max(z,we+rt.height+It),b=Math.max(b,Math.abs(me));ce++}for(1<ne&&ne%2===1&&(oe=x[ne-1],ce=oe.Da,a=a.computeBusLastRowSpacing(oe,ue?Math.max(Math.abs(Fe),Math.abs(we)):Math.max(Math.abs(De),Math.abs(me))),ue?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-ce.height-a),me=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,me+ce.width),0>me&&(b-=me),z=Math.max(z,Math.abs(Math.min(Fe,we))+a+ce.height),0>oe.S.x&&(E=nv(y,oe.S.x,!1,E,re))):(oe.S.h(-b-ce.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(De,me))+a+ce.width),we=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,we+ce.height),0>we&&(z-=we),0>oe.S.y&&(E=nv(y,oe.S.y,!0,E,re)))),y=0;y<ne;y++)re=x[y],ue?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+b,re.S.y);return new Bn(E,0,b,z)}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:Et("Unhandled alignment value "+a.toString())}return new st(y,x)}function rg(a,y,x,E,b,z){y=Zy(y,x,E),zg(a,y.x,y.y,b,z)}function zg(a,y,x,E,b){if(y!==0||x!==0)for(a=a.children;E<=b;E++){var z=a[E].S;z.x+=y,z.y+=x}}function iv(a,y,x,E){var b=y.parent;switch(a.ud){case ih:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Zg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Et("Unhandled path value "+a.ud.toString())}}function rv(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function fS(a,y,x,E,b,z,ne,re){var oe=id(y),ue=oe===90||oe===270,ce=y.nodeSpacing;y=E;var me=b;E=z;var we=ne,Fe=x.Yo,De=x.kp;ne=x.Da;var _e=ue?Math.max(we,ne.height):Math.max(E,ne.width);if((Fe===null||oe!==id(x))&&(Fe=Qu(a,2),De=Qu(a,2),ue?(Fe[0].h(0,0),Fe[1].h(0,ne.height),De[0].h(ne.width,0),De[1].h(De[0].x,Fe[1].y)):(Fe[0].h(0,0),Fe[1].h(ne.width,0),De[0].h(0,ne.height),De[1].h(Fe[1].x,De[0].y))),ue){if(we=9999999,!(me===null||2>me.length||Fe===null||2>Fe.length))for(b=x=0;x<me.length&&b<Fe.length;){z=me[x];var pt=Fe[b];oe=pt.x,ue=pt.y,oe+=E;var rt=z;x+1<me.length&&(rt=me[x+1]);var bt=pt;pt=bt.x,bt=bt.y,b+1<Fe.length&&(bt=Fe[b+1],pt=bt.x,bt=bt.y,pt+=E);var It=we;z.y===ue?It=oe-z.x:z.y>ue&&z.y<bt?It=oe+(z.y-ue)/(bt-ue)*(pt-oe)-z.x:ue>z.y&&ue<rt.y&&(It=oe-(z.x+(ue-z.y)/(rt.y-z.y)*(rt.x-z.x))),It<we&&(we=It),rt.y<=z.y?x++:bt<=ue?b++:(rt.y<=bt&&x++,bt<=rt.y&&b++)}if(we=E-we,we+=ce,x=Fe,b=we,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ce=Qu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)ue=x[z++],ce[E++].h(ue.x+b,ue.y);for(;oe<y.length;)ue=y[oe++],ce[E++].h(ue.x,ue.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)ue=x[z++],ce[E++].h(ue.x+b,ue.y);for(x=Qu(a,E),oe=0;oe<E;oe++)x[oe].assign(ce[oe]);xd(a,ce),E=x}if(z=De,oe=we,me===null||2>me.length||z===null||2>z.length)b=null;else{for(ce=Qu(a,me.length+z.length),b=ue=x=0;x<me.length&&me[x].y<z[0].y;)rt=me[x++],ce[b++].h(rt.x,rt.y);for(;ue<z.length;)rt=z[ue++],ce[b++].h(rt.x+oe,rt.y);for(z=z[z.length-1].y;x<me.length&&me[x].y<=z;)x++;for(;x<me.length&&me[x].y>z;)oe=me[x++],ce[b++].h(oe.x,oe.y);for(z=Qu(a,b),x=0;x<b;x++)z[x].assign(ce[x]);xd(a,ce),b=z}return z=Math.max(0,we)+ne.width,ne=_e,xd(a,y),xd(a,Fe),xd(a,me),xd(a,De),re[0]=E,re[1]=b,new Bn(we,0,z,ne)}if(E=9999999,!(me===null||2>me.length||Fe===null||2>Fe.length))for(b=x=0;x<me.length&&b<Fe.length;)z=me[x],pt=Fe[b],oe=pt.x,ue=pt.y,ue+=we,rt=z,x+1<me.length&&(rt=me[x+1]),bt=pt,pt=bt.x,bt=bt.y,b+1<Fe.length&&(bt=Fe[b+1],pt=bt.x,bt=bt.y,bt+=we),It=E,z.x===oe?It=ue-z.y:z.x>oe&&z.x<pt?It=ue+(z.x-oe)/(pt-oe)*(bt-ue)-z.y:oe>z.x&&oe<rt.x&&(It=ue-(z.y+(oe-z.x)/(rt.x-z.x)*(rt.y-z.y))),It<E&&(E=It),rt.x<=z.x?x++:pt<=oe?b++:(rt.x<=pt&&x++,pt<=rt.x&&b++);if(we-=E,we+=ce,x=Fe,b=we,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ce=Qu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)ue=x[z++],ce[E++].h(ue.x,ue.y+b);for(;oe<y.length;)ue=y[oe++],ce[E++].h(ue.x,ue.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)ue=x[z++],ce[E++].h(ue.x,ue.y+b);for(x=Qu(a,E),oe=0;oe<E;oe++)x[oe].assign(ce[oe]);xd(a,ce),E=x}if(z=De,oe=we,me===null||2>me.length||z===null||2>z.length)b=null;else{for(ce=Qu(a,me.length+z.length),b=ue=x=0;x<me.length&&me[x].x<z[0].x;)rt=me[x++],ce[b++].h(rt.x,rt.y);for(;ue<z.length;)rt=z[ue++],ce[b++].h(rt.x,rt.y+oe);for(z=z[z.length-1].x;x<me.length&&me[x].x<=z;)x++;for(;x<me.length&&me[x].x>z;)oe=me[x++],ce[b++].h(oe.x,oe.y);for(z=Qu(a,b),x=0;x<b;x++)z[x].assign(ce[x]);xd(a,ce),b=z}return z=_e,ne=Math.max(0,we)+ne.height,xd(a,y),xd(a,Fe),xd(a,me),xd(a,De),re[0]=E,re[1]=b,new Bn(we,0,z,ne)}function Qu(a,y){if(a=a.ru[y],a!==void 0&&(a=a.pop(),a!==void 0))return a;a=[];for(var x=0;x<y;x++)a[x]=new st;return a}function xd(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}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:Et("Unhandled sorting value "+this.sorting.toString())}for(x=this.arrangementOrigin,y=x.x,x=x.y,E=0;E<a.length;E++){var b=a[E];switch(Hy(this,b,y+b.la.x,x+b.la.y),this.Rb){case lv:x+=b.Da.height+this.$d.height;break;case Ky:y+=b.Da.width+this.$d.width;break;default:Et("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 st(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new st(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var ne=0;ne<a.length;ne++)z+=a[ne]+y[ne];for(ne=0;ne<a.length;ne++){var re=a[ne]+y[ne];this.angle===270?(z-=re,b.push(new Bn(0,z,x,re))):this.angle===90?(b.push(new Bn(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new Bn(z,0,re,x))):(b.push(new Bn(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},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=Do;break;case 90:b=Or;break;case 180:b=aa;break;default:b=Fo}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?aa:Fo;if(ne===1||y===ne-1&&ne%2===1)switch(E){case 0:oe=aa;break;case 90:oe=Fo;break;case 180:oe=Do;break;default:oe=Or}else y%2===0&&(oe=E===90||E===270?Do:Or);x?(a.setsPortSpot&&(re.fromSpot=b),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=b))}}break;case ef:for(E=E===90||E===270?Do:Or,z=x?a.destinationEdges:a.sourceEdges;z.next();)ne=z.value.link,ne!==null&&(x?(a.setsPortSpot&&(ne.fromSpot=b),a.setsChildPortSpot&&(ne.toSpot=E)):(a.setsPortSpot&&(ne.fromSpot=E),a.setsChildPortSpot&&(ne.toSpot=b)));break;case Nh:for(E=E===90||E===270?aa:Fo,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=Do;break;case 90:E.fromSpot=Or;break;case 180:E.fromSpot=aa;break;default:E.fromSpot=Fo}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=aa;break;case 90:E.toSpot=Fo;break;case 180:E.toSpot=Do;break;default:E.toSpot=Or}else E.toSpot=a.childPortSpot}}else for(b=a.sourceEdges;b.next();)if(E=b.value.link,E!==null){if(a.setsPortSpot)if(a.portSpot.Xb())switch(x){case 0:E.toSpot=Do;break;case 90:E.toSpot=Or;break;case 180:E.toSpot=aa;break;default:E.toSpot=Fo}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=aa;break;case 90:E.fromSpot=Fo;break;case 180:E.fromSpot=Do;break;default:E.fromSpot=Or}else E.fromSpot=a.childPortSpot}};function id(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}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!==Vy&&a!==Uy&&a!==cv||(this.Bq=a,this.C())}},comments:{get:function(){return this.td},set:function(a){this.td!==a&&(this.td=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==lv&&a!==Ky&&a!==uv||(this.Rb=a,this.C())}},arrangementSpacing:{get:function(){return this.$d},set:function(a){this.$d.D(a)||(this.$d.assign(a),this.C())}},rootDefaults:{get:function(){return this.W},set:function(a){this.W!==a&&(this.W=a,this.C())}},alternateDefaults:{get:function(){return this.Y},set:function(a){this.Y!==a&&(this.Y=a,this.C())}},sorting:{get:function(){return this.W.sorting},set:function(a){this.W.sorting===a||a!==Lp&&a!==Fm&&a!==Bm&&!Mm||(this.W.sorting=a,this.C())}},comparer:{get:function(){return this.W.comparer},set:function(a){this.W.comparer!==a&&(this.W.comparer=a,this.C())}},angle:{get:function(){return this.W.angle},set:function(a){this.W.angle!==a&&(a===0||a===90||a===180||a===270?(this.W.angle=a,this.C()):Et("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 wn(Ro,"PathDefault",-1),ih=new wn(Ro,"PathDestination",0),Zg=new wn(Ro,"PathSource",1),Lp=new wn(Ro,"SortingForwards",10),Fm=new wn(Ro,"SortingReverse",11),Bm=new wn(Ro,"SortingAscending",12),Mm=new wn(Ro,"SortingDescending",13),Np=new wn(Ro,"AlignmentCenterSubtrees",20),Hg=new wn(Ro,"AlignmentCenterChildren",21),rh=new wn(Ro,"AlignmentStart",22),oh=new wn(Ro,"AlignmentEnd",23),qh=new wn(Ro,"AlignmentBus",24),ah=new wn(Ro,"AlignmentBusBranching",25),ef=new wn(Ro,"AlignmentTopLeftBus",26),Nh=new wn(Ro,"AlignmentBottomRightBus",27),av=new wn(Ro,"CompactionNone",30),Lm=new wn(Ro,"CompactionBlock",31),sv=new wn(Ro,"StyleLayered",40),Wy=new wn(Ro,"StyleLastParents",41),Gy=new wn(Ro,"StyleAlternating",42),$y=new wn(Ro,"StyleRootOnly",43),lv=new wn(Ro,"ArrangementVertical",50),Ky=new wn(Ro,"ArrangementHorizontal",51),uv=new wn(Ro,"ArrangementFixedRoots",52),Vy=new wn(Ro,"LayerIndividual",60),Uy=new wn(Ro,"LayerSiblings",61),cv=new wn(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=Ky,Ro.ArrangementFixedRoots=uv,Ro.LayerIndividual=Vy,Ro.LayerSiblings=Uy,Ro.LayerUniform=cv;function Wg(a){ts.call(this,a)}Wt(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 st(0,0),this.Da=new mi(0,0),this.la=new st(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Lp,this.hd=gy,this.Kb=0,this.Jb=Hg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Lm,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Fi,this.wr=!0,this.Dp=Fi}Wt(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 st(0,0)}Wt(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:Et("Unhandled path value "+y.ud.toString())}if(x!==null&&E!==null){var b=this.$t;if(b.x!==0||b.y!==0||x.qA){E=x.bounds;var z=id(x),ne=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===Ec,ue=a.isOrthogonal,ce;if(a.uh(),ue||oe){for(ce=2;4<a.pointsCount;)a.pv(2);var me=a.i(1),we=a.i(2)}else{for(ce=1;3<a.pointsCount;)a.pv(1);me=a.i(0),we=a.i(a.pointsCount-1)}var Fe=a.i(a.pointsCount-1);z===0?(x.alignment===oh?(z=E.bottom+b.y,b.y===0&&me.y>Fe.y+x.rowIndent&&(z=Math.min(z,Math.max(me.y,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.top+b.y,b.y===0&&me.y<Fe.y-x.rowIndent&&(z=Math.max(z,Math.min(me.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,oe?(a.m(ce,me.x,z),ce++,a.m(ce,E.right+ne,z),ce++,a.m(ce,E.right+ne+(b.x-re)/3,z),ce++,a.m(ce,E.right+ne+2*(b.x-re)/3,z),ce++,a.m(ce,E.right+ne+(b.x-re),z),ce++,a.m(ce,we.x,z)):(ue&&(a.m(ce,E.right+ne/2,me.y),ce++),a.m(ce,E.right+ne/2,z),ce++,a.m(ce,E.right+ne+b.x-(ue?re/2:re),z),ce++,ue&&a.m(ce,a.i(ce-1).x,we.y))):z===90?(x.alignment===oh?(z=E.right+b.x,b.x===0&&me.x>Fe.x+x.rowIndent&&(z=Math.min(z,Math.max(me.x,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.left+b.x,b.x===0&&me.x<Fe.x-x.rowIndent&&(z=Math.max(z,Math.min(me.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,oe?(a.m(ce,z,me.y),ce++,a.m(ce,z,E.bottom+ne),ce++,a.m(ce,z,E.bottom+ne+(b.y-re)/3),ce++,a.m(ce,z,E.bottom+ne+2*(b.y-re)/3),ce++,a.m(ce,z,E.bottom+ne+(b.y-re)),ce++,a.m(ce,z,we.y)):(ue&&(a.m(ce,me.x,E.bottom+ne/2),ce++),a.m(ce,z,E.bottom+ne/2),ce++,a.m(ce,z,E.bottom+ne+b.y-(ue?re/2:re)),ce++,ue&&a.m(ce,we.x,a.i(ce-1).y))):z===180?(x.alignment===oh?(z=E.bottom+b.y,b.y===0&&me.y>Fe.y+x.rowIndent&&(z=Math.min(z,Math.max(me.y,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.top+b.y,b.y===0&&me.y<Fe.y-x.rowIndent&&(z=Math.max(z,Math.min(me.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,oe?(a.m(ce,me.x,z),ce++,a.m(ce,E.left-ne,z),ce++,a.m(ce,E.left-ne+(b.x+re)/3,z),ce++,a.m(ce,E.left-ne+2*(b.x+re)/3,z),ce++,a.m(ce,E.left-ne+(b.x+re),z),ce++,a.m(ce,we.x,z)):(ue&&(a.m(ce,E.left-ne/2,me.y),ce++),a.m(ce,E.left-ne/2,z),ce++,a.m(ce,E.left-ne+b.x+(ue?re/2:re),z),ce++,ue&&a.m(ce,a.i(ce-1).x,we.y))):z===270?(x.alignment===oh?(z=E.right+b.x,b.x===0&&me.x>Fe.x+x.rowIndent&&(z=Math.min(z,Math.max(me.x,z-y.computeNodeIndent(x))))):x.alignment===rh?(z=E.left+b.x,b.x===0&&me.x<Fe.x-x.rowIndent&&(z=Math.max(z,Math.min(me.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,oe?(a.m(ce,z,me.y),ce++,a.m(ce,z,E.top-ne),ce++,a.m(ce,z,E.top-ne+(b.y+re)/3),ce++,a.m(ce,z,E.top-ne+2*(b.y+re)/3),ce++,a.m(ce,z,E.top-ne+(b.y+re)),ce++,a.m(ce,z,we.y)):(ue&&(a.m(ce,me.x,E.top-ne/2),ce++),a.m(ce,z,E.top-ne/2),ce++,a.m(ce,z,E.top-ne+b.y+(ue?re/2:re)),ce++,ue&&a.m(ce,we.x,a.i(ce-1).y))):Et("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 ho,this.mouseDownTools),this.gb("Relinking",new Vi,this.mouseDownTools),this.gb("LinkReshaping",new rr,this.mouseDownTools),this.gb("Rotating",new Wo,this.mouseDownTools),this.gb("Resizing",new so,this.mouseDownTools),this.gb("Linking",new Jn,this.mouseMoveTools),this.gb("Dragging",new rs,this.mouseMoveTools),this.gb("DragSelecting",new fo,this.mouseMoveTools),this.gb("Panning",new Dr,this.mouseMoveTools),this.gb("ContextMenu",new Sa,this.mouseUpTools),this.gb("TextEditing",new sa,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 Km),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=ht.go,Yy={get licenseKey(){return hn.licenseKey},set licenseKey(a){hn.licenseKey=a},get version(){return hn.version},Group:po,EnumValue:wn,List:Vn,Set:Un,Map:$i,Point:st,Size:mi,Rect:Bn,Margin:hr,Spot:Xi,Geometry:qt,PathFigure:So,PathSegment:gr,InputEvent:Tr,DiagramEvent:Rr,ChangedEvent:pr,Model:ar,GraphLinksModel:na,TreeModel:Bu,Binding:tl,Transaction:Po,UndoManager:Oa,CommandHandler:gt,Tool:Ar,DraggingTool:rs,DraggingInfo:dd,DraggingOptions:ae,LinkingBaseTool:rn,LinkingTool:Jn,RelinkingTool:Vi,LinkReshapingTool:rr,ResizingTool:so,RotatingTool:Wo,ClickSelectingTool:ka,ActionTool:ho,ClickCreatingTool:ko,HTMLInfo:Bo,ContextMenuTool:Sa,DragSelectingTool:fo,PanningTool:Dr,TextEditingTool:sa,ToolManager:jo,Animation:Ns,AnimationManager:bs,AnimationTrigger:ku,Layer:gs,Diagram:hn,Palette:ge,Overview:ye,Brush:da,GraphObject:Vt,Panel:ui,RowColumnDefinition:ol,Shape:Co,TextBlock:es,Picture:zu,Part:xr,Adornment:pa,Node:Di,Link:fi,Placeholder:Cu,Layout:vs,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,ht.go=Yy,typeof On.exports=="object"&&(On.exports=typeof pe.g!="undefined"?pe.g.go:self.go)}();var le=typeof pe.g!="undefined"?pe.g.go:self.go;const Te=typeof pe.g!="undefined"?pe.g.go:self.go,He=Te.Group,ut=Te.EnumValue,We=Te.List,Ue=Te.Set,Me=Te.Map,Ct=Te.Point,Pt=Te.Size,$e=Te.Rect,Ft=Te.Margin,lt=Te.Spot,vt=Te.Geometry,Oe=Te.PathFigure,te=Te.PathSegment,ee=Te.InputEvent,de=Te.DiagramEvent,se=Te.ChangedEvent,he=Te.Model,ve=Te.GraphLinksModel,Ee=Te.TreeModel,Be=Te.Binding,Le=Te.Transaction,ze=Te.UndoManager,je=Te.CommandHandler,Xe=Te.Tool,Ye=Te.DraggingTool,dt=Te.DraggingInfo,Ze=Te.LinkingBaseTool,Nt=Te.LinkingTool,at=Te.RelinkingTool,kt=Te.LinkReshapingTool,xt=Te.ResizingTool,Ot=Te.RotatingTool,Gt=Te.ClickSelectingTool,At=Te.ActionTool,qe=Te.ClickCreatingTool,Ve=Te.HTMLInfo,_t=Te.ContextMenuTool,vn=Te.DragSelectingTool,yn=Te.PanningTool,jt=Te.TextEditingTool,en=Te.ToolManager,ln=Te.Animation,Wn=Te.AnimationManager,un=Te.AnimationTrigger,kn=Te.Layer,wt=Te.Diagram,jn=Te.Palette,ci=Te.Overview,Ge=Te.Brush,be=Te.GraphObject,Pe=Te.Panel,Ne=Te.RowColumnDefinition,Ie=Te.Shape,xe=Te.TextBlock,ct=Te.TextBlockMetrics,Lt=Te.Picture,et=Te.Part,it=Te.Adornment,Bt=Te.Node,Dt=Te.Link,ft=Te.Placeholder,$t=Te.Layout,xn=Te.LayoutNetwork,an=Te.LayoutVertex,Jt=Te.LayoutEdge,Tn=Te.GridLayout,Kn=Te.PanelLayout,dn=Te.CircularLayout,Qn=Te.CircularNetwork,pi=Te.CircularVertex,zn=Te.CircularEdge,Nn=Te.ForceDirectedLayout,yi=Te.ForceDirectedNetwork,Zi=Te.ForceDirectedVertex,Hi=Te.ForceDirectedEdge,cr=Te.LayeredDigraphLayout,br=Te.LayeredDigraphNetwork,gi=Te.LayeredDigraphVertex,di=Te.LayeredDigraphEdge,wi=Te.TreeLayout,Qi=Te.TreeNetwork,Li=Te.TreeVertex,ro=Te.TreeEdge,fr=Te.version},24334:function(On,mn,pe){var le,Te;(function(He,ut){On.exports=ut(He)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof pe.g!="undefined"?pe.g:this,function(He){"use strict";He=He||{};var ut=He.Base64,We="2.6.4",Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Me=function(at){for(var kt={},xt=0,Ot=at.length;xt<Ot;xt++)kt[at.charAt(xt)]=xt;return kt}(Ue),Ct=String.fromCharCode,Pt=function(at){if(at.length<2){var kt=at.charCodeAt(0);return kt<128?at:kt<2048?Ct(192|kt>>>6)+Ct(128|kt&63):Ct(224|kt>>>12&15)+Ct(128|kt>>>6&63)+Ct(128|kt&63)}else{var kt=65536+(at.charCodeAt(0)-55296)*1024+(at.charCodeAt(1)-56320);return Ct(240|kt>>>18&7)+Ct(128|kt>>>12&63)+Ct(128|kt>>>6&63)+Ct(128|kt&63)}},$e=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ft=function(at){return at.replace($e,Pt)},lt=function(at){var kt=[0,2,1][at.length%3],xt=at.charCodeAt(0)<<16|(at.length>1?at.charCodeAt(1):0)<<8|(at.length>2?at.charCodeAt(2):0),Ot=[Ue.charAt(xt>>>18),Ue.charAt(xt>>>12&63),kt>=2?"=":Ue.charAt(xt>>>6&63),kt>=1?"=":Ue.charAt(xt&63)];return Ot.join("")},vt=He.btoa&&typeof He.btoa=="function"?function(at){return He.btoa(at)}:function(at){if(at.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return at.replace(/[\s\S]{1,3}/g,lt)},Oe=function(at){return vt(Ft(String(at)))},te=function(at){return at.replace(/[+\/]/g,function(kt){return kt=="+"?"-":"_"}).replace(/=/g,"")},ee=function(at,kt){return kt?te(Oe(at)):Oe(at)},de=function(at){return ee(at,!0)},se;He.Uint8Array&&(se=function(at,kt){for(var xt="",Ot=0,Gt=at.length;Ot<Gt;Ot+=3){var At=at[Ot],qe=at[Ot+1],Ve=at[Ot+2],_t=At<<16|qe<<8|Ve;xt+=Ue.charAt(_t>>>18)+Ue.charAt(_t>>>12&63)+(typeof qe!="undefined"?Ue.charAt(_t>>>6&63):"=")+(typeof Ve!="undefined"?Ue.charAt(_t&63):"=")}return kt?te(xt):xt});var he=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ve=function(at){switch(at.length){case 4:var kt=(7&at.charCodeAt(0))<<18|(63&at.charCodeAt(1))<<12|(63&at.charCodeAt(2))<<6|63&at.charCodeAt(3),xt=kt-65536;return Ct((xt>>>10)+55296)+Ct((xt&1023)+56320);case 3:return Ct((15&at.charCodeAt(0))<<12|(63&at.charCodeAt(1))<<6|63&at.charCodeAt(2));default:return Ct((31&at.charCodeAt(0))<<6|63&at.charCodeAt(1))}},Ee=function(at){return at.replace(he,ve)},Be=function(at){var kt=at.length,xt=kt%4,Ot=(kt>0?Me[at.charAt(0)]<<18:0)|(kt>1?Me[at.charAt(1)]<<12:0)|(kt>2?Me[at.charAt(2)]<<6:0)|(kt>3?Me[at.charAt(3)]:0),Gt=[Ct(Ot>>>16),Ct(Ot>>>8&255),Ct(Ot&255)];return Gt.length-=[0,0,2,1][xt],Gt.join("")},Le=He.atob&&typeof He.atob=="function"?function(at){return He.atob(at)}:function(at){return at.replace(/\S{1,4}/g,Be)},ze=function(at){return Le(String(at).replace(/[^A-Za-z0-9\+\/]/g,""))},je=function(at){return Ee(Le(at))},Xe=function(at){return String(at).replace(/[-_]/g,function(kt){return kt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ye=function(at){return je(Xe(at))},dt;He.Uint8Array&&(dt=function(at){return Uint8Array.from(ze(Xe(at)),function(kt){return kt.charCodeAt(0)})});var Ze=function(){var at=He.Base64;return He.Base64=ut,at};if(He.Base64={VERSION:We,atob:ze,btoa:vt,fromBase64:Ye,toBase64:ee,utob:Ft,encode:ee,encodeURI:de,btou:Ee,decode:Ye,noConflict:Ze,fromUint8Array:se,toUint8Array:dt},typeof Object.defineProperty=="function"){var Nt=function(at){return{value:at,enumerable:!1,writable:!0,configurable:!0}};He.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Nt(function(){return Ye(this)})),Object.defineProperty(String.prototype,"toBase64",Nt(function(at){return ee(this,at)})),Object.defineProperty(String.prototype,"toBase64URI",Nt(function(){return ee(this,!0)}))}}return He.Meteor&&(Base64=He.Base64),On.exports?On.exports.Base64=He.Base64:(le=[],Te=function(){return He.Base64}.apply(mn,le),Te!==void 0&&(On.exports=Te)),{Base64:He.Base64}})},2859:function(On,mn,pe){"use strict";pe.d(mn,{hP:function(){return ci}});var le=function(Ge,be){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Pe,Ne){Pe.__proto__=Ne}||function(Pe,Ne){for(var Ie in Ne)Object.prototype.hasOwnProperty.call(Ne,Ie)&&(Pe[Ie]=Ne[Ie])})(Ge,be)};function Te(Ge,be){function Pe(){this.constructor=Ge}le(Ge,be),Ge.prototype=be===null?Object.create(be):(Pe.prototype=be.prototype,new Pe)}function He(Ge,be,Pe,Ne){return new(Pe||(Pe=Promise))(function(Ie,xe){function ct(it){try{et(Ne.next(it))}catch(Bt){xe(Bt)}}function Lt(it){try{et(Ne.throw(it))}catch(Bt){xe(Bt)}}function et(it){var Bt;it.done?Ie(it.value):(Bt=it.value,Bt instanceof Pe?Bt:new Pe(function(Dt){Dt(Bt)})).then(ct,Lt)}et((Ne=Ne.apply(Ge,be||[])).next())})}function ut(Ge,be){var Pe,Ne,Ie,xe,ct={label:0,sent:function(){if(1&Ie[0])throw Ie[1];return Ie[1]},trys:[],ops:[]};return xe={next:Lt(0),throw:Lt(1),return:Lt(2)},typeof Symbol=="function"&&(xe[Symbol.iterator]=function(){return this}),xe;function Lt(et){return function(it){return function(Bt){if(Pe)throw new TypeError("Generator is already executing.");for(;ct;)try{if(Pe=1,Ne&&(Ie=2&Bt[0]?Ne.return:Bt[0]?Ne.throw||((Ie=Ne.return)&&Ie.call(Ne),0):Ne.next)&&!(Ie=Ie.call(Ne,Bt[1])).done)return Ie;switch(Ne=0,Ie&&(Bt=[2&Bt[0],Ie.value]),Bt[0]){case 0:case 1:Ie=Bt;break;case 4:return ct.label++,{value:Bt[1],done:!1};case 5:ct.label++,Ne=Bt[1],Bt=[0];continue;case 7:Bt=ct.ops.pop(),ct.trys.pop();continue;default:if(Ie=ct.trys,!((Ie=Ie.length>0&&Ie[Ie.length-1])||Bt[0]!==6&&Bt[0]!==2)){ct=0;continue}if(Bt[0]===3&&(!Ie||Bt[1]>Ie[0]&&Bt[1]<Ie[3])){ct.label=Bt[1];break}if(Bt[0]===6&&ct.label<Ie[1]){ct.label=Ie[1],Ie=Bt;break}if(Ie&&ct.label<Ie[2]){ct.label=Ie[2],ct.ops.push(Bt);break}Ie[2]&&ct.ops.pop(),ct.trys.pop();continue}Bt=be.call(Ge,ct)}catch(Dt){Bt=[6,Dt],Ne=0}finally{Pe=Ie=0}if(5&Bt[0])throw Bt[1];return{value:Bt[0]?Bt[1]:void 0,done:!0}}([et,it])}}}function We(){for(var Ge=0,be=0,Pe=arguments.length;be<Pe;be++)Ge+=arguments[be].length;var Ne=Array(Ge),Ie=0;for(be=0;be<Pe;be++)for(var xe=arguments[be],ct=0,Lt=xe.length;ct<Lt;ct++,Ie++)Ne[Ie]=xe[ct];return Ne}var Ue=function(){function Ge(){}return Ge.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},Ge.setAttributes=function(be,Pe){for(var Ne=0,Ie=Pe;Ne<Ie.length;Ne++){var xe=Ie[Ne],ct=xe[0],Lt=xe[1];be.setAttribute(ct,Lt)}},Ge.createRect=function(be,Pe,Ne){var Ie=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ie.setAttribute("width",be.toString()),Ie.setAttribute("height",Pe.toString()),Ne&&Ge.setAttributes(Ie,Ne),Ie},Ge.createLine=function(be,Pe,Ne,Ie,xe){var ct=document.createElementNS("http://www.w3.org/2000/svg","line");return ct.setAttribute("x1",be.toString()),ct.setAttribute("y1",Pe.toString()),ct.setAttribute("x2",Ne.toString()),ct.setAttribute("y2",Ie.toString()),xe&&Ge.setAttributes(ct,xe),ct},Ge.createPolygon=function(be,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ne.setAttribute("points",be),Pe&&Ge.setAttributes(Ne,Pe),Ne},Ge.createCircle=function(be,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ne.setAttribute("cx",(be/2).toString()),Ne.setAttribute("cy",(be/2).toString()),Ne.setAttribute("r",be.toString()),Pe&&Ge.setAttributes(Ne,Pe),Ne},Ge.createEllipse=function(be,Pe,Ne){var Ie=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ie.setAttribute("cx",(be/2).toString()),Ie.setAttribute("cy",(Pe/2).toString()),Ie.setAttribute("rx",(be/2).toString()),Ie.setAttribute("ry",(Pe/2).toString()),Ne&&Ge.setAttributes(Ie,Ne),Ie},Ge.createGroup=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","g");return be&&Ge.setAttributes(Pe,be),Pe},Ge.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},Ge.createMarker=function(be,Pe,Ne,Ie,xe,ct,Lt){var et=document.createElementNS("http://www.w3.org/2000/svg","marker");return Ge.setAttributes(et,[["id",be],["orient",Pe],["markerWidth",Ne.toString()],["markerHeight",Ie.toString()],["refX",xe.toString()],["refY",ct.toString()]]),et.appendChild(Lt),et},Ge.createText=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","text");return Pe.setAttribute("x","0"),Pe.setAttribute("y","0"),be&&Ge.setAttributes(Pe,be),Pe},Ge.createTSpan=function(be,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ne.textContent=be,Pe&&Ge.setAttributes(Ne,Pe),Ne},Ge.createImage=function(be){var Pe=document.createElementNS("http://www.w3.org/2000/svg","image");return be&&Ge.setAttributes(Pe,be),Pe},Ge.createPoint=function(be,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ne.x=be,Ne.y=Pe,Ne},Ge.createPath=function(be,Pe){var Ne=document.createElementNS("http://www.w3.org/2000/svg","path");return Ne.setAttribute("d",be),Pe&&Ge.setAttributes(Ne,Pe),Ne},Ge}(),Me=function(){function Ge(){}return Ge.addKey=function(be){Ge.key=be},Object.defineProperty(Ge,"isLicensed",{get:function(){return!!Ge.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(Ge.key)},enumerable:!1,configurable:!0}),Ge}(),Ct=function(){function Ge(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return Ge.prototype.rasterize=function(be,Pe,Ne){var Ie=this;return new Promise(function(xe){var ct=Ne!==void 0?Ne:document.createElement("canvas");be===null&&(Ie.markersOnly=!0,Ie.naturalSize=!1);var Lt=document.createElementNS("http://www.w3.org/2000/svg","svg");Lt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Lt.setAttribute("width",Pe.width.baseVal.valueAsString),Lt.setAttribute("height",Pe.height.baseVal.valueAsString),Lt.setAttribute("viewBox","0 0 "+Pe.viewBox.baseVal.width.toString()+" "+Pe.viewBox.baseVal.height.toString()),Lt.innerHTML=Pe.innerHTML,Ie.naturalSize===!0?(Lt.width.baseVal.value=be.naturalWidth,Lt.height.baseVal.value=be.naturalHeight):Ie.width!==void 0&&Ie.height!==void 0&&(Lt.width.baseVal.value=Ie.width,Lt.height.baseVal.value=Ie.height),ct.width=Lt.width.baseVal.value,ct.height=Lt.height.baseVal.value;var et=Lt.outerHTML,it=ct.getContext("2d");Ie.markersOnly!==!0&&it.drawImage(be,0,0,ct.width,ct.height);var Bt=window.URL,Dt=new Image(ct.width,ct.height);Dt.setAttribute("crossOrigin","anonymous");var ft=new Blob([et],{type:"image/svg+xml"}),$t=Bt.createObjectURL(ft);Dt.onload=function(){it.drawImage(Dt,0,0),Bt.revokeObjectURL($t);var xn=ct.toDataURL(Ie.imageType,Ie.imageQuality);xe(xn)},Dt.src=$t})},Ge}(),Pt=function(){},$e=function(){function Ge(be){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+be+"_"}return Object.defineProperty(Ge.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),Ge.prototype.addClass=function(be){return this.styleSheet===void 0&&this.addStyleSheet(),be.name=""+this.classNamePrefix+be.localName,this.classes.push(be),this.styleSheet.sheet.insertRule("."+be.name+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length),be},Ge.prototype.addRule=function(be){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(be),this.styleSheet.sheet.insertRule(be.selector+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length)},Ge.prototype.addStyleSheet=function(){var be;this.styleSheet=document.createElement("style"),((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).appendChild(this.styleSheet),this.addRule(new Ft("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new lt("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new lt("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},Ge.prototype.removeStyleSheet=function(){var be;this.styleSheet&&(((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},Ge}(),Ft=function(Ge,be){this.selector=Ge,this.style=be},lt=function(Ge,be){this.localName=Ge,this.style=be},vt=function(){function Ge(be,Pe,Ne,Ie,xe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=be,this.displayMode=Pe,this.markerItems=Ne,this.uiStyleSettings=Ie,this.styles=xe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return Ge.prototype.show=function(be){var Pe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ne=document.createElement("div");Ne.className=this.toolbarBlockStyleClass.name,Ne.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ne),this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(xe){var ct=document.createElement("div");ct.className=""+Pe.toolbarButtonStyleClass.name,ct.setAttribute("data-type-name",xe.typeName),ct.innerHTML=xe.icon,ct.addEventListener("click",function(){Pe.markerToolbarButtonClicked(ct,xe)}),Pe.buttons.push(ct),Pe.markerButtons.push(ct)}),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 Ie=document.createElement("div");Ie.className=this.toolbarBlockStyleClass.name,Ie.style.whiteSpace="nowrap",Ie.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ie),this.addActionButton(Ie,'<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(Ie,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},Ge.prototype.addButtonClickListener=function(be){this.buttonClickListeners.push(be)},Ge.prototype.removeButtonClickListener=function(be){this.buttonClickListeners.indexOf(be)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(be),1)},Ge.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},Ge.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var be=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Pe=0;Pe<this.markerButtons.length;Pe++)Pe<be||Pe===be&&this.markerButtons.length-1===be?this.markerButtonBlock.appendChild(this.markerButtons[Pe]):(Pe===be&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Pe]))}},Ge.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},Ge.prototype.resetButtonStyles=function(){var be=this;this.buttons.forEach(function(Pe){Pe.className=Pe.className.replace(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name,"").trim(),Pe.className=Pe.className.replace(be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:be.toolbarActiveButtonStyleColorsClass.name,"").trim(),Pe.className+=" "+(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name)})},Ge.prototype.addActionButton=function(be,Pe,Ne){var Ie=this,xe=document.createElement("div");switch(xe.className=""+this.toolbarButtonStyleClass.name,xe.innerHTML=Pe,xe.setAttribute("data-action",Ne),xe.addEventListener("click",function(){Ie.actionToolbarButtonClicked(xe,Ne)}),Ne){case"select":xe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":xe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":xe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":xe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":xe.style.fill=this.uiStyleSettings.closeButtonColor}be.appendChild(xe),this.buttons.push(xe)},Ge.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new lt("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 lt("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new lt("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new lt("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 lt("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var be=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new lt("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
padding: `+be+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new lt("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new lt("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},Ge.prototype.markerToolbarButtonClicked=function(be,Pe){this.setActiveButton(be),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ne){return Ne("marker",Pe)}),this.markerButtonOverflowBlock.style.display="none"},Ge.prototype.actionToolbarButtonClicked=function(be,Pe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ne){return Ne("action",Pe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},Ge.prototype.setActiveButton=function(be){this.resetButtonStyles(),be.className=be.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),be.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},Ge.prototype.setActiveMarkerButton=function(be){var Pe=this.markerButtons.find(function(Ne){return Ne.getAttribute("data-type-name")===be});Pe&&this.setActiveButton(Pe)},Ge.prototype.setCurrentMarker=function(be){var Pe=this;this.currentMarker=be,this.buttons.filter(function(Ne){return/delete|notes/.test(Ne.getAttribute("data-action"))}).forEach(function(Ne){Pe.currentMarker===void 0?(Ne.style.fillOpacity="0.4",Ne.style.pointerEvents="none"):(Ne.style.fillOpacity="1",Ne.style.pointerEvents="all")})},Ge}(),Oe=function(){function Ge(be,Pe,Ne,Ie){this.panels=[],this.panelButtons=[],this.markerjsContainer=be,this.displayMode=Pe,this.uiStyleSettings=Ne,this.styles=Ie,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return Ge.prototype.addStyles=function(){var be;this.toolboxStyleClass=this.styles.addClass(new lt("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 lt("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Pe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new lt("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new lt("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new lt("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 lt("toolbox-panel-row_colors",`
background-color: `+((be=this.uiStyleSettings.toolboxBackgroundColor)!==null&&be!==void 0?be:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new lt("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Pe)+`px;
padding: `+Pe+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new lt("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new lt("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ft("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ft("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},Ge.prototype.show=function(be){var Pe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},Ge.prototype.setPanelButtons=function(be){var Pe,Ne,Ie=this;this.panels=be,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Pe=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Pe!==void 0?Pe:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(xe){var ct;xe.uiStyleSettings=Ie.uiStyleSettings;var Lt=document.createElement("div");Lt.className=Ie.toolboxButtonStyleClass.name+" "+((ct=Ie.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ct!==void 0?ct:Ie.toolboxButtonStyleColorsClass.name),Lt.innerHTML=xe.icon,Lt.title=xe.title,Lt.addEventListener("click",function(){Ie.panelButtonClick(xe)}),Ie.panelButtons.push(Lt),Ie.buttonRow.appendChild(Lt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},Ge.prototype.panelButtonClick=function(be){var Pe=this,Ne=-1;if(be!==this.activePanel){Ne=this.panels.indexOf(be),this.panelRow.innerHTML="";var Ie=be.getUi();Ie.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ie),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=be}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Pe.displayMode==="inline"?Pe.panelRow.style.display="none":Pe.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(xe,ct){var Lt,et;xe.className=Pe.toolboxButtonStyleClass.name+" "+(ct===Ne?""+((Lt=Pe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Lt!==void 0?Lt:Pe.toolboxActiveButtonStyleColorsClass.name):""+((et=Pe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&et!==void 0?et:Pe.toolboxButtonStyleColorsClass.name))})},Ge}(),te=function(Ge,be){this.title=Ge,this.icon=be},ee=function(Ge){function be(Pe,Ne,Ie,xe){var ct=Ge.call(this,Pe,xe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return ct.colors=[],ct.addTransparent=!1,ct.colorBoxes=[],ct.colors=Ne,ct.currentColor=Ie,ct.setCurrentColor=ct.setCurrentColor.bind(ct),ct.getColorBox=ct.getColorBox.bind(ct),ct}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.overflow="hidden",Ne.style.whiteSpace="nowrap",this.colors.forEach(function(Ie){var xe=Pe.getColorBox(Ie);Ne.appendChild(xe),Pe.colorBoxes.push(xe)}),Ne},be.prototype.getColorBox=function(Pe){var Ne=this,Ie=this.uiStyleSettings.toolbarHeight/4,xe=this.uiStyleSettings.toolbarHeight-Ie,ct=document.createElement("div");ct.style.display="inline-block",ct.style.boxSizing="content-box",ct.style.width=xe-2+"px",ct.style.height=xe-2+"px",ct.style.padding="1px",ct.style.marginRight="2px",ct.style.marginBottom="2px",ct.style.borderWidth="2px",ct.style.borderStyle="solid",ct.style.borderRadius=(xe+2)/2+"px",ct.style.borderColor=Pe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ct.addEventListener("click",function(){Ne.setCurrentColor(Pe,ct)});var Lt=document.createElement("div");return Lt.style.display="inline-block",Lt.style.width=xe-2+"px",Lt.style.height=xe-2+"px",Lt.style.backgroundColor=Pe,Lt.style.borderRadius=xe/2+"px",Pe==="transparent"&&(Lt.style.fill=this.uiStyleSettings.toolboxAccentColor,Lt.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>`),ct.appendChild(Lt),ct},be.prototype.setCurrentColor=function(Pe,Ne){var Ie=this;this.currentColor=Pe,this.colorBoxes.forEach(function(xe){xe.style.borderColor=xe===Ne?Ie.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Pe)},be}(te),de=function(){function Ge(be,Pe,Ne){this._state="new",this._isSelected=!1,this._container=be,this._overlayContainer=Pe,this.globalSettings=Ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(Ge.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),Ge.prototype.ownsTarget=function(be){return!1},Object.defineProperty(Ge.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),Ge.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},Ge.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},Ge.prototype.pointerDown=function(be,Pe){},Ge.prototype.dblClick=function(be,Pe){},Ge.prototype.manipulate=function(be){},Ge.prototype.pointerUp=function(be){this.stateChanged()},Ge.prototype.dispose=function(){},Ge.prototype.addMarkerVisualToContainer=function(be){this.container.childNodes.length>0?this.container.insertBefore(be,this.container.childNodes[0]):this.container.appendChild(be)},Ge.prototype.getState=function(){return{typeName:Ge.typeName,state:this.state,notes:this.notes}},Ge.prototype.restoreState=function(be){this._state=be.state,this.notes=be.notes},Ge.prototype.scale=function(be,Pe){},Ge.prototype.colorChanged=function(be){this.onColorChanged&&this.onColorChanged(be),this.stateChanged()},Ge.prototype.fillColorChanged=function(be){this.onFillColorChanged&&this.onFillColorChanged(be),this.stateChanged()},Ge.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var be=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),be.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(be)&&this.onStateChanged(this)}},Ge.typeName="MarkerBase",Ge}(),se=function(){function Ge(){this.findGripByVisual=this.findGripByVisual.bind(this)}return Ge.prototype.findGripByVisual=function(be){return this.topLeft.ownsTarget(be)?this.topLeft:this.topCenter.ownsTarget(be)?this.topCenter:this.topRight.ownsTarget(be)?this.topRight:this.centerLeft.ownsTarget(be)?this.centerLeft:this.centerRight.ownsTarget(be)?this.centerRight:this.bottomLeft.ownsTarget(be)?this.bottomLeft:this.bottomCenter.ownsTarget(be)?this.bottomCenter:this.bottomRight.ownsTarget(be)?this.bottomRight:void 0},Ge}(),he=function(){function Ge(){this.GRIP_SIZE=10,this.visual=Ue.createGroup(),this.visual.appendChild(Ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return Ge.prototype.ownsTarget=function(be){return be===this.visual||be===this.visual.childNodes[0]||be===this.visual.childNodes[1]},Ge}(),ve=function(){function Ge(){}return Ge.toITransformMatrix=function(be){return{a:be.a,b:be.b,c:be.c,d:be.d,e:be.e,f:be.f}},Ge.toSVGMatrix=function(be,Pe){return be.a=Pe.a,be.b=Pe.b,be.c=Pe.c,be.d=Pe.d,be.e=Pe.e,be.f=Pe.f,be},Ge}(),Ee=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.left=0,xe.top=0,xe.width=0,xe.height=0,xe.defaultSize={x:50,y:20},xe.offsetX=0,xe.offsetY=0,xe.rotationAngle=0,xe.CB_DISTANCE=10,xe._suppressMarkerCreateEvent=!1,xe.container.transform.baseVal.appendItem(Ue.createTransform()),xe.setupControlBox(),xe}return Te(be,Ge),Object.defineProperty(be.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"visual",{get:function(){return this._visual},set:function(Pe){this._visual=Pe;var Ne=Ue.createTransform();this._visual.transform.baseVal.appendItem(Ne)},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Pe){return!!Ge.prototype.ownsTarget.call(this,Pe)||!!(this.controlGrips.findGripByVisual(Pe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Pe))},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.left=Pe.x,this.top=Pe.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ie=this.unrotatePoint(Pe);if(this.manipulationStartX=Ie.x,this.manipulationStartY=Ie.y,this.offsetX=Ie.x-this.left,this.offsetY=Ie.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne)){this.activeGrip=this.rotatorGrip;var xe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=xe.x-this.width/2,this.top=xe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ct=this.container.transform.baseVal.getItem(0);ct.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ct,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},be.prototype.pointerUp=function(Pe){var Ne=this.state;Ge.prototype.pointerUp.call(this,Pe),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Pe),this._state="select",Ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},be.prototype.moveVisual=function(Pe){this.visual.style.transform="translate("+Pe.x+"px, "+Pe.y+"px)"},be.prototype.manipulate=function(Pe){var Ne=this.unrotatePoint(Pe);this.state==="creating"?this.resize(Pe):this.state==="move"?(this.left=this.manipulationStartLeft+(Ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ne):this.state==="rotate"&&this.rotate(Pe)},be.prototype.resize=function(Pe){var Ne=this.manipulationStartLeft,Ie=this.manipulationStartWidth,xe=this.manipulationStartTop,ct=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ne=this.manipulationStartLeft+Pe.x-this.manipulationStartX,Ie=this.manipulationStartWidth+this.manipulationStartLeft-Ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ie=this.manipulationStartWidth+Pe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:xe=this.manipulationStartTop+Pe.y-this.manipulationStartY,ct=this.manipulationStartHeight+this.manipulationStartTop-xe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ct=this.manipulationStartHeight+Pe.y-this.manipulationStartY}Ie>=0?(this.left=Ne,this.width=Ie):(this.left=Ne+Ie,this.width=-Ie),ct>=0?(this.top=xe,this.height=ct):(this.top=xe+ct,this.height=-ct),this.setSize()},be.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},be.prototype.rotate=function(Pe){if(Math.abs(Pe.x-this.centerX)>.1){var Ne=Math.sign(Pe.x-this.centerX);this.rotationAngle=180*Math.atan((Pe.y-this.centerY)/(Pe.x-this.centerX))/Math.PI+90*Ne,this.applyRotation()}},be.prototype.applyRotation=function(){var Pe=this.container.transform.baseVal.getItem(0);Pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Pe,0)},be.prototype.rotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ne=this.container.getCTM(),Ie=Ue.createPoint(Pe.x,Pe.y);return{x:(Ie=Ie.matrixTransform(Ne)).x,y:Ie.y}},be.prototype.unrotatePoint=function(Pe){if(this.rotationAngle===0)return Pe;var Ne=this.container.getCTM();Ne=Ne.inverse();var Ie=Ue.createPoint(Pe.x,Pe.y);return{x:(Ie=Ie.matrixTransform(Ne)).x,y:Ie.y}},be.prototype.select=function(){Ge.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Ge.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=Ue.createGroup();var Pe=Ue.createTransform();Pe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Pe),this.container.appendChild(this.controlBox),this.controlRect=Ue.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=Ue.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new se,this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){var Pe=this.controlBox.transform.baseVal.getItem(0);Pe.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Pe,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},be.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},be.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(Ue.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},be.prototype.positionGrips=function(){var Pe=this.controlGrips.topLeft.GRIP_SIZE,Ne=-Pe/2,Ie=Ne,xe=(this.width+this.CB_DISTANCE)/2-Pe/2,ct=(this.height+this.CB_DISTANCE)/2-Pe/2,Lt=this.height+this.CB_DISTANCE-Pe/2,et=this.width+this.CB_DISTANCE-Pe/2;this.positionGrip(this.controlGrips.topLeft.visual,Ne,Ie),this.positionGrip(this.controlGrips.topCenter.visual,xe,Ie),this.positionGrip(this.controlGrips.topRight.visual,et,Ie),this.positionGrip(this.controlGrips.centerLeft.visual,Ne,ct),this.positionGrip(this.controlGrips.centerRight.visual,et,ct),this.positionGrip(this.controlGrips.bottomLeft.visual,Ne,Lt),this.positionGrip(this.controlGrips.bottomCenter.visual,xe,Lt),this.positionGrip(this.controlGrips.bottomRight.visual,et,Lt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,xe,Ie-3*this.CB_DISTANCE)},be.prototype.positionGrip=function(Pe,Ne,Ie){var xe=Pe.transform.baseVal.getItem(0);xe.setTranslate(Ne,Ie),Pe.transform.baseVal.replaceItem(xe,0)},be.prototype.hideControlBox=function(){this.controlBox.style.display="none"},be.prototype.showControlBox=function(){this.controlBox.style.display=""},be.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ve.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ve.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},Ge.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ne=Pe;this.left=Ne.left,this.top=Ne.top,this.width=Ne.width,this.height=Ne.height,this.rotationAngle=Ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ne.containerTransformMatrix))},be.prototype.scale=function(Pe,Ne){Ge.prototype.scale.call(this,Pe,Ne);var Ie=this.rotatePoint({x:this.left,y:this.top}),xe=this.unrotatePoint({x:Ie.x*Pe,y:Ie.y*Ne});this.left=xe.x,this.top=xe.y,this.width=this.width*Pe,this.height=this.height*Ne,this.adjustControlBox()},be}(de),Be=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.opacity=1,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},be.prototype.createVisual=function(){this.visual=Ue.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ge.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.setSize()},be.prototype.setSize=function(){Ge.prototype.setSize.call(this),Ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Pe){Ge.prototype.pointerUp.call(this,Pe),this.setSize()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ge.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.opacity=Ne.opacity,this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ne){Ge.prototype.scale.call(this,Pe,Ne),this.setSize()},be.title="Rectangle marker",be}(Ee),Le=function(Ge){function be(Pe,Ne,Ie,xe){var ct=Ge.call(this,Pe,xe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ct.widths=[],ct.widthBoxes=[],ct.widths=Ne,ct.currentWidth=Ie,ct.setCurrentWidth=ct.setCurrentWidth.bind(ct),ct}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.widths.forEach(function(Ie){var xe=document.createElement("div");xe.style.display="flex",xe.style.flexGrow="2",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderColor=Ie===Pe.currentWidth?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentWidth(Ie,xe)}),Ne.appendChild(xe);var ct=document.createElement("div");ct.innerText=Ie.toString(),ct.style.marginRight="5px",xe.appendChild(ct);var Lt=document.createElement("div");Lt.style.minHeight="20px",Lt.style.flexGrow="2",Lt.style.display="flex",Lt.style.alignItems="center";var et=document.createElement("hr");et.style.minWidth="20px",et.style.border="0px",et.style.borderTop=Ie+"px solid "+Pe.uiStyleSettings.toolboxColor,et.style.flexGrow="2",Lt.appendChild(et),xe.appendChild(Lt),Pe.widthBoxes.push(xe)}),Ne},be.prototype.setCurrentWidth=function(Pe,Ne){var Ie=this;this.currentWidth=Pe,this.widthBoxes.forEach(function(xe){xe.style.borderColor=xe===Ne?Ie.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},be}(te),ze=function(Ge){function be(Pe,Ne,Ie,xe){var ct=Ge.call(this,Pe,xe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return ct.styles=[],ct.styleBoxes=[],ct.styles=Ne,ct.currentStyle=Ie,ct.setCurrentStyle=ct.setCurrentStyle.bind(ct),ct}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.styles.forEach(function(Ie){var xe=document.createElement("div");xe.style.display="flex",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.overflow="hidden",xe.style.maxWidth=100/Pe.styles.length-5+"%",xe.style.borderColor=Ie===Pe.currentStyle?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentStyle(Ie,xe)}),Ne.appendChild(xe);var ct=document.createElement("div");ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.overflow="hidden";var Lt=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Pe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ie!==""?'stroke-dasharray="'+Ie+'"':"")+` />
</svg>`;ct.innerHTML=Lt,xe.appendChild(ct),Pe.styleBoxes.push(xe)}),Ne},be.prototype.setCurrentStyle=function(Pe,Ne){var Ie=this;this.currentStyle=Pe,this.styleBoxes.forEach(function(xe){xe.style.borderColor=xe===Ne?Ie.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},be}(te),je=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.strokeColor=Ie.defaultColor,xe.strokeWidth=Ie.defaultStrokeWidth,xe.strokeDasharray=Ie.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Ie.defaultColorSet,Ie.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Le("Line width",Ie.defaultStrokeWidths,Ie.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Ie.defaultStrokeDasharrays,Ie.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return Te(be,Ge),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="FrameMarker",be.title="Frame marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',be}(Be),Xe=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"},Ye=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.x1=0,xe.y1=0,xe.x2=0,xe.y2=0,xe.defaultLength=50,xe.manipulationStartX=0,xe.manipulationStartY=0,xe.manipulationStartX1=0,xe.manipulationStartY1=0,xe.manipulationStartX2=0,xe.manipulationStartY2=0,xe.setupControlBox(),xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!!Ge.prototype.ownsTarget.call(this,Pe)||!(!this.grip1.ownsTarget(Pe)&&!this.grip2.ownsTarget(Pe))},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.manipulationStartX=Pe.x,this.manipulationStartY=Pe.y,this.state==="new"&&(this.x1=Pe.x,this.y1=Pe.y,this.x2=Pe.x,this.y2=Pe.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},be.prototype.pointerUp=function(Pe){var Ne=this.state;Ge.prototype.pointerUp.call(this,Pe),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Pe),this._state="select",Ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},be.prototype.adjustVisual=function(){},be.prototype.manipulate=function(Pe){this.state==="creating"?this.resize(Pe):this.state==="move"?(this.x1=this.manipulationStartX1+Pe.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Pe.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Pe.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Pe.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Pe)},be.prototype.resize=function(Pe){switch(this.activeGrip){case this.grip1:this.x1=Pe.x,this.y1=Pe.y;break;case this.grip2:case void 0:this.x2=Pe.x,this.y2=Pe.y}this.adjustVisual(),this.adjustControlBox()},be.prototype.select=function(){Ge.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){Ge.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=Ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){this.positionGrips()},be.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},be.prototype.createGrip=function(){var Pe=new he;return Pe.visual.transform.baseVal.appendItem(Ue.createTransform()),this.controlBox.appendChild(Pe.visual),Pe},be.prototype.positionGrips=function(){var Pe=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Pe/2,this.y1-Pe/2),this.positionGrip(this.grip2.visual,this.x2-Pe/2,this.y2-Pe/2)},be.prototype.positionGrip=function(Pe,Ne,Ie){var xe=Pe.transform.baseVal.getItem(0);xe.setTranslate(Ne,Ie),Pe.transform.baseVal.replaceItem(xe,0)},be.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},Ge.prototype.getState.call(this))},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ne=Pe;this.x1=Ne.x1,this.y1=Ne.y1,this.x2=Ne.x2,this.y2=Ne.y2},be.prototype.scale=function(Pe,Ne){Ge.prototype.scale.call(this,Pe,Ne),this.x1=this.x1*Pe,this.y1=this.y1*Ne,this.x2=this.x2*Pe,this.y2=this.y2*Ne,this.adjustVisual(),this.adjustControlBox()},be}(de),dt=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.strokeColor=Ie.defaultColor,xe.strokeWidth=Ie.defaultStrokeWidth,xe.strokeDasharray=Ie.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Ie.defaultColorSet,Ie.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Le("Line width",Ie.defaultStrokeWidths,Ie.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Ie.defaultStrokeDasharrays,Ie.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorLine&&Pe!==this.visibleLine)},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.selectorLine=Ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},be.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),Ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ne=Pe;this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.createVisual(),this.adjustVisual()},be.typeName="LineMarker",be.title="Line marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',be}(Ye),Ze=function(Ge){function be(Pe,Ne,Ie,xe){var ct=Ge.call(this,Pe,xe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return ct.fonts=[],ct.fontBoxes=[],ct.fonts=Ne,ct.currentFont=Ie,ct.setCurrentFont=ct.setCurrentFont.bind(ct),ct}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.fonts.forEach(function(Ie){var xe=document.createElement("div");xe.style.display="inline-block",xe.style.alignItems="center",xe.style.justifyContent="space-between",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.overflow="hidden",xe.style.maxWidth=100/Pe.fonts.length-5+"%",xe.style.borderColor=Ie===Pe.currentFont?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentFont(Ie,xe)}),Ne.appendChild(xe);var ct=document.createElement("div");ct.style.display="flex",ct.style.minHeight="20px",ct.style.flexGrow="2",ct.style.fontFamily=Ie,ct.style.overflow="hidden";var Lt=document.createElement("div");Lt.style.whiteSpace="nowrap",Lt.style.overflow="hidden",Lt.style.textOverflow="ellipsis",Lt.innerHTML="The quick brown fox jumps over the lazy dog",ct.appendChild(Lt),xe.appendChild(ct),Pe.fontBoxes.push(xe)}),Ne},be.prototype.setCurrentFont=function(Pe,Ne){var Ie=this;this.currentFont=Pe,this.fontBoxes.forEach(function(xe){xe.style.borderColor=xe===Ne?Ie.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},be}(te),Nt=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.color="transparent",xe.padding=5,xe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",xe.text=xe.DEFAULT_TEXT,xe.isMoved=!1,xe.color=Ie.defaultColor,xe.fontFamily=Ie.defaultFontFamily,xe.defaultSize={x:100,y:30},xe.setColor=xe.setColor.bind(xe),xe.setFont=xe.setFont.bind(xe),xe.renderText=xe.renderText.bind(xe),xe.sizeText=xe.sizeText.bind(xe),xe.textEditDivClicked=xe.textEditDivClicked.bind(xe),xe.showTextEditor=xe.showTextEditor.bind(xe),xe.setSize=xe.setSize.bind(xe),xe.positionTextEditor=xe.positionTextEditor.bind(xe),xe.colorPanel=new ee("Color",Ie.defaultColorSet,Ie.defaultColor),xe.colorPanel.onColorChanged=xe.setColor,xe.fontFamilyPanel=new Ze("Font",Ie.defaultFontFamilies,Ie.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){if(Ge.prototype.ownsTarget.call(this,Pe)||Pe===this.visual||Pe===this.textElement||Pe===this.bgRectangle)return!0;var Ne=!1;return this.textElement.childNodes.forEach(function(Ie){Ie===Pe&&(Ne=!0)}),Ne},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.bgRectangle=Ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ue.createTransform()),this.textElement.transform.baseVal.appendItem(Ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.renderText=function(){var Pe=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(Ne){Pe.textElement.appendChild(Ue.createTSpan(Ne.trim()===""?" ":Ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},be.prototype.getTextScale=function(){var Pe=this.textElement.getBBox(),Ne=1;if(Pe.width>0&&Pe.height>0){var Ie=(1*this.width-this.width*this.padding*2/100)/Pe.width,xe=(1*this.height-this.height*this.padding*2/100)/Pe.height;Ne=Math.min(Ie,xe)}return Ne},be.prototype.getTextPosition=function(Pe){var Ne=this.textElement.getBBox(),Ie=0,xe=0;return Ne.width>0&&Ne.height>0&&(Ie=(this.width-Ne.width*Pe)/2,xe=this.height/2-Ne.height*Pe/2),{x:Ie,y:xe}},be.prototype.sizeText=function(){var Pe=this.textElement.getBBox(),Ne=this.getTextScale(),Ie=this.getTextPosition(Ne);Ie.y-=Pe.y*Ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ie.x+"px, "+Ie.y+"px) scale("+Ne+", "+Ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ie.x,Ie.y),this.textElement.transform.baseVal.getItem(1).setScale(Ne,Ne))},be.prototype.manipulate=function(Pe){Ge.prototype.manipulate.call(this,Pe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pe.x-this.pointerDownPoint.x)>5||Math.abs(Pe.y-this.pointerDownPoint.y)>5)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.isMoved=!0,this.setSize(),this.sizeText()},be.prototype.setSize=function(){Ge.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},be.prototype.pointerUp=function(Pe){var Ne=this.state;Ne==="creating"&&(this._suppressMarkerCreateEvent=!0),Ge.prototype.pointerUp.call(this,Pe),this.setSize(),(Ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.showTextEditor=function(){var Pe=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(Ne){Ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ne=Number.parseFloat(Pe.textEditor.style.fontSize);Pe.textEditor.clientWidth>=Number.parseInt(Pe.textEditor.style.maxWidth)&&Ne>.9;)Ne-=.1,Pe.textEditor.style.fontSize=Math.max(Ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ne){Ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ne){if(Ne.clipboardData){var Ie=Ne.clipboardData.getData("text"),xe=window.getSelection();if(!xe.rangeCount)return!1;xe.deleteFromDocument(),xe.getRangeAt(0).insertNode(document.createTextNode(Ie)),Ne.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Pe.textEditDivClicked(Pe.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},be.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Pe=this.getTextScale(),Ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ie=this.textElement.getBBox(),xe={x:Ie.width*Pe,y:Ie.height*Pe};Ne.x-=xe.x/2,Ne.y-=xe.y/2,this.textEditor.style.top=Ne.y+"px",this.textEditor.style.left=Ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ne.x+"px",this.textEditor.style.fontSize=Math.max(16*Pe,12)+"px",this.textElement.style.display="none"}},be.prototype.textEditDivClicked=function(Pe){this.text=Pe.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},be.prototype.select=function(){Ge.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},be.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),Ge.prototype.deselect.call(this)},be.prototype.dblClick=function(Pe,Ne){Ge.prototype.dblClick.call(this,Pe,Ne),this.showTextEditor()},be.prototype.setColor=function(Pe){this.textElement&&Ue.setAttributes(this.textElement,[["fill",Pe]]),this.color=Pe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Pe)},be.prototype.setFont=function(Pe){this.textElement&&Ue.setAttributes(this.textElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},be.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},be.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ne=Pe;this.color=Ne.color,this.fontFamily=Ne.fontFamily,this.padding=Ne.padding,this.text=Ne.text,this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ne){Ge.prototype.scale.call(this,Pe,Ne),this.setSize(),this.sizeText(),this.positionTextEditor()},be.typeName="TextMarker",be.title="Text marker",be.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',be}(Ee),at=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.color="transparent",xe.lineWidth=3,xe.drawing=!1,xe.pixelRatio=1,xe.color=Ie.defaultColor,xe.lineWidth=Ie.defaultStrokeWidth,xe.pixelRatio=Ie.freehandPixelRatio,xe.setColor=xe.setColor.bind(xe),xe.addCanvas=xe.addCanvas.bind(xe),xe.finishCreation=xe.finishCreation.bind(xe),xe.setLineWidth=xe.setLineWidth.bind(xe),xe.colorPanel=new ee("Color",Ie.defaultColorSet,Ie.defaultColor),xe.colorPanel.onColorChanged=xe.setColor,xe.lineWidthPanel=new Le("Line width",Ie.defaultStrokeWidths,Ie.defaultStrokeWidth),xe.lineWidthPanel.onWidthChanged=xe.setLineWidth,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.drawingImage)},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.drawingImage=Ue.createImage(),this.visual.appendChild(this.drawingImage);var Pe=Ue.createTransform();this.visual.transform.baseVal.appendItem(Pe),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Pe,Ne){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Pe.x,Pe.y),this.drawing=!0):Ge.prototype.pointerDown.call(this,Pe,Ne)},be.prototype.manipulate=function(Pe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Pe.x,Pe.y),this.canvasContext.stroke()):Ge.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),Ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Pe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):Ge.prototype.pointerUp.call(this,Pe)},be.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},be.prototype.select=function(){this.state==="creating"&&this.finishCreation(),Ge.prototype.select.call(this)},be.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),Ge.prototype.deselect.call(this)},be.prototype.finishCreation=function(){for(var Pe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ie=Ne[0],xe=Ne[1],ct=Ne[2],Lt=Ne[3],et=!1,it=0;it<this.canvasElement.height;it++)for(var Bt=0;Bt<this.canvasElement.width;Bt++)Pe.data[it*this.canvasElement.width*4+4*Bt+3]>0&&(et=!0,it<xe&&(xe=it),Bt<Ie&&(Ie=Bt),it>Lt&&(Lt=it),Bt>ct&&(ct=Bt));if(et){this.left=Ie/this.pixelRatio,this.top=xe/this.pixelRatio,this.width=(ct-Ie)/this.pixelRatio,this.height=(Lt-xe)/this.pixelRatio;var Dt=document.createElement("canvas");Dt.width=ct-Ie,Dt.height=Lt-xe,Dt.getContext("2d").putImageData(this.canvasContext.getImageData(Ie,xe,ct-Ie,Lt-xe),0,0),this.drawingImgUrl=Dt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},be.prototype.setDrawingImage=function(){Ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},be.prototype.setColor=function(Pe){this.color=Pe,this.colorChanged(Pe)},be.prototype.setLineWidth=function(Pe){this.lineWidth=Pe},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({drawingImgUrl:this.drawingImgUrl},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.drawingImgUrl=Pe.drawingImgUrl,this.setDrawingImage()},be.prototype.scale=function(Pe,Ne){Ge.prototype.scale.call(this,Pe,Ne),this.setDrawingImage()},be.typeName="FreehandMarker",be.title="Freehand marker",be.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',be}(Ee),kt=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ie||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return xe.typeBoxes=[],xe.currentType=Ne,xe.setCurrentType=xe.setCurrentType.bind(xe),xe}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2";for(var Ie=function(Lt){var et="both";switch(Lt){case 0:et="both";break;case 1:et="start";break;case 2:et="end";break;case 3:et="none"}var it=document.createElement("div");if(it.style.display="flex",it.style.flexGrow="2",it.style.alignItems="center",it.style.justifyContent="space-between",it.style.padding="5px",it.style.borderWidth="2px",it.style.borderStyle="solid",it.style.borderColor=et===xe.currentType?xe.uiStyleSettings.toolboxAccentColor:"transparent",it.addEventListener("click",function(){Pe.setCurrentType(et,it)}),Ne.appendChild(it),et==="both"||et==="start"){var Bt=document.createElement("div");Bt.style.display="flex",Bt.style.alignItems="center",Bt.style.minHeight="20px",Bt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Bt.style.marginLeft="5px",it.appendChild(Bt)}var Dt=document.createElement("div");Dt.style.display="flex",Dt.style.alignItems="center",Dt.style.minHeight="20px",Dt.style.flexGrow="2";var ft=document.createElement("hr");if(ft.style.minWidth="20px",ft.style.border="0px",ft.style.borderTop="3px solid "+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee"),ft.style.flexGrow="2",Dt.appendChild(ft),it.appendChild(Dt),et==="both"||et==="end"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(xe.uiStyleSettings!==void 0?xe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,$t.style.marginRight="5px",it.appendChild($t)}xe.typeBoxes.push(it)},xe=this,ct=0;ct<4;ct++)Ie(ct);return Ne},be.prototype.setCurrentType=function(Pe,Ne){var Ie=this;this.currentType=Pe,this.typeBoxes.forEach(function(xe){xe.style.borderColor=xe===Ne?Ie.uiStyleSettings!==void 0?Ie.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},be}(te),xt=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.arrowType="end",xe.arrowBaseHeight=10,xe.arrowBaseWidth=10,xe.getArrowPoints=xe.getArrowPoints.bind(xe),xe.setArrowType=xe.setArrowType.bind(xe),xe.arrowTypePanel=new kt("Arrow type","end"),xe.arrowTypePanel.onArrowTypeChanged=xe.setArrowType,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.arrow1&&Pe!==this.arrow2)},be.prototype.getArrowPoints=function(Pe,Ne){var Ie=this.arrowBaseWidth+2*this.strokeWidth,xe=this.arrowBaseHeight+2*this.strokeWidth;return Pe-Ie/2+","+(Ne+xe/2)+" "+Pe+","+(Ne-xe/2)+" "+(Pe+Ie/2)+","+(Ne+xe/2)},be.prototype.createTips=function(){this.arrow1=Ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ue.createTransform()),this.visual.appendChild(this.arrow2)},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Ge.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",Ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Pe=0;Math.abs(this.x1-this.x2)>.1&&(Pe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ne=this.arrow1.transform.baseVal.getItem(0);Ne.setRotate(Pe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ne,0);var Ie=this.arrow2.transform.baseVal.getItem(0);Ie.setRotate(Pe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ie,0)}},be.prototype.setArrowType=function(Pe){this.arrowType=Pe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({arrowType:this.arrowType},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ne=Pe;this.arrowType=Ne.arrowType,this.createTips(),this.adjustVisual()},be.typeName="ArrowMarker",be.title="Arrow marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',be}(dt),Ot=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.fillColor=Ie.defaultFillColor,xe.strokeWidth=0,xe.fillPanel=new ee("Color",Ie.defaultColorSet,Ie.defaultFillColor),xe.fillPanel.onColorChanged=xe.setFillColor,xe}return Te(be,Ge),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="CoverMarker",be.title="Cover marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',be}(Be),Gt=function(Ge){function be(Pe,Ne,Ie,xe){var ct=Ge.call(this,Pe,xe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return ct.opacities=[],ct.opacityBoxes=[],ct.opacities=Ne,ct.currentOpacity=Ie,ct.setCurrentOpacity=ct.setCurrentOpacity.bind(ct),ct}return Te(be,Ge),be.prototype.getUi=function(){var Pe=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",Ne.style.justifyContent="space-between",this.opacities.forEach(function(Ie){var xe=document.createElement("div");xe.style.display="flex",xe.style.alignItems="center",xe.style.justifyContent="center",xe.style.padding="5px",xe.style.borderWidth="2px",xe.style.borderStyle="solid",xe.style.borderColor=Ie===Pe.currentOpacity?Pe.uiStyleSettings.toolboxAccentColor:"transparent",xe.addEventListener("click",function(){Pe.setCurrentOpacity(Ie,xe)}),Ne.appendChild(xe);var ct=document.createElement("div");ct.innerText=100*Ie+"%",xe.appendChild(ct),Pe.opacityBoxes.push(xe)}),Ne},be.prototype.setCurrentOpacity=function(Pe,Ne){var Ie=this;this.currentOpacity=Pe,this.opacityBoxes.forEach(function(xe){xe.style.borderColor=xe===Ne?Ie.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},be}(te),At=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.setOpacity=xe.setOpacity.bind(xe),xe.fillColor=Ie.defaultHighlightColor,xe.strokeWidth=0,xe.opacity=Ie.defaultHighlightOpacity,xe.fillPanel=new ee("Color",Ie.defaultColorSet,xe.fillColor),xe.fillPanel.onColorChanged=xe.setFillColor,xe.opacityPanel=new Gt("Opacity",Ie.defaultOpacitySteps,xe.opacity),xe.opacityPanel.onOpacityChanged=xe.setOpacity,xe}return Te(be,Ge),be.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="HighlightMarker",be.title="Highlight marker",be.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',be}(Ot),qe='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',Ve='<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>',_t=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.bgColor="transparent",xe.tipPosition={x:0,y:0},xe.tipBase1Position={x:0,y:0},xe.tipBase2Position={x:0,y:0},xe.tipMoving=!1,xe.color=Ie.defaultStrokeColor,xe.bgColor=Ie.defaultFillColor,xe.fontFamily=Ie.defaultFontFamily,xe.defaultSize={x:100,y:30},xe.setBgColor=xe.setBgColor.bind(xe),xe.getTipPoints=xe.getTipPoints.bind(xe),xe.positionTip=xe.positionTip.bind(xe),xe.setTipPoints=xe.setTipPoints.bind(xe),xe.colorPanel=new ee("Text color",Ie.defaultColorSet,xe.color,qe),xe.colorPanel.onColorChanged=xe.setColor,xe.bgColorPanel=new ee("Fill color",Ie.defaultColorSet,xe.bgColor,Ve),xe.bgColorPanel.onColorChanged=xe.setBgColor,xe.fontFamilyPanel=new Ze("Font",Ie.defaultFontFamilies,Ie.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe.tipGrip=new he,xe.tipGrip.visual.transform.baseVal.appendItem(Ue.createTransform()),xe.controlBox.appendChild(xe.tipGrip.visual),xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return Ge.prototype.ownsTarget.call(this,Pe)||this.tipGrip.ownsTarget(Pe)||this.tip===Pe},be.prototype.createTip=function(){Ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},be.prototype.pointerDown=function(Pe,Ne){this.state==="new"&&Ge.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):Ge.prototype.pointerDown.call(this,Pe,Ne)},be.prototype.pointerUp=function(Pe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,Ge.prototype.pointerUp.call(this,Pe);else{var Ne=this.state==="creating";Ge.prototype.pointerUp.call(this,Pe),this.setTipPoints(Ne),this.positionTip()}},be.prototype.manipulate=function(Pe){if(this.tipMoving){var Ne=this.unrotatePoint(Pe);this.tipPosition={x:Ne.x-this.manipulationStartLeft,y:Ne.y-this.manipulationStartTop},this.positionTip()}else Ge.prototype.manipulate.call(this,Pe)},be.prototype.setBgColor=function(Pe){this.bgRectangle&&this.tip&&(Ue.setAttributes(this.bgRectangle,[["fill",Pe]]),Ue.setAttributes(this.tip,[["fill",Pe]])),this.bgColor=Pe,this.fillColorChanged(Pe)},be.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},be.prototype.setTipPoints=function(Pe){Pe===void 0&&(Pe=!1);var Ne=Math.min(this.height/2,15),Ie=this.height/5;Pe&&(this.tipPosition={x:Ne+Ie/2,y:this.height+20});var xe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?xe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ie=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:Ne,y:0},this.tipBase2Position={x:Ne+Ie,y:0}):(this.tipBase1Position={x:0,y:Ne},this.tipBase2Position={x:0,y:Ne+Ie}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?xe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ie=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ne-Ie,y:0},this.tipBase2Position={x:this.width-Ne,y:0}):(this.tipBase1Position={x:this.width,y:Ne},this.tipBase2Position={x:this.width,y:Ne+Ie}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?xe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ie=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ne-Ie,y:this.height},this.tipBase2Position={x:this.width-Ne,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ne-Ie},this.tipBase2Position={x:this.width,y:this.height-Ne}):xe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ie=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:Ne,y:this.height},this.tipBase2Position={x:Ne+Ie,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ne},this.tipBase2Position={x:0,y:this.height-Ne-Ie})},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.positionTip()},be.prototype.positionTip=function(){Ue.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Pe=this.tipGrip.visual.transform.baseVal.getItem(0);Pe.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Pe,0)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.select=function(){this.positionTip(),Ge.prototype.select.call(this)},be.prototype.getState=function(){var Pe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ne=Pe;this.bgColor=Ne.bgColor,this.tipPosition=Ne.tipPosition,Ge.prototype.restoreState.call(this,Pe),this.createTip(),this.setTipPoints()},be.prototype.scale=function(Pe,Ne){Ge.prototype.scale.call(this,Pe,Ne),this.tipPosition={x:this.tipPosition.x*Pe,y:this.tipPosition.y*Ne},this.positionTip()},be.typeName="CalloutMarker",be.title="Callout marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',be}(Nt),vn=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.opacity=1,xe.strokeColor=Ie.defaultColor,xe.strokeWidth=Ie.defaultStrokeWidth,xe.strokeDasharray=Ie.defaultStrokeDasharray,xe.fillColor=Ie.defaultFillColor,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.setOpacity=xe.setOpacity.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe.strokePanel=new ee("Line color",We(Ie.defaultColorSet,["transparent"]),Ie.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.fillPanel=new ee("Fill color",We(Ie.defaultColorSet,["transparent"]),xe.fillColor,Ve),xe.fillPanel.onColorChanged=xe.setFillColor,xe.strokeWidthPanel=new Le("Line width",Ie.defaultStrokeWidths,Ie.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Ie.defaultStrokeDasharrays,Ie.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe.opacityPanel=new Gt("Opacity",Ie.defaultOpacitySteps,xe.opacity),xe.opacityPanel.onOpacityChanged=xe.setOpacity,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual)},be.prototype.createVisual=function(){this.visual=Ue.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ge.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.setSize()},be.prototype.setSize=function(){Ge.prototype.setSize.call(this),Ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},be.prototype.pointerUp=function(Pe){Ge.prototype.pointerUp.call(this,Pe),this.setSize()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.visual&&Ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.visual&&Ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.setOpacity=function(Pe){this.opacity=Pe,this.visual&&Ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.opacity=Ne.opacity,this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ne){Ge.prototype.scale.call(this,Pe,Ne),this.setSize()},be.typeName="EllipseMarker",be.title="Ellipse marker",be.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',be}(Ee),yn=function(Ge){function be(Pe,Ne,Ie){return Ge.call(this,Pe,Ne,Ie)||this}return Te(be,Ge),Object.defineProperty(be.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.tip1&&Pe!==this.tip2)},be.prototype.createTips=function(){this.tip1=Ue.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(Ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ue.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(Ue.createTransform()),this.visual.appendChild(this.tip2)},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(Ge.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ue.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()]]),Ue.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Pe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ne=this.tip1.transform.baseVal.getItem(0);Ne.setRotate(Pe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ne,0);var Ie=this.tip2.transform.baseVal.getItem(0);Ie.setRotate(Pe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ie,0)}},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe),this.createTips(),this.adjustVisual()},be.typeName="MeasurementMarker",be.title="Measurement marker",be.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',be}(dt),jt=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.strokePanel.colors=Ie.defaultColorSet,xe.fillColor="transparent",xe}return Te(be,Ge),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Ge.prototype.getState.call(this);return Pe.typeName=be.typeName,Pe},be.typeName="EllipseFrameMarker",be.title="Ellipse frame marker",be.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',be}(vn),en=function(){function Ge(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(Ge.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),Ge.prototype.addUndoStep=function(be){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(be)||(this.undoStack.push(be),JSON.stringify(this.lastRedoStep)!==JSON.stringify(be)&&this.redoStack.splice(0,this.redoStack.length))},Ge.prototype.replaceLastUndoStep=function(be){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=be)},Ge.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},Ge.prototype.undo=function(){if(this.undoStack.length>1){var be=this.undoStack.pop();return be!==void 0&&this.redoStack.push(be),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},Ge.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},Ge}(),ln=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.curveX=0,xe.curveY=0,xe.manipulationStartCurveX=0,xe.manipulationStartCurveY=0,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.positionGrips=xe.positionGrips.bind(xe),xe.addControlGrips=xe.addControlGrips.bind(xe),xe.adjustVisual=xe.adjustVisual.bind(xe),xe.setupControlBox=xe.setupControlBox.bind(xe),xe.resize=xe.resize.bind(xe),xe.strokeColor=Ie.defaultColor,xe.strokeWidth=Ie.defaultStrokeWidth,xe.strokeDasharray=Ie.defaultStrokeDasharray,xe.strokePanel=new ee("Line color",Ie.defaultColorSet,Ie.defaultColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.strokeWidthPanel=new Le("Line width",Ie.defaultStrokeWidths,Ie.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Ie.defaultStrokeDasharrays,Ie.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.selectorCurve&&Pe!==this.visibleCurve&&!this.curveGrip.ownsTarget(Pe))},be.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.selectorCurve=Ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ue.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Pe.x,this.curveY=Pe.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ne)&&(this.activeGrip=this.curveGrip,this._state="resize")},be.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setupControlBox=function(){Ge.prototype.setupControlBox.call(this),this.curveControlLine1=Ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ue.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},be.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,Ge.prototype.addControlGrips.call(this)},be.prototype.positionGrips=function(){Ge.prototype.positionGrips.call(this);var Pe=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Pe/2,this.curveY-Pe/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},be.prototype.manipulate=function(Pe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Pe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Pe.y-this.manipulationStartY),Ge.prototype.manipulate.call(this,Pe)},be.prototype.resize=function(Pe){this.activeGrip===this.curveGrip&&(this.curveX=Pe.x,this.curveY=Pe.y),Ge.prototype.resize.call(this,Pe),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.adjustVisual(),this.colorChanged(Pe)},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.adjustVisual()},be.prototype.scale=function(Pe,Ne){this.curveX=this.curveX*Pe,this.curveY=this.curveY*Ne,Ge.prototype.scale.call(this,Pe,Ne)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},Ge.prototype.getState.call(this));return Pe.typeName=be.typeName,Pe},be.prototype.restoreState=function(Pe){Ge.prototype.restoreState.call(this,Pe);var Ne=Pe;this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.curveX=Ne.curveX,this.curveY=Ne.curveY,this.createVisual(),this.adjustVisual()},be.typeName="CurveMarker",be.title="Curve marker",be.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',be}(Ye),Wn=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,Ne,Ie)||this;return xe.fillColor="transparent",xe.strokeColor="transparent",xe.strokeWidth=0,xe.strokeDasharray="",xe.textColor="transparent",xe.fontSize="1rem",xe.isMoved=!1,xe.captionText="Caption",xe.PADDING=5,xe.captionBoxWidth=0,xe.captionBoxHeight=0,xe.strokeColor=Ie.defaultColor,xe.strokeWidth=Ie.defaultStrokeWidth,xe.strokeDasharray=Ie.defaultStrokeDasharray,xe.fillColor=Ie.defaultFillColor,xe.textColor=Ie.defaultStrokeColor,xe.fontFamily=Ie.defaultFontFamily,xe.fontSize=Ie.defaultCaptionFontSize,xe.captionText=Ie.defaultCaptionText,xe.setStrokeColor=xe.setStrokeColor.bind(xe),xe.setFillColor=xe.setFillColor.bind(xe),xe.setStrokeWidth=xe.setStrokeWidth.bind(xe),xe.setStrokeDasharray=xe.setStrokeDasharray.bind(xe),xe.createVisual=xe.createVisual.bind(xe),xe.sizeCaption=xe.sizeCaption.bind(xe),xe.setCaptionText=xe.setCaptionText.bind(xe),xe.showTextEditor=xe.showTextEditor.bind(xe),xe.positionTextEditor=xe.positionTextEditor.bind(xe),xe.finishTextEditing=xe.finishTextEditing.bind(xe),xe.setFont=xe.setFont.bind(xe),xe.setTextColor=xe.setTextColor.bind(xe),xe.strokePanel=new ee("Line color",We(Ie.defaultColorSet,["transparent"]),xe.strokeColor),xe.strokePanel.onColorChanged=xe.setStrokeColor,xe.fillPanel=new ee("Fill color",We(Ie.defaultColorSet,["transparent"]),xe.fillColor,Ve),xe.fillPanel.onColorChanged=xe.setFillColor,xe.strokeWidthPanel=new Le("Line width",Ie.defaultStrokeWidths,Ie.defaultStrokeWidth),xe.strokeWidthPanel.onWidthChanged=xe.setStrokeWidth,xe.strokeStylePanel=new ze("Line style",Ie.defaultStrokeDasharrays,Ie.defaultStrokeDasharray),xe.strokeStylePanel.onStyleChanged=xe.setStrokeDasharray,xe.fontFamilyPanel=new Ze("Font",Ie.defaultFontFamilies,Ie.defaultFontFamily),xe.fontFamilyPanel.onFontChanged=xe.setFont,xe.textColorPanel=new ee("Text color",Ie.defaultColorSet,xe.textColor,qe),xe.textColorPanel.onColorChanged=xe.setTextColor,xe}return Te(be,Ge),be.prototype.ownsTarget=function(Pe){return!(!Ge.prototype.ownsTarget.call(this,Pe)&&Pe!==this.visual&&Pe!==this.frame&&Pe!==this.captionBg&&Pe!==this.captionElement)},be.prototype.createVisual=function(){this.visual=Ue.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ue.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ue.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=Ue.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},be.prototype.setCaptionText=function(Pe){this.captionText=Pe,this.captionElement.textContent=this.captionText,this.sizeCaption()},be.prototype.pointerDown=function(Pe,Ne){Ge.prototype.pointerDown.call(this,Pe,Ne),this.isMoved=!1,this.pointerDownPoint=Pe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Pe),this._state="creating")},be.prototype.manipulate=function(Pe){Ge.prototype.manipulate.call(this,Pe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Pe.x-this.pointerDownPoint.x)>5||Math.abs(Pe.y-this.pointerDownPoint.y)>5)},be.prototype.resize=function(Pe){Ge.prototype.resize.call(this,Pe),this.setSize()},be.prototype.sizeCaption=function(){var Pe=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Pe.width+2*this.PADDING,this.captionBoxHeight=Pe.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ue.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')"]]),Ue.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},be.prototype.showTextEditor=function(){var Pe=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(Ne){Ne.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ne){Ne.key==="Enter"&&Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ne){Ne.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Pe.finishTextEditing(Pe.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Pe.finishTextEditing(Pe.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},be.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},be.prototype.finishTextEditing=function(Pe){this.setCaptionText(Pe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},be.prototype.setFont=function(Pe){this.captionElement&&Ue.setAttributes(this.captionElement,[["font-family",Pe]]),this.fontFamily=Pe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},be.prototype.setTextColor=function(Pe){this.captionElement&&Ue.setAttributes(this.captionElement,[["fill",Pe]]),this.textColor=Pe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},be.prototype.setSize=function(){Ge.prototype.setSize.call(this),Ue.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},be.prototype.pointerUp=function(Pe){Ge.prototype.pointerUp.call(this,Pe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.dblClick=function(Pe,Ne){Ge.prototype.dblClick.call(this,Pe,Ne),this.showTextEditor()},be.prototype.setStrokeColor=function(Pe){this.strokeColor=Pe,this.frame&&Ue.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Pe),this.stateChanged()},be.prototype.setFillColor=function(Pe){this.fillColor=Pe,this.captionBg&&Ue.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Pe),this.stateChanged()},be.prototype.setStrokeWidth=function(Pe){this.strokeWidth=Pe,this.frame&&Ue.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Pe){this.strokeDasharray=Pe,this.frame&&Ue.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Pe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},Ge.prototype.getState.call(this));return Pe.typeName=this.typeName,Pe},be.prototype.restoreState=function(Pe){var Ne=Pe;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.textColor=Ne.textColor,this.fontFamily=Ne.fontFamily,this.captionText=Ne.captionText,this.fontSize=Ne.fontSize,this.createVisual(),Ge.prototype.restoreState.call(this,Pe),this.setSize()},be.prototype.scale=function(Pe,Ne){Ge.prototype.scale.call(this,Pe,Ne),this.setSize()},be.typeName="CaptionFrameMarker",be.title="Caption frame marker",be.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',be}(Ee),un=function(){function Ge(be,Pe){Pe===void 0&&(Pe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=be,this.cancelable=Pe}return Object.defineProperty(Ge.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),Ge.prototype.preventDefault=function(){this._defaultPrevented=!0},Ge}(),kn=function(Ge){function be(Pe,Ne,Ie){var xe=Ge.call(this,Pe,!1)||this;return xe.dataUrl=Ne,xe.state=Ie,xe}return Te(be,Ge),be}(un),wt=function(Ge){function be(Pe,Ne,Ie){Ie===void 0&&(Ie=!1);var xe=Ge.call(this,Pe,Ie)||this;return xe.marker=Ne,xe}return Te(be,Ge),be}(un),jn=function(){function Ge(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return Ge.prototype.addEventListener=function(be,Pe){this[be].push(Pe)},Ge.prototype.removeEventListener=function(be,Pe){var Ne=this[be].indexOf(Pe);Ne>-1&&this[be].splice(Ne,1)},Ge}(),ci=function(){function Ge(be){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Xe,this._isOpen=!1,this.undoRedoManager=new en,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 jn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=Ge.instanceCounter++,this.styles=new $e(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=be,this.targetRoot=document.body,this.width=be.clientWidth,this.height=be.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(Ge.prototype,"ALL_MARKER_TYPES",{get:function(){return[je,at,xt,Nt,jt,vn,At,_t,yn,Ot,dt,ln,Wn]},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[je,at,xt,Nt,vn,At,_t]},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"BASIC_MARKER_TYPES",{get:function(){return[je,at,xt,Nt,At]},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(be){var Pe=this;this._availableMarkerTypes.splice(0),be.forEach(function(Ne){if(typeof Ne=="string"){var Ie=Pe.ALL_MARKER_TYPES.find(function(xe){return xe.typeName===Ne});Ie!==void 0&&Pe._availableMarkerTypes.push(Ie)}else Pe._availableMarkerTypes.push(Ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(be){this._zoomLevel=be,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(Ge.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Ge.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Me.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},Ge.prototype.show=function(){var be=this;this.styles.styleSheetRoot===void 0&&Pt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Pt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Pe){return Pe(new un(be))})},Ge.prototype.render=function(){return He(this,void 0,void 0,function(){var be;return ut(this,function(Pe){switch(Pe.label){case 0:return this.setCurrentMarker(),(be=new Ct).naturalSize=this.renderAtNaturalSize,be.imageType=this.renderImageType,be.imageQuality=this.renderImageQuality,be.markersOnly=this.renderMarkersOnly,be.width=this.renderWidth,be.height=this.renderHeight,[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Pe.sent(),[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Pe.sent()]}})})},Ge.prototype.close=function(be){var Pe=this;if(be===void 0&&(be=!1),this.isOpen){var Ne=!1;be||this.eventListeners.beforeclose.forEach(function(Ie){var xe=new un(Pe,!0);Ie(xe),xe.defaultPrevented&&(Ne=!0)}),Ne||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Ie){return Ie(new un(Pe))}),this.detachEvents(),this._isOpen=!1)}},Ge.prototype.addMarkersToToolbar=function(){for(var be,Pe=[],Ne=0;Ne<arguments.length;Ne++)Pe[Ne]=arguments[Ne];(be=this._availableMarkerTypes).push.apply(be,Pe)},Ge.prototype.addRenderEventListener=function(be){this.addEventListener("render",function(Pe){be(Pe.dataUrl,Pe.state)})},Ge.prototype.removeRenderEventListener=function(be){},Ge.prototype.addCloseEventListener=function(be){this.addEventListener("close",function(){be()})},Ge.prototype.removeCloseEventListener=function(be){},Ge.prototype.setupResizeObserver=function(){var be=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){be.resize(be.target.clientWidth,be.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return be.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},Ge.prototype.onPopupTargetResize=function(){var be=1*this.target.clientWidth/this.target.clientHeight,Pe=this.editorCanvas.clientWidth/be>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*be:this.editorCanvas.clientWidth,Ne=Pe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/be;this.resize(Pe,Ne)},Ge.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},Ge.prototype.resize=function(be,Pe){this._isResizing=!0;var Ne=be/this.imageWidth,Ie=Pe/this.imageHeight;this.imageWidth=Math.round(be),this.imageHeight=Math.round(Pe),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Ne,Ie),this._isResizing=!1},Ge.prototype.scaleMarkers=function(be,Pe){var Ne,Ie=this;this._currentMarker&&this._currentMarker instanceof Nt?this._currentMarker.scale(be,Pe):(Ne=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(xe){xe!==Ie._currentMarker&&xe.scale(be,Pe)}),Ne!==void 0&&this.setCurrentMarker(Ne)},Ge.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},Ge.prototype.setTopLeft=function(){var be=this.editingTarget.getBoundingClientRect(),Pe=this.editorCanvas.getBoundingClientRect();this.left=be.left-Pe.left,this.top=be.top-Pe.top},Ge.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},Ge.prototype.addDefs=function(){for(var be,Pe=[],Ne=0;Ne<arguments.length;Ne++)Pe[Ne]=arguments[Ne];this.defs=Ue.createDefs(),this.addDefsToImage(),(be=this.defs).append.apply(be,Pe)},Ge.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},Ge.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},Ge.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},Ge.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},Ge.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},Ge.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},Ge.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},Ge.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var be=document.createElement("a");be.href="https://markerjs.com/",be.target="_blank",be.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',be.title="Powered by marker.js",be.style.display="grid",be.style.alignItems="center",be.style.justifyItems="center",be.style.padding="3px",be.style.width="20px",be.style.height="20px",this.logoUI.appendChild(be),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},Ge.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},Ge.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},Ge.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},Ge.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var be=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=be+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new vt(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Oe(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},Ge.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},Ge.prototype.removeMarker=function(be){this.markerImage.removeChild(be.container),this.markers.indexOf(be)>-1&&this.markers.splice(this.markers.indexOf(be),1),be.dispose()},Ge.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},Ge.prototype.toolbarButtonClicked=function(be,Pe){if(be==="marker"&&Pe!==void 0)this.createNewMarker(Pe);else if(be==="action")switch(Pe){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},Ge.prototype.deleteSelectedMarker=function(){var be=this;if(this._currentMarker!==void 0){var Pe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ie){var xe=new wt(be,be._currentMarker,!0);Ie(xe),xe.defaultPrevented&&(Pe=!0)}),!Pe){var Ne=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Ie){return Ie(new wt(be,Ne))})}}},Ge.prototype.clear=function(){var be=this,Pe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ct){var Lt=new wt(be,void 0,!0);ct(Lt),Lt.defaultPrevented&&(Pe=!0)}),!Pe)){this.setCurrentMarker();for(var Ne=function(ct){var Lt=Ie.markers[ct];Ie.setCurrentMarker(Ie.markers[ct]),Ie._currentMarker.dispose(),Ie.markerImage.removeChild(Ie._currentMarker.container),Ie.markers.splice(Ie.markers.indexOf(Ie._currentMarker),1),Ie.eventListeners.markerdelete.forEach(function(et){return et(new wt(be,Lt))})},Ie=this,xe=this.markers.length-1;xe>=0;xe--)Ne(xe);this.addUndoStep()}},Object.defineProperty(Ge.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),Ge.prototype.showNotesEditor=function(){var be;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(be=this._currentMarker.notes)!==null&&be!==void 0?be:"",this.overlayContainer.appendChild(this.notesArea))},Ge.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},Ge.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},Ge.prototype.addUndoStep=function(){var be=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Pe=this.getState(),Ne=this.undoRedoManager.getLastUndoStep();if(!Ne||Ne.width===Pe.width&&Ne.height===Pe.height){var Ie=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Pe),Ie<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(xe){return xe(new un(be))})}else this.undoRedoManager.replaceLastUndoStep(Pe),this.eventListeners.statechange.forEach(function(xe){return xe(new un(be))})}},Ge.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},Ge.prototype.undoStep=function(){var be=this,Pe=this.undoRedoManager.undo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ne){return Ne(new un(be))}))},Ge.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},Ge.prototype.redoStep=function(){var be=this,Pe=this.undoRedoManager.redo();Pe!==void 0&&(this.restoreState(Pe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ne){return Ne(new un(be))}))},Ge.prototype.stepZoom=function(){var be=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=be<this.zoomSteps.length-1?this.zoomSteps[be+1]:this.zoomSteps[0]},Ge.prototype.panTo=function(be){this.contentDiv.scrollBy({left:this.prevPanPoint.x-be.x,top:this.prevPanPoint.y-be.y}),this.prevPanPoint=be},Ge.prototype.startRenderAndClose=function(){return He(this,void 0,void 0,function(){var be,Pe,Ne=this;return ut(this,function(Ie){switch(Ie.label){case 0:return[4,this.render()];case 1:return be=Ie.sent(),Pe=this.getState(),this.eventListeners.render.forEach(function(xe){return xe(new kn(Ne,be,Pe))}),this.close(!0),[2]}})})},Ge.prototype.getState=function(be){be===!0&&this.setCurrentMarker();var Pe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ne){return Pe.markers.push(Ne.getState())}),Pe},Ge.prototype.restoreState=function(be){var Pe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);be.markers.forEach(function(Ne){var Ie=Pe._availableMarkerTypes.find(function(ct){return ct.typeName===Ne.typeName});if(Ie!==void 0){var xe=Pe.addNewMarker(Ie);xe.restoreState(Ne),Pe.markers.push(xe)}}),be.width&&be.height&&(be.width!==this.imageWidth||be.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/be.width,this.imageHeight/be.height),this.eventListeners.restorestate.forEach(function(Ne){return Ne(new un(Pe))})},Ge.prototype.addNewMarker=function(be){var Pe=Ue.createGroup();return this.markerImage.appendChild(Pe),new be(Pe,this.overlayContainer,this.settings)},Ge.prototype.createNewMarker=function(be){var Pe,Ne=this;(Pe=typeof be=="string"?this._availableMarkerTypes.find(function(Ie){return Ie.typeName===be}):be)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Pe),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Pe.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ie){return Ie(new wt(Ne,Ne._currentMarker))}))},Ge.prototype.markerCreated=function(be){var Pe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(be),this.setCurrentMarker(be),be instanceof at&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(at):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ne){return Ne(new wt(Pe,Pe._currentMarker))})},Ge.prototype.colorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=be,this.settings.defaultStrokeColor=be)},Ge.prototype.fillColorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=be)},Ge.prototype.markerStateChanged=function(be){var Pe=this;this.eventListeners.markerchange.forEach(function(Ne){return Ne(new wt(Pe,be))})},Ge.prototype.setCurrentMarker=function(be){var Pe=this;this._currentMarker!==be&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ne){return Ne(new wt(Pe,Pe._currentMarker))})),this._currentMarker=be,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Ne){return Ne(new wt(Pe,Pe._currentMarker))}))},Ge.prototype.onPointerDown=function(be){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||be.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Pe=this.markers.find(function(Ne){return Ne.ownsTarget(be.target)});Pe!==void 0?(this.setCurrentMarker(Pe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:be.clientX,y:be.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY))},Ge.prototype.onDblClick=function(be){if(this._isFocused||this.focus(),this.mode==="select"){var Pe=this.markers.find(function(Ne){return Ne.ownsTarget(be.target)});Pe!==void 0&&Pe!==this._currentMarker&&this.setCurrentMarker(Pe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target):this.setCurrentMarker()}},Ge.prototype.onPointerMove=function(be){this.touchPoints!==1&&be.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||be.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(be.clientX,be.clientY)):this.zoomLevel>1&&this.panTo({x:be.clientX,y:be.clientY}))},Ge.prototype.onPointerUp=function(be){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(be.clientX,be.clientY)),this.isDragging=!1,this.addUndoStep()},Ge.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},Ge.prototype.onKeyUp=function(be){this._currentMarker===void 0||this.notesArea!==void 0||be.key!=="Delete"&&be.key!=="Backspace"||this.deleteSelectedMarker()},Ge.prototype.clientToLocalCoordinates=function(be,Pe){var Ne=this.markerImage.getBoundingClientRect();return{x:(be-Ne.left)/this.zoomLevel,y:(Pe-Ne.top)/this.zoomLevel}},Ge.prototype.onWindowResize=function(){this.positionUI()},Ge.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var be=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=be+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},Ge.prototype.addLicenseKey=function(be){Me.addKey(be)},Ge.prototype.addEventListener=function(be,Pe){this.eventListeners.addEventListener(be,Pe)},Ge.prototype.removeEventListener=function(be,Pe){this.eventListeners.removeEventListener(be,Pe)},Ge.prototype.renderState=function(be){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(be),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(Ge.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),Ge.prototype.focus=function(){var be=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Pe){return Pe(new un(be))}))},Ge.prototype.blur=function(){var be=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Pe){return Pe(new un(be))}))},Ge.instanceCounter=0,Ge}()},17115:function(On,mn,pe){"use strict";pe.d(mn,{ZP:function(){return Me}});var le=pe(33606),Te=pe(59301),He=pe(47273),ut=0,We=(0,He.Z)();function Ue(){var Ct;return We?(Ct=ut,ut+=1):Ct="TEST_OR_SSR",Ct}function Me(Ct){var Pt=Te.useState(),$e=(0,le.Z)(Pt,2),Ft=$e[0],lt=$e[1];return Te.useEffect(function(){lt("rc_select_".concat(Ue()))},[]),Ct||Ft}},77861:function(On,mn,pe){"use strict";pe.d(mn,{Ac:function(){return $t},Xo:function(){return Hi},Wx:function(){return br},ZP:function(){return cn},lk:function(){return Ee}});var le=pe(92413),Te=pe(26407),He=pe(400),ut=pe(33708),We=pe(33606),Ue=pe(37061),Me=pe(39559),Ct=pe(18929),Pt=pe(48736),$e=pe(59301),Ft=pe(92310),lt=pe.n(Ft),vt=pe(34280),Oe=pe(49658),te=pe(10228),ee=pe(8654),de=function(ht){var nn=ht.className,gn=ht.customizeIcon,_n=ht.customizeIconProps,qn=ht.onMouseDown,Et=ht.onClick,Pn=ht.children,Xn;return typeof gn=="function"?Xn=gn(_n):Xn=gn,$e.createElement("span",{className:nn,onMouseDown:function(tn){tn.preventDefault(),qn&&qn(tn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Et,"aria-hidden":!0},Xn!==void 0?Xn:$e.createElement("span",{className:lt()(nn.split(/\s+/).map(function(Ci){return"".concat(Ci,"-icon")}))},Pn))},se=de;function he(Mt,ht,nn,gn,_n){var qn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Et=arguments.length>6?arguments[6]:void 0,Pn=arguments.length>7?arguments[7]:void 0,Xn=$e.useMemo(function(){if((0,Me.Z)(gn)==="object")return gn.clearIcon;if(_n)return _n},[gn,_n]),Ci=$e.useMemo(function(){return!!(!qn&&gn&&(nn.length||Et)&&!(Pn==="combobox"&&Et===""))},[gn,qn,nn.length,Et,Pn]);return{allowClear:Ci,clearIcon:$e.createElement(se,{className:"".concat(Mt,"-clear"),onMouseDown:ht,customizeIcon:Xn},"\xD7")}}var ve=$e.createContext(null);function Ee(){return $e.useContext(ve)}function Be(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,ht=$e.useState(!1),nn=(0,We.Z)(ht,2),gn=nn[0],_n=nn[1],qn=$e.useRef(null),Et=function(){window.clearTimeout(qn.current)};$e.useEffect(function(){return Et},[]);var Pn=function(Ci,tn){Et(),qn.current=window.setTimeout(function(){_n(Ci),tn&&tn()},Mt)};return[gn,Pn,Et]}function Le(){var Mt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,ht=$e.useRef(null),nn=$e.useRef(null);$e.useEffect(function(){return function(){window.clearTimeout(nn.current)}},[]);function gn(_n){(_n||ht.current===null)&&(ht.current=_n),window.clearTimeout(nn.current),nn.current=window.setTimeout(function(){ht.current=null},Mt)}return[function(){return ht.current},gn]}function ze(Mt,ht,nn,gn){var _n=$e.useRef(null);_n.current={open:ht,triggerOpen:nn,customizedTrigger:gn},$e.useEffect(function(){function qn(Et){var Pn;if(!((Pn=_n.current)!==null&&Pn!==void 0&&Pn.customizedTrigger)){var Xn=Et.target;Xn.shadowRoot&&Et.composed&&(Xn=Et.composedPath()[0]||Xn),_n.current.open&&Mt().filter(function(Ci){return Ci}).every(function(Ci){return!Ci.contains(Xn)&&Ci!==Xn})&&_n.current.triggerOpen(!1)}}return window.addEventListener("mousedown",qn),function(){return window.removeEventListener("mousedown",qn)}},[])}var je=pe(26112),Xe=pe(11780),Ye=function(ht,nn){var gn,_n,qn=ht.prefixCls,Et=ht.id,Pn=ht.inputElement,Xn=ht.disabled,Ci=ht.tabIndex,tn=ht.autoFocus,sn=ht.autoComplete,In=ht.editable,ji=ht.activeDescendantId,Ai=ht.value,Si=ht.maxLength,ki=ht.onKeyDown,Ni=ht.onMouseDown,ir=ht.onChange,zr=ht.onPaste,Vr=ht.onCompositionStart,Zn=ht.onCompositionEnd,io=ht.open,Yr=ht.attrs,Fr=Pn||$e.createElement("input",null),wn=Fr,ri=wn.ref,Ui=wn.props,Pr=Ui.onKeyDown,er=Ui.onChange,Cr=Ui.onMouseDown,qr=Ui.onCompositionStart,Zr=Ui.onCompositionEnd,Ir=Ui.style;return(0,Pt.Kp)(!("maxLength"in Fr.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Fr=$e.cloneElement(Fr,(0,ut.Z)((0,ut.Z)((0,ut.Z)({type:"search"},Ui),{},{id:Et,ref:(0,ee.sQ)(nn,ri),disabled:Xn,tabIndex:Ci,autoComplete:sn||"off",autoFocus:tn,className:lt()("".concat(qn,"-selection-search-input"),(gn=Fr)===null||gn===void 0||(_n=gn.props)===null||_n===void 0?void 0:_n.className),role:"combobox","aria-label":"Search","aria-expanded":io||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Et,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Et,"_list"),"aria-activedescendant":io?ji:void 0},Yr),{},{value:In?Ai:"",maxLength:Si,readOnly:!In,unselectable:In?null:"on",style:(0,ut.Z)((0,ut.Z)({},Ir),{},{opacity:In?null:0}),onKeyDown:function(Vn){ki(Vn),Pr&&Pr(Vn)},onMouseDown:function(Vn){Ni(Vn),Cr&&Cr(Vn)},onChange:function(Vn){ir(Vn),er&&er(Vn)},onCompositionStart:function(Vn){Vr(Vn),qr&&qr(Vn)},onCompositionEnd:function(Vn){Zn(Vn),Zr&&Zr(Vn)},onPaste:zr})),Fr},dt=$e.forwardRef(Ye);dt.displayName="Input";var Ze=dt;function Nt(Mt){return Array.isArray(Mt)?Mt:Mt!==void 0?[Mt]:[]}var at=typeof window!="undefined"&&window.document&&window.document.documentElement,kt=at;function xt(Mt){return Mt!=null}function Ot(Mt){return!Mt&&Mt!==0}function Gt(Mt){return["string","number"].includes((0,Me.Z)(Mt))}function At(Mt){var ht=void 0;return Mt&&(Gt(Mt.title)?ht=Mt.title.toString():Gt(Mt.label)&&(ht=Mt.label.toString())),ht}function qe(Mt,ht){kt?$e.useLayoutEffect(Mt,ht):$e.useEffect(Mt,ht)}function Ve(Mt){var ht;return(ht=Mt.key)!==null&&ht!==void 0?ht:Mt.value}var _t=function(ht){ht.preventDefault(),ht.stopPropagation()},vn=function(ht){var nn=ht.id,gn=ht.prefixCls,_n=ht.values,qn=ht.open,Et=ht.searchValue,Pn=ht.autoClearSearchValue,Xn=ht.inputRef,Ci=ht.placeholder,tn=ht.disabled,sn=ht.mode,In=ht.showSearch,ji=ht.autoFocus,Ai=ht.autoComplete,Si=ht.activeDescendantId,ki=ht.tabIndex,Ni=ht.removeIcon,ir=ht.maxTagCount,zr=ht.maxTagTextLength,Vr=ht.maxTagPlaceholder,Zn=Vr===void 0?function(ra){return"+ ".concat(ra.length," ...")}:Vr,io=ht.tagRender,Yr=ht.onToggleOpen,Fr=ht.onRemove,wn=ht.onInputChange,ri=ht.onInputPaste,Ui=ht.onInputKeyDown,Pr=ht.onInputMouseDown,er=ht.onInputCompositionStart,Cr=ht.onInputCompositionEnd,qr=$e.useRef(null),Zr=(0,$e.useState)(0),Ir=(0,We.Z)(Zr,2),Ur=Ir[0],Vn=Ir[1],Xo=(0,$e.useState)(!1),Un=(0,We.Z)(Xo,2),Io=Un[0],Go=Un[1],tr="".concat(gn,"-selection"),ia=qn||sn==="multiple"&&Pn===!1||sn==="tags"?Et:"",zo=sn==="tags"||sn==="multiple"&&Pn===!1||In&&(qn||Io);qe(function(){Vn(qr.current.scrollWidth)},[ia]);function Nr(ra,va,Ma,Ps,Ha){return $e.createElement("span",{className:lt()("".concat(tr,"-item"),(0,He.Z)({},"".concat(tr,"-item-disabled"),Ma)),title:At(ra)},$e.createElement("span",{className:"".concat(tr,"-item-content")},va),Ps&&$e.createElement(se,{className:"".concat(tr,"-item-remove"),onMouseDown:_t,onClick:Ha,customizeIcon:Ni},"\xD7"))}function Br(ra,va,Ma,Ps,Ha){var Ms=function(wo){_t(wo),Yr(!qn)};return $e.createElement("span",{onMouseDown:Ms},io({label:va,value:ra,disabled:Ma,closable:Ps,onClose:Ha}))}function xo(ra){var va=ra.disabled,Ma=ra.label,Ps=ra.value,Ha=!tn&&!va,Ms=Ma;if(typeof zr=="number"&&(typeof Ma=="string"||typeof Ma=="number")){var bo=String(Ms);bo.length>zr&&(Ms="".concat(bo.slice(0,zr),"..."))}var wo=function(ha){ha&&ha.stopPropagation(),Fr(ra)};return typeof io=="function"?Br(Ps,Ms,va,Ha,wo):Nr(ra,Ms,va,Ha,wo)}function $o(ra){var va=typeof Zn=="function"?Zn(ra):Zn;return Nr({title:va},va,!1)}var $i=$e.createElement("div",{className:"".concat(tr,"-search"),style:{width:Ur},onFocus:function(){Go(!0)},onBlur:function(){Go(!1)}},$e.createElement(Ze,{ref:Xn,open:qn,prefixCls:gn,id:nn,inputElement:null,disabled:tn,autoFocus:ji,autoComplete:Ai,editable:zo,activeDescendantId:Si,value:ia,onKeyDown:Ui,onMouseDown:Pr,onChange:wn,onPaste:ri,onCompositionStart:er,onCompositionEnd:Cr,tabIndex:ki,attrs:(0,je.Z)(ht,!0)}),$e.createElement("span",{ref:qr,className:"".concat(tr,"-search-mirror"),"aria-hidden":!0},ia,"\xA0")),st=$e.createElement(Xe.Z,{prefixCls:"".concat(tr,"-overflow"),data:_n,renderItem:xo,renderRest:$o,suffix:$i,itemKey:Ve,maxCount:ir});return $e.createElement($e.Fragment,null,st,!_n.length&&!ia&&$e.createElement("span",{className:"".concat(tr,"-placeholder")},Ci))},yn=vn,jt=function(ht){var nn=ht.inputElement,gn=ht.prefixCls,_n=ht.id,qn=ht.inputRef,Et=ht.disabled,Pn=ht.autoFocus,Xn=ht.autoComplete,Ci=ht.activeDescendantId,tn=ht.mode,sn=ht.open,In=ht.values,ji=ht.placeholder,Ai=ht.tabIndex,Si=ht.showSearch,ki=ht.searchValue,Ni=ht.activeValue,ir=ht.maxLength,zr=ht.onInputKeyDown,Vr=ht.onInputMouseDown,Zn=ht.onInputChange,io=ht.onInputPaste,Yr=ht.onInputCompositionStart,Fr=ht.onInputCompositionEnd,wn=ht.title,ri=$e.useState(!1),Ui=(0,We.Z)(ri,2),Pr=Ui[0],er=Ui[1],Cr=tn==="combobox",qr=Cr||Si,Zr=In[0],Ir=ki||"";Cr&&Ni&&!Pr&&(Ir=Ni),$e.useEffect(function(){Cr&&er(!1)},[Cr,Ni]);var Ur=tn!=="combobox"&&!sn&&!Si?!1:!!Ir,Vn=wn===void 0?At(Zr):wn,Xo=function(){if(Zr)return null;var Io=Ur?{visibility:"hidden"}:void 0;return $e.createElement("span",{className:"".concat(gn,"-selection-placeholder"),style:Io},ji)};return $e.createElement($e.Fragment,null,$e.createElement("span",{className:"".concat(gn,"-selection-search")},$e.createElement(Ze,{ref:qn,prefixCls:gn,id:_n,open:sn,inputElement:nn,disabled:Et,autoFocus:Pn,autoComplete:Xn,editable:qr,activeDescendantId:Ci,value:Ir,onKeyDown:zr,onMouseDown:Vr,onChange:function(Io){er(!0),Zn(Io)},onPaste:io,onCompositionStart:Yr,onCompositionEnd:Fr,tabIndex:Ai,attrs:(0,je.Z)(ht,!0),maxLength:Cr?ir:void 0})),!Cr&&Zr?$e.createElement("span",{className:"".concat(gn,"-selection-item"),title:Vn,style:Ur?{visibility:"hidden"}:void 0},Zr.label):null,Xo())},en=jt;function ln(Mt){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(Mt)}var Wn=function(ht,nn){var gn=(0,$e.useRef)(null),_n=(0,$e.useRef)(!1),qn=ht.prefixCls,Et=ht.open,Pn=ht.mode,Xn=ht.showSearch,Ci=ht.tokenWithEnter,tn=ht.autoClearSearchValue,sn=ht.onSearch,In=ht.onSearchSubmit,ji=ht.onToggleOpen,Ai=ht.onInputKeyDown,Si=ht.domRef;$e.useImperativeHandle(nn,function(){return{focus:function(){gn.current.focus()},blur:function(){gn.current.blur()}}});var ki=Le(0),Ni=(0,We.Z)(ki,2),ir=Ni[0],zr=Ni[1],Vr=function(Ir){var Ur=Ir.which;(Ur===te.Z.UP||Ur===te.Z.DOWN)&&Ir.preventDefault(),Ai&&Ai(Ir),Ur===te.Z.ENTER&&Pn==="tags"&&!_n.current&&!Et&&(In==null||In(Ir.target.value)),ln(Ur)&&ji(!0)},Zn=function(){zr(!0)},io=(0,$e.useRef)(null),Yr=function(Ir){sn(Ir,!0,_n.current)!==!1&&ji(!0)},Fr=function(){_n.current=!0},wn=function(Ir){_n.current=!1,Pn!=="combobox"&&Yr(Ir.target.value)},ri=function(Ir){var Ur=Ir.target.value;if(Ci&&io.current&&/[\r\n]/.test(io.current)){var Vn=io.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ur=Ur.replace(Vn,io.current)}io.current=null,Yr(Ur)},Ui=function(Ir){var Ur=Ir.clipboardData,Vn=Ur.getData("text");io.current=Vn},Pr=function(Ir){var Ur=Ir.target;if(Ur!==gn.current){var Vn=document.body.style.msTouchAction!==void 0;Vn?setTimeout(function(){gn.current.focus()}):gn.current.focus()}},er=function(Ir){var Ur=ir();Ir.target!==gn.current&&!Ur&&Pn!=="combobox"&&Ir.preventDefault(),(Pn!=="combobox"&&(!Xn||!Ur)||!Et)&&(Et&&tn!==!1&&sn("",!0,!1),ji())},Cr={inputRef:gn,onInputKeyDown:Vr,onInputMouseDown:Zn,onInputChange:ri,onInputPaste:Ui,onInputCompositionStart:Fr,onInputCompositionEnd:wn},qr=Pn==="multiple"||Pn==="tags"?$e.createElement(yn,(0,le.Z)({},ht,Cr)):$e.createElement(en,(0,le.Z)({},ht,Cr));return $e.createElement("div",{ref:Si,className:"".concat(qn,"-selector"),onClick:Pr,onMouseDown:er},qr)},un=$e.forwardRef(Wn);un.displayName="Selector";var kn=un,wt=pe(35593),jn=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ci=function(ht){var nn=ht===!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"}}},Ge=function(ht,nn){var gn=ht.prefixCls,_n=ht.disabled,qn=ht.visible,Et=ht.children,Pn=ht.popupElement,Xn=ht.animation,Ci=ht.transitionName,tn=ht.dropdownStyle,sn=ht.dropdownClassName,In=ht.direction,ji=In===void 0?"ltr":In,Ai=ht.placement,Si=ht.builtinPlacements,ki=ht.dropdownMatchSelectWidth,Ni=ht.dropdownRender,ir=ht.dropdownAlign,zr=ht.getPopupContainer,Vr=ht.empty,Zn=ht.getTriggerDOMNode,io=ht.onPopupVisibleChange,Yr=ht.onPopupMouseEnter,Fr=(0,Ue.Z)(ht,jn),wn="".concat(gn,"-dropdown"),ri=Pn;Ni&&(ri=Ni(Pn));var Ui=$e.useMemo(function(){return Si||ci(ki)},[Si,ki]),Pr=Xn?"".concat(wn,"-").concat(Xn):Ci,er=typeof ki=="number",Cr=$e.useMemo(function(){return er?null:ki===!1?"minWidth":"width"},[ki,er]),qr=tn;er&&(qr=(0,ut.Z)((0,ut.Z)({},qr),{},{width:ki}));var Zr=$e.useRef(null);return $e.useImperativeHandle(nn,function(){return{getPopupElement:function(){return Zr.current}}}),$e.createElement(wt.Z,(0,le.Z)({},Fr,{showAction:io?["click"]:[],hideAction:io?["click"]:[],popupPlacement:Ai||(ji==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Ui,prefixCls:wn,popupTransitionName:Pr,popup:$e.createElement("div",{ref:Zr,onMouseEnter:Yr},ri),stretch:Cr,popupAlign:ir,popupVisible:qn,getPopupContainer:zr,popupClassName:lt()(sn,(0,He.Z)({},"".concat(wn,"-empty"),Vr)),popupStyle:qr,getTriggerDOMNode:Zn,onPopupVisibleChange:io}),Et)},be=$e.forwardRef(Ge);be.displayName="SelectTrigger";var Pe=be,Ne=pe(34589);function Ie(Mt,ht){var nn=Mt.key,gn;return"value"in Mt&&(gn=Mt.value),nn!=null?nn:gn!==void 0?gn:"rc-index-key-".concat(ht)}function xe(Mt,ht){var nn=Mt||{},gn=nn.label,_n=nn.value,qn=nn.options,Et=nn.groupLabel,Pn=gn||(ht?"children":"label");return{label:Pn,value:_n||"value",options:qn||"options",groupLabel:Et||Pn}}function ct(Mt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nn=ht.fieldNames,gn=ht.childrenAsData,_n=[],qn=xe(nn,!1),Et=qn.label,Pn=qn.value,Xn=qn.options,Ci=qn.groupLabel;function tn(sn,In){sn.forEach(function(ji){if(In||!(Xn in ji)){var Ai=ji[Pn];_n.push({key:Ie(ji,_n.length),groupOption:In,data:ji,label:ji[Et],value:Ai})}else{var Si=ji[Ci];Si===void 0&&gn&&(Si=ji.label),_n.push({key:Ie(ji,_n.length),group:!0,data:ji,label:Si}),tn(ji[Xn],!0)}})}return tn(Mt,!1),_n}function Lt(Mt){var ht=(0,ut.Z)({},Mt);return"props"in ht||Object.defineProperty(ht,"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`."),ht}}),ht}function et(Mt,ht){if(!ht||!ht.length)return null;var nn=!1;function gn(qn,Et){var Pn=(0,Ne.Z)(Et),Xn=Pn[0],Ci=Pn.slice(1);if(!Xn)return[qn];var tn=qn.split(Xn);return nn=nn||tn.length>1,tn.reduce(function(sn,In){return[].concat((0,Te.Z)(sn),(0,Te.Z)(gn(In,Ci)))},[]).filter(function(sn){return sn})}var _n=gn(Mt,ht);return nn?_n:null}var it=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Bt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function Dt(Mt){return Mt==="tags"||Mt==="multiple"}var ft=$e.forwardRef(function(Mt,ht){var nn,gn,_n=Mt.id,qn=Mt.prefixCls,Et=Mt.className,Pn=Mt.showSearch,Xn=Mt.tagRender,Ci=Mt.direction,tn=Mt.omitDomProps,sn=Mt.displayValues,In=Mt.onDisplayValuesChange,ji=Mt.emptyOptions,Ai=Mt.notFoundContent,Si=Ai===void 0?"Not Found":Ai,ki=Mt.onClear,Ni=Mt.mode,ir=Mt.disabled,zr=Mt.loading,Vr=Mt.getInputElement,Zn=Mt.getRawInputElement,io=Mt.open,Yr=Mt.defaultOpen,Fr=Mt.onDropdownVisibleChange,wn=Mt.activeValue,ri=Mt.onActiveValueChange,Ui=Mt.activeDescendantId,Pr=Mt.searchValue,er=Mt.autoClearSearchValue,Cr=Mt.onSearch,qr=Mt.onSearchSplit,Zr=Mt.tokenSeparators,Ir=Mt.allowClear,Ur=Mt.suffixIcon,Vn=Mt.clearIcon,Xo=Mt.OptionList,Un=Mt.animation,Io=Mt.transitionName,Go=Mt.dropdownStyle,tr=Mt.dropdownClassName,ia=Mt.dropdownMatchSelectWidth,zo=Mt.dropdownRender,Nr=Mt.dropdownAlign,Br=Mt.placement,xo=Mt.builtinPlacements,$o=Mt.getPopupContainer,$i=Mt.showAction,st=$i===void 0?[]:$i,ra=Mt.onFocus,va=Mt.onBlur,Ma=Mt.onKeyUp,Ps=Mt.onKeyDown,Ha=Mt.onMouseDown,Ms=(0,Ue.Z)(Mt,it),bo=Dt(Ni),wo=(Pn!==void 0?Pn:bo)||Ni==="combobox",Jr=(0,ut.Z)({},Ms);Bt.forEach(function(Fi){delete Jr[Fi]}),tn==null||tn.forEach(function(Fi){delete Jr[Fi]});var ha=$e.useState(!1),Ia=(0,We.Z)(ha,2),Eo=Ia[0],Gr=Ia[1];$e.useEffect(function(){Gr((0,Oe.Z)())},[]);var mi=$e.useRef(null),oo=$e.useRef(null),ao=$e.useRef(null),Ga=$e.useRef(null),Ca=$e.useRef(null),fa=Be(),Ka=(0,We.Z)(fa,3),Qa=Ka[0],Cs=Ka[1],ms=Ka[2];$e.useImperativeHandle(ht,function(){var Fi,eo;return{focus:(Fi=Ga.current)===null||Fi===void 0?void 0:Fi.focus,blur:(eo=Ga.current)===null||eo===void 0?void 0:eo.blur,scrollTo:function(ma){var ya;return(ya=Ca.current)===null||ya===void 0?void 0:ya.scrollTo(ma)}}});var Zs=$e.useMemo(function(){var Fi;if(Ni!=="combobox")return Pr;var eo=(Fi=sn[0])===null||Fi===void 0?void 0:Fi.value;return typeof eo=="string"||typeof eo=="number"?String(eo):""},[Pr,Ni,sn]),Bn=Ni==="combobox"&&typeof Vr=="function"&&Vr()||null,ys=typeof Zn=="function"&&Zn(),oa=(0,ee.x1)(oo,ys==null||(nn=ys.props)===null||nn===void 0?void 0:nn.ref),hl=$e.useState(!1),Ol=(0,We.Z)(hl,2),as=Ol[0],yu=Ol[1];(0,vt.Z)(function(){yu(!0)},[]);var eu=(0,Ct.Z)(!1,{defaultValue:Yr,value:io}),fs=(0,We.Z)(eu,2),Ba=fs[0],tu=fs[1],Ao=as?Ba:!1,Ea=!Si&&ji;(ir||Ea&&Ao&&Ni==="combobox")&&(Ao=!1);var ua=Ea?!1:Ao,hr=$e.useCallback(function(Fi){var eo=Fi!==void 0?Fi:!Ao;ir||(tu(eo),Ao!==eo&&(Fr==null||Fr(eo)))},[ir,Ao,tu,Fr]),Rs=$e.useMemo(function(){return(Zr||[]).some(function(Fi){return[`
`,`\r
`].includes(Fi)})},[Zr]),ss=function(eo,Vo,ma){var ya=!0,Fo=eo;ri==null||ri(null);var aa=ma?null:et(eo,Zr);return Ni!=="combobox"&&aa&&(Fo="",qr==null||qr(aa),hr(!1),ya=!1),Cr&&Zs!==Fo&&Cr(Fo,{source:Vo?"typing":"effect"}),ya},sl=function(eo){!eo||!eo.trim()||Cr(eo,{source:"submit"})};$e.useEffect(function(){!Ao&&!bo&&Ni!=="combobox"&&ss("",!1,!1)},[Ao]),$e.useEffect(function(){Ba&&ir&&tu(!1),ir&&Cs(!1)},[ir]);var jl=Le(),ou=(0,We.Z)(jl,2),Xi=ou[0],ws=ou[1],Us=function(eo){var Vo=Xi(),ma=eo.which;if(ma===te.Z.ENTER&&(Ni!=="combobox"&&eo.preventDefault(),Ao||hr(!0)),ws(!!Zs),ma===te.Z.BACKSPACE&&!Vo&&bo&&!Zs&&sn.length){for(var ya=(0,Te.Z)(sn),Fo=null,aa=ya.length-1;aa>=0;aa-=1){var Do=ya[aa];if(!Do.disabled){ya.splice(aa,1),Fo=Do;break}}Fo&&In(ya,{type:"remove",values:[Fo]})}for(var Or=arguments.length,Aa=new Array(Or>1?Or-1:0),Wa=1;Wa<Or;Wa++)Aa[Wa-1]=arguments[Wa];if(Ao&&Ca.current){var La;(La=Ca.current).onKeyDown.apply(La,[eo].concat(Aa))}Ps==null||Ps.apply(void 0,[eo].concat(Aa))},$l=function(eo){for(var Vo=arguments.length,ma=new Array(Vo>1?Vo-1:0),ya=1;ya<Vo;ya++)ma[ya-1]=arguments[ya];if(Ao&&Ca.current){var Fo;(Fo=Ca.current).onKeyUp.apply(Fo,[eo].concat(ma))}Ma==null||Ma.apply(void 0,[eo].concat(ma))},kl=function(eo){var Vo=sn.filter(function(ma){return ma!==eo});In(Vo,{type:"remove",values:[eo]})},Kl=$e.useRef(!1),Oo=function(){Cs(!0),ir||(ra&&!Kl.current&&ra.apply(void 0,arguments),st.includes("focus")&&hr(!0)),Kl.current=!0},ic=function(){Cs(!1,function(){Kl.current=!1,hr(!1)}),!ir&&(Zs&&(Ni==="tags"?Cr(Zs,{source:"submit"}):Ni==="multiple"&&Cr("",{source:"blur"})),va&&va.apply(void 0,arguments))},zl=[];$e.useEffect(function(){return function(){zl.forEach(function(Fi){return clearTimeout(Fi)}),zl.splice(0,zl.length)}},[]);var Cn=function(eo){var Vo,ma=eo.target,ya=(Vo=ao.current)===null||Vo===void 0?void 0:Vo.getPopupElement();if(ya&&ya.contains(ma)){var Fo=setTimeout(function(){var Aa=zl.indexOf(Fo);if(Aa!==-1&&zl.splice(Aa,1),ms(),!Eo&&!ya.contains(document.activeElement)){var Wa;(Wa=Ga.current)===null||Wa===void 0||Wa.focus()}});zl.push(Fo)}for(var aa=arguments.length,Do=new Array(aa>1?aa-1:0),Or=1;Or<aa;Or++)Do[Or-1]=arguments[Or];Ha==null||Ha.apply(void 0,[eo].concat(Do))},Ln=$e.useState({}),ai=(0,We.Z)(Ln,2),Ji=ai[1];function Gi(){Ji({})}var Ti;ys&&(Ti=function(eo){hr(eo)}),ze(function(){var Fi;return[mi.current,(Fi=ao.current)===null||Fi===void 0?void 0:Fi.getPopupElement()]},ua,hr,!!ys);var Ri=$e.useMemo(function(){return(0,ut.Z)((0,ut.Z)({},Mt),{},{notFoundContent:Si,open:Ao,triggerOpen:ua,id:_n,showSearch:wo,multiple:bo,toggleOpen:hr})},[Mt,Si,ua,Ao,_n,wo,bo,hr]),oi=!!Ur||zr,Mi;oi&&(Mi=$e.createElement(se,{className:lt()("".concat(qn,"-arrow"),(0,He.Z)({},"".concat(qn,"-arrow-loading"),zr)),customizeIcon:Ur,customizeIconProps:{loading:zr,searchValue:Zs,open:Ao,focused:Qa,showSearch:wo}}));var ur=function(){var eo;ki==null||ki(),(eo=Ga.current)===null||eo===void 0||eo.focus(),In([],{type:"clear",values:sn}),ss("",!1,!1)},Hr=he(qn,ur,sn,Ir,Vn,ir,Zs,Ni),ga=Hr.allowClear,Ko=Hr.clearIcon,Ya=$e.createElement(Xo,{ref:Ca}),Va=lt()(qn,Et,(gn={},(0,He.Z)(gn,"".concat(qn,"-focused"),Qa),(0,He.Z)(gn,"".concat(qn,"-multiple"),bo),(0,He.Z)(gn,"".concat(qn,"-single"),!bo),(0,He.Z)(gn,"".concat(qn,"-allow-clear"),Ir),(0,He.Z)(gn,"".concat(qn,"-show-arrow"),oi),(0,He.Z)(gn,"".concat(qn,"-disabled"),ir),(0,He.Z)(gn,"".concat(qn,"-loading"),zr),(0,He.Z)(gn,"".concat(qn,"-open"),Ao),(0,He.Z)(gn,"".concat(qn,"-customize-input"),Bn),(0,He.Z)(gn,"".concat(qn,"-show-search"),wo),gn)),No=$e.createElement(Pe,{ref:ao,disabled:ir,prefixCls:qn,visible:ua,popupElement:Ya,animation:Un,transitionName:Io,dropdownStyle:Go,dropdownClassName:tr,direction:Ci,dropdownMatchSelectWidth:ia,dropdownRender:zo,dropdownAlign:Nr,placement:Br,builtinPlacements:xo,getPopupContainer:$o,empty:ji,getTriggerDOMNode:function(){return oo.current},onPopupVisibleChange:Ti,onPopupMouseEnter:Gi},ys?$e.cloneElement(ys,{ref:oa}):$e.createElement(kn,(0,le.Z)({},Mt,{domRef:oo,prefixCls:qn,inputElement:Bn,ref:Ga,id:_n,showSearch:wo,autoClearSearchValue:er,mode:Ni,activeDescendantId:Ui,tagRender:Xn,values:sn,open:Ao,onToggleOpen:hr,activeValue:wn,searchValue:Zs,onSearch:ss,onSearchSubmit:sl,onRemove:kl,tokenWithEnter:Rs}))),Qr;return ys?Qr=No:Qr=$e.createElement("div",(0,le.Z)({className:Va},Jr,{ref:mi,onMouseDown:Cn,onKeyDown:Us,onKeyUp:$l,onFocus:Oo,onBlur:ic}),Qa&&!Ao&&$e.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(sn.map(function(Fi){var eo=Fi.label,Vo=Fi.value;return["number","string"].includes((0,Me.Z)(eo))?eo:Vo}).join(", "))),No,Mi,ga&&Ko),$e.createElement(ve.Provider,{value:Ri},Qr)}),$t=ft,xn=function(Mt,ht){var nn=$e.useRef({values:new Map,options:new Map}),gn=$e.useMemo(function(){var qn=nn.current,Et=qn.values,Pn=qn.options,Xn=Mt.map(function(sn){if(sn.label===void 0){var In;return(0,ut.Z)((0,ut.Z)({},sn),{},{label:(In=Et.get(sn.value))===null||In===void 0?void 0:In.label})}return sn}),Ci=new Map,tn=new Map;return Xn.forEach(function(sn){Ci.set(sn.value,sn),tn.set(sn.value,ht.get(sn.value)||Pn.get(sn.value))}),nn.current.values=Ci,nn.current.options=tn,Xn},[Mt,ht]),_n=$e.useCallback(function(qn){return ht.get(qn)||nn.current.options.get(qn)},[ht]);return[gn,_n]};function an(Mt,ht){return Nt(Mt).join("").toUpperCase().includes(ht)}var Jt=function(Mt,ht,nn,gn,_n){return $e.useMemo(function(){if(!nn||gn===!1)return Mt;var qn=ht.options,Et=ht.label,Pn=ht.value,Xn=[],Ci=typeof gn=="function",tn=nn.toUpperCase(),sn=Ci?gn:function(ji,Ai){return _n?an(Ai[_n],tn):Ai[qn]?an(Ai[Et!=="children"?Et:"label"],tn):an(Ai[Pn],tn)},In=Ci?function(ji){return Lt(ji)}:function(ji){return ji};return Mt.forEach(function(ji){if(ji[qn]){var Ai=sn(nn,In(ji));if(Ai)Xn.push(ji);else{var Si=ji[qn].filter(function(ki){return sn(nn,In(ki))});Si.length&&Xn.push((0,ut.Z)((0,ut.Z)({},ji),{},(0,He.Z)({},qn,Si)))}return}sn(nn,In(ji))&&Xn.push(ji)}),Xn},[Mt,gn,_n,nn,ht])},Tn=pe(17115),Kn=pe(11592),dn=["children","value"],Qn=["children"];function pi(Mt){var ht=Mt,nn=ht.key,gn=ht.props,_n=gn.children,qn=gn.value,Et=(0,Ue.Z)(gn,dn);return(0,ut.Z)({key:nn,value:qn!==void 0?qn:nn,children:_n},Et)}function zn(Mt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Kn.Z)(Mt).map(function(nn,gn){if(!$e.isValidElement(nn)||!nn.type)return null;var _n=nn,qn=_n.type.isSelectOptGroup,Et=_n.key,Pn=_n.props,Xn=Pn.children,Ci=(0,Ue.Z)(Pn,Qn);return ht||!qn?pi(nn):(0,ut.Z)((0,ut.Z)({key:"__RC_SELECT_GRP__".concat(Et===null?gn:Et,"__"),label:Et},Ci),{},{options:zn(Xn)})}).filter(function(nn){return nn})}function Nn(Mt,ht,nn,gn,_n){return $e.useMemo(function(){var qn=Mt,Et=!Mt;Et&&(qn=zn(ht));var Pn=new Map,Xn=new Map,Ci=function(In,ji,Ai){Ai&&typeof Ai=="string"&&In.set(ji[Ai],ji)};function tn(sn){for(var In=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ji=0;ji<sn.length;ji+=1){var Ai=sn[ji];!Ai[nn.options]||In?(Pn.set(Ai[nn.value],Ai),Ci(Xn,Ai,nn.label),Ci(Xn,Ai,gn),Ci(Xn,Ai,_n)):tn(Ai[nn.options],!0)}}return tn(qn),{options:qn,valueOptions:Pn,labelOptions:Xn}},[Mt,ht,nn,gn,_n])}function yi(Mt){var ht=$e.useRef();ht.current=Mt;var nn=$e.useCallback(function(){return ht.current.apply(ht,arguments)},[]);return nn}var Zi=function(){return null};Zi.isSelectOptGroup=!0;var Hi=Zi,cr=function(){return null};cr.isSelectOption=!0;var br=cr,gi=pe(80547),di=pe(2738),wi=pe(4409),Qi=$e.createContext(null),Li=Qi;function ro(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var fr=["disabled","title","children","style","className"];function Ae(Mt){return typeof Mt=="string"||typeof Mt=="number"}var Ei=function(ht,nn){var gn=Ee(),_n=gn.prefixCls,qn=gn.id,Et=gn.open,Pn=gn.multiple,Xn=gn.mode,Ci=gn.searchValue,tn=gn.toggleOpen,sn=gn.notFoundContent,In=gn.onPopupScroll,ji=$e.useContext(Li),Ai=ji.flattenOptions,Si=ji.onActiveValue,ki=ji.defaultActiveFirstOption,Ni=ji.onSelect,ir=ji.menuItemSelectedIcon,zr=ji.rawValues,Vr=ji.fieldNames,Zn=ji.virtual,io=ji.direction,Yr=ji.listHeight,Fr=ji.listItemHeight,wn="".concat(_n,"-item"),ri=(0,gi.Z)(function(){return Ai},[Et,Ai],function(Nr,Br){return Br[0]&&Nr[1]!==Br[1]}),Ui=$e.useRef(null),Pr=function(Br){Br.preventDefault()},er=function(Br){Ui.current&&Ui.current.scrollTo(typeof Br=="number"?{index:Br}:Br)},Cr=function(Br){for(var xo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,$o=ri.length,$i=0;$i<$o;$i+=1){var st=(Br+$i*xo+$o)%$o,ra=ri[st],va=ra.group,Ma=ra.data;if(!va&&!Ma.disabled)return st}return-1},qr=$e.useState(function(){return Cr(0)}),Zr=(0,We.Z)(qr,2),Ir=Zr[0],Ur=Zr[1],Vn=function(Br){var xo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ur(Br);var $o={source:xo?"keyboard":"mouse"},$i=ri[Br];if(!$i){Si(null,-1,$o);return}Si($i.value,Br,$o)};(0,$e.useEffect)(function(){Vn(ki!==!1?Cr(0):-1)},[ri.length,Ci]);var Xo=$e.useCallback(function(Nr){return zr.has(Nr)&&Xn!=="combobox"},[Xn,(0,Te.Z)(zr).toString(),zr.size]);(0,$e.useEffect)(function(){var Nr=setTimeout(function(){if(!Pn&&Et&&zr.size===1){var xo=Array.from(zr)[0],$o=ri.findIndex(function($i){var st=$i.data;return st.value===xo});$o!==-1&&(Vn($o),er($o))}});if(Et){var Br;(Br=Ui.current)===null||Br===void 0||Br.scrollTo(void 0)}return function(){return clearTimeout(Nr)}},[Et,Ci,Ai.length]);var Un=function(Br){Br!==void 0&&Ni(Br,{selected:!zr.has(Br)}),Pn||tn(!1)};if($e.useImperativeHandle(nn,function(){return{onKeyDown:function(Br){var xo=Br.which,$o=Br.ctrlKey;switch(xo){case te.Z.N:case te.Z.P:case te.Z.UP:case te.Z.DOWN:{var $i=0;if(xo===te.Z.UP?$i=-1:xo===te.Z.DOWN?$i=1:ro()&&$o&&(xo===te.Z.N?$i=1:xo===te.Z.P&&($i=-1)),$i!==0){var st=Cr(Ir+$i,$i);er(st),Vn(st,!0)}break}case te.Z.ENTER:{var ra=ri[Ir];ra&&!ra.data.disabled?Un(ra.value):Un(void 0),Et&&Br.preventDefault();break}case te.Z.ESC:tn(!1),Et&&Br.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Br){er(Br)}}}),ri.length===0)return $e.createElement("div",{role:"listbox",id:"".concat(qn,"_list"),className:"".concat(wn,"-empty"),onMouseDown:Pr},sn);var Io=Object.keys(Vr).map(function(Nr){return Vr[Nr]}),Go=function(Br){return Br.label};function tr(Nr,Br){var xo=Nr.group;return{role:xo?"presentation":"option",id:"".concat(qn,"_list_").concat(Br)}}var ia=function(Br){var xo=ri[Br];if(!xo)return null;var $o=xo.data||{},$i=$o.value,st=xo.group,ra=(0,je.Z)($o,!0),va=Go(xo);return xo?$e.createElement("div",(0,le.Z)({"aria-label":typeof va=="string"&&!st?va:null},ra,{key:Br},tr(xo,Br),{"aria-selected":Xo($i)}),$i):null},zo={role:"listbox",id:"".concat(qn,"_list")};return $e.createElement($e.Fragment,null,Zn&&$e.createElement("div",(0,le.Z)({},zo,{style:{height:0,width:0,overflow:"hidden"}}),ia(Ir-1),ia(Ir),ia(Ir+1)),$e.createElement(wi.Z,{itemKey:"key",ref:Ui,data:ri,height:Yr,itemHeight:Fr,fullHeight:!1,onMouseDown:Pr,onScroll:In,virtual:Zn,direction:io,innerProps:Zn?null:zo},function(Nr,Br){var xo,$o=Nr.group,$i=Nr.groupOption,st=Nr.data,ra=Nr.label,va=Nr.value,Ma=st.key;if($o){var Ps,Ha=(Ps=st.title)!==null&&Ps!==void 0?Ps:Ae(ra)?ra.toString():void 0;return $e.createElement("div",{className:lt()(wn,"".concat(wn,"-group")),title:Ha},ra!==void 0?ra:Ma)}var Ms=st.disabled,bo=st.title,wo=st.children,Jr=st.style,ha=st.className,Ia=(0,Ue.Z)(st,fr),Eo=(0,di.Z)(Ia,Io),Gr=Xo(va),mi="".concat(wn,"-option"),oo=lt()(wn,mi,ha,(xo={},(0,He.Z)(xo,"".concat(mi,"-grouped"),$i),(0,He.Z)(xo,"".concat(mi,"-active"),Ir===Br&&!Ms),(0,He.Z)(xo,"".concat(mi,"-disabled"),Ms),(0,He.Z)(xo,"".concat(mi,"-selected"),Gr),xo)),ao=Go(Nr),Ga=!ir||typeof ir=="function"||Gr,Ca=typeof ao=="number"?ao:ao||va,fa=Ae(Ca)?Ca.toString():void 0;return bo!==void 0&&(fa=bo),$e.createElement("div",(0,le.Z)({},(0,je.Z)(Eo),Zn?{}:tr(Nr,Br),{"aria-selected":Gr,className:oo,title:fa,onMouseMove:function(){Ir===Br||Ms||Vn(Br)},onClick:function(){Ms||Un(va)},style:Jr}),$e.createElement("div",{className:"".concat(mi,"-content")},Ca),$e.isValidElement(ir)||Gr,Ga&&$e.createElement(se,{className:"".concat(wn,"-option-state"),customizeIcon:ir,customizeIconProps:{isSelected:Gr}},Gr?"\u2713":null))}))},Sr=$e.forwardRef(Ei);Sr.displayName="OptionList";var Fn=Sr;function xi(Mt){var ht=Mt.mode,nn=Mt.options,gn=Mt.children,_n=Mt.backfill,qn=Mt.allowClear,Et=Mt.placeholder,Pn=Mt.getInputElement,Xn=Mt.showSearch,Ci=Mt.onSearch,tn=Mt.defaultOpen,sn=Mt.autoFocus,In=Mt.labelInValue,ji=Mt.value,Ai=Mt.inputValue,Si=Mt.optionLabelProp,ki=isMultiple(ht),Ni=Xn!==void 0?Xn:ki||ht==="combobox",ir=nn||convertChildrenToData(gn);if(warning(ht!=="tags"||ir.every(function(io){return!io.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ht==="tags"||ht==="combobox"){var zr=ir.some(function(io){return io.options?io.options.some(function(Yr){return typeof("value"in Yr?Yr.value:Yr.key)=="number"}):typeof("value"in io?io.value:io.key)=="number"});warning(!zr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(ht!=="combobox"||!Si,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(ht==="combobox"||!_n,"`backfill` only works with `combobox` mode."),warning(ht==="combobox"||!Pn,"`getInputElement` only work with `combobox` mode."),noteOnce(ht!=="combobox"||!Pn||!qn||!Et,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ci&&!Ni&&ht!=="combobox"&&ht!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!tn||sn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),ji!=null){var Vr=toArray(ji);warning(!In||Vr.every(function(io){return _typeof(io)==="object"&&("key"in io||"value"in io)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ki||Array.isArray(ji),"`value` should be array when `mode` is `multiple` or `tags`")}if(gn){var Zn=null;toNodeArray(gn).some(function(io){if(!React.isValidElement(io)||!io.type)return!1;var Yr=io,Fr=Yr.type;if(Fr.isSelectOption)return!1;if(Fr.isSelectOptGroup){var wn=toNodeArray(io.props.children).every(function(ri){return!React.isValidElement(ri)||!io.type||ri.type.isSelectOption?!0:(Zn=ri.type,!1)});return!wn}return Zn=Fr,!0}),Zn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Zn.displayName||Zn.name||Zn,"`.")),warning(Ai===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function zi(Mt,ht){if(Mt){var nn=function gn(_n){for(var qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Et=0;Et<_n.length;Et++){var Pn=_n[Et];if(Pn[ht==null?void 0:ht.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!qn&&Array.isArray(Pn[ht==null?void 0:ht.options])&&gn(Pn[ht==null?void 0:ht.options],!0))break}};nn(Mt)}}var qi=null,Gn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],ti=["inputValue"];function Zt(Mt){return!Mt||(0,Me.Z)(Mt)!=="object"}var Wt=$e.forwardRef(function(Mt,ht){var nn=Mt.id,gn=Mt.mode,_n=Mt.prefixCls,qn=_n===void 0?"rc-select":_n,Et=Mt.backfill,Pn=Mt.fieldNames,Xn=Mt.inputValue,Ci=Mt.searchValue,tn=Mt.onSearch,sn=Mt.autoClearSearchValue,In=sn===void 0?!0:sn,ji=Mt.onSelect,Ai=Mt.onDeselect,Si=Mt.dropdownMatchSelectWidth,ki=Si===void 0?!0:Si,Ni=Mt.filterOption,ir=Mt.filterSort,zr=Mt.optionFilterProp,Vr=Mt.optionLabelProp,Zn=Mt.options,io=Mt.children,Yr=Mt.defaultActiveFirstOption,Fr=Mt.menuItemSelectedIcon,wn=Mt.virtual,ri=Mt.direction,Ui=Mt.listHeight,Pr=Ui===void 0?200:Ui,er=Mt.listItemHeight,Cr=er===void 0?20:er,qr=Mt.value,Zr=Mt.defaultValue,Ir=Mt.labelInValue,Ur=Mt.onChange,Vn=(0,Ue.Z)(Mt,Gn),Xo=(0,Tn.ZP)(nn),Un=Dt(gn),Io=!!(!Zn&&io),Go=$e.useMemo(function(){return Ni===void 0&&gn==="combobox"?!1:Ni},[Ni,gn]),tr=$e.useMemo(function(){return xe(Pn,Io)},[JSON.stringify(Pn),Io]),ia=(0,Ct.Z)("",{value:Ci!==void 0?Ci:Xn,postState:function(Ea){return Ea||""}}),zo=(0,We.Z)(ia,2),Nr=zo[0],Br=zo[1],xo=Nn(Zn,io,tr,zr,Vr),$o=xo.valueOptions,$i=xo.labelOptions,st=xo.options,ra=$e.useCallback(function(Ao){var Ea=Nt(Ao);return Ea.map(function(ua){var hr,Rs,ss,sl,jl;if(Zt(ua))hr=ua;else{var ou;ss=ua.key,Rs=ua.label,hr=(ou=ua.value)!==null&&ou!==void 0?ou:ss}var Xi=$o.get(hr);if(Xi){var ws;if(Rs===void 0&&(Rs=Xi==null?void 0:Xi[Vr||tr.label]),ss===void 0&&(ss=(ws=Xi==null?void 0:Xi.key)!==null&&ws!==void 0?ws:hr),sl=Xi==null?void 0:Xi.disabled,jl=Xi==null?void 0:Xi.title,0)var Us}return{label:Rs,value:hr,key:ss,disabled:sl,title:jl}})},[tr,Vr,$o]),va=(0,Ct.Z)(Zr,{value:qr}),Ma=(0,We.Z)(va,2),Ps=Ma[0],Ha=Ma[1],Ms=$e.useMemo(function(){var Ao,Ea=ra(Ps);return gn==="combobox"&&Ot((Ao=Ea[0])===null||Ao===void 0?void 0:Ao.value)?[]:Ea},[Ps,ra,gn]),bo=xn(Ms,$o),wo=(0,We.Z)(bo,2),Jr=wo[0],ha=wo[1],Ia=$e.useMemo(function(){if(!gn&&Jr.length===1){var Ao=Jr[0];if(Ao.value===null&&(Ao.label===null||Ao.label===void 0))return[]}return Jr.map(function(Ea){var ua;return(0,ut.Z)((0,ut.Z)({},Ea),{},{label:(ua=Ea.label)!==null&&ua!==void 0?ua:Ea.value})})},[gn,Jr]),Eo=$e.useMemo(function(){return new Set(Jr.map(function(Ao){return Ao.value}))},[Jr]);$e.useEffect(function(){if(gn==="combobox"){var Ao,Ea=(Ao=Jr[0])===null||Ao===void 0?void 0:Ao.value;Br(xt(Ea)?String(Ea):"")}},[Jr]);var Gr=yi(function(Ao,Ea){var ua,hr=Ea!=null?Ea:Ao;return ua={},(0,He.Z)(ua,tr.value,Ao),(0,He.Z)(ua,tr.label,hr),ua}),mi=$e.useMemo(function(){if(gn!=="tags")return st;var Ao=(0,Te.Z)(st),Ea=function(hr){return $o.has(hr)};return(0,Te.Z)(Jr).sort(function(ua,hr){return ua.value<hr.value?-1:1}).forEach(function(ua){var hr=ua.value;Ea(hr)||Ao.push(Gr(hr,ua.label))}),Ao},[Gr,st,$o,Jr,gn]),oo=Jt(mi,tr,Nr,Go,zr),ao=$e.useMemo(function(){return gn!=="tags"||!Nr||oo.some(function(Ao){return Ao[zr||"value"]===Nr})||oo.some(function(Ao){return Ao[tr.value]===Nr})?oo:[Gr(Nr)].concat((0,Te.Z)(oo))},[Gr,zr,gn,oo,Nr,tr]),Ga=$e.useMemo(function(){return ir?(0,Te.Z)(ao).sort(function(Ao,Ea){return ir(Ao,Ea)}):ao},[ao,ir]),Ca=$e.useMemo(function(){return ct(Ga,{fieldNames:tr,childrenAsData:Io})},[Ga,tr,Io]),fa=function(Ea){var ua=ra(Ea);if(Ha(ua),Ur&&(ua.length!==Jr.length||ua.some(function(ss,sl){var jl;return((jl=Jr[sl])===null||jl===void 0?void 0:jl.value)!==(ss==null?void 0:ss.value)}))){var hr=Ir?ua:ua.map(function(ss){return ss.value}),Rs=ua.map(function(ss){return Lt(ha(ss.value))});Ur(Un?hr:hr[0],Un?Rs:Rs[0])}},Ka=$e.useState(null),Qa=(0,We.Z)(Ka,2),Cs=Qa[0],ms=Qa[1],Zs=$e.useState(0),Bn=(0,We.Z)(Zs,2),ys=Bn[0],oa=Bn[1],hl=Yr!==void 0?Yr:gn!=="combobox",Ol=$e.useCallback(function(Ao,Ea){var ua=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},hr=ua.source,Rs=hr===void 0?"keyboard":hr;oa(Ea),Et&&gn==="combobox"&&Ao!==null&&Rs==="keyboard"&&ms(String(Ao))},[Et,gn]),as=function(Ea,ua,hr){var Rs=function(){var Kl,Oo=ha(Ea);return[Ir?{label:Oo==null?void 0:Oo[tr.label],value:Ea,key:(Kl=Oo==null?void 0:Oo.key)!==null&&Kl!==void 0?Kl:Ea}:Ea,Lt(Oo)]};if(ua&&ji){var ss=Rs(),sl=(0,We.Z)(ss,2),jl=sl[0],ou=sl[1];ji(jl,ou)}else if(!ua&&Ai&&hr!=="clear"){var Xi=Rs(),ws=(0,We.Z)(Xi,2),Us=ws[0],$l=ws[1];Ai(Us,$l)}},yu=yi(function(Ao,Ea){var ua,hr=Un?Ea.selected:!0;hr?ua=Un?[].concat((0,Te.Z)(Jr),[Ao]):[Ao]:ua=Jr.filter(function(Rs){return Rs.value!==Ao}),fa(ua),as(Ao,hr),gn==="combobox"?ms(""):(!Dt||In)&&(Br(""),ms(""))}),eu=function(Ea,ua){fa(Ea);var hr=ua.type,Rs=ua.values;(hr==="remove"||hr==="clear")&&Rs.forEach(function(ss){as(ss.value,!1,hr)})},fs=function(Ea,ua){if(Br(Ea),ms(null),ua.source==="submit"){var hr=(Ea||"").trim();if(hr){var Rs=Array.from(new Set([].concat((0,Te.Z)(Eo),[hr])));fa(Rs),as(hr,!0),Br("")}return}ua.source!=="blur"&&(gn==="combobox"&&fa(Ea),tn==null||tn(Ea))},Ba=function(Ea){var ua=Ea;gn!=="tags"&&(ua=Ea.map(function(Rs){var ss=$i.get(Rs);return ss==null?void 0:ss.value}).filter(function(Rs){return Rs!==void 0}));var hr=Array.from(new Set([].concat((0,Te.Z)(Eo),(0,Te.Z)(ua))));fa(hr),hr.forEach(function(Rs){as(Rs,!0)})},tu=$e.useMemo(function(){var Ao=wn!==!1&&ki!==!1;return(0,ut.Z)((0,ut.Z)({},xo),{},{flattenOptions:Ca,onActiveValue:Ol,defaultActiveFirstOption:hl,onSelect:yu,menuItemSelectedIcon:Fr,rawValues:Eo,fieldNames:tr,virtual:Ao,direction:ri,listHeight:Pr,listItemHeight:Cr,childrenAsData:Io})},[xo,Ca,Ol,hl,yu,Fr,Eo,tr,wn,ki,Pr,Cr,Io]);return $e.createElement(Li.Provider,{value:tu},$e.createElement($t,(0,le.Z)({},Vn,{id:Xo,prefixCls:qn,ref:ht,omitDomProps:ti,mode:gn,displayValues:Ia,onDisplayValuesChange:eu,direction:ri,searchValue:Nr,onSearch:fs,autoClearSearchValue:In,onSearchSplit:Ba,dropdownMatchSelectWidth:ki,OptionList:Fn,emptyOptions:!Ca.length,activeValue:Cs,activeDescendantId:"".concat(Xo,"_list_").concat(ys)})))}),Qe=Wt;Qe.Option=br,Qe.OptGroup=Hi;var on=Qe,cn=on},9296:function(On,mn,pe){"use strict";pe.r(mn),pe.d(mn,{ResizableTextArea:function(){return dt},default:function(){return Ot}});var le=pe(92413),Te=pe(33708),He=pe(400),ut=pe(39559),We=pe(33606),Ue=pe(37061),Me=pe(26407),Ct=pe(92310),Pt=pe.n(Ct),$e=pe(93681),Ft=pe(5643),lt=pe(18929),vt=pe(59301),Oe=pe(29301),te=pe(34280),ee=pe(16089),de=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,se=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],he={},ve;function Ee(Gt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=Gt.getAttribute("id")||Gt.getAttribute("data-reactid")||Gt.getAttribute("name");if(At&&he[qe])return he[qe];var Ve=window.getComputedStyle(Gt),_t=Ve.getPropertyValue("box-sizing")||Ve.getPropertyValue("-moz-box-sizing")||Ve.getPropertyValue("-webkit-box-sizing"),vn=parseFloat(Ve.getPropertyValue("padding-bottom"))+parseFloat(Ve.getPropertyValue("padding-top")),yn=parseFloat(Ve.getPropertyValue("border-bottom-width"))+parseFloat(Ve.getPropertyValue("border-top-width")),jt=se.map(function(ln){return"".concat(ln,":").concat(Ve.getPropertyValue(ln))}).join(";"),en={sizingStyle:jt,paddingSize:vn,borderSize:yn,boxSizing:_t};return At&&qe&&(he[qe]=en),en}function Be(Gt){var At=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ve=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)),Gt.getAttribute("wrap")?ve.setAttribute("wrap",Gt.getAttribute("wrap")):ve.removeAttribute("wrap");var _t=Ee(Gt,At),vn=_t.paddingSize,yn=_t.borderSize,jt=_t.boxSizing,en=_t.sizingStyle;ve.setAttribute("style","".concat(en,";").concat(de)),ve.value=Gt.value||Gt.placeholder||"";var ln=void 0,Wn=void 0,un,kn=ve.scrollHeight;if(jt==="border-box"?kn+=yn:jt==="content-box"&&(kn-=vn),qe!==null||Ve!==null){ve.value=" ";var wt=ve.scrollHeight-vn;qe!==null&&(ln=wt*qe,jt==="border-box"&&(ln=ln+vn+yn),kn=Math.max(ln,kn)),Ve!==null&&(Wn=wt*Ve,jt==="border-box"&&(Wn=Wn+vn+yn),un=kn>Wn?"":"hidden",kn=Math.min(Wn,kn))}var jn={height:kn,overflowY:un,resize:"none"};return ln&&(jn.minHeight=ln),Wn&&(jn.maxHeight=Wn),jn}var Le=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ze=0,je=1,Xe=2,Ye=vt.forwardRef(function(Gt,At){var qe=Gt,Ve=qe.prefixCls,_t=qe.onPressEnter,vn=qe.defaultValue,yn=qe.value,jt=qe.autoSize,en=qe.onResize,ln=qe.className,Wn=qe.style,un=qe.disabled,kn=qe.onChange,wt=qe.onInternalAutoSize,jn=(0,Ue.Z)(qe,Le),ci=(0,lt.Z)(vn,{value:yn,postState:function(Hi){return Hi!=null?Hi:""}}),Ge=(0,We.Z)(ci,2),be=Ge[0],Pe=Ge[1],Ne=function(Hi){Pe(Hi.target.value),kn==null||kn(Hi)},Ie=vt.useRef();vt.useImperativeHandle(At,function(){return{textArea:Ie.current}});var xe=vt.useMemo(function(){return jt&&(0,ut.Z)(jt)==="object"?[jt.minRows,jt.maxRows]:[]},[jt]),ct=(0,We.Z)(xe,2),Lt=ct[0],et=ct[1],it=!!jt,Bt=function(){try{if(document.activeElement===Ie.current){var Hi=Ie.current,cr=Hi.selectionStart,br=Hi.selectionEnd,gi=Hi.scrollTop;Ie.current.setSelectionRange(cr,br),Ie.current.scrollTop=gi}}catch(di){}},Dt=vt.useState(Xe),ft=(0,We.Z)(Dt,2),$t=ft[0],xn=ft[1],an=vt.useState(),Jt=(0,We.Z)(an,2),Tn=Jt[0],Kn=Jt[1],dn=function(){xn(ze)};(0,te.Z)(function(){it&&dn()},[yn,Lt,et,it]),(0,te.Z)(function(){if($t===ze)xn(je);else if($t===je){var Zi=Be(Ie.current,!1,Lt,et);xn(Xe),Kn(Zi)}else Bt()},[$t]);var Qn=vt.useRef(),pi=function(){ee.Z.cancel(Qn.current)},zn=function(Hi){$t===Xe&&(en==null||en(Hi),jt&&(pi(),Qn.current=(0,ee.Z)(function(){dn()})))};vt.useEffect(function(){return pi},[]);var Nn=it?Tn:null,yi=(0,Te.Z)((0,Te.Z)({},Wn),Nn);return($t===ze||$t===je)&&(yi.overflowY="hidden",yi.overflowX="hidden"),vt.createElement(Oe.Z,{onResize:zn,disabled:!(jt||en)},vt.createElement("textarea",(0,le.Z)({},jn,{ref:Ie,style:yi,className:Pt()(Ve,ln,(0,He.Z)({},"".concat(Ve,"-disabled"),un)),disabled:un,value:be,onChange:Ne})))}),dt=Ye,Ze=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Nt(Gt,At){return(0,Me.Z)(Gt||"").slice(0,At).join("")}function at(Gt,At,qe,Ve){var _t=qe;return Gt?_t=Nt(qe,Ve):(0,Me.Z)(At||"").length<qe.length&&(0,Me.Z)(qe||"").length>Ve&&(_t=At),_t}var kt=vt.forwardRef(function(Gt,At){var qe,Ve=Gt.defaultValue,_t=Gt.value,vn=Gt.onFocus,yn=Gt.onBlur,jt=Gt.onChange,en=Gt.allowClear,ln=Gt.maxLength,Wn=Gt.onCompositionStart,un=Gt.onCompositionEnd,kn=Gt.suffix,wt=Gt.prefixCls,jn=wt===void 0?"rc-textarea":wt,ci=Gt.classes,Ge=Gt.showCount,be=Gt.className,Pe=Gt.style,Ne=Gt.disabled,Ie=Gt.hidden,xe=Gt.classNames,ct=Gt.styles,Lt=Gt.onResize,et=(0,Ue.Z)(Gt,Ze),it=(0,lt.Z)(Ve,{value:_t,defaultValue:Ve}),Bt=(0,We.Z)(it,2),Dt=Bt[0],ft=Bt[1],$t=(0,vt.useRef)(null),xn=vt.useState(!1),an=(0,We.Z)(xn,2),Jt=an[0],Tn=an[1],Kn=vt.useState(!1),dn=(0,We.Z)(Kn,2),Qn=dn[0],pi=dn[1],zn=vt.useRef(),Nn=vt.useRef(0),yi=vt.useState(null),Zi=(0,We.Z)(yi,2),Hi=Zi[0],cr=Zi[1],br=function(){var Zt;(Zt=$t.current)===null||Zt===void 0||Zt.textArea.focus()};(0,vt.useImperativeHandle)(At,function(){return{resizableTextArea:$t.current,focus:br,blur:function(){var Zt;(Zt=$t.current)===null||Zt===void 0||Zt.textArea.blur()}}}),(0,vt.useEffect)(function(){Tn(function(ti){return!Ne&&ti})},[Ne]);var gi=Number(ln)>0,di=function(Zt){pi(!0),zn.current=Dt,Nn.current=Zt.currentTarget.selectionStart,Wn==null||Wn(Zt)},wi=function(Zt){pi(!1);var Wt=Zt.currentTarget.value;if(gi){var Qe,on=Nn.current>=ln+1||Nn.current===((Qe=zn.current)===null||Qe===void 0?void 0:Qe.length);Wt=at(on,zn.current,Wt,ln)}Wt!==Dt&&(ft(Wt),(0,Ft.rJ)(Zt.currentTarget,Zt,jt,Wt)),un==null||un(Zt)},Qi=function(Zt){var Wt=Zt.target.value;if(!Qn&&gi){var Qe=Zt.target.selectionStart>=ln+1||Zt.target.selectionStart===Wt.length||!Zt.target.selectionStart;Wt=at(Qe,Dt,Wt,ln)}ft(Wt),(0,Ft.rJ)(Zt.currentTarget,Zt,jt,Wt)},Li=function(Zt){var Wt=et.onPressEnter,Qe=et.onKeyDown;Zt.key==="Enter"&&Wt&&Wt(Zt),Qe==null||Qe(Zt)},ro=function(Zt){Tn(!0),vn==null||vn(Zt)},fr=function(Zt){Tn(!1),yn==null||yn(Zt)},Ae=function(Zt){var Wt;ft(""),br(),(0,Ft.rJ)((Wt=$t.current)===null||Wt===void 0?void 0:Wt.textArea,Zt,jt)},Ei=(0,Ft.D7)(Dt);!Qn&&gi&&_t==null&&(Ei=Nt(Ei,ln));var Sr=kn,Fn;if(Ge){var xi=(0,Me.Z)(Ei).length;(0,ut.Z)(Ge)==="object"?Fn=Ge.formatter({value:Ei,count:xi,maxLength:ln}):Fn="".concat(xi).concat(gi?" / ".concat(ln):""),Sr=vt.createElement(vt.Fragment,null,Sr,vt.createElement("span",{className:Pt()("".concat(jn,"-data-count"),xe==null?void 0:xe.count),style:ct==null?void 0:ct.count},Fn))}var zi=function(Zt){var Wt;Lt==null||Lt(Zt),(Wt=$t.current)!==null&&Wt!==void 0&&Wt.textArea.style.height&&cr(!0)},qi=!et.autoSize&&!Ge&&!en,Gn=vt.createElement($e.BaseInput,{value:Ei,allowClear:en,handleReset:Ae,suffix:Sr,prefixCls:jn,classes:{affixWrapper:Pt()(ci==null?void 0:ci.affixWrapper,(qe={},(0,He.Z)(qe,"".concat(jn,"-show-count"),Ge),(0,He.Z)(qe,"".concat(jn,"-textarea-allow-clear"),en),qe))},disabled:Ne,focused:Jt,className:be,style:(0,Te.Z)((0,Te.Z)({},Pe),Hi&&!qi?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Fn=="string"?Fn:void 0}},hidden:Ie,inputElement:vt.createElement(dt,(0,le.Z)({},et,{onKeyDown:Li,onChange:Qi,onFocus:ro,onBlur:fr,onCompositionStart:di,onCompositionEnd:wi,className:xe==null?void 0:xe.textarea,style:(0,Te.Z)((0,Te.Z)({},ct==null?void 0:ct.textarea),{},{resize:Pe==null?void 0:Pe.resize}),disabled:Ne,prefixCls:jn,onResize:zi,ref:$t}))});return Gn}),xt=kt,Ot=xt},39417:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return je}});var le=pe(92413),Te=pe(400),He=pe(37061),ut=pe(33708),We=pe(6909),Ue=pe(4771),Me=pe(25314),Ct=pe(9427),Pt=pe(25440),$e=pe(92310),Ft=pe.n($e),lt=pe(26112),vt=pe(59301),Oe=pe(39378),te=function(Ye){for(var dt=Ye.prefixCls,Ze=Ye.level,Nt=Ye.isStart,at=Ye.isEnd,kt="".concat(dt,"-indent-unit"),xt=[],Ot=0;Ot<Ze;Ot+=1){var Gt;xt.push(vt.createElement("span",{key:Ot,className:Ft()(kt,(Gt={},(0,Te.Z)(Gt,"".concat(kt,"-start"),Nt[Ot]),(0,Te.Z)(Gt,"".concat(kt,"-end"),at[Ot]),Gt))}))}return vt.createElement("span",{"aria-hidden":"true",className:"".concat(dt,"-indent")},xt)},ee=vt.memo(te),de=pe(67841),se=pe(71430),he=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ve="open",Ee="close",Be="---",Le=function(Xe){(0,Ct.Z)(dt,Xe);var Ye=(0,Pt.Z)(dt);function dt(){var Ze;(0,We.Z)(this,dt);for(var Nt=arguments.length,at=new Array(Nt),kt=0;kt<Nt;kt++)at[kt]=arguments[kt];return Ze=Ye.call.apply(Ye,[this].concat(at)),Ze.state={dragNodeHighlight:!1},Ze.selectHandle=void 0,Ze.cacheIndent=void 0,Ze.onSelectorClick=function(xt){var Ot=Ze.props.context.onNodeClick;Ot(xt,(0,se.F)(Ze.props)),Ze.isSelectable()?Ze.onSelect(xt):Ze.onCheck(xt)},Ze.onSelectorDoubleClick=function(xt){var Ot=Ze.props.context.onNodeDoubleClick;Ot(xt,(0,se.F)(Ze.props))},Ze.onSelect=function(xt){if(!Ze.isDisabled()){var Ot=Ze.props.context.onNodeSelect;Ot(xt,(0,se.F)(Ze.props))}},Ze.onCheck=function(xt){if(!Ze.isDisabled()){var Ot=Ze.props,Gt=Ot.disableCheckbox,At=Ot.checked,qe=Ze.props.context.onNodeCheck;if(!(!Ze.isCheckable()||Gt)){var Ve=!At;qe(xt,(0,se.F)(Ze.props),Ve)}}},Ze.onMouseEnter=function(xt){var Ot=Ze.props.context.onNodeMouseEnter;Ot(xt,(0,se.F)(Ze.props))},Ze.onMouseLeave=function(xt){var Ot=Ze.props.context.onNodeMouseLeave;Ot(xt,(0,se.F)(Ze.props))},Ze.onContextMenu=function(xt){var Ot=Ze.props.context.onNodeContextMenu;Ot(xt,(0,se.F)(Ze.props))},Ze.onDragStart=function(xt){var Ot=Ze.props.context.onNodeDragStart;xt.stopPropagation(),Ze.setState({dragNodeHighlight:!0}),Ot(xt,(0,Me.Z)(Ze));try{xt.dataTransfer.setData("text/plain","")}catch(Gt){}},Ze.onDragEnter=function(xt){var Ot=Ze.props.context.onNodeDragEnter;xt.preventDefault(),xt.stopPropagation(),Ot(xt,(0,Me.Z)(Ze))},Ze.onDragOver=function(xt){var Ot=Ze.props.context.onNodeDragOver;xt.preventDefault(),xt.stopPropagation(),Ot(xt,(0,Me.Z)(Ze))},Ze.onDragLeave=function(xt){var Ot=Ze.props.context.onNodeDragLeave;xt.stopPropagation(),Ot(xt,(0,Me.Z)(Ze))},Ze.onDragEnd=function(xt){var Ot=Ze.props.context.onNodeDragEnd;xt.stopPropagation(),Ze.setState({dragNodeHighlight:!1}),Ot(xt,(0,Me.Z)(Ze))},Ze.onDrop=function(xt){var Ot=Ze.props.context.onNodeDrop;xt.preventDefault(),xt.stopPropagation(),Ze.setState({dragNodeHighlight:!1}),Ot(xt,(0,Me.Z)(Ze))},Ze.onExpand=function(xt){var Ot=Ze.props,Gt=Ot.loading,At=Ot.context.onNodeExpand;Gt||At(xt,(0,se.F)(Ze.props))},Ze.setSelectHandle=function(xt){Ze.selectHandle=xt},Ze.getNodeState=function(){var xt=Ze.props.expanded;return Ze.isLeaf()?null:xt?ve:Ee},Ze.hasChildren=function(){var xt=Ze.props.eventKey,Ot=Ze.props.context.keyEntities,Gt=(0,de.Z)(Ot,xt)||{},At=Gt.children;return!!(At||[]).length},Ze.isLeaf=function(){var xt=Ze.props,Ot=xt.isLeaf,Gt=xt.loaded,At=Ze.props.context.loadData,qe=Ze.hasChildren();return Ot===!1?!1:Ot||!At&&!qe||At&&Gt&&!qe},Ze.isDisabled=function(){var xt=Ze.props.disabled,Ot=Ze.props.context.disabled;return!!(Ot||xt)},Ze.isCheckable=function(){var xt=Ze.props.checkable,Ot=Ze.props.context.checkable;return!Ot||xt===!1?!1:Ot},Ze.syncLoadData=function(xt){var Ot=xt.expanded,Gt=xt.loading,At=xt.loaded,qe=Ze.props.context,Ve=qe.loadData,_t=qe.onNodeLoad;Gt||Ve&&Ot&&!Ze.isLeaf()&&!Ze.hasChildren()&&!At&&_t((0,se.F)(Ze.props))},Ze.isDraggable=function(){var xt=Ze.props,Ot=xt.data,Gt=xt.context.draggable;return!!(Gt&&(!Gt.nodeDraggable||Gt.nodeDraggable(Ot)))},Ze.renderDragHandler=function(){var xt=Ze.props.context,Ot=xt.draggable,Gt=xt.prefixCls;return Ot!=null&&Ot.icon?vt.createElement("span",{className:"".concat(Gt,"-draggable-icon")},Ot.icon):null},Ze.renderSwitcherIconDom=function(xt){var Ot=Ze.props.switcherIcon,Gt=Ze.props.context.switcherIcon,At=Ot||Gt;return typeof At=="function"?At((0,ut.Z)((0,ut.Z)({},Ze.props),{},{isLeaf:xt})):At},Ze.renderSwitcher=function(){var xt=Ze.props.expanded,Ot=Ze.props.context.prefixCls;if(Ze.isLeaf()){var Gt=Ze.renderSwitcherIconDom(!0);return Gt!==!1?vt.createElement("span",{className:Ft()("".concat(Ot,"-switcher"),"".concat(Ot,"-switcher-noop"))},Gt):null}var At=Ft()("".concat(Ot,"-switcher"),"".concat(Ot,"-switcher_").concat(xt?ve:Ee)),qe=Ze.renderSwitcherIconDom(!1);return qe!==!1?vt.createElement("span",{onClick:Ze.onExpand,className:At},qe):null},Ze.renderCheckbox=function(){var xt=Ze.props,Ot=xt.checked,Gt=xt.halfChecked,At=xt.disableCheckbox,qe=Ze.props.context.prefixCls,Ve=Ze.isDisabled(),_t=Ze.isCheckable();if(!_t)return null;var vn=typeof _t!="boolean"?_t:null;return vt.createElement("span",{className:Ft()("".concat(qe,"-checkbox"),Ot&&"".concat(qe,"-checkbox-checked"),!Ot&&Gt&&"".concat(qe,"-checkbox-indeterminate"),(Ve||At)&&"".concat(qe,"-checkbox-disabled")),onClick:Ze.onCheck},vn)},Ze.renderIcon=function(){var xt=Ze.props.loading,Ot=Ze.props.context.prefixCls;return vt.createElement("span",{className:Ft()("".concat(Ot,"-iconEle"),"".concat(Ot,"-icon__").concat(Ze.getNodeState()||"docu"),xt&&"".concat(Ot,"-icon_loading"))})},Ze.renderSelector=function(){var xt=Ze.state.dragNodeHighlight,Ot=Ze.props,Gt=Ot.title,At=Gt===void 0?Be:Gt,qe=Ot.selected,Ve=Ot.icon,_t=Ot.loading,vn=Ot.data,yn=Ze.props.context,jt=yn.prefixCls,en=yn.showIcon,ln=yn.icon,Wn=yn.loadData,un=yn.titleRender,kn=Ze.isDisabled(),wt="".concat(jt,"-node-content-wrapper"),jn;if(en){var ci=Ve||ln;jn=ci?vt.createElement("span",{className:Ft()("".concat(jt,"-iconEle"),"".concat(jt,"-icon__customize"))},typeof ci=="function"?ci(Ze.props):ci):Ze.renderIcon()}else Wn&&_t&&(jn=Ze.renderIcon());var Ge;typeof At=="function"?Ge=At(vn):un?Ge=un(vn):Ge=At;var be=vt.createElement("span",{className:"".concat(jt,"-title")},Ge);return vt.createElement("span",{ref:Ze.setSelectHandle,title:typeof At=="string"?At:"",className:Ft()("".concat(wt),"".concat(wt,"-").concat(Ze.getNodeState()||"normal"),!kn&&(qe||xt)&&"".concat(jt,"-node-selected")),onMouseEnter:Ze.onMouseEnter,onMouseLeave:Ze.onMouseLeave,onContextMenu:Ze.onContextMenu,onClick:Ze.onSelectorClick,onDoubleClick:Ze.onSelectorDoubleClick},jn,be,Ze.renderDropIndicator())},Ze.renderDropIndicator=function(){var xt=Ze.props,Ot=xt.disabled,Gt=xt.eventKey,At=Ze.props.context,qe=At.draggable,Ve=At.dropLevelOffset,_t=At.dropPosition,vn=At.prefixCls,yn=At.indent,jt=At.dropIndicatorRender,en=At.dragOverNodeKey,ln=At.direction,Wn=!!qe,un=!Ot&&Wn&&en===Gt,kn=yn!=null?yn:Ze.cacheIndent;return Ze.cacheIndent=yn,un?jt({dropPosition:_t,dropLevelOffset:Ve,indent:kn,prefixCls:vn,direction:ln}):null},Ze}return(0,Ue.Z)(dt,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var Nt=this.props.selectable,at=this.props.context.selectable;return typeof Nt=="boolean"?Nt:at}},{key:"render",value:function(){var Nt,at=this.props,kt=at.eventKey,xt=at.className,Ot=at.style,Gt=at.dragOver,At=at.dragOverGapTop,qe=at.dragOverGapBottom,Ve=at.isLeaf,_t=at.isStart,vn=at.isEnd,yn=at.expanded,jt=at.selected,en=at.checked,ln=at.halfChecked,Wn=at.loading,un=at.domRef,kn=at.active,wt=at.data,jn=at.onMouseMove,ci=at.selectable,Ge=(0,He.Z)(at,he),be=this.props.context,Pe=be.prefixCls,Ne=be.filterTreeNode,Ie=be.keyEntities,xe=be.dropContainerKey,ct=be.dropTargetKey,Lt=be.draggingNodeKey,et=this.isDisabled(),it=(0,lt.Z)(Ge,{aria:!0,data:!0}),Bt=(0,de.Z)(Ie,kt)||{},Dt=Bt.level,ft=vn[vn.length-1],$t=this.isDraggable(),xn=!et&&$t,an=Lt===kt,Jt=ci!==void 0?{"aria-selected":!!ci}:void 0;return vt.createElement("div",(0,le.Z)({ref:un,className:Ft()(xt,"".concat(Pe,"-treenode"),(Nt={},(0,Te.Z)(Nt,"".concat(Pe,"-treenode-disabled"),et),(0,Te.Z)(Nt,"".concat(Pe,"-treenode-switcher-").concat(yn?"open":"close"),!Ve),(0,Te.Z)(Nt,"".concat(Pe,"-treenode-checkbox-checked"),en),(0,Te.Z)(Nt,"".concat(Pe,"-treenode-checkbox-indeterminate"),ln),(0,Te.Z)(Nt,"".concat(Pe,"-treenode-selected"),jt),(0,Te.Z)(Nt,"".concat(Pe,"-treenode-loading"),Wn),(0,Te.Z)(Nt,"".concat(Pe,"-treenode-active"),kn),(0,Te.Z)(Nt,"".concat(Pe,"-treenode-leaf-last"),ft),(0,Te.Z)(Nt,"".concat(Pe,"-treenode-draggable"),$t),(0,Te.Z)(Nt,"dragging",an),(0,Te.Z)(Nt,"drop-target",ct===kt),(0,Te.Z)(Nt,"drop-container",xe===kt),(0,Te.Z)(Nt,"drag-over",!et&&Gt),(0,Te.Z)(Nt,"drag-over-gap-top",!et&&At),(0,Te.Z)(Nt,"drag-over-gap-bottom",!et&&qe),(0,Te.Z)(Nt,"filter-node",Ne&&Ne((0,se.F)(this.props))),Nt)),style:Ot,draggable:xn,"aria-grabbed":an,onDragStart:xn?this.onDragStart:void 0,onDragEnter:$t?this.onDragEnter:void 0,onDragOver:$t?this.onDragOver:void 0,onDragLeave:$t?this.onDragLeave:void 0,onDrop:$t?this.onDrop:void 0,onDragEnd:$t?this.onDragEnd:void 0,onMouseMove:jn},Jt,it),vt.createElement(ee,{prefixCls:Pe,level:Dt,isStart:_t,isEnd:vn}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),dt}(vt.Component),ze=function(Ye){return vt.createElement(Oe.k.Consumer,null,function(dt){return vt.createElement(Le,(0,le.Z)({},Ye,{context:dt}))})};ze.displayName="TreeNode",ze.isTreeNode=1;var je=ze},39378:function(On,mn,pe){"use strict";pe.d(mn,{k:function(){return Te}});var le=pe(59301),Te=le.createContext(null)},23130:function(On,mn,pe){"use strict";pe.d(mn,{O:function(){return je.Z},Z:function(){return be}});var le=pe(92413),Te=pe(400),He=pe(39559),ut=pe(33708),We=pe(26407),Ue=pe(6909),Me=pe(4771),Ct=pe(25314),Pt=pe(9427),$e=pe(25440),Ft=pe(92310),lt=pe.n(Ft),vt=pe(10228),Oe=pe(26112),te=pe(48736),ee=pe(59301),de=pe(39378);function se(Pe){var Ne=Pe.dropPosition,Ie=Pe.dropLevelOffset,xe=Pe.indent,ct={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ne){case-1:ct.top=0,ct.left=-Ie*xe;break;case 1:ct.bottom=0,ct.left=-Ie*xe;break;case 0:ct.bottom=0,ct.left=xe;break}return ee.createElement("div",{style:ct})}function he(Pe){if(Pe==null)throw new TypeError("Cannot destructure "+Pe)}var ve=pe(33606),Ee=pe(37061),Be=pe(34280),Le=pe(4409),ze=pe(77900),je=pe(39417);function Xe(Pe,Ne){var Ie=ee.useState(!1),xe=(0,ve.Z)(Ie,2),ct=xe[0],Lt=xe[1];ee.useLayoutEffect(function(){if(ct)return Pe(),function(){Ne()}},[ct]),ee.useLayoutEffect(function(){return Lt(!0),function(){Lt(!1)}},[])}var Ye=pe(71430),dt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ze=function(Ne,Ie){var xe=Ne.className,ct=Ne.style,Lt=Ne.motion,et=Ne.motionNodes,it=Ne.motionType,Bt=Ne.onMotionStart,Dt=Ne.onMotionEnd,ft=Ne.active,$t=Ne.treeNodeRequiredProps,xn=(0,Ee.Z)(Ne,dt),an=ee.useState(!0),Jt=(0,ve.Z)(an,2),Tn=Jt[0],Kn=Jt[1],dn=ee.useContext(de.k),Qn=dn.prefixCls,pi=et&&it!=="hide";(0,Be.Z)(function(){et&&pi!==Tn&&Kn(pi)},[et]);var zn=function(){et&&Bt()},Nn=ee.useRef(!1),yi=function(){et&&!Nn.current&&(Nn.current=!0,Dt())};Xe(zn,yi);var Zi=function(cr){pi===cr&&yi()};return et?ee.createElement(ze.default,(0,le.Z)({ref:Ie,visible:Tn},Lt,{motionAppear:it==="show",onVisibleChanged:Zi}),function(Hi,cr){var br=Hi.className,gi=Hi.style;return ee.createElement("div",{ref:cr,className:lt()("".concat(Qn,"-treenode-motion"),br),style:gi},et.map(function(di){var wi=(0,le.Z)({},(he(di.data),di.data)),Qi=di.title,Li=di.key,ro=di.isStart,fr=di.isEnd;delete wi.children;var Ae=(0,Ye.H8)(Li,$t);return ee.createElement(je.Z,(0,le.Z)({},wi,Ae,{title:Qi,active:ft,data:di.data,key:Li,isStart:ro,isEnd:fr}))}))}):ee.createElement(je.Z,(0,le.Z)({domRef:Ie,className:xe,style:ct},xn,{active:ft}))};Ze.displayName="MotionTreeNode";var Nt=ee.forwardRef(Ze),at=Nt;function kt(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=Pe.length,xe=Ne.length;if(Math.abs(Ie-xe)!==1)return{add:!1,key:null};function ct(Lt,et){var it=new Map;Lt.forEach(function(Dt){it.set(Dt,!0)});var Bt=et.filter(function(Dt){return!it.has(Dt)});return Bt.length===1?Bt[0]:null}return Ie<xe?{add:!0,key:ct(Pe,Ne)}:{add:!1,key:ct(Ne,Pe)}}function xt(Pe,Ne,Ie){var xe=Pe.findIndex(function(it){return it.key===Ie}),ct=Pe[xe+1],Lt=Ne.findIndex(function(it){return it.key===Ie});if(ct){var et=Ne.findIndex(function(it){return it.key===ct.key});return Ne.slice(Lt+1,et)}return Ne.slice(Lt+1)}var Ot=["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"],Gt={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},At=function(){},qe="RC_TREE_MOTION_".concat(Math.random()),Ve={key:qe},_t={key:qe,level:0,index:0,pos:"0",node:Ve,nodes:[Ve]},vn={parent:null,children:[],pos:_t.pos,data:Ve,title:null,key:qe,isStart:[],isEnd:[]};function yn(Pe,Ne,Ie,xe){return Ne===!1||!Ie?Pe:Pe.slice(0,Math.ceil(Ie/xe)+1)}function jt(Pe){var Ne=Pe.key,Ie=Pe.pos;return(0,Ye.km)(Ne,Ie)}function en(Pe){for(var Ne=String(Pe.data.key),Ie=Pe;Ie.parent;)Ie=Ie.parent,Ne="".concat(Ie.data.key," > ").concat(Ne);return Ne}var ln=ee.forwardRef(function(Pe,Ne){var Ie=Pe.prefixCls,xe=Pe.data,ct=Pe.selectable,Lt=Pe.checkable,et=Pe.expandedKeys,it=Pe.selectedKeys,Bt=Pe.checkedKeys,Dt=Pe.loadedKeys,ft=Pe.loadingKeys,$t=Pe.halfCheckedKeys,xn=Pe.keyEntities,an=Pe.disabled,Jt=Pe.dragging,Tn=Pe.dragOverNodeKey,Kn=Pe.dropPosition,dn=Pe.motion,Qn=Pe.height,pi=Pe.itemHeight,zn=Pe.virtual,Nn=Pe.focusable,yi=Pe.activeItem,Zi=Pe.focused,Hi=Pe.tabIndex,cr=Pe.onKeyDown,br=Pe.onFocus,gi=Pe.onBlur,di=Pe.onActiveChange,wi=Pe.onListChangeStart,Qi=Pe.onListChangeEnd,Li=(0,Ee.Z)(Pe,Ot),ro=ee.useRef(null),fr=ee.useRef(null);ee.useImperativeHandle(Ne,function(){return{scrollTo:function(sn){ro.current.scrollTo(sn)},getIndentWidth:function(){return fr.current.offsetWidth}}});var Ae=ee.useState(et),Ei=(0,ve.Z)(Ae,2),Sr=Ei[0],Fn=Ei[1],xi=ee.useState(xe),zi=(0,ve.Z)(xi,2),qi=zi[0],Gn=zi[1],ti=ee.useState(xe),Zt=(0,ve.Z)(ti,2),Wt=Zt[0],Qe=Zt[1],on=ee.useState([]),cn=(0,ve.Z)(on,2),Mt=cn[0],ht=cn[1],nn=ee.useState(null),gn=(0,ve.Z)(nn,2),_n=gn[0],qn=gn[1],Et=ee.useRef(xe);Et.current=xe;function Pn(){var tn=Et.current;Gn(tn),Qe(tn),ht([]),qn(null),Qi()}(0,Be.Z)(function(){Fn(et);var tn=kt(Sr,et);if(tn.key!==null)if(tn.add){var sn=qi.findIndex(function(Ni){var ir=Ni.key;return ir===tn.key}),In=yn(xt(qi,xe,tn.key),zn,Qn,pi),ji=qi.slice();ji.splice(sn+1,0,vn),Qe(ji),ht(In),qn("show")}else{var Ai=xe.findIndex(function(Ni){var ir=Ni.key;return ir===tn.key}),Si=yn(xt(xe,qi,tn.key),zn,Qn,pi),ki=xe.slice();ki.splice(Ai+1,0,vn),Qe(ki),ht(Si),qn("hide")}else qi!==xe&&(Gn(xe),Qe(xe))},[et,xe]),ee.useEffect(function(){Jt||Pn()},[Jt]);var Xn=dn?Wt:xe,Ci={expandedKeys:et,selectedKeys:it,loadedKeys:Dt,loadingKeys:ft,checkedKeys:Bt,halfCheckedKeys:$t,dragOverNodeKey:Tn,dropPosition:Kn,keyEntities:xn};return ee.createElement(ee.Fragment,null,Zi&&yi&&ee.createElement("span",{style:Gt,"aria-live":"assertive"},en(yi)),ee.createElement("div",null,ee.createElement("input",{style:Gt,disabled:Nn===!1||an,tabIndex:Nn!==!1?Hi:null,onKeyDown:cr,onFocus:br,onBlur:gi,value:"",onChange:At,"aria-label":"for screen reader"})),ee.createElement("div",{className:"".concat(Ie,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},ee.createElement("div",{className:"".concat(Ie,"-indent")},ee.createElement("div",{ref:fr,className:"".concat(Ie,"-indent-unit")}))),ee.createElement(Le.Z,(0,le.Z)({},Li,{data:Xn,itemKey:jt,height:Qn,fullHeight:!1,virtual:zn,itemHeight:pi,prefixCls:"".concat(Ie,"-list"),ref:ro,onVisibleChange:function(sn,In){var ji=new Set(sn),Ai=In.filter(function(Si){return!ji.has(Si)});Ai.some(function(Si){return jt(Si)===qe})&&Pn()}}),function(tn){var sn=tn.pos,In=(0,le.Z)({},(he(tn.data),tn.data)),ji=tn.title,Ai=tn.key,Si=tn.isStart,ki=tn.isEnd,Ni=(0,Ye.km)(Ai,sn);delete In.key,delete In.children;var ir=(0,Ye.H8)(Ni,Ci);return ee.createElement(at,(0,le.Z)({},In,ir,{title:ji,active:!!yi&&Ai===yi.key,pos:sn,data:tn.data,isStart:Si,isEnd:ki,motion:dn,motionNodes:Ai===qe?Mt:null,motionType:_n,onMotionStart:wi,onMotionEnd:Pn,treeNodeRequiredProps:Ci,onMouseMove:function(){di(null)}}))}))});ln.displayName="NodeList";var Wn=ln,un=pe(35654),kn=pe(90782),wt=pe(67841),jn=10,ci=function(Pe){(0,Pt.Z)(Ie,Pe);var Ne=(0,$e.Z)(Ie);function Ie(){var xe;(0,Ue.Z)(this,Ie);for(var ct=arguments.length,Lt=new Array(ct),et=0;et<ct;et++)Lt[et]=arguments[et];return xe=Ne.call.apply(Ne,[this].concat(Lt)),xe.destroyed=!1,xe.delayedDragEnterLogic=void 0,xe.loadingRetryTimes={},xe.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Ye.w$)()},xe.dragStartMousePosition=null,xe.dragNode=void 0,xe.currentMouseOverDroppableNodeKey=null,xe.listRef=ee.createRef(),xe.onNodeDragStart=function(it,Bt){var Dt=xe.state,ft=Dt.expandedKeys,$t=Dt.keyEntities,xn=xe.props.onDragStart,an=Bt.props.eventKey;xe.dragNode=Bt,xe.dragStartMousePosition={x:it.clientX,y:it.clientY};var Jt=(0,un._5)(ft,an);xe.setState({draggingNodeKey:an,dragChildrenKeys:(0,un.wA)(an,$t),indent:xe.listRef.current.getIndentWidth()}),xe.setExpandedKeys(Jt),window.addEventListener("dragend",xe.onWindowDragEnd),xn==null||xn({event:it,node:(0,Ye.F)(Bt.props)})},xe.onNodeDragEnter=function(it,Bt){var Dt=xe.state,ft=Dt.expandedKeys,$t=Dt.keyEntities,xn=Dt.dragChildrenKeys,an=Dt.flattenNodes,Jt=Dt.indent,Tn=xe.props,Kn=Tn.onDragEnter,dn=Tn.onExpand,Qn=Tn.allowDrop,pi=Tn.direction,zn=Bt.props,Nn=zn.pos,yi=zn.eventKey,Zi=(0,Ct.Z)(xe),Hi=Zi.dragNode;if(xe.currentMouseOverDroppableNodeKey!==yi&&(xe.currentMouseOverDroppableNodeKey=yi),!Hi){xe.resetDragState();return}var cr=(0,un.OM)(it,Hi,Bt,Jt,xe.dragStartMousePosition,Qn,an,$t,ft,pi),br=cr.dropPosition,gi=cr.dropLevelOffset,di=cr.dropTargetKey,wi=cr.dropContainerKey,Qi=cr.dropTargetPos,Li=cr.dropAllowed,ro=cr.dragOverNodeKey;if(xn.indexOf(di)!==-1||!Li){xe.resetDragState();return}if(xe.delayedDragEnterLogic||(xe.delayedDragEnterLogic={}),Object.keys(xe.delayedDragEnterLogic).forEach(function(fr){clearTimeout(xe.delayedDragEnterLogic[fr])}),Hi.props.eventKey!==Bt.props.eventKey&&(it.persist(),xe.delayedDragEnterLogic[Nn]=window.setTimeout(function(){if(xe.state.draggingNodeKey!==null){var fr=(0,We.Z)(ft),Ae=(0,wt.Z)($t,Bt.props.eventKey);Ae&&(Ae.children||[]).length&&(fr=(0,un.L0)(ft,Bt.props.eventKey)),"expandedKeys"in xe.props||xe.setExpandedKeys(fr),dn==null||dn(fr,{node:(0,Ye.F)(Bt.props),expanded:!0,nativeEvent:it.nativeEvent})}},800)),Hi.props.eventKey===di&&gi===0){xe.resetDragState();return}xe.setState({dragOverNodeKey:ro,dropPosition:br,dropLevelOffset:gi,dropTargetKey:di,dropContainerKey:wi,dropTargetPos:Qi,dropAllowed:Li}),Kn==null||Kn({event:it,node:(0,Ye.F)(Bt.props),expandedKeys:ft})},xe.onNodeDragOver=function(it,Bt){var Dt=xe.state,ft=Dt.dragChildrenKeys,$t=Dt.flattenNodes,xn=Dt.keyEntities,an=Dt.expandedKeys,Jt=Dt.indent,Tn=xe.props,Kn=Tn.onDragOver,dn=Tn.allowDrop,Qn=Tn.direction,pi=(0,Ct.Z)(xe),zn=pi.dragNode;if(zn){var Nn=(0,un.OM)(it,zn,Bt,Jt,xe.dragStartMousePosition,dn,$t,xn,an,Qn),yi=Nn.dropPosition,Zi=Nn.dropLevelOffset,Hi=Nn.dropTargetKey,cr=Nn.dropContainerKey,br=Nn.dropAllowed,gi=Nn.dropTargetPos,di=Nn.dragOverNodeKey;ft.indexOf(Hi)!==-1||!br||(zn.props.eventKey===Hi&&Zi===0?xe.state.dropPosition===null&&xe.state.dropLevelOffset===null&&xe.state.dropTargetKey===null&&xe.state.dropContainerKey===null&&xe.state.dropTargetPos===null&&xe.state.dropAllowed===!1&&xe.state.dragOverNodeKey===null||xe.resetDragState():yi===xe.state.dropPosition&&Zi===xe.state.dropLevelOffset&&Hi===xe.state.dropTargetKey&&cr===xe.state.dropContainerKey&&gi===xe.state.dropTargetPos&&br===xe.state.dropAllowed&&di===xe.state.dragOverNodeKey||xe.setState({dropPosition:yi,dropLevelOffset:Zi,dropTargetKey:Hi,dropContainerKey:cr,dropTargetPos:gi,dropAllowed:br,dragOverNodeKey:di}),Kn==null||Kn({event:it,node:(0,Ye.F)(Bt.props)}))}},xe.onNodeDragLeave=function(it,Bt){xe.currentMouseOverDroppableNodeKey===Bt.props.eventKey&&!it.currentTarget.contains(it.relatedTarget)&&(xe.resetDragState(),xe.currentMouseOverDroppableNodeKey=null);var Dt=xe.props.onDragLeave;Dt==null||Dt({event:it,node:(0,Ye.F)(Bt.props)})},xe.onWindowDragEnd=function(it){xe.onNodeDragEnd(it,null,!0),window.removeEventListener("dragend",xe.onWindowDragEnd)},xe.onNodeDragEnd=function(it,Bt){var Dt=xe.props.onDragEnd;xe.setState({dragOverNodeKey:null}),xe.cleanDragState(),Dt==null||Dt({event:it,node:(0,Ye.F)(Bt.props)}),xe.dragNode=null,window.removeEventListener("dragend",xe.onWindowDragEnd)},xe.onNodeDrop=function(it,Bt){var Dt,ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$t=xe.state,xn=$t.dragChildrenKeys,an=$t.dropPosition,Jt=$t.dropTargetKey,Tn=$t.dropTargetPos,Kn=$t.dropAllowed;if(Kn){var dn=xe.props.onDrop;if(xe.setState({dragOverNodeKey:null}),xe.cleanDragState(),Jt!==null){var Qn=(0,ut.Z)((0,ut.Z)({},(0,Ye.H8)(Jt,xe.getTreeNodeRequiredProps())),{},{active:((Dt=xe.getActiveItem())===null||Dt===void 0?void 0:Dt.key)===Jt,data:(0,wt.Z)(xe.state.keyEntities,Jt).node}),pi=xn.indexOf(Jt)!==-1;(0,te.ZP)(!pi,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var zn=(0,un.yx)(Tn),Nn={event:it,node:(0,Ye.F)(Qn),dragNode:xe.dragNode?(0,Ye.F)(xe.dragNode.props):null,dragNodesKeys:[xe.dragNode.props.eventKey].concat(xn),dropToGap:an!==0,dropPosition:an+Number(zn[zn.length-1])};ft||dn==null||dn(Nn),xe.dragNode=null}}},xe.cleanDragState=function(){var it=xe.state.draggingNodeKey;it!==null&&xe.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),xe.dragStartMousePosition=null,xe.currentMouseOverDroppableNodeKey=null},xe.triggerExpandActionExpand=function(it,Bt){var Dt=xe.state,ft=Dt.expandedKeys,$t=Dt.flattenNodes,xn=Bt.expanded,an=Bt.key,Jt=Bt.isLeaf;if(!(Jt||it.shiftKey||it.metaKey||it.ctrlKey)){var Tn=$t.filter(function(dn){return dn.key===an})[0],Kn=(0,Ye.F)((0,ut.Z)((0,ut.Z)({},(0,Ye.H8)(an,xe.getTreeNodeRequiredProps())),{},{data:Tn.data}));xe.setExpandedKeys(xn?(0,un._5)(ft,an):(0,un.L0)(ft,an)),xe.onNodeExpand(it,Kn)}},xe.onNodeClick=function(it,Bt){var Dt=xe.props,ft=Dt.onClick,$t=Dt.expandAction;$t==="click"&&xe.triggerExpandActionExpand(it,Bt),ft==null||ft(it,Bt)},xe.onNodeDoubleClick=function(it,Bt){var Dt=xe.props,ft=Dt.onDoubleClick,$t=Dt.expandAction;$t==="doubleClick"&&xe.triggerExpandActionExpand(it,Bt),ft==null||ft(it,Bt)},xe.onNodeSelect=function(it,Bt){var Dt=xe.state.selectedKeys,ft=xe.state,$t=ft.keyEntities,xn=ft.fieldNames,an=xe.props,Jt=an.onSelect,Tn=an.multiple,Kn=Bt.selected,dn=Bt[xn.key],Qn=!Kn;Qn?Tn?Dt=(0,un.L0)(Dt,dn):Dt=[dn]:Dt=(0,un._5)(Dt,dn);var pi=Dt.map(function(zn){var Nn=(0,wt.Z)($t,zn);return Nn?Nn.node:null}).filter(function(zn){return zn});xe.setUncontrolledState({selectedKeys:Dt}),Jt==null||Jt(Dt,{event:"select",selected:Qn,node:Bt,selectedNodes:pi,nativeEvent:it.nativeEvent})},xe.onNodeCheck=function(it,Bt,Dt){var ft=xe.state,$t=ft.keyEntities,xn=ft.checkedKeys,an=ft.halfCheckedKeys,Jt=xe.props,Tn=Jt.checkStrictly,Kn=Jt.onCheck,dn=Bt.key,Qn,pi={event:"check",node:Bt,checked:Dt,nativeEvent:it.nativeEvent};if(Tn){var zn=Dt?(0,un.L0)(xn,dn):(0,un._5)(xn,dn),Nn=(0,un._5)(an,dn);Qn={checked:zn,halfChecked:Nn},pi.checkedNodes=zn.map(function(gi){return(0,wt.Z)($t,gi)}).filter(function(gi){return gi}).map(function(gi){return gi.node}),xe.setUncontrolledState({checkedKeys:zn})}else{var yi=(0,kn.S)([].concat((0,We.Z)(xn),[dn]),!0,$t),Zi=yi.checkedKeys,Hi=yi.halfCheckedKeys;if(!Dt){var cr=new Set(Zi);cr.delete(dn);var br=(0,kn.S)(Array.from(cr),{checked:!1,halfCheckedKeys:Hi},$t);Zi=br.checkedKeys,Hi=br.halfCheckedKeys}Qn=Zi,pi.checkedNodes=[],pi.checkedNodesPositions=[],pi.halfCheckedKeys=Hi,Zi.forEach(function(gi){var di=(0,wt.Z)($t,gi);if(di){var wi=di.node,Qi=di.pos;pi.checkedNodes.push(wi),pi.checkedNodesPositions.push({node:wi,pos:Qi})}}),xe.setUncontrolledState({checkedKeys:Zi},!1,{halfCheckedKeys:Hi})}Kn==null||Kn(Qn,pi)},xe.onNodeLoad=function(it){var Bt=it.key,Dt=new Promise(function(ft,$t){xe.setState(function(xn){var an=xn.loadedKeys,Jt=an===void 0?[]:an,Tn=xn.loadingKeys,Kn=Tn===void 0?[]:Tn,dn=xe.props,Qn=dn.loadData,pi=dn.onLoad;if(!Qn||Jt.indexOf(Bt)!==-1||Kn.indexOf(Bt)!==-1)return null;var zn=Qn(it);return zn.then(function(){var Nn=xe.state.loadedKeys,yi=(0,un.L0)(Nn,Bt);pi==null||pi(yi,{event:"load",node:it}),xe.setUncontrolledState({loadedKeys:yi}),xe.setState(function(Zi){return{loadingKeys:(0,un._5)(Zi.loadingKeys,Bt)}}),ft()}).catch(function(Nn){if(xe.setState(function(Zi){return{loadingKeys:(0,un._5)(Zi.loadingKeys,Bt)}}),xe.loadingRetryTimes[Bt]=(xe.loadingRetryTimes[Bt]||0)+1,xe.loadingRetryTimes[Bt]>=jn){var yi=xe.state.loadedKeys;(0,te.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),xe.setUncontrolledState({loadedKeys:(0,un.L0)(yi,Bt)}),ft()}$t(Nn)}),{loadingKeys:(0,un.L0)(Kn,Bt)}})});return Dt.catch(function(){}),Dt},xe.onNodeMouseEnter=function(it,Bt){var Dt=xe.props.onMouseEnter;Dt==null||Dt({event:it,node:Bt})},xe.onNodeMouseLeave=function(it,Bt){var Dt=xe.props.onMouseLeave;Dt==null||Dt({event:it,node:Bt})},xe.onNodeContextMenu=function(it,Bt){var Dt=xe.props.onRightClick;Dt&&(it.preventDefault(),Dt({event:it,node:Bt}))},xe.onFocus=function(){var it=xe.props.onFocus;xe.setState({focused:!0});for(var Bt=arguments.length,Dt=new Array(Bt),ft=0;ft<Bt;ft++)Dt[ft]=arguments[ft];it==null||it.apply(void 0,Dt)},xe.onBlur=function(){var it=xe.props.onBlur;xe.setState({focused:!1}),xe.onActiveChange(null);for(var Bt=arguments.length,Dt=new Array(Bt),ft=0;ft<Bt;ft++)Dt[ft]=arguments[ft];it==null||it.apply(void 0,Dt)},xe.getTreeNodeRequiredProps=function(){var it=xe.state,Bt=it.expandedKeys,Dt=it.selectedKeys,ft=it.loadedKeys,$t=it.loadingKeys,xn=it.checkedKeys,an=it.halfCheckedKeys,Jt=it.dragOverNodeKey,Tn=it.dropPosition,Kn=it.keyEntities;return{expandedKeys:Bt||[],selectedKeys:Dt||[],loadedKeys:ft||[],loadingKeys:$t||[],checkedKeys:xn||[],halfCheckedKeys:an||[],dragOverNodeKey:Jt,dropPosition:Tn,keyEntities:Kn}},xe.setExpandedKeys=function(it){var Bt=xe.state,Dt=Bt.treeData,ft=Bt.fieldNames,$t=(0,Ye.oH)(Dt,it,ft);xe.setUncontrolledState({expandedKeys:it,flattenNodes:$t},!0)},xe.onNodeExpand=function(it,Bt){var Dt=xe.state.expandedKeys,ft=xe.state,$t=ft.listChanging,xn=ft.fieldNames,an=xe.props,Jt=an.onExpand,Tn=an.loadData,Kn=Bt.expanded,dn=Bt[xn.key];if(!$t){var Qn=Dt.indexOf(dn),pi=!Kn;if((0,te.ZP)(Kn&&Qn!==-1||!Kn&&Qn===-1,"Expand state not sync with index check"),pi?Dt=(0,un.L0)(Dt,dn):Dt=(0,un._5)(Dt,dn),xe.setExpandedKeys(Dt),Jt==null||Jt(Dt,{node:Bt,expanded:pi,nativeEvent:it.nativeEvent}),pi&&Tn){var zn=xe.onNodeLoad(Bt);zn&&zn.then(function(){var Nn=(0,Ye.oH)(xe.state.treeData,Dt,xn);xe.setUncontrolledState({flattenNodes:Nn})}).catch(function(){var Nn=xe.state.expandedKeys,yi=(0,un._5)(Nn,dn);xe.setExpandedKeys(yi)})}}},xe.onListChangeStart=function(){xe.setUncontrolledState({listChanging:!0})},xe.onListChangeEnd=function(){setTimeout(function(){xe.setUncontrolledState({listChanging:!1})})},xe.onActiveChange=function(it){var Bt=xe.state.activeKey,Dt=xe.props.onActiveChange;Bt!==it&&(xe.setState({activeKey:it}),it!==null&&xe.scrollTo({key:it}),Dt==null||Dt(it))},xe.getActiveItem=function(){var it=xe.state,Bt=it.activeKey,Dt=it.flattenNodes;return Bt===null?null:Dt.find(function(ft){var $t=ft.key;return $t===Bt})||null},xe.offsetActiveKey=function(it){var Bt=xe.state,Dt=Bt.flattenNodes,ft=Bt.activeKey,$t=Dt.findIndex(function(Jt){var Tn=Jt.key;return Tn===ft});$t===-1&&it<0&&($t=Dt.length),$t=($t+it+Dt.length)%Dt.length;var xn=Dt[$t];if(xn){var an=xn.key;xe.onActiveChange(an)}else xe.onActiveChange(null)},xe.onKeyDown=function(it){var Bt=xe.state,Dt=Bt.activeKey,ft=Bt.expandedKeys,$t=Bt.checkedKeys,xn=Bt.fieldNames,an=xe.props,Jt=an.onKeyDown,Tn=an.checkable,Kn=an.selectable;switch(it.which){case vt.Z.UP:{xe.offsetActiveKey(-1),it.preventDefault();break}case vt.Z.DOWN:{xe.offsetActiveKey(1),it.preventDefault();break}}var dn=xe.getActiveItem();if(dn&&dn.data){var Qn=xe.getTreeNodeRequiredProps(),pi=dn.data.isLeaf===!1||!!(dn.data[xn.children]||[]).length,zn=(0,Ye.F)((0,ut.Z)((0,ut.Z)({},(0,Ye.H8)(Dt,Qn)),{},{data:dn.data,active:!0}));switch(it.which){case vt.Z.LEFT:{pi&&ft.includes(Dt)?xe.onNodeExpand({},zn):dn.parent&&xe.onActiveChange(dn.parent.key),it.preventDefault();break}case vt.Z.RIGHT:{pi&&!ft.includes(Dt)?xe.onNodeExpand({},zn):dn.children&&dn.children.length&&xe.onActiveChange(dn.children[0].key),it.preventDefault();break}case vt.Z.ENTER:case vt.Z.SPACE:{Tn&&!zn.disabled&&zn.checkable!==!1&&!zn.disableCheckbox?xe.onNodeCheck({},zn,!$t.includes(Dt)):!Tn&&Kn&&!zn.disabled&&zn.selectable!==!1&&xe.onNodeSelect({},zn);break}}}Jt==null||Jt(it)},xe.setUncontrolledState=function(it){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!xe.destroyed){var ft=!1,$t=!0,xn={};Object.keys(it).forEach(function(an){if(an in xe.props){$t=!1;return}ft=!0,xn[an]=it[an]}),ft&&(!Bt||$t)&&xe.setState((0,ut.Z)((0,ut.Z)({},xn),Dt))}},xe.scrollTo=function(it){xe.listRef.current.scrollTo(it)},xe}return(0,Me.Z)(Ie,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var ct=this.props.activeKey;ct!==void 0&&ct!==this.state.activeKey&&(this.setState({activeKey:ct}),ct!==null&&this.scrollTo({key:ct}))}},{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 ct,Lt=this.state,et=Lt.focused,it=Lt.flattenNodes,Bt=Lt.keyEntities,Dt=Lt.draggingNodeKey,ft=Lt.activeKey,$t=Lt.dropLevelOffset,xn=Lt.dropContainerKey,an=Lt.dropTargetKey,Jt=Lt.dropPosition,Tn=Lt.dragOverNodeKey,Kn=Lt.indent,dn=this.props,Qn=dn.prefixCls,pi=dn.className,zn=dn.style,Nn=dn.showLine,yi=dn.focusable,Zi=dn.tabIndex,Hi=Zi===void 0?0:Zi,cr=dn.selectable,br=dn.showIcon,gi=dn.icon,di=dn.switcherIcon,wi=dn.draggable,Qi=dn.checkable,Li=dn.checkStrictly,ro=dn.disabled,fr=dn.motion,Ae=dn.loadData,Ei=dn.filterTreeNode,Sr=dn.height,Fn=dn.itemHeight,xi=dn.virtual,zi=dn.titleRender,qi=dn.dropIndicatorRender,Gn=dn.onContextMenu,ti=dn.onScroll,Zt=dn.direction,Wt=dn.rootClassName,Qe=dn.rootStyle,on=(0,Oe.Z)(this.props,{aria:!0,data:!0}),cn;return wi&&((0,He.Z)(wi)==="object"?cn=wi:typeof wi=="function"?cn={nodeDraggable:wi}:cn={}),ee.createElement(de.k.Provider,{value:{prefixCls:Qn,selectable:cr,showIcon:br,icon:gi,switcherIcon:di,draggable:cn,draggingNodeKey:Dt,checkable:Qi,checkStrictly:Li,disabled:ro,keyEntities:Bt,dropLevelOffset:$t,dropContainerKey:xn,dropTargetKey:an,dropPosition:Jt,dragOverNodeKey:Tn,indent:Kn,direction:Zt,dropIndicatorRender:qi,loadData:Ae,filterTreeNode:Ei,titleRender:zi,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},ee.createElement("div",{role:"tree",className:lt()(Qn,pi,Wt,(ct={},(0,Te.Z)(ct,"".concat(Qn,"-show-line"),Nn),(0,Te.Z)(ct,"".concat(Qn,"-focused"),et),(0,Te.Z)(ct,"".concat(Qn,"-active-focused"),ft!==null),ct)),style:Qe},ee.createElement(Wn,(0,le.Z)({ref:this.listRef,prefixCls:Qn,style:zn,data:it,disabled:ro,selectable:cr,checkable:!!Qi,motion:fr,dragging:Dt!==null,height:Sr,itemHeight:Fn,virtual:xi,focusable:yi,focused:et,tabIndex:Hi,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Gn,onScroll:ti},this.getTreeNodeRequiredProps(),on))))}}],[{key:"getDerivedStateFromProps",value:function(ct,Lt){var et=Lt.prevProps,it={prevProps:ct};function Bt(yi){return!et&&yi in ct||et&&et[yi]!==ct[yi]}var Dt,ft=Lt.fieldNames;if(Bt("fieldNames")&&(ft=(0,Ye.w$)(ct.fieldNames),it.fieldNames=ft),Bt("treeData")?Dt=ct.treeData:Bt("children")&&((0,te.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Dt=(0,Ye.zn)(ct.children)),Dt){it.treeData=Dt;var $t=(0,Ye.I8)(Dt,{fieldNames:ft});it.keyEntities=(0,ut.Z)((0,Te.Z)({},qe,_t),$t.keyEntities)}var xn=it.keyEntities||Lt.keyEntities;if(Bt("expandedKeys")||et&&Bt("autoExpandParent"))it.expandedKeys=ct.autoExpandParent||!et&&ct.defaultExpandParent?(0,un.r7)(ct.expandedKeys,xn):ct.expandedKeys;else if(!et&&ct.defaultExpandAll){var an=(0,ut.Z)({},xn);delete an[qe],it.expandedKeys=Object.keys(an).map(function(yi){return an[yi].key})}else!et&&ct.defaultExpandedKeys&&(it.expandedKeys=ct.autoExpandParent||ct.defaultExpandParent?(0,un.r7)(ct.defaultExpandedKeys,xn):ct.defaultExpandedKeys);if(it.expandedKeys||delete it.expandedKeys,Dt||it.expandedKeys){var Jt=(0,Ye.oH)(Dt||Lt.treeData,it.expandedKeys||Lt.expandedKeys,ft);it.flattenNodes=Jt}if(ct.selectable&&(Bt("selectedKeys")?it.selectedKeys=(0,un.BT)(ct.selectedKeys,ct):!et&&ct.defaultSelectedKeys&&(it.selectedKeys=(0,un.BT)(ct.defaultSelectedKeys,ct))),ct.checkable){var Tn;if(Bt("checkedKeys")?Tn=(0,un.E6)(ct.checkedKeys)||{}:!et&&ct.defaultCheckedKeys?Tn=(0,un.E6)(ct.defaultCheckedKeys)||{}:Dt&&(Tn=(0,un.E6)(ct.checkedKeys)||{checkedKeys:Lt.checkedKeys,halfCheckedKeys:Lt.halfCheckedKeys}),Tn){var Kn=Tn,dn=Kn.checkedKeys,Qn=dn===void 0?[]:dn,pi=Kn.halfCheckedKeys,zn=pi===void 0?[]:pi;if(!ct.checkStrictly){var Nn=(0,kn.S)(Qn,!0,xn);Qn=Nn.checkedKeys,zn=Nn.halfCheckedKeys}it.checkedKeys=Qn,it.halfCheckedKeys=zn}}return Bt("loadedKeys")&&(it.loadedKeys=ct.loadedKeys),it}}]),Ie}(ee.Component);ci.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},ci.TreeNode=je.Z;var Ge=ci,be=Ge},35654:function(On,mn,pe){"use strict";pe.d(mn,{BT:function(){return ee},E6:function(){return he},L0:function(){return $e},OM:function(){return te},_5:function(){return Pt},r7:function(){return ve},wA:function(){return lt},yx:function(){return Ft}});var le=pe(26407),Te=pe(39559),He=pe(48736),ut=pe(59301),We=pe(39417),Ue=pe(67841),Me=pe(71430),Ct=null;function Pt(Ee,Be){if(!Ee)return[];var Le=Ee.slice(),ze=Le.indexOf(Be);return ze>=0&&Le.splice(ze,1),Le}function $e(Ee,Be){var Le=(Ee||[]).slice();return Le.indexOf(Be)===-1&&Le.push(Be),Le}function Ft(Ee){return Ee.split("-")}function lt(Ee,Be){var Le=[],ze=(0,Ue.Z)(Be,Ee);function je(){var Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Xe.forEach(function(Ye){var dt=Ye.key,Ze=Ye.children;Le.push(dt),je(Ze)})}return je(ze.children),Le}function vt(Ee){if(Ee.parent){var Be=Ft(Ee.pos);return Number(Be[Be.length-1])===Ee.parent.children.length-1}return!1}function Oe(Ee){var Be=Ft(Ee.pos);return Number(Be[Be.length-1])===0}function te(Ee,Be,Le,ze,je,Xe,Ye,dt,Ze,Nt){var at,kt=Ee.clientX,xt=Ee.clientY,Ot=Ee.target.getBoundingClientRect(),Gt=Ot.top,At=Ot.height,qe=(Nt==="rtl"?-1:1)*(((je==null?void 0:je.x)||0)-kt),Ve=(qe-12)/ze,_t=(0,Ue.Z)(dt,Le.props.eventKey);if(xt<Gt+At/2){var vn=Ye.findIndex(function(be){return be.key===_t.key}),yn=vn<=0?0:vn-1,jt=Ye[yn].key;_t=(0,Ue.Z)(dt,jt)}var en=_t.key,ln=_t,Wn=_t.key,un=0,kn=0;if(!Ze.includes(en))for(var wt=0;wt<Ve&&vt(_t);wt+=1)_t=_t.parent,kn+=1;var jn=Be.props.data,ci=_t.node,Ge=!0;return Oe(_t)&&_t.level===0&&xt<Gt+At/2&&Xe({dragNode:jn,dropNode:ci,dropPosition:-1})&&_t.key===Le.props.eventKey?un=-1:(ln.children||[]).length&&Ze.includes(Wn)?Xe({dragNode:jn,dropNode:ci,dropPosition:0})?un=0:Ge=!1:kn===0?Ve>-1.5?Xe({dragNode:jn,dropNode:ci,dropPosition:1})?un=1:Ge=!1:Xe({dragNode:jn,dropNode:ci,dropPosition:0})?un=0:Xe({dragNode:jn,dropNode:ci,dropPosition:1})?un=1:Ge=!1:Xe({dragNode:jn,dropNode:ci,dropPosition:1})?un=1:Ge=!1,{dropPosition:un,dropLevelOffset:kn,dropTargetKey:_t.key,dropTargetPos:_t.pos,dragOverNodeKey:Wn,dropContainerKey:un===0?null:((at=_t.parent)===null||at===void 0?void 0:at.key)||null,dropAllowed:Ge}}function ee(Ee,Be){if(Ee){var Le=Be.multiple;return Le?Ee.slice():Ee.length?[Ee[0]]:Ee}}var de=function(Be){return Be};function se(Ee,Be){if(!Ee)return[];var Le=Be||{},ze=Le.processProps,je=ze===void 0?de:ze,Xe=Array.isArray(Ee)?Ee:[Ee];return Xe.map(function(Ye){var dt=Ye.children,Ze=_objectWithoutProperties(Ye,Ct),Nt=se(dt,Be);return React.createElement(TreeNode,_extends({key:Ze.key},je(Ze)),Nt)})}function he(Ee){if(!Ee)return null;var Be;if(Array.isArray(Ee))Be={checkedKeys:Ee,halfCheckedKeys:void 0};else if((0,Te.Z)(Ee)==="object")Be={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 Be}function ve(Ee,Be){var Le=new Set;function ze(je){if(!Le.has(je)){var Xe=(0,Ue.Z)(Be,je);if(Xe){Le.add(je);var Ye=Xe.parent,dt=Xe.node;dt.disabled||Ye&&ze(Ye.key)}}}return(Ee||[]).forEach(function(je){ze(je)}),(0,le.Z)(Le)}},90782:function(On,mn,pe){"use strict";pe.d(mn,{S:function(){return Me}});var le=pe(48736),Te=pe(67841);function He(Ct,Pt){var $e=new Set;return Ct.forEach(function(Ft){Pt.has(Ft)||$e.add(Ft)}),$e}function ut(Ct){var Pt=Ct||{},$e=Pt.disabled,Ft=Pt.disableCheckbox,lt=Pt.checkable;return!!($e||Ft)||lt===!1}function We(Ct,Pt,$e,Ft){for(var lt=new Set(Ct),vt=new Set,Oe=0;Oe<=$e;Oe+=1){var te=Pt.get(Oe)||new Set;te.forEach(function(he){var ve=he.key,Ee=he.node,Be=he.children,Le=Be===void 0?[]:Be;lt.has(ve)&&!Ft(Ee)&&Le.filter(function(ze){return!Ft(ze.node)}).forEach(function(ze){lt.add(ze.key)})})}for(var ee=new Set,de=$e;de>=0;de-=1){var se=Pt.get(de)||new Set;se.forEach(function(he){var ve=he.parent,Ee=he.node;if(!(Ft(Ee)||!he.parent||ee.has(he.parent.key))){if(Ft(he.parent.node)){ee.add(ve.key);return}var Be=!0,Le=!1;(ve.children||[]).filter(function(ze){return!Ft(ze.node)}).forEach(function(ze){var je=ze.key,Xe=lt.has(je);Be&&!Xe&&(Be=!1),!Le&&(Xe||vt.has(je))&&(Le=!0)}),Be&&lt.add(ve.key),Le&&vt.add(ve.key),ee.add(ve.key)}})}return{checkedKeys:Array.from(lt),halfCheckedKeys:Array.from(He(vt,lt))}}function Ue(Ct,Pt,$e,Ft,lt){for(var vt=new Set(Ct),Oe=new Set(Pt),te=0;te<=Ft;te+=1){var ee=$e.get(te)||new Set;ee.forEach(function(ve){var Ee=ve.key,Be=ve.node,Le=ve.children,ze=Le===void 0?[]:Le;!vt.has(Ee)&&!Oe.has(Ee)&&!lt(Be)&&ze.filter(function(je){return!lt(je.node)}).forEach(function(je){vt.delete(je.key)})})}Oe=new Set;for(var de=new Set,se=Ft;se>=0;se-=1){var he=$e.get(se)||new Set;he.forEach(function(ve){var Ee=ve.parent,Be=ve.node;if(!(lt(Be)||!ve.parent||de.has(ve.parent.key))){if(lt(ve.parent.node)){de.add(Ee.key);return}var Le=!0,ze=!1;(Ee.children||[]).filter(function(je){return!lt(je.node)}).forEach(function(je){var Xe=je.key,Ye=vt.has(Xe);Le&&!Ye&&(Le=!1),!ze&&(Ye||Oe.has(Xe))&&(ze=!0)}),Le||vt.delete(Ee.key),ze&&Oe.add(Ee.key),de.add(Ee.key)}})}return{checkedKeys:Array.from(vt),halfCheckedKeys:Array.from(He(Oe,vt))}}function Me(Ct,Pt,$e,Ft){var lt=[],vt;Ft?vt=Ft:vt=ut;var Oe=new Set(Ct.filter(function(se){var he=!!(0,Te.Z)($e,se);return he||lt.push(se),he})),te=new Map,ee=0;Object.keys($e).forEach(function(se){var he=$e[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)(!lt.length,"Tree missing follow keys: ".concat(lt.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var de;return Pt===!0?de=We(Oe,te,ee,vt):de=Ue(Oe,Pt.halfCheckedKeys,te,ee,vt),de}},67841:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return le}});function le(Te,He){return Te[He]}},71430:function(On,mn,pe){"use strict";pe.d(mn,{F:function(){return ve},H8:function(){return he},I8:function(){return se},km:function(){return lt},oH:function(){return ee},w$:function(){return vt},zn:function(){return te}});var le=pe(39559),Te=pe(26407),He=pe(33708),ut=pe(37061),We=pe(11592),Ue=pe(2738),Me=pe(48736),Ct=pe(67841),Pt=["children"];function $e(Ee,Be){return"".concat(Ee,"-").concat(Be)}function Ft(Ee){return Ee&&Ee.type&&Ee.type.isTreeNode}function lt(Ee,Be){return Ee!=null?Ee:Be}function vt(Ee){var Be=Ee||{},Le=Be.title,ze=Be._title,je=Be.key,Xe=Be.children,Ye=Le||"title";return{title:Ye,_title:ze||[Ye],key:je||"key",children:Xe||"children"}}function Oe(Ee,Be){var Le=new Map;function ze(je){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(je||[]).forEach(function(Ye){var dt=Ye[Be.key],Ze=Ye[Be.children];warning(dt!=null,"Tree node must have a certain key: [".concat(Xe).concat(dt,"]"));var Nt=String(dt);warning(!Le.has(Nt)||dt===null||dt===void 0,"Same 'key' exist in the Tree: ".concat(Nt)),Le.set(Nt,!0),ze(Ze,"".concat(Xe).concat(Nt," > "))})}ze(Ee)}function te(Ee){function Be(Le){var ze=(0,We.Z)(Le);return ze.map(function(je){if(!Ft(je))return(0,Me.ZP)(!je,"Tree/TreeNode can only accept TreeNode as children."),null;var Xe=je.key,Ye=je.props,dt=Ye.children,Ze=(0,ut.Z)(Ye,Pt),Nt=(0,He.Z)({key:Xe},Ze),at=Be(dt);return at.length&&(Nt.children=at),Nt}).filter(function(je){return je})}return Be(Ee)}function ee(Ee,Be,Le){var ze=vt(Le),je=ze._title,Xe=ze.key,Ye=ze.children,dt=new Set(Be===!0?[]:Be),Ze=[];function Nt(at){var kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return at.map(function(xt,Ot){for(var Gt=$e(kt?kt.pos:"0",Ot),At=lt(xt[Xe],Gt),qe,Ve=0;Ve<je.length;Ve+=1){var _t=je[Ve];if(xt[_t]!==void 0){qe=xt[_t];break}}var vn=(0,He.Z)((0,He.Z)({},(0,Ue.Z)(xt,[].concat((0,Te.Z)(je),[Xe,Ye]))),{},{title:qe,key:At,parent:kt,pos:Gt,children:null,data:xt,isStart:[].concat((0,Te.Z)(kt?kt.isStart:[]),[Ot===0]),isEnd:[].concat((0,Te.Z)(kt?kt.isEnd:[]),[Ot===at.length-1])});return Ze.push(vn),Be===!0||dt.has(At)?vn.children=Nt(xt[Ye]||[],vn):vn.children=[],vn})}return Nt(Ee),Ze}function de(Ee,Be,Le){var ze={};(0,le.Z)(Le)==="object"?ze=Le:ze={externalGetKey:Le},ze=ze||{};var je=ze,Xe=je.childrenPropName,Ye=je.externalGetKey,dt=je.fieldNames,Ze=vt(dt),Nt=Ze.key,at=Ze.children,kt=Xe||at,xt;Ye?typeof Ye=="string"?xt=function(At){return At[Ye]}:typeof Ye=="function"&&(xt=function(At){return Ye(At)}):xt=function(At,qe){return lt(At[Nt],qe)};function Ot(Gt,At,qe,Ve){var _t=Gt?Gt[kt]:Ee,vn=Gt?$e(qe.pos,At):"0",yn=Gt?[].concat((0,Te.Z)(Ve),[Gt]):[];if(Gt){var jt=xt(Gt,vn),en={node:Gt,index:At,pos:vn,key:jt,parentPos:qe.node?qe.pos:null,level:qe.level+1,nodes:yn};Be(en)}_t&&_t.forEach(function(ln,Wn){Ot(ln,Wn,{node:Gt,pos:vn,level:qe?qe.level+1:-1},yn)})}Ot(null)}function se(Ee){var Be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Le=Be.initWrapper,ze=Be.processEntity,je=Be.onProcessFinished,Xe=Be.externalGetKey,Ye=Be.childrenPropName,dt=Be.fieldNames,Ze=arguments.length>2?arguments[2]:void 0,Nt=Xe||Ze,at={},kt={},xt={posEntities:at,keyEntities:kt};return Le&&(xt=Le(xt)||xt),de(Ee,function(Ot){var Gt=Ot.node,At=Ot.index,qe=Ot.pos,Ve=Ot.key,_t=Ot.parentPos,vn=Ot.level,yn=Ot.nodes,jt={node:Gt,nodes:yn,index:At,key:Ve,pos:qe,level:vn},en=lt(Ve,qe);at[qe]=jt,kt[en]=jt,jt.parent=at[_t],jt.parent&&(jt.parent.children=jt.parent.children||[],jt.parent.children.push(jt)),ze&&ze(jt,xt)},{externalGetKey:Nt,childrenPropName:Ye,fieldNames:dt}),je&&je(xt),xt}function he(Ee,Be){var Le=Be.expandedKeys,ze=Be.selectedKeys,je=Be.loadedKeys,Xe=Be.loadingKeys,Ye=Be.checkedKeys,dt=Be.halfCheckedKeys,Ze=Be.dragOverNodeKey,Nt=Be.dropPosition,at=Be.keyEntities,kt=(0,Ct.Z)(at,Ee),xt={eventKey:Ee,expanded:Le.indexOf(Ee)!==-1,selected:ze.indexOf(Ee)!==-1,loaded:je.indexOf(Ee)!==-1,loading:Xe.indexOf(Ee)!==-1,checked:Ye.indexOf(Ee)!==-1,halfChecked:dt.indexOf(Ee)!==-1,pos:String(kt?kt.pos:""),dragOver:Ze===Ee&&Nt===0,dragOverGapTop:Ze===Ee&&Nt===-1,dragOverGapBottom:Ze===Ee&&Nt===1};return xt}function ve(Ee){var Be=Ee.data,Le=Ee.expanded,ze=Ee.selected,je=Ee.checked,Xe=Ee.loaded,Ye=Ee.loading,dt=Ee.halfChecked,Ze=Ee.dragOver,Nt=Ee.dragOverGapTop,at=Ee.dragOverGapBottom,kt=Ee.pos,xt=Ee.active,Ot=Ee.eventKey,Gt=(0,He.Z)((0,He.Z)({},Be),{},{expanded:Le,selected:ze,checked:je,loaded:Xe,loading:Ye,halfChecked:dt,dragOver:Ze,dragOverGapTop:Nt,dragOverGapBottom:at,pos:kt,active:xt,key:Ot});return"props"in Gt||Object.defineProperty(Gt,"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}}),Gt}},8224:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Te}});var le=pe(4676);function Te(He,ut,We,Ue){var Me=le.unstable_batchedUpdates?function(Pt){le.unstable_batchedUpdates(We,Pt)}:We;return He!=null&&He.addEventListener&&He.addEventListener(ut,Me,Ue),{remove:function(){He!=null&&He.removeEventListener&&He.removeEventListener(ut,Me,Ue)}}}},55468:function(On,mn,pe){"use strict";pe.d(mn,{g1:function(){return Ft},os:function(){return vt}});var le=/margin|padding|width|height|max|min|offset/,Te={left:!0,top:!0},He={cssFloat:1,styleFloat:1,float:1};function ut(Oe){return Oe.nodeType===1?Oe.ownerDocument.defaultView.getComputedStyle(Oe,null):{}}function We(Oe,te,ee){if(te=te.toLowerCase(),ee==="auto"){if(te==="height")return Oe.offsetHeight;if(te==="width")return Oe.offsetWidth}return te in Te||(Te[te]=le.test(te)),Te[te]?parseFloat(ee)||0:ee}function Ue(Oe,te){var ee=arguments.length,de=ut(Oe);return te=He[te]?"cssFloat"in Oe.style?"cssFloat":"styleFloat":te,ee===1?de:We(Oe,te,de[te]||Oe.style[te])}function Me(Oe,te,ee){var de=arguments.length;if(te=He[te]?"cssFloat"in Oe.style?"cssFloat":"styleFloat":te,de===3)return typeof ee=="number"&&le.test(te)&&(ee="".concat(ee,"px")),Oe.style[te]=ee,ee;for(var se in te)te.hasOwnProperty(se)&&Me(Oe,se,te[se]);return ut(Oe)}function Ct(Oe){return Oe===document.body?document.documentElement.clientWidth:Oe.offsetWidth}function Pt(Oe){return Oe===document.body?window.innerHeight||document.documentElement.clientHeight:Oe.offsetHeight}function $e(){var Oe=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),te=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Oe,height:te}}function Ft(){var Oe=document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight;return{width:Oe,height:te}}function lt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function vt(Oe){var te=Oe.getBoundingClientRect(),ee=document.documentElement;return{left:te.left+(window.pageXOffset||ee.scrollLeft)-(ee.clientLeft||document.body.clientLeft||0),top:te.top+(window.pageYOffset||ee.scrollTop)-(ee.clientTop||document.body.clientTop||0)}}},24514:function(On,mn,pe){"use strict";pe.d(mn,{G:function(){return ut}});var le=pe(47273),Te=function(Ue){if((0,le.Z)()&&window.document.documentElement){var Me=Array.isArray(Ue)?Ue:[Ue],Ct=window.document.documentElement;return Me.some(function(Pt){return Pt in Ct.style})}return!1},He=function(Ue,Me){if(!Te(Ue))return!1;var Ct=document.createElement("div"),Pt=Ct.style[Ue];return Ct.style[Ue]=Me,Ct.style[Ue]!==Pt};function ut(We,Ue){return!Array.isArray(We)&&Ue!==void 0?He(We,Ue):Te(We)}},4409:function(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ge}});var le=pe(92413),Te=pe(39559),He=pe(33708),ut=pe(400),We=pe(33606),Ue=pe(37061),Me=pe(92310),Ct=pe.n(Me),Pt=pe(29301),$e=pe(70425),Ft=pe(34280),lt=pe(59301),vt=pe(4676),Oe=lt.forwardRef(function(be,Pe){var Ne=be.height,Ie=be.offsetY,xe=be.offsetX,ct=be.children,Lt=be.prefixCls,et=be.onInnerResize,it=be.innerProps,Bt=be.rtl,Dt=be.extra,ft={},$t={display:"flex",flexDirection:"column"};return Ie!==void 0&&(ft={height:Ne,position:"relative",overflow:"hidden"},$t=(0,He.Z)((0,He.Z)({},$t),{},(0,ut.Z)((0,ut.Z)((0,ut.Z)((0,ut.Z)((0,ut.Z)({transform:"translateY(".concat(Ie,"px)")},Bt?"marginRight":"marginLeft",-xe),"position","absolute"),"left",0),"right",0),"top",0))),lt.createElement("div",{style:ft},lt.createElement(Pt.Z,{onResize:function(an){var Jt=an.offsetHeight;Jt&&et&&et()}},lt.createElement("div",(0,le.Z)({style:$t,className:Ct()((0,ut.Z)({},"".concat(Lt,"-holder-inner"),Lt)),ref:Pe},it),ct,Dt)))});Oe.displayName="Filler";var te=Oe;function ee(be){var Pe=be.children,Ne=be.setRef,Ie=lt.useCallback(function(xe){Ne(xe)},[]);return lt.cloneElement(Pe,{ref:Ie})}function de(be,Pe,Ne,Ie,xe,ct,Lt,et){var it=et.getKey;return be.slice(Pe,Ne+1).map(function(Bt,Dt){var ft=Pe+Dt,$t=Lt(Bt,ft,{style:{width:Ie},offsetX:xe}),xn=it(Bt);return lt.createElement(ee,{key:xn,setRef:function(Jt){return ct(Bt,Jt)}},$t)})}function se(be,Pe,Ne,Ie){var xe=Ne-be,ct=Pe-Ne,Lt=Math.min(xe,ct)*2;if(Ie<=Lt){var et=Math.floor(Ie/2);return Ie%2?Ne+et+1:Ne-et}return xe>ct?Ne-(Ie-ct):Ne+(Ie-xe)}function he(be,Pe,Ne){var Ie=be.length,xe=Pe.length,ct,Lt;if(Ie===0&&xe===0)return null;Ie<xe?(ct=be,Lt=Pe):(ct=Pe,Lt=be);var et={__EMPTY_ITEM__:!0};function it(an){return an!==void 0?Ne(an):et}for(var Bt=null,Dt=Math.abs(Ie-xe)!==1,ft=0;ft<Lt.length;ft+=1){var $t=it(ct[ft]),xn=it(Lt[ft]);if($t!==xn){Bt=ft,Dt=Dt||$t!==it(Lt[ft+1]);break}}return Bt===null?null:{index:Bt,multiple:Dt}}function ve(be,Pe,Ne){var Ie=lt.useState(be),xe=(0,We.Z)(Ie,2),ct=xe[0],Lt=xe[1],et=lt.useState(null),it=(0,We.Z)(et,2),Bt=it[0],Dt=it[1];return lt.useEffect(function(){var ft=he(ct||[],be||[],Pe);(ft==null?void 0:ft.index)!==void 0&&(Ne==null||Ne(ft.index),Dt(be[ft.index])),Lt(be)},[be]),[Bt]}var Ee=pe(16089),Be=(typeof navigator=="undefined"?"undefined":(0,Te.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Le=Be,ze=function(be,Pe,Ne,Ie){var xe=(0,lt.useRef)(!1),ct=(0,lt.useRef)(null);function Lt(){clearTimeout(ct.current),xe.current=!0,ct.current=setTimeout(function(){xe.current=!1},50)}var et=(0,lt.useRef)({top:be,bottom:Pe,left:Ne,right:Ie});return et.current.top=be,et.current.bottom=Pe,et.current.left=Ne,et.current.right=Ie,function(it,Bt){var Dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ft=it?Bt<0&&et.current.left||Bt>0&&et.current.right:Bt<0&&et.current.top||Bt>0&&et.current.bottom;return Dt&&ft?(clearTimeout(ct.current),xe.current=!1):(!ft||xe.current)&&Lt(),!xe.current&&ft}};function je(be,Pe,Ne,Ie,xe,ct,Lt){var et=(0,lt.useRef)(0),it=(0,lt.useRef)(null),Bt=(0,lt.useRef)(null),Dt=(0,lt.useRef)(!1),ft=ze(Pe,Ne,Ie,xe);function $t(dn,Qn){if(Ee.Z.cancel(it.current),!ft(!1,Qn)){var pi=dn;if(!pi._virtualHandled)pi._virtualHandled=!0;else return;et.current+=Qn,Bt.current=Qn,Le||pi.preventDefault(),it.current=(0,Ee.Z)(function(){var zn=Dt.current?10:1;Lt(et.current*zn,!1),et.current=0})}}function xn(dn,Qn){Lt(Qn,!0),Le||dn.preventDefault()}var an=(0,lt.useRef)(null),Jt=(0,lt.useRef)(null);function Tn(dn){if(be){Ee.Z.cancel(Jt.current),Jt.current=(0,Ee.Z)(function(){an.current=null},2);var Qn=dn.deltaX,pi=dn.deltaY,zn=dn.shiftKey,Nn=Qn,yi=pi;(an.current==="sx"||!an.current&&zn&&pi&&!Qn)&&(Nn=pi,yi=0,an.current="sx");var Zi=Math.abs(Nn),Hi=Math.abs(yi);an.current===null&&(an.current=ct&&Zi>Hi?"x":"y"),an.current==="y"?$t(dn,yi):xn(dn,Nn)}}function Kn(dn){be&&(Dt.current=dn.detail===Bt.current)}return[Tn,Kn]}function Xe(be,Pe,Ne,Ie){var xe=lt.useMemo(function(){return[new Map,[]]},[be,Ne.id,Ie]),ct=(0,We.Z)(xe,2),Lt=ct[0],et=ct[1],it=function(Dt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dt,$t=Lt.get(Dt),xn=Lt.get(ft);if($t===void 0||xn===void 0)for(var an=be.length,Jt=et.length;Jt<an;Jt+=1){var Tn,Kn=be[Jt],dn=Pe(Kn);Lt.set(dn,Jt);var Qn=(Tn=Ne.get(dn))!==null&&Tn!==void 0?Tn:Ie;if(et[Jt]=(et[Jt-1]||0)+Qn,dn===Dt&&($t=Jt),dn===ft&&(xn=Jt),$t!==void 0&&xn!==void 0)break}return{top:et[$t-1]||0,bottom:et[xn]}};return it}var Ye=pe(76846),dt=pe(6909),Ze=pe(4771),Nt=function(){function be(){(0,dt.Z)(this,be),(0,ut.Z)(this,"maps",void 0),(0,ut.Z)(this,"id",0),(0,ut.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Ze.Z)(be,[{key:"set",value:function(Ne,Ie){this.maps[Ne]=Ie,this.id+=1,this.diffKeys.add(Ne)}},{key:"get",value:function(Ne){return this.maps[Ne]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),be}(),at=Nt;function kt(be){var Pe=parseFloat(be);return isNaN(Pe)?0:Pe}function xt(be,Pe,Ne){var Ie=lt.useState(0),xe=(0,We.Z)(Ie,2),ct=xe[0],Lt=xe[1],et=(0,lt.useRef)(new Map),it=(0,lt.useRef)(new at),Bt=(0,lt.useRef)(0);function Dt(){Bt.current+=1}function ft(){var xn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Dt();var an=function(){var Kn=!1;et.current.forEach(function(dn,Qn){if(dn&&dn.offsetParent){var pi=(0,Ye.ZP)(dn),zn=pi.offsetHeight,Nn=getComputedStyle(pi),yi=Nn.marginTop,Zi=Nn.marginBottom,Hi=kt(yi),cr=kt(Zi),br=zn+Hi+cr;it.current.get(Qn)!==br&&(it.current.set(Qn,br),Kn=!0)}}),Kn&&Lt(function(dn){return dn+1})};if(xn)an();else{Bt.current+=1;var Jt=Bt.current;Promise.resolve().then(function(){Jt===Bt.current&&an()})}}function $t(xn,an){var Jt=be(xn),Tn=et.current.get(Jt);an?(et.current.set(Jt,an),ft()):et.current.delete(Jt),!Tn!=!an&&(an?Pe==null||Pe(xn):Ne==null||Ne(xn))}return(0,lt.useEffect)(function(){return Dt},[]),[$t,ft,it.current,ct]}var Ot=14/15;function Gt(be,Pe,Ne){var Ie=(0,lt.useRef)(!1),xe=(0,lt.useRef)(0),ct=(0,lt.useRef)(0),Lt=(0,lt.useRef)(null),et=(0,lt.useRef)(null),it,Bt=function(xn){if(Ie.current){var an=Math.ceil(xn.touches[0].pageX),Jt=Math.ceil(xn.touches[0].pageY),Tn=xe.current-an,Kn=ct.current-Jt,dn=Math.abs(Tn)>Math.abs(Kn);dn?xe.current=an:ct.current=Jt;var Qn=Ne(dn,dn?Tn:Kn,!1,xn);Qn&&xn.preventDefault(),clearInterval(et.current),Qn&&(et.current=setInterval(function(){dn?Tn*=Ot:Kn*=Ot;var pi=Math.floor(dn?Tn:Kn);(!Ne(dn,pi,!0)||Math.abs(pi)<=.1)&&clearInterval(et.current)},16))}},Dt=function(){Ie.current=!1,it()},ft=function(xn){it(),xn.touches.length===1&&!Ie.current&&(Ie.current=!0,xe.current=Math.ceil(xn.touches[0].pageX),ct.current=Math.ceil(xn.touches[0].pageY),Lt.current=xn.target,Lt.current.addEventListener("touchmove",Bt,{passive:!1}),Lt.current.addEventListener("touchend",Dt,{passive:!0}))};it=function(){Lt.current&&(Lt.current.removeEventListener("touchmove",Bt),Lt.current.removeEventListener("touchend",Dt))},(0,Ft.Z)(function(){return be&&Pe.current.addEventListener("touchstart",ft,{passive:!0}),function(){var $t;($t=Pe.current)===null||$t===void 0||$t.removeEventListener("touchstart",ft),it(),clearInterval(et.current)}},[be])}function At(be){return Math.floor(Math.pow(be,.5))}function qe(be,Pe){var Ne="touches"in be?be.touches[0]:be;return Ne[Pe?"pageX":"pageY"]-window[Pe?"scrollX":"scrollY"]}function Ve(be,Pe,Ne){lt.useEffect(function(){var Ie=Pe.current;if(be&&Ie){var xe=!1,ct,Lt,et=function(){Ee.Z.cancel(ct)},it=function $t(){et(),ct=(0,Ee.Z)(function(){Ne(Lt),$t()})},Bt=function(xn){if(!xn.target.draggable){var an=xn;an._virtualHandled||(an._virtualHandled=!0,xe=!0)}},Dt=function(){xe=!1,et()},ft=function(xn){if(xe){var an=qe(xn,!1),Jt=Ie.getBoundingClientRect(),Tn=Jt.top,Kn=Jt.bottom;if(an<=Tn){var dn=Tn-an;Lt=-At(dn),it()}else if(an>=Kn){var Qn=an-Kn;Lt=At(Qn),it()}else et()}};return Ie.addEventListener("mousedown",Bt),Ie.ownerDocument.addEventListener("mouseup",Dt),Ie.ownerDocument.addEventListener("mousemove",ft),function(){Ie.removeEventListener("mousedown",Bt),Ie.ownerDocument.removeEventListener("mouseup",Dt),Ie.ownerDocument.removeEventListener("mousemove",ft),et()}}},[be])}var _t=10;function vn(be,Pe,Ne,Ie,xe,ct,Lt,et){var it=lt.useRef(),Bt=lt.useState(null),Dt=(0,We.Z)(Bt,2),ft=Dt[0],$t=Dt[1];return(0,Ft.Z)(function(){if(ft&&ft.times<_t){if(!be.current){$t(function(Ae){return(0,He.Z)({},Ae)});return}ct();var xn=ft.targetAlign,an=ft.originAlign,Jt=ft.index,Tn=ft.offset,Kn=be.current.clientHeight,dn=!1,Qn=xn,pi=null;if(Kn){for(var zn=xn||an,Nn=0,yi=0,Zi=0,Hi=Math.min(Pe.length-1,Jt),cr=0;cr<=Hi;cr+=1){var br=xe(Pe[cr]);yi=Nn;var gi=Ne.get(br);Zi=yi+(gi===void 0?Ie:gi),Nn=Zi}for(var di=zn==="top"?Tn:Kn-Tn,wi=Hi;wi>=0;wi-=1){var Qi=xe(Pe[wi]),Li=Ne.get(Qi);if(Li===void 0){dn=!0;break}if(di-=Li,di<=0)break}switch(zn){case"top":pi=yi-Tn;break;case"bottom":pi=Zi-Kn+Tn;break;default:{var ro=be.current.scrollTop,fr=ro+Kn;yi<ro?Qn="top":Zi>fr&&(Qn="bottom")}}pi!==null&&Lt(pi),pi!==ft.lastTop&&(dn=!0)}dn&&$t((0,He.Z)((0,He.Z)({},ft),{},{times:ft.times+1,targetAlign:Qn,lastTop:pi}))}},[ft,be.current]),function(xn){if(xn==null){et();return}if(Ee.Z.cancel(it.current),typeof xn=="number")Lt(xn);else if(xn&&(0,Te.Z)(xn)==="object"){var an,Jt=xn.align;"index"in xn?an=xn.index:an=Pe.findIndex(function(dn){return xe(dn)===xn.key});var Tn=xn.offset,Kn=Tn===void 0?0:Tn;$t({times:0,index:an,offset:Kn,originAlign:Jt})}}}var yn=lt.forwardRef(function(be,Pe){var Ne=be.prefixCls,Ie=be.rtl,xe=be.scrollOffset,ct=be.scrollRange,Lt=be.onStartMove,et=be.onStopMove,it=be.onScroll,Bt=be.horizontal,Dt=be.spinSize,ft=be.containerSize,$t=be.style,xn=be.thumbStyle,an=be.showScrollBar,Jt=lt.useState(!1),Tn=(0,We.Z)(Jt,2),Kn=Tn[0],dn=Tn[1],Qn=lt.useState(null),pi=(0,We.Z)(Qn,2),zn=pi[0],Nn=pi[1],yi=lt.useState(null),Zi=(0,We.Z)(yi,2),Hi=Zi[0],cr=Zi[1],br=!Ie,gi=lt.useRef(),di=lt.useRef(),wi=lt.useState(an),Qi=(0,We.Z)(wi,2),Li=Qi[0],ro=Qi[1],fr=lt.useRef(),Ae=function(){an===!0||an===!1||(clearTimeout(fr.current),ro(!0),fr.current=setTimeout(function(){ro(!1)},3e3))},Ei=ct-ft||0,Sr=ft-Dt||0,Fn=lt.useMemo(function(){if(xe===0||Ei===0)return 0;var on=xe/Ei;return on*Sr},[xe,Ei,Sr]),xi=function(cn){cn.stopPropagation(),cn.preventDefault()},zi=lt.useRef({top:Fn,dragging:Kn,pageY:zn,startTop:Hi});zi.current={top:Fn,dragging:Kn,pageY:zn,startTop:Hi};var qi=function(cn){dn(!0),Nn(qe(cn,Bt)),cr(zi.current.top),Lt(),cn.stopPropagation(),cn.preventDefault()};lt.useEffect(function(){var on=function(nn){nn.preventDefault()},cn=gi.current,Mt=di.current;return cn.addEventListener("touchstart",on,{passive:!1}),Mt.addEventListener("touchstart",qi,{passive:!1}),function(){cn.removeEventListener("touchstart",on),Mt.removeEventListener("touchstart",qi)}},[]);var Gn=lt.useRef();Gn.current=Ei;var ti=lt.useRef();ti.current=Sr,lt.useEffect(function(){if(Kn){var on,cn=function(nn){var gn=zi.current,_n=gn.dragging,qn=gn.pageY,Et=gn.startTop;Ee.Z.cancel(on);var Pn=gi.current.getBoundingClientRect(),Xn=ft/(Bt?Pn.width:Pn.height);if(_n){var Ci=(qe(nn,Bt)-qn)*Xn,tn=Et;!br&&Bt?tn-=Ci:tn+=Ci;var sn=Gn.current,In=ti.current,ji=In?tn/In:0,Ai=Math.ceil(ji*sn);Ai=Math.max(Ai,0),Ai=Math.min(Ai,sn),on=(0,Ee.Z)(function(){it(Ai,Bt)})}},Mt=function(){dn(!1),et()};return window.addEventListener("mousemove",cn,{passive:!0}),window.addEventListener("touchmove",cn,{passive:!0}),window.addEventListener("mouseup",Mt,{passive:!0}),window.addEventListener("touchend",Mt,{passive:!0}),function(){window.removeEventListener("mousemove",cn),window.removeEventListener("touchmove",cn),window.removeEventListener("mouseup",Mt),window.removeEventListener("touchend",Mt),Ee.Z.cancel(on)}}},[Kn]),lt.useEffect(function(){return Ae(),function(){clearTimeout(fr.current)}},[xe]),lt.useImperativeHandle(Pe,function(){return{delayHidden:Ae}});var Zt="".concat(Ne,"-scrollbar"),Wt={position:"absolute",visibility:Li?null:"hidden"},Qe={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Bt?(Wt.height=8,Wt.left=0,Wt.right=0,Wt.bottom=0,Qe.height="100%",Qe.width=Dt,br?Qe.left=Fn:Qe.right=Fn):(Wt.width=8,Wt.top=0,Wt.bottom=0,br?Wt.right=0:Wt.left=0,Qe.width="100%",Qe.height=Dt,Qe.top=Fn),lt.createElement("div",{ref:gi,className:Ct()(Zt,(0,ut.Z)((0,ut.Z)((0,ut.Z)({},"".concat(Zt,"-horizontal"),Bt),"".concat(Zt,"-vertical"),!Bt),"".concat(Zt,"-visible"),Li)),style:(0,He.Z)((0,He.Z)({},Wt),$t),onMouseDown:xi,onMouseMove:Ae},lt.createElement("div",{ref:di,className:Ct()("".concat(Zt,"-thumb"),(0,ut.Z)({},"".concat(Zt,"-thumb-moving"),Kn)),style:(0,He.Z)((0,He.Z)({},Qe),xn),onMouseDown:qi}))}),jt=yn,en=20;function ln(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ne=be/Pe*be;return isNaN(Ne)&&(Ne=0),Ne=Math.max(Ne,en),Math.floor(Ne)}var Wn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],un=[],kn={overflowY:"auto",overflowAnchor:"none"};function wt(be,Pe){var Ne=be.prefixCls,Ie=Ne===void 0?"rc-virtual-list":Ne,xe=be.className,ct=be.height,Lt=be.itemHeight,et=be.fullHeight,it=et===void 0?!0:et,Bt=be.style,Dt=be.data,ft=be.children,$t=be.itemKey,xn=be.virtual,an=be.direction,Jt=be.scrollWidth,Tn=be.component,Kn=Tn===void 0?"div":Tn,dn=be.onScroll,Qn=be.onVirtualScroll,pi=be.onVisibleChange,zn=be.innerProps,Nn=be.extraRender,yi=be.styles,Zi=be.showScrollBar,Hi=Zi===void 0?"optional":Zi,cr=(0,Ue.Z)(be,Wn),br=lt.useCallback(function(bo){return typeof $t=="function"?$t(bo):bo==null?void 0:bo[$t]},[$t]),gi=xt(br,null,null),di=(0,We.Z)(gi,4),wi=di[0],Qi=di[1],Li=di[2],ro=di[3],fr=!!(xn!==!1&&ct&&Lt),Ae=lt.useMemo(function(){return Object.values(Li.maps).reduce(function(bo,wo){return bo+wo},0)},[Li.id,Li.maps]),Ei=fr&&Dt&&(Math.max(Lt*Dt.length,Ae)>ct||!!Jt),Sr=an==="rtl",Fn=Ct()(Ie,(0,ut.Z)({},"".concat(Ie,"-rtl"),Sr),xe),xi=Dt||un,zi=(0,lt.useRef)(),qi=(0,lt.useRef)(),Gn=(0,lt.useRef)(),ti=(0,lt.useState)(0),Zt=(0,We.Z)(ti,2),Wt=Zt[0],Qe=Zt[1],on=(0,lt.useState)(0),cn=(0,We.Z)(on,2),Mt=cn[0],ht=cn[1],nn=(0,lt.useState)(!1),gn=(0,We.Z)(nn,2),_n=gn[0],qn=gn[1],Et=function(){qn(!0)},Pn=function(){qn(!1)},Xn={getKey:br};function Ci(bo){Qe(function(wo){var Jr;typeof bo=="function"?Jr=bo(wo):Jr=bo;var ha=qr(Jr);return zi.current.scrollTop=ha,ha})}var tn=(0,lt.useRef)({start:0,end:xi.length}),sn=(0,lt.useRef)(),In=ve(xi,br),ji=(0,We.Z)(In,1),Ai=ji[0];sn.current=Ai;var Si=lt.useMemo(function(){if(!fr)return{scrollHeight:void 0,start:0,end:xi.length-1,offset:void 0};if(!Ei){var bo;return{scrollHeight:((bo=qi.current)===null||bo===void 0?void 0:bo.offsetHeight)||0,start:0,end:xi.length-1,offset:void 0}}for(var wo=0,Jr,ha,Ia,Eo=xi.length,Gr=0;Gr<Eo;Gr+=1){var mi=xi[Gr],oo=br(mi),ao=Li.get(oo),Ga=wo+(ao===void 0?Lt:ao);Ga>=Wt&&Jr===void 0&&(Jr=Gr,ha=wo),Ga>Wt+ct&&Ia===void 0&&(Ia=Gr),wo=Ga}return Jr===void 0&&(Jr=0,ha=0,Ia=Math.ceil(ct/Lt)),Ia===void 0&&(Ia=xi.length-1),Ia=Math.min(Ia+1,xi.length-1),{scrollHeight:wo,start:Jr,end:Ia,offset:ha}},[Ei,fr,Wt,xi,ro,ct]),ki=Si.scrollHeight,Ni=Si.start,ir=Si.end,zr=Si.offset;tn.current.start=Ni,tn.current.end=ir,lt.useLayoutEffect(function(){var bo=Li.getRecord();if(bo.size===1){var wo=Array.from(bo)[0],Jr=br(xi[Ni]);if(Jr===wo){var ha=Li.get(wo),Ia=ha-Lt;Ci(function(Eo){return Eo+Ia})}}Li.resetRecord()},[ki]);var Vr=lt.useState({width:0,height:ct}),Zn=(0,We.Z)(Vr,2),io=Zn[0],Yr=Zn[1],Fr=function(wo){Yr({width:wo.offsetWidth,height:wo.offsetHeight})},wn=(0,lt.useRef)(),ri=(0,lt.useRef)(),Ui=lt.useMemo(function(){return ln(io.width,Jt)},[io.width,Jt]),Pr=lt.useMemo(function(){return ln(io.height,ki)},[io.height,ki]),er=ki-ct,Cr=(0,lt.useRef)(er);Cr.current=er;function qr(bo){var wo=bo;return Number.isNaN(Cr.current)||(wo=Math.min(wo,Cr.current)),wo=Math.max(wo,0),wo}var Zr=Wt<=0,Ir=Wt>=er,Ur=Mt<=0,Vn=Mt>=Jt,Xo=ze(Zr,Ir,Ur,Vn),Un=function(){return{x:Sr?-Mt:Mt,y:Wt}},Io=(0,lt.useRef)(Un()),Go=(0,$e.useEvent)(function(bo){if(Qn){var wo=(0,He.Z)((0,He.Z)({},Un()),bo);(Io.current.x!==wo.x||Io.current.y!==wo.y)&&(Qn(wo),Io.current=wo)}});function tr(bo,wo){var Jr=bo;wo?((0,vt.flushSync)(function(){ht(Jr)}),Go()):Ci(Jr)}function ia(bo){var wo=bo.currentTarget.scrollTop;wo!==Wt&&Ci(wo),dn==null||dn(bo),Go()}var zo=function(wo){var Jr=wo,ha=Jt?Jt-io.width:0;return Jr=Math.max(Jr,0),Jr=Math.min(Jr,ha),Jr},Nr=(0,$e.useEvent)(function(bo,wo){wo?((0,vt.flushSync)(function(){ht(function(Jr){var ha=Jr+(Sr?-bo:bo);return zo(ha)})}),Go()):Ci(function(Jr){var ha=Jr+bo;return ha})}),Br=je(fr,Zr,Ir,Ur,Vn,!!Jt,Nr),xo=(0,We.Z)(Br,2),$o=xo[0],$i=xo[1];Gt(fr,zi,function(bo,wo,Jr,ha){var Ia=ha;return Xo(bo,wo,Jr)?!1:!Ia||!Ia._virtualHandled?(Ia&&(Ia._virtualHandled=!0),$o({preventDefault:function(){},deltaX:bo?wo:0,deltaY:bo?0:wo}),!0):!1}),Ve(Ei,zi,function(bo){Ci(function(wo){return wo+bo})}),(0,Ft.Z)(function(){function bo(Jr){var ha=Zr&&Jr.detail<0,Ia=Ir&&Jr.detail>0;fr&&!ha&&!Ia&&Jr.preventDefault()}var wo=zi.current;return wo.addEventListener("wheel",$o,{passive:!1}),wo.addEventListener("DOMMouseScroll",$i,{passive:!0}),wo.addEventListener("MozMousePixelScroll",bo,{passive:!1}),function(){wo.removeEventListener("wheel",$o),wo.removeEventListener("DOMMouseScroll",$i),wo.removeEventListener("MozMousePixelScroll",bo)}},[fr,Zr,Ir]),(0,Ft.Z)(function(){if(Jt){var bo=zo(Mt);ht(bo),Go({x:bo})}},[io.width,Jt]);var st=function(){var wo,Jr;(wo=wn.current)===null||wo===void 0||wo.delayHidden(),(Jr=ri.current)===null||Jr===void 0||Jr.delayHidden()},ra=vn(zi,xi,Li,Lt,br,function(){return Qi(!0)},Ci,st);lt.useImperativeHandle(Pe,function(){return{nativeElement:Gn.current,getScrollInfo:Un,scrollTo:function(wo){function Jr(ha){return ha&&(0,Te.Z)(ha)==="object"&&("left"in ha||"top"in ha)}Jr(wo)?(wo.left!==void 0&&ht(zo(wo.left)),ra(wo.top)):ra(wo)}}}),(0,Ft.Z)(function(){if(pi){var bo=xi.slice(Ni,ir+1);pi(bo,xi)}},[Ni,ir,xi]);var va=Xe(xi,br,Li,Lt),Ma=Nn==null?void 0:Nn({start:Ni,end:ir,virtual:Ei,offsetX:Mt,offsetY:zr,rtl:Sr,getSize:va}),Ps=de(xi,Ni,ir,Jt,Mt,wi,ft,Xn),Ha=null;ct&&(Ha=(0,He.Z)((0,ut.Z)({},it?"height":"maxHeight",ct),kn),fr&&(Ha.overflowY="hidden",Jt&&(Ha.overflowX="hidden"),_n&&(Ha.pointerEvents="none")));var Ms={};return Sr&&(Ms.dir="rtl"),lt.createElement("div",(0,le.Z)({ref:Gn,style:(0,He.Z)((0,He.Z)({},Bt),{},{position:"relative"}),className:Fn},Ms,cr),lt.createElement(Pt.Z,{onResize:Fr},lt.createElement(Kn,{className:"".concat(Ie,"-holder"),style:Ha,ref:zi,onScroll:ia,onMouseEnter:st},lt.createElement(te,{prefixCls:Ie,height:ki,offsetX:Mt,offsetY:zr,scrollWidth:Jt,onInnerResize:Qi,ref:qi,innerProps:zn,rtl:Sr,extra:Ma},Ps))),Ei&&ki>ct&&lt.createElement(jt,{ref:wn,prefixCls:Ie,scrollOffset:Wt,scrollRange:ki,rtl:Sr,onScroll:tr,onStartMove:Et,onStopMove:Pn,spinSize:Pr,containerSize:io.height,style:yi==null?void 0:yi.verticalScrollBar,thumbStyle:yi==null?void 0:yi.verticalScrollBarThumb,showScrollBar:Hi}),Ei&&Jt>io.width&&lt.createElement(jt,{ref:ri,prefixCls:Ie,scrollOffset:Mt,scrollRange:Jt,rtl:Sr,onScroll:tr,onStartMove:Et,onStopMove:Pn,spinSize:Ui,containerSize:io.width,horizontal:!0,style:yi==null?void 0:yi.horizontalScrollBar,thumbStyle:yi==null?void 0:yi.horizontalScrollBarThumb,showScrollBar:Hi}))}var jn=lt.forwardRef(wt);jn.displayName="List";var ci=jn,Ge=ci},78113:function(On,mn,pe){"use strict";pe.d(mn,{Z5:function(){return wg},_l:function(){return hu},bK:function(){return Pc}});var le=pe(59301),Te=pe(2505);function He(Se,Ce){Se.prototype=Object.create(Ce.prototype),Se.prototype.constructor=Se,(0,Te.Z)(Se,Ce)}var ut=pe(92413),We=pe(59781),Ue=le.createContext(null),Me=null;function Ct(Se){Se()}var Pt=Ct,$e=function(Ce){return Pt=Ce},Ft=function(){return Pt};function lt(){var Se=Ft(),Ce=null,ke=null;return{clear:function(){Ce=null,ke=null},notify:function(){Se(function(){for(var St=Ce;St;)St.callback(),St=St.next})},get:function(){for(var St=[],yt=Ce;yt;)St.push(yt),yt=yt.next;return St},subscribe:function(St){var yt=!0,Tt=ke={callback:St,next:null,prev:ke};return Tt.prev?Tt.prev.next=Tt:Ce=Tt,function(){!yt||Ce===null||(yt=!1,Tt.next?Tt.next.prev=Tt.prev:ke=Tt.prev,Tt.prev?Tt.prev.next=Tt.next:Ce=Tt.next)}}}}var vt={notify:function(){},get:function(){return[]}};function Oe(Se,Ce){var ke,Ke=vt;function St(bn){return Sn(),Ke.subscribe(bn)}function yt(){Ke.notify()}function Tt(){An.onStateChange&&An.onStateChange()}function Ht(){return!!ke}function Sn(){ke||(ke=Ce?Ce.addNestedSub(Tt):Se.subscribe(Tt),Ke=lt())}function Hn(){ke&&(ke(),ke=void 0,Ke.clear(),Ke=vt)}var An={addNestedSub:St,notifyNestedSubs:yt,handleChangeWrapper:Tt,isSubscribed:Ht,trySubscribe:Sn,tryUnsubscribe:Hn,getListeners:function(){return Ke}};return An}var te=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?le.useLayoutEffect:le.useEffect;function ee(Se){var Ce=Se.store,ke=Se.context,Ke=Se.children,St=(0,le.useMemo)(function(){var Ht=Oe(Ce);return{store:Ce,subscription:Ht}},[Ce]),yt=(0,le.useMemo)(function(){return Ce.getState()},[Ce]);te(function(){var Ht=St.subscription;return Ht.onStateChange=Ht.notifyNestedSubs,Ht.trySubscribe(),yt!==Ce.getState()&&Ht.notifyNestedSubs(),function(){Ht.tryUnsubscribe(),Ht.onStateChange=null}},[St,yt]);var Tt=ke||Ue;return le.createElement(Tt.Provider,{value:St},Ke)}var de=ee,se=pe(96529),he=pe(94266),ve=pe.n(he),Ee=pe(53410),Be=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Le=["reactReduxForwardedRef"],ze=[],je=[null,null],Xe=function(Ce){try{return JSON.stringify(Ce)}catch(ke){return String(Ce)}};function Ye(Se,Ce){var ke=Se[1];return[Ce.payload,ke+1]}function dt(Se,Ce,ke){te(function(){return Se.apply(void 0,Ce)},ke)}function Ze(Se,Ce,ke,Ke,St,yt,Tt){Se.current=Ke,Ce.current=St,ke.current=!1,yt.current&&(yt.current=null,Tt())}function Nt(Se,Ce,ke,Ke,St,yt,Tt,Ht,Sn,Hn){if(Se){var An=!1,bn=null,En=function(){if(!An){var $r=Ce.getState(),no,yo;try{no=Ke($r,St.current)}catch(To){yo=To,bn=To}yo||(bn=null),no===yt.current?Tt.current||Sn():(yt.current=no,Ht.current=no,Tt.current=!0,Hn({type:"STORE_UPDATED",payload:{error:yo}}))}};ke.onStateChange=En,ke.trySubscribe(),En();var ni=function(){if(An=!0,ke.tryUnsubscribe(),ke.onStateChange=null,bn)throw bn};return ni}}var at=function(){return[null,0]};function kt(Se,Ce){Ce===void 0&&(Ce={});var ke=Ce,Ke=ke.getDisplayName,St=Ke===void 0?function(cs){return"ConnectAdvanced("+cs+")"}:Ke,yt=ke.methodName,Tt=yt===void 0?"connectAdvanced":yt,Ht=ke.renderCountProp,Sn=Ht===void 0?void 0:Ht,Hn=ke.shouldHandleStateChanges,An=Hn===void 0?!0:Hn,bn=ke.storeKey,En=bn===void 0?"store":bn,ni=ke.withRef,Oi=ni===void 0?!1:ni,$r=ke.forwardRef,no=$r===void 0?!1:$r,yo=ke.context,To=yo===void 0?Ue:yo,ta=(0,se.Z)(ke,Be);if(0)var Qo;var Da=To;return function(Ts){var Ql=Ts.displayName||Ts.name||"Component",Is=St(Ql),Wl=(0,ut.Z)({},ta,{getDisplayName:St,methodName:Tt,renderCountProp:Sn,shouldHandleStateChanges:An,storeKey:En,displayName:Is,wrappedComponentName:Ql,WrappedComponent:Ts}),_u=ta.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,Le);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:Da},[Gl,Da]),da=(0,le.useContext)(gd),Wh=!!Il.store&&!!Il.store.getState&&!!Il.store.dispatch,Lg=!!da&&!!da.store,pd=Wh?Il.store:da.store,Qd=(0,le.useMemo)(function(){return Xu(pd)},[pd]),Fh=(0,le.useMemo)(function(){if(!An)return je;var Tl=Oe(pd,Wh?null:da.subscription),zc=Tl.notifyNestedSubs.bind(Tl);return[Tl,zc]},[pd,Wh,da]),Cc=Fh[0],Yf=Fh[1],Xf=(0,le.useMemo)(function(){return Wh?da:(0,ut.Z)({},da,{subscription:Cc})},[Wh,da,Cc]),op=(0,le.useReducer)(Ye,ze,at),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]);dt(Ze,[Ag,ap,Sf,vf,Dg,xf,Yf]),dt(Nt,[An,pd,Cc,Qd,Ag,ap,Sf,xf,Yf,yf],[pd,Cc,Qd]);var Xa=(0,le.useMemo)(function(){return le.createElement(Ts,(0,ut.Z)({},Dg,{ref:fd}))},[fd,Ts,Dg]),Ju=(0,le.useMemo)(function(){return An?le.createElement(gd.Provider,{value:Xf},Xa):Xa},[gd,Xa,Xf]);return Ju}var wc=_u?le.memo(Lc):Lc;if(wc.WrappedComponent=Ts,wc.displayName=Lc.displayName=Is,no){var gu=le.forwardRef(function(Nd,Gl){return le.createElement(wc,(0,ut.Z)({},Nd,{reactReduxForwardedRef:Gl}))});return gu.displayName=Is,gu.WrappedComponent=Ts,ve()(gu,Ts)}return ve()(wc,Ts)}}function xt(Se,Ce){return Se===Ce?Se!==0||Ce!==0||1/Se===1/Ce:Se!==Se&&Ce!==Ce}function Ot(Se,Ce){if(xt(Se,Ce))return!0;if(typeof Se!="object"||Se===null||typeof Ce!="object"||Ce===null)return!1;var ke=Object.keys(Se),Ke=Object.keys(Ce);if(ke.length!==Ke.length)return!1;for(var St=0;St<ke.length;St++)if(!Object.prototype.hasOwnProperty.call(Ce,ke[St])||!xt(Se[ke[St]],Ce[ke[St]]))return!1;return!0}function Gt(Se,Ce){var ke={},Ke=function(Tt){var Ht=Se[Tt];typeof Ht=="function"&&(ke[Tt]=function(){return Ce(Ht.apply(void 0,arguments))})};for(var St in Se)Ke(St);return ke}function At(Se){return function(ke,Ke){var St=Se(ke,Ke);function yt(){return St}return yt.dependsOnOwnProps=!1,yt}}function qe(Se){return Se.dependsOnOwnProps!==null&&Se.dependsOnOwnProps!==void 0?!!Se.dependsOnOwnProps:Se.length!==1}function Ve(Se,Ce){return function(Ke,St){var yt=St.displayName,Tt=function(Sn,Hn){return Tt.dependsOnOwnProps?Tt.mapToProps(Sn,Hn):Tt.mapToProps(Sn)};return Tt.dependsOnOwnProps=!0,Tt.mapToProps=function(Sn,Hn){Tt.mapToProps=Se,Tt.dependsOnOwnProps=qe(Se);var An=Tt(Sn,Hn);return typeof An=="function"&&(Tt.mapToProps=An,Tt.dependsOnOwnProps=qe(An),An=Tt(Sn,Hn)),An},Tt}}function _t(Se){return typeof Se=="function"?Ve(Se,"mapDispatchToProps"):void 0}function vn(Se){return Se?void 0:At(function(Ce){return{dispatch:Ce}})}function yn(Se){return Se&&typeof Se=="object"?At(function(Ce){return Gt(Se,Ce)}):void 0}var jt=[_t,vn,yn];function en(Se){return typeof Se=="function"?Ve(Se,"mapStateToProps"):void 0}function ln(Se){return Se?void 0:At(function(){return{}})}var Wn=[en,ln];function un(Se,Ce,ke){return(0,ut.Z)({},ke,Se,Ce)}function kn(Se){return function(ke,Ke){var St=Ke.displayName,yt=Ke.pure,Tt=Ke.areMergedPropsEqual,Ht=!1,Sn;return function(An,bn,En){var ni=Se(An,bn,En);return Ht?(!yt||!Tt(ni,Sn))&&(Sn=ni):(Ht=!0,Sn=ni),Sn}}}function wt(Se){return typeof Se=="function"?kn(Se):void 0}function jn(Se){return Se?void 0:function(){return un}}var ci=[wt,jn],Ge=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function be(Se,Ce,ke,Ke){return function(yt,Tt){return ke(Se(yt,Tt),Ce(Ke,Tt),Tt)}}function Pe(Se,Ce,ke,Ke,St){var yt=St.areStatesEqual,Tt=St.areOwnPropsEqual,Ht=St.areStatePropsEqual,Sn=!1,Hn,An,bn,En,ni;function Oi(ta,Qo){return Hn=ta,An=Qo,bn=Se(Hn,An),En=Ce(Ke,An),ni=ke(bn,En,An),Sn=!0,ni}function $r(){return bn=Se(Hn,An),Ce.dependsOnOwnProps&&(En=Ce(Ke,An)),ni=ke(bn,En,An),ni}function no(){return Se.dependsOnOwnProps&&(bn=Se(Hn,An)),Ce.dependsOnOwnProps&&(En=Ce(Ke,An)),ni=ke(bn,En,An),ni}function yo(){var ta=Se(Hn,An),Qo=!Ht(ta,bn);return bn=ta,Qo&&(ni=ke(bn,En,An)),ni}function To(ta,Qo){var Da=!Tt(Qo,An),cs=!yt(ta,Hn,Qo,An);return Hn=ta,An=Qo,Da&&cs?$r():Da?no():cs?yo():ni}return function(Qo,Da){return Sn?To(Qo,Da):Oi(Qo,Da)}}function Ne(Se,Ce){var ke=Ce.initMapStateToProps,Ke=Ce.initMapDispatchToProps,St=Ce.initMergeProps,yt=(0,se.Z)(Ce,Ge),Tt=ke(Se,yt),Ht=Ke(Se,yt),Sn=St(Se,yt),Hn=yt.pure?Pe:be;return Hn(Tt,Ht,Sn,Se,yt)}var Ie=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function xe(Se,Ce,ke){for(var Ke=Ce.length-1;Ke>=0;Ke--){var St=Ce[Ke](Se);if(St)return St}return function(yt,Tt){throw new Error("Invalid value of type "+typeof Se+" for "+ke+" argument when connecting component "+Tt.wrappedComponentName+".")}}function ct(Se,Ce){return Se===Ce}function Lt(Se){var Ce=Se===void 0?{}:Se,ke=Ce.connectHOC,Ke=ke===void 0?kt:ke,St=Ce.mapStateToPropsFactories,yt=St===void 0?Wn:St,Tt=Ce.mapDispatchToPropsFactories,Ht=Tt===void 0?jt:Tt,Sn=Ce.mergePropsFactories,Hn=Sn===void 0?ci:Sn,An=Ce.selectorFactory,bn=An===void 0?Ne:An;return function(ni,Oi,$r,no){no===void 0&&(no={});var yo=no,To=yo.pure,ta=To===void 0?!0:To,Qo=yo.areStatesEqual,Da=Qo===void 0?ct:Qo,cs=yo.areOwnPropsEqual,Ts=cs===void 0?Ot:cs,Ql=yo.areStatePropsEqual,Is=Ql===void 0?Ot:Ql,Wl=yo.areMergedPropsEqual,_u=Wl===void 0?Ot:Wl,Xu=(0,se.Z)(yo,Ie),hd=xe(ni,yt,"mapStateToProps"),Lc=xe(Oi,Ht,"mapDispatchToProps"),wc=xe($r,Hn,"mergeProps");return Ke(bn,(0,ut.Z)({methodName:"connect",getDisplayName:function(Il){return"Connect("+Il+")"},shouldHandleStateChanges:!!ni,initMapStateToProps:hd,initMapDispatchToProps:Lc,initMergeProps:wc,pure:ta,areStatesEqual:Da,areOwnPropsEqual:Ts,areStatePropsEqual:Is,areMergedPropsEqual:_u},Xu))}}var et=Lt();function it(){var Se=useContext(ReactReduxContext);return Se}function Bt(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(){var Ke=Ce(),St=Ke.store;return St}}var Dt=null;function ft(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultStore:createStoreHook(Se);return function(){var Ke=Ce();return Ke.dispatch}}var $t=null,xn=function(Ce,ke){return Ce===ke};function an(Se,Ce,ke,Ke){var St=useReducer(function(Oi){return Oi+1},0),yt=St[1],Tt=useMemo(function(){return createSubscription(ke,Ke)},[ke,Ke]),Ht=useRef(),Sn=useRef(),Hn=useRef(),An=useRef(),bn=ke.getState(),En;try{if(Se!==Sn.current||bn!==Hn.current||Ht.current){var ni=Se(bn);An.current===void 0||!Ce(ni,An.current)?En=ni:En=An.current}else En=An.current}catch(Oi){throw Ht.current&&(Oi.message+=`
The error may be correlated with this previous error:
`+Ht.current.stack+`
`),Oi}return useIsomorphicLayoutEffect(function(){Sn.current=Se,Hn.current=bn,An.current=En,Ht.current=void 0}),useIsomorphicLayoutEffect(function(){function Oi(){try{var $r=ke.getState();if($r===Hn.current)return;var no=Sn.current($r);if(Ce(no,An.current))return;An.current=no,Hn.current=$r}catch(yo){Ht.current=yo}yt()}return Tt.onStateChange=Oi,Tt.trySubscribe(),Oi(),function(){return Tt.tryUnsubscribe()}},[ke,Tt]),En}function Jt(Se){Se===void 0&&(Se=ReactReduxContext);var Ce=Se===ReactReduxContext?useDefaultReduxContext:function(){return useContext(Se)};return function(Ke,St){St===void 0&&(St=xn);var yt=Ce(),Tt=yt.store,Ht=yt.subscription,Sn=an(Ke,St,Tt,Ht);return useDebugValue(Sn),Sn}}var Tn=null,Kn=pe(4676);$e(Kn.unstable_batchedUpdates);function dn(Se,Ce){if(Se.length!==Ce.length)return!1;for(var ke=0;ke<Se.length;ke++)if(Se[ke]!==Ce[ke])return!1;return!0}function Qn(Se,Ce){var ke=(0,le.useState)(function(){return{inputs:Ce,result:Se()}})[0],Ke=(0,le.useRef)(!0),St=(0,le.useRef)(ke),yt=Ke.current||!!(Ce&&St.current.inputs&&dn(Ce,St.current.inputs)),Tt=yt?St.current:{inputs:Ce,result:Se()};return(0,le.useEffect)(function(){Ke.current=!1,St.current=Tt},[Tt]),Tt.result}function pi(Se,Ce){return Qn(function(){return Se},Ce)}var zn=Qn,Nn=pi,yi=!0,Zi="Invariant failed";function Hi(Se,Ce){if(!Se){if(yi)throw new Error(Zi);var ke=typeof Ce=="function"?Ce():Ce,Ke=ke?"".concat(Zi,": ").concat(ke):Zi;throw new Error(Ke)}}var cr=function(Ce){var ke=Ce.top,Ke=Ce.right,St=Ce.bottom,yt=Ce.left,Tt=Ke-yt,Ht=St-ke,Sn={top:ke,right:Ke,bottom:St,left:yt,width:Tt,height:Ht,x:yt,y:ke,center:{x:(Ke+yt)/2,y:(St+ke)/2}};return Sn},br=function(Ce,ke){return{top:Ce.top-ke.top,left:Ce.left-ke.left,bottom:Ce.bottom+ke.bottom,right:Ce.right+ke.right}},gi=function(Ce,ke){return{top:Ce.top+ke.top,left:Ce.left+ke.left,bottom:Ce.bottom-ke.bottom,right:Ce.right-ke.right}},di=function(Ce,ke){return{top:Ce.top+ke.y,left:Ce.left+ke.x,bottom:Ce.bottom+ke.y,right:Ce.right+ke.x}},wi={top:0,right:0,bottom:0,left:0},Qi=function(Ce){var ke=Ce.borderBox,Ke=Ce.margin,St=Ke===void 0?wi:Ke,yt=Ce.border,Tt=yt===void 0?wi:yt,Ht=Ce.padding,Sn=Ht===void 0?wi:Ht,Hn=cr(br(ke,St)),An=cr(gi(ke,Tt)),bn=cr(gi(An,Sn));return{marginBox:Hn,borderBox:cr(ke),paddingBox:An,contentBox:bn,margin:St,border:Tt,padding:Sn}},Li=function(Ce){var ke=Ce.slice(0,-2),Ke=Ce.slice(-2);if(Ke!=="px")return 0;var St=Number(ke);return isNaN(St)&&Hi(!1),St},ro=function(){return{x:window.pageXOffset,y:window.pageYOffset}},fr=function(Ce,ke){var Ke=Ce.borderBox,St=Ce.border,yt=Ce.margin,Tt=Ce.padding,Ht=di(Ke,ke);return Qi({borderBox:Ht,border:St,margin:yt,padding:Tt})},Ae=function(Ce,ke){return ke===void 0&&(ke=ro()),fr(Ce,ke)},Ei=function(Ce,ke){var Ke={top:Li(ke.marginTop),right:Li(ke.marginRight),bottom:Li(ke.marginBottom),left:Li(ke.marginLeft)},St={top:Li(ke.paddingTop),right:Li(ke.paddingRight),bottom:Li(ke.paddingBottom),left:Li(ke.paddingLeft)},yt={top:Li(ke.borderTopWidth),right:Li(ke.borderRightWidth),bottom:Li(ke.borderBottomWidth),left:Li(ke.borderLeftWidth)};return Qi({borderBox:Ce,margin:Ke,padding:St,border:yt})},Sr=function(Ce){var ke=Ce.getBoundingClientRect(),Ke=window.getComputedStyle(Ce);return Ei(ke,Ke)},Fn=Number.isNaN||function(Ce){return typeof Ce=="number"&&Ce!==Ce};function xi(Se,Ce){return!!(Se===Ce||Fn(Se)&&Fn(Ce))}function zi(Se,Ce){if(Se.length!==Ce.length)return!1;for(var ke=0;ke<Se.length;ke++)if(!xi(Se[ke],Ce[ke]))return!1;return!0}function qi(Se,Ce){Ce===void 0&&(Ce=zi);var ke,Ke=[],St,yt=!1;function Tt(){for(var Ht=[],Sn=0;Sn<arguments.length;Sn++)Ht[Sn]=arguments[Sn];return yt&&ke===this&&Ce(Ht,Ke)||(St=Se.apply(this,Ht),yt=!0,ke=this,Ke=Ht),St}return Tt}var Gn=qi,ti=function(Ce){var ke=[],Ke=null,St=function(){for(var Tt=arguments.length,Ht=new Array(Tt),Sn=0;Sn<Tt;Sn++)Ht[Sn]=arguments[Sn];ke=Ht,!Ke&&(Ke=requestAnimationFrame(function(){Ke=null,Ce.apply(void 0,ke)}))};return St.cancel=function(){Ke&&(cancelAnimationFrame(Ke),Ke=null)},St},Zt=ti,Wt=!0,Qe=/[ \t]{2,}/g,on=/^[ \t]*/gm,cn=function(Ce){return Ce.replace(Qe," ").replace(on,"").trim()},Mt=function(Ce){return cn(`
%creact-beautiful-dnd
%c`+cn(Ce)+`
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
`)},ht=function(Ce){return[Mt(Ce),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},nn="__react-beautiful-dnd-disable-dev-warnings";function gn(Se,Ce){var ke;Wt||typeof window!="undefined"&&window[nn]||(ke=console)[Se].apply(ke,ht(Ce))}var _n=gn.bind(null,"warn"),qn=gn.bind(null,"error");function Et(){}function Pn(Se,Ce){return(0,ut.Z)({},Se,{},Ce)}function Xn(Se,Ce,ke){var Ke=Ce.map(function(St){var yt=Pn(ke,St.options);return Se.addEventListener(St.eventName,St.fn,yt),function(){Se.removeEventListener(St.eventName,St.fn,yt)}});return function(){Ke.forEach(function(yt){yt()})}}var Ci=!0,tn="Invariant failed";function sn(Se){this.message=Se}sn.prototype.toString=function(){return this.message};function In(Se,Ce){if(!Se)throw Ci?new sn(tn):new sn(tn+": "+(Ce||""))}var ji=function(Se){He(Ce,Se);function Ce(){for(var Ke,St=arguments.length,yt=new Array(St),Tt=0;Tt<St;Tt++)yt[Tt]=arguments[Tt];return Ke=Se.call.apply(Se,[this].concat(yt))||this,Ke.callbacks=null,Ke.unbind=Et,Ke.onWindowError=function(Ht){var Sn=Ke.getCallbacks();Sn.isDragging()&&Sn.tryAbort();var Hn=Ht.error;Hn instanceof sn&&Ht.preventDefault()},Ke.getCallbacks=function(){if(!Ke.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return Ke.callbacks},Ke.setCallbacks=function(Ht){Ke.callbacks=Ht},Ke}var ke=Ce.prototype;return ke.componentDidMount=function(){this.unbind=Xn(window,[{eventName:"error",fn:this.onWindowError}])},ke.componentWillUnmount=function(){this.unbind()},ke.componentDidCatch=function(St){if(St instanceof sn){this.setState({});return}throw St},ke.render=function(){return this.props.children(this.setCallbacks)},Ce}(le.Component),Ai=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
`,Si=function(Ce){return Ce+1},ki=function(Ce){return`
You have lifted an item in position `+Si(Ce.source.index)+`
`},Ni=function(Ce,ke){var Ke=Ce.droppableId===ke.droppableId,St=Si(Ce.index),yt=Si(ke.index);return Ke?`
You have moved the item from position `+St+`
to position `+yt+`
`:`
You have moved the item from position `+St+`
in list `+Ce.droppableId+`
to list `+ke.droppableId+`
in position `+yt+`
`},ir=function(Ce,ke,Ke){var St=ke.droppableId===Ke.droppableId;return St?`
The item `+Ce+`
has been combined with `+Ke.draggableId:`
The item `+Ce+`
in list `+ke.droppableId+`
has been combined with `+Ke.draggableId+`
in list `+Ke.droppableId+`
`},zr=function(Ce){var ke=Ce.destination;if(ke)return Ni(Ce.source,ke);var Ke=Ce.combine;return Ke?ir(Ce.draggableId,Ce.source,Ke):"You are over an area that cannot be dropped on"},Vr=function(Ce){return`
The item has returned to its starting position
of `+Si(Ce.index)+`
`},Zn=function(Ce){if(Ce.reason==="CANCEL")return`
Movement cancelled.
`+Vr(Ce.source)+`
`;var ke=Ce.destination,Ke=Ce.combine;return ke?`
You have dropped the item.
`+Ni(Ce.source,ke)+`
`:Ke?`
You have dropped the item.
`+ir(Ce.draggableId,Ce.source,Ke)+`
`:`
The item has been dropped while not over a drop area.
`+Vr(Ce.source)+`
`},io={dragHandleUsageInstructions:Ai,onDragStart:ki,onDragUpdate:zr,onDragEnd:Zn},Yr={x:0,y:0},Fr=function(Ce,ke){return{x:Ce.x+ke.x,y:Ce.y+ke.y}},wn=function(Ce,ke){return{x:Ce.x-ke.x,y:Ce.y-ke.y}},ri=function(Ce,ke){return Ce.x===ke.x&&Ce.y===ke.y},Ui=function(Ce){return{x:Ce.x!==0?-Ce.x:0,y:Ce.y!==0?-Ce.y:0}},Pr=function(Ce,ke,Ke){var St;return Ke===void 0&&(Ke=0),St={},St[Ce]=ke,St[Ce==="x"?"y":"x"]=Ke,St},er=function(Ce,ke){return Math.sqrt(Math.pow(ke.x-Ce.x,2)+Math.pow(ke.y-Ce.y,2))},Cr=function(Ce,ke){return Math.min.apply(Math,ke.map(function(Ke){return er(Ce,Ke)}))},qr=function(Ce){return function(ke){return{x:Ce(ke.x),y:Ce(ke.y)}}},Zr=function(Se,Ce){var ke=cr({top:Math.max(Ce.top,Se.top),right:Math.min(Ce.right,Se.right),bottom:Math.min(Ce.bottom,Se.bottom),left:Math.max(Ce.left,Se.left)});return ke.width<=0||ke.height<=0?null:ke},Ir=function(Ce,ke){return{top:Ce.top+ke.y,left:Ce.left+ke.x,bottom:Ce.bottom+ke.y,right:Ce.right+ke.x}},Ur=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}]},Vn={top:0,right:0,bottom:0,left:0},Xo=function(Ce,ke){return ke?Ir(Ce,ke.scroll.diff.displacement):Ce},Un=function(Ce,ke,Ke){if(Ke&&Ke.increasedBy){var St;return(0,ut.Z)({},Ce,(St={},St[ke.end]=Ce[ke.end]+Ke.increasedBy[ke.line],St))}return Ce},Io=function(Ce,ke){return ke&&ke.shouldClipSubject?Zr(ke.pageMarginBox,Ce):cr(Ce)},Go=function(Se){var Ce=Se.page,ke=Se.withPlaceholder,Ke=Se.axis,St=Se.frame,yt=Xo(Ce.marginBox,St),Tt=Un(yt,Ke,ke),Ht=Io(Tt,St);return{page:Ce,withPlaceholder:ke,active:Ht}},tr=function(Se,Ce){Se.frame||In(!1);var ke=Se.frame,Ke=wn(Ce,ke.scroll.initial),St=Ui(Ke),yt=(0,ut.Z)({},ke,{scroll:{initial:ke.scroll.initial,current:Ce,diff:{value:Ke,displacement:St},max:ke.scroll.max}}),Tt=Go({page:Se.subject.page,withPlaceholder:Se.subject.withPlaceholder,axis:Se.axis,frame:yt}),Ht=(0,ut.Z)({},Se,{frame:yt,subject:Tt});return Ht};function ia(Se){return Number.isInteger?Number.isInteger(Se):typeof Se=="number"&&isFinite(Se)&&Math.floor(Se)===Se}function zo(Se){return Object.values?Object.values(Se):Object.keys(Se).map(function(Ce){return Se[Ce]})}function Nr(Se,Ce){if(Se.findIndex)return Se.findIndex(Ce);for(var ke=0;ke<Se.length;ke++)if(Ce(Se[ke]))return ke;return-1}function Br(Se,Ce){if(Se.find)return Se.find(Ce);var ke=Nr(Se,Ce);if(ke!==-1)return Se[ke]}function xo(Se){return Array.prototype.slice.call(Se)}var $o=Gn(function(Se){return Se.reduce(function(Ce,ke){return Ce[ke.descriptor.id]=ke,Ce},{})}),$i=Gn(function(Se){return Se.reduce(function(Ce,ke){return Ce[ke.descriptor.id]=ke,Ce},{})}),st=Gn(function(Se){return zo(Se)}),ra=Gn(function(Se){return zo(Se)}),va=Gn(function(Se,Ce){var ke=ra(Ce).filter(function(Ke){return Se===Ke.descriptor.droppableId}).sort(function(Ke,St){return Ke.descriptor.index-St.descriptor.index});return ke});function Ma(Se){return Se.at&&Se.at.type==="REORDER"?Se.at.destination:null}function Ps(Se){return Se.at&&Se.at.type==="COMBINE"?Se.at.combine:null}var Ha=Gn(function(Se,Ce){return Ce.filter(function(ke){return ke.descriptor.id!==Se.descriptor.id})}),Ms=function(Se){var Ce=Se.isMovingForward,ke=Se.draggable,Ke=Se.destination,St=Se.insideDestination,yt=Se.previousImpact;if(!Ke.isCombineEnabled)return null;var Tt=Ma(yt);if(!Tt)return null;function Ht($r){var no={type:"COMBINE",combine:{draggableId:$r,droppableId:Ke.descriptor.id}};return(0,ut.Z)({},yt,{at:no})}var Sn=yt.displaced.all,Hn=Sn.length?Sn[0]:null;if(Ce)return Hn?Ht(Hn):null;var An=Ha(ke,St);if(!Hn){if(!An.length)return null;var bn=An[An.length-1];return Ht(bn.descriptor.id)}var En=Nr(An,function($r){return $r.descriptor.id===Hn});En===-1&&In(!1);var ni=En-1;if(ni<0)return null;var Oi=An[ni];return Ht(Oi.descriptor.id)},bo=function(Se,Ce){return Se.descriptor.droppableId===Ce.descriptor.id},wo={point:Yr,value:0},Jr={invisible:{},visible:{},all:[]},ha={displaced:Jr,displacedBy:wo,at:null},Ia=function(Se,Ce){return function(ke){return Se<=ke&&ke<=Ce}},Eo=function(Se){var Ce=Ia(Se.top,Se.bottom),ke=Ia(Se.left,Se.right);return function(Ke){var St=Ce(Ke.top)&&Ce(Ke.bottom)&&ke(Ke.left)&&ke(Ke.right);if(St)return!0;var yt=Ce(Ke.top)||Ce(Ke.bottom),Tt=ke(Ke.left)||ke(Ke.right),Ht=yt&&Tt;if(Ht)return!0;var Sn=Ke.top<Se.top&&Ke.bottom>Se.bottom,Hn=Ke.left<Se.left&&Ke.right>Se.right,An=Sn&&Hn;if(An)return!0;var bn=Sn&&Tt||Hn&&yt;return bn}},Gr=function(Se){var Ce=Ia(Se.top,Se.bottom),ke=Ia(Se.left,Se.right);return function(Ke){var St=Ce(Ke.top)&&Ce(Ke.bottom)&&ke(Ke.left)&&ke(Ke.right);return St}},mi={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},oo={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},ao=function(Se){return function(Ce){var ke=Ia(Ce.top,Ce.bottom),Ke=Ia(Ce.left,Ce.right);return function(St){return Se===mi?ke(St.top)&&ke(St.bottom):Ke(St.left)&&Ke(St.right)}}},Ga=function(Ce,ke){var Ke=ke.frame?ke.frame.scroll.diff.displacement:Yr;return Ir(Ce,Ke)},Ca=function(Ce,ke,Ke){return ke.subject.active?Ke(ke.subject.active)(Ce):!1},fa=function(Ce,ke,Ke){return Ke(ke)(Ce)},Ka=function(Ce){var ke=Ce.target,Ke=Ce.destination,St=Ce.viewport,yt=Ce.withDroppableDisplacement,Tt=Ce.isVisibleThroughFrameFn,Ht=yt?Ga(ke,Ke):ke;return Ca(Ht,Ke,Tt)&&fa(Ht,St,Tt)},Qa=function(Ce){return Ka((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:Eo}))},Cs=function(Ce){return Ka((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:Gr}))},ms=function(Ce){return Ka((0,ut.Z)({},Ce,{isVisibleThroughFrameFn:ao(Ce.destination.axis)}))},Zs=function(Ce,ke,Ke){if(typeof Ke=="boolean")return Ke;if(!ke)return!0;var St=ke.invisible,yt=ke.visible;if(St[Ce])return!1;var Tt=yt[Ce];return Tt?Tt.shouldAnimate:!0};function Bn(Se,Ce){var ke=Se.page.marginBox,Ke={top:Ce.point.y,right:0,bottom:0,left:Ce.point.x};return cr(br(ke,Ke))}function ys(Se){var Ce=Se.afterDragging,ke=Se.destination,Ke=Se.displacedBy,St=Se.viewport,yt=Se.forceShouldAnimate,Tt=Se.last;return Ce.reduce(function(Sn,Hn){var An=Bn(Hn,Ke),bn=Hn.descriptor.id;Sn.all.push(bn);var En=Qa({target:An,destination:ke,viewport:St,withDroppableDisplacement:!0});if(!En)return Sn.invisible[Hn.descriptor.id]=!0,Sn;var ni=Zs(bn,Tt,yt),Oi={draggableId:bn,shouldAnimate:ni};return Sn.visible[bn]=Oi,Sn},{all:[],visible:{},invisible:{}})}function oa(Se,Ce){if(!Se.length)return 0;var ke=Se[Se.length-1].descriptor.index;return Ce.inHomeList?ke:ke+1}function hl(Se){var Ce=Se.insideDestination,ke=Se.inHomeList,Ke=Se.displacedBy,St=Se.destination,yt=oa(Ce,{inHomeList:ke});return{displaced:Jr,displacedBy:Ke,at:{type:"REORDER",destination:{droppableId:St.descriptor.id,index:yt}}}}function Ol(Se){var Ce=Se.draggable,ke=Se.insideDestination,Ke=Se.destination,St=Se.viewport,yt=Se.displacedBy,Tt=Se.last,Ht=Se.index,Sn=Se.forceShouldAnimate,Hn=bo(Ce,Ke);if(Ht==null)return hl({insideDestination:ke,inHomeList:Hn,displacedBy:yt,destination:Ke});var An=Br(ke,function($r){return $r.descriptor.index===Ht});if(!An)return hl({insideDestination:ke,inHomeList:Hn,displacedBy:yt,destination:Ke});var bn=Ha(Ce,ke),En=ke.indexOf(An),ni=bn.slice(En),Oi=ys({afterDragging:ni,destination:Ke,displacedBy:yt,last:Tt,viewport:St.frame,forceShouldAnimate:Sn});return{displaced:Oi,displacedBy:yt,at:{type:"REORDER",destination:{droppableId:Ke.descriptor.id,index:Ht}}}}function as(Se,Ce){return!!Ce.effected[Se]}var yu=function(Se){var Ce=Se.isMovingForward,ke=Se.destination,Ke=Se.draggables,St=Se.combine,yt=Se.afterCritical;if(!ke.isCombineEnabled)return null;var Tt=St.draggableId,Ht=Ke[Tt],Sn=Ht.descriptor.index,Hn=as(Tt,yt);return Hn?Ce?Sn:Sn-1:Ce?Sn+1:Sn},eu=function(Se){var Ce=Se.isMovingForward,ke=Se.isInHomeList,Ke=Se.insideDestination,St=Se.location;if(!Ke.length)return null;var yt=St.index,Tt=Ce?yt+1:yt-1,Ht=Ke[0].descriptor.index,Sn=Ke[Ke.length-1].descriptor.index,Hn=ke?Sn:Sn+1;return Tt<Ht||Tt>Hn?null:Tt},fs=function(Se){var Ce=Se.isMovingForward,ke=Se.isInHomeList,Ke=Se.draggable,St=Se.draggables,yt=Se.destination,Tt=Se.insideDestination,Ht=Se.previousImpact,Sn=Se.viewport,Hn=Se.afterCritical,An=Ht.at;if(An||In(!1),An.type==="REORDER"){var bn=eu({isMovingForward:Ce,isInHomeList:ke,location:An.destination,insideDestination:Tt});return bn==null?null:Ol({draggable:Ke,insideDestination:Tt,destination:yt,viewport:Sn,last:Ht.displaced,displacedBy:Ht.displacedBy,index:bn})}var En=yu({isMovingForward:Ce,destination:yt,displaced:Ht.displaced,draggables:St,combine:An.combine,afterCritical:Hn});return En==null?null:Ol({draggable:Ke,insideDestination:Tt,destination:yt,viewport:Sn,last:Ht.displaced,displacedBy:Ht.displacedBy,index:En})},Ba=function(Se){var Ce=Se.displaced,ke=Se.afterCritical,Ke=Se.combineWith,St=Se.displacedBy,yt=!!(Ce.visible[Ke]||Ce.invisible[Ke]);return as(Ke,ke)?yt?Yr:Ui(St.point):yt?St.point:Yr},tu=function(Se){var Ce=Se.afterCritical,ke=Se.impact,Ke=Se.draggables,St=Ps(ke);St||In(!1);var yt=St.draggableId,Tt=Ke[yt].page.borderBox.center,Ht=Ba({displaced:ke.displaced,afterCritical:Ce,combineWith:yt,displacedBy:ke.displacedBy});return Fr(Tt,Ht)},Ao=function(Ce,ke){return ke.margin[Ce.start]+ke.borderBox[Ce.size]/2},Ea=function(Ce,ke){return ke.margin[Ce.end]+ke.borderBox[Ce.size]/2},ua=function(Ce,ke,Ke){return ke[Ce.crossAxisStart]+Ke.margin[Ce.crossAxisStart]+Ke.borderBox[Ce.crossAxisSize]/2},hr=function(Ce){var ke=Ce.axis,Ke=Ce.moveRelativeTo,St=Ce.isMoving;return Pr(ke.line,Ke.marginBox[ke.end]+Ao(ke,St),ua(ke,Ke.marginBox,St))},Rs=function(Ce){var ke=Ce.axis,Ke=Ce.moveRelativeTo,St=Ce.isMoving;return Pr(ke.line,Ke.marginBox[ke.start]-Ea(ke,St),ua(ke,Ke.marginBox,St))},ss=function(Ce){var ke=Ce.axis,Ke=Ce.moveInto,St=Ce.isMoving;return Pr(ke.line,Ke.contentBox[ke.start]+Ao(ke,St),ua(ke,Ke.contentBox,St))},sl=function(Se){var Ce=Se.impact,ke=Se.draggable,Ke=Se.draggables,St=Se.droppable,yt=Se.afterCritical,Tt=va(St.descriptor.id,Ke),Ht=ke.page,Sn=St.axis;if(!Tt.length)return ss({axis:Sn,moveInto:St.page,isMoving:Ht});var Hn=Ce.displaced,An=Ce.displacedBy,bn=Hn.all[0];if(bn){var En=Ke[bn];if(as(bn,yt))return Rs({axis:Sn,moveRelativeTo:En.page,isMoving:Ht});var ni=fr(En.page,An.point);return Rs({axis:Sn,moveRelativeTo:ni,isMoving:Ht})}var Oi=Tt[Tt.length-1];if(Oi.descriptor.id===ke.descriptor.id)return Ht.borderBox.center;if(as(Oi.descriptor.id,yt)){var $r=fr(Oi.page,Ui(yt.displacedBy.point));return hr({axis:Sn,moveRelativeTo:$r,isMoving:Ht})}return hr({axis:Sn,moveRelativeTo:Oi.page,isMoving:Ht})},jl=function(Se,Ce){var ke=Se.frame;return ke?Fr(Ce,ke.scroll.diff.displacement):Ce},ou=function(Ce){var ke=Ce.impact,Ke=Ce.draggable,St=Ce.droppable,yt=Ce.draggables,Tt=Ce.afterCritical,Ht=Ke.page.borderBox.center,Sn=ke.at;return!St||!Sn?Ht:Sn.type==="REORDER"?sl({impact:ke,draggable:Ke,draggables:yt,droppable:St,afterCritical:Tt}):tu({impact:ke,draggables:yt,afterCritical:Tt})},Xi=function(Se){var Ce=ou(Se),ke=Se.droppable,Ke=ke?jl(ke,Ce):Ce;return Ke},ws=function(Se,Ce){var ke=wn(Ce,Se.scroll.initial),Ke=Ui(ke),St=cr({top:Ce.y,bottom:Ce.y+Se.frame.height,left:Ce.x,right:Ce.x+Se.frame.width}),yt={frame:St,scroll:{initial:Se.scroll.initial,max:Se.scroll.max,current:Ce,diff:{value:ke,displacement:Ke}}};return yt};function Us(Se,Ce){return Se.map(function(ke){return Ce[ke]})}function $l(Se,Ce){for(var ke=0;ke<Ce.length;ke++){var Ke=Ce[ke].visible[Se];if(Ke)return Ke}return null}var kl=function(Se){var Ce=Se.impact,ke=Se.viewport,Ke=Se.destination,St=Se.draggables,yt=Se.maxScrollChange,Tt=ws(ke,Fr(ke.scroll.current,yt)),Ht=Ke.frame?tr(Ke,Fr(Ke.frame.scroll.current,yt)):Ke,Sn=Ce.displaced,Hn=ys({afterDragging:Us(Sn.all,St),destination:Ke,displacedBy:Ce.displacedBy,viewport:Tt.frame,last:Sn,forceShouldAnimate:!1}),An=ys({afterDragging:Us(Sn.all,St),destination:Ht,displacedBy:Ce.displacedBy,viewport:ke.frame,last:Sn,forceShouldAnimate:!1}),bn={},En={},ni=[Sn,Hn,An];Sn.all.forEach(function($r){var no=$l($r,ni);if(no){En[$r]=no;return}bn[$r]=!0});var Oi=(0,ut.Z)({},Ce,{displaced:{all:Sn.all,invisible:bn,visible:En}});return Oi},Kl=function(Se,Ce){return Fr(Se.scroll.diff.displacement,Ce)},Oo=function(Se){var Ce=Se.pageBorderBoxCenter,ke=Se.draggable,Ke=Se.viewport,St=Kl(Ke,Ce),yt=wn(St,ke.page.borderBox.center);return Fr(ke.client.borderBox.center,yt)},ic=function(Se){var Ce=Se.draggable,ke=Se.destination,Ke=Se.newPageBorderBoxCenter,St=Se.viewport,yt=Se.withDroppableDisplacement,Tt=Se.onlyOnMainAxis,Ht=Tt===void 0?!1:Tt,Sn=wn(Ke,Ce.page.borderBox.center),Hn=Ir(Ce.page.borderBox,Sn),An={target:Hn,destination:ke,withDroppableDisplacement:yt,viewport:St};return Ht?ms(An):Cs(An)},zl=function(Se){var Ce=Se.isMovingForward,ke=Se.draggable,Ke=Se.destination,St=Se.draggables,yt=Se.previousImpact,Tt=Se.viewport,Ht=Se.previousPageBorderBoxCenter,Sn=Se.previousClientSelection,Hn=Se.afterCritical;if(!Ke.isEnabled)return null;var An=va(Ke.descriptor.id,St),bn=bo(ke,Ke),En=Ms({isMovingForward:Ce,draggable:ke,destination:Ke,insideDestination:An,previousImpact:yt})||fs({isMovingForward:Ce,isInHomeList:bn,draggable:ke,draggables:St,destination:Ke,insideDestination:An,previousImpact:yt,viewport:Tt,afterCritical:Hn});if(!En)return null;var ni=Xi({impact:En,draggable:ke,droppable:Ke,draggables:St,afterCritical:Hn}),Oi=ic({draggable:ke,destination:Ke,newPageBorderBoxCenter:ni,viewport:Tt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(Oi){var $r=Oo({pageBorderBoxCenter:ni,draggable:ke,viewport:Tt});return{clientSelection:$r,impact:En,scrollJumpRequest:null}}var no=wn(ni,Ht),yo=kl({impact:En,viewport:Tt,destination:Ke,draggables:St,maxScrollChange:no});return{clientSelection:Sn,impact:yo,scrollJumpRequest:no}},Cn=function(Ce){var ke=Ce.subject.active;return ke||In(!1),ke},Ln=function(Se){var Ce=Se.isMovingForward,ke=Se.pageBorderBoxCenter,Ke=Se.source,St=Se.droppables,yt=Se.viewport,Tt=Ke.subject.active;if(!Tt)return null;var Ht=Ke.axis,Sn=Ia(Tt[Ht.start],Tt[Ht.end]),Hn=st(St).filter(function(bn){return bn!==Ke}).filter(function(bn){return bn.isEnabled}).filter(function(bn){return!!bn.subject.active}).filter(function(bn){return Eo(yt.frame)(Cn(bn))}).filter(function(bn){var En=Cn(bn);return Ce?Tt[Ht.crossAxisEnd]<En[Ht.crossAxisEnd]:En[Ht.crossAxisStart]<Tt[Ht.crossAxisStart]}).filter(function(bn){var En=Cn(bn),ni=Ia(En[Ht.start],En[Ht.end]);return Sn(En[Ht.start])||Sn(En[Ht.end])||ni(Tt[Ht.start])||ni(Tt[Ht.end])}).sort(function(bn,En){var ni=Cn(bn)[Ht.crossAxisStart],Oi=Cn(En)[Ht.crossAxisStart];return Ce?ni-Oi:Oi-ni}).filter(function(bn,En,ni){return Cn(bn)[Ht.crossAxisStart]===Cn(ni[0])[Ht.crossAxisStart]});if(!Hn.length)return null;if(Hn.length===1)return Hn[0];var An=Hn.filter(function(bn){var En=Ia(Cn(bn)[Ht.start],Cn(bn)[Ht.end]);return En(ke[Ht.line])});return An.length===1?An[0]:An.length>1?An.sort(function(bn,En){return Cn(bn)[Ht.start]-Cn(En)[Ht.start]})[0]:Hn.sort(function(bn,En){var ni=Cr(ke,Ur(Cn(bn))),Oi=Cr(ke,Ur(Cn(En)));return ni!==Oi?ni-Oi:Cn(bn)[Ht.start]-Cn(En)[Ht.start]})[0]},ai=function(Ce,ke){var Ke=Ce.page.borderBox.center;return as(Ce.descriptor.id,ke)?wn(Ke,ke.displacedBy.point):Ke},Ji=function(Ce,ke){var Ke=Ce.page.borderBox;return as(Ce.descriptor.id,ke)?Ir(Ke,Ui(ke.displacedBy.point)):Ke},Gi=function(Se){var Ce=Se.pageBorderBoxCenter,ke=Se.viewport,Ke=Se.destination,St=Se.insideDestination,yt=Se.afterCritical,Tt=St.filter(function(Ht){return Cs({target:Ji(Ht,yt),destination:Ke,viewport:ke.frame,withDroppableDisplacement:!0})}).sort(function(Ht,Sn){var Hn=er(Ce,jl(Ke,ai(Ht,yt))),An=er(Ce,jl(Ke,ai(Sn,yt)));return Hn<An?-1:An<Hn?1:Ht.descriptor.index-Sn.descriptor.index});return Tt[0]||null},Ti=Gn(function(Ce,ke){var Ke=ke[Ce.line];return{value:Ke,point:Pr(Ce.line,Ke)}}),Ri=function(Ce,ke,Ke){var St=Ce.axis;if(Ce.descriptor.mode==="virtual")return Pr(St.line,ke[St.line]);var yt=Ce.subject.page.contentBox[St.size],Tt=va(Ce.descriptor.id,Ke),Ht=Tt.reduce(function(An,bn){return An+bn.client.marginBox[St.size]},0),Sn=Ht+ke[St.line],Hn=Sn-yt;return Hn<=0?null:Pr(St.line,Hn)},oi=function(Ce,ke){return(0,ut.Z)({},Ce,{scroll:(0,ut.Z)({},Ce.scroll,{max:ke})})},Mi=function(Ce,ke,Ke){var St=Ce.frame;bo(ke,Ce)&&In(!1),Ce.subject.withPlaceholder&&In(!1);var yt=Ti(Ce.axis,ke.displaceBy).point,Tt=Ri(Ce,yt,Ke),Ht={placeholderSize:yt,increasedBy:Tt,oldFrameMaxScroll:Ce.frame?Ce.frame.scroll.max:null};if(!St){var Sn=Go({page:Ce.subject.page,withPlaceholder:Ht,axis:Ce.axis,frame:Ce.frame});return(0,ut.Z)({},Ce,{subject:Sn})}var Hn=Tt?Fr(St.scroll.max,Tt):St.scroll.max,An=oi(St,Hn),bn=Go({page:Ce.subject.page,withPlaceholder:Ht,axis:Ce.axis,frame:An});return(0,ut.Z)({},Ce,{subject:bn,frame:An})},ur=function(Ce){var ke=Ce.subject.withPlaceholder;ke||In(!1);var Ke=Ce.frame;if(!Ke){var St=Go({page:Ce.subject.page,axis:Ce.axis,frame:null,withPlaceholder:null});return(0,ut.Z)({},Ce,{subject:St})}var yt=ke.oldFrameMaxScroll;yt||In(!1);var Tt=oi(Ke,yt),Ht=Go({page:Ce.subject.page,axis:Ce.axis,frame:Tt,withPlaceholder:null});return(0,ut.Z)({},Ce,{subject:Ht,frame:Tt})},Hr=function(Se){var Ce=Se.previousPageBorderBoxCenter,ke=Se.moveRelativeTo,Ke=Se.insideDestination,St=Se.draggable,yt=Se.draggables,Tt=Se.destination,Ht=Se.viewport,Sn=Se.afterCritical;if(!ke){if(Ke.length)return null;var Hn={displaced:Jr,displacedBy:wo,at:{type:"REORDER",destination:{droppableId:Tt.descriptor.id,index:0}}},An=Xi({impact:Hn,draggable:St,droppable:Tt,draggables:yt,afterCritical:Sn}),bn=bo(St,Tt)?Tt:Mi(Tt,St,yt),En=ic({draggable:St,destination:bn,newPageBorderBoxCenter:An,viewport:Ht.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return En?Hn:null}var ni=Ce[Tt.axis.line]<=ke.page.borderBox.center[Tt.axis.line],Oi=function(){var no=ke.descriptor.index;return ke.descriptor.id===St.descriptor.id||ni?no:no+1}(),$r=Ti(Tt.axis,St.displaceBy);return Ol({draggable:St,insideDestination:Ke,destination:Tt,viewport:Ht,displacedBy:$r,last:Jr,index:Oi})},ga=function(Se){var Ce=Se.isMovingForward,ke=Se.previousPageBorderBoxCenter,Ke=Se.draggable,St=Se.isOver,yt=Se.draggables,Tt=Se.droppables,Ht=Se.viewport,Sn=Se.afterCritical,Hn=Ln({isMovingForward:Ce,pageBorderBoxCenter:ke,source:St,droppables:Tt,viewport:Ht});if(!Hn)return null;var An=va(Hn.descriptor.id,yt),bn=Gi({pageBorderBoxCenter:ke,viewport:Ht,destination:Hn,insideDestination:An,afterCritical:Sn}),En=Hr({previousPageBorderBoxCenter:ke,destination:Hn,draggable:Ke,draggables:yt,moveRelativeTo:bn,insideDestination:An,viewport:Ht,afterCritical:Sn});if(!En)return null;var ni=Xi({impact:En,draggable:Ke,droppable:Hn,draggables:yt,afterCritical:Sn}),Oi=Oo({pageBorderBoxCenter:ni,draggable:Ke,viewport:Ht});return{clientSelection:Oi,impact:En,scrollJumpRequest:null}},Ko=function(Se){var Ce=Se.at;return Ce?Ce.type==="REORDER"?Ce.destination.droppableId:Ce.combine.droppableId:null},Ya=function(Ce,ke){var Ke=Ko(Ce);return Ke?ke[Ke]:null},Va=function(Se){var Ce=Se.state,ke=Se.type,Ke=Ya(Ce.impact,Ce.dimensions.droppables),St=!!Ke,yt=Ce.dimensions.droppables[Ce.critical.droppable.id],Tt=Ke||yt,Ht=Tt.axis.direction,Sn=Ht==="vertical"&&(ke==="MOVE_UP"||ke==="MOVE_DOWN")||Ht==="horizontal"&&(ke==="MOVE_LEFT"||ke==="MOVE_RIGHT");if(Sn&&!St)return null;var Hn=ke==="MOVE_DOWN"||ke==="MOVE_RIGHT",An=Ce.dimensions.draggables[Ce.critical.draggable.id],bn=Ce.current.page.borderBoxCenter,En=Ce.dimensions,ni=En.draggables,Oi=En.droppables;return Sn?zl({isMovingForward:Hn,previousPageBorderBoxCenter:bn,draggable:An,destination:Tt,draggables:ni,viewport:Ce.viewport,previousClientSelection:Ce.current.client.selection,previousImpact:Ce.impact,afterCritical:Ce.afterCritical}):ga({isMovingForward:Hn,previousPageBorderBoxCenter:bn,draggable:An,isOver:Tt,draggables:ni,droppables:Oi,viewport:Ce.viewport,afterCritical:Ce.afterCritical})};function No(Se){return Se.phase==="DRAGGING"||Se.phase==="COLLECTING"}function Qr(Se){var Ce=Ia(Se.top,Se.bottom),ke=Ia(Se.left,Se.right);return function(St){return Ce(St.y)&&ke(St.x)}}function Fi(Se,Ce){return Se.left<Ce.right&&Se.right>Ce.left&&Se.top<Ce.bottom&&Se.bottom>Ce.top}function eo(Se){var Ce=Se.pageBorderBox,ke=Se.draggable,Ke=Se.candidates,St=ke.page.borderBox.center,yt=Ke.map(function(Tt){var Ht=Tt.axis,Sn=Pr(Tt.axis.line,Ce.center[Ht.line],Tt.page.borderBox.center[Ht.crossAxisLine]);return{id:Tt.descriptor.id,distance:er(St,Sn)}}).sort(function(Tt,Ht){return Ht.distance-Tt.distance});return yt[0]?yt[0].id:null}function Vo(Se){var Ce=Se.pageBorderBox,ke=Se.draggable,Ke=Se.droppables,St=st(Ke).filter(function(yt){if(!yt.isEnabled)return!1;var Tt=yt.subject.active;if(!Tt||!Fi(Ce,Tt))return!1;if(Qr(Tt)(Ce.center))return!0;var Ht=yt.axis,Sn=Tt.center[Ht.crossAxisLine],Hn=Ce[Ht.crossAxisStart],An=Ce[Ht.crossAxisEnd],bn=Ia(Tt[Ht.crossAxisStart],Tt[Ht.crossAxisEnd]),En=bn(Hn),ni=bn(An);return!En&&!ni?!0:En?Hn<Sn:An>Sn});return St.length?St.length===1?St[0].descriptor.id:eo({pageBorderBox:Ce,draggable:ke,candidates:St}):null}var ma=function(Ce,ke){return cr(Ir(Ce,ke))},ya=function(Se,Ce){var ke=Se.frame;return ke?ma(Ce,ke.scroll.diff.value):Ce};function Fo(Se){var Ce=Se.displaced,ke=Se.id;return!!(Ce.visible[ke]||Ce.invisible[ke])}function aa(Se){var Ce=Se.draggable,ke=Se.closest,Ke=Se.inHomeList;return ke?Ke&&ke.descriptor.index>Ce.descriptor.index?ke.descriptor.index-1:ke.descriptor.index:null}var Do=function(Se){var Ce=Se.pageBorderBoxWithDroppableScroll,ke=Se.draggable,Ke=Se.destination,St=Se.insideDestination,yt=Se.last,Tt=Se.viewport,Ht=Se.afterCritical,Sn=Ke.axis,Hn=Ti(Ke.axis,ke.displaceBy),An=Hn.value,bn=Ce[Sn.start],En=Ce[Sn.end],ni=Ha(ke,St),Oi=Br(ni,function(no){var yo=no.descriptor.id,To=no.page.borderBox.center[Sn.line],ta=as(yo,Ht),Qo=Fo({displaced:yt,id:yo});return ta?Qo?En<=To:bn<To-An:Qo?En<=To+An:bn<To}),$r=aa({draggable:ke,closest:Oi,inHomeList:bo(ke,Ke)});return Ol({draggable:ke,insideDestination:St,destination:Ke,viewport:Tt,last:yt,displacedBy:Hn,index:$r})},Or=4,Aa=function(Se){var Ce=Se.draggable,ke=Se.pageBorderBoxWithDroppableScroll,Ke=Se.previousImpact,St=Se.destination,yt=Se.insideDestination,Tt=Se.afterCritical;if(!St.isCombineEnabled)return null;var Ht=St.axis,Sn=Ti(St.axis,Ce.displaceBy),Hn=Sn.value,An=ke[Ht.start],bn=ke[Ht.end],En=Ha(Ce,yt),ni=Br(En,function($r){var no=$r.descriptor.id,yo=$r.page.borderBox,To=yo[Ht.size],ta=To/Or,Qo=as(no,Tt),Da=Fo({displaced:Ke.displaced,id:no});return Qo?Da?bn>yo[Ht.start]+ta&&bn<yo[Ht.end]-ta:An>yo[Ht.start]-Hn+ta&&An<yo[Ht.end]-Hn-ta:Da?bn>yo[Ht.start]+Hn+ta&&bn<yo[Ht.end]+Hn-ta:An>yo[Ht.start]+ta&&An<yo[Ht.end]-ta});if(!ni)return null;var Oi={displacedBy:Sn,displaced:Ke.displaced,at:{type:"COMBINE",combine:{draggableId:ni.descriptor.id,droppableId:St.descriptor.id}}};return Oi},Wa=function(Se){var Ce=Se.pageOffset,ke=Se.draggable,Ke=Se.draggables,St=Se.droppables,yt=Se.previousImpact,Tt=Se.viewport,Ht=Se.afterCritical,Sn=ma(ke.page.borderBox,Ce),Hn=Vo({pageBorderBox:Sn,draggable:ke,droppables:St});if(!Hn)return ha;var An=St[Hn],bn=va(An.descriptor.id,Ke),En=ya(An,Sn);return Aa({pageBorderBoxWithDroppableScroll:En,draggable:ke,previousImpact:yt,destination:An,insideDestination:bn,afterCritical:Ht})||Do({pageBorderBoxWithDroppableScroll:En,draggable:ke,destination:An,insideDestination:bn,last:yt.displaced,viewport:Tt,afterCritical:Ht})},La=function(Se,Ce){var ke;return(0,ut.Z)({},Se,(ke={},ke[Ce.descriptor.id]=Ce,ke))},fl=function(Ce){var ke=Ce.previousImpact,Ke=Ce.impact,St=Ce.droppables,yt=Ko(ke),Tt=Ko(Ke);if(!yt||yt===Tt)return St;var Ht=St[yt];if(!Ht.subject.withPlaceholder)return St;var Sn=ur(Ht);return La(St,Sn)},xu=function(Se){var Ce=Se.draggable,ke=Se.draggables,Ke=Se.droppables,St=Se.previousImpact,yt=Se.impact,Tt=fl({previousImpact:St,impact:yt,droppables:Ke}),Ht=Ko(yt);if(!Ht)return Tt;var Sn=Ke[Ht];if(bo(Ce,Sn)||Sn.subject.withPlaceholder)return Tt;var Hn=Mi(Sn,Ce,ke);return La(Tt,Hn)},Qt=function(Se){var Ce=Se.state,ke=Se.clientSelection,Ke=Se.dimensions,St=Se.viewport,yt=Se.impact,Tt=Se.scrollJumpRequest,Ht=St||Ce.viewport,Sn=Ke||Ce.dimensions,Hn=ke||Ce.current.client.selection,An=wn(Hn,Ce.initial.client.selection),bn={offset:An,selection:Hn,borderBoxCenter:Fr(Ce.initial.client.borderBoxCenter,An)},En={selection:Fr(bn.selection,Ht.scroll.current),borderBoxCenter:Fr(bn.borderBoxCenter,Ht.scroll.current),offset:Fr(bn.offset,Ht.scroll.diff.value)},ni={client:bn,page:En};if(Ce.phase==="COLLECTING")return(0,ut.Z)({phase:"COLLECTING"},Ce,{dimensions:Sn,viewport:Ht,current:ni});var Oi=Sn.draggables[Ce.critical.draggable.id],$r=yt||Wa({pageOffset:En.offset,draggable:Oi,draggables:Sn.draggables,droppables:Sn.droppables,previousImpact:Ce.impact,viewport:Ht,afterCritical:Ce.afterCritical}),no=xu({draggable:Oi,impact:$r,previousImpact:Ce.impact,draggables:Sn.draggables,droppables:Sn.droppables}),yo=(0,ut.Z)({},Ce,{current:ni,dimensions:{draggables:Sn.draggables,droppables:no},impact:$r,viewport:Ht,scrollJumpRequest:Tt||null,forceShouldAnimate:Tt?!1:null});return yo};function Yt(Se,Ce){return Se.map(function(ke){return Ce[ke]})}var Dn=function(Se){var Ce=Se.impact,ke=Se.viewport,Ke=Se.draggables,St=Se.destination,yt=Se.forceShouldAnimate,Tt=Ce.displaced,Ht=Yt(Tt.all,Ke),Sn=ys({afterDragging:Ht,destination:St,displacedBy:Ce.displacedBy,viewport:ke.frame,forceShouldAnimate:yt,last:Tt});return(0,ut.Z)({},Ce,{displaced:Sn})},nt=function(Se){var Ce=Se.impact,ke=Se.draggable,Ke=Se.droppable,St=Se.draggables,yt=Se.viewport,Tt=Se.afterCritical,Ht=Xi({impact:Ce,draggable:ke,draggables:St,droppable:Ke,afterCritical:Tt});return Oo({pageBorderBoxCenter:Ht,draggable:ke,viewport:yt})},qt=function(Se){var Ce=Se.state,ke=Se.dimensions,Ke=Se.viewport;Ce.movementMode!=="SNAP"&&In(!1);var St=Ce.impact,yt=Ke||Ce.viewport,Tt=ke||Ce.dimensions,Ht=Tt.draggables,Sn=Tt.droppables,Hn=Ht[Ce.critical.draggable.id],An=Ko(St);An||In(!1);var bn=Sn[An],En=Dn({impact:St,viewport:yt,destination:bn,draggables:Ht}),ni=nt({impact:En,draggable:Hn,droppable:bn,draggables:Ht,viewport:yt,afterCritical:Ce.afterCritical});return Qt({impact:En,clientSelection:ni,state:Ce,dimensions:Tt,viewport:yt})},sr=function(Se){return{index:Se.index,droppableId:Se.droppableId}},kr=function(Se){var Ce=Se.draggable,ke=Se.home,Ke=Se.draggables,St=Se.viewport,yt=Ti(ke.axis,Ce.displaceBy),Tt=va(ke.descriptor.id,Ke),Ht=Tt.indexOf(Ce);Ht===-1&&In(!1);var Sn=Tt.slice(Ht+1),Hn=Sn.reduce(function(ni,Oi){return ni[Oi.descriptor.id]=!0,ni},{}),An={inVirtualList:ke.descriptor.mode==="virtual",displacedBy:yt,effected:Hn},bn=ys({afterDragging:Sn,destination:ke,displacedBy:yt,last:null,viewport:St.frame,forceShouldAnimate:!1}),En={displaced:bn,displacedBy:yt,at:{type:"REORDER",destination:sr(Ce.descriptor)}};return{impact:En,afterCritical:An}},vr=function(Se,Ce){return{draggables:Se.draggables,droppables:La(Se.droppables,Ce)}},lr=function(Ce){},Bi=function(Ce){},wr=function(Se){var Ce=Se.draggable,ke=Se.offset,Ke=Se.initialWindowScroll,St=fr(Ce.client,ke),yt=Ae(St,Ke),Tt=(0,ut.Z)({},Ce,{placeholder:(0,ut.Z)({},Ce.placeholder,{client:St}),client:St,page:yt});return Tt},to=function(Se){var Ce=Se.frame;return Ce||In(!1),Ce},So=function(Se){var Ce=Se.additions,ke=Se.updatedDroppables,Ke=Se.viewport,St=Ke.scroll.diff.value;return Ce.map(function(yt){var Tt=yt.descriptor.droppableId,Ht=ke[Tt],Sn=to(Ht),Hn=Sn.scroll.diff.value,An=Fr(St,Hn),bn=wr({draggable:yt,offset:An,initialWindowScroll:Ke.scroll.initial});return bn})},gr=function(Se){var Ce=Se.state,ke=Se.published;lr();var Ke=ke.modified.map(function(ta){var Qo=Ce.dimensions.droppables[ta.droppableId],Da=tr(Qo,ta.scroll);return Da}),St=(0,ut.Z)({},Ce.dimensions.droppables,{},$o(Ke)),yt=$i(So({additions:ke.additions,updatedDroppables:St,viewport:Ce.viewport})),Tt=(0,ut.Z)({},Ce.dimensions.draggables,{},yt);ke.removals.forEach(function(ta){delete Tt[ta]});var Ht={droppables:St,draggables:Tt},Sn=Ko(Ce.impact),Hn=Sn?Ht.droppables[Sn]:null,An=Ht.draggables[Ce.critical.draggable.id],bn=Ht.droppables[Ce.critical.droppable.id],En=kr({draggable:An,home:bn,draggables:Tt,viewport:Ce.viewport}),ni=En.impact,Oi=En.afterCritical,$r=Hn&&Hn.isCombineEnabled?Ce.impact:ni,no=Wa({pageOffset:Ce.current.page.offset,draggable:Ht.draggables[Ce.critical.draggable.id],draggables:Ht.draggables,droppables:Ht.droppables,previousImpact:$r,viewport:Ce.viewport,afterCritical:Oi});Bi();var yo=(0,ut.Z)({phase:"DRAGGING"},Ce,{phase:"DRAGGING",impact:no,onLiftImpact:ni,dimensions:Ht,afterCritical:Oi,forceShouldAnimate:!1});if(Ce.phase==="COLLECTING")return yo;var To=(0,ut.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,ke,Ke){var St=vr(Ce.dimensions,ke);return!mr(Ce)||Ke?Qt({state:Ce,dimensions:St}):qt({state:Ce,dimensions:St})};function _i(Se){return Se.isDragging&&Se.movementMode==="SNAP"?(0,ut.Z)({phase:"DRAGGING"},Se,{scrollJumpRequest:null}):Se}var Ii={phase:"IDLE",completed:null,shouldFlush:!1},Wr=function(Se,Ce){if(Se===void 0&&(Se=Ii),Ce.type==="FLUSH")return(0,ut.Z)({},Ii,{shouldFlush:!0});if(Ce.type==="INITIAL_PUBLISH"){Se.phase!=="IDLE"&&In(!1);var ke=Ce.payload,Ke=ke.critical,St=ke.clientSelection,yt=ke.viewport,Tt=ke.dimensions,Ht=ke.movementMode,Sn=Tt.draggables[Ke.draggable.id],Hn=Tt.droppables[Ke.droppable.id],An={selection:St,borderBoxCenter:Sn.client.borderBox.center,offset:Yr},bn={client:An,page:{selection:Fr(An.selection,yt.scroll.initial),borderBoxCenter:Fr(An.selection,yt.scroll.initial),offset:Fr(An.selection,yt.scroll.diff.value)}},En=st(Tt.droppables).every(function(Xf){return!Xf.isFixedOnPage}),ni=kr({draggable:Sn,home:Hn,draggables:Tt.draggables,viewport:yt}),Oi=ni.impact,$r=ni.afterCritical,no={phase:"DRAGGING",isDragging:!0,critical:Ke,movementMode:Ht,dimensions:Tt,initial:bn,current:bn,isWindowScrollAllowed:En,impact:Oi,afterCritical:$r,onLiftImpact:Oi,viewport:yt,scrollJumpRequest:null,forceShouldAnimate:null};return no}if(Ce.type==="COLLECTION_STARTING"){if(Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING")return Se;Se.phase!=="DRAGGING"&&In(!1);var yo=(0,ut.Z)({phase:"COLLECTING"},Se,{phase:"COLLECTING"});return yo}if(Ce.type==="PUBLISH_WHILE_DRAGGING")return Se.phase==="COLLECTING"||Se.phase==="DROP_PENDING"||In(!1),gr({state:Se,published:Ce.payload});if(Ce.type==="MOVE"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||In(!1);var To=Ce.payload.client;return ri(To,Se.current.client.selection)?Se:Qt({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 _i(Se);No(Se)||In(!1);var ta=Ce.payload,Qo=ta.id,Da=ta.newScroll,cs=Se.dimensions.droppables[Qo];if(!cs)return Se;var Ts=tr(cs,Da);return yr(Se,Ts,!1)}if(Ce.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(Se.phase==="DROP_PENDING")return Se;No(Se)||In(!1);var Ql=Ce.payload,Is=Ql.id,Wl=Ql.isEnabled,_u=Se.dimensions.droppables[Is];_u||In(!1),_u.isEnabled===Wl&&In(!1);var Xu=(0,ut.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)||In(!1);var hd=Ce.payload,Lc=hd.id,wc=hd.isCombineEnabled,gu=Se.dimensions.droppables[Lc];gu||In(!1),gu.isCombineEnabled===wc&&In(!1);var Il=(0,ut.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)||In(!1),Se.isWindowScrollAllowed||In(!1);var Nd=Ce.payload.newScroll;if(ri(Se.viewport.scroll.current,Nd))return _i(Se);var Gl=ws(Se.viewport,Nd);return mr(Se)?qt({state:Se,viewport:Gl}):Qt({state:Se,viewport:Gl})}if(Ce.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!No(Se))return Se;var fd=Ce.payload.maxScroll;if(ri(fd,Se.viewport.scroll.max))return Se;var vf=(0,ut.Z)({},Se.viewport,{scroll:(0,ut.Z)({},Se.viewport.scroll,{max:fd})});return(0,ut.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"&&In(!1);var gd=Va({state:Se,type:Ce.type});return gd?Qt({state:Se,impact:gd.impact,clientSelection:gd.clientSelection,scrollJumpRequest:gd.scrollJumpRequest}):Se}if(Ce.type==="DROP_PENDING"){var da=Ce.payload.reason;Se.phase!=="COLLECTING"&&In(!1);var Wh=(0,ut.Z)({phase:"DROP_PENDING"},Se,{phase:"DROP_PENDING",isWaiting:!0,reason:da});return Wh}if(Ce.type==="DROP_ANIMATE"){var Lg=Ce.payload,pd=Lg.completed,Qd=Lg.dropDuration,Fh=Lg.newHomeClientOffset;Se.phase==="DRAGGING"||Se.phase==="DROP_PENDING"||In(!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}},Mr=function(Ce){return{type:"LIFT",payload:Ce}},Er=function(Ce){return{type:"INITIAL_PUBLISH",payload:Ce}},Tr=function(Ce){return{type:"PUBLISH_WHILE_DRAGGING",payload:Ce}},Rr=function(){return{type:"COLLECTION_STARTING",payload:null}},pr=function(Ce){return{type:"UPDATE_DROPPABLE_SCROLL",payload:Ce}},Na=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}},$a=function(Ce){return{type:"MOVE_BY_WINDOW_SCROLL",payload:Ce}},Po=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}},Ar=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(Ht){return Ht.descriptor.index}),ke={},Ke=1;Ke<Ce.length;Ke++){var St=Ce[Ke],yt=Ce[Ke-1];St!==yt+1&&(ke[St]=!0)}if(Object.keys(ke).length)var Tt=Ce.map(function(Ht){var Sn=!!ke[Ht];return Sn?"[\u{1F525}"+Ht+"]":""+Ht}).join(", ")}}function vc(Se,Ce){if(0)var ke}var rs=function(Se){return function(Ce){var ke=Ce.getState,Ke=Ce.dispatch;return function(St){return function(yt){if(yt.type!=="LIFT"){St(yt);return}var Tt=yt.payload,Ht=Tt.id,Sn=Tt.clientSelection,Hn=Tt.movementMode,An=ke();An.phase==="DROP_ANIMATING"&&Ke(gl({completed:An.completed})),ke().phase!=="IDLE"&&In(!1),Ke(jo()),Ke(Zo({draggableId:Ht,movementMode:Hn}));var bn={shouldPublishImmediately:Hn==="SNAP"},En={draggableId:Ht,scrollOptions:bn},ni=Se.startPublishing(En),Oi=ni.critical,$r=ni.dimensions,no=ni.viewport;vc(Oi,$r),Ke(Er({critical:Oi,dimensions:$r,clientSelection:Sn,movementMode:Hn,viewport:no}))}}}},du=function(Se){return function(){return function(Ce){return function(ke){ke.type==="INITIAL_PUBLISH"&&Se.dragging(),ke.type==="DROP_ANIMATE"&&Se.dropping(ke.payload.completed.result.reason),(ke.type==="FLUSH"||ke.type==="DROP_COMPLETE")&&Se.resting(),Ce(ke)}}}},Rc={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},ac={opacity:{drop:0,combining:.7},scale:{drop:.75}},Rd={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},au=Rd.outOfTheWay+"s "+Rc.outOfTheWay,su={fluid:"opacity "+au,snap:"transform "+au+", opacity "+au,drop:function(Ce){var ke=Ce+"s "+Rc.drop;return"transform "+ke+", opacity "+ke},outOfTheWay:"transform "+au,placeholder:"height "+au+", width "+au+", margin "+au},Wu=function(Ce){return ri(Ce,Yr)?null:"translate("+Ce.x+"px, "+Ce.y+"px)"},Au={moveTo:Wu,drop:function(Ce,ke){var Ke=Wu(Ce);return Ke?ke?Ke+" scale("+ac.scale.drop+")":Ke:null}},yc=Rd.minDropTime,bd=Rd.maxDropTime,_d=bd-yc,Fd=1500,ch=.6,li=function(Se){var Ce=Se.current,ke=Se.destination,Ke=Se.reason,St=er(Ce,ke);if(St<=0)return yc;if(St>=Fd)return bd;var yt=St/Fd,Tt=yc+_d*yt,Ht=Ke==="CANCEL"?Tt*ch:Tt;return Number(Ht.toFixed(2))},mo=function(Se){var Ce=Se.impact,ke=Se.draggable,Ke=Se.dimensions,St=Se.viewport,yt=Se.afterCritical,Tt=Ke.draggables,Ht=Ke.droppables,Sn=Ko(Ce),Hn=Sn?Ht[Sn]:null,An=Ht[ke.descriptor.droppableId],bn=nt({impact:Ce,draggable:ke,draggables:Tt,afterCritical:yt,droppable:Hn||An,viewport:St}),En=wn(bn,ke.client.borderBox.center);return En},Ja=function(Se){var Ce=Se.draggables,ke=Se.reason,Ke=Se.lastImpact,St=Se.home,yt=Se.viewport,Tt=Se.onLiftImpact;if(!Ke.at||ke!=="DROP"){var Ht=Dn({draggables:Ce,impact:Tt,destination:St,viewport:yt,forceShouldAnimate:!0});return{impact:Ht,didDropInsideDroppable:!1}}if(Ke.at.type==="REORDER")return{impact:Ke,didDropInsideDroppable:!0};var Sn=(0,ut.Z)({},Ke,{displaced:Jr});return{impact:Sn,didDropInsideDroppable:!0}},ot=function(Se){var Ce=Se.getState,ke=Se.dispatch;return function(Ke){return function(St){if(St.type!=="DROP"){Ke(St);return}var yt=Ce(),Tt=St.payload.reason;if(yt.phase==="COLLECTING"){ke(ad({reason:Tt}));return}if(yt.phase!=="IDLE"){var Ht=yt.phase==="DROP_PENDING"&&yt.isWaiting;Ht&&In(!1),yt.phase==="DRAGGING"||yt.phase==="DROP_PENDING"||In(!1);var Sn=yt.critical,Hn=yt.dimensions,An=Hn.draggables[yt.critical.draggable.id],bn=Ja({reason:Tt,lastImpact:yt.impact,afterCritical:yt.afterCritical,onLiftImpact:yt.onLiftImpact,home:yt.dimensions.droppables[yt.critical.droppable.id],viewport:yt.viewport,draggables:yt.dimensions.draggables}),En=bn.impact,ni=bn.didDropInsideDroppable,Oi=ni?Ma(En):null,$r=ni?Ps(En):null,no={index:Sn.draggable.index,droppableId:Sn.droppable.id},yo={draggableId:An.descriptor.id,type:An.descriptor.type,source:no,reason:Tt,mode:yt.movementMode,destination:Oi,combine:$r},To=mo({impact:En,draggable:An,dimensions:Hn,viewport:yt.viewport,afterCritical:yt.afterCritical}),ta={critical:yt.critical,afterCritical:yt.afterCritical,result:yo,impact:En},Qo=!ri(yt.current.client.offset,To)||!!yo.combine;if(!Qo){ke(gl({completed:ta}));return}var Da=li({current:yt.current.client.offset,destination:To,reason:Tt}),cs={newHomeClientOffset:To,dropDuration:Da,completed:ta};ke(Hs(cs))}}}},tt=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Ut(Se){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(ke){ke.target!==window&&ke.target!==window.document||Se()}}}function Xt(Se){var Ce=Se.onWindowScroll;function ke(){Ce(tt())}var Ke=Zt(ke),St=Ut(Ke),yt=Et;function Tt(){return yt!==Et}function Ht(){Tt()&&In(!1),yt=Xn(window,[St])}function Sn(){Tt()||In(!1),Ke.cancel(),yt(),yt=Et}return{start:Ht,stop:Sn,isActive:Tt}}var pn=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},rn=function(Se){var Ce=Xt({onWindowScroll:function(Ke){Se.dispatch($a({newScroll:Ke}))}});return function(ke){return function(Ke){!Ce.isActive()&&Ke.type==="INITIAL_PUBLISH"&&Ce.start(),Ce.isActive()&&pn(Ke)&&Ce.stop(),ke(Ke)}}},$n=function(Se){var Ce=!1,ke=!1,Ke=setTimeout(function(){ke=!0}),St=function(Tt){Ce||ke||(Ce=!0,Se(Tt),clearTimeout(Ke))};return St.wasCalled=function(){return Ce},St},Rn=function(){var Se=[],Ce=function(yt){var Tt=Nr(Se,function(Hn){return Hn.timerId===yt});Tt===-1&&In(!1);var Ht=Se.splice(Tt,1),Sn=Ht[0];Sn.callback()},ke=function(yt){var Tt=setTimeout(function(){return Ce(Tt)}),Ht={timerId:Tt,callback:yt};Se.push(Ht)},Ke=function(){if(Se.length){var yt=[].concat(Se);Se.length=0,yt.forEach(function(Tt){clearTimeout(Tt.timerId),Tt.callback()})}};return{add:ke,flush:Ke}},Yn=function(Ce,ke){return Ce==null&&ke==null?!0:Ce==null||ke==null?!1:Ce.droppableId===ke.droppableId&&Ce.index===ke.index},Pi=function(Ce,ke){return Ce==null&&ke==null?!0:Ce==null||ke==null?!1:Ce.draggableId===ke.draggableId&&Ce.droppableId===ke.droppableId},Jn=function(Ce,ke){if(Ce===ke)return!0;var Ke=Ce.draggable.id===ke.draggable.id&&Ce.draggable.droppableId===ke.draggable.droppableId&&Ce.draggable.type===ke.draggable.type&&Ce.draggable.index===ke.draggable.index,St=Ce.droppable.id===ke.droppable.id&&Ce.droppable.type===ke.droppable.type;return Ke&&St},vi=function(Ce,ke){lr(),ke(),Bi()},or=function(Ce,ke){return{draggableId:Ce.draggable.id,type:Ce.droppable.type,source:{droppableId:Ce.droppable.id,index:Ce.draggable.index},mode:ke}},Ki=function(Ce,ke,Ke,St){if(!Ce){Ke(St(ke));return}var yt=$n(Ke),Tt={announce:yt};Ce(ke,Tt),yt.wasCalled()||Ke(St(ke))},Vi=function(Se,Ce){var ke=Rn(),Ke=null,St=function(En,ni){Ke&&In(!1),vi("onBeforeCapture",function(){var Oi=Se().onBeforeCapture;if(Oi){var $r={draggableId:En,mode:ni};Oi($r)}})},yt=function(En,ni){Ke&&In(!1),vi("onBeforeDragStart",function(){var Oi=Se().onBeforeDragStart;Oi&&Oi(or(En,ni))})},Tt=function(En,ni){Ke&&In(!1);var Oi=or(En,ni);Ke={mode:ni,lastCritical:En,lastLocation:Oi.source,lastCombine:null},ke.add(function(){vi("onDragStart",function(){return Ki(Se().onDragStart,Oi,Ce,io.onDragStart)})})},Ht=function(En,ni){var Oi=Ma(ni),$r=Ps(ni);Ke||In(!1);var no=!Jn(En,Ke.lastCritical);no&&(Ke.lastCritical=En);var yo=!Yn(Ke.lastLocation,Oi);yo&&(Ke.lastLocation=Oi);var To=!Pi(Ke.lastCombine,$r);if(To&&(Ke.lastCombine=$r),!(!no&&!yo&&!To)){var ta=(0,ut.Z)({},or(En,Ke.mode),{combine:$r,destination:Oi});ke.add(function(){vi("onDragUpdate",function(){return Ki(Se().onDragUpdate,ta,Ce,io.onDragUpdate)})})}},Sn=function(){Ke||In(!1),ke.flush()},Hn=function(En){Ke||In(!1),Ke=null,vi("onDragEnd",function(){return Ki(Se().onDragEnd,En,Ce,io.onDragEnd)})},An=function(){if(Ke){var En=(0,ut.Z)({},or(Ke.lastCritical,Ke.mode),{combine:null,destination:null,reason:"CANCEL"});Hn(En)}};return{beforeCapture:St,beforeStart:yt,start:Tt,update:Ht,flush:Sn,drop:Hn,abort:An}},Xr=function(Se,Ce){var ke=Vi(Se,Ce);return function(Ke){return function(St){return function(yt){if(yt.type==="BEFORE_INITIAL_CAPTURE"){ke.beforeCapture(yt.payload.draggableId,yt.payload.movementMode);return}if(yt.type==="INITIAL_PUBLISH"){var Tt=yt.payload.critical;ke.beforeStart(Tt,yt.payload.movementMode),St(yt),ke.start(Tt,yt.payload.movementMode);return}if(yt.type==="DROP_COMPLETE"){var Ht=yt.payload.completed.result;ke.flush(),St(yt),ke.drop(Ht);return}if(St(yt),yt.type==="FLUSH"){ke.abort();return}var Sn=Ke.getState();Sn.phase==="DRAGGING"&&ke.update(Sn.critical,Sn.impact)}}}},rr=function(Se){return function(Ce){return function(ke){if(ke.type!=="DROP_ANIMATION_FINISHED"){Ce(ke);return}var Ke=Se.getState();Ke.phase!=="DROP_ANIMATING"&&In(!1),Se.dispatch(gl({completed:Ke.completed}))}}},_r=function(Se){var Ce=null,ke=null;function Ke(){ke&&(cancelAnimationFrame(ke),ke=null),Ce&&(Ce(),Ce=null)}return function(St){return function(yt){if((yt.type==="FLUSH"||yt.type==="DROP_COMPLETE"||yt.type==="DROP_ANIMATION_FINISHED")&&Ke(),St(yt),yt.type==="DROP_ANIMATE"){var Tt={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Sn=Se.getState();Sn.phase==="DROP_ANIMATING"&&Se.dispatch(Tc())}};ke=requestAnimationFrame(function(){ke=null,Ce=Xn(window,[Tt])})}}}},jr=function(Se){return function(){return function(Ce){return function(ke){(ke.type==="DROP_COMPLETE"||ke.type==="FLUSH"||ke.type==="DROP_ANIMATE")&&Se.stopPublishing(),Ce(ke)}}}},vo=function(Se){var Ce=!1;return function(){return function(ke){return function(Ke){if(Ke.type==="INITIAL_PUBLISH"){Ce=!0,Se.tryRecordFocus(Ke.payload.critical.draggable.id),ke(Ke),Se.tryRestoreFocusRecorded();return}if(ke(Ke),!!Ce){if(Ke.type==="FLUSH"){Ce=!1,Se.tryRestoreFocusRecorded();return}if(Ke.type==="DROP_COMPLETE"){Ce=!1;var St=Ke.payload.completed.result;St.combine&&Se.tryShiftRecord(St.draggableId,St.combine.draggableId),Se.tryRestoreFocusRecorded()}}}}}},Uo=function(Ce){return Ce.type==="DROP_COMPLETE"||Ce.type==="DROP_ANIMATE"||Ce.type==="FLUSH"},la=function(Se){return function(Ce){return function(ke){return function(Ke){if(Uo(Ke)){Se.stop(),ke(Ke);return}if(Ke.type==="INITIAL_PUBLISH"){ke(Ke);var St=Ce.getState();St.phase!=="DRAGGING"&&In(!1),Se.start(St);return}ke(Ke),Se.scroll(Ce.getState())}}}},so=function(Se){return function(Ce){return function(ke){if(Ce(ke),ke.type==="PUBLISH_WHILE_DRAGGING"){var Ke=Se.getState();Ke.phase==="DROP_PENDING"&&(Ke.isWaiting||Se.dispatch(rc({reason:Ke.reason})))}}}},Wo=We.qC,ka=function(Se){var Ce=Se.dimensionMarshal,ke=Se.focusMarshal,Ke=Se.styleMarshal,St=Se.getResponders,yt=Se.announce,Tt=Se.autoScroller;return(0,We.MT)(Wr,Wo((0,We.md)(du(Ke),jr(Ce),rs(Ce),ot,rr,_r,so,la(Tt),rn,vo(ke),Xr(St,yt))))},ho=function(){return{additions:{},removals:{},modified:{}}};function ko(Se){var Ce=Se.registry,ke=Se.callbacks,Ke=ho(),St=null,yt=function(){St||(ke.collectionStarting(),St=requestAnimationFrame(function(){St=null,lr();var An=Ke,bn=An.additions,En=An.removals,ni=An.modified,Oi=Object.keys(bn).map(function(yo){return Ce.draggable.getById(yo).getDimension(Yr)}).sort(function(yo,To){return yo.descriptor.index-To.descriptor.index}),$r=Object.keys(ni).map(function(yo){var To=Ce.droppable.getById(yo),ta=To.callbacks.getScrollWhileDragging();return{droppableId:yo,scroll:ta}}),no={additions:Oi,removals:Object.keys(En),modified:$r};Ke=ho(),Bi(),ke.publish(no)}))},Tt=function(An){var bn=An.descriptor.id;Ke.additions[bn]=An,Ke.modified[An.descriptor.droppableId]=!0,Ke.removals[bn]&&delete Ke.removals[bn],yt()},Ht=function(An){var bn=An.descriptor;Ke.removals[bn.id]=!0,Ke.modified[bn.droppableId]=!0,Ke.additions[bn.id]&&delete Ke.additions[bn.id],yt()},Sn=function(){St&&(cancelAnimationFrame(St),St=null,Ke=ho())};return{add:Tt,remove:Ht,stop:Sn}}var fo=function(Se){var Ce=Se.scrollHeight,ke=Se.scrollWidth,Ke=Se.height,St=Se.width,yt=wn({x:ke,y:Ce},{x:St,y:Ke}),Tt={x:Math.max(0,yt.x),y:Math.max(0,yt.y)};return Tt},Dr=function(){var Se=document.documentElement;return Se||In(!1),Se},Bo=function(){var Se=Dr(),Ce=fo({scrollHeight:Se.scrollHeight,scrollWidth:Se.scrollWidth,width:Se.clientWidth,height:Se.clientHeight});return Ce},ea=function(){var Se=tt(),Ce=Bo(),ke=Se.y,Ke=Se.x,St=Dr(),yt=St.clientWidth,Tt=St.clientHeight,Ht=Ke+yt,Sn=ke+Tt,Hn=cr({top:ke,left:Ke,right:Ht,bottom:Sn}),An={frame:Hn,scroll:{initial:Se,current:Se,max:Ce,diff:{value:Yr,displacement:Yr}}};return An},Sa=function(Se){var Ce=Se.critical,ke=Se.scrollOptions,Ke=Se.registry;lr();var St=ea(),yt=St.scroll.current,Tt=Ce.droppable,Ht=Ke.droppable.getAllByType(Tt.type).map(function(bn){return bn.callbacks.getDimensionAndWatchScroll(yt,ke)}),Sn=Ke.draggable.getAllByType(Ce.draggable.type).map(function(bn){return bn.getDimension(yt)}),Hn={draggables:$i(Sn),droppables:$o(Ht)};Bi();var An={dimensions:Hn,critical:Ce,viewport:St};return An};function Pa(Se,Ce,ke){if(ke.descriptor.id===Ce.id||ke.descriptor.type!==Ce.type)return!1;var Ke=Se.droppable.getById(ke.descriptor.droppableId);return Ke.descriptor.mode==="virtual"}var lo=function(Se,Ce){var ke=null,Ke=ko({callbacks:{publish:Ce.publishWhileDragging,collectionStarting:Ce.collectionStarting},registry:Se}),St=function(ni,Oi){Se.droppable.exists(ni)||In(!1),ke&&Ce.updateDroppableIsEnabled({id:ni,isEnabled:Oi})},yt=function(ni,Oi){ke&&(Se.droppable.exists(ni)||In(!1),Ce.updateDroppableIsCombineEnabled({id:ni,isCombineEnabled:Oi}))},Tt=function(ni,Oi){ke&&(Se.droppable.exists(ni)||In(!1),Ce.updateDroppableScroll({id:ni,newScroll:Oi}))},Ht=function(ni,Oi){ke&&Se.droppable.getById(ni).callbacks.scroll(Oi)},Sn=function(){if(ke){Ke.stop();var ni=ke.critical.droppable;Se.droppable.getAllByType(ni.type).forEach(function(Oi){return Oi.callbacks.dragStopped()}),ke.unsubscribe(),ke=null}},Hn=function(ni){ke||In(!1);var Oi=ke.critical.draggable;ni.type==="ADDITION"&&Pa(Se,Oi,ni.value)&&Ke.add(ni.value),ni.type==="REMOVAL"&&Pa(Se,Oi,ni.value)&&Ke.remove(ni.value)},An=function(ni){ke&&In(!1);var Oi=Se.draggable.getById(ni.draggableId),$r=Se.droppable.getById(Oi.descriptor.droppableId),no={draggable:Oi.descriptor,droppable:$r.descriptor},yo=Se.subscribe(Hn);return ke={critical:no,unsubscribe:yo},Sa({critical:no,registry:Se,scrollOptions:ni.scrollOptions})},bn={updateDroppableIsEnabled:St,updateDroppableIsCombineEnabled:yt,scrollDroppable:Ht,updateDroppableScroll:Tt,startPublishing:An,stopPublishing:Sn};return bn},Ta=function(Se,Ce){return Se.phase==="IDLE"?!0:Se.phase!=="DROP_ANIMATING"||Se.completed.result.draggableId===Ce?!1:Se.completed.result.reason==="DROP"},Ua=function(Se){window.scrollBy(Se.x,Se.y)},Es=Gn(function(Se){return st(Se).filter(function(Ce){return!(!Ce.isEnabled||!Ce.frame)})}),ls=function(Ce,ke){var Ke=Br(Es(ke),function(St){return St.frame||In(!1),Qr(St.frame.pageMarginBox)(Ce)});return Ke},qs=function(Se){var Ce=Se.center,ke=Se.destination,Ke=Se.droppables;if(ke){var St=Ke[ke];return St.frame?St:null}var yt=ls(Ce,Ke);return yt},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 ke=Se[Ce.size]*Ls.startFromPercentage,Ke=Se[Ce.size]*Ls.maxScrollAtPercentage,St={startScrollingFrom:ke,maxScrollValueAt:Ke};return St},sa=function(Se){var Ce=Se.startOfRange,ke=Se.endOfRange,Ke=Se.current,St=ke-Ce;if(St===0)return 0;var yt=Ke-Ce,Tt=yt/St;return Tt},ds=1,el=function(Se,Ce){if(Se>Ce.startScrollingFrom)return 0;if(Se<=Ce.maxScrollValueAt)return Ls.maxPixelScroll;if(Se===Ce.startScrollingFrom)return ds;var ke=sa({startOfRange:Ce.maxScrollValueAt,endOfRange:Ce.startScrollingFrom,current:Se}),Ke=1-ke,St=Ls.maxPixelScroll*Ls.ease(Ke);return Math.ceil(St)},Ws=Ls.durationDampening.accelerateAt,cl=Ls.durationDampening.stopDampeningAt,ba=function(Se,Ce){var ke=Ce,Ke=cl,St=Date.now(),yt=St-ke;if(yt>=cl)return Se;if(yt<Ws)return ds;var Tt=sa({startOfRange:Ws,endOfRange:Ke,current:yt}),Ht=Se*Ls.ease(Tt);return Math.ceil(Ht)},ca=function(Se){var Ce=Se.distanceToEdge,ke=Se.thresholds,Ke=Se.dragStartTime,St=Se.shouldUseTimeDampening,yt=el(Ce,ke);return yt===0?0:St?Math.max(ba(yt,Ke),ds):yt},wa=function(Se){var Ce=Se.container,ke=Se.distanceToEdges,Ke=Se.dragStartTime,St=Se.axis,yt=Se.shouldUseTimeDampening,Tt=Za(Ce,St),Ht=ke[St.end]<ke[St.start];return Ht?ca({distanceToEdge:ke[St.end],thresholds:Tt,dragStartTime:Ke,shouldUseTimeDampening:yt}):-1*ca({distanceToEdge:ke[St.start],thresholds:Tt,dragStartTime:Ke,shouldUseTimeDampening:yt})},Jo=function(Se){var Ce=Se.container,ke=Se.subject,Ke=Se.proposedScroll,St=ke.height>Ce.height,yt=ke.width>Ce.width;return!yt&&!St?Ke:yt&&St?null:{x:yt?0:Ke.x,y:St?0:Ke.y}},xs=qr(function(Se){return Se===0?0:Se}),Yo=function(Se){var Ce=Se.dragStartTime,ke=Se.container,Ke=Se.subject,St=Se.center,yt=Se.shouldUseTimeDampening,Tt={top:St.y-ke.top,right:ke.right-St.x,bottom:ke.bottom-St.y,left:St.x-ke.left},Ht=wa({container:ke,distanceToEdges:Tt,dragStartTime:Ce,axis:mi,shouldUseTimeDampening:yt}),Sn=wa({container:ke,distanceToEdges:Tt,dragStartTime:Ce,axis:oo,shouldUseTimeDampening:yt}),Hn=xs({x:Sn,y:Ht});if(ri(Hn,Yr))return null;var An=Jo({container:ke,subject:Ke,proposedScroll:Hn});return An?ri(An,Yr)?null:An:null},Ra=qr(function(Se){return Se===0?0:Se>0?1:-1}),os=function(){var Se=function(ke,Ke){return ke<0?ke:ke>Ke?ke-Ke:0};return function(Ce){var ke=Ce.current,Ke=Ce.max,St=Ce.change,yt=Fr(ke,St),Tt={x:Se(yt.x,Ke.x),y:Se(yt.y,Ke.y)};return ri(Tt,Yr)?null:Tt}}(),us=function(Ce){var ke=Ce.max,Ke=Ce.current,St=Ce.change,yt={x:Math.max(Ke.x,ke.x),y:Math.max(Ke.y,ke.y)},Tt=Ra(St),Ht=os({max:yt,current:Ke,change:Tt});return!Ht||Tt.x!==0&&Ht.x===0||Tt.y!==0&&Ht.y===0},Al=function(Ce,ke){return us({current:Ce.scroll.current,max:Ce.scroll.max,change:ke})},bl=function(Ce,ke){if(!Al(Ce,ke))return null;var Ke=Ce.scroll.max,St=Ce.scroll.current;return os({current:St,max:Ke,change:ke})},Vl=function(Ce,ke){var Ke=Ce.frame;return Ke?us({current:Ke.scroll.current,max:Ke.scroll.max,change:ke}):!1},bs=function(Ce,ke){var Ke=Ce.frame;return!Ke||!Vl(Ce,ke)?null:os({current:Ke.scroll.current,max:Ke.scroll.max,change:ke})},Zl=function(Se){var Ce=Se.viewport,ke=Se.subject,Ke=Se.center,St=Se.dragStartTime,yt=Se.shouldUseTimeDampening,Tt=Yo({dragStartTime:St,container:Ce.frame,subject:ke,center:Ke,shouldUseTimeDampening:yt});return Tt&&Al(Ce,Tt)?Tt:null},dl=function(Se){var Ce=Se.droppable,ke=Se.subject,Ke=Se.center,St=Se.dragStartTime,yt=Se.shouldUseTimeDampening,Tt=Ce.frame;if(!Tt)return null;var Ht=Yo({dragStartTime:St,container:Tt.pageMarginBox,subject:ke,center:Ke,shouldUseTimeDampening:yt});return Ht&&Vl(Ce,Ht)?Ht:null},Fl=function(Se){var Ce=Se.state,ke=Se.dragStartTime,Ke=Se.shouldUseTimeDampening,St=Se.scrollWindow,yt=Se.scrollDroppable,Tt=Ce.current.page.borderBoxCenter,Ht=Ce.dimensions.draggables[Ce.critical.draggable.id],Sn=Ht.page.marginBox;if(Ce.isWindowScrollAllowed){var Hn=Ce.viewport,An=Zl({dragStartTime:ke,viewport:Hn,subject:Sn,center:Tt,shouldUseTimeDampening:Ke});if(An){St(An);return}}var bn=qs({center:Tt,destination:Ko(Ce.impact),droppables:Ce.dimensions.droppables});if(bn){var En=dl({dragStartTime:ke,droppable:bn,subject:Sn,center:Tt,shouldUseTimeDampening:Ke});En&&yt(bn.descriptor.id,En)}},_c=function(Se){var Ce=Se.scrollWindow,ke=Se.scrollDroppable,Ke=Zt(Ce),St=Zt(ke),yt=null,Tt=function(An){yt||In(!1);var bn=yt,En=bn.shouldUseTimeDampening,ni=bn.dragStartTime;Fl({state:An,scrollWindow:Ke,scrollDroppable:St,dragStartTime:ni,shouldUseTimeDampening:En})},Ht=function(An){lr(),yt&&In(!1);var bn=Date.now(),En=!1,ni=function(){En=!0};Fl({state:An,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:ni,scrollDroppable:ni}),yt={dragStartTime:bn,shouldUseTimeDampening:En},Bi(),En&&Tt(An)},Sn=function(){yt&&(Ke.cancel(),St.cancel(),yt=null)};return{start:Ht,stop:Sn,scroll:Tt}},Fs=function(Se){var Ce=Se.move,ke=Se.scrollDroppable,Ke=Se.scrollWindow,St=function(Hn,An){var bn=Fr(Hn.current.client.selection,An);Ce({client:bn})},yt=function(Hn,An){if(!Vl(Hn,An))return An;var bn=bs(Hn,An);if(!bn)return ke(Hn.descriptor.id,An),null;var En=wn(An,bn);ke(Hn.descriptor.id,En);var ni=wn(An,En);return ni},Tt=function(Hn,An,bn){if(!Hn||!Al(An,bn))return bn;var En=bl(An,bn);if(!En)return Ke(bn),null;var ni=wn(bn,En);Ke(ni);var Oi=wn(bn,ni);return Oi},Ht=function(Hn){var An=Hn.scrollJumpRequest;if(An){var bn=Ko(Hn.impact);bn||In(!1);var En=yt(Hn.dimensions.droppables[bn],An);if(En){var ni=Hn.viewport,Oi=Tt(Hn.isWindowScrollAllowed,ni,En);Oi&&St(Hn,Oi)}}};return Ht},ks=function(Se){var Ce=Se.scrollDroppable,ke=Se.scrollWindow,Ke=Se.move,St=_c({scrollWindow:ke,scrollDroppable:Ce}),yt=Fs({move:Ke,scrollWindow:ke,scrollDroppable:Ce}),Tt=function(Hn){if(Hn.phase==="DRAGGING"){if(Hn.movementMode==="FLUID"){St.scroll(Hn);return}Hn.scrollJumpRequest&&yt(Hn)}},Ht={scroll:Tt,start:St.start,stop:St.stop};return Ht},Bs="data-rbd",Gs=function(){var Se=Bs+"-drag-handle";return{base:Se,draggableId:Se+"-draggable-id",contextId:Se+"-context-id"}}(),pl=function(){var Se=Bs+"-draggable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),ns=function(){var Se=Bs+"-droppable";return{base:Se,contextId:Se+"-context-id",id:Se+"-id"}}(),js={contextId:Bs+"-scroll-container-context-id"},Dl=function(Ce){return function(ke){return"["+ke+'="'+Ce+'"]'}},Ul=function(Ce,ke){return Ce.map(function(Ke){var St=Ke.styles[ke];return St?Ke.selector+" { "+St+" }":""}).join(" ")},Gu="pointer-events: none;",Du=function(Se){var Ce=Dl(Se),ke=function(){var Ht=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:Ce(Gs.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:Ht,dragging:Gu,dropAnimating:Ht}}}(),Ke=function(){var Ht=`
transition: `+su.outOfTheWay+`;
`;return{selector:Ce(pl.contextId),styles:{dragging:Ht,dropAnimating:Ht,userCancel:Ht}}}(),St={selector:Ce(ns.contextId),styles:{always:"overflow-anchor: none;"}},yt={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;
`}},Tt=[Ke,ke,St,yt];return{always:Ul(Tt,"always"),resting:Ul(Tt,"resting"),dragging:Ul(Tt,"dragging"),dropAnimating:Ul(Tt,"dropAnimating"),userCancel:Ul(Tt,"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||In(!1),Ce},Ou=function(Ce){var ke=document.createElement("style");return Ce&&ke.setAttribute("nonce",Ce),ke.type="text/css",ke};function Ns(Se,Ce){var ke=zn(function(){return Du(Se)},[Se]),Ke=(0,le.useRef)(null),St=(0,le.useRef)(null),yt=Nn(Gn(function(bn){var En=St.current;En||In(!1),En.textContent=bn}),[]),Tt=Nn(function(bn){var En=Ke.current;En||In(!1),En.textContent=bn},[]);ml(function(){!Ke.current&&!St.current||In(!1);var bn=Ou(Ce),En=Ou(Ce);return Ke.current=bn,St.current=En,bn.setAttribute(Bs+"-always",Se),En.setAttribute(Bs+"-dynamic",Se),Iu().appendChild(bn),Iu().appendChild(En),Tt(ke.always),yt(ke.resting),function(){var ni=function($r){var no=$r.current;no||In(!1),Iu().removeChild(no),$r.current=null};ni(Ke),ni(St)}},[Ce,Tt,yt,ke.always,ke.resting,Se]);var Ht=Nn(function(){return yt(ke.dragging)},[yt,ke.dragging]),Sn=Nn(function(bn){if(bn==="DROP"){yt(ke.dropAnimating);return}yt(ke.userCancel)},[yt,ke.dropAnimating,ke.userCancel]),Hn=Nn(function(){St.current&&yt(ke.resting)},[yt,ke.resting]),An=zn(function(){return{dragging:Ht,dropping:Sn,resting:Hn}},[Ht,Sn,Hn]);return An}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 ke="["+Gs.contextId+'="'+Se+'"]',Ke=xo(document.querySelectorAll(ke));if(!Ke.length)return null;var St=Br(Ke,function(yt){return yt.getAttribute(Gs.draggableId)===Ce});return!St||!$s(St)?null:St}function $u(Se){var Ce=(0,le.useRef)({}),ke=(0,le.useRef)(null),Ke=(0,le.useRef)(null),St=(0,le.useRef)(!1),yt=Nn(function(En,ni){var Oi={id:En,focus:ni};return Ce.current[En]=Oi,function(){var no=Ce.current,yo=no[En];yo!==Oi&&delete no[En]}},[]),Tt=Nn(function(En){var ni=zs(Se,En);ni&&ni!==document.activeElement&&ni.focus()},[Se]),Ht=Nn(function(En,ni){ke.current===En&&(ke.current=ni)},[]),Sn=Nn(function(){Ke.current||St.current&&(Ke.current=requestAnimationFrame(function(){Ke.current=null;var En=ke.current;En&&Tt(En)}))},[Tt]),Hn=Nn(function(En){ke.current=null;var ni=document.activeElement;ni&&ni.getAttribute(Gs.draggableId)===En&&(ke.current=En)},[]);ml(function(){return St.current=!0,function(){St.current=!1;var En=Ke.current;En&&cancelAnimationFrame(En)}},[]);var An=zn(function(){return{register:yt,tryRecordFocus:Hn,tryRestoreFocusRecorded:Sn,tryShiftRecord:Ht}},[yt,Hn,Sn,Ht]);return An}function Vc(){var Se={draggables:{},droppables:{}},Ce=[];function ke(bn){return Ce.push(bn),function(){var ni=Ce.indexOf(bn);ni!==-1&&Ce.splice(ni,1)}}function Ke(bn){Ce.length&&Ce.forEach(function(En){return En(bn)})}function St(bn){return Se.draggables[bn]||null}function yt(bn){var En=St(bn);return En||In(!1),En}var Tt={register:function(En){Se.draggables[En.descriptor.id]=En,Ke({type:"ADDITION",value:En})},update:function(En,ni){var Oi=Se.draggables[ni.descriptor.id];Oi&&Oi.uniqueId===En.uniqueId&&(delete Se.draggables[ni.descriptor.id],Se.draggables[En.descriptor.id]=En)},unregister:function(En){var ni=En.descriptor.id,Oi=St(ni);Oi&&En.uniqueId===Oi.uniqueId&&(delete Se.draggables[ni],Ke({type:"REMOVAL",value:En}))},getById:yt,findById:St,exists:function(En){return!!St(En)},getAllByType:function(En){return zo(Se.draggables).filter(function(ni){return ni.descriptor.type===En})}};function Ht(bn){return Se.droppables[bn]||null}function Sn(bn){var En=Ht(bn);return En||In(!1),En}var Hn={register:function(En){Se.droppables[En.descriptor.id]=En},unregister:function(En){var ni=Ht(En.descriptor.id);ni&&En.uniqueId===ni.uniqueId&&delete Se.droppables[En.descriptor.id]},getById:Sn,findById:Ht,exists:function(En){return!!Ht(En)},getAllByType:function(En){return zo(Se.droppables).filter(function(ni){return ni.descriptor.type===En})}};function An(){Se.draggables={},Se.droppables={},Ce.length=0}return{draggable:Tt,droppable:Hn,subscribe:ke,clean:An}}function sc(){var Se=zn(Vc,[]);return(0,le.useEffect)(function(){return function(){requestAnimationFrame(Se.clean)}},[Se]),Se}var lc=le.createContext(null),Ku=function(){var Se=document.body;return Se||In(!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%)"},Ss=function(Ce){return"rbd-announcement-"+Ce};function Ys(Se){var Ce=zn(function(){return Ss(Se)},[Se]),ke=(0,le.useRef)(null);(0,le.useEffect)(function(){var yt=document.createElement("div");return ke.current=yt,yt.id=Ce,yt.setAttribute("aria-live","assertive"),yt.setAttribute("aria-atomic","true"),(0,ut.Z)(yt.style,ku),Ku().appendChild(yt),function(){setTimeout(function(){var Sn=Ku();Sn.contains(yt)&&Sn.removeChild(yt),yt===ke.current&&(ke.current=null)})}},[Ce]);var Ke=Nn(function(St){var yt=ke.current;if(yt){yt.textContent=St;return}},[]);return Ke}var vl=0,Xs={separator:"::"};function gs(){vl=0}function yl(Se,Ce){return Ce===void 0&&(Ce=Xs),zn(function(){return""+Se+Ce.separator+vl++},[Ce.separator,Se])}function Su(Se){var Ce=Se.contextId,ke=Se.uniqueId;return"rbd-hidden-text-"+Ce+"-"+ke}function xc(Se){var Ce=Se.contextId,ke=Se.text,Ke=yl("hidden-text",{separator:"-"}),St=zn(function(){return Su({contextId:Ce,uniqueId:Ke})},[Ke,Ce]);return(0,le.useEffect)(function(){var Tt=document.createElement("div");return Tt.id=St,Tt.textContent=ke,Tt.style.display="none",Ku().appendChild(Tt),function(){var Sn=Ku();Sn.contains(Tt)&&Sn.removeChild(Tt)}},[St,ke]),St}var jd=le.createContext(null),hn={react:"^16.8.5","react-dom":"^16.8.5"},sd=/(\d+)\.(\d+)\.(\d+)/,Bc=function(Ce){var ke=sd.exec(Ce);ke==null&&In(!1);var Ke=Number(ke[1]),St=Number(ke[2]),yt=Number(ke[3]);return{major:Ke,minor:St,patch:yt,raw:Ce}},df=function(Ce,ke){return ke.major>Ce.major?!0:ke.major<Ce.major?!1:ke.minor>Ce.minor?!0:ke.minor<Ce.minor?!1:ke.patch>=Ce.patch},zd=function(Se,Ce){var ke=Bc(Se),Ke=Bc(Ce);df(ke,Ke)},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 ke(Tt){return Tt===Se}function Ke(Tt){Se&&In(!1);var Ht={abandon:Tt};return Se=Ht,Ht}function St(){Se||In(!1),Se=null}function yt(){Se&&(Se.abandon(),St())}return{isClaimed:Ce,isActive:ke,claim:Ke,release:St,tryAbandon:yt}}var hf=9,Hf=13,fh=27,gh=32,Vu=33,Wd=34,ff=35,Mc=36,ld=37,Gd=38,Bd=39,Pu=40,Md,_h=(Md={},Md[Hf]=!0,Md[hf]=!0,Md),Tu=function(Se){_h[Se.keyCode]&&Se.preventDefault()},Uc=function(){var Se="visibilitychange";if(typeof document=="undefined")return Se;var Ce=[Se,"ms"+Se,"webkit"+Se,"moz"+Se,"o"+Se],ke=Br(Ce,function(Ke){return"on"+Ke in document});return ke||Se}(),ph=0,mh=5;function ud(Se,Ce){return Math.abs(Ce.x-Se.x)>=mh||Math.abs(Ce.y-Se.y)>=mh}var lu={type:"IDLE"};function jh(Se){var Ce=Se.cancel,ke=Se.completed,Ke=Se.getPhase,St=Se.setPhase;return[{eventName:"mousemove",fn:function(Tt){var Ht=Tt.button,Sn=Tt.clientX,Hn=Tt.clientY;if(Ht===ph){var An={x:Sn,y:Hn},bn=Ke();if(bn.type==="DRAGGING"){Tt.preventDefault(),bn.actions.move(An);return}bn.type!=="PENDING"&&In(!1);var En=bn.point;if(ud(En,An)){Tt.preventDefault();var ni=bn.actions.fluidLift(An);St({type:"DRAGGING",actions:ni})}}}},{eventName:"mouseup",fn:function(Tt){var Ht=Ke();if(Ht.type!=="DRAGGING"){Ce();return}Tt.preventDefault(),Ht.actions.drop({shouldBlockNextClick:!0}),ke()}},{eventName:"mousedown",fn:function(Tt){Ke().type==="DRAGGING"&&Tt.preventDefault(),Ce()}},{eventName:"keydown",fn:function(Tt){var Ht=Ke();if(Ht.type==="PENDING"){Ce();return}if(Tt.keyCode===fh){Tt.preventDefault(),Ce();return}Tu(Tt)}},{eventName:"resize",fn:Ce},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){Ke().type==="PENDING"&&Ce()}},{eventName:"webkitmouseforcedown",fn:function(Tt){var Ht=Ke();if(Ht.type==="IDLE"&&In(!1),Ht.actions.shouldRespectForcePress()){Ce();return}Tt.preventDefault()}},{eventName:Uc,fn:Ce}]}function Ml(Se){var Ce=(0,le.useRef)(lu),ke=(0,le.useRef)(Et),Ke=zn(function(){return{eventName:"mousedown",fn:function(bn){if(!bn.defaultPrevented&&bn.button===ph&&!(bn.ctrlKey||bn.metaKey||bn.shiftKey||bn.altKey)){var En=Se.findClosestDraggableId(bn);if(En){var ni=Se.tryGetLock(En,Tt,{sourceEvent:bn});if(ni){bn.preventDefault();var Oi={x:bn.clientX,y:bn.clientY};ke.current(),Hn(ni,Oi)}}}}}},[Se]),St=zn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(bn){if(!bn.defaultPrevented){var En=Se.findClosestDraggableId(bn);if(En){var ni=Se.findOptionsForDraggable(En);ni&&(ni.shouldRespectForcePress||Se.canGetLock(En)&&bn.preventDefault())}}}}},[Se]),yt=Nn(function(){var bn={passive:!1,capture:!0};ke.current=Xn(window,[St,Ke],bn)},[St,Ke]),Tt=Nn(function(){var An=Ce.current;An.type!=="IDLE"&&(Ce.current=lu,ke.current(),yt())},[yt]),Ht=Nn(function(){var An=Ce.current;Tt(),An.type==="DRAGGING"&&An.actions.cancel({shouldBlockNextClick:!0}),An.type==="PENDING"&&An.actions.abort()},[Tt]),Sn=Nn(function(){var bn={capture:!0,passive:!1},En=jh({cancel:Ht,completed:Tt,getPhase:function(){return Ce.current},setPhase:function(Oi){Ce.current=Oi}});ke.current=Xn(window,En,bn)},[Ht,Tt]),Hn=Nn(function(bn,En){Ce.current.type!=="IDLE"&&In(!1),Ce.current={type:"PENDING",point:En,actions:bn},Sn()},[Sn]);ml(function(){return yt(),function(){ke.current()}},[yt])}var hs;function Js(){}var nu=(hs={},hs[Wd]=!0,hs[Vu]=!0,hs[Mc]=!0,hs[ff]=!0,hs);function uc(Se,Ce){function ke(){Ce(),Se.cancel()}function Ke(){Ce(),Se.drop()}return[{eventName:"keydown",fn:function(yt){if(yt.keyCode===fh){yt.preventDefault(),ke();return}if(yt.keyCode===gh){yt.preventDefault(),Ke();return}if(yt.keyCode===Pu){yt.preventDefault(),Se.moveDown();return}if(yt.keyCode===Gd){yt.preventDefault(),Se.moveUp();return}if(yt.keyCode===Bd){yt.preventDefault(),Se.moveRight();return}if(yt.keyCode===ld){yt.preventDefault(),Se.moveLeft();return}if(nu[yt.keyCode]){yt.preventDefault();return}Tu(yt)}},{eventName:"mousedown",fn:ke},{eventName:"mouseup",fn:ke},{eventName:"click",fn:ke},{eventName:"touchstart",fn:ke},{eventName:"resize",fn:ke},{eventName:"wheel",fn:ke,options:{passive:!0}},{eventName:Uc,fn:ke}]}function cc(Se){var Ce=(0,le.useRef)(Js),ke=zn(function(){return{eventName:"keydown",fn:function(yt){if(yt.defaultPrevented||yt.keyCode!==gh)return;var Tt=Se.findClosestDraggableId(yt);if(!Tt)return;var Ht=Se.tryGetLock(Tt,An,{sourceEvent:yt});if(!Ht)return;yt.preventDefault();var Sn=!0,Hn=Ht.snapLift();Ce.current();function An(){Sn||In(!1),Sn=!1,Ce.current(),Ke()}Ce.current=Xn(window,uc(Hn,An),{capture:!0,passive:!1})}}},[Se]),Ke=Nn(function(){var yt={passive:!1,capture:!0};Ce.current=Xn(window,[ke],yt)},[ke]);ml(function(){return Ke(),function(){Ce.current()}},[Ke])}var $d={type:"IDLE"},cd=120,vh=.15;function Sc(Se){var Ce=Se.cancel,ke=Se.getPhase;return[{eventName:"orientationchange",fn:Ce},{eventName:"resize",fn:Ce},{eventName:"contextmenu",fn:function(St){St.preventDefault()}},{eventName:"keydown",fn:function(St){if(ke().type!=="DRAGGING"){Ce();return}St.keyCode===fh&&St.preventDefault(),Ce()}},{eventName:Uc,fn:Ce}]}function Yc(Se){var Ce=Se.cancel,ke=Se.completed,Ke=Se.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(yt){var Tt=Ke();if(Tt.type!=="DRAGGING"){Ce();return}Tt.hasMoved=!0;var Ht=yt.touches[0],Sn=Ht.clientX,Hn=Ht.clientY,An={x:Sn,y:Hn};yt.preventDefault(),Tt.actions.move(An)}},{eventName:"touchend",fn:function(yt){var Tt=Ke();if(Tt.type!=="DRAGGING"){Ce();return}yt.preventDefault(),Tt.actions.drop({shouldBlockNextClick:!0}),ke()}},{eventName:"touchcancel",fn:function(yt){if(Ke().type!=="DRAGGING"){Ce();return}yt.preventDefault(),Ce()}},{eventName:"touchforcechange",fn:function(yt){var Tt=Ke();Tt.type==="IDLE"&&In(!1);var Ht=yt.touches[0];if(Ht){var Sn=Ht.force>=vh;if(Sn){var Hn=Tt.actions.shouldRespectForcePress();if(Tt.type==="PENDING"){Hn&&Ce();return}if(Hn){if(Tt.hasMoved){yt.preventDefault();return}Ce();return}yt.preventDefault()}}}},{eventName:Uc,fn:Ce}]}function Wf(Se){var Ce=(0,le.useRef)($d),ke=(0,le.useRef)(Et),Ke=Nn(function(){return Ce.current},[]),St=Nn(function(ni){Ce.current=ni},[]),yt=zn(function(){return{eventName:"touchstart",fn:function(ni){if(!ni.defaultPrevented){var Oi=Se.findClosestDraggableId(ni);if(Oi){var $r=Se.tryGetLock(Oi,Ht,{sourceEvent:ni});if($r){var no=ni.touches[0],yo=no.clientX,To=no.clientY,ta={x:yo,y:To};ke.current(),bn($r,ta)}}}}}},[Se]),Tt=Nn(function(){var ni={capture:!0,passive:!1};ke.current=Xn(window,[yt],ni)},[yt]),Ht=Nn(function(){var En=Ce.current;En.type!=="IDLE"&&(En.type==="PENDING"&&clearTimeout(En.longPressTimerId),St($d),ke.current(),Tt())},[Tt,St]),Sn=Nn(function(){var En=Ce.current;Ht(),En.type==="DRAGGING"&&En.actions.cancel({shouldBlockNextClick:!0}),En.type==="PENDING"&&En.actions.abort()},[Ht]),Hn=Nn(function(){var ni={capture:!0,passive:!1},Oi={cancel:Sn,completed:Ht,getPhase:Ke},$r=Xn(window,Yc(Oi),ni),no=Xn(window,Sc(Oi),ni);ke.current=function(){$r(),no()}},[Sn,Ke,Ht]),An=Nn(function(){var ni=Ke();ni.type!=="PENDING"&&In(!1);var Oi=ni.actions.fluidLift(ni.point);St({type:"DRAGGING",actions:Oi,hasMoved:!1})},[Ke,St]),bn=Nn(function(ni,Oi){Ke().type!=="IDLE"&&In(!1);var $r=setTimeout(An,cd);St({type:"PENDING",point:Oi,actions:ni,longPressTimerId:$r}),Hn()},[Hn,Ke,St,An]);ml(function(){return Tt(),function(){ke.current();var Oi=Ke();Oi.type==="PENDING"&&(clearTimeout(Oi.longPressTimerId),St($d))}},[Ke,Tt,St]),ml(function(){var ni=Xn(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 Kd(Se,Ce){if(Ce==null)return!1;var ke=!!$f[Ce.tagName.toLowerCase()];if(ke)return!0;var Ke=Ce.getAttribute("contenteditable");return Ke==="true"||Ke===""?!0:Ce===Se?!1:Kd(Se,Ce.parentElement)}function hg(Se,Ce){var ke=Ce.target;return $s(ke)?Kd(Se,ke):!1}var fg=function(Se){return cr(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"],ke=Br(Ce,function(Ke){return Ke in Element.prototype});return ke||Se}();function pg(Se,Ce){return Se==null?null:Se[Xc](Ce)?Se:pg(Se.parentElement,Ce)}function mg(Se,Ce){return Se.closest?Se.closest(Ce):pg(Se,Ce)}function zh(Se){return"["+Gs.contextId+'="'+Se+'"]'}function yh(Se,Ce){var ke=Ce.target;if(!gg(ke))return null;var Ke=zh(Se),St=mg(ke,Ke);return!St||!$s(St)?null:St}function vg(Se,Ce){var ke=yh(Se,Ce);return ke?ke.getAttribute(Gs.draggableId):null}function Jc(Se,Ce){var ke="["+pl.contextId+'="'+Se+'"]',Ke=xo(document.querySelectorAll(ke)),St=Br(Ke,function(yt){return yt.getAttribute(pl.id)===Ce});return!St||!$s(St)?null:St}function yg(Se){Se.preventDefault()}function xh(Se){var Ce=Se.expected,ke=Se.phase,Ke=Se.isLockActive,St=Se.shouldWarn;return!(!Ke()||Ce!==ke)}function xg(Se){var Ce=Se.lockAPI,ke=Se.store,Ke=Se.registry,St=Se.draggableId;if(Ce.isClaimed())return!1;var yt=Ke.draggable.findById(St);return!(!yt||!yt.options.isEnabled||!Ta(ke.getState(),St))}function Sg(Se){var Ce=Se.lockAPI,ke=Se.contextId,Ke=Se.store,St=Se.registry,yt=Se.draggableId,Tt=Se.forceSensorStop,Ht=Se.sourceEvent,Sn=xg({lockAPI:Ce,store:Ke,registry:St,draggableId:yt});if(!Sn)return null;var Hn=St.draggable.getById(yt),An=Jc(ke,Hn.descriptor.id);if(!An||Ht&&!Hn.options.canDragInteractiveElements&&hg(An,Ht))return null;var bn=Ce.claim(Tt||Et),En="PRE_DRAG";function ni(){return Hn.options.shouldRespectForcePress}function Oi(){return Ce.isActive(bn)}function $r(cs,Ts){xh({expected:cs,phase:En,isLockActive:Oi,shouldWarn:!0})&&Ke.dispatch(Ts())}var no=$r.bind(null,"DRAGGING");function yo(cs){function Ts(){Ce.release(),En="COMPLETED"}En!=="PRE_DRAG"&&(Ts(),En!=="PRE_DRAG"&&In(!1)),Ke.dispatch(Mr(cs.liftActionArgs)),En="DRAGGING";function Ql(Is,Wl){if(Wl===void 0&&(Wl={shouldBlockNextClick:!1}),cs.cleanup(),Wl.shouldBlockNextClick){var _u=Xn(window,[{eventName:"click",fn:yg,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(_u)}Ts(),Ke.dispatch(rc({reason:Is}))}return(0,ut.Z)({isActive:function(){return xh({expected:"DRAGGING",phase:En,isLockActive:Oi,shouldWarn:!1})},shouldRespectForcePress:ni,drop:function(Wl){return Ql("DROP",Wl)},cancel:function(Wl){return Ql("CANCEL",Wl)}},cs.actions)}function To(cs){var Ts=Zt(function(Is){no(function(){return xa({client:Is})})}),Ql=yo({liftActionArgs:{id:yt,clientSelection:cs,movementMode:"FLUID"},cleanup:function(){return Ts.cancel()},actions:{move:Ts}});return(0,ut.Z)({},Ql,{move:Ts})}function ta(){var cs={moveUp:function(){return no(Oa)},moveRight:function(){return no(Ar)},moveDown:function(){return no(El)},moveLeft:function(){return no(_s)}};return yo({liftActionArgs:{id:yt,clientSelection:fg(An),movementMode:"SNAP"},cleanup:Et,actions:cs})}function Qo(){var cs=xh({expected:"PRE_DRAG",phase:En,isLockActive:Oi,shouldWarn:!0});cs&&Ce.release()}var Da={isActive:function(){return xh({expected:"PRE_DRAG",phase:En,isLockActive:Oi,shouldWarn:!1})},shouldRespectForcePress:ni,fluidLift:To,snapLift:ta,abort:Qo};return Da}var Pg=[Ml,cc,Wf];function Hp(Se){var Ce=Se.contextId,ke=Se.store,Ke=Se.registry,St=Se.customSensors,yt=Se.enableDefaultSensors,Tt=[].concat(yt?Pg:[],St||[]),Ht=(0,le.useState)(function(){return hh()})[0],Sn=Nn(function(To,ta){To.isDragging&&!ta.isDragging&&Ht.tryAbandon()},[Ht]);ml(function(){var To=ke.getState(),ta=ke.subscribe(function(){var Qo=ke.getState();Sn(To,Qo),To=Qo});return ta},[Ht,ke,Sn]),ml(function(){return Ht.tryAbandon},[Ht.tryAbandon]);var Hn=Nn(function(yo){return xg({lockAPI:Ht,registry:Ke,store:ke,draggableId:yo})},[Ht,Ke,ke]),An=Nn(function(yo,To,ta){return Sg({lockAPI:Ht,registry:Ke,contextId:Ce,store:ke,draggableId:yo,forceSensorStop:To,sourceEvent:ta&&ta.sourceEvent?ta.sourceEvent:null})},[Ce,Ht,Ke,ke]),bn=Nn(function(yo){return vg(Ce,yo)},[Ce]),En=Nn(function(yo){var To=Ke.draggable.findById(yo);return To?To.options:null},[Ke.draggable]),ni=Nn(function(){Ht.isClaimed()&&(Ht.tryAbandon(),ke.getState().phase!=="IDLE"&&ke.dispatch(jo()))},[Ht,ke]),Oi=Nn(Ht.isClaimed,[Ht]),$r=zn(function(){return{canGetLock:Hn,tryGetLock:An,findClosestDraggableId:bn,findOptionsForDraggable:En,tryReleaseLock:ni,isLockClaimed:Oi}},[Hn,An,bn,En,ni,Oi]);Gf(Tt);for(var no=0;no<Tt.length;no++)Tt[no]($r)}var qg=function(Ce){return{onBeforeCapture:Ce.onBeforeCapture,onBeforeDragStart:Ce.onBeforeDragStart,onDragStart:Ce.onDragStart,onDragEnd:Ce.onDragEnd,onDragUpdate:Ce.onDragUpdate}};function Vd(Se){return Se.current||In(!1),Se.current}function Kf(Se){var Ce=Se.contextId,ke=Se.setCallbacks,Ke=Se.sensors,St=Se.nonce,yt=Se.dragHandleUsageInstructions,Tt=(0,le.useRef)(null);dh();var Ht=Hd(Se),Sn=Nn(function(){return qg(Ht.current)},[Ht]),Hn=Ys(Ce),An=xc({contextId:Ce,text:yt}),bn=Ns(Ce,St),En=Nn(function(Is){Vd(Tt).dispatch(Is)},[]),ni=zn(function(){return(0,We.DE)({publishWhileDragging:Tr,updateDroppableScroll:pr,updateDroppableIsEnabled:Na,updateDroppableIsCombineEnabled:_o,collectionStarting:Rr},En)},[En]),Oi=sc(),$r=zn(function(){return lo(Oi,ni)},[Oi,ni]),no=zn(function(){return ks((0,ut.Z)({scrollWindow:Ua,scrollDroppable:$r.scrollDroppable},(0,We.DE)({move:xa},En)))},[$r.scrollDroppable,En]),yo=$u(Ce),To=zn(function(){return ka({announce:Hn,autoScroller:no,dimensionMarshal:$r,focusMarshal:yo,getResponders:Sn,styleMarshal:bn})},[Hn,no,$r,yo,Sn,bn]);Tt.current=To;var ta=Nn(function(){var Is=Vd(Tt),Wl=Is.getState();Wl.phase!=="IDLE"&&Is.dispatch(jo())},[]),Qo=Nn(function(){var Is=Vd(Tt).getState();return Is.isDragging||Is.phase==="DROP_ANIMATING"},[]),Da=zn(function(){return{isDragging:Qo,tryAbort:ta}},[Qo,ta]);ke(Da);var cs=Nn(function(Is){return Ta(Vd(Tt).getState(),Is)},[]),Ts=Nn(function(){return No(Vd(Tt).getState())},[]),Ql=zn(function(){return{marshal:$r,focus:yo,contextId:Ce,canLift:cs,isMovementAllowed:Ts,dragHandleUsageInstructionsId:An,registry:Oi}},[Ce,$r,An,yo,cs,Ts,Oi]);return Hp({contextId:Ce,store:To,registry:Oi,customSensors:Ke,enableDefaultSensors:Se.enableDefaultSensors!==!1}),(0,le.useEffect)(function(){return ta},[ta]),le.createElement(jd.Provider,{value:Ql},le.createElement(de,{context:lc,store:To},Se.children))}var gf=0;function ep(){gf=0}function Vf(){return zn(function(){return""+gf++},[])}function Sh(){ep(),gs()}function wg(Se){var Ce=Vf(),ke=Se.dragHandleUsageInstructions||io.dragHandleUsageInstructions;return le.createElement(ji,null,function(Ke){return le.createElement(Kf,{nonce:Se.nonce,contextId:Ce,setCallbacks:Ke,dragHandleUsageInstructions:ke,enableDefaultSensors:Se.enableDefaultSensors,sensors:Se.sensors,onBeforeCapture:Se.onBeforeCapture,onBeforeDragStart:Se.onBeforeDragStart,onDragStart:Se.onDragStart,onDragUpdate:Se.onDragUpdate,onDragEnd:Se.onDragEnd},Se.children)})}var Ph=function(Ce){return function(ke){return Ce===ke}},tp=Ph("scroll"),Uf=Ph("auto"),np=Ph("visible"),As=function(Ce,ke){return ke(Ce.overflowX)||ke(Ce.overflowY)},Zh=function(Ce,ke){return ke(Ce.overflowX)&&ke(Ce.overflowY)},Ud=function(Ce){var ke=window.getComputedStyle(Ce),Ke={overflowX:ke.overflowX,overflowY:ke.overflowY};return As(Ke,tp)||As(Ke,Uf)},iu=function(){return!1;var Ce,ke,Ke,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 ke=window.getComputedStyle(Ce);return ke.position==="fixed"?!0:Se(Ce.parentElement)},Eg=function(Se){var Ce=Ru(Se),ke=Cg(Se);return{closestScrollable:Ce,isFixedOnPage:ke}},bg=function(Se){var Ce=Se.descriptor,ke=Se.isEnabled,Ke=Se.isCombineEnabled,St=Se.isFixedOnPage,yt=Se.direction,Tt=Se.client,Ht=Se.page,Sn=Se.closest,Hn=function(){if(!Sn)return null;var ni=Sn.scrollSize,Oi=Sn.client,$r=fo({scrollHeight:ni.scrollHeight,scrollWidth:ni.scrollWidth,height:Oi.paddingBox.height,width:Oi.paddingBox.width});return{pageMarginBox:Sn.page.marginBox,frameClient:Oi,scrollSize:ni,shouldClipSubject:Sn.shouldClipSubject,scroll:{initial:Sn.scroll,current:Sn.scroll,max:$r,diff:{value:Yr,displacement:Yr}}}}(),An=yt==="vertical"?mi:oo,bn=Go({page:Ht,withPlaceholder:null,axis:An,frame:Hn}),En={descriptor:Ce,isCombineEnabled:Ke,isFixedOnPage:St,axis:An,isEnabled:ke,client:Tt,page:Ht,frame:Hn,subject:bn};return En},Fg=function(Ce,ke){var Ke=Sr(Ce);if(!ke||Ce!==ke)return Ke;var St=Ke.paddingBox.top-ke.scrollTop,yt=Ke.paddingBox.left-ke.scrollLeft,Tt=St+ke.scrollHeight,Ht=yt+ke.scrollWidth,Sn={top:St,right:Ht,bottom:Tt,left:yt},Hn=br(Sn,Ke.border),An=Qi({borderBox:Hn,margin:Ke.margin,border:Ke.border,padding:Ke.padding});return An},Bg=function(Se){var Ce=Se.ref,ke=Se.descriptor,Ke=Se.env,St=Se.windowScroll,yt=Se.direction,Tt=Se.isDropDisabled,Ht=Se.isCombineEnabled,Sn=Se.shouldClipSubject,Hn=Ke.closestScrollable,An=Fg(Ce,Hn),bn=Ae(An,St),En=function(){if(!Hn)return null;var Oi=Sr(Hn),$r={scrollHeight:Hn.scrollHeight,scrollWidth:Hn.scrollWidth};return{client:Oi,page:Ae(Oi,St),scroll:wh(Hn),scrollSize:$r,shouldClipSubject:Sn}}(),ni=bg({descriptor:ke,isEnabled:!Tt,isCombineEnabled:Ht,isFixedOnPage:Ke.isFixedOnPage,direction:yt,client:An,page:bn,closest:En});return ni},Yd={passive:!1},pf={passive:!0},Ld=function(Se){return Se.shouldPublishImmediately?Yd:pf};function Ks(Se){var Ce=(0,le.useContext)(Se);return Ce||In(!1),Ce}var Ch=function(Ce){return Ce&&Ce.env.closestScrollable||null};function Mg(Se){var Ce=(0,le.useRef)(null),ke=Ks(jd),Ke=yl("droppable"),St=ke.registry,yt=ke.marshal,Tt=Hd(Se),Ht=zn(function(){return{id:Se.droppableId,type:Se.type,mode:Se.mode}},[Se.droppableId,Se.mode,Se.type]),Sn=(0,le.useRef)(Ht),Hn=zn(function(){return Gn(function(Qo,Da){Ce.current||In(!1);var cs={x:Qo,y:Da};yt.updateDroppableScroll(Ht.id,cs)})},[Ht.id,yt]),An=Nn(function(){var Qo=Ce.current;return!Qo||!Qo.env.closestScrollable?Yr:wh(Qo.env.closestScrollable)},[]),bn=Nn(function(){var Qo=An();Hn(Qo.x,Qo.y)},[An,Hn]),En=zn(function(){return Zt(bn)},[bn]),ni=Nn(function(){var Qo=Ce.current,Da=Ch(Qo);Qo&&Da||In(!1);var cs=Qo.scrollOptions;if(cs.shouldPublishImmediately){bn();return}En()},[En,bn]),Oi=Nn(function(Qo,Da){Ce.current&&In(!1);var cs=Tt.current,Ts=cs.getDroppableRef();Ts||In(!1);var Ql=Eg(Ts),Is={ref:Ts,descriptor:Ht,env:Ql,scrollOptions:Da};Ce.current=Is;var Wl=Bg({ref:Ts,descriptor:Ht,env:Ql,windowScroll:Qo,direction:cs.direction,isDropDisabled:cs.isDropDisabled,isCombineEnabled:cs.isCombineEnabled,shouldClipSubject:!cs.ignoreContainerClipping}),_u=Ql.closestScrollable;return _u&&(_u.setAttribute(js.contextId,ke.contextId),_u.addEventListener("scroll",ni,Ld(Is.scrollOptions))),Wl},[ke.contextId,Ht,ni,Tt]),$r=Nn(function(){var Qo=Ce.current,Da=Ch(Qo);return Qo&&Da||In(!1),wh(Da)},[]),no=Nn(function(){var Qo=Ce.current;Qo||In(!1);var Da=Ch(Qo);Ce.current=null,Da&&(En.cancel(),Da.removeAttribute(js.contextId),Da.removeEventListener("scroll",ni,Ld(Qo.scrollOptions)))},[ni,En]),yo=Nn(function(Qo){var Da=Ce.current;Da||In(!1);var cs=Ch(Da);cs||In(!1),cs.scrollTop+=Qo.y,cs.scrollLeft+=Qo.x},[]),To=zn(function(){return{getDimensionAndWatchScroll:Oi,getScrollWhileDragging:$r,dragStopped:no,scroll:yo}},[no,Oi,$r,yo]),ta=zn(function(){return{uniqueId:Ke,descriptor:Ht,callbacks:To}},[To,Ht,Ke]);ml(function(){return Sn.current=ta.descriptor,St.droppable.register(ta),function(){Ce.current&&no(),St.droppable.unregister(ta)}},[To,Ht,no,ta,yt,St.droppable]),ml(function(){Ce.current&&yt.updateDroppableIsEnabled(Sn.current.id,!Se.isDropDisabled)},[Se.isDropDisabled,yt]),ml(function(){Ce.current&&yt.updateDroppableIsCombineEnabled(Sn.current.id,Se.isCombineEnabled)},[Se.isCombineEnabled,yt])}function Xd(){}var Eh={width:0,height:0,margin:Vn},mf=function(Ce){var ke=Ce.isAnimatingOpenOnMount,Ke=Ce.placeholder,St=Ce.animate;return ke||St==="close"?Eh:{height:Ke.client.borderBox.height,width:Ke.client.borderBox.width,margin:Ke.client.margin}},ip=function(Ce){var ke=Ce.isAnimatingOpenOnMount,Ke=Ce.placeholder,St=Ce.animate,yt=mf({isAnimatingOpenOnMount:ke,placeholder:Ke,animate:St});return{display:Ke.display,boxSizing:"border-box",width:yt.width,height:yt.height,marginTop:yt.margin.top,marginRight:yt.margin.right,marginBottom:yt.margin.bottom,marginLeft:yt.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:St!=="none"?su.placeholder:null}};function Yl(Se){var Ce=(0,le.useRef)(null),ke=Nn(function(){Ce.current&&(clearTimeout(Ce.current),Ce.current=null)},[]),Ke=Se.animate,St=Se.onTransitionEnd,yt=Se.onClose,Tt=Se.contextId,Ht=(0,le.useState)(Se.animate==="open"),Sn=Ht[0],Hn=Ht[1];(0,le.useEffect)(function(){return Sn?Ke!=="open"?(ke(),Hn(!1),Xd):Ce.current?Xd:(Ce.current=setTimeout(function(){Ce.current=null,Hn(!1)}),ke):Xd},[Ke,Sn,ke]);var An=Nn(function(En){En.propertyName==="height"&&(St(),Ke==="close"&&yt())},[Ke,yt,St]),bn=ip({isAnimatingOpenOnMount:Sn,animate:Se.animate,placeholder:Se.placeholder});return le.createElement(Se.placeholder.tagName,{style:bn,"data-rbd-placeholder-context-id":Tt,onTransitionEnd:An,ref:Se.innerRef})}var rp=le.memo(Yl),Jd=le.createContext(null);function dd(Se){Se&&$s(Se)||In(!1)}function bh(Se){return typeof Se=="boolean"}function ie(Se,Ce){Ce.forEach(function(ke){return ke(Se)})}var ae=[function(Ce){var ke=Ce.props;ke.droppableId||In(!1),typeof ke.droppableId!="string"&&In(!1)},function(Ce){var ke=Ce.props;bh(ke.isDropDisabled)||In(!1),bh(ke.isCombineEnabled)||In(!1),bh(ke.ignoreContainerClipping)||In(!1)},function(Ce){var ke=Ce.getDroppableRef;dd(ke())}],ge=[function(Ce){var ke=Ce.props,Ke=Ce.getPlaceholderRef;if(ke.placeholder)var St=Ke()}],fe=[function(Ce){var ke=Ce.props;ke.renderClone||In(!1)},function(Ce){var ke=Ce.getPlaceholderRef;ke()&&In(!1)}];function ye(Se){Bl(function(){ie(Se,ae),Se.props.mode==="standard"&&ie(Se,ge),Se.props.mode==="virtual"&&ie(Se,fe)})}var Re=function(Se){He(Ce,Se);function Ce(){for(var Ke,St=arguments.length,yt=new Array(St),Tt=0;Tt<St;Tt++)yt[Tt]=arguments[Tt];return Ke=Se.call.apply(Se,[this].concat(yt))||this,Ke.state={isVisible:!!Ke.props.on,data:Ke.props.on,animate:Ke.props.shouldAnimate&&Ke.props.on?"open":"none"},Ke.onClose=function(){Ke.state.animate==="close"&&Ke.setState({isVisible:!1})},Ke}Ce.getDerivedStateFromProps=function(St,yt){return St.shouldAnimate?St.on?{isVisible:!0,data:St.on,animate:"open"}:yt.isVisible?{isVisible:!0,data:yt.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!St.on,data:St.on,animate:"none"}};var ke=Ce.prototype;return ke.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},mt=function(Ce,ke){return ke?su.drop(ke.duration):Ce?su.snap:su.fluid},gt=function(Ce,ke){return Ce?ke?ac.opacity.drop:ac.opacity.combining:null},zt=function(Ce){return Ce.forceShouldAnimate!=null?Ce.forceShouldAnimate:Ce.mode==="SNAP"};function Mn(Se){var Ce=Se.dimension,ke=Ce.client,Ke=Se.offset,St=Se.combineWith,yt=Se.dropping,Tt=!!St,Ht=zt(Se),Sn=!!yt,Hn=Sn?Au.drop(Ke,Tt):Au.moveTo(Ke),An={position:"fixed",top:ke.marginBox.top,left:ke.marginBox.left,boxSizing:"border-box",width:ke.borderBox.width,height:ke.borderBox.height,transition:mt(Ht,yt),transform:Hn,opacity:gt(Tt,Sn),zIndex:Sn?Je.dropAnimating:Je.dragging,pointerEvents:"none"};return An}function Vt(Se){return{transform:Au.moveTo(Se.offset),transition:Se.shouldAnimateDisplacement?null:"none"}}function si(Se){return Se.type==="DRAGGING"?Mn(Se):Vt(Se)}function ii(Se,Ce,ke){ke===void 0&&(ke=Yr);var Ke=window.getComputedStyle(Ce),St=Ce.getBoundingClientRect(),yt=Ei(St,Ke),Tt=Ae(yt,ke),Ht={client:yt,tagName:Ce.tagName.toLowerCase(),display:Ke.display},Sn={x:yt.marginBox.width,y:yt.marginBox.height},Hn={descriptor:Se,placeholder:Ht,displaceBy:Sn,client:yt,page:Tt};return Hn}function nr(Se){var Ce=yl("draggable"),ke=Se.descriptor,Ke=Se.registry,St=Se.getDraggableRef,yt=Se.canDragInteractiveElements,Tt=Se.shouldRespectForcePress,Ht=Se.isEnabled,Sn=zn(function(){return{canDragInteractiveElements:yt,shouldRespectForcePress:Tt,isEnabled:Ht}},[yt,Ht,Tt]),Hn=Nn(function(ni){var Oi=St();return Oi||In(!1),ii(ke,Oi,ni)},[ke,St]),An=zn(function(){return{uniqueId:Ce,descriptor:ke,options:Sn,getDimension:Hn}},[ke,Hn,Sn,Ce]),bn=(0,le.useRef)(An),En=(0,le.useRef)(!0);ml(function(){return Ke.draggable.register(bn.current),function(){return Ke.draggable.unregister(bn.current)}},[Ke.draggable]),ml(function(){if(En.current){En.current=!1;return}var ni=bn.current;bn.current=An,Ke.draggable.update(An,ni)},[An,Ke.draggable])}function dr(Se,Ce,ke){Bl(function(){function Ke(yt){return"Draggable[id: "+yt+"]: "}var St=Se.draggableId;St||In(!1),typeof St!="string"&&In(!1),ia(Se.index)||In(!1),Se.mapped.type!=="DRAGGING"&&(dd(ke()),Se.isEnabled&&(zs(Ce,St)||In(!1)))})}function Lr(Se){}function uo(Se){Se.preventDefault()}function Ho(Se){var Ce=(0,le.useRef)(null),ke=Nn(function(Is){Ce.current=Is},[]),Ke=Nn(function(){return Ce.current},[]),St=Ks(jd),yt=St.contextId,Tt=St.dragHandleUsageInstructionsId,Ht=St.registry,Sn=Ks(Jd),Hn=Sn.type,An=Sn.droppableId,bn=zn(function(){return{id:Se.draggableId,index:Se.index,type:Hn,droppableId:An}},[Se.draggableId,Se.index,Hn,An]),En=Se.children,ni=Se.draggableId,Oi=Se.isEnabled,$r=Se.shouldRespectForcePress,no=Se.canDragInteractiveElements,yo=Se.isClone,To=Se.mapped,ta=Se.dropAnimationFinished;if(dr(Se,yt,Ke),Lr(yo),!yo){var Qo=zn(function(){return{descriptor:bn,registry:Ht,getDraggableRef:Ke,canDragInteractiveElements:no,shouldRespectForcePress:$r,isEnabled:Oi}},[bn,Ht,Ke,no,$r,Oi]);nr(Qo)}var Da=zn(function(){return Oi?{tabIndex:0,role:"button","aria-describedby":Tt,"data-rbd-drag-handle-draggable-id":ni,"data-rbd-drag-handle-context-id":yt,draggable:!1,onDragStart:uo}:null},[yt,Tt,ni,Oi]),cs=Nn(function(Is){To.type==="DRAGGING"&&To.dropping&&Is.propertyName==="transform"&&ta()},[ta,To]),Ts=zn(function(){var Is=si(To),Wl=To.type==="DRAGGING"&&To.dropping?cs:null,_u={innerRef:ke,draggableProps:{"data-rbd-draggable-context-id":yt,"data-rbd-draggable-id":ni,style:Is,onTransitionEnd:Wl},dragHandleProps:Da};return _u},[yt,Da,ni,To,cs,ke]),Ql=zn(function(){return{draggableId:bn.id,type:bn.type,source:{index:bn.index,droppableId:bn.droppableId}}},[bn.droppableId,bn.id,bn.index,bn.type]);return En(Ts,To.snapshot,Ql)}var Mo=function(Se,Ce){return Se===Ce},qo=function(Se){var Ce=Se.combine,ke=Se.destination;return ke?ke.droppableId:Ce?Ce.droppableId:null},_a=function(Ce){return Ce.combine?Ce.combine.draggableId:null},Lo=function(Ce){return Ce.at&&Ce.at.type==="COMBINE"?Ce.at.combine.draggableId:null};function is(){var Se=Gn(function(St,yt){return{x:St,y:yt}}),Ce=Gn(function(St,yt,Tt,Ht,Sn){return{isDragging:!0,isClone:yt,isDropAnimating:!!Sn,dropAnimation:Sn,mode:St,draggingOver:Tt,combineWith:Ht,combineTargetFor:null}}),ke=Gn(function(St,yt,Tt,Ht,Sn,Hn,An){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Sn,combineWith:Hn,mode:yt,offset:St,dimension:Tt,forceShouldAnimate:An,snapshot:Ce(yt,Ht,Sn,Hn,null)}}}),Ke=function(yt,Tt){if(yt.isDragging){if(yt.critical.draggable.id!==Tt.draggableId)return null;var Ht=yt.current.client.offset,Sn=yt.dimensions.draggables[Tt.draggableId],Hn=Ko(yt.impact),An=Lo(yt.impact),bn=yt.forceShouldAnimate;return ke(Se(Ht.x,Ht.y),yt.movementMode,Sn,Tt.isClone,Hn,An,bn)}if(yt.phase==="DROP_ANIMATING"){var En=yt.completed;if(En.result.draggableId!==Tt.draggableId)return null;var ni=Tt.isClone,Oi=yt.dimensions.draggables[Tt.draggableId],$r=En.result,no=$r.mode,yo=qo($r),To=_a($r),ta=yt.dropDuration,Qo={duration:ta,curve:Rc.drop,moveTo:yt.newHomeClientOffset,opacity:To?ac.opacity.drop:null,scale:To?ac.scale.drop:null};return{mapped:{type:"DRAGGING",offset:yt.newHomeClientOffset,dimension:Oi,dropping:Qo,draggingOver:yo,combineWith:To,mode:no,forceShouldAnimate:null,snapshot:Ce(no,ni,yo,To,Qo)}}}return null};return Ke}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:Yr,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:rl(null)}};function xl(){var Se=Gn(function(Tt,Ht){return{x:Tt,y:Ht}}),Ce=Gn(rl),ke=Gn(function(Tt,Ht,Sn){return Ht===void 0&&(Ht=null),{mapped:{type:"SECONDARY",offset:Tt,combineTargetFor:Ht,shouldAnimateDisplacement:Sn,snapshot:Ce(Ht)}}}),Ke=function(Ht){return Ht?ke(Yr,Ht,!0):null},St=function(Ht,Sn,Hn,An){var bn=Hn.displaced.visible[Ht],En=!!(An.inVirtualList&&An.effected[Ht]),ni=Ps(Hn),Oi=ni&&ni.draggableId===Ht?Sn:null;if(!bn){if(!En)return Ke(Oi);if(Hn.displaced.invisible[Ht])return null;var $r=Ui(An.displacedBy.point),no=Se($r.x,$r.y);return ke(no,Oi,!0)}if(En)return Ke(Oi);var yo=Hn.displacedBy.point,To=Se(yo.x,yo.y);return ke(To,Oi,bn.shouldAnimate)},yt=function(Ht,Sn){if(Ht.isDragging)return Ht.critical.draggable.id===Sn.draggableId?null:St(Sn.draggableId,Ht.critical.draggable.id,Ht.impact,Ht.afterCritical);if(Ht.phase==="DROP_ANIMATING"){var Hn=Ht.completed;return Hn.result.draggableId===Sn.draggableId?null:St(Sn.draggableId,Hn.result.draggableId,Hn.impact,Hn.afterCritical)}return null};return yt}var Uu=function(){var Ce=is(),ke=xl(),Ke=function(yt,Tt){return Ce(yt,Tt)||ke(yt,Tt)||ru};return Ke},wu={dropAnimationFinished:Tc},Xl=et(Uu,wu,null,{context:lc,pure:!0,areStatePropsEqual:Mo})(Ho);function Yu(Se){var Ce=Ks(Jd),ke=Ce.isUsingCloneFor;return ke===Se.draggableId&&!Se.isClone?null:le.createElement(Xl,Se)}function hu(Se){var Ce=typeof Se.isDragDisabled=="boolean"?!Se.isDragDisabled:!0,ke=!!Se.disableInteractiveElementBlocking,Ke=!!Se.shouldRespectForcePress;return le.createElement(Yu,(0,ut.Z)({},Se,{isClone:!1,isEnabled:Ce,canDragInteractiveElements:ke,shouldRespectForcePress:Ke}))}function Jl(Se){var Ce=(0,le.useContext)(jd);Ce||In(!1);var ke=Ce.contextId,Ke=Ce.isMovementAllowed,St=(0,le.useRef)(null),yt=(0,le.useRef)(null),Tt=Se.children,Ht=Se.droppableId,Sn=Se.type,Hn=Se.mode,An=Se.direction,bn=Se.ignoreContainerClipping,En=Se.isDropDisabled,ni=Se.isCombineEnabled,Oi=Se.snapshot,$r=Se.useClone,no=Se.updateViewportMaxScroll,yo=Se.getContainerForClone,To=Nn(function(){return St.current},[]),ta=Nn(function(Xu){St.current=Xu},[]),Qo=Nn(function(){return yt.current},[]),Da=Nn(function(Xu){yt.current=Xu},[]);ye({props:Se,getDroppableRef:To,getPlaceholderRef:Qo});var cs=Nn(function(){Ke()&&no({maxScroll:Bo()})},[Ke,no]);Mg({droppableId:Ht,type:Sn,mode:Hn,direction:An,isDropDisabled:En,isCombineEnabled:ni,ignoreContainerClipping:bn,getDroppableRef:To});var Ts=le.createElement(Re,{on:Se.placeholder,shouldAnimate:Se.shouldAnimatePlaceholder},function(Xu){var hd=Xu.onClose,Lc=Xu.data,wc=Xu.animate;return le.createElement(rp,{placeholder:Lc,onClose:hd,innerRef:Da,animate:wc,contextId:ke,onTransitionEnd:cs})}),Ql=zn(function(){return{innerRef:ta,placeholder:Ts,droppableProps:{"data-rbd-droppable-id":Ht,"data-rbd-droppable-context-id":ke}}},[ke,Ht,Ts,ta]),Is=$r?$r.dragging.draggableId:null,Wl=zn(function(){return{droppableId:Ht,type:Sn,isUsingCloneFor:Is}},[Ht,Is,Sn]);function _u(){if(!$r)return null;var Xu=$r.dragging,hd=$r.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 Kn.createPortal(Lc,yo())}return le.createElement(Jd.Provider,{value:Wl},Tt(Ql,Oi),_u())}var Ds=function(Ce,ke){return Ce===ke.droppable.type},Sl=function(Ce,ke){return ke.draggables[Ce.draggable.id]},uu=function(){var Ce={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},ke=(0,ut.Z)({},Ce,{shouldAnimatePlaceholder:!1}),Ke=Gn(function(Tt){return{draggableId:Tt.id,type:Tt.type,source:{index:Tt.index,droppableId:Tt.droppableId}}}),St=Gn(function(Tt,Ht,Sn,Hn,An,bn){var En=An.descriptor.id,ni=An.descriptor.droppableId===Tt;if(ni){var Oi=bn?{render:bn,dragging:Ke(An.descriptor)}:null,$r={isDraggingOver:Sn,draggingOverWith:Sn?En:null,draggingFromThisWith:En,isUsingPlaceholder:!0};return{placeholder:An.placeholder,shouldAnimatePlaceholder:!1,snapshot:$r,useClone:Oi}}if(!Ht)return ke;if(!Hn)return Ce;var no={isDraggingOver:Sn,draggingOverWith:En,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:An.placeholder,shouldAnimatePlaceholder:!0,snapshot:no,useClone:null}}),yt=function(Ht,Sn){var Hn=Sn.droppableId,An=Sn.type,bn=!Sn.isDropDisabled,En=Sn.renderClone;if(Ht.isDragging){var ni=Ht.critical;if(!Ds(An,ni))return ke;var Oi=Sl(ni,Ht.dimensions),$r=Ko(Ht.impact)===Hn;return St(Hn,bn,$r,$r,Oi,En)}if(Ht.phase==="DROP_ANIMATING"){var no=Ht.completed;if(!Ds(An,no.critical))return ke;var yo=Sl(no.critical,Ht.dimensions);return St(Hn,bn,qo(no.result)===Hn,Ko(no.impact)===Hn,yo,En)}if(Ht.phase==="IDLE"&&Ht.completed&&!Ht.shouldFlush){var To=Ht.completed;if(!Ds(An,To.critical))return ke;var ta=Ko(To.impact)===Hn,Qo=!!(To.impact.at&&To.impact.at.type==="COMBINE"),Da=To.critical.droppable.id===Hn;return ta?Qo?Ce:ke:Da?Ce:ke}return ke};return yt},fu={updateViewportMaxScroll:Po};function jc(){return document.body||In(!1),document.body}var Pl={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:jc},Pc=et(uu,fu,null,{context:lc,pure:!0,areStatePropsEqual:Mo})(Jl);Pc.defaultProps=Pl},38486:function(On,mn){"use strict";var pe;var le=60103,Te=60106,He=60107,ut=60108,We=60114,Ue=60109,Me=60110,Ct=60112,Pt=60113,$e=60120,Ft=60115,lt=60116,vt=60121,Oe=60122,te=60117,ee=60129,de=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;le=se("react.element"),Te=se("react.portal"),He=se("react.fragment"),ut=se("react.strict_mode"),We=se("react.profiler"),Ue=se("react.provider"),Me=se("react.context"),Ct=se("react.forward_ref"),Pt=se("react.suspense"),$e=se("react.suspense_list"),Ft=se("react.memo"),lt=se("react.lazy"),vt=se("react.block"),Oe=se("react.server.block"),te=se("react.fundamental"),ee=se("react.debug_trace_mode"),de=se("react.legacy_hidden")}function he(Nt){if(typeof Nt=="object"&&Nt!==null){var at=Nt.$$typeof;switch(at){case le:switch(Nt=Nt.type,Nt){case He:case We:case ut:case Pt:case $e:return Nt;default:switch(Nt=Nt&&Nt.$$typeof,Nt){case Me:case Ct:case lt:case Ft:case Ue:return Nt;default:return at}}case Te:return at}}}var ve=Ue,Ee=le,Be=Ct,Le=He,ze=lt,je=Ft,Xe=Te,Ye=We,dt=ut,Ze=Pt;pe=Me,pe=ve,pe=Ee,pe=Be,pe=Le,pe=ze,pe=je,pe=Xe,pe=Ye,pe=dt,pe=Ze,pe=function(){return!1},pe=function(){return!1},mn.isContextConsumer=function(Nt){return he(Nt)===Me},pe=function(Nt){return he(Nt)===Ue},pe=function(Nt){return typeof Nt=="object"&&Nt!==null&&Nt.$$typeof===le},pe=function(Nt){return he(Nt)===Ct},pe=function(Nt){return he(Nt)===He},pe=function(Nt){return he(Nt)===lt},pe=function(Nt){return he(Nt)===Ft},pe=function(Nt){return he(Nt)===Te},pe=function(Nt){return he(Nt)===We},pe=function(Nt){return he(Nt)===ut},pe=function(Nt){return he(Nt)===Pt},pe=function(Nt){return typeof Nt=="string"||typeof Nt=="function"||Nt===He||Nt===We||Nt===ee||Nt===ut||Nt===Pt||Nt===$e||Nt===de||typeof Nt=="object"&&Nt!==null&&(Nt.$$typeof===lt||Nt.$$typeof===Ft||Nt.$$typeof===Ue||Nt.$$typeof===Me||Nt.$$typeof===Ct||Nt.$$typeof===te||Nt.$$typeof===vt||Nt[0]===Oe)},pe=he},53410:function(On,mn,pe){"use strict";On.exports=pe(38486)},32637:function(On,mn,pe){"use strict";On.exports=pe.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(On){"use strict";On.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(On){"use strict";On.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},31328:function(On){"use strict";On.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(On){"use strict";On.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(On){"use strict";On.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(On){"use strict";On.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(On,mn,pe){"use strict";pe.d(mn,{Z:function(){return Ct}});const le=Pt=>typeof Pt=="object"&&Pt!=null&&Pt.nodeType===1,Te=(Pt,$e)=>(!$e||Pt!=="hidden")&&Pt!=="visible"&&Pt!=="clip",He=(Pt,$e)=>{if(Pt.clientHeight<Pt.scrollHeight||Pt.clientWidth<Pt.scrollWidth){const Ft=getComputedStyle(Pt,null);return Te(Ft.overflowY,$e)||Te(Ft.overflowX,$e)||(lt=>{const vt=(Oe=>{if(!Oe.ownerDocument||!Oe.ownerDocument.defaultView)return null;try{return Oe.ownerDocument.defaultView.frameElement}catch(te){return null}})(lt);return!!vt&&(vt.clientHeight<lt.scrollHeight||vt.clientWidth<lt.scrollWidth)})(Pt)}return!1},ut=(Pt,$e,Ft,lt,vt,Oe,te,ee)=>Oe<Pt&&te>$e||Oe>Pt&&te<$e?0:Oe<=Pt&&ee<=Ft||te>=$e&&ee>=Ft?Oe-Pt-lt:te>$e&&ee<Ft||Oe<Pt&&ee>Ft?te-$e+vt:0,We=Pt=>{const $e=Pt.parentElement;return $e==null?Pt.getRootNode().host||null:$e},Ue=(Pt,$e)=>{var Ft,lt,vt,Oe;if(typeof document=="undefined")return[];const{scrollMode:te,block:ee,inline:de,boundary:se,skipOverflowHiddenElements:he}=$e,ve=typeof se=="function"?se:yn=>yn!==se;if(!le(Pt))throw new TypeError("Invalid target");const Ee=document.scrollingElement||document.documentElement,Be=[];let Le=Pt;for(;le(Le)&&ve(Le);){if(Le=We(Le),Le===Ee){Be.push(Le);break}Le!=null&&Le===document.body&&He(Le)&&!He(document.documentElement)||Le!=null&&He(Le,he)&&Be.push(Le)}const ze=(lt=(Ft=window.visualViewport)==null?void 0:Ft.width)!=null?lt:innerWidth,je=(Oe=(vt=window.visualViewport)==null?void 0:vt.height)!=null?Oe:innerHeight,{scrollX:Xe,scrollY:Ye}=window,{height:dt,width:Ze,top:Nt,right:at,bottom:kt,left:xt}=Pt.getBoundingClientRect(),{top:Ot,right:Gt,bottom:At,left:qe}=(yn=>{const jt=window.getComputedStyle(yn);return{top:parseFloat(jt.scrollMarginTop)||0,right:parseFloat(jt.scrollMarginRight)||0,bottom:parseFloat(jt.scrollMarginBottom)||0,left:parseFloat(jt.scrollMarginLeft)||0}})(Pt);let Ve=ee==="start"||ee==="nearest"?Nt-Ot:ee==="end"?kt+At:Nt+dt/2-Ot+At,_t=de==="center"?xt+Ze/2-qe+Gt:de==="end"?at+Gt:xt-qe;const vn=[];for(let yn=0;yn<Be.length;yn++){const jt=Be[yn],{height:en,width:ln,top:Wn,right:un,bottom:kn,left:wt}=jt.getBoundingClientRect();if(te==="if-needed"&&Nt>=0&&xt>=0&&kt<=je&&at<=ze&&(jt===Ee&&!He(jt)||Nt>=Wn&&kt<=kn&&xt>=wt&&at<=un))return vn;const jn=getComputedStyle(jt),ci=parseInt(jn.borderLeftWidth,10),Ge=parseInt(jn.borderTopWidth,10),be=parseInt(jn.borderRightWidth,10),Pe=parseInt(jn.borderBottomWidth,10);let Ne=0,Ie=0;const xe="offsetWidth"in jt?jt.offsetWidth-jt.clientWidth-ci-be:0,ct="offsetHeight"in jt?jt.offsetHeight-jt.clientHeight-Ge-Pe:0,Lt="offsetWidth"in jt?jt.offsetWidth===0?0:ln/jt.offsetWidth:0,et="offsetHeight"in jt?jt.offsetHeight===0?0:en/jt.offsetHeight:0;if(Ee===jt)Ne=ee==="start"?Ve:ee==="end"?Ve-je:ee==="nearest"?ut(Ye,Ye+je,je,Ge,Pe,Ye+Ve,Ye+Ve+dt,dt):Ve-je/2,Ie=de==="start"?_t:de==="center"?_t-ze/2:de==="end"?_t-ze:ut(Xe,Xe+ze,ze,ci,be,Xe+_t,Xe+_t+Ze,Ze),Ne=Math.max(0,Ne+Ye),Ie=Math.max(0,Ie+Xe);else{Ne=ee==="start"?Ve-Wn-Ge:ee==="end"?Ve-kn+Pe+ct:ee==="nearest"?ut(Wn,kn,en,Ge,Pe+ct,Ve,Ve+dt,dt):Ve-(Wn+en/2)+ct/2,Ie=de==="start"?_t-wt-ci:de==="center"?_t-(wt+ln/2)+xe/2:de==="end"?_t-un+be+xe:ut(wt,un,ln,ci,be+xe,_t,_t+Ze,Ze);const{scrollLeft:it,scrollTop:Bt}=jt;Ne=et===0?0:Math.max(0,Math.min(Bt+Ne/et,jt.scrollHeight-en/et+ct)),Ie=Lt===0?0:Math.max(0,Math.min(it+Ie/Lt,jt.scrollWidth-ln/Lt+xe)),Ve+=Bt-Ne,_t+=it-Ie}vn.push({el:jt,top:Ne,left:Ie})}return vn},Me=Pt=>Pt===!1?{block:"end",inline:"nearest"}:($e=>$e===Object($e)&&Object.keys($e).length!==0)(Pt)?Pt:{block:"start",inline:"nearest"};function Ct(Pt,$e){if(!Pt.isConnected||!(vt=>{let Oe=vt;for(;Oe&&Oe.parentNode;){if(Oe.parentNode===document)return!0;Oe=Oe.parentNode instanceof ShadowRoot?Oe.parentNode.host:Oe.parentNode}return!1})(Pt))return;const Ft=(vt=>{const Oe=window.getComputedStyle(vt);return{top:parseFloat(Oe.scrollMarginTop)||0,right:parseFloat(Oe.scrollMarginRight)||0,bottom:parseFloat(Oe.scrollMarginBottom)||0,left:parseFloat(Oe.scrollMarginLeft)||0}})(Pt);if((vt=>typeof vt=="object"&&typeof vt.behavior=="function")($e))return $e.behavior(Ue(Pt,$e));const lt=typeof $e=="boolean"||$e==null?void 0:$e.behavior;for(const{el:vt,top:Oe,left:te}of Ue(Pt,Me($e))){const ee=Oe-Ft.top+Ft.bottom,de=te-Ft.left+Ft.right;vt.scroll({top:ee,left:de,behavior:lt})}}}}]);